path
stringlengths
5
304
repo_name
stringlengths
6
79
content
stringlengths
27
1.05M
src/Flags/Luxembourg.js
runjak/css-flags
// @flow import React from 'react'; import LinearFlag from './LinearFlag'; import gradient from '../utils/gradient'; const red = '#EE2537'; const white = '#FFFFFF'; const blue = '#00A2DF'; export default function Luxembourg() { return ( <LinearFlag gradient={`${gradient([red, white, blue])}`} /> ); }
app/scenes/CustomerSearch.js
besing/frischeApp
'use strict'; import React, {Component} from 'react'; import { View, ListView, Text } from 'react-native'; // Import 3rd Party Node Modules import { SearchBar, ListItem } from 'react-native-elements'; // Import Scenes & Components import ArticlesList from '../scenes/ArticlesList'; // Import Globals, Configs & Helpers import globalStyles from '../config/globalStyles' // Import Locals import {customersData} from '../scenes/Home'; export default class CustomerSearch extends Component { constructor(props) { super(props); this.ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}); this.state = { dataSource: this.ds.cloneWithRows(customersData), searchTextFirstName: '', searchTextLastName: '' }; this.renderRow = this.renderRow.bind(this); this._setSearchTextFirstName = this._setSearchTextFirstName.bind(this); this._setSearchTextLastName = this._setSearchTextLastName.bind(this); this._filterList = this._filterList.bind(this); this._selectCustomer = this._selectCustomer.bind(this) } render() { return ( <View style={[globalStyles.container, {paddingTop: 64}]}> <SearchBar onChange={this._setSearchTextFirstName} placeholder="Vorname" clearButtonMode="always" lightTheme /> <SearchBar onChange={this._setSearchTextLastName} placeholder="Nachname" clearButtonMode="always" lightTheme /> <ListView dataSource={this.state.dataSource} renderRow={this.renderRow} automaticallyAdjustContentInsets={false} enableEmptySections={true} /> </View> ); } renderRow(rowData, sectionID) { return ( <ListItem key={sectionID} title={`${rowData.lastname}, ${rowData.firstname}`} subtitle={rowData.email} onPress={() => this._selectCustomer(rowData)} underlayColor={'#eee'} /> ) } _setSearchTextFirstName(event) { const searchText = event.nativeEvent.text; this.setState({ searchTextFirstName: searchText }); this._filterList(customersData, 'firstname', searchText, 'lastname', this.state.searchTextLastName) } _setSearchTextLastName(event) { const searchText = event.nativeEvent.text; this.setState({searchTextLastName: searchText}); this._filterList(customersData, 'lastname', searchText, 'firstname', this.state.searchTextFirstName); } _filterList(data, firstProp, firstValue, secondProp, secondValue) { const filteredData = data.filter((obj) => { return ( obj[firstProp].includes(firstValue) && obj[secondProp].includes(secondValue) || obj[firstProp].includes(firstValue.toLowerCase()) && obj[secondProp].includes(secondValue) || obj[firstProp].includes(firstValue) && obj[secondProp].includes(secondValue.toLowerCase()) || obj[firstProp].includes(firstValue.toLowerCase()) && obj[secondProp].includes(secondValue.toLowerCase()) ); }); this.setState({ dataSource: this.ds.cloneWithRows(filteredData) }); } _selectCustomer(selectedCustomer) { this.props.navigator.push({ title: `${selectedCustomer.firstname} ${selectedCustomer.lastname}`, component: ArticlesList, passProps: { customerId: selectedCustomer.id, firstname: selectedCustomer.firstname, lastname: selectedCustomer.lastname, email: selectedCustomer.email } }); } };
src/CircularProgress.js
soledaddiez/react-native-circular-progress
import React from 'react'; import PropTypes from 'prop-types'; import { View, Platform } from 'react-native'; import { Surface, Shape, Path, Group } from '../../react-native/Libraries/ART/ReactNativeART'; import MetricsPath from 'art/metrics/path'; export default class CircularProgress extends React.Component { circlePath(cx, cy, r, startDegree, endDegree) { let p = Path(); p.path.push(0, cx + r, cy); p.path.push(4, cx, cy, r, startDegree * Math.PI / 180, endDegree * Math.PI / 180, 1); return p; } extractFill(fill) { if (fill < 0.01) { return 0; } else if (fill > 100) { return 100; } return fill; } render() { const { size, width, tintColor, backgroundColor, style, rotation, linecap, children } = this.props; const backgroundPath = this.circlePath(size / 2, size / 2, size / 2 - width / 2, 0, 360 * .9999); const fill = this.extractFill(this.props.fill); const circlePath = this.circlePath(size / 2, size / 2, size / 2 - width / 2, 0, (360 * .9999) * fill / 100); return ( <View style={style}> <Surface width={size} height={size}> <Group rotation={rotation - 90} originX={size/2} originY={size/2}> <Shape d={backgroundPath} stroke={backgroundColor} strokeWidth={width}/> <Shape d={circlePath} stroke={tintColor} strokeWidth={width} strokeCap={linecap}/> </Group> </Surface> { children && children(fill) } </View> ) } } CircularProgress.propTypes = { style: View.propTypes.style, size: PropTypes.number.isRequired, fill: PropTypes.number.isRequired, width: PropTypes.number.isRequired, tintColor: PropTypes.string, backgroundColor: PropTypes.string, rotation: PropTypes.number, linecap: PropTypes.string, children: PropTypes.func } CircularProgress.defaultProps = { tintColor: 'black', backgroundColor: '#e4e4e4', rotation: 90, linecap: 'butt' }
ajax/libs/jqwidgets/10.1.1/jqwidgets-react-tsx/jqxtogglebutton/react_jqxtogglebutton.esm.js
cdnjs/cdnjs
import * as jqxcore from '../../jqwidgets/jqxcore'; import * as jqxbuttons from '../../jqwidgets/jqxbuttons'; import { createElement, PureComponent } from 'react'; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var JqxToggleButton = /** @class */ (function (_super) { __extends(JqxToggleButton, _super); function JqxToggleButton(props) { var _this = _super.call(this, props) || this; /* tslint:disable:variable-name */ _this._jqx = JQXLite; _this._id = 'JqxToggleButton' + _this._jqx.generateID(); _this._componentSelector = '#' + _this._id; _this.state = { lastProps: props }; return _this; } JqxToggleButton.getDerivedStateFromProps = function (props, state) { if (!Object.is) { Object.is = function (x, y) { if (x === y) { return x !== 0 || 1 / x === 1 / y; } else { return x !== x && y !== y; } }; } var areEqual = Object.is(props, state.lastProps); if (!areEqual) { var newState = { lastProps: props }; return newState; } return null; }; JqxToggleButton.prototype.componentDidMount = function () { var widgetOptions = this._manageProps(); this._jqx(this._componentSelector).jqxToggleButton(widgetOptions); this._wireEvents(); }; JqxToggleButton.prototype.componentDidUpdate = function () { var widgetOptions = this._manageProps(); this.setOptions(widgetOptions); this._wireEvents(); }; JqxToggleButton.prototype.render = function () { return (createElement("div", { id: this._id, className: this.props.className, style: this.props.style }, this.props.children)); }; JqxToggleButton.prototype.setOptions = function (options) { this._jqx(this._componentSelector).jqxToggleButton(options); }; JqxToggleButton.prototype.getOptions = function (option) { return this._jqx(this._componentSelector).jqxToggleButton(option); }; JqxToggleButton.prototype.check = function () { this._jqx(this._componentSelector).jqxToggleButton('check'); }; JqxToggleButton.prototype.destroy = function () { this._jqx(this._componentSelector).jqxToggleButton('destroy'); }; JqxToggleButton.prototype.focus = function () { this._jqx(this._componentSelector).jqxToggleButton('focus'); }; JqxToggleButton.prototype.renderWidget = function () { this._jqx(this._componentSelector).jqxToggleButton('render'); }; JqxToggleButton.prototype.toggle = function () { this._jqx(this._componentSelector).jqxToggleButton('toggle'); }; JqxToggleButton.prototype.unCheck = function () { this._jqx(this._componentSelector).jqxToggleButton('unCheck'); }; JqxToggleButton.prototype.val = function (value) { if (value) { this._jqx(this._componentSelector).jqxToggleButton('val', value); } else { return this._jqx(this._componentSelector).jqxToggleButton('val'); } }; JqxToggleButton.prototype._manageProps = function () { var widgetProps = ['disabled', 'height', 'imgSrc', 'imgWidth', 'imgHeight', 'imgPosition', 'roundedCorners', 'rtl', 'textPosition', 'textImageRelation', 'theme', 'template', 'toggled', 'width', 'value']; var options = {}; for (var prop in this.props) { if (widgetProps.indexOf(prop) !== -1) { options[prop] = this.props[prop]; } } return options; }; JqxToggleButton.prototype._wireEvents = function () { for (var prop in this.props) { if (prop.indexOf('on') === 0) { var originalEventName = prop.slice(2); originalEventName = originalEventName.charAt(0).toLowerCase() + originalEventName.slice(1); this._jqx(this._componentSelector).off(originalEventName); this._jqx(this._componentSelector).on(originalEventName, this.props[prop]); } } }; return JqxToggleButton; }(PureComponent)); var jqx = window.jqx; var JQXLite = window.JQXLite; export default JqxToggleButton; export { jqx, JQXLite };
app/components/NewTransactionModal.js
danielfranca/xpensetrackrreact
import React from 'react'; export default function NewTransactionModal(props) { return ( <div className="ui modal" id="newTransactionModal"> <i className="close icon"></i> <div className="header"> Add New Transaction </div> <h4 className="ui horizontal divider"> </h4> <form onSubmit={props.onSubmitCategory}> <div className="ui search" id="searchCategory"> <div className="ui icon input"> <input className="prompt" type="text" placeholder="Category..."/> </div> <div className="results"></div> </div> <div className="ui labeled input" style={{marginLeft: 10}}> <div className="ui label"> Description </div> <input type="text" placeholder="Description" name="description" id="newTransactionDescription"/> </div> <h4 className="ui horizontal divider"> </h4> <div className="actions"> <div className="ui button">Cancel</div> <button className="ui button" type="submit">OK</button> </div> </form> </div> ); }
ajax/libs/yui/3.7.2/simpleyui/simpleyui.js
cloudrifles/cdnjs
/** * The YUI module contains the components required for building the YUI seed * file. This includes the script loading mechanism, a simple queue, and * the core utilities for the library. * @module yui * @main yui * @submodule yui-base */ if (typeof YUI != 'undefined') { YUI._YUI = YUI; } /** The YUI global namespace object. If YUI is already defined, the existing YUI object will not be overwritten so that defined namespaces are preserved. It is the constructor for the object the end user interacts with. As indicated below, each instance has full custom event support, but only if the event system is available. This is a self-instantiable factory function. You can invoke it directly like this: YUI().use('*', function(Y) { // ready }); But it also works like this: var Y = YUI(); Configuring the YUI object: YUI({ debug: true, combine: false }).use('node', function(Y) { //Node is ready to use }); See the API docs for the <a href="config.html">Config</a> class for the complete list of supported configuration properties accepted by the YUI constuctor. @class YUI @constructor @global @uses EventTarget @param [o]* {Object} 0..n optional configuration objects. these values are store in Y.config. See <a href="config.html">Config</a> for the list of supported properties. */ /*global YUI*/ /*global YUI_config*/ var YUI = function() { var i = 0, Y = this, args = arguments, l = args.length, instanceOf = function(o, type) { return (o && o.hasOwnProperty && (o instanceof type)); }, gconf = (typeof YUI_config !== 'undefined') && YUI_config; if (!(instanceOf(Y, YUI))) { Y = new YUI(); } else { // set up the core environment Y._init(); /** YUI.GlobalConfig is a master configuration that might span multiple contexts in a non-browser environment. It is applied first to all instances in all contexts. @property GlobalConfig @type {Object} @global @static @example YUI.GlobalConfig = { filter: 'debug' }; YUI().use('node', function(Y) { //debug files used here }); YUI({ filter: 'min' }).use('node', function(Y) { //min files used here }); */ if (YUI.GlobalConfig) { Y.applyConfig(YUI.GlobalConfig); } /** YUI_config is a page-level config. It is applied to all instances created on the page. This is applied after YUI.GlobalConfig, and before the instance level configuration objects. @global @property YUI_config @type {Object} @example //Single global var to include before YUI seed file YUI_config = { filter: 'debug' }; YUI().use('node', function(Y) { //debug files used here }); YUI({ filter: 'min' }).use('node', function(Y) { //min files used here }); */ if (gconf) { Y.applyConfig(gconf); } // bind the specified additional modules for this instance if (!l) { Y._setup(); } } if (l) { // Each instance can accept one or more configuration objects. // These are applied after YUI.GlobalConfig and YUI_Config, // overriding values set in those config files if there is a ' // matching property. for (; i < l; i++) { Y.applyConfig(args[i]); } Y._setup(); } Y.instanceOf = instanceOf; return Y; }; (function() { var proto, prop, VERSION = '@VERSION@', PERIOD = '.', BASE = 'http://yui.yahooapis.com/', /* These CSS class names can't be generated by getClassName since it is not available at the time they are being used. */ DOC_LABEL = 'yui3-js-enabled', CSS_STAMP_EL = 'yui3-css-stamp', NOOP = function() {}, SLICE = Array.prototype.slice, APPLY_TO_AUTH = { 'io.xdrReady': 1, // the functions applyTo 'io.xdrResponse': 1, // can call. this should 'SWF.eventHandler': 1 }, // be done at build time hasWin = (typeof window != 'undefined'), win = (hasWin) ? window : null, doc = (hasWin) ? win.document : null, docEl = doc && doc.documentElement, docClass = docEl && docEl.className, instances = {}, time = new Date().getTime(), add = function(el, type, fn, capture) { if (el && el.addEventListener) { el.addEventListener(type, fn, capture); } else if (el && el.attachEvent) { el.attachEvent('on' + type, fn); } }, remove = function(el, type, fn, capture) { if (el && el.removeEventListener) { // this can throw an uncaught exception in FF try { el.removeEventListener(type, fn, capture); } catch (ex) {} } else if (el && el.detachEvent) { el.detachEvent('on' + type, fn); } }, handleLoad = function() { YUI.Env.windowLoaded = true; YUI.Env.DOMReady = true; if (hasWin) { remove(window, 'load', handleLoad); } }, getLoader = function(Y, o) { var loader = Y.Env._loader, lCore = [ 'loader-base' ], G_ENV = YUI.Env, mods = G_ENV.mods; if (loader) { //loader._config(Y.config); loader.ignoreRegistered = false; loader.onEnd = null; loader.data = null; loader.required = []; loader.loadType = null; } else { loader = new Y.Loader(Y.config); Y.Env._loader = loader; } if (mods && mods.loader) { lCore = [].concat(lCore, YUI.Env.loaderExtras); } YUI.Env.core = Y.Array.dedupe([].concat(YUI.Env.core, lCore)); return loader; }, clobber = function(r, s) { for (var i in s) { if (s.hasOwnProperty(i)) { r[i] = s[i]; } } }, ALREADY_DONE = { success: true }; // Stamp the documentElement (HTML) with a class of "yui-loaded" to // enable styles that need to key off of JS being enabled. if (docEl && docClass.indexOf(DOC_LABEL) == -1) { if (docClass) { docClass += ' '; } docClass += DOC_LABEL; docEl.className = docClass; } if (VERSION.indexOf('@') > -1) { VERSION = '3.5.0'; // dev time hack for cdn test } proto = { /** * Applies a new configuration object to the YUI instance config. * This will merge new group/module definitions, and will also * update the loader cache if necessary. Updating Y.config directly * will not update the cache. * @method applyConfig * @param {Object} o the configuration object. * @since 3.2.0 */ applyConfig: function(o) { o = o || NOOP; var attr, name, // detail, config = this.config, mods = config.modules, groups = config.groups, aliases = config.aliases, loader = this.Env._loader; for (name in o) { if (o.hasOwnProperty(name)) { attr = o[name]; if (mods && name == 'modules') { clobber(mods, attr); } else if (aliases && name == 'aliases') { clobber(aliases, attr); } else if (groups && name == 'groups') { clobber(groups, attr); } else if (name == 'win') { config[name] = (attr && attr.contentWindow) || attr; config.doc = config[name] ? config[name].document : null; } else if (name == '_yuid') { // preserve the guid } else { config[name] = attr; } } } if (loader) { loader._config(o); } }, /** * Old way to apply a config to the instance (calls `applyConfig` under the hood) * @private * @method _config * @param {Object} o The config to apply */ _config: function(o) { this.applyConfig(o); }, /** * Initialize this YUI instance * @private * @method _init */ _init: function() { var filter, el, Y = this, G_ENV = YUI.Env, Env = Y.Env, prop; /** * The version number of the YUI instance. * @property version * @type string */ Y.version = VERSION; if (!Env) { Y.Env = { core: ['get', 'features', 'intl-base', 'yui-log', 'yui-later'], loaderExtras: ['loader-rollup', 'loader-yui3'], mods: {}, // flat module map versions: {}, // version module map base: BASE, cdn: BASE + VERSION + '/build/', // bootstrapped: false, _idx: 0, _used: {}, _attached: {}, _missed: [], _yidx: 0, _uidx: 0, _guidp: 'y', _loaded: {}, // serviced: {}, // Regex in English: // I'll start at the \b(simpleyui). // 1. Look in the test string for "simpleyui" or "yui" or // "yui-base" or "yui-davglass" or "yui-foobar" that comes after a word break. That is, it // can't match "foyui" or "i_heart_simpleyui". This can be anywhere in the string. // 2. After #1 must come a forward slash followed by the string matched in #1, so // "yui-base/yui-base" or "simpleyui/simpleyui" or "yui-pants/yui-pants". // 3. The second occurence of the #1 token can optionally be followed by "-debug" or "-min", // so "yui/yui-min", "yui/yui-debug", "yui-base/yui-base-debug". NOT "yui/yui-tshirt". // 4. This is followed by ".js", so "yui/yui.js", "simpleyui/simpleyui-min.js" // 0. Going back to the beginning, now. If all that stuff in 1-4 comes after a "?" in the string, // then capture the junk between the LAST "&" and the string in 1-4. So // "blah?foo/yui/yui.js" will capture "foo/" and "blah?some/thing.js&3.3.0/build/yui-davglass/yui-davglass.js" // will capture "3.3.0/build/" // // Regex Exploded: // (?:\? Find a ? // (?:[^&]*&) followed by 0..n characters followed by an & // * in fact, find as many sets of characters followed by a & as you can // ([^&]*) capture the stuff after the last & in \1 // )? but it's ok if all this ?junk&more_junk stuff isn't even there // \b(simpleyui| after a word break find either the string "simpleyui" or // yui(?:-\w+)? the string "yui" optionally followed by a -, then more characters // ) and store the simpleyui or yui-* string in \2 // \/\2 then comes a / followed by the simpleyui or yui-* string in \2 // (?:-(min|debug))? optionally followed by "-min" or "-debug" // .js and ending in ".js" _BASE_RE: /(?:\?(?:[^&]*&)*([^&]*))?\b(simpleyui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/, parseBasePath: function(src, pattern) { var match = src.match(pattern), path, filter; if (match) { path = RegExp.leftContext || src.slice(0, src.indexOf(match[0])); // this is to set up the path to the loader. The file // filter for loader should match the yui include. filter = match[3]; // extract correct path for mixed combo urls // http://yuilibrary.com/projects/yui3/ticket/2528423 if (match[1]) { path += '?' + match[1]; } path = { filter: filter, path: path }; } return path; }, getBase: G_ENV && G_ENV.getBase || function(pattern) { var nodes = (doc && doc.getElementsByTagName('script')) || [], path = Env.cdn, parsed, i, len, src; for (i = 0, len = nodes.length; i < len; ++i) { src = nodes[i].src; if (src) { parsed = Y.Env.parseBasePath(src, pattern); if (parsed) { filter = parsed.filter; path = parsed.path; break; } } } // use CDN default return path; } }; Env = Y.Env; Env._loaded[VERSION] = {}; if (G_ENV && Y !== YUI) { Env._yidx = ++G_ENV._yidx; Env._guidp = ('yui_' + VERSION + '_' + Env._yidx + '_' + time).replace(/\./g, '_').replace(/-/g, '_'); } else if (YUI._YUI) { G_ENV = YUI._YUI.Env; Env._yidx += G_ENV._yidx; Env._uidx += G_ENV._uidx; for (prop in G_ENV) { if (!(prop in Env)) { Env[prop] = G_ENV[prop]; } } delete YUI._YUI; } Y.id = Y.stamp(Y); instances[Y.id] = Y; } Y.constructor = YUI; // configuration defaults Y.config = Y.config || { bootstrap: true, cacheUse: true, debug: true, doc: doc, fetchCSS: true, throwFail: true, useBrowserConsole: true, useNativeES5: true, win: win }; //Register the CSS stamp element if (doc && !doc.getElementById(CSS_STAMP_EL)) { el = doc.createElement('div'); el.innerHTML = '<div id="' + CSS_STAMP_EL + '" style="position: absolute !important; visibility: hidden !important"></div>'; YUI.Env.cssStampEl = el.firstChild; if (doc.body) { doc.body.appendChild(YUI.Env.cssStampEl); } else { docEl.insertBefore(YUI.Env.cssStampEl, docEl.firstChild); } } Y.config.lang = Y.config.lang || 'en-US'; Y.config.base = YUI.config.base || Y.Env.getBase(Y.Env._BASE_RE); if (!filter || (!('mindebug').indexOf(filter))) { filter = 'min'; } filter = (filter) ? '-' + filter : filter; Y.config.loaderPath = YUI.config.loaderPath || 'loader/loader' + filter + '.js'; }, /** * Finishes the instance setup. Attaches whatever modules were defined * when the yui modules was registered. * @method _setup * @private */ _setup: function(o) { var i, Y = this, core = [], mods = YUI.Env.mods, extras = Y.config.core || [].concat(YUI.Env.core); //Clone it.. for (i = 0; i < extras.length; i++) { if (mods[extras[i]]) { core.push(extras[i]); } } Y._attach(['yui-base']); Y._attach(core); if (Y.Loader) { getLoader(Y); } }, /** * Executes a method on a YUI instance with * the specified id if the specified method is whitelisted. * @method applyTo * @param id {String} the YUI instance id. * @param method {String} the name of the method to exectute. * Ex: 'Object.keys'. * @param args {Array} the arguments to apply to the method. * @return {Object} the return value from the applied method or null. */ applyTo: function(id, method, args) { if (!(method in APPLY_TO_AUTH)) { this.log(method + ': applyTo not allowed', 'warn', 'yui'); return null; } var instance = instances[id], nest, m, i; if (instance) { nest = method.split('.'); m = instance; for (i = 0; i < nest.length; i = i + 1) { m = m[nest[i]]; if (!m) { this.log('applyTo not found: ' + method, 'warn', 'yui'); } } return m && m.apply(instance, args); } return null; }, /** Registers a module with the YUI global. The easiest way to create a first-class YUI module is to use the YUI component build tool <a href="http://yui.github.com/shifter/">Shifter</a>. The build system will produce the `YUI.add` wrapper for your module, along with any configuration info required for the module. @method add @param name {String} module name. @param fn {Function} entry point into the module that is used to bind module to the YUI instance. @param {YUI} fn.Y The YUI instance this module is executed in. @param {String} fn.name The name of the module @param version {String} version string. @param details {Object} optional config data: @param details.requires {Array} features that must be present before this module can be attached. @param details.optional {Array} optional features that should be present if loadOptional is defined. Note: modules are not often loaded this way in YUI 3, but this field is still useful to inform the user that certain features in the component will require additional dependencies. @param details.use {Array} features that are included within this module which need to be attached automatically when this module is attached. This supports the YUI 3 rollup system -- a module with submodules defined will need to have the submodules listed in the 'use' config. The YUI component build tool does this for you. @return {YUI} the YUI instance. @example YUI.add('davglass', function(Y, name) { Y.davglass = function() { alert('Dav was here!'); }; }, '3.4.0', { requires: ['yui-base', 'harley-davidson', 'mt-dew'] }); */ add: function(name, fn, version, details) { details = details || {}; var env = YUI.Env, mod = { name: name, fn: fn, version: version, details: details }, //Instance hash so we don't apply it to the same instance twice applied = {}, loader, inst, i, versions = env.versions; env.mods[name] = mod; versions[version] = versions[version] || {}; versions[version][name] = mod; for (i in instances) { if (instances.hasOwnProperty(i)) { inst = instances[i]; if (!applied[inst.id]) { applied[inst.id] = true; loader = inst.Env._loader; if (loader) { if (!loader.moduleInfo[name] || loader.moduleInfo[name].temp) { loader.addModule(details, name); } } } } } return this; }, /** * Executes the function associated with each required * module, binding the module to the YUI instance. * @param {Array} r The array of modules to attach * @param {Boolean} [moot=false] Don't throw a warning if the module is not attached * @method _attach * @private */ _attach: function(r, moot) { var i, name, mod, details, req, use, after, mods = YUI.Env.mods, aliases = YUI.Env.aliases, Y = this, j, cache = YUI.Env._renderedMods, loader = Y.Env._loader, done = Y.Env._attached, len = r.length, loader, def, go, c = []; //Check for conditional modules (in a second+ instance) and add their requirements //TODO I hate this entire method, it needs to be fixed ASAP (3.5.0) ^davglass for (i = 0; i < len; i++) { name = r[i]; mod = mods[name]; c.push(name); if (loader && loader.conditions[name]) { for (j in loader.conditions[name]) { if (loader.conditions[name].hasOwnProperty(j)) { def = loader.conditions[name][j]; go = def && ((def.ua && Y.UA[def.ua]) || (def.test && def.test(Y))); if (go) { c.push(def.name); } } } } } r = c; len = r.length; for (i = 0; i < len; i++) { if (!done[r[i]]) { name = r[i]; mod = mods[name]; if (aliases && aliases[name] && !mod) { Y._attach(aliases[name]); continue; } if (!mod) { if (loader && loader.moduleInfo[name]) { mod = loader.moduleInfo[name]; moot = true; } //if (!loader || !loader.moduleInfo[name]) { //if ((!loader || !loader.moduleInfo[name]) && !moot) { if (!moot && name) { if ((name.indexOf('skin-') === -1) && (name.indexOf('css') === -1)) { Y.Env._missed.push(name); Y.Env._missed = Y.Array.dedupe(Y.Env._missed); Y.message('NOT loaded: ' + name, 'warn', 'yui'); } } } else { done[name] = true; //Don't like this, but in case a mod was asked for once, then we fetch it //We need to remove it from the missed list ^davglass for (j = 0; j < Y.Env._missed.length; j++) { if (Y.Env._missed[j] === name) { Y.message('Found: ' + name + ' (was reported as missing earlier)', 'warn', 'yui'); Y.Env._missed.splice(j, 1); } } /* If it's a temp module, we need to redo it's requirements if it's already loaded since it may have been loaded by another instance and it's dependencies might have been redefined inside the fetched file. */ if (loader && cache && cache[name] && cache[name].temp) { loader.getRequires(cache[name]); req = []; for (j in loader.moduleInfo[name].expanded_map) { if (loader.moduleInfo[name].expanded_map.hasOwnProperty(j)) { req.push(j); } } Y._attach(req); } details = mod.details; req = details.requires; use = details.use; after = details.after; //Force Intl load if there is a language (Loader logic) @todo fix this shit if (details.lang) { req = req || []; req.unshift('intl'); } if (req) { for (j = 0; j < req.length; j++) { if (!done[req[j]]) { if (!Y._attach(req)) { return false; } break; } } } if (after) { for (j = 0; j < after.length; j++) { if (!done[after[j]]) { if (!Y._attach(after, true)) { return false; } break; } } } if (mod.fn) { if (Y.config.throwFail) { mod.fn(Y, name); } else { try { mod.fn(Y, name); } catch (e) { Y.error('Attach error: ' + name, e, name); return false; } } } if (use) { for (j = 0; j < use.length; j++) { if (!done[use[j]]) { if (!Y._attach(use)) { return false; } break; } } } } } } return true; }, /** * Delays the `use` callback until another event has taken place. Like: window.onload, domready, contentready, available. * @private * @method _delayCallback * @param {Callback} cb The original `use` callback * @param {String|Object} until Either an event (load, domready) or an Object containing event/args keys for contentready/available */ _delayCallback: function(cb, until) { var Y = this, mod = ['event-base']; until = (Y.Lang.isObject(until) ? until : { event: until }); if (until.event === 'load') { mod.push('event-synthetic'); } return function() { var args = arguments; Y._use(mod, function() { Y.on(until.event, function() { args[1].delayUntil = until.event; cb.apply(Y, args); }, until.args); }); }; }, /** * Attaches one or more modules to the YUI instance. When this * is executed, the requirements are analyzed, and one of * several things can happen: * * * All requirements are available on the page -- The modules * are attached to the instance. If supplied, the use callback * is executed synchronously. * * * Modules are missing, the Get utility is not available OR * the 'bootstrap' config is false -- A warning is issued about * the missing modules and all available modules are attached. * * * Modules are missing, the Loader is not available but the Get * utility is and boostrap is not false -- The loader is bootstrapped * before doing the following.... * * * Modules are missing and the Loader is available -- The loader * expands the dependency tree and fetches missing modules. When * the loader is finshed the callback supplied to use is executed * asynchronously. * * @method use * @param modules* {String|Array} 1-n modules to bind (uses arguments array). * @param [callback] {Function} callback function executed when * the instance has the required functionality. If included, it * must be the last parameter. * @param callback.Y {YUI} The `YUI` instance created for this sandbox * @param callback.status {Object} Object containing `success`, `msg` and `data` properties * * @example * // loads and attaches dd and its dependencies * YUI().use('dd', function(Y) {}); * * // loads and attaches dd and node as well as all of their dependencies (since 3.4.0) * YUI().use(['dd', 'node'], function(Y) {}); * * // attaches all modules that are available on the page * YUI().use('*', function(Y) {}); * * // intrinsic YUI gallery support (since 3.1.0) * YUI().use('gallery-yql', function(Y) {}); * * // intrinsic YUI 2in3 support (since 3.1.0) * YUI().use('yui2-datatable', function(Y) {}); * * @return {YUI} the YUI instance. */ use: function() { var args = SLICE.call(arguments, 0), callback = args[args.length - 1], Y = this, i = 0, a = [], name, Env = Y.Env, provisioned = true; // The last argument supplied to use can be a load complete callback if (Y.Lang.isFunction(callback)) { args.pop(); if (Y.config.delayUntil) { callback = Y._delayCallback(callback, Y.config.delayUntil); } } else { callback = null; } if (Y.Lang.isArray(args[0])) { args = args[0]; } if (Y.config.cacheUse) { while ((name = args[i++])) { if (!Env._attached[name]) { provisioned = false; break; } } if (provisioned) { if (args.length) { } Y._notify(callback, ALREADY_DONE, args); return Y; } } if (Y._loading) { Y._useQueue = Y._useQueue || new Y.Queue(); Y._useQueue.add([args, callback]); } else { Y._use(args, function(Y, response) { Y._notify(callback, response, args); }); } return Y; }, /** * Notify handler from Loader for attachment/load errors * @method _notify * @param callback {Function} The callback to pass to the `Y.config.loadErrorFn` * @param response {Object} The response returned from Loader * @param args {Array} The aruments passed from Loader * @private */ _notify: function(callback, response, args) { if (!response.success && this.config.loadErrorFn) { this.config.loadErrorFn.call(this, this, callback, response, args); } else if (callback) { if (this.Env._missed && this.Env._missed.length) { response.msg = 'Missing modules: ' + this.Env._missed.join(); response.success = false; } if (this.config.throwFail) { callback(this, response); } else { try { callback(this, response); } catch (e) { this.error('use callback error', e, args); } } } }, /** * This private method is called from the `use` method queue. To ensure that only one set of loading * logic is performed at a time. * @method _use * @private * @param args* {String} 1-n modules to bind (uses arguments array). * @param *callback {Function} callback function executed when * the instance has the required functionality. If included, it * must be the last parameter. */ _use: function(args, callback) { if (!this.Array) { this._attach(['yui-base']); } var len, loader, handleBoot, handleRLS, Y = this, G_ENV = YUI.Env, mods = G_ENV.mods, Env = Y.Env, used = Env._used, aliases = G_ENV.aliases, queue = G_ENV._loaderQueue, firstArg = args[0], YArray = Y.Array, config = Y.config, boot = config.bootstrap, missing = [], i, r = [], ret = true, fetchCSS = config.fetchCSS, process = function(names, skip) { var i = 0, a = [], name, len, m, req, use; if (!names.length) { return; } if (aliases) { len = names.length; for (i = 0; i < len; i++) { if (aliases[names[i]] && !mods[names[i]]) { a = [].concat(a, aliases[names[i]]); } else { a.push(names[i]); } } names = a; } len = names.length; for (i = 0; i < len; i++) { name = names[i]; if (!skip) { r.push(name); } // only attach a module once if (used[name]) { continue; } m = mods[name]; req = null; use = null; if (m) { used[name] = true; req = m.details.requires; use = m.details.use; } else { // CSS files don't register themselves, see if it has // been loaded if (!G_ENV._loaded[VERSION][name]) { missing.push(name); } else { used[name] = true; // probably css } } // make sure requirements are attached if (req && req.length) { process(req); } // make sure we grab the submodule dependencies too if (use && use.length) { process(use, 1); } } }, handleLoader = function(fromLoader) { var response = fromLoader || { success: true, msg: 'not dynamic' }, redo, origMissing, ret = true, data = response.data; Y._loading = false; if (data) { origMissing = missing; missing = []; r = []; process(data); redo = missing.length; if (redo) { if ([].concat(missing).sort().join() == origMissing.sort().join()) { redo = false; } } } if (redo && data) { Y._loading = true; Y._use(missing, function() { if (Y._attach(data)) { Y._notify(callback, response, data); } }); } else { if (data) { ret = Y._attach(data); } if (ret) { Y._notify(callback, response, args); } } if (Y._useQueue && Y._useQueue.size() && !Y._loading) { Y._use.apply(Y, Y._useQueue.next()); } }; // YUI().use('*'); // bind everything available if (firstArg === '*') { args = []; for (i in mods) { if (mods.hasOwnProperty(i)) { args.push(i); } } ret = Y._attach(args); if (ret) { handleLoader(); } return Y; } if ((mods.loader || mods['loader-base']) && !Y.Loader) { Y._attach(['loader' + ((!mods.loader) ? '-base' : '')]); } // use loader to expand dependencies and sort the // requirements if it is available. if (boot && Y.Loader && args.length) { loader = getLoader(Y); loader.require(args); loader.ignoreRegistered = true; loader._boot = true; loader.calculate(null, (fetchCSS) ? null : 'js'); args = loader.sorted; loader._boot = false; } process(args); len = missing.length; if (len) { missing = YArray.dedupe(missing); len = missing.length; } // dynamic load if (boot && len && Y.Loader) { Y._loading = true; loader = getLoader(Y); loader.onEnd = handleLoader; loader.context = Y; loader.data = args; loader.ignoreRegistered = false; loader.require(args); loader.insert(null, (fetchCSS) ? null : 'js'); } else if (boot && len && Y.Get && !Env.bootstrapped) { Y._loading = true; handleBoot = function() { Y._loading = false; queue.running = false; Env.bootstrapped = true; G_ENV._bootstrapping = false; if (Y._attach(['loader'])) { Y._use(args, callback); } }; if (G_ENV._bootstrapping) { queue.add(handleBoot); } else { G_ENV._bootstrapping = true; Y.Get.script(config.base + config.loaderPath, { onEnd: handleBoot }); } } else { ret = Y._attach(args); if (ret) { handleLoader(); } } return Y; }, /** Adds a namespace object onto the YUI global if called statically. // creates YUI.your.namespace.here as nested objects YUI.namespace("your.namespace.here"); If called as a method on a YUI <em>instance</em>, it creates the namespace on the instance. // creates Y.property.package Y.namespace("property.package"); Dots in the input string cause `namespace` to create nested objects for each token. If any part of the requested namespace already exists, the current object will be left in place. This allows multiple calls to `namespace` to preserve existing namespaced properties. If the first token in the namespace string is "YAHOO", the token is discarded. Be careful with namespace tokens. Reserved words may work in some browsers and not others. For instance, the following will fail in some browsers because the supported version of JavaScript reserves the word "long": Y.namespace("really.long.nested.namespace"); <em>Note: If you pass multiple arguments to create multiple namespaces, only the last one created is returned from this function.</em> @method namespace @param {String} namespace* namespaces to create. @return {Object} A reference to the last namespace object created. **/ namespace: function() { var a = arguments, o, i = 0, j, d, arg; for (; i < a.length; i++) { o = this; //Reset base object per argument or it will get reused from the last arg = a[i]; if (arg.indexOf(PERIOD) > -1) { //Skip this if no "." is present d = arg.split(PERIOD); for (j = (d[0] == 'YAHOO') ? 1 : 0; j < d.length; j++) { o[d[j]] = o[d[j]] || {}; o = o[d[j]]; } } else { o[arg] = o[arg] || {}; o = o[arg]; //Reset base object to the new object so it's returned } } return o; }, // this is replaced if the log module is included log: NOOP, message: NOOP, // this is replaced if the dump module is included dump: function (o) { return ''+o; }, /** * Report an error. The reporting mechanism is controlled by * the `throwFail` configuration attribute. If throwFail is * not specified, the message is written to the Logger, otherwise * a JS error is thrown. If an `errorFn` is specified in the config * it must return `true` to keep the error from being thrown. * @method error * @param msg {String} the error message. * @param e {Error|String} Optional JS error that was caught, or an error string. * @param src Optional additional info (passed to `Y.config.errorFn` and `Y.message`) * and `throwFail` is specified, this error will be re-thrown. * @return {YUI} this YUI instance. */ error: function(msg, e, src) { //TODO Add check for window.onerror here var Y = this, ret; if (Y.config.errorFn) { ret = Y.config.errorFn.apply(Y, arguments); } if (!ret) { throw (e || new Error(msg)); } else { Y.message(msg, 'error', ''+src); // don't scrub this one } return Y; }, /** * Generate an id that is unique among all YUI instances * @method guid * @param pre {String} optional guid prefix. * @return {String} the guid. */ guid: function(pre) { var id = this.Env._guidp + '_' + (++this.Env._uidx); return (pre) ? (pre + id) : id; }, /** * Returns a `guid` associated with an object. If the object * does not have one, a new one is created unless `readOnly` * is specified. * @method stamp * @param o {Object} The object to stamp. * @param readOnly {Boolean} if `true`, a valid guid will only * be returned if the object has one assigned to it. * @return {String} The object's guid or null. */ stamp: function(o, readOnly) { var uid; if (!o) { return o; } // IE generates its own unique ID for dom nodes // The uniqueID property of a document node returns a new ID if (o.uniqueID && o.nodeType && o.nodeType !== 9) { uid = o.uniqueID; } else { uid = (typeof o === 'string') ? o : o._yuid; } if (!uid) { uid = this.guid(); if (!readOnly) { try { o._yuid = uid; } catch (e) { uid = null; } } } return uid; }, /** * Destroys the YUI instance * @method destroy * @since 3.3.0 */ destroy: function() { var Y = this; if (Y.Event) { Y.Event._unload(); } delete instances[Y.id]; delete Y.Env; delete Y.config; } /** * instanceof check for objects that works around * memory leak in IE when the item tested is * window/document * @method instanceOf * @param o {Object} The object to check. * @param type {Object} The class to check against. * @since 3.3.0 */ }; YUI.prototype = proto; // inheritance utilities are not available yet for (prop in proto) { if (proto.hasOwnProperty(prop)) { YUI[prop] = proto[prop]; } } /** Static method on the Global YUI object to apply a config to all YUI instances. It's main use case is "mashups" where several third party scripts are trying to write to a global YUI config at the same time. This way they can all call `YUI.applyConfig({})` instead of overwriting other scripts configs. @static @since 3.5.0 @method applyConfig @param {Object} o the configuration object. @example YUI.applyConfig({ modules: { davglass: { fullpath: './davglass.js' } } }); YUI.applyConfig({ modules: { foo: { fullpath: './foo.js' } } }); YUI().use('davglass', function(Y) { //Module davglass will be available here.. }); */ YUI.applyConfig = function(o) { if (!o) { return; } //If there is a GlobalConfig, apply it first to set the defaults if (YUI.GlobalConfig) { this.prototype.applyConfig.call(this, YUI.GlobalConfig); } //Apply this config to it this.prototype.applyConfig.call(this, o); //Reset GlobalConfig to the combined config YUI.GlobalConfig = this.config; }; // set up the environment YUI._init(); if (hasWin) { // add a window load event at load time so we can capture // the case where it fires before dynamic loading is // complete. add(window, 'load', handleLoad); } else { handleLoad(); } YUI.Env.add = add; YUI.Env.remove = remove; /*global exports*/ // Support the CommonJS method for exporting our single global if (typeof exports == 'object') { exports.YUI = YUI; } }()); /** * The config object contains all of the configuration options for * the `YUI` instance. This object is supplied by the implementer * when instantiating a `YUI` instance. Some properties have default * values if they are not supplied by the implementer. This should * not be updated directly because some values are cached. Use * `applyConfig()` to update the config object on a YUI instance that * has already been configured. * * @class config * @static */ /** * Allows the YUI seed file to fetch the loader component and library * metadata to dynamically load additional dependencies. * * @property bootstrap * @type boolean * @default true */ /** * Turns on writing Ylog messages to the browser console. * * @property debug * @type boolean * @default true */ /** * Log to the browser console if debug is on and the browser has a * supported console. * * @property useBrowserConsole * @type boolean * @default true */ /** * A hash of log sources that should be logged. If specified, only * log messages from these sources will be logged. * * @property logInclude * @type object */ /** * A hash of log sources that should be not be logged. If specified, * all sources are logged if not on this list. * * @property logExclude * @type object */ /** * Set to true if the yui seed file was dynamically loaded in * order to bootstrap components relying on the window load event * and the `domready` custom event. * * @property injected * @type boolean * @default false */ /** * If `throwFail` is set, `Y.error` will generate or re-throw a JS Error. * Otherwise the failure is logged. * * @property throwFail * @type boolean * @default true */ /** * The window/frame that this instance should operate in. * * @property win * @type Window * @default the window hosting YUI */ /** * The document associated with the 'win' configuration. * * @property doc * @type Document * @default the document hosting YUI */ /** * A list of modules that defines the YUI core (overrides the default list). * * @property core * @type Array * @default [ get,features,intl-base,yui-log,yui-later,loader-base, loader-rollup, loader-yui3 ] */ /** * A list of languages in order of preference. This list is matched against * the list of available languages in modules that the YUI instance uses to * determine the best possible localization of language sensitive modules. * Languages are represented using BCP 47 language tags, such as "en-GB" for * English as used in the United Kingdom, or "zh-Hans-CN" for simplified * Chinese as used in China. The list can be provided as a comma-separated * list or as an array. * * @property lang * @type string|string[] */ /** * The default date format * @property dateFormat * @type string * @deprecated use configuration in `DataType.Date.format()` instead. */ /** * The default locale * @property locale * @type string * @deprecated use `config.lang` instead. */ /** * The default interval when polling in milliseconds. * @property pollInterval * @type int * @default 20 */ /** * The number of dynamic nodes to insert by default before * automatically removing them. This applies to script nodes * because removing the node will not make the evaluated script * unavailable. Dynamic CSS is not auto purged, because removing * a linked style sheet will also remove the style definitions. * @property purgethreshold * @type int * @default 20 */ /** * The default interval when polling in milliseconds. * @property windowResizeDelay * @type int * @default 40 */ /** * Base directory for dynamic loading * @property base * @type string */ /* * The secure base dir (not implemented) * For dynamic loading. * @property secureBase * @type string */ /** * The YUI combo service base dir. Ex: `http://yui.yahooapis.com/combo?` * For dynamic loading. * @property comboBase * @type string */ /** * The root path to prepend to module path for the combo service. * Ex: 3.0.0b1/build/ * For dynamic loading. * @property root * @type string */ /** * A filter to apply to result urls. This filter will modify the default * path for all modules. The default path for the YUI library is the * minified version of the files (e.g., event-min.js). The filter property * can be a predefined filter or a custom filter. The valid predefined * filters are: * <dl> * <dt>DEBUG</dt> * <dd>Selects the debug versions of the library (e.g., event-debug.js). * This option will automatically include the Logger widget</dd> * <dt>RAW</dt> * <dd>Selects the non-minified version of the library (e.g., event.js).</dd> * </dl> * You can also define a custom filter, which must be an object literal * containing a search expression and a replace string: * * myFilter: { * 'searchExp': "-min\\.js", * 'replaceStr': "-debug.js" * } * * For dynamic loading. * * @property filter * @type string|object */ /** * The `skin` config let's you configure application level skin * customizations. It contains the following attributes which * can be specified to override the defaults: * * // The default skin, which is automatically applied if not * // overriden by a component-specific skin definition. * // Change this in to apply a different skin globally * defaultSkin: 'sam', * * // This is combined with the loader base property to get * // the default root directory for a skin. * base: 'assets/skins/', * * // Any component-specific overrides can be specified here, * // making it possible to load different skins for different * // components. It is possible to load more than one skin * // for a given component as well. * overrides: { * slider: ['capsule', 'round'] * } * * For dynamic loading. * * @property skin */ /** * Hash of per-component filter specification. If specified for a given * component, this overrides the filter config. * * For dynamic loading. * * @property filters */ /** * Use the YUI combo service to reduce the number of http connections * required to load your dependencies. Turning this off will * disable combo handling for YUI and all module groups configured * with a combo service. * * For dynamic loading. * * @property combine * @type boolean * @default true if 'base' is not supplied, false if it is. */ /** * A list of modules that should never be dynamically loaded * * @property ignore * @type string[] */ /** * A list of modules that should always be loaded when required, even if already * present on the page. * * @property force * @type string[] */ /** * Node or id for a node that should be used as the insertion point for new * nodes. For dynamic loading. * * @property insertBefore * @type string */ /** * Object literal containing attributes to add to dynamically loaded script * nodes. * @property jsAttributes * @type string */ /** * Object literal containing attributes to add to dynamically loaded link * nodes. * @property cssAttributes * @type string */ /** * Number of milliseconds before a timeout occurs when dynamically * loading nodes. If not set, there is no timeout. * @property timeout * @type int */ /** * Callback for the 'CSSComplete' event. When dynamically loading YUI * components with CSS, this property fires when the CSS is finished * loading but script loading is still ongoing. This provides an * opportunity to enhance the presentation of a loading page a little * bit before the entire loading process is done. * * @property onCSS * @type function */ /** * A hash of module definitions to add to the list of YUI components. * These components can then be dynamically loaded side by side with * YUI via the `use()` method. This is a hash, the key is the module * name, and the value is an object literal specifying the metdata * for the module. See `Loader.addModule` for the supported module * metadata fields. Also see groups, which provides a way to * configure the base and combo spec for a set of modules. * * modules: { * mymod1: { * requires: ['node'], * fullpath: '/mymod1/mymod1.js' * }, * mymod2: { * requires: ['mymod1'], * fullpath: '/mymod2/mymod2.js' * }, * mymod3: '/js/mymod3.js', * mycssmod: '/css/mycssmod.css' * } * * * @property modules * @type object */ /** * Aliases are dynamic groups of modules that can be used as * shortcuts. * * YUI({ * aliases: { * davglass: [ 'node', 'yql', 'dd' ], * mine: [ 'davglass', 'autocomplete'] * } * }).use('mine', function(Y) { * //Node, YQL, DD &amp; AutoComplete available here.. * }); * * @property aliases * @type object */ /** * A hash of module group definitions. It for each group you * can specify a list of modules and the base path and * combo spec to use when dynamically loading the modules. * * groups: { * yui2: { * // specify whether or not this group has a combo service * combine: true, * * // The comboSeperator to use with this group's combo handler * comboSep: ';', * * // The maxURLLength for this server * maxURLLength: 500, * * // the base path for non-combo paths * base: 'http://yui.yahooapis.com/2.8.0r4/build/', * * // the path to the combo service * comboBase: 'http://yui.yahooapis.com/combo?', * * // a fragment to prepend to the path attribute when * // when building combo urls * root: '2.8.0r4/build/', * * // the module definitions * modules: { * yui2_yde: { * path: "yahoo-dom-event/yahoo-dom-event.js" * }, * yui2_anim: { * path: "animation/animation.js", * requires: ['yui2_yde'] * } * } * } * } * * @property groups * @type object */ /** * The loader 'path' attribute to the loader itself. This is combined * with the 'base' attribute to dynamically load the loader component * when boostrapping with the get utility alone. * * @property loaderPath * @type string * @default loader/loader-min.js */ /** * Specifies whether or not YUI().use(...) will attempt to load CSS * resources at all. Any truthy value will cause CSS dependencies * to load when fetching script. The special value 'force' will * cause CSS dependencies to be loaded even if no script is needed. * * @property fetchCSS * @type boolean|string * @default true */ /** * The default gallery version to build gallery module urls * @property gallery * @type string * @since 3.1.0 */ /** * The default YUI 2 version to build yui2 module urls. This is for * intrinsic YUI 2 support via the 2in3 project. Also see the '2in3' * config for pulling different revisions of the wrapped YUI 2 * modules. * @since 3.1.0 * @property yui2 * @type string * @default 2.9.0 */ /** * The 2in3 project is a deployment of the various versions of YUI 2 * deployed as first-class YUI 3 modules. Eventually, the wrapper * for the modules will change (but the underlying YUI 2 code will * be the same), and you can select a particular version of * the wrapper modules via this config. * @since 3.1.0 * @property 2in3 * @type string * @default 4 */ /** * Alternative console log function for use in environments without * a supported native console. The function is executed in the * YUI instance context. * @since 3.1.0 * @property logFn * @type Function */ /** * A callback to execute when Y.error is called. It receives the * error message and an javascript error object if Y.error was * executed because a javascript error was caught. The function * is executed in the YUI instance context. Returning `true` from this * function will stop the Error from being thrown. * * @since 3.2.0 * @property errorFn * @type Function */ /** * A callback to execute when the loader fails to load one or * more resource. This could be because of a script load * failure. It can also fail if a javascript module fails * to register itself, but only when the 'requireRegistration' * is true. If this function is defined, the use() callback will * only be called when the loader succeeds, otherwise it always * executes unless there was a javascript error when attaching * a module. * * @since 3.3.0 * @property loadErrorFn * @type Function */ /** * When set to true, the YUI loader will expect that all modules * it is responsible for loading will be first-class YUI modules * that register themselves with the YUI global. If this is * set to true, loader will fail if the module registration fails * to happen after the script is loaded. * * @since 3.3.0 * @property requireRegistration * @type boolean * @default false */ /** * Cache serviced use() requests. * @since 3.3.0 * @property cacheUse * @type boolean * @default true * @deprecated no longer used */ /** * Whether or not YUI should use native ES5 functionality when available for * features like `Y.Array.each()`, `Y.Object()`, etc. When `false`, YUI will * always use its own fallback implementations instead of relying on ES5 * functionality, even when it's available. * * @property useNativeES5 * @type Boolean * @default true * @since 3.5.0 */ /** Delay the `use` callback until a specific event has passed (`load`, `domready`, `contentready` or `available`) @property delayUntil @type String|Object @since 3.6.0 @example You can use `load` or `domready` strings by default: YUI({ delayUntil: 'domready' }, function(Y) { //This will not fire until 'domeready' }); Or you can delay until a node is available (with `available` or `contentready`): YUI({ delayUntil: { event: 'available', args: '#foo' } }, function(Y) { //This will not fire until '#foo' is // available in the DOM }); */ YUI.add('yui-base', function (Y, NAME) { /* * YUI stub * @module yui * @submodule yui-base */ /** * The YUI module contains the components required for building the YUI * seed file. This includes the script loading mechanism, a simple queue, * and the core utilities for the library. * @module yui * @submodule yui-base */ /** * Provides core language utilites and extensions used throughout YUI. * * @class Lang * @static */ var L = Y.Lang || (Y.Lang = {}), STRING_PROTO = String.prototype, TOSTRING = Object.prototype.toString, TYPES = { 'undefined' : 'undefined', 'number' : 'number', 'boolean' : 'boolean', 'string' : 'string', '[object Function]': 'function', '[object RegExp]' : 'regexp', '[object Array]' : 'array', '[object Date]' : 'date', '[object Error]' : 'error' }, SUBREGEX = /\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g, TRIMREGEX = /^\s+|\s+$/g, NATIVE_FN_REGEX = /\{\s*\[(?:native code|function)\]\s*\}/i; // -- Protected Methods -------------------------------------------------------- /** Returns `true` if the given function appears to be implemented in native code, `false` otherwise. Will always return `false` -- even in ES5-capable browsers -- if the `useNativeES5` YUI config option is set to `false`. This isn't guaranteed to be 100% accurate and won't work for anything other than functions, but it can be useful for determining whether a function like `Array.prototype.forEach` is native or a JS shim provided by another library. There's a great article by @kangax discussing certain flaws with this technique: <http://perfectionkills.com/detecting-built-in-host-methods/> While his points are valid, it's still possible to benefit from this function as long as it's used carefully and sparingly, and in such a way that false negatives have minimal consequences. It's used internally to avoid using potentially broken non-native ES5 shims that have been added to the page by other libraries. @method _isNative @param {Function} fn Function to test. @return {Boolean} `true` if _fn_ appears to be native, `false` otherwise. @static @protected @since 3.5.0 **/ L._isNative = function (fn) { return !!(Y.config.useNativeES5 && fn && NATIVE_FN_REGEX.test(fn)); }; // -- Public Methods ----------------------------------------------------------- /** * Determines whether or not the provided item is an array. * * Returns `false` for array-like collections such as the function `arguments` * collection or `HTMLElement` collections. Use `Y.Array.test()` if you want to * test for an array-like collection. * * @method isArray * @param o The object to test. * @return {boolean} true if o is an array. * @static */ L.isArray = L._isNative(Array.isArray) ? Array.isArray : function (o) { return L.type(o) === 'array'; }; /** * Determines whether or not the provided item is a boolean. * @method isBoolean * @static * @param o The object to test. * @return {boolean} true if o is a boolean. */ L.isBoolean = function(o) { return typeof o === 'boolean'; }; /** * Determines whether or not the supplied item is a date instance. * @method isDate * @static * @param o The object to test. * @return {boolean} true if o is a date. */ L.isDate = function(o) { return L.type(o) === 'date' && o.toString() !== 'Invalid Date' && !isNaN(o); }; /** * <p> * Determines whether or not the provided item is a function. * Note: Internet Explorer thinks certain functions are objects: * </p> * * <pre> * var obj = document.createElement("object"); * Y.Lang.isFunction(obj.getAttribute) // reports false in IE * &nbsp; * var input = document.createElement("input"); // append to body * Y.Lang.isFunction(input.focus) // reports false in IE * </pre> * * <p> * You will have to implement additional tests if these functions * matter to you. * </p> * * @method isFunction * @static * @param o The object to test. * @return {boolean} true if o is a function. */ L.isFunction = function(o) { return L.type(o) === 'function'; }; /** * Determines whether or not the provided item is null. * @method isNull * @static * @param o The object to test. * @return {boolean} true if o is null. */ L.isNull = function(o) { return o === null; }; /** * Determines whether or not the provided item is a legal number. * @method isNumber * @static * @param o The object to test. * @return {boolean} true if o is a number. */ L.isNumber = function(o) { return typeof o === 'number' && isFinite(o); }; /** * Determines whether or not the provided item is of type object * or function. Note that arrays are also objects, so * <code>Y.Lang.isObject([]) === true</code>. * @method isObject * @static * @param o The object to test. * @param failfn {boolean} fail if the input is a function. * @return {boolean} true if o is an object. * @see isPlainObject */ L.isObject = function(o, failfn) { var t = typeof o; return (o && (t === 'object' || (!failfn && (t === 'function' || L.isFunction(o))))) || false; }; /** * Determines whether or not the provided item is a string. * @method isString * @static * @param o The object to test. * @return {boolean} true if o is a string. */ L.isString = function(o) { return typeof o === 'string'; }; /** * Determines whether or not the provided item is undefined. * @method isUndefined * @static * @param o The object to test. * @return {boolean} true if o is undefined. */ L.isUndefined = function(o) { return typeof o === 'undefined'; }; /** * A convenience method for detecting a legitimate non-null value. * Returns false for null/undefined/NaN, true for other values, * including 0/false/'' * @method isValue * @static * @param o The item to test. * @return {boolean} true if it is not null/undefined/NaN || false. */ L.isValue = function(o) { var t = L.type(o); switch (t) { case 'number': return isFinite(o); case 'null': // fallthru case 'undefined': return false; default: return !!t; } }; /** * Returns the current time in milliseconds. * * @method now * @return {Number} Current time in milliseconds. * @static * @since 3.3.0 */ L.now = Date.now || function () { return new Date().getTime(); }; /** * Lightweight version of <code>Y.substitute</code>. Uses the same template * structure as <code>Y.substitute</code>, but doesn't support recursion, * auto-object coersion, or formats. * @method sub * @param {string} s String to be modified. * @param {object} o Object containing replacement values. * @return {string} the substitute result. * @static * @since 3.2.0 */ L.sub = function(s, o) { return s.replace ? s.replace(SUBREGEX, function (match, key) { return L.isUndefined(o[key]) ? match : o[key]; }) : s; }; /** * Returns a string without any leading or trailing whitespace. If * the input is not a string, the input will be returned untouched. * @method trim * @static * @param s {string} the string to trim. * @return {string} the trimmed string. */ L.trim = STRING_PROTO.trim ? function(s) { return s && s.trim ? s.trim() : s; } : function (s) { try { return s.replace(TRIMREGEX, ''); } catch (e) { return s; } }; /** * Returns a string without any leading whitespace. * @method trimLeft * @static * @param s {string} the string to trim. * @return {string} the trimmed string. */ L.trimLeft = STRING_PROTO.trimLeft ? function (s) { return s.trimLeft(); } : function (s) { return s.replace(/^\s+/, ''); }; /** * Returns a string without any trailing whitespace. * @method trimRight * @static * @param s {string} the string to trim. * @return {string} the trimmed string. */ L.trimRight = STRING_PROTO.trimRight ? function (s) { return s.trimRight(); } : function (s) { return s.replace(/\s+$/, ''); }; /** Returns one of the following strings, representing the type of the item passed in: * "array" * "boolean" * "date" * "error" * "function" * "null" * "number" * "object" * "regexp" * "string" * "undefined" Known issues: * `typeof HTMLElementCollection` returns function in Safari, but `Y.Lang.type()` reports "object", which could be a good thing -- but it actually caused the logic in <code>Y.Lang.isObject</code> to fail. @method type @param o the item to test. @return {string} the detected type. @static **/ L.type = function(o) { return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? 'object' : 'null'); }; /** @module yui @submodule yui-base */ var Lang = Y.Lang, Native = Array.prototype, hasOwn = Object.prototype.hasOwnProperty; /** Provides utility methods for working with arrays. Additional array helpers can be found in the `collection` and `array-extras` modules. `Y.Array(thing)` returns a native array created from _thing_. Depending on _thing_'s type, one of the following will happen: * Arrays are returned unmodified unless a non-zero _startIndex_ is specified. * Array-like collections (see `Array.test()`) are converted to arrays. * For everything else, a new array is created with _thing_ as the sole item. Note: elements that are also collections, such as `<form>` and `<select>` elements, are not automatically converted to arrays. To force a conversion, pass `true` as the value of the _force_ parameter. @class Array @constructor @param {Any} thing The thing to arrayify. @param {Number} [startIndex=0] If non-zero and _thing_ is an array or array-like collection, a subset of items starting at the specified index will be returned. @param {Boolean} [force=false] If `true`, _thing_ will be treated as an array-like collection no matter what. @return {Array} A native array created from _thing_, according to the rules described above. **/ function YArray(thing, startIndex, force) { var len, result; startIndex || (startIndex = 0); if (force || YArray.test(thing)) { // IE throws when trying to slice HTMLElement collections. try { return Native.slice.call(thing, startIndex); } catch (ex) { result = []; for (len = thing.length; startIndex < len; ++startIndex) { result.push(thing[startIndex]); } return result; } } return [thing]; } Y.Array = YArray; /** Dedupes an array of strings, returning an array that's guaranteed to contain only one copy of a given string. This method differs from `Array.unique()` in that it's optimized for use only with strings, whereas `unique` may be used with other types (but is slower). Using `dedupe()` with non-string values may result in unexpected behavior. @method dedupe @param {String[]} array Array of strings to dedupe. @return {Array} Deduped copy of _array_. @static @since 3.4.0 **/ YArray.dedupe = function (array) { var hash = {}, results = [], i, item, len; for (i = 0, len = array.length; i < len; ++i) { item = array[i]; if (!hasOwn.call(hash, item)) { hash[item] = 1; results.push(item); } } return results; }; /** Executes the supplied function on each item in the array. This method wraps the native ES5 `Array.forEach()` method if available. @method each @param {Array} array Array to iterate. @param {Function} fn Function to execute on each item in the array. The function will receive the following arguments: @param {Any} fn.item Current array item. @param {Number} fn.index Current array index. @param {Array} fn.array Array being iterated. @param {Object} [thisObj] `this` object to use when calling _fn_. @return {YUI} The YUI instance. @static **/ YArray.each = YArray.forEach = Lang._isNative(Native.forEach) ? function (array, fn, thisObj) { Native.forEach.call(array || [], fn, thisObj || Y); return Y; } : function (array, fn, thisObj) { for (var i = 0, len = (array && array.length) || 0; i < len; ++i) { if (i in array) { fn.call(thisObj || Y, array[i], i, array); } } return Y; }; /** Alias for `each()`. @method forEach @static **/ /** Returns an object using the first array as keys and the second as values. If the second array is not provided, or if it doesn't contain the same number of values as the first array, then `true` will be used in place of the missing values. @example Y.Array.hash(['a', 'b', 'c'], ['foo', 'bar']); // => {a: 'foo', b: 'bar', c: true} @method hash @param {String[]} keys Array of strings to use as keys. @param {Array} [values] Array to use as values. @return {Object} Hash using the first array as keys and the second as values. @static **/ YArray.hash = function (keys, values) { var hash = {}, vlen = (values && values.length) || 0, i, len; for (i = 0, len = keys.length; i < len; ++i) { if (i in keys) { hash[keys[i]] = vlen > i && i in values ? values[i] : true; } } return hash; }; /** Returns the index of the first item in the array that's equal (using a strict equality check) to the specified _value_, or `-1` if the value isn't found. This method wraps the native ES5 `Array.indexOf()` method if available. @method indexOf @param {Array} array Array to search. @param {Any} value Value to search for. @param {Number} [from=0] The index at which to begin the search. @return {Number} Index of the item strictly equal to _value_, or `-1` if not found. @static **/ YArray.indexOf = Lang._isNative(Native.indexOf) ? function (array, value, from) { return Native.indexOf.call(array, value, from); } : function (array, value, from) { // http://es5.github.com/#x15.4.4.14 var len = array.length; from = +from || 0; from = (from > 0 || -1) * Math.floor(Math.abs(from)); if (from < 0) { from += len; if (from < 0) { from = 0; } } for (; from < len; ++from) { if (from in array && array[from] === value) { return from; } } return -1; }; /** Numeric sort convenience function. The native `Array.prototype.sort()` function converts values to strings and sorts them in lexicographic order, which is unsuitable for sorting numeric values. Provide `Array.numericSort` as a custom sort function when you want to sort values in numeric order. @example [42, 23, 8, 16, 4, 15].sort(Y.Array.numericSort); // => [4, 8, 15, 16, 23, 42] @method numericSort @param {Number} a First value to compare. @param {Number} b Second value to compare. @return {Number} Difference between _a_ and _b_. @static **/ YArray.numericSort = function (a, b) { return a - b; }; /** Executes the supplied function on each item in the array. Returning a truthy value from the function will stop the processing of remaining items. @method some @param {Array} array Array to iterate over. @param {Function} fn Function to execute on each item. The function will receive the following arguments: @param {Any} fn.value Current array item. @param {Number} fn.index Current array index. @param {Array} fn.array Array being iterated over. @param {Object} [thisObj] `this` object to use when calling _fn_. @return {Boolean} `true` if the function returns a truthy value on any of the items in the array; `false` otherwise. @static **/ YArray.some = Lang._isNative(Native.some) ? function (array, fn, thisObj) { return Native.some.call(array, fn, thisObj); } : function (array, fn, thisObj) { for (var i = 0, len = array.length; i < len; ++i) { if (i in array && fn.call(thisObj, array[i], i, array)) { return true; } } return false; }; /** Evaluates _obj_ to determine if it's an array, an array-like collection, or something else. This is useful when working with the function `arguments` collection and `HTMLElement` collections. Note: This implementation doesn't consider elements that are also collections, such as `<form>` and `<select>`, to be array-like. @method test @param {Object} obj Object to test. @return {Number} A number indicating the results of the test: * 0: Neither an array nor an array-like collection. * 1: Real array. * 2: Array-like collection. @static **/ YArray.test = function (obj) { var result = 0; if (Lang.isArray(obj)) { result = 1; } else if (Lang.isObject(obj)) { try { // indexed, but no tagName (element) or alert (window), // or functions without apply/call (Safari // HTMLElementCollection bug). if ('length' in obj && !obj.tagName && !obj.alert && !obj.apply) { result = 2; } } catch (ex) {} } return result; }; /** * The YUI module contains the components required for building the YUI * seed file. This includes the script loading mechanism, a simple queue, * and the core utilities for the library. * @module yui * @submodule yui-base */ /** * A simple FIFO queue. Items are added to the Queue with add(1..n items) and * removed using next(). * * @class Queue * @constructor * @param {MIXED} item* 0..n items to seed the queue. */ function Queue() { this._init(); this.add.apply(this, arguments); } Queue.prototype = { /** * Initialize the queue * * @method _init * @protected */ _init: function() { /** * The collection of enqueued items * * @property _q * @type Array * @protected */ this._q = []; }, /** * Get the next item in the queue. FIFO support * * @method next * @return {MIXED} the next item in the queue. */ next: function() { return this._q.shift(); }, /** * Get the last in the queue. LIFO support. * * @method last * @return {MIXED} the last item in the queue. */ last: function() { return this._q.pop(); }, /** * Add 0..n items to the end of the queue. * * @method add * @param {MIXED} item* 0..n items. * @return {object} this queue. */ add: function() { this._q.push.apply(this._q, arguments); return this; }, /** * Returns the current number of queued items. * * @method size * @return {Number} The size. */ size: function() { return this._q.length; } }; Y.Queue = Queue; YUI.Env._loaderQueue = YUI.Env._loaderQueue || new Queue(); /** The YUI module contains the components required for building the YUI seed file. This includes the script loading mechanism, a simple queue, and the core utilities for the library. @module yui @submodule yui-base **/ var CACHED_DELIMITER = '__', hasOwn = Object.prototype.hasOwnProperty, isObject = Y.Lang.isObject; /** Returns a wrapper for a function which caches the return value of that function, keyed off of the combined string representation of the argument values provided when the wrapper is called. Calling this function again with the same arguments will return the cached value rather than executing the wrapped function. Note that since the cache is keyed off of the string representation of arguments passed to the wrapper function, arguments that aren't strings and don't provide a meaningful `toString()` method may result in unexpected caching behavior. For example, the objects `{}` and `{foo: 'bar'}` would both be converted to the string `[object Object]` when used as a cache key. @method cached @param {Function} source The function to memoize. @param {Object} [cache={}] Object in which to store cached values. You may seed this object with pre-existing cached values if desired. @param {any} [refetch] If supplied, this value is compared with the cached value using a `==` comparison. If the values are equal, the wrapped function is executed again even though a cached value exists. @return {Function} Wrapped function. @for YUI **/ Y.cached = function (source, cache, refetch) { cache || (cache = {}); return function (arg) { var key = arguments.length > 1 ? Array.prototype.join.call(arguments, CACHED_DELIMITER) : String(arg); if (!(key in cache) || (refetch && cache[key] == refetch)) { cache[key] = source.apply(source, arguments); } return cache[key]; }; }; /** Returns the `location` object from the window/frame in which this YUI instance operates, or `undefined` when executing in a non-browser environment (e.g. Node.js). It is _not_ recommended to hold references to the `window.location` object outside of the scope of a function in which its properties are being accessed or its methods are being called. This is because of a nasty bug/issue that exists in both Safari and MobileSafari browsers: [WebKit Bug 34679](https://bugs.webkit.org/show_bug.cgi?id=34679). @method getLocation @return {location} The `location` object from the window/frame in which this YUI instance operates. @since 3.5.0 **/ Y.getLocation = function () { // It is safer to look this up every time because yui-base is attached to a // YUI instance before a user's config is applied; i.e. `Y.config.win` does // not point the correct window object when this file is loaded. var win = Y.config.win; // It is not safe to hold a reference to the `location` object outside the // scope in which it is being used. The WebKit engine used in Safari and // MobileSafari will "disconnect" the `location` object from the `window` // when a page is restored from back/forward history cache. return win && win.location; }; /** Returns a new object containing all of the properties of all the supplied objects. The properties from later objects will overwrite those in earlier objects. Passing in a single object will create a shallow copy of it. For a deep copy, use `clone()`. @method merge @param {Object} objects* One or more objects to merge. @return {Object} A new merged object. **/ Y.merge = function () { var i = 0, len = arguments.length, result = {}, key, obj; for (; i < len; ++i) { obj = arguments[i]; for (key in obj) { if (hasOwn.call(obj, key)) { result[key] = obj[key]; } } } return result; }; /** Mixes _supplier_'s properties into _receiver_. Properties on _receiver_ or _receiver_'s prototype will not be overwritten or shadowed unless the _overwrite_ parameter is `true`, and will not be merged unless the _merge_ parameter is `true`. In the default mode (0), only properties the supplier owns are copied (prototype properties are not copied). The following copying modes are available: * `0`: _Default_. Object to object. * `1`: Prototype to prototype. * `2`: Prototype to prototype and object to object. * `3`: Prototype to object. * `4`: Object to prototype. @method mix @param {Function|Object} receiver The object or function to receive the mixed properties. @param {Function|Object} supplier The object or function supplying the properties to be mixed. @param {Boolean} [overwrite=false] If `true`, properties that already exist on the receiver will be overwritten with properties from the supplier. @param {String[]} [whitelist] An array of property names to copy. If specified, only the whitelisted properties will be copied, and all others will be ignored. @param {Number} [mode=0] Mix mode to use. See above for available modes. @param {Boolean} [merge=false] If `true`, objects and arrays that already exist on the receiver will have the corresponding object/array from the supplier merged into them, rather than being skipped or overwritten. When both _overwrite_ and _merge_ are `true`, _merge_ takes precedence. @return {Function|Object|YUI} The receiver, or the YUI instance if the specified receiver is falsy. **/ Y.mix = function(receiver, supplier, overwrite, whitelist, mode, merge) { var alwaysOverwrite, exists, from, i, key, len, to; // If no supplier is given, we return the receiver. If no receiver is given, // we return Y. Returning Y doesn't make much sense to me, but it's // grandfathered in for backcompat reasons. if (!receiver || !supplier) { return receiver || Y; } if (mode) { // In mode 2 (prototype to prototype and object to object), we recurse // once to do the proto to proto mix. The object to object mix will be // handled later on. if (mode === 2) { Y.mix(receiver.prototype, supplier.prototype, overwrite, whitelist, 0, merge); } // Depending on which mode is specified, we may be copying from or to // the prototypes of the supplier and receiver. from = mode === 1 || mode === 3 ? supplier.prototype : supplier; to = mode === 1 || mode === 4 ? receiver.prototype : receiver; // If either the supplier or receiver doesn't actually have a // prototype property, then we could end up with an undefined `from` // or `to`. If that happens, we abort and return the receiver. if (!from || !to) { return receiver; } } else { from = supplier; to = receiver; } // If `overwrite` is truthy and `merge` is falsy, then we can skip a // property existence check on each iteration and save some time. alwaysOverwrite = overwrite && !merge; if (whitelist) { for (i = 0, len = whitelist.length; i < len; ++i) { key = whitelist[i]; // We call `Object.prototype.hasOwnProperty` instead of calling // `hasOwnProperty` on the object itself, since the object's // `hasOwnProperty` method may have been overridden or removed. // Also, some native objects don't implement a `hasOwnProperty` // method. if (!hasOwn.call(from, key)) { continue; } // The `key in to` check here is (sadly) intentional for backwards // compatibility reasons. It prevents undesired shadowing of // prototype members on `to`. exists = alwaysOverwrite ? false : key in to; if (merge && exists && isObject(to[key], true) && isObject(from[key], true)) { // If we're in merge mode, and the key is present on both // objects, and the value on both objects is either an object or // an array (but not a function), then we recurse to merge the // `from` value into the `to` value instead of overwriting it. // // Note: It's intentional that the whitelist isn't passed to the // recursive call here. This is legacy behavior that lots of // code still depends on. Y.mix(to[key], from[key], overwrite, null, 0, merge); } else if (overwrite || !exists) { // We're not in merge mode, so we'll only copy the `from` value // to the `to` value if we're in overwrite mode or if the // current key doesn't exist on the `to` object. to[key] = from[key]; } } } else { for (key in from) { // The code duplication here is for runtime performance reasons. // Combining whitelist and non-whitelist operations into a single // loop or breaking the shared logic out into a function both result // in worse performance, and Y.mix is critical enough that the byte // tradeoff is worth it. if (!hasOwn.call(from, key)) { continue; } // The `key in to` check here is (sadly) intentional for backwards // compatibility reasons. It prevents undesired shadowing of // prototype members on `to`. exists = alwaysOverwrite ? false : key in to; if (merge && exists && isObject(to[key], true) && isObject(from[key], true)) { Y.mix(to[key], from[key], overwrite, null, 0, merge); } else if (overwrite || !exists) { to[key] = from[key]; } } // If this is an IE browser with the JScript enumeration bug, force // enumeration of the buggy properties by making a recursive call with // the buggy properties as the whitelist. if (Y.Object._hasEnumBug) { Y.mix(to, from, overwrite, Y.Object._forceEnum, mode, merge); } } return receiver; }; /** * The YUI module contains the components required for building the YUI * seed file. This includes the script loading mechanism, a simple queue, * and the core utilities for the library. * @module yui * @submodule yui-base */ /** * Adds utilities to the YUI instance for working with objects. * * @class Object */ var Lang = Y.Lang, hasOwn = Object.prototype.hasOwnProperty, UNDEFINED, // <-- Note the comma. We're still declaring vars. /** * Returns a new object that uses _obj_ as its prototype. This method wraps the * native ES5 `Object.create()` method if available, but doesn't currently * pass through `Object.create()`'s second argument (properties) in order to * ensure compatibility with older browsers. * * @method () * @param {Object} obj Prototype object. * @return {Object} New object using _obj_ as its prototype. * @static */ O = Y.Object = Lang._isNative(Object.create) ? function (obj) { // We currently wrap the native Object.create instead of simply aliasing it // to ensure consistency with our fallback shim, which currently doesn't // support Object.create()'s second argument (properties). Once we have a // safe fallback for the properties arg, we can stop wrapping // Object.create(). return Object.create(obj); } : (function () { // Reusable constructor function for the Object.create() shim. function F() {} // The actual shim. return function (obj) { F.prototype = obj; return new F(); }; }()), /** * Property names that IE doesn't enumerate in for..in loops, even when they * should be enumerable. When `_hasEnumBug` is `true`, it's necessary to * manually enumerate these properties. * * @property _forceEnum * @type String[] * @protected * @static */ forceEnum = O._forceEnum = [ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'toLocaleString', 'valueOf' ], /** * `true` if this browser has the JScript enumeration bug that prevents * enumeration of the properties named in the `_forceEnum` array, `false` * otherwise. * * See: * - <https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug> * - <http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation> * * @property _hasEnumBug * @type Boolean * @protected * @static */ hasEnumBug = O._hasEnumBug = !{valueOf: 0}.propertyIsEnumerable('valueOf'), /** * `true` if this browser incorrectly considers the `prototype` property of * functions to be enumerable. Currently known to affect Opera 11.50. * * @property _hasProtoEnumBug * @type Boolean * @protected * @static */ hasProtoEnumBug = O._hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), /** * Returns `true` if _key_ exists on _obj_, `false` if _key_ doesn't exist or * exists only on _obj_'s prototype. This is essentially a safer version of * `obj.hasOwnProperty()`. * * @method owns * @param {Object} obj Object to test. * @param {String} key Property name to look for. * @return {Boolean} `true` if _key_ exists on _obj_, `false` otherwise. * @static */ owns = O.owns = function (obj, key) { return !!obj && hasOwn.call(obj, key); }; // <-- End of var declarations. /** * Alias for `owns()`. * * @method hasKey * @param {Object} obj Object to test. * @param {String} key Property name to look for. * @return {Boolean} `true` if _key_ exists on _obj_, `false` otherwise. * @static */ O.hasKey = owns; /** * Returns an array containing the object's enumerable keys. Does not include * prototype keys or non-enumerable keys. * * Note that keys are returned in enumeration order (that is, in the same order * that they would be enumerated by a `for-in` loop), which may not be the same * as the order in which they were defined. * * This method is an alias for the native ES5 `Object.keys()` method if * available. * * @example * * Y.Object.keys({a: 'foo', b: 'bar', c: 'baz'}); * // => ['a', 'b', 'c'] * * @method keys * @param {Object} obj An object. * @return {String[]} Array of keys. * @static */ O.keys = Lang._isNative(Object.keys) ? Object.keys : function (obj) { if (!Lang.isObject(obj)) { throw new TypeError('Object.keys called on a non-object'); } var keys = [], i, key, len; if (hasProtoEnumBug && typeof obj === 'function') { for (key in obj) { if (owns(obj, key) && key !== 'prototype') { keys.push(key); } } } else { for (key in obj) { if (owns(obj, key)) { keys.push(key); } } } if (hasEnumBug) { for (i = 0, len = forceEnum.length; i < len; ++i) { key = forceEnum[i]; if (owns(obj, key)) { keys.push(key); } } } return keys; }; /** * Returns an array containing the values of the object's enumerable keys. * * Note that values are returned in enumeration order (that is, in the same * order that they would be enumerated by a `for-in` loop), which may not be the * same as the order in which they were defined. * * @example * * Y.Object.values({a: 'foo', b: 'bar', c: 'baz'}); * // => ['foo', 'bar', 'baz'] * * @method values * @param {Object} obj An object. * @return {Array} Array of values. * @static */ O.values = function (obj) { var keys = O.keys(obj), i = 0, len = keys.length, values = []; for (; i < len; ++i) { values.push(obj[keys[i]]); } return values; }; /** * Returns the number of enumerable keys owned by an object. * * @method size * @param {Object} obj An object. * @return {Number} The object's size. * @static */ O.size = function (obj) { try { return O.keys(obj).length; } catch (ex) { return 0; // Legacy behavior for non-objects. } }; /** * Returns `true` if the object owns an enumerable property with the specified * value. * * @method hasValue * @param {Object} obj An object. * @param {any} value The value to search for. * @return {Boolean} `true` if _obj_ contains _value_, `false` otherwise. * @static */ O.hasValue = function (obj, value) { return Y.Array.indexOf(O.values(obj), value) > -1; }; /** * Executes a function on each enumerable property in _obj_. The function * receives the value, the key, and the object itself as parameters (in that * order). * * By default, only properties owned by _obj_ are enumerated. To include * prototype properties, set the _proto_ parameter to `true`. * * @method each * @param {Object} obj Object to enumerate. * @param {Function} fn Function to execute on each enumerable property. * @param {mixed} fn.value Value of the current property. * @param {String} fn.key Key of the current property. * @param {Object} fn.obj Object being enumerated. * @param {Object} [thisObj] `this` object to use when calling _fn_. * @param {Boolean} [proto=false] Include prototype properties. * @return {YUI} the YUI instance. * @chainable * @static */ O.each = function (obj, fn, thisObj, proto) { var key; for (key in obj) { if (proto || owns(obj, key)) { fn.call(thisObj || Y, obj[key], key, obj); } } return Y; }; /** * Executes a function on each enumerable property in _obj_, but halts if the * function returns a truthy value. The function receives the value, the key, * and the object itself as paramters (in that order). * * By default, only properties owned by _obj_ are enumerated. To include * prototype properties, set the _proto_ parameter to `true`. * * @method some * @param {Object} obj Object to enumerate. * @param {Function} fn Function to execute on each enumerable property. * @param {mixed} fn.value Value of the current property. * @param {String} fn.key Key of the current property. * @param {Object} fn.obj Object being enumerated. * @param {Object} [thisObj] `this` object to use when calling _fn_. * @param {Boolean} [proto=false] Include prototype properties. * @return {Boolean} `true` if any execution of _fn_ returns a truthy value, * `false` otherwise. * @static */ O.some = function (obj, fn, thisObj, proto) { var key; for (key in obj) { if (proto || owns(obj, key)) { if (fn.call(thisObj || Y, obj[key], key, obj)) { return true; } } } return false; }; /** * Retrieves the sub value at the provided path, * from the value object provided. * * @method getValue * @static * @param o The object from which to extract the property value. * @param path {Array} A path array, specifying the object traversal path * from which to obtain the sub value. * @return {Any} The value stored in the path, undefined if not found, * undefined if the source is not an object. Returns the source object * if an empty path is provided. */ O.getValue = function(o, path) { if (!Lang.isObject(o)) { return UNDEFINED; } var i, p = Y.Array(path), l = p.length; for (i = 0; o !== UNDEFINED && i < l; i++) { o = o[p[i]]; } return o; }; /** * Sets the sub-attribute value at the provided path on the * value object. Returns the modified value object, or * undefined if the path is invalid. * * @method setValue * @static * @param o The object on which to set the sub value. * @param path {Array} A path array, specifying the object traversal path * at which to set the sub value. * @param val {Any} The new value for the sub-attribute. * @return {Object} The modified object, with the new sub value set, or * undefined, if the path was invalid. */ O.setValue = function(o, path, val) { var i, p = Y.Array(path), leafIdx = p.length - 1, ref = o; if (leafIdx >= 0) { for (i = 0; ref !== UNDEFINED && i < leafIdx; i++) { ref = ref[p[i]]; } if (ref !== UNDEFINED) { ref[p[i]] = val; } else { return UNDEFINED; } } return o; }; /** * Returns `true` if the object has no enumerable properties of its own. * * @method isEmpty * @param {Object} obj An object. * @return {Boolean} `true` if the object is empty. * @static * @since 3.2.0 */ O.isEmpty = function (obj) { return !O.keys(Object(obj)).length; }; /** * The YUI module contains the components required for building the YUI seed * file. This includes the script loading mechanism, a simple queue, and the * core utilities for the library. * @module yui * @submodule yui-base */ /** * YUI user agent detection. * Do not fork for a browser if it can be avoided. Use feature detection when * you can. Use the user agent as a last resort. For all fields listed * as @type float, UA stores a version number for the browser engine, * 0 otherwise. This value may or may not map to the version number of * the browser using the engine. The value is presented as a float so * that it can easily be used for boolean evaluation as well as for * looking for a particular range of versions. Because of this, * some of the granularity of the version info may be lost. The fields that * are @type string default to null. The API docs list the values that * these fields can have. * @class UA * @static */ /** * Static method on `YUI.Env` for parsing a UA string. Called at instantiation * to populate `Y.UA`. * * @static * @method parseUA * @param {String} [subUA=navigator.userAgent] UA string to parse * @return {Object} The Y.UA object */ YUI.Env.parseUA = function(subUA) { var numberify = function(s) { var c = 0; return parseFloat(s.replace(/\./g, function() { return (c++ == 1) ? '' : '.'; })); }, win = Y.config.win, nav = win && win.navigator, o = { /** * Internet Explorer version number or 0. Example: 6 * @property ie * @type float * @static */ ie: 0, /** * Opera version number or 0. Example: 9.2 * @property opera * @type float * @static */ opera: 0, /** * Gecko engine revision number. Will evaluate to 1 if Gecko * is detected but the revision could not be found. Other browsers * will be 0. Example: 1.8 * <pre> * Firefox 1.0.0.4: 1.7.8 <-- Reports 1.7 * Firefox 1.5.0.9: 1.8.0.9 <-- 1.8 * Firefox 2.0.0.3: 1.8.1.3 <-- 1.81 * Firefox 3.0 <-- 1.9 * Firefox 3.5 <-- 1.91 * </pre> * @property gecko * @type float * @static */ gecko: 0, /** * AppleWebKit version. KHTML browsers that are not WebKit browsers * will evaluate to 1, other browsers 0. Example: 418.9 * <pre> * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the * latest available for Mac OSX 10.3. * Safari 2.0.2: 416 <-- hasOwnProperty introduced * Safari 2.0.4: 418 <-- preventDefault fixed * Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run * different versions of webkit * Safari 2.0.4 (419.3): 419 <-- Tiger installations that have been * updated, but not updated * to the latest patch. * Webkit 212 nightly: 522+ <-- Safari 3.0 precursor (with native * SVG and many major issues fixed). * Safari 3.0.4 (523.12) 523.12 <-- First Tiger release - automatic * update from 2.x via the 10.4.11 OS patch. * Webkit nightly 1/2008:525+ <-- Supports DOMContentLoaded event. * yahoo.com user agent hack removed. * </pre> * http://en.wikipedia.org/wiki/Safari_version_history * @property webkit * @type float * @static */ webkit: 0, /** * Safari will be detected as webkit, but this property will also * be populated with the Safari version number * @property safari * @type float * @static */ safari: 0, /** * Chrome will be detected as webkit, but this property will also * be populated with the Chrome version number * @property chrome * @type float * @static */ chrome: 0, /** * The mobile property will be set to a string containing any relevant * user agent information when a modern mobile browser is detected. * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series * devices with the WebKit-based browser, and Opera Mini. * @property mobile * @type string * @default null * @static */ mobile: null, /** * Adobe AIR version number or 0. Only populated if webkit is detected. * Example: 1.0 * @property air * @type float */ air: 0, /** * PhantomJS version number or 0. Only populated if webkit is detected. * Example: 1.0 * @property phantomjs * @type float */ phantomjs: 0, /** * Adobe AIR version number or 0. Only populated if webkit is detected. * Example: 1.0 * @property air * @type float */ air: 0, /** * Detects Apple iPad's OS version * @property ipad * @type float * @static */ ipad: 0, /** * Detects Apple iPhone's OS version * @property iphone * @type float * @static */ iphone: 0, /** * Detects Apples iPod's OS version * @property ipod * @type float * @static */ ipod: 0, /** * General truthy check for iPad, iPhone or iPod * @property ios * @type Boolean * @default null * @static */ ios: null, /** * Detects Googles Android OS version * @property android * @type float * @static */ android: 0, /** * Detects Kindle Silk * @property silk * @type float * @static */ silk: 0, /** * Detects Kindle Silk Acceleration * @property accel * @type Boolean * @static */ accel: false, /** * Detects Palms WebOS version * @property webos * @type float * @static */ webos: 0, /** * Google Caja version number or 0. * @property caja * @type float */ caja: nav && nav.cajaVersion, /** * Set to true if the page appears to be in SSL * @property secure * @type boolean * @static */ secure: false, /** * The operating system. Currently only detecting windows or macintosh * @property os * @type string * @default null * @static */ os: null, /** * The Nodejs Version * @property nodejs * @type float * @default 0 * @static */ nodejs: 0 }, ua = subUA || nav && nav.userAgent, loc = win && win.location, href = loc && loc.href, m; /** * The User Agent string that was parsed * @property userAgent * @type String * @static */ o.userAgent = ua; o.secure = href && (href.toLowerCase().indexOf('https') === 0); if (ua) { if ((/windows|win32/i).test(ua)) { o.os = 'windows'; } else if ((/macintosh|mac_powerpc/i).test(ua)) { o.os = 'macintosh'; } else if ((/android/i).test(ua)) { o.os = 'android'; } else if ((/symbos/i).test(ua)) { o.os = 'symbos'; } else if ((/linux/i).test(ua)) { o.os = 'linux'; } else if ((/rhino/i).test(ua)) { o.os = 'rhino'; } // Modern KHTML browsers should qualify as Safari X-Grade if ((/KHTML/).test(ua)) { o.webkit = 1; } if ((/IEMobile|XBLWP7/).test(ua)) { o.mobile = 'windows'; } if ((/Fennec/).test(ua)) { o.mobile = 'gecko'; } // Modern WebKit browsers are at least X-Grade m = ua.match(/AppleWebKit\/([^\s]*)/); if (m && m[1]) { o.webkit = numberify(m[1]); o.safari = o.webkit; if (/PhantomJS/.test(ua)) { m = ua.match(/PhantomJS\/([^\s]*)/); if (m && m[1]) { o.phantomjs = numberify(m[1]); } } // Mobile browser check if (/ Mobile\//.test(ua) || (/iPad|iPod|iPhone/).test(ua)) { o.mobile = 'Apple'; // iPhone or iPod Touch m = ua.match(/OS ([^\s]*)/); if (m && m[1]) { m = numberify(m[1].replace('_', '.')); } o.ios = m; o.os = 'ios'; o.ipad = o.ipod = o.iphone = 0; m = ua.match(/iPad|iPod|iPhone/); if (m && m[0]) { o[m[0].toLowerCase()] = o.ios; } } else { m = ua.match(/NokiaN[^\/]*|webOS\/\d\.\d/); if (m) { // Nokia N-series, webOS, ex: NokiaN95 o.mobile = m[0]; } if (/webOS/.test(ua)) { o.mobile = 'WebOS'; m = ua.match(/webOS\/([^\s]*);/); if (m && m[1]) { o.webos = numberify(m[1]); } } if (/ Android/.test(ua)) { if (/Mobile/.test(ua)) { o.mobile = 'Android'; } m = ua.match(/Android ([^\s]*);/); if (m && m[1]) { o.android = numberify(m[1]); } } if (/Silk/.test(ua)) { m = ua.match(/Silk\/([^\s]*)\)/); if (m && m[1]) { o.silk = numberify(m[1]); } if (!o.android) { o.android = 2.34; //Hack for desktop mode in Kindle o.os = 'Android'; } if (/Accelerated=true/.test(ua)) { o.accel = true; } } } m = ua.match(/(Chrome|CrMo|CriOS)\/([^\s]*)/); if (m && m[1] && m[2]) { o.chrome = numberify(m[2]); // Chrome o.safari = 0; //Reset safari back to 0 if (m[1] === 'CrMo') { o.mobile = 'chrome'; } } else { m = ua.match(/AdobeAIR\/([^\s]*)/); if (m) { o.air = m[0]; // Adobe AIR 1.0 or better } } } if (!o.webkit) { // not webkit // @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr) if (/Opera/.test(ua)) { m = ua.match(/Opera[\s\/]([^\s]*)/); if (m && m[1]) { o.opera = numberify(m[1]); } m = ua.match(/Version\/([^\s]*)/); if (m && m[1]) { o.opera = numberify(m[1]); // opera 10+ } if (/Opera Mobi/.test(ua)) { o.mobile = 'opera'; m = ua.replace('Opera Mobi', '').match(/Opera ([^\s]*)/); if (m && m[1]) { o.opera = numberify(m[1]); } } m = ua.match(/Opera Mini[^;]*/); if (m) { o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316 } } else { // not opera or webkit m = ua.match(/MSIE\s([^;]*)/); if (m && m[1]) { o.ie = numberify(m[1]); } else { // not opera, webkit, or ie m = ua.match(/Gecko\/([^\s]*)/); if (m) { o.gecko = 1; // Gecko detected, look for revision m = ua.match(/rv:([^\s\)]*)/); if (m && m[1]) { o.gecko = numberify(m[1]); } } } } } } //It was a parsed UA, do not assign the global value. if (!subUA) { if (typeof process == 'object') { if (process.versions && process.versions.node) { //NodeJS o.os = process.platform; o.nodejs = numberify(process.versions.node); } } YUI.Env.UA = o; } return o; }; Y.UA = YUI.Env.UA || YUI.Env.parseUA(); /** Performs a simple comparison between two version numbers, accounting for standard versioning logic such as the fact that "535.8" is a lower version than "535.24", even though a simple numerical comparison would indicate that it's greater. Also accounts for cases such as "1.1" vs. "1.1.0", which are considered equivalent. Returns -1 if version _a_ is lower than version _b_, 0 if they're equivalent, 1 if _a_ is higher than _b_. Versions may be numbers or strings containing numbers and dots. For example, both `535` and `"535.8.10"` are acceptable. A version string containing non-numeric characters, like `"535.8.beta"`, may produce unexpected results. @method compareVersions @param {Number|String} a First version number to compare. @param {Number|String} b Second version number to compare. @return -1 if _a_ is lower than _b_, 0 if they're equivalent, 1 if _a_ is higher than _b_. **/ Y.UA.compareVersions = function (a, b) { var aPart, aParts, bPart, bParts, i, len; if (a === b) { return 0; } aParts = (a + '').split('.'); bParts = (b + '').split('.'); for (i = 0, len = Math.max(aParts.length, bParts.length); i < len; ++i) { aPart = parseInt(aParts[i], 10); bPart = parseInt(bParts[i], 10); isNaN(aPart) && (aPart = 0); isNaN(bPart) && (bPart = 0); if (aPart < bPart) { return -1; } if (aPart > bPart) { return 1; } } return 0; }; YUI.Env.aliases = { "anim": ["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"], "app": ["app-base","app-content","app-transitions","lazy-model-list","model","model-list","model-sync-rest","router","view","view-node-map"], "attribute": ["attribute-base","attribute-complex"], "autocomplete": ["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"], "base": ["base-base","base-pluginhost","base-build"], "cache": ["cache-base","cache-offline","cache-plugin"], "collection": ["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"], "controller": ["router"], "dataschema": ["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"], "datasource": ["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"], "datatable": ["datatable-core","datatable-table","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"], "datatable-deprecated": ["datatable-base-deprecated","datatable-datasource-deprecated","datatable-sort-deprecated","datatable-scroll-deprecated"], "datatype": ["datatype-number","datatype-date","datatype-xml"], "datatype-date": ["datatype-date-parse","datatype-date-format"], "datatype-number": ["datatype-number-parse","datatype-number-format"], "datatype-xml": ["datatype-xml-parse","datatype-xml-format"], "dd": ["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"], "dom": ["dom-base","dom-screen","dom-style","selector-native","selector"], "editor": ["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"], "event": ["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange"], "event-custom": ["event-custom-base","event-custom-complex"], "event-gestures": ["event-flick","event-move"], "handlebars": ["handlebars-compiler"], "highlight": ["highlight-base","highlight-accentfold"], "history": ["history-base","history-hash","history-hash-ie","history-html5"], "io": ["io-base","io-xdr","io-form","io-upload-iframe","io-queue"], "json": ["json-parse","json-stringify"], "loader": ["loader-base","loader-rollup","loader-yui3"], "node": ["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"], "pluginhost": ["pluginhost-base","pluginhost-config"], "querystring": ["querystring-parse","querystring-stringify"], "recordset": ["recordset-base","recordset-sort","recordset-filter","recordset-indexer"], "resize": ["resize-base","resize-proxy","resize-constrain"], "slider": ["slider-base","slider-value-range","clickable-rail","range-slider"], "text": ["text-accentfold","text-wordbreak"], "widget": ["widget-base","widget-htmlparser","widget-skin","widget-uievents"] }; }, '@VERSION@', {"use": ["get", "features", "intl-base", "yui-log", "yui-later"]}); YUI.add('get', function (Y, NAME) { /*jslint boss:true, expr:true, laxbreak: true */ /** Provides dynamic loading of remote JavaScript and CSS resources. @module get @class Get @static **/ var Lang = Y.Lang, CUSTOM_ATTRS, // defined lazily in Y.Get.Transaction._createNode() Get, Transaction; Y.Get = Get = { // -- Public Properties ---------------------------------------------------- /** Default options for CSS requests. Options specified here will override global defaults for CSS requests. See the `options` property for all available options. @property cssOptions @type Object @static @since 3.5.0 **/ cssOptions: { attributes: { rel: 'stylesheet' }, doc : Y.config.linkDoc || Y.config.doc, pollInterval: 50 }, /** Default options for JS requests. Options specified here will override global defaults for JS requests. See the `options` property for all available options. @property jsOptions @type Object @static @since 3.5.0 **/ jsOptions: { autopurge: true, doc : Y.config.scriptDoc || Y.config.doc }, /** Default options to use for all requests. Note that while all available options are documented here for ease of discovery, some options (like callback functions) only make sense at the transaction level. Callback functions specified via the options object or the `options` parameter of the `css()`, `js()`, or `load()` methods will receive the transaction object as a parameter. See `Y.Get.Transaction` for details on the properties and methods available on transactions. @static @since 3.5.0 @property {Object} options @property {Boolean} [options.async=false] Whether or not to load scripts asynchronously, meaning they're requested in parallel and execution order is not guaranteed. Has no effect on CSS, since CSS is always loaded asynchronously. @property {Object} [options.attributes] HTML attribute name/value pairs that should be added to inserted nodes. By default, the `charset` attribute will be set to "utf-8" and nodes will be given an auto-generated `id` attribute, but you can override these with your own values if desired. @property {Boolean} [options.autopurge] Whether or not to automatically purge inserted nodes after the purge threshold is reached. This is `true` by default for JavaScript, but `false` for CSS since purging a CSS node will also remove any styling applied by the referenced file. @property {Object} [options.context] `this` object to use when calling callback functions. Defaults to the transaction object. @property {Mixed} [options.data] Arbitrary data object to pass to "on*" callbacks. @property {Document} [options.doc] Document into which nodes should be inserted. By default, the current document is used. @property {HTMLElement|String} [options.insertBefore] HTML element or id string of an element before which all generated nodes should be inserted. If not specified, Get will automatically determine the best place to insert nodes for maximum compatibility. @property {Function} [options.onEnd] Callback to execute after a transaction is complete, regardless of whether it succeeded or failed. @property {Function} [options.onFailure] Callback to execute after a transaction fails, times out, or is aborted. @property {Function} [options.onProgress] Callback to execute after each individual request in a transaction either succeeds or fails. @property {Function} [options.onSuccess] Callback to execute after a transaction completes successfully with no errors. Note that in browsers that don't support the `error` event on CSS `<link>` nodes, a failed CSS request may still be reported as a success because in these browsers it can be difficult or impossible to distinguish between success and failure for CSS resources. @property {Function} [options.onTimeout] Callback to execute after a transaction times out. @property {Number} [options.pollInterval=50] Polling interval (in milliseconds) for detecting CSS load completion in browsers that don't support the `load` event on `<link>` nodes. This isn't used for JavaScript. @property {Number} [options.purgethreshold=20] Number of nodes to insert before triggering an automatic purge when `autopurge` is `true`. @property {Number} [options.timeout] Number of milliseconds to wait before aborting a transaction. When a timeout occurs, the `onTimeout` callback is called, followed by `onFailure` and finally `onEnd`. By default, there is no timeout. @property {String} [options.type] Resource type ("css" or "js"). This option is set automatically by the `css()` and `js()` functions and will be ignored there, but may be useful when using the `load()` function. If not specified, the type will be inferred from the URL, defaulting to "js" if the URL doesn't contain a recognizable file extension. **/ options: { attributes: { charset: 'utf-8' }, purgethreshold: 20 }, // -- Protected Properties ------------------------------------------------- /** Regex that matches a CSS URL. Used to guess the file type when it's not specified. @property REGEX_CSS @type RegExp @final @protected @static @since 3.5.0 **/ REGEX_CSS: /\.css(?:[?;].*)?$/i, /** Regex that matches a JS URL. Used to guess the file type when it's not specified. @property REGEX_JS @type RegExp @final @protected @static @since 3.5.0 **/ REGEX_JS : /\.js(?:[?;].*)?$/i, /** Contains information about the current environment, such as what script and link injection features it supports. This object is created and populated the first time the `_getEnv()` method is called. @property _env @type Object @protected @static @since 3.5.0 **/ /** Mapping of document _yuid strings to <head> or <base> node references so we don't have to look the node up each time we want to insert a request node. @property _insertCache @type Object @protected @static @since 3.5.0 **/ _insertCache: {}, /** Information about the currently pending transaction, if any. This is actually an object with two properties: `callback`, containing the optional callback passed to `css()`, `load()`, or `js()`; and `transaction`, containing the actual transaction instance. @property _pending @type Object @protected @static @since 3.5.0 **/ _pending: null, /** HTML nodes eligible to be purged next time autopurge is triggered. @property _purgeNodes @type HTMLElement[] @protected @static @since 3.5.0 **/ _purgeNodes: [], /** Queued transactions and associated callbacks. @property _queue @type Object[] @protected @static @since 3.5.0 **/ _queue: [], // -- Public Methods ------------------------------------------------------- /** Aborts the specified transaction. This will cause the transaction's `onFailure` callback to be called and will prevent any new script and link nodes from being added to the document, but any resources that have already been requested will continue loading (there's no safe way to prevent this, unfortunately). *Note:* This method is deprecated as of 3.5.0, and will be removed in a future version of YUI. Use the transaction-level `abort()` method instead. @method abort @param {Get.Transaction} transaction Transaction to abort. @deprecated Use the `abort()` method on the transaction instead. @static **/ abort: function (transaction) { var i, id, item, len, pending; if (!transaction.abort) { id = transaction; pending = this._pending; transaction = null; if (pending && pending.transaction.id === id) { transaction = pending.transaction; this._pending = null; } else { for (i = 0, len = this._queue.length; i < len; ++i) { item = this._queue[i].transaction; if (item.id === id) { transaction = item; this._queue.splice(i, 1); break; } } } } transaction && transaction.abort(); }, /** Loads one or more CSS files. The _urls_ parameter may be provided as a URL string, a request object, or an array of URL strings and/or request objects. A request object is just an object that contains a `url` property and zero or more options that should apply specifically to that request. Request-specific options take priority over transaction-level options and default options. URLs may be relative or absolute, and do not have to have the same origin as the current page. The `options` parameter may be omitted completely and a callback passed in its place, if desired. @example // Load a single CSS file and log a message on completion. Y.Get.css('foo.css', function (err) { if (err) { } else { } }); // Load multiple CSS files and log a message when all have finished // loading. var urls = ['foo.css', 'http://example.com/bar.css', 'baz/quux.css']; Y.Get.css(urls, function (err) { if (err) { } else { } }); // Specify transaction-level options, which will apply to all requests // within the transaction. Y.Get.css(urls, { attributes: {'class': 'my-css'}, timeout : 5000 }); // Specify per-request options, which override transaction-level and // default options. Y.Get.css([ {url: 'foo.css', attributes: {id: 'foo'}}, {url: 'bar.css', attributes: {id: 'bar', charset: 'iso-8859-1'}} ]); @method css @param {String|Object|Array} urls URL string, request object, or array of URLs and/or request objects to load. @param {Object} [options] Options for this transaction. See the `Y.Get.options` property for a complete list of available options. @param {Function} [callback] Callback function to be called on completion. This is a general callback and will be called before any more granular callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options` object. @param {Array|null} callback.err Array of errors that occurred during the transaction, or `null` on success. @param {Get.Transaction} callback.transaction Transaction object. @return {Get.Transaction} Transaction object. @static **/ css: function (urls, options, callback) { return this._load('css', urls, options, callback); }, /** Loads one or more JavaScript resources. The _urls_ parameter may be provided as a URL string, a request object, or an array of URL strings and/or request objects. A request object is just an object that contains a `url` property and zero or more options that should apply specifically to that request. Request-specific options take priority over transaction-level options and default options. URLs may be relative or absolute, and do not have to have the same origin as the current page. The `options` parameter may be omitted completely and a callback passed in its place, if desired. Scripts will be executed in the order they're specified unless the `async` option is `true`, in which case they'll be loaded in parallel and executed in whatever order they finish loading. @example // Load a single JS file and log a message on completion. Y.Get.js('foo.js', function (err) { if (err) { } else { } }); // Load multiple JS files, execute them in order, and log a message when // all have finished loading. var urls = ['foo.js', 'http://example.com/bar.js', 'baz/quux.js']; Y.Get.js(urls, function (err) { if (err) { } else { } }); // Specify transaction-level options, which will apply to all requests // within the transaction. Y.Get.js(urls, { attributes: {'class': 'my-js'}, timeout : 5000 }); // Specify per-request options, which override transaction-level and // default options. Y.Get.js([ {url: 'foo.js', attributes: {id: 'foo'}}, {url: 'bar.js', attributes: {id: 'bar', charset: 'iso-8859-1'}} ]); @method js @param {String|Object|Array} urls URL string, request object, or array of URLs and/or request objects to load. @param {Object} [options] Options for this transaction. See the `Y.Get.options` property for a complete list of available options. @param {Function} [callback] Callback function to be called on completion. This is a general callback and will be called before any more granular callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options` object. @param {Array|null} callback.err Array of errors that occurred during the transaction, or `null` on success. @param {Get.Transaction} callback.transaction Transaction object. @return {Get.Transaction} Transaction object. @since 3.5.0 @static **/ js: function (urls, options, callback) { return this._load('js', urls, options, callback); }, /** Loads one or more CSS and/or JavaScript resources in the same transaction. Use this method when you want to load both CSS and JavaScript in a single transaction and be notified when all requested URLs have finished loading, regardless of type. Behavior and options are the same as for the `css()` and `js()` methods. If a resource type isn't specified in per-request options or transaction-level options, Get will guess the file type based on the URL's extension (`.css` or `.js`, with or without a following query string). If the file type can't be guessed from the URL, a warning will be logged and Get will assume the URL is a JavaScript resource. @example // Load both CSS and JS files in a single transaction, and log a message // when all files have finished loading. Y.Get.load(['foo.css', 'bar.js', 'baz.css'], function (err) { if (err) { } else { } }); @method load @param {String|Object|Array} urls URL string, request object, or array of URLs and/or request objects to load. @param {Object} [options] Options for this transaction. See the `Y.Get.options` property for a complete list of available options. @param {Function} [callback] Callback function to be called on completion. This is a general callback and will be called before any more granular callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options` object. @param {Array|null} err Array of errors that occurred during the transaction, or `null` on success. @param {Get.Transaction} Transaction object. @return {Get.Transaction} Transaction object. @since 3.5.0 @static **/ load: function (urls, options, callback) { return this._load(null, urls, options, callback); }, // -- Protected Methods ---------------------------------------------------- /** Triggers an automatic purge if the purge threshold has been reached. @method _autoPurge @param {Number} threshold Purge threshold to use, in milliseconds. @protected @since 3.5.0 @static **/ _autoPurge: function (threshold) { if (threshold && this._purgeNodes.length >= threshold) { this._purge(this._purgeNodes); } }, /** Populates the `_env` property with information about the current environment. @method _getEnv @return {Object} Environment information. @protected @since 3.5.0 @static **/ _getEnv: function () { var doc = Y.config.doc, ua = Y.UA; // Note: some of these checks require browser sniffs since it's not // feasible to load test files on every pageview just to perform a // feature test. I'm sorry if this makes you sad. return (this._env = { // True if this is a browser that supports disabling async mode on // dynamically created script nodes. See // https://developer.mozilla.org/En/HTML/Element/Script#Attributes async: doc && doc.createElement('script').async === true, // True if this browser fires an event when a dynamically injected // link node fails to load. This is currently true for Firefox 9+ // and WebKit 535.24+. cssFail: ua.gecko >= 9 || ua.compareVersions(ua.webkit, 535.24) >= 0, // True if this browser fires an event when a dynamically injected // link node finishes loading. This is currently true for IE, Opera, // Firefox 9+, and WebKit 535.24+. Note that IE versions <9 fire the // DOM 0 "onload" event, but not "load". All versions of IE fire // "onload". // davglass: Seems that Chrome on Android needs this to be false. cssLoad: ( (!ua.gecko && !ua.webkit) || ua.gecko >= 9 || ua.compareVersions(ua.webkit, 535.24) >= 0 ) && !(ua.chrome && ua.chrome <= 18), // True if this browser preserves script execution order while // loading scripts in parallel as long as the script node's `async` // attribute is set to false to explicitly disable async execution. preservesScriptOrder: !!(ua.gecko || ua.opera) }); }, _getTransaction: function (urls, options) { var requests = [], i, len, req, url; if (!Lang.isArray(urls)) { urls = [urls]; } options = Y.merge(this.options, options); // Clone the attributes object so we don't end up modifying it by ref. options.attributes = Y.merge(this.options.attributes, options.attributes); for (i = 0, len = urls.length; i < len; ++i) { url = urls[i]; req = {attributes: {}}; // If `url` is a string, we create a URL object for it, then mix in // global options and request-specific options. If it's an object // with a "url" property, we assume it's a request object containing // URL-specific options. if (typeof url === 'string') { req.url = url; } else if (url.url) { // URL-specific options override both global defaults and // request-specific options. Y.mix(req, url, false, null, 0, true); url = url.url; // Make url a string so we can use it later. } else { continue; } Y.mix(req, options, false, null, 0, true); // If we didn't get an explicit type for this URL either in the // request options or the URL-specific options, try to determine // one from the file extension. if (!req.type) { if (this.REGEX_CSS.test(url)) { req.type = 'css'; } else { if (!this.REGEX_JS.test(url)) { } req.type = 'js'; } } // Mix in type-specific default options, but don't overwrite any // options that have already been set. Y.mix(req, req.type === 'js' ? this.jsOptions : this.cssOptions, false, null, 0, true); // Give the node an id attribute if it doesn't already have one. req.attributes.id || (req.attributes.id = Y.guid()); // Backcompat for <3.5.0 behavior. if (req.win) { req.doc = req.win.document; } else { req.win = req.doc.defaultView || req.doc.parentWindow; } if (req.charset) { req.attributes.charset = req.charset; } requests.push(req); } return new Transaction(requests, options); }, _load: function (type, urls, options, callback) { var transaction; // Allow callback as third param. if (typeof options === 'function') { callback = options; options = {}; } options || (options = {}); options.type = type; if (!this._env) { this._getEnv(); } transaction = this._getTransaction(urls, options); this._queue.push({ callback : callback, transaction: transaction }); this._next(); return transaction; }, _next: function () { var item; if (this._pending) { return; } item = this._queue.shift(); if (item) { this._pending = item; item.transaction.execute(function () { item.callback && item.callback.apply(this, arguments); Get._pending = null; Get._next(); }); } }, _purge: function (nodes) { var purgeNodes = this._purgeNodes, isTransaction = nodes !== purgeNodes, index, node; while (node = nodes.pop()) { // assignment // Don't purge nodes that haven't finished loading (or errored out), // since this can hang the transaction. if (!node._yuiget_finished) { continue; } node.parentNode && node.parentNode.removeChild(node); // If this is a transaction-level purge and this node also exists in // the Get-level _purgeNodes array, we need to remove it from // _purgeNodes to avoid creating a memory leak. The indexOf lookup // sucks, but until we get WeakMaps, this is the least troublesome // way to do this (we can't just hold onto node ids because they may // not be in the same document). if (isTransaction) { index = Y.Array.indexOf(purgeNodes, node); if (index > -1) { purgeNodes.splice(index, 1); } } } } }; /** Alias for `js()`. @method script @static **/ Get.script = Get.js; /** Represents a Get transaction, which may contain requests for one or more JS or CSS files. This class should not be instantiated manually. Instances will be created and returned as needed by Y.Get's `css()`, `js()`, and `load()` methods. @class Get.Transaction @constructor @since 3.5.0 **/ Get.Transaction = Transaction = function (requests, options) { var self = this; self.id = Transaction._lastId += 1; self.data = options.data; self.errors = []; self.nodes = []; self.options = options; self.requests = requests; self._callbacks = []; // callbacks to call after execution finishes self._queue = []; self._waiting = 0; // Deprecated pre-3.5.0 properties. self.tId = self.id; // Use `id` instead. self.win = options.win || Y.config.win; }; /** Arbitrary data object associated with this transaction. This object comes from the options passed to `Get.css()`, `Get.js()`, or `Get.load()`, and will be `undefined` if no data object was specified. @property {Object} data **/ /** Array of errors that have occurred during this transaction, if any. @since 3.5.0 @property {Object[]} errors @property {String} errors.error Error message. @property {Object} errors.request Request object related to the error. **/ /** Numeric id for this transaction, unique among all transactions within the same YUI sandbox in the current pageview. @property {Number} id @since 3.5.0 **/ /** HTMLElement nodes (native ones, not YUI Node instances) that have been inserted during the current transaction. @property {HTMLElement[]} nodes **/ /** Options associated with this transaction. See `Get.options` for the full list of available options. @property {Object} options @since 3.5.0 **/ /** Request objects contained in this transaction. Each request object represents one CSS or JS URL that will be (or has been) requested and loaded into the page. @property {Object} requests @since 3.5.0 **/ /** Id of the most recent transaction. @property _lastId @type Number @protected @static **/ Transaction._lastId = 0; Transaction.prototype = { // -- Public Properties ---------------------------------------------------- /** Current state of this transaction. One of "new", "executing", or "done". @property _state @type String @protected **/ _state: 'new', // "new", "executing", or "done" // -- Public Methods ------------------------------------------------------- /** Aborts this transaction. This will cause the transaction's `onFailure` callback to be called and will prevent any new script and link nodes from being added to the document, but any resources that have already been requested will continue loading (there's no safe way to prevent this, unfortunately). @method abort @param {String} [msg="Aborted."] Optional message to use in the `errors` array describing why the transaction was aborted. **/ abort: function (msg) { this._pending = null; this._pendingCSS = null; this._pollTimer = clearTimeout(this._pollTimer); this._queue = []; this._waiting = 0; this.errors.push({error: msg || 'Aborted'}); this._finish(); }, /** Begins execting the transaction. There's usually no reason to call this manually, since Get will call it automatically when other pending transactions have finished. If you really want to execute your transaction before Get does, you can, but be aware that this transaction's scripts may end up executing before the scripts in other pending transactions. If the transaction is already executing, the specified callback (if any) will be queued and called after execution finishes. If the transaction has already finished, the callback will be called immediately (the transaction will not be executed again). @method execute @param {Function} callback Callback function to execute after all requests in the transaction are complete, or after the transaction is aborted. **/ execute: function (callback) { var self = this, requests = self.requests, state = self._state, i, len, queue, req; if (state === 'done') { callback && callback(self.errors.length ? self.errors : null, self); return; } else { callback && self._callbacks.push(callback); if (state === 'executing') { return; } } self._state = 'executing'; self._queue = queue = []; if (self.options.timeout) { self._timeout = setTimeout(function () { self.abort('Timeout'); }, self.options.timeout); } for (i = 0, len = requests.length; i < len; ++i) { req = self.requests[i]; if (req.async || req.type === 'css') { // No need to queue CSS or fully async JS. self._insert(req); } else { queue.push(req); } } self._next(); }, /** Manually purges any `<script>` or `<link>` nodes this transaction has created. Be careful when purging a transaction that contains CSS requests, since removing `<link>` nodes will also remove any styles they applied. @method purge **/ purge: function () { Get._purge(this.nodes); }, // -- Protected Methods ---------------------------------------------------- _createNode: function (name, attrs, doc) { var node = doc.createElement(name), attr, testEl; if (!CUSTOM_ATTRS) { // IE6 and IE7 expect property names rather than attribute names for // certain attributes. Rather than sniffing, we do a quick feature // test the first time _createNode() runs to determine whether we // need to provide a workaround. testEl = doc.createElement('div'); testEl.setAttribute('class', 'a'); CUSTOM_ATTRS = testEl.className === 'a' ? {} : { 'for' : 'htmlFor', 'class': 'className' }; } for (attr in attrs) { if (attrs.hasOwnProperty(attr)) { node.setAttribute(CUSTOM_ATTRS[attr] || attr, attrs[attr]); } } return node; }, _finish: function () { var errors = this.errors.length ? this.errors : null, options = this.options, thisObj = options.context || this, data, i, len; if (this._state === 'done') { return; } this._state = 'done'; for (i = 0, len = this._callbacks.length; i < len; ++i) { this._callbacks[i].call(thisObj, errors, this); } data = this._getEventData(); if (errors) { if (options.onTimeout && errors[errors.length - 1].error === 'Timeout') { options.onTimeout.call(thisObj, data); } if (options.onFailure) { options.onFailure.call(thisObj, data); } } else if (options.onSuccess) { options.onSuccess.call(thisObj, data); } if (options.onEnd) { options.onEnd.call(thisObj, data); } }, _getEventData: function (req) { if (req) { // This merge is necessary for backcompat. I hate it. return Y.merge(this, { abort : this.abort, // have to copy these because the prototype isn't preserved purge : this.purge, request: req, url : req.url, win : req.win }); } else { return this; } }, _getInsertBefore: function (req) { var doc = req.doc, el = req.insertBefore, cache, cachedNode, docStamp; if (el) { return typeof el === 'string' ? doc.getElementById(el) : el; } cache = Get._insertCache; docStamp = Y.stamp(doc); if ((el = cache[docStamp])) { // assignment return el; } // Inserting before a <base> tag apparently works around an IE bug // (according to a comment from pre-3.5.0 Y.Get), but I'm not sure what // bug that is, exactly. Better safe than sorry? if ((el = doc.getElementsByTagName('base')[0])) { // assignment return (cache[docStamp] = el); } // Look for a <head> element. el = doc.head || doc.getElementsByTagName('head')[0]; if (el) { // Create a marker node at the end of <head> to use as an insertion // point. Inserting before this node will ensure that all our CSS // gets inserted in the correct order, to maintain style precedence. el.appendChild(doc.createTextNode('')); return (cache[docStamp] = el.lastChild); } // If all else fails, just insert before the first script node on the // page, which is virtually guaranteed to exist. return (cache[docStamp] = doc.getElementsByTagName('script')[0]); }, _insert: function (req) { var env = Get._env, insertBefore = this._getInsertBefore(req), isScript = req.type === 'js', node = req.node, self = this, ua = Y.UA, cssTimeout, nodeType; if (!node) { if (isScript) { nodeType = 'script'; } else if (!env.cssLoad && ua.gecko) { nodeType = 'style'; } else { nodeType = 'link'; } node = req.node = this._createNode(nodeType, req.attributes, req.doc); } function onError() { self._progress('Failed to load ' + req.url, req); } function onLoad() { if (cssTimeout) { clearTimeout(cssTimeout); } self._progress(null, req); } // Deal with script asynchronicity. if (isScript) { node.setAttribute('src', req.url); if (req.async) { // Explicitly indicate that we want the browser to execute this // script asynchronously. This is necessary for older browsers // like Firefox <4. node.async = true; } else { if (env.async) { // This browser treats injected scripts as async by default // (standard HTML5 behavior) but asynchronous loading isn't // desired, so tell the browser not to mark this script as // async. node.async = false; } // If this browser doesn't preserve script execution order based // on insertion order, we'll need to avoid inserting other // scripts until this one finishes loading. if (!env.preservesScriptOrder) { this._pending = req; } } } else { if (!env.cssLoad && ua.gecko) { // In Firefox <9, we can import the requested URL into a <style> // node and poll for the existence of node.sheet.cssRules. This // gives us a reliable way to determine CSS load completion that // also works for cross-domain stylesheets. // // Props to Zach Leatherman for calling my attention to this // technique. node.innerHTML = (req.attributes.charset ? '@charset "' + req.attributes.charset + '";' : '') + '@import "' + req.url + '";'; } else { node.setAttribute('href', req.url); } } // Inject the node. if (isScript && ua.ie && (ua.ie < 9 || (document.documentMode && document.documentMode < 9))) { // Script on IE < 9, and IE 9+ when in IE 8 or older modes, including quirks mode. node.onreadystatechange = function () { if (/loaded|complete/.test(node.readyState)) { node.onreadystatechange = null; onLoad(); } }; } else if (!isScript && !env.cssLoad) { // CSS on Firefox <9 or WebKit. this._poll(req); } else { // Script or CSS on everything else. Using DOM 0 events because that // evens the playing field with older IEs. node.onerror = onError; node.onload = onLoad; // If this browser doesn't fire an event when CSS fails to load, // fail after a timeout to avoid blocking the transaction queue. if (!env.cssFail && !isScript) { cssTimeout = setTimeout(onError, req.timeout || 3000); } } this._waiting += 1; this.nodes.push(node); insertBefore.parentNode.insertBefore(node, insertBefore); }, _next: function () { if (this._pending) { return; } // If there are requests in the queue, insert the next queued request. // Otherwise, if we're waiting on already-inserted requests to finish, // wait longer. If there are no queued requests and we're not waiting // for anything to load, then we're done! if (this._queue.length) { this._insert(this._queue.shift()); } else if (!this._waiting) { this._finish(); } }, _poll: function (newReq) { var self = this, pendingCSS = self._pendingCSS, isWebKit = Y.UA.webkit, i, hasRules, j, nodeHref, req, sheets; if (newReq) { pendingCSS || (pendingCSS = self._pendingCSS = []); pendingCSS.push(newReq); if (self._pollTimer) { // A poll timeout is already pending, so no need to create a // new one. return; } } self._pollTimer = null; // Note: in both the WebKit and Gecko hacks below, a CSS URL that 404s // will still be treated as a success. There's no good workaround for // this. for (i = 0; i < pendingCSS.length; ++i) { req = pendingCSS[i]; if (isWebKit) { // Look for a stylesheet matching the pending URL. sheets = req.doc.styleSheets; j = sheets.length; nodeHref = req.node.href; while (--j >= 0) { if (sheets[j].href === nodeHref) { pendingCSS.splice(i, 1); i -= 1; self._progress(null, req); break; } } } else { // Many thanks to Zach Leatherman for calling my attention to // the @import-based cross-domain technique used here, and to // Oleg Slobodskoi for an earlier same-domain implementation. // // See Zach's blog for more details: // http://www.zachleat.com/web/2010/07/29/load-css-dynamically/ try { // We don't really need to store this value since we never // use it again, but if we don't store it, Closure Compiler // assumes the code is useless and removes it. hasRules = !!req.node.sheet.cssRules; // If we get here, the stylesheet has loaded. pendingCSS.splice(i, 1); i -= 1; self._progress(null, req); } catch (ex) { // An exception means the stylesheet is still loading. } } } if (pendingCSS.length) { self._pollTimer = setTimeout(function () { self._poll.call(self); }, self.options.pollInterval); } }, _progress: function (err, req) { var options = this.options; if (err) { req.error = err; this.errors.push({ error : err, request: req }); } req.node._yuiget_finished = req.finished = true; if (options.onProgress) { options.onProgress.call(options.context || this, this._getEventData(req)); } if (req.autopurge) { // Pre-3.5.0 Get always excludes the most recent node from an // autopurge. I find this odd, but I'm keeping that behavior for // the sake of backcompat. Get._autoPurge(this.options.purgethreshold); Get._purgeNodes.push(req.node); } if (this._pending === req) { this._pending = null; } this._waiting -= 1; this._next(); } }; }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('features', function (Y, NAME) { var feature_tests = {}; /** Contains the core of YUI's feature test architecture. @module features */ /** * Feature detection * @class Features * @static */ Y.mix(Y.namespace('Features'), { /** * Object hash of all registered feature tests * @property tests * @type Object */ tests: feature_tests, /** * Add a test to the system * * ``` * Y.Features.add("load", "1", {}); * ``` * * @method add * @param {String} cat The category, right now only 'load' is supported * @param {String} name The number sequence of the test, how it's reported in the URL or config: 1, 2, 3 * @param {Object} o Object containing test properties * @param {String} o.name The name of the test * @param {Function} o.test The test function to execute, the only argument to the function is the `Y` instance * @param {String} o.trigger The module that triggers this test. */ add: function(cat, name, o) { feature_tests[cat] = feature_tests[cat] || {}; feature_tests[cat][name] = o; }, /** * Execute all tests of a given category and return the serialized results * * ``` * caps=1:1;2:1;3:0 * ``` * @method all * @param {String} cat The category to execute * @param {Array} args The arguments to pass to the test function * @return {String} A semi-colon separated string of tests and their success/failure: 1:1;2:1;3:0 */ all: function(cat, args) { var cat_o = feature_tests[cat], // results = {}; result = []; if (cat_o) { Y.Object.each(cat_o, function(v, k) { result.push(k + ':' + (Y.Features.test(cat, k, args) ? 1 : 0)); }); } return (result.length) ? result.join(';') : ''; }, /** * Run a sepecific test and return a Boolean response. * * ``` * Y.Features.test("load", "1"); * ``` * * @method test * @param {String} cat The category of the test to run * @param {String} name The name of the test to run * @param {Array} args The arguments to pass to the test function * @return {Boolean} True or false if the test passed/failed. */ test: function(cat, name, args) { args = args || []; var result, ua, test, cat_o = feature_tests[cat], feature = cat_o && cat_o[name]; if (!feature) { } else { result = feature.result; if (Y.Lang.isUndefined(result)) { ua = feature.ua; if (ua) { result = (Y.UA[ua]); } test = feature.test; if (test && ((!ua) || result)) { result = test.apply(Y, args); } feature.result = result; } } return result; } }); // Y.Features.add("load", "1", {}); // Y.Features.test("load", "1"); // caps=1:1;2:0;3:1; /* This file is auto-generated by src/loader/scripts/meta_join.js */ var add = Y.Features.add; // app-transitions-native add('load', '0', { "name": "app-transitions-native", "test": function (Y) { var doc = Y.config.doc, node = doc ? doc.documentElement : null; if (node && node.style) { return ('MozTransition' in node.style || 'WebkitTransition' in node.style); } return false; }, "trigger": "app-transitions" }); // autocomplete-list-keys add('load', '1', { "name": "autocomplete-list-keys", "test": function (Y) { // Only add keyboard support to autocomplete-list if this doesn't appear to // be an iOS or Android-based mobile device. // // There's currently no feasible way to actually detect whether a device has // a hardware keyboard, so this sniff will have to do. It can easily be // overridden by manually loading the autocomplete-list-keys module. // // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari // doesn't fire the keyboard events used by AutoCompleteList, so there's // no point loading the -keys module even when a bluetooth keyboard may be // available. return !(Y.UA.ios || Y.UA.android); }, "trigger": "autocomplete-list" }); // dd-gestures add('load', '2', { "name": "dd-gestures", "test": function(Y) { return ((Y.config.win && ("ontouchstart" in Y.config.win)) && !(Y.UA.chrome && Y.UA.chrome < 6)); }, "trigger": "dd-drag" }); // dom-style-ie add('load', '3', { "name": "dom-style-ie", "test": function (Y) { var testFeature = Y.Features.test, addFeature = Y.Features.add, WINDOW = Y.config.win, DOCUMENT = Y.config.doc, DOCUMENT_ELEMENT = 'documentElement', ret = false; addFeature('style', 'computedStyle', { test: function() { return WINDOW && 'getComputedStyle' in WINDOW; } }); addFeature('style', 'opacity', { test: function() { return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style; } }); ret = (!testFeature('style', 'opacity') && !testFeature('style', 'computedStyle')); return ret; }, "trigger": "dom-style" }); // editor-para-ie add('load', '4', { "name": "editor-para-ie", "trigger": "editor-para", "ua": "ie", "when": "instead" }); // event-base-ie add('load', '5', { "name": "event-base-ie", "test": function(Y) { var imp = Y.config.doc && Y.config.doc.implementation; return (imp && (!imp.hasFeature('Events', '2.0'))); }, "trigger": "node-base" }); // graphics-canvas add('load', '6', { "name": "graphics-canvas", "test": function(Y) { var DOCUMENT = Y.config.doc, useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas", canvas = DOCUMENT && DOCUMENT.createElement("canvas"), svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d")); }, "trigger": "graphics" }); // graphics-canvas-default add('load', '7', { "name": "graphics-canvas-default", "test": function(Y) { var DOCUMENT = Y.config.doc, useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas", canvas = DOCUMENT && DOCUMENT.createElement("canvas"), svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d")); }, "trigger": "graphics" }); // graphics-svg add('load', '8', { "name": "graphics-svg", "test": function(Y) { var DOCUMENT = Y.config.doc, useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas", canvas = DOCUMENT && DOCUMENT.createElement("canvas"), svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); return svg && (useSVG || !canvas); }, "trigger": "graphics" }); // graphics-svg-default add('load', '9', { "name": "graphics-svg-default", "test": function(Y) { var DOCUMENT = Y.config.doc, useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas", canvas = DOCUMENT && DOCUMENT.createElement("canvas"), svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); return svg && (useSVG || !canvas); }, "trigger": "graphics" }); // graphics-vml add('load', '10', { "name": "graphics-vml", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); }, "trigger": "graphics" }); // graphics-vml-default add('load', '11', { "name": "graphics-vml-default", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); }, "trigger": "graphics" }); // history-hash-ie add('load', '12', { "name": "history-hash-ie", "test": function (Y) { var docMode = Y.config.doc && Y.config.doc.documentMode; return Y.UA.ie && (!('onhashchange' in Y.config.win) || !docMode || docMode < 8); }, "trigger": "history-hash" }); // io-nodejs add('load', '13', { "name": "io-nodejs", "trigger": "io-base", "ua": "nodejs" }); // scrollview-base-ie add('load', '14', { "name": "scrollview-base-ie", "trigger": "scrollview-base", "ua": "ie" }); // selector-css2 add('load', '15', { "name": "selector-css2", "test": function (Y) { var DOCUMENT = Y.config.doc, ret = DOCUMENT && !('querySelectorAll' in DOCUMENT); return ret; }, "trigger": "selector" }); // transition-timer add('load', '16', { "name": "transition-timer", "test": function (Y) { var DOCUMENT = Y.config.doc, node = (DOCUMENT) ? DOCUMENT.documentElement: null, ret = true; if (node && node.style) { ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style); } return ret; }, "trigger": "transition" }); // widget-base-ie add('load', '17', { "name": "widget-base-ie", "trigger": "widget-base", "ua": "ie" }); }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('intl-base', function (Y, NAME) { /** * The Intl utility provides a central location for managing sets of * localized resources (strings and formatting patterns). * * @class Intl * @uses EventTarget * @static */ var SPLIT_REGEX = /[, ]/; Y.mix(Y.namespace('Intl'), { /** * Returns the language among those available that * best matches the preferred language list, using the Lookup * algorithm of BCP 47. * If none of the available languages meets the user's preferences, * then "" is returned. * Extended language ranges are not supported. * * @method lookupBestLang * @param {String[] | String} preferredLanguages The list of preferred * languages in descending preference order, represented as BCP 47 * language tags. A string array or a comma-separated list. * @param {String[]} availableLanguages The list of languages * that the application supports, represented as BCP 47 language * tags. * * @return {String} The available language that best matches the * preferred language list, or "". * @since 3.1.0 */ lookupBestLang: function(preferredLanguages, availableLanguages) { var i, language, result, index; // check whether the list of available languages contains language; // if so return it function scan(language) { var i; for (i = 0; i < availableLanguages.length; i += 1) { if (language.toLowerCase() === availableLanguages[i].toLowerCase()) { return availableLanguages[i]; } } } if (Y.Lang.isString(preferredLanguages)) { preferredLanguages = preferredLanguages.split(SPLIT_REGEX); } for (i = 0; i < preferredLanguages.length; i += 1) { language = preferredLanguages[i]; if (!language || language === '*') { continue; } // check the fallback sequence for one language while (language.length > 0) { result = scan(language); if (result) { return result; } else { index = language.lastIndexOf('-'); if (index >= 0) { language = language.substring(0, index); // one-character subtags get cut along with the // following subtag if (index >= 2 && language.charAt(index - 2) === '-') { language = language.substring(0, index - 2); } } else { // nothing available for this language break; } } } } return ''; } }); }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('yui-log', function (Y, NAME) { /** * Provides console log capability and exposes a custom event for * console implementations. This module is a `core` YUI module, <a href="../classes/YUI.html#method_log">it's documentation is located under the YUI class</a>. * * @module yui * @submodule yui-log */ var INSTANCE = Y, LOGEVENT = 'yui:log', UNDEFINED = 'undefined', LEVELS = { debug: 1, info: 1, warn: 1, error: 1 }; /** * If the 'debug' config is true, a 'yui:log' event will be * dispatched, which the Console widget and anything else * can consume. If the 'useBrowserConsole' config is true, it will * write to the browser console if available. YUI-specific log * messages will only be present in the -debug versions of the * JS files. The build system is supposed to remove log statements * from the raw and minified versions of the files. * * @method log * @for YUI * @param {String} msg The message to log. * @param {String} cat The log category for the message. Default * categories are "info", "warn", "error", time". * Custom categories can be used as well. (opt). * @param {String} src The source of the the message (opt). * @param {boolean} silent If true, the log event won't fire. * @return {YUI} YUI instance. */ INSTANCE.log = function(msg, cat, src, silent) { var bail, excl, incl, m, f, Y = INSTANCE, c = Y.config, publisher = (Y.fire) ? Y : YUI.Env.globalEvents; // suppress log message if the config is off or the event stack // or the event call stack contains a consumer of the yui:log event if (c.debug) { // apply source filters src = src || ""; if (typeof src !== "undefined") { excl = c.logExclude; incl = c.logInclude; if (incl && !(src in incl)) { bail = 1; } else if (incl && (src in incl)) { bail = !incl[src]; } else if (excl && (src in excl)) { bail = excl[src]; } } if (!bail) { if (c.useBrowserConsole) { m = (src) ? src + ': ' + msg : msg; if (Y.Lang.isFunction(c.logFn)) { c.logFn.call(Y, msg, cat, src); } else if (typeof console != UNDEFINED && console.log) { f = (cat && console[cat] && (cat in LEVELS)) ? cat : 'log'; console[f](m); } else if (typeof opera != UNDEFINED) { opera.postError(m); } } if (publisher && !silent) { if (publisher == Y && (!publisher.getEvent(LOGEVENT))) { publisher.publish(LOGEVENT, { broadcast: 2 }); } publisher.fire(LOGEVENT, { msg: msg, cat: cat, src: src }); } } } return Y; }; /** * Write a system message. This message will be preserved in the * minified and raw versions of the YUI files, unlike log statements. * @method message * @for YUI * @param {String} msg The message to log. * @param {String} cat The log category for the message. Default * categories are "info", "warn", "error", time". * Custom categories can be used as well. (opt). * @param {String} src The source of the the message (opt). * @param {boolean} silent If true, the log event won't fire. * @return {YUI} YUI instance. */ INSTANCE.message = function() { return INSTANCE.log.apply(INSTANCE, arguments); }; }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('yui-later', function (Y, NAME) { /** * Provides a setTimeout/setInterval wrapper. This module is a `core` YUI module, <a href="../classes/YUI.html#method_later">it's documentation is located under the YUI class</a>. * * @module yui * @submodule yui-later */ var NO_ARGS = []; /** * Executes the supplied function in the context of the supplied * object 'when' milliseconds later. Executes the function a * single time unless periodic is set to true. * @for YUI * @method later * @param when {int} the number of milliseconds to wait until the fn * is executed. * @param o the context object. * @param fn {Function|String} the function to execute or the name of * the method in the 'o' object to execute. * @param data [Array] data that is provided to the function. This * accepts either a single item or an array. If an array is provided, * the function is executed with one parameter for each array item. * If you need to pass a single array parameter, it needs to be wrapped * in an array [myarray]. * * Note: native methods in IE may not have the call and apply methods. * In this case, it will work, but you are limited to four arguments. * * @param periodic {boolean} if true, executes continuously at supplied * interval until canceled. * @return {object} a timer object. Call the cancel() method on this * object to stop the timer. */ Y.later = function(when, o, fn, data, periodic) { when = when || 0; data = (!Y.Lang.isUndefined(data)) ? Y.Array(data) : NO_ARGS; o = o || Y.config.win || Y; var cancelled = false, method = (o && Y.Lang.isString(fn)) ? o[fn] : fn, wrapper = function() { // IE 8- may execute a setInterval callback one last time // after clearInterval was called, so in order to preserve // the cancel() === no more runny-run, we have to jump through // an extra hoop. if (!cancelled) { if (!method.apply) { method(data[0], data[1], data[2], data[3]); } else { method.apply(o, data || NO_ARGS); } } }, id = (periodic) ? setInterval(wrapper, when) : setTimeout(wrapper, when); return { id: id, interval: periodic, cancel: function() { cancelled = true; if (this.interval) { clearInterval(id); } else { clearTimeout(id); } } }; }; Y.Lang.later = Y.later; }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('yui', function (Y, NAME) {}, '@VERSION@', {"use": ["get", "features", "intl-base", "yui-log", "yui-later"]}); YUI.add('oop', function (Y, NAME) { /** Adds object inheritance and manipulation utilities to the YUI instance. This module is required by most YUI components. @module oop **/ var L = Y.Lang, A = Y.Array, OP = Object.prototype, CLONE_MARKER = '_~yuim~_', hasOwn = OP.hasOwnProperty, toString = OP.toString; function dispatch(o, f, c, proto, action) { if (o && o[action] && o !== Y) { return o[action].call(o, f, c); } else { switch (A.test(o)) { case 1: return A[action](o, f, c); case 2: return A[action](Y.Array(o, 0, true), f, c); default: return Y.Object[action](o, f, c, proto); } } } /** Augments the _receiver_ with prototype properties from the _supplier_. The receiver may be a constructor function or an object. The supplier must be a constructor function. If the _receiver_ is an object, then the _supplier_ constructor will be called immediately after _receiver_ is augmented, with _receiver_ as the `this` object. If the _receiver_ is a constructor function, then all prototype methods of _supplier_ that are copied to _receiver_ will be sequestered, and the _supplier_ constructor will not be called immediately. The first time any sequestered method is called on the _receiver_'s prototype, all sequestered methods will be immediately copied to the _receiver_'s prototype, the _supplier_'s constructor will be executed, and finally the newly unsequestered method that was called will be executed. This sequestering logic sounds like a bunch of complicated voodoo, but it makes it cheap to perform frequent augmentation by ensuring that suppliers' constructors are only called if a supplied method is actually used. If none of the supplied methods is ever used, then there's no need to take the performance hit of calling the _supplier_'s constructor. @method augment @param {Function|Object} receiver Object or function to be augmented. @param {Function} supplier Function that supplies the prototype properties with which to augment the _receiver_. @param {Boolean} [overwrite=false] If `true`, properties already on the receiver will be overwritten if found on the supplier's prototype. @param {String[]} [whitelist] An array of property names. If specified, only the whitelisted prototype properties will be applied to the receiver, and all others will be ignored. @param {Array|any} [args] Argument or array of arguments to pass to the supplier's constructor when initializing. @return {Function} Augmented object. @for YUI **/ Y.augment = function (receiver, supplier, overwrite, whitelist, args) { var rProto = receiver.prototype, sequester = rProto && supplier, sProto = supplier.prototype, to = rProto || receiver, copy, newPrototype, replacements, sequestered, unsequester; args = args ? Y.Array(args) : []; if (sequester) { newPrototype = {}; replacements = {}; sequestered = {}; copy = function (value, key) { if (overwrite || !(key in rProto)) { if (toString.call(value) === '[object Function]') { sequestered[key] = value; newPrototype[key] = replacements[key] = function () { return unsequester(this, value, arguments); }; } else { newPrototype[key] = value; } } }; unsequester = function (instance, fn, fnArgs) { // Unsequester all sequestered functions. for (var key in sequestered) { if (hasOwn.call(sequestered, key) && instance[key] === replacements[key]) { instance[key] = sequestered[key]; } } // Execute the supplier constructor. supplier.apply(instance, args); // Finally, execute the original sequestered function. return fn.apply(instance, fnArgs); }; if (whitelist) { Y.Array.each(whitelist, function (name) { if (name in sProto) { copy(sProto[name], name); } }); } else { Y.Object.each(sProto, copy, null, true); } } Y.mix(to, newPrototype || sProto, overwrite, whitelist); if (!sequester) { supplier.apply(to, args); } return receiver; }; /** * Copies object properties from the supplier to the receiver. If the target has * the property, and the property is an object, the target object will be * augmented with the supplier's value. * * @method aggregate * @param {Object} receiver Object to receive the augmentation. * @param {Object} supplier Object that supplies the properties with which to * augment the receiver. * @param {Boolean} [overwrite=false] If `true`, properties already on the receiver * will be overwritten if found on the supplier. * @param {String[]} [whitelist] Whitelist. If supplied, only properties in this * list will be applied to the receiver. * @return {Object} Augmented object. */ Y.aggregate = function(r, s, ov, wl) { return Y.mix(r, s, ov, wl, 0, true); }; /** * Utility to set up the prototype, constructor and superclass properties to * support an inheritance strategy that can chain constructors and methods. * Static members will not be inherited. * * @method extend * @param {function} r the object to modify. * @param {function} s the object to inherit. * @param {object} px prototype properties to add/override. * @param {object} sx static properties to add/override. * @return {object} the extended object. */ Y.extend = function(r, s, px, sx) { if (!s || !r) { Y.error('extend failed, verify dependencies'); } var sp = s.prototype, rp = Y.Object(sp); r.prototype = rp; rp.constructor = r; r.superclass = sp; // assign constructor property if (s != Object && sp.constructor == OP.constructor) { sp.constructor = s; } // add prototype overrides if (px) { Y.mix(rp, px, true); } // add object overrides if (sx) { Y.mix(r, sx, true); } return r; }; /** * Executes the supplied function for each item in * a collection. Supports arrays, objects, and * NodeLists * @method each * @param {object} o the object to iterate. * @param {function} f the function to execute. This function * receives the value, key, and object as parameters. * @param {object} c the execution context for the function. * @param {boolean} proto if true, prototype properties are * iterated on objects. * @return {YUI} the YUI instance. */ Y.each = function(o, f, c, proto) { return dispatch(o, f, c, proto, 'each'); }; /** * Executes the supplied function for each item in * a collection. The operation stops if the function * returns true. Supports arrays, objects, and * NodeLists. * @method some * @param {object} o the object to iterate. * @param {function} f the function to execute. This function * receives the value, key, and object as parameters. * @param {object} c the execution context for the function. * @param {boolean} proto if true, prototype properties are * iterated on objects. * @return {boolean} true if the function ever returns true, * false otherwise. */ Y.some = function(o, f, c, proto) { return dispatch(o, f, c, proto, 'some'); }; /** * Deep object/array copy. Function clones are actually * wrappers around the original function. * Array-like objects are treated as arrays. * Primitives are returned untouched. Optionally, a * function can be provided to handle other data types, * filter keys, validate values, etc. * * NOTE: Cloning a non-trivial object is a reasonably heavy operation, due to * the need to recurrsively iterate down non-primitive properties. Clone * should be used only when a deep clone down to leaf level properties * is explicitly required. * * In many cases (for example, when trying to isolate objects used as * hashes for configuration properties), a shallow copy, using Y.merge is * normally sufficient. If more than one level of isolation is required, * Y.merge can be used selectively at each level which needs to be * isolated from the original without going all the way to leaf properties. * * @method clone * @param {object} o what to clone. * @param {boolean} safe if true, objects will not have prototype * items from the source. If false, they will. In this case, the * original is initially protected, but the clone is not completely * immune from changes to the source object prototype. Also, cloned * prototype items that are deleted from the clone will result * in the value of the source prototype being exposed. If operating * on a non-safe clone, items should be nulled out rather than deleted. * @param {function} f optional function to apply to each item in a * collection; it will be executed prior to applying the value to * the new object. Return false to prevent the copy. * @param {object} c optional execution context for f. * @param {object} owner Owner object passed when clone is iterating * an object. Used to set up context for cloned functions. * @param {object} cloned hash of previously cloned objects to avoid * multiple clones. * @return {Array|Object} the cloned object. */ Y.clone = function(o, safe, f, c, owner, cloned) { if (!L.isObject(o)) { return o; } // @todo cloning YUI instances doesn't currently work if (Y.instanceOf(o, YUI)) { return o; } var o2, marked = cloned || {}, stamp, yeach = Y.each; switch (L.type(o)) { case 'date': return new Date(o); case 'regexp': // if we do this we need to set the flags too // return new RegExp(o.source); return o; case 'function': // o2 = Y.bind(o, owner); // break; return o; case 'array': o2 = []; break; default: // #2528250 only one clone of a given object should be created. if (o[CLONE_MARKER]) { return marked[o[CLONE_MARKER]]; } stamp = Y.guid(); o2 = (safe) ? {} : Y.Object(o); o[CLONE_MARKER] = stamp; marked[stamp] = o; } // #2528250 don't try to clone element properties if (!o.addEventListener && !o.attachEvent) { yeach(o, function(v, k) { if ((k || k === 0) && (!f || (f.call(c || this, v, k, this, o) !== false))) { if (k !== CLONE_MARKER) { if (k == 'prototype') { // skip the prototype // } else if (o[k] === o) { // this[k] = this; } else { this[k] = Y.clone(v, safe, f, c, owner || o, marked); } } } }, o2); } if (!cloned) { Y.Object.each(marked, function(v, k) { if (v[CLONE_MARKER]) { try { delete v[CLONE_MARKER]; } catch (e) { v[CLONE_MARKER] = null; } } }, this); marked = null; } return o2; }; /** * Returns a function that will execute the supplied function in the * supplied object's context, optionally adding any additional * supplied parameters to the beginning of the arguments collection the * supplied to the function. * * @method bind * @param {Function|String} f the function to bind, or a function name * to execute on the context object. * @param {object} c the execution context. * @param {any} args* 0..n arguments to include before the arguments the * function is executed with. * @return {function} the wrapped function. */ Y.bind = function(f, c) { var xargs = arguments.length > 2 ? Y.Array(arguments, 2, true) : null; return function() { var fn = L.isString(f) ? c[f] : f, args = (xargs) ? xargs.concat(Y.Array(arguments, 0, true)) : arguments; return fn.apply(c || fn, args); }; }; /** * Returns a function that will execute the supplied function in the * supplied object's context, optionally adding any additional * supplied parameters to the end of the arguments the function * is executed with. * * @method rbind * @param {Function|String} f the function to bind, or a function name * to execute on the context object. * @param {object} c the execution context. * @param {any} args* 0..n arguments to append to the end of * arguments collection supplied to the function. * @return {function} the wrapped function. */ Y.rbind = function(f, c) { var xargs = arguments.length > 2 ? Y.Array(arguments, 2, true) : null; return function() { var fn = L.isString(f) ? c[f] : f, args = (xargs) ? Y.Array(arguments, 0, true).concat(xargs) : arguments; return fn.apply(c || fn, args); }; }; }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('features', function (Y, NAME) { var feature_tests = {}; /** Contains the core of YUI's feature test architecture. @module features */ /** * Feature detection * @class Features * @static */ Y.mix(Y.namespace('Features'), { /** * Object hash of all registered feature tests * @property tests * @type Object */ tests: feature_tests, /** * Add a test to the system * * ``` * Y.Features.add("load", "1", {}); * ``` * * @method add * @param {String} cat The category, right now only 'load' is supported * @param {String} name The number sequence of the test, how it's reported in the URL or config: 1, 2, 3 * @param {Object} o Object containing test properties * @param {String} o.name The name of the test * @param {Function} o.test The test function to execute, the only argument to the function is the `Y` instance * @param {String} o.trigger The module that triggers this test. */ add: function(cat, name, o) { feature_tests[cat] = feature_tests[cat] || {}; feature_tests[cat][name] = o; }, /** * Execute all tests of a given category and return the serialized results * * ``` * caps=1:1;2:1;3:0 * ``` * @method all * @param {String} cat The category to execute * @param {Array} args The arguments to pass to the test function * @return {String} A semi-colon separated string of tests and their success/failure: 1:1;2:1;3:0 */ all: function(cat, args) { var cat_o = feature_tests[cat], // results = {}; result = []; if (cat_o) { Y.Object.each(cat_o, function(v, k) { result.push(k + ':' + (Y.Features.test(cat, k, args) ? 1 : 0)); }); } return (result.length) ? result.join(';') : ''; }, /** * Run a sepecific test and return a Boolean response. * * ``` * Y.Features.test("load", "1"); * ``` * * @method test * @param {String} cat The category of the test to run * @param {String} name The name of the test to run * @param {Array} args The arguments to pass to the test function * @return {Boolean} True or false if the test passed/failed. */ test: function(cat, name, args) { args = args || []; var result, ua, test, cat_o = feature_tests[cat], feature = cat_o && cat_o[name]; if (!feature) { } else { result = feature.result; if (Y.Lang.isUndefined(result)) { ua = feature.ua; if (ua) { result = (Y.UA[ua]); } test = feature.test; if (test && ((!ua) || result)) { result = test.apply(Y, args); } feature.result = result; } } return result; } }); // Y.Features.add("load", "1", {}); // Y.Features.test("load", "1"); // caps=1:1;2:0;3:1; /* This file is auto-generated by src/loader/scripts/meta_join.js */ var add = Y.Features.add; // app-transitions-native add('load', '0', { "name": "app-transitions-native", "test": function (Y) { var doc = Y.config.doc, node = doc ? doc.documentElement : null; if (node && node.style) { return ('MozTransition' in node.style || 'WebkitTransition' in node.style); } return false; }, "trigger": "app-transitions" }); // autocomplete-list-keys add('load', '1', { "name": "autocomplete-list-keys", "test": function (Y) { // Only add keyboard support to autocomplete-list if this doesn't appear to // be an iOS or Android-based mobile device. // // There's currently no feasible way to actually detect whether a device has // a hardware keyboard, so this sniff will have to do. It can easily be // overridden by manually loading the autocomplete-list-keys module. // // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari // doesn't fire the keyboard events used by AutoCompleteList, so there's // no point loading the -keys module even when a bluetooth keyboard may be // available. return !(Y.UA.ios || Y.UA.android); }, "trigger": "autocomplete-list" }); // dd-gestures add('load', '2', { "name": "dd-gestures", "test": function(Y) { return ((Y.config.win && ("ontouchstart" in Y.config.win)) && !(Y.UA.chrome && Y.UA.chrome < 6)); }, "trigger": "dd-drag" }); // dom-style-ie add('load', '3', { "name": "dom-style-ie", "test": function (Y) { var testFeature = Y.Features.test, addFeature = Y.Features.add, WINDOW = Y.config.win, DOCUMENT = Y.config.doc, DOCUMENT_ELEMENT = 'documentElement', ret = false; addFeature('style', 'computedStyle', { test: function() { return WINDOW && 'getComputedStyle' in WINDOW; } }); addFeature('style', 'opacity', { test: function() { return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style; } }); ret = (!testFeature('style', 'opacity') && !testFeature('style', 'computedStyle')); return ret; }, "trigger": "dom-style" }); // editor-para-ie add('load', '4', { "name": "editor-para-ie", "trigger": "editor-para", "ua": "ie", "when": "instead" }); // event-base-ie add('load', '5', { "name": "event-base-ie", "test": function(Y) { var imp = Y.config.doc && Y.config.doc.implementation; return (imp && (!imp.hasFeature('Events', '2.0'))); }, "trigger": "node-base" }); // graphics-canvas add('load', '6', { "name": "graphics-canvas", "test": function(Y) { var DOCUMENT = Y.config.doc, useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas", canvas = DOCUMENT && DOCUMENT.createElement("canvas"), svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d")); }, "trigger": "graphics" }); // graphics-canvas-default add('load', '7', { "name": "graphics-canvas-default", "test": function(Y) { var DOCUMENT = Y.config.doc, useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas", canvas = DOCUMENT && DOCUMENT.createElement("canvas"), svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d")); }, "trigger": "graphics" }); // graphics-svg add('load', '8', { "name": "graphics-svg", "test": function(Y) { var DOCUMENT = Y.config.doc, useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas", canvas = DOCUMENT && DOCUMENT.createElement("canvas"), svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); return svg && (useSVG || !canvas); }, "trigger": "graphics" }); // graphics-svg-default add('load', '9', { "name": "graphics-svg-default", "test": function(Y) { var DOCUMENT = Y.config.doc, useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas", canvas = DOCUMENT && DOCUMENT.createElement("canvas"), svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); return svg && (useSVG || !canvas); }, "trigger": "graphics" }); // graphics-vml add('load', '10', { "name": "graphics-vml", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); }, "trigger": "graphics" }); // graphics-vml-default add('load', '11', { "name": "graphics-vml-default", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); }, "trigger": "graphics" }); // history-hash-ie add('load', '12', { "name": "history-hash-ie", "test": function (Y) { var docMode = Y.config.doc && Y.config.doc.documentMode; return Y.UA.ie && (!('onhashchange' in Y.config.win) || !docMode || docMode < 8); }, "trigger": "history-hash" }); // io-nodejs add('load', '13', { "name": "io-nodejs", "trigger": "io-base", "ua": "nodejs" }); // scrollview-base-ie add('load', '14', { "name": "scrollview-base-ie", "trigger": "scrollview-base", "ua": "ie" }); // selector-css2 add('load', '15', { "name": "selector-css2", "test": function (Y) { var DOCUMENT = Y.config.doc, ret = DOCUMENT && !('querySelectorAll' in DOCUMENT); return ret; }, "trigger": "selector" }); // transition-timer add('load', '16', { "name": "transition-timer", "test": function (Y) { var DOCUMENT = Y.config.doc, node = (DOCUMENT) ? DOCUMENT.documentElement: null, ret = true; if (node && node.style) { ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style); } return ret; }, "trigger": "transition" }); // widget-base-ie add('load', '17', { "name": "widget-base-ie", "trigger": "widget-base", "ua": "ie" }); }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('dom-core', function (Y, NAME) { var NODE_TYPE = 'nodeType', OWNER_DOCUMENT = 'ownerDocument', DOCUMENT_ELEMENT = 'documentElement', DEFAULT_VIEW = 'defaultView', PARENT_WINDOW = 'parentWindow', TAG_NAME = 'tagName', PARENT_NODE = 'parentNode', PREVIOUS_SIBLING = 'previousSibling', NEXT_SIBLING = 'nextSibling', CONTAINS = 'contains', COMPARE_DOCUMENT_POSITION = 'compareDocumentPosition', EMPTY_ARRAY = [], // IE < 8 throws on node.contains(textNode) supportsContainsTextNode = (function() { var node = Y.config.doc.createElement('div'), textNode = node.appendChild(Y.config.doc.createTextNode('')), result = false; try { result = node.contains(textNode); } catch(e) {} return result; })(), /** * The DOM utility provides a cross-browser abtraction layer * normalizing DOM tasks, and adds extra helper functionality * for other common tasks. * @module dom * @main dom * @submodule dom-base * @for DOM * */ /** * Provides DOM helper methods. * @class DOM * */ Y_DOM = { /** * Returns the HTMLElement with the given ID (Wrapper for document.getElementById). * @method byId * @param {String} id the id attribute * @param {Object} doc optional The document to search. Defaults to current document * @return {HTMLElement | null} The HTMLElement with the id, or null if none found. */ byId: function(id, doc) { // handle dupe IDs and IE name collision return Y_DOM.allById(id, doc)[0] || null; }, getId: function(node) { var id; // HTMLElement returned from FORM when INPUT name === "id" // IE < 8: HTMLCollection returned when INPUT id === "id" // via both getAttribute and form.id if (node.id && !node.id.tagName && !node.id.item) { id = node.id; } else if (node.attributes && node.attributes.id) { id = node.attributes.id.value; } return id; }, setId: function(node, id) { if (node.setAttribute) { node.setAttribute('id', id); } else { node.id = id; } }, /* * Finds the ancestor of the element. * @method ancestor * @param {HTMLElement} element The html element. * @param {Function} fn optional An optional boolean test to apply. * The optional function is passed the current DOM node being tested as its only argument. * If no function is given, the parentNode is returned. * @param {Boolean} testSelf optional Whether or not to include the element in the scan * @return {HTMLElement | null} The matching DOM node or null if none found. */ ancestor: function(element, fn, testSelf, stopFn) { var ret = null; if (testSelf) { ret = (!fn || fn(element)) ? element : null; } return ret || Y_DOM.elementByAxis(element, PARENT_NODE, fn, null, stopFn); }, /* * Finds the ancestors of the element. * @method ancestors * @param {HTMLElement} element The html element. * @param {Function} fn optional An optional boolean test to apply. * The optional function is passed the current DOM node being tested as its only argument. * If no function is given, all ancestors are returned. * @param {Boolean} testSelf optional Whether or not to include the element in the scan * @return {Array} An array containing all matching DOM nodes. */ ancestors: function(element, fn, testSelf, stopFn) { var ancestor = element, ret = []; while ((ancestor = Y_DOM.ancestor(ancestor, fn, testSelf, stopFn))) { testSelf = false; if (ancestor) { ret.unshift(ancestor); if (stopFn && stopFn(ancestor)) { return ret; } } } return ret; }, /** * Searches the element by the given axis for the first matching element. * @method elementByAxis * @param {HTMLElement} element The html element. * @param {String} axis The axis to search (parentNode, nextSibling, previousSibling). * @param {Function} fn optional An optional boolean test to apply. * @param {Boolean} all optional Whether all node types should be returned, or just element nodes. * The optional function is passed the current HTMLElement being tested as its only argument. * If no function is given, the first element is returned. * @return {HTMLElement | null} The matching element or null if none found. */ elementByAxis: function(element, axis, fn, all, stopAt) { while (element && (element = element[axis])) { // NOTE: assignment if ( (all || element[TAG_NAME]) && (!fn || fn(element)) ) { return element; } if (stopAt && stopAt(element)) { return null; } } return null; }, /** * Determines whether or not one HTMLElement is or contains another HTMLElement. * @method contains * @param {HTMLElement} element The containing html element. * @param {HTMLElement} needle The html element that may be contained. * @return {Boolean} Whether or not the element is or contains the needle. */ contains: function(element, needle) { var ret = false; if ( !needle || !element || !needle[NODE_TYPE] || !element[NODE_TYPE]) { ret = false; } else if (element[CONTAINS] && // IE < 8 throws on node.contains(textNode) so fall back to brute. // Falling back for other nodeTypes as well. (needle[NODE_TYPE] === 1 || supportsContainsTextNode)) { ret = element[CONTAINS](needle); } else if (element[COMPARE_DOCUMENT_POSITION]) { // Match contains behavior (node.contains(node) === true). // Needed for Firefox < 4. if (element === needle || !!(element[COMPARE_DOCUMENT_POSITION](needle) & 16)) { ret = true; } } else { ret = Y_DOM._bruteContains(element, needle); } return ret; }, /** * Determines whether or not the HTMLElement is part of the document. * @method inDoc * @param {HTMLElement} element The containing html element. * @param {HTMLElement} doc optional The document to check. * @return {Boolean} Whether or not the element is attached to the document. */ inDoc: function(element, doc) { var ret = false, rootNode; if (element && element.nodeType) { (doc) || (doc = element[OWNER_DOCUMENT]); rootNode = doc[DOCUMENT_ELEMENT]; // contains only works with HTML_ELEMENT if (rootNode && rootNode.contains && element.tagName) { ret = rootNode.contains(element); } else { ret = Y_DOM.contains(rootNode, element); } } return ret; }, allById: function(id, root) { root = root || Y.config.doc; var nodes = [], ret = [], i, node; if (root.querySelectorAll) { ret = root.querySelectorAll('[id="' + id + '"]'); } else if (root.all) { nodes = root.all(id); if (nodes) { // root.all may return HTMLElement or HTMLCollection. // some elements are also HTMLCollection (FORM, SELECT). if (nodes.nodeName) { if (nodes.id === id) { // avoid false positive on name ret.push(nodes); nodes = EMPTY_ARRAY; // done, no need to filter } else { // prep for filtering nodes = [nodes]; } } if (nodes.length) { // filter out matches on node.name // and element.id as reference to element with id === 'id' for (i = 0; node = nodes[i++];) { if (node.id === id || (node.attributes && node.attributes.id && node.attributes.id.value === id)) { ret.push(node); } } } } } else { ret = [Y_DOM._getDoc(root).getElementById(id)]; } return ret; }, isWindow: function(obj) { return !!(obj && obj.alert && obj.document); }, _removeChildNodes: function(node) { while (node.firstChild) { node.removeChild(node.firstChild); } }, siblings: function(node, fn) { var nodes = [], sibling = node; while ((sibling = sibling[PREVIOUS_SIBLING])) { if (sibling[TAG_NAME] && (!fn || fn(sibling))) { nodes.unshift(sibling); } } sibling = node; while ((sibling = sibling[NEXT_SIBLING])) { if (sibling[TAG_NAME] && (!fn || fn(sibling))) { nodes.push(sibling); } } return nodes; }, /** * Brute force version of contains. * Used for browsers without contains support for non-HTMLElement Nodes (textNodes, etc). * @method _bruteContains * @private * @param {HTMLElement} element The containing html element. * @param {HTMLElement} needle The html element that may be contained. * @return {Boolean} Whether or not the element is or contains the needle. */ _bruteContains: function(element, needle) { while (needle) { if (element === needle) { return true; } needle = needle.parentNode; } return false; }, // TODO: move to Lang? /** * Memoizes dynamic regular expressions to boost runtime performance. * @method _getRegExp * @private * @param {String} str The string to convert to a regular expression. * @param {String} flags optional An optinal string of flags. * @return {RegExp} An instance of RegExp */ _getRegExp: function(str, flags) { flags = flags || ''; Y_DOM._regexCache = Y_DOM._regexCache || {}; if (!Y_DOM._regexCache[str + flags]) { Y_DOM._regexCache[str + flags] = new RegExp(str, flags); } return Y_DOM._regexCache[str + flags]; }, // TODO: make getDoc/Win true privates? /** * returns the appropriate document. * @method _getDoc * @private * @param {HTMLElement} element optional Target element. * @return {Object} The document for the given element or the default document. */ _getDoc: function(element) { var doc = Y.config.doc; if (element) { doc = (element[NODE_TYPE] === 9) ? element : // element === document element[OWNER_DOCUMENT] || // element === DOM node element.document || // element === window Y.config.doc; // default } return doc; }, /** * returns the appropriate window. * @method _getWin * @private * @param {HTMLElement} element optional Target element. * @return {Object} The window for the given element or the default window. */ _getWin: function(element) { var doc = Y_DOM._getDoc(element); return doc[DEFAULT_VIEW] || doc[PARENT_WINDOW] || Y.config.win; }, _batch: function(nodes, fn, arg1, arg2, arg3, etc) { fn = (typeof fn === 'string') ? Y_DOM[fn] : fn; var result, i = 0, node, ret; if (fn && nodes) { while ((node = nodes[i++])) { result = result = fn.call(Y_DOM, node, arg1, arg2, arg3, etc); if (typeof result !== 'undefined') { (ret) || (ret = []); ret.push(result); } } } return (typeof ret !== 'undefined') ? ret : nodes; }, generateID: function(el) { var id = el.id; if (!id) { id = Y.stamp(el); el.id = id; } return id; } }; Y.DOM = Y_DOM; }, '@VERSION@', {"requires": ["oop", "features"]}); YUI.add('dom-base', function (Y, NAME) { /** * @for DOM * @module dom */ var documentElement = Y.config.doc.documentElement, Y_DOM = Y.DOM, TAG_NAME = 'tagName', OWNER_DOCUMENT = 'ownerDocument', EMPTY_STRING = '', addFeature = Y.Features.add, testFeature = Y.Features.test; Y.mix(Y_DOM, { /** * Returns the text content of the HTMLElement. * @method getText * @param {HTMLElement} element The html element. * @return {String} The text content of the element (includes text of any descending elements). */ getText: (documentElement.textContent !== undefined) ? function(element) { var ret = ''; if (element) { ret = element.textContent; } return ret || ''; } : function(element) { var ret = ''; if (element) { ret = element.innerText || element.nodeValue; // might be a textNode } return ret || ''; }, /** * Sets the text content of the HTMLElement. * @method setText * @param {HTMLElement} element The html element. * @param {String} content The content to add. */ setText: (documentElement.textContent !== undefined) ? function(element, content) { if (element) { element.textContent = content; } } : function(element, content) { if ('innerText' in element) { element.innerText = content; } else if ('nodeValue' in element) { element.nodeValue = content; } }, CUSTOM_ATTRIBUTES: (!documentElement.hasAttribute) ? { // IE < 8 'for': 'htmlFor', 'class': 'className' } : { // w3c 'htmlFor': 'for', 'className': 'class' }, /** * Provides a normalized attribute interface. * @method setAttribute * @param {HTMLElement} el The target element for the attribute. * @param {String} attr The attribute to set. * @param {String} val The value of the attribute. */ setAttribute: function(el, attr, val, ieAttr) { if (el && attr && el.setAttribute) { attr = Y_DOM.CUSTOM_ATTRIBUTES[attr] || attr; el.setAttribute(attr, val, ieAttr); } }, /** * Provides a normalized attribute interface. * @method getAttribute * @param {HTMLElement} el The target element for the attribute. * @param {String} attr The attribute to get. * @return {String} The current value of the attribute. */ getAttribute: function(el, attr, ieAttr) { ieAttr = (ieAttr !== undefined) ? ieAttr : 2; var ret = ''; if (el && attr && el.getAttribute) { attr = Y_DOM.CUSTOM_ATTRIBUTES[attr] || attr; ret = el.getAttribute(attr, ieAttr); if (ret === null) { ret = ''; // per DOM spec } } return ret; }, VALUE_SETTERS: {}, VALUE_GETTERS: {}, getValue: function(node) { var ret = '', // TODO: return null? getter; if (node && node[TAG_NAME]) { getter = Y_DOM.VALUE_GETTERS[node[TAG_NAME].toLowerCase()]; if (getter) { ret = getter(node); } else { ret = node.value; } } // workaround for IE8 JSON stringify bug // which converts empty string values to null if (ret === EMPTY_STRING) { ret = EMPTY_STRING; // for real } return (typeof ret === 'string') ? ret : ''; }, setValue: function(node, val) { var setter; if (node && node[TAG_NAME]) { setter = Y_DOM.VALUE_SETTERS[node[TAG_NAME].toLowerCase()]; if (setter) { setter(node, val); } else { node.value = val; } } }, creators: {} }); addFeature('value-set', 'select', { test: function() { var node = Y.config.doc.createElement('select'); node.innerHTML = '<option>1</option><option>2</option>'; node.value = '2'; return (node.value && node.value === '2'); } }); if (!testFeature('value-set', 'select')) { Y_DOM.VALUE_SETTERS.select = function(node, val) { for (var i = 0, options = node.getElementsByTagName('option'), option; option = options[i++];) { if (Y_DOM.getValue(option) === val) { option.selected = true; //Y_DOM.setAttribute(option, 'selected', 'selected'); break; } } }; } Y.mix(Y_DOM.VALUE_GETTERS, { button: function(node) { return (node.attributes && node.attributes.value) ? node.attributes.value.value : ''; } }); Y.mix(Y_DOM.VALUE_SETTERS, { // IE: node.value changes the button text, which should be handled via innerHTML button: function(node, val) { var attr = node.attributes.value; if (!attr) { attr = node[OWNER_DOCUMENT].createAttribute('value'); node.setAttributeNode(attr); } attr.value = val; } }); Y.mix(Y_DOM.VALUE_GETTERS, { option: function(node) { var attrs = node.attributes; return (attrs.value && attrs.value.specified) ? node.value : node.text; }, select: function(node) { var val = node.value, options = node.options; if (options && options.length) { // TODO: implement multipe select if (node.multiple) { } else if (node.selectedIndex > -1) { val = Y_DOM.getValue(options[node.selectedIndex]); } } return val; } }); var addClass, hasClass, removeClass; Y.mix(Y.DOM, { /** * Determines whether a DOM element has the given className. * @method hasClass * @for DOM * @param {HTMLElement} element The DOM element. * @param {String} className the class name to search for * @return {Boolean} Whether or not the element has the given class. */ hasClass: function(node, className) { var re = Y.DOM._getRegExp('(?:^|\\s+)' + className + '(?:\\s+|$)'); return re.test(node.className); }, /** * Adds a class name to a given DOM element. * @method addClass * @for DOM * @param {HTMLElement} element The DOM element. * @param {String} className the class name to add to the class attribute */ addClass: function(node, className) { if (!Y.DOM.hasClass(node, className)) { // skip if already present node.className = Y.Lang.trim([node.className, className].join(' ')); } }, /** * Removes a class name from a given element. * @method removeClass * @for DOM * @param {HTMLElement} element The DOM element. * @param {String} className the class name to remove from the class attribute */ removeClass: function(node, className) { if (className && hasClass(node, className)) { node.className = Y.Lang.trim(node.className.replace(Y.DOM._getRegExp('(?:^|\\s+)' + className + '(?:\\s+|$)'), ' ')); if ( hasClass(node, className) ) { // in case of multiple adjacent removeClass(node, className); } } }, /** * Replace a class with another class for a given element. * If no oldClassName is present, the newClassName is simply added. * @method replaceClass * @for DOM * @param {HTMLElement} element The DOM element * @param {String} oldClassName the class name to be replaced * @param {String} newClassName the class name that will be replacing the old class name */ replaceClass: function(node, oldC, newC) { removeClass(node, oldC); // remove first in case oldC === newC addClass(node, newC); }, /** * If the className exists on the node it is removed, if it doesn't exist it is added. * @method toggleClass * @for DOM * @param {HTMLElement} element The DOM element * @param {String} className the class name to be toggled * @param {Boolean} addClass optional boolean to indicate whether class * should be added or removed regardless of current state */ toggleClass: function(node, className, force) { var add = (force !== undefined) ? force : !(hasClass(node, className)); if (add) { addClass(node, className); } else { removeClass(node, className); } } }); hasClass = Y.DOM.hasClass; removeClass = Y.DOM.removeClass; addClass = Y.DOM.addClass; var re_tag = /<([a-z]+)/i, Y_DOM = Y.DOM, addFeature = Y.Features.add, testFeature = Y.Features.test, creators = {}, createFromDIV = function(html, tag) { var div = Y.config.doc.createElement('div'), ret = true; div.innerHTML = html; if (!div.firstChild || div.firstChild.tagName !== tag.toUpperCase()) { ret = false; } return ret; }, re_tbody = /(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*<tbody/, TABLE_OPEN = '<table>', TABLE_CLOSE = '</table>'; Y.mix(Y.DOM, { _fragClones: {}, _create: function(html, doc, tag) { tag = tag || 'div'; var frag = Y_DOM._fragClones[tag]; if (frag) { frag = frag.cloneNode(false); } else { frag = Y_DOM._fragClones[tag] = doc.createElement(tag); } frag.innerHTML = html; return frag; }, _children: function(node, tag) { var i = 0, children = node.children, childNodes, hasComments, child; if (children && children.tags) { // use tags filter when possible if (tag) { children = node.children.tags(tag); } else { // IE leaks comments into children hasComments = children.tags('!').length; } } if (!children || (!children.tags && tag) || hasComments) { childNodes = children || node.childNodes; children = []; while ((child = childNodes[i++])) { if (child.nodeType === 1) { if (!tag || tag === child.tagName) { children.push(child); } } } } return children || []; }, /** * Creates a new dom node using the provided markup string. * @method create * @param {String} html The markup used to create the element * @param {HTMLDocument} doc An optional document context * @return {HTMLElement|DocumentFragment} returns a single HTMLElement * when creating one node, and a documentFragment when creating * multiple nodes. */ create: function(html, doc) { if (typeof html === 'string') { html = Y.Lang.trim(html); // match IE which trims whitespace from innerHTML } doc = doc || Y.config.doc; var m = re_tag.exec(html), create = Y_DOM._create, custom = creators, ret = null, creator, tag, nodes; if (html != undefined) { // not undefined or null if (m && m[1]) { creator = custom[m[1].toLowerCase()]; if (typeof creator === 'function') { create = creator; } else { tag = creator; } } nodes = create(html, doc, tag).childNodes; if (nodes.length === 1) { // return single node, breaking parentNode ref from "fragment" ret = nodes[0].parentNode.removeChild(nodes[0]); } else if (nodes[0] && nodes[0].className === 'yui3-big-dummy') { // using dummy node to preserve some attributes (e.g. OPTION not selected) if (nodes.length === 2) { ret = nodes[0].nextSibling; } else { nodes[0].parentNode.removeChild(nodes[0]); ret = Y_DOM._nl2frag(nodes, doc); } } else { // return multiple nodes as a fragment ret = Y_DOM._nl2frag(nodes, doc); } } return ret; }, _nl2frag: function(nodes, doc) { var ret = null, i, len; if (nodes && (nodes.push || nodes.item) && nodes[0]) { doc = doc || nodes[0].ownerDocument; ret = doc.createDocumentFragment(); if (nodes.item) { // convert live list to static array nodes = Y.Array(nodes, 0, true); } for (i = 0, len = nodes.length; i < len; i++) { ret.appendChild(nodes[i]); } } // else inline with log for minification return ret; }, /** * Inserts content in a node at the given location * @method addHTML * @param {HTMLElement} node The node to insert into * @param {HTMLElement | Array | HTMLCollection} content The content to be inserted * @param {HTMLElement} where Where to insert the content * If no "where" is given, content is appended to the node * Possible values for "where" * <dl> * <dt>HTMLElement</dt> * <dd>The element to insert before</dd> * <dt>"replace"</dt> * <dd>Replaces the existing HTML</dd> * <dt>"before"</dt> * <dd>Inserts before the existing HTML</dd> * <dt>"before"</dt> * <dd>Inserts content before the node</dd> * <dt>"after"</dt> * <dd>Inserts content after the node</dd> * </dl> */ addHTML: function(node, content, where) { var nodeParent = node.parentNode, i = 0, item, ret = content, newNode; if (content != undefined) { // not null or undefined (maybe 0) if (content.nodeType) { // DOM node, just add it newNode = content; } else if (typeof content == 'string' || typeof content == 'number') { ret = newNode = Y_DOM.create(content); } else if (content[0] && content[0].nodeType) { // array or collection newNode = Y.config.doc.createDocumentFragment(); while ((item = content[i++])) { newNode.appendChild(item); // append to fragment for insertion } } } if (where) { if (newNode && where.parentNode) { // insert regardless of relationship to node where.parentNode.insertBefore(newNode, where); } else { switch (where) { case 'replace': while (node.firstChild) { node.removeChild(node.firstChild); } if (newNode) { // allow empty content to clear node node.appendChild(newNode); } break; case 'before': if (newNode) { nodeParent.insertBefore(newNode, node); } break; case 'after': if (newNode) { if (node.nextSibling) { // IE errors if refNode is null nodeParent.insertBefore(newNode, node.nextSibling); } else { nodeParent.appendChild(newNode); } } break; default: if (newNode) { node.appendChild(newNode); } } } } else if (newNode) { node.appendChild(newNode); } return ret; }, wrap: function(node, html) { var parent = (html && html.nodeType) ? html : Y.DOM.create(html), nodes = parent.getElementsByTagName('*'); if (nodes.length) { parent = nodes[nodes.length - 1]; } if (node.parentNode) { node.parentNode.replaceChild(parent, node); } parent.appendChild(node); }, unwrap: function(node) { var parent = node.parentNode, lastChild = parent.lastChild, next = node, grandparent; if (parent) { grandparent = parent.parentNode; if (grandparent) { node = parent.firstChild; while (node !== lastChild) { next = node.nextSibling; grandparent.insertBefore(node, parent); node = next; } grandparent.replaceChild(lastChild, parent); } else { parent.removeChild(node); } } } }); addFeature('innerhtml', 'table', { test: function() { var node = Y.config.doc.createElement('table'); try { node.innerHTML = '<tbody></tbody>'; } catch(e) { return false; } return (node.firstChild && node.firstChild.nodeName === 'TBODY'); } }); addFeature('innerhtml-div', 'tr', { test: function() { return createFromDIV('<tr></tr>', 'tr'); } }); addFeature('innerhtml-div', 'script', { test: function() { return createFromDIV('<script></script>', 'script'); } }); if (!testFeature('innerhtml', 'table')) { // TODO: thead/tfoot with nested tbody // IE adds TBODY when creating TABLE elements (which may share this impl) creators.tbody = function(html, doc) { var frag = Y_DOM.create(TABLE_OPEN + html + TABLE_CLOSE, doc), tb = Y.DOM._children(frag, 'tbody')[0]; if (frag.children.length > 1 && tb && !re_tbody.test(html)) { tb.parentNode.removeChild(tb); // strip extraneous tbody } return frag; }; } if (!testFeature('innerhtml-div', 'script')) { creators.script = function(html, doc) { var frag = doc.createElement('div'); frag.innerHTML = '-' + html; frag.removeChild(frag.firstChild); return frag; }; creators.link = creators.style = creators.script; } if (!testFeature('innerhtml-div', 'tr')) { Y.mix(creators, { option: function(html, doc) { return Y_DOM.create('<select><option class="yui3-big-dummy" selected></option>' + html + '</select>', doc); }, tr: function(html, doc) { return Y_DOM.create('<tbody>' + html + '</tbody>', doc); }, td: function(html, doc) { return Y_DOM.create('<tr>' + html + '</tr>', doc); }, col: function(html, doc) { return Y_DOM.create('<colgroup>' + html + '</colgroup>', doc); }, tbody: 'table' }); Y.mix(creators, { legend: 'fieldset', th: creators.td, thead: creators.tbody, tfoot: creators.tbody, caption: creators.tbody, colgroup: creators.tbody, optgroup: creators.option }); } Y_DOM.creators = creators; Y.mix(Y.DOM, { /** * Sets the width of the element to the given size, regardless * of box model, border, padding, etc. * @method setWidth * @param {HTMLElement} element The DOM element. * @param {String|Number} size The pixel height to size to */ setWidth: function(node, size) { Y.DOM._setSize(node, 'width', size); }, /** * Sets the height of the element to the given size, regardless * of box model, border, padding, etc. * @method setHeight * @param {HTMLElement} element The DOM element. * @param {String|Number} size The pixel height to size to */ setHeight: function(node, size) { Y.DOM._setSize(node, 'height', size); }, _setSize: function(node, prop, val) { val = (val > 0) ? val : 0; var size = 0; node.style[prop] = val + 'px'; size = (prop === 'height') ? node.offsetHeight : node.offsetWidth; if (size > val) { val = val - (size - val); if (val < 0) { val = 0; } node.style[prop] = val + 'px'; } } }); }, '@VERSION@', {"requires": ["dom-core"]}); YUI.add('dom-style', function (Y, NAME) { (function(Y) { /** * Add style management functionality to DOM. * @module dom * @submodule dom-style * @for DOM */ var DOCUMENT_ELEMENT = 'documentElement', DEFAULT_VIEW = 'defaultView', OWNER_DOCUMENT = 'ownerDocument', STYLE = 'style', FLOAT = 'float', CSS_FLOAT = 'cssFloat', STYLE_FLOAT = 'styleFloat', TRANSPARENT = 'transparent', GET_COMPUTED_STYLE = 'getComputedStyle', GET_BOUNDING_CLIENT_RECT = 'getBoundingClientRect', WINDOW = Y.config.win, DOCUMENT = Y.config.doc, UNDEFINED = undefined, Y_DOM = Y.DOM, TRANSFORM = 'transform', TRANSFORMORIGIN = 'transformOrigin', VENDOR_TRANSFORM = [ 'WebkitTransform', 'MozTransform', 'OTransform', 'msTransform' ], re_color = /color$/i, re_unit = /width|height|top|left|right|bottom|margin|padding/i; Y.Array.each(VENDOR_TRANSFORM, function(val) { if (val in DOCUMENT[DOCUMENT_ELEMENT].style) { TRANSFORM = val; TRANSFORMORIGIN = val + "Origin"; } }); Y.mix(Y_DOM, { DEFAULT_UNIT: 'px', CUSTOM_STYLES: { }, /** * Sets a style property for a given element. * @method setStyle * @param {HTMLElement} An HTMLElement to apply the style to. * @param {String} att The style property to set. * @param {String|Number} val The value. */ setStyle: function(node, att, val, style) { style = style || node.style; var CUSTOM_STYLES = Y_DOM.CUSTOM_STYLES; if (style) { if (val === null || val === '') { // normalize unsetting val = ''; } else if (!isNaN(new Number(val)) && re_unit.test(att)) { // number values may need a unit val += Y_DOM.DEFAULT_UNIT; } if (att in CUSTOM_STYLES) { if (CUSTOM_STYLES[att].set) { CUSTOM_STYLES[att].set(node, val, style); return; // NOTE: return } else if (typeof CUSTOM_STYLES[att] === 'string') { att = CUSTOM_STYLES[att]; } } else if (att === '') { // unset inline styles att = 'cssText'; val = ''; } style[att] = val; } }, /** * Returns the current style value for the given property. * @method getStyle * @param {HTMLElement} An HTMLElement to get the style from. * @param {String} att The style property to get. */ getStyle: function(node, att, style) { style = style || node.style; var CUSTOM_STYLES = Y_DOM.CUSTOM_STYLES, val = ''; if (style) { if (att in CUSTOM_STYLES) { if (CUSTOM_STYLES[att].get) { return CUSTOM_STYLES[att].get(node, att, style); // NOTE: return } else if (typeof CUSTOM_STYLES[att] === 'string') { att = CUSTOM_STYLES[att]; } } val = style[att]; if (val === '') { // TODO: is empty string sufficient? val = Y_DOM[GET_COMPUTED_STYLE](node, att); } } return val; }, /** * Sets multiple style properties. * @method setStyles * @param {HTMLElement} node An HTMLElement to apply the styles to. * @param {Object} hash An object literal of property:value pairs. */ setStyles: function(node, hash) { var style = node.style; Y.each(hash, function(v, n) { Y_DOM.setStyle(node, n, v, style); }, Y_DOM); }, /** * Returns the computed style for the given node. * @method getComputedStyle * @param {HTMLElement} An HTMLElement to get the style from. * @param {String} att The style property to get. * @return {String} The computed value of the style property. */ getComputedStyle: function(node, att) { var val = '', doc = node[OWNER_DOCUMENT], computed; if (node[STYLE] && doc[DEFAULT_VIEW] && doc[DEFAULT_VIEW][GET_COMPUTED_STYLE]) { computed = doc[DEFAULT_VIEW][GET_COMPUTED_STYLE](node, null); if (computed) { // FF may be null in some cases (ticket #2530548) val = computed[att]; } } return val; } }); // normalize reserved word float alternatives ("cssFloat" or "styleFloat") if (DOCUMENT[DOCUMENT_ELEMENT][STYLE][CSS_FLOAT] !== UNDEFINED) { Y_DOM.CUSTOM_STYLES[FLOAT] = CSS_FLOAT; } else if (DOCUMENT[DOCUMENT_ELEMENT][STYLE][STYLE_FLOAT] !== UNDEFINED) { Y_DOM.CUSTOM_STYLES[FLOAT] = STYLE_FLOAT; } // fix opera computedStyle default color unit (convert to rgb) if (Y.UA.opera) { Y_DOM[GET_COMPUTED_STYLE] = function(node, att) { var view = node[OWNER_DOCUMENT][DEFAULT_VIEW], val = view[GET_COMPUTED_STYLE](node, '')[att]; if (re_color.test(att)) { val = Y.Color.toRGB(val); } return val; }; } // safari converts transparent to rgba(), others use "transparent" if (Y.UA.webkit) { Y_DOM[GET_COMPUTED_STYLE] = function(node, att) { var view = node[OWNER_DOCUMENT][DEFAULT_VIEW], val = view[GET_COMPUTED_STYLE](node, '')[att]; if (val === 'rgba(0, 0, 0, 0)') { val = TRANSPARENT; } return val; }; } Y.DOM._getAttrOffset = function(node, attr) { var val = Y.DOM[GET_COMPUTED_STYLE](node, attr), offsetParent = node.offsetParent, position, parentOffset, offset; if (val === 'auto') { position = Y.DOM.getStyle(node, 'position'); if (position === 'static' || position === 'relative') { val = 0; } else if (offsetParent && offsetParent[GET_BOUNDING_CLIENT_RECT]) { parentOffset = offsetParent[GET_BOUNDING_CLIENT_RECT]()[attr]; offset = node[GET_BOUNDING_CLIENT_RECT]()[attr]; if (attr === 'left' || attr === 'top') { val = offset - parentOffset; } else { val = parentOffset - node[GET_BOUNDING_CLIENT_RECT]()[attr]; } } } return val; }; Y.DOM._getOffset = function(node) { var pos, xy = null; if (node) { pos = Y_DOM.getStyle(node, 'position'); xy = [ parseInt(Y_DOM[GET_COMPUTED_STYLE](node, 'left'), 10), parseInt(Y_DOM[GET_COMPUTED_STYLE](node, 'top'), 10) ]; if ( isNaN(xy[0]) ) { // in case of 'auto' xy[0] = parseInt(Y_DOM.getStyle(node, 'left'), 10); // try inline if ( isNaN(xy[0]) ) { // default to offset value xy[0] = (pos === 'relative') ? 0 : node.offsetLeft || 0; } } if ( isNaN(xy[1]) ) { // in case of 'auto' xy[1] = parseInt(Y_DOM.getStyle(node, 'top'), 10); // try inline if ( isNaN(xy[1]) ) { // default to offset value xy[1] = (pos === 'relative') ? 0 : node.offsetTop || 0; } } } return xy; }; Y_DOM.CUSTOM_STYLES.transform = { set: function(node, val, style) { style[TRANSFORM] = val; }, get: function(node, style) { return Y_DOM[GET_COMPUTED_STYLE](node, TRANSFORM); } }; Y_DOM.CUSTOM_STYLES.transformOrigin = { set: function(node, val, style) { style[TRANSFORMORIGIN] = val; }, get: function(node, style) { return Y_DOM[GET_COMPUTED_STYLE](node, TRANSFORMORIGIN); } }; })(Y); (function(Y) { var PARSE_INT = parseInt, RE = RegExp; Y.Color = { KEYWORDS: { black: '000', silver: 'c0c0c0', gray: '808080', white: 'fff', maroon: '800000', red: 'f00', purple: '800080', fuchsia: 'f0f', green: '008000', lime: '0f0', olive: '808000', yellow: 'ff0', navy: '000080', blue: '00f', teal: '008080', aqua: '0ff' }, re_RGB: /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i, re_hex: /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i, re_hex3: /([0-9A-F])/gi, toRGB: function(val) { if (!Y.Color.re_RGB.test(val)) { val = Y.Color.toHex(val); } if(Y.Color.re_hex.exec(val)) { val = 'rgb(' + [ PARSE_INT(RE.$1, 16), PARSE_INT(RE.$2, 16), PARSE_INT(RE.$3, 16) ].join(', ') + ')'; } return val; }, toHex: function(val) { val = Y.Color.KEYWORDS[val] || val; if (Y.Color.re_RGB.exec(val)) { val = [ Number(RE.$1).toString(16), Number(RE.$2).toString(16), Number(RE.$3).toString(16) ]; for (var i = 0; i < val.length; i++) { if (val[i].length < 2) { val[i] = '0' + val[i]; } } val = val.join(''); } if (val.length < 6) { val = val.replace(Y.Color.re_hex3, '$1$1'); } if (val !== 'transparent' && val.indexOf('#') < 0) { val = '#' + val; } return val.toUpperCase(); } }; })(Y); }, '@VERSION@', {"requires": ["dom-base"]}); YUI.add('dom-style-ie', function (Y, NAME) { (function(Y) { var HAS_LAYOUT = 'hasLayout', PX = 'px', FILTER = 'filter', FILTERS = 'filters', OPACITY = 'opacity', AUTO = 'auto', BORDER_WIDTH = 'borderWidth', BORDER_TOP_WIDTH = 'borderTopWidth', BORDER_RIGHT_WIDTH = 'borderRightWidth', BORDER_BOTTOM_WIDTH = 'borderBottomWidth', BORDER_LEFT_WIDTH = 'borderLeftWidth', WIDTH = 'width', HEIGHT = 'height', TRANSPARENT = 'transparent', VISIBLE = 'visible', GET_COMPUTED_STYLE = 'getComputedStyle', UNDEFINED = undefined, documentElement = Y.config.doc.documentElement, testFeature = Y.Features.test, addFeature = Y.Features.add, // TODO: unit-less lineHeight (e.g. 1.22) re_unit = /^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i, isIE8 = (Y.UA.ie >= 8), _getStyleObj = function(node) { return node.currentStyle || node.style; }, ComputedStyle = { CUSTOM_STYLES: {}, get: function(el, property) { var value = '', current; if (el) { current = _getStyleObj(el)[property]; if (property === OPACITY && Y.DOM.CUSTOM_STYLES[OPACITY]) { value = Y.DOM.CUSTOM_STYLES[OPACITY].get(el); } else if (!current || (current.indexOf && current.indexOf(PX) > -1)) { // no need to convert value = current; } else if (Y.DOM.IE.COMPUTED[property]) { // use compute function value = Y.DOM.IE.COMPUTED[property](el, property); } else if (re_unit.test(current)) { // convert to pixel value = ComputedStyle.getPixel(el, property) + PX; } else { value = current; } } return value; }, sizeOffsets: { width: ['Left', 'Right'], height: ['Top', 'Bottom'], top: ['Top'], bottom: ['Bottom'] }, getOffset: function(el, prop) { var current = _getStyleObj(el)[prop], // value of "width", "top", etc. capped = prop.charAt(0).toUpperCase() + prop.substr(1), // "Width", "Top", etc. offset = 'offset' + capped, // "offsetWidth", "offsetTop", etc. pixel = 'pixel' + capped, // "pixelWidth", "pixelTop", etc. sizeOffsets = ComputedStyle.sizeOffsets[prop], mode = el.ownerDocument.compatMode, value = ''; // IE pixelWidth incorrect for percent // manually compute by subtracting padding and border from offset size // NOTE: clientWidth/Height (size minus border) is 0 when current === AUTO so offsetHeight is used // reverting to auto from auto causes position stacking issues (old impl) if (current === AUTO || current.indexOf('%') > -1) { value = el['offset' + capped]; if (mode !== 'BackCompat') { if (sizeOffsets[0]) { value -= ComputedStyle.getPixel(el, 'padding' + sizeOffsets[0]); value -= ComputedStyle.getBorderWidth(el, 'border' + sizeOffsets[0] + 'Width', 1); } if (sizeOffsets[1]) { value -= ComputedStyle.getPixel(el, 'padding' + sizeOffsets[1]); value -= ComputedStyle.getBorderWidth(el, 'border' + sizeOffsets[1] + 'Width', 1); } } } else { // use style.pixelWidth, etc. to convert to pixels // need to map style.width to currentStyle (no currentStyle.pixelWidth) if (!el.style[pixel] && !el.style[prop]) { el.style[prop] = current; } value = el.style[pixel]; } return value + PX; }, borderMap: { thin: (isIE8) ? '1px' : '2px', medium: (isIE8) ? '3px': '4px', thick: (isIE8) ? '5px' : '6px' }, getBorderWidth: function(el, property, omitUnit) { var unit = omitUnit ? '' : PX, current = el.currentStyle[property]; if (current.indexOf(PX) < 0) { // look up keywords if a border exists if (ComputedStyle.borderMap[current] && el.currentStyle.borderStyle !== 'none') { current = ComputedStyle.borderMap[current]; } else { // otherwise no border (default is "medium") current = 0; } } return (omitUnit) ? parseFloat(current) : current; }, getPixel: function(node, att) { // use pixelRight to convert to px var val = null, style = _getStyleObj(node), styleRight = style.right, current = style[att]; node.style.right = current; val = node.style.pixelRight; node.style.right = styleRight; // revert return val; }, getMargin: function(node, att) { var val, style = _getStyleObj(node); if (style[att] == AUTO) { val = 0; } else { val = ComputedStyle.getPixel(node, att); } return val + PX; }, getVisibility: function(node, att) { var current; while ( (current = node.currentStyle) && current[att] == 'inherit') { // NOTE: assignment in test node = node.parentNode; } return (current) ? current[att] : VISIBLE; }, getColor: function(node, att) { var current = _getStyleObj(node)[att]; if (!current || current === TRANSPARENT) { Y.DOM.elementByAxis(node, 'parentNode', null, function(parent) { current = _getStyleObj(parent)[att]; if (current && current !== TRANSPARENT) { node = parent; return true; } }); } return Y.Color.toRGB(current); }, getBorderColor: function(node, att) { var current = _getStyleObj(node), val = current[att] || current.color; return Y.Color.toRGB(Y.Color.toHex(val)); } }, //fontSize: getPixelFont, IEComputed = {}; addFeature('style', 'computedStyle', { test: function() { return 'getComputedStyle' in Y.config.win; } }); addFeature('style', 'opacity', { test: function() { return 'opacity' in documentElement.style; } }); addFeature('style', 'filter', { test: function() { return 'filters' in documentElement; } }); // use alpha filter for IE opacity if (!testFeature('style', 'opacity') && testFeature('style', 'filter')) { Y.DOM.CUSTOM_STYLES[OPACITY] = { get: function(node) { var val = 100; try { // will error if no DXImageTransform val = node[FILTERS]['DXImageTransform.Microsoft.Alpha'][OPACITY]; } catch(e) { try { // make sure its in the document val = node[FILTERS]('alpha')[OPACITY]; } catch(err) { } } return val / 100; }, set: function(node, val, style) { var current, styleObj = _getStyleObj(node), currentFilter = styleObj[FILTER]; style = style || node.style; if (val === '') { // normalize inline style behavior current = (OPACITY in styleObj) ? styleObj[OPACITY] : 1; // revert to original opacity val = current; } if (typeof currentFilter == 'string') { // in case not appended style[FILTER] = currentFilter.replace(/alpha([^)]*\))/gi, '') + ((val < 1) ? 'alpha(' + OPACITY + '=' + val * 100 + ')' : ''); if (!style[FILTER]) { style.removeAttribute(FILTER); } if (!styleObj[HAS_LAYOUT]) { style.zoom = 1; // needs layout } } } }; } try { Y.config.doc.createElement('div').style.height = '-1px'; } catch(e) { // IE throws error on invalid style set; trap common cases Y.DOM.CUSTOM_STYLES.height = { set: function(node, val, style) { var floatVal = parseFloat(val); if (floatVal >= 0 || val === 'auto' || val === '') { style.height = val; } else { } } }; Y.DOM.CUSTOM_STYLES.width = { set: function(node, val, style) { var floatVal = parseFloat(val); if (floatVal >= 0 || val === 'auto' || val === '') { style.width = val; } else { } } }; } if (!testFeature('style', 'computedStyle')) { // TODO: top, right, bottom, left IEComputed[WIDTH] = IEComputed[HEIGHT] = ComputedStyle.getOffset; IEComputed.color = IEComputed.backgroundColor = ComputedStyle.getColor; IEComputed[BORDER_WIDTH] = IEComputed[BORDER_TOP_WIDTH] = IEComputed[BORDER_RIGHT_WIDTH] = IEComputed[BORDER_BOTTOM_WIDTH] = IEComputed[BORDER_LEFT_WIDTH] = ComputedStyle.getBorderWidth; IEComputed.marginTop = IEComputed.marginRight = IEComputed.marginBottom = IEComputed.marginLeft = ComputedStyle.getMargin; IEComputed.visibility = ComputedStyle.getVisibility; IEComputed.borderColor = IEComputed.borderTopColor = IEComputed.borderRightColor = IEComputed.borderBottomColor = IEComputed.borderLeftColor = ComputedStyle.getBorderColor; Y.DOM[GET_COMPUTED_STYLE] = ComputedStyle.get; Y.namespace('DOM.IE'); Y.DOM.IE.COMPUTED = IEComputed; Y.DOM.IE.ComputedStyle = ComputedStyle; } })(Y); }, '@VERSION@', {"requires": ["dom-style"]}); YUI.add('dom-screen', function (Y, NAME) { (function(Y) { /** * Adds position and region management functionality to DOM. * @module dom * @submodule dom-screen * @for DOM */ var DOCUMENT_ELEMENT = 'documentElement', COMPAT_MODE = 'compatMode', POSITION = 'position', FIXED = 'fixed', RELATIVE = 'relative', LEFT = 'left', TOP = 'top', _BACK_COMPAT = 'BackCompat', MEDIUM = 'medium', BORDER_LEFT_WIDTH = 'borderLeftWidth', BORDER_TOP_WIDTH = 'borderTopWidth', GET_BOUNDING_CLIENT_RECT = 'getBoundingClientRect', GET_COMPUTED_STYLE = 'getComputedStyle', Y_DOM = Y.DOM, // TODO: how about thead/tbody/tfoot/tr? // TODO: does caption matter? RE_TABLE = /^t(?:able|d|h)$/i, SCROLL_NODE; if (Y.UA.ie) { if (Y.config.doc[COMPAT_MODE] !== 'BackCompat') { SCROLL_NODE = DOCUMENT_ELEMENT; } else { SCROLL_NODE = 'body'; } } Y.mix(Y_DOM, { /** * Returns the inner height of the viewport (exludes scrollbar). * @method winHeight * @return {Number} The current height of the viewport. */ winHeight: function(node) { var h = Y_DOM._getWinSize(node).height; return h; }, /** * Returns the inner width of the viewport (exludes scrollbar). * @method winWidth * @return {Number} The current width of the viewport. */ winWidth: function(node) { var w = Y_DOM._getWinSize(node).width; return w; }, /** * Document height * @method docHeight * @return {Number} The current height of the document. */ docHeight: function(node) { var h = Y_DOM._getDocSize(node).height; return Math.max(h, Y_DOM._getWinSize(node).height); }, /** * Document width * @method docWidth * @return {Number} The current width of the document. */ docWidth: function(node) { var w = Y_DOM._getDocSize(node).width; return Math.max(w, Y_DOM._getWinSize(node).width); }, /** * Amount page has been scroll horizontally * @method docScrollX * @return {Number} The current amount the screen is scrolled horizontally. */ docScrollX: function(node, doc) { doc = doc || (node) ? Y_DOM._getDoc(node) : Y.config.doc; // perf optimization var dv = doc.defaultView, pageOffset = (dv) ? dv.pageXOffset : 0; return Math.max(doc[DOCUMENT_ELEMENT].scrollLeft, doc.body.scrollLeft, pageOffset); }, /** * Amount page has been scroll vertically * @method docScrollY * @return {Number} The current amount the screen is scrolled vertically. */ docScrollY: function(node, doc) { doc = doc || (node) ? Y_DOM._getDoc(node) : Y.config.doc; // perf optimization var dv = doc.defaultView, pageOffset = (dv) ? dv.pageYOffset : 0; return Math.max(doc[DOCUMENT_ELEMENT].scrollTop, doc.body.scrollTop, pageOffset); }, /** * Gets the current position of an element based on page coordinates. * Element must be part of the DOM tree to have page coordinates * (display:none or elements not appended return false). * @method getXY * @param element The target element * @return {Array} The XY position of the element TODO: test inDocument/display? */ getXY: function() { if (Y.config.doc[DOCUMENT_ELEMENT][GET_BOUNDING_CLIENT_RECT]) { return function(node) { var xy = null, scrollLeft, scrollTop, mode, box, offX, offY, doc, win, inDoc, rootNode; if (node && node.tagName) { doc = node.ownerDocument; mode = doc[COMPAT_MODE]; if (mode !== _BACK_COMPAT) { rootNode = doc[DOCUMENT_ELEMENT]; } else { rootNode = doc.body; } // inline inDoc check for perf if (rootNode.contains) { inDoc = rootNode.contains(node); } else { inDoc = Y.DOM.contains(rootNode, node); } if (inDoc) { win = doc.defaultView; // inline scroll calc for perf if (win && 'pageXOffset' in win) { scrollLeft = win.pageXOffset; scrollTop = win.pageYOffset; } else { scrollLeft = (SCROLL_NODE) ? doc[SCROLL_NODE].scrollLeft : Y_DOM.docScrollX(node, doc); scrollTop = (SCROLL_NODE) ? doc[SCROLL_NODE].scrollTop : Y_DOM.docScrollY(node, doc); } if (Y.UA.ie) { // IE < 8, quirks, or compatMode if (!doc.documentMode || doc.documentMode < 8 || mode === _BACK_COMPAT) { offX = rootNode.clientLeft; offY = rootNode.clientTop; } } box = node[GET_BOUNDING_CLIENT_RECT](); xy = [box.left, box.top]; if (offX || offY) { xy[0] -= offX; xy[1] -= offY; } if ((scrollTop || scrollLeft)) { if (!Y.UA.ios || (Y.UA.ios >= 4.2)) { xy[0] += scrollLeft; xy[1] += scrollTop; } } } else { xy = Y_DOM._getOffset(node); } } return xy; }; } else { return function(node) { // manually calculate by crawling up offsetParents //Calculate the Top and Left border sizes (assumes pixels) var xy = null, doc, parentNode, bCheck, scrollTop, scrollLeft; if (node) { if (Y_DOM.inDoc(node)) { xy = [node.offsetLeft, node.offsetTop]; doc = node.ownerDocument; parentNode = node; // TODO: refactor with !! or just falsey bCheck = ((Y.UA.gecko || Y.UA.webkit > 519) ? true : false); // TODO: worth refactoring for TOP/LEFT only? while ((parentNode = parentNode.offsetParent)) { xy[0] += parentNode.offsetLeft; xy[1] += parentNode.offsetTop; if (bCheck) { xy = Y_DOM._calcBorders(parentNode, xy); } } // account for any scrolled ancestors if (Y_DOM.getStyle(node, POSITION) != FIXED) { parentNode = node; while ((parentNode = parentNode.parentNode)) { scrollTop = parentNode.scrollTop; scrollLeft = parentNode.scrollLeft; //Firefox does something funky with borders when overflow is not visible. if (Y.UA.gecko && (Y_DOM.getStyle(parentNode, 'overflow') !== 'visible')) { xy = Y_DOM._calcBorders(parentNode, xy); } if (scrollTop || scrollLeft) { xy[0] -= scrollLeft; xy[1] -= scrollTop; } } xy[0] += Y_DOM.docScrollX(node, doc); xy[1] += Y_DOM.docScrollY(node, doc); } else { //Fix FIXED position -- add scrollbars xy[0] += Y_DOM.docScrollX(node, doc); xy[1] += Y_DOM.docScrollY(node, doc); } } else { xy = Y_DOM._getOffset(node); } } return xy; }; } }(),// NOTE: Executing for loadtime branching /** Gets the width of vertical scrollbars on overflowed containers in the body content. @method getScrollbarWidth @return {Number} Pixel width of a scrollbar in the current browser **/ getScrollbarWidth: Y.cached(function () { var doc = Y.config.doc, testNode = doc.createElement('div'), body = doc.getElementsByTagName('body')[0], // 0.1 because cached doesn't support falsy refetch values width = 0.1; if (body) { testNode.style.cssText = "position:absolute;visibility:hidden;overflow:scroll;width:20px;"; testNode.appendChild(doc.createElement('p')).style.height = '1px'; body.insertBefore(testNode, body.firstChild); width = testNode.offsetWidth - testNode.clientWidth; body.removeChild(testNode); } return width; }, null, 0.1), /** * Gets the current X position of an element based on page coordinates. * Element must be part of the DOM tree to have page coordinates * (display:none or elements not appended return false). * @method getX * @param element The target element * @return {Number} The X position of the element */ getX: function(node) { return Y_DOM.getXY(node)[0]; }, /** * Gets the current Y position of an element based on page coordinates. * Element must be part of the DOM tree to have page coordinates * (display:none or elements not appended return false). * @method getY * @param element The target element * @return {Number} The Y position of the element */ getY: function(node) { return Y_DOM.getXY(node)[1]; }, /** * Set the position of an html element in page coordinates. * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). * @method setXY * @param element The target element * @param {Array} xy Contains X & Y values for new position (coordinates are page-based) * @param {Boolean} noRetry By default we try and set the position a second time if the first fails */ setXY: function(node, xy, noRetry) { var setStyle = Y_DOM.setStyle, pos, delta, newXY, currentXY; if (node && xy) { pos = Y_DOM.getStyle(node, POSITION); delta = Y_DOM._getOffset(node); if (pos == 'static') { // default to relative pos = RELATIVE; setStyle(node, POSITION, pos); } currentXY = Y_DOM.getXY(node); if (xy[0] !== null) { setStyle(node, LEFT, xy[0] - currentXY[0] + delta[0] + 'px'); } if (xy[1] !== null) { setStyle(node, TOP, xy[1] - currentXY[1] + delta[1] + 'px'); } if (!noRetry) { newXY = Y_DOM.getXY(node); if (newXY[0] !== xy[0] || newXY[1] !== xy[1]) { Y_DOM.setXY(node, xy, true); } } } else { } }, /** * Set the X position of an html element in page coordinates, regardless of how the element is positioned. * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). * @method setX * @param element The target element * @param {Number} x The X values for new position (coordinates are page-based) */ setX: function(node, x) { return Y_DOM.setXY(node, [x, null]); }, /** * Set the Y position of an html element in page coordinates, regardless of how the element is positioned. * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). * @method setY * @param element The target element * @param {Number} y The Y values for new position (coordinates are page-based) */ setY: function(node, y) { return Y_DOM.setXY(node, [null, y]); }, /** * @method swapXY * @description Swap the xy position with another node * @param {Node} node The node to swap with * @param {Node} otherNode The other node to swap with * @return {Node} */ swapXY: function(node, otherNode) { var xy = Y_DOM.getXY(node); Y_DOM.setXY(node, Y_DOM.getXY(otherNode)); Y_DOM.setXY(otherNode, xy); }, _calcBorders: function(node, xy2) { var t = parseInt(Y_DOM[GET_COMPUTED_STYLE](node, BORDER_TOP_WIDTH), 10) || 0, l = parseInt(Y_DOM[GET_COMPUTED_STYLE](node, BORDER_LEFT_WIDTH), 10) || 0; if (Y.UA.gecko) { if (RE_TABLE.test(node.tagName)) { t = 0; l = 0; } } xy2[0] += l; xy2[1] += t; return xy2; }, _getWinSize: function(node, doc) { doc = doc || (node) ? Y_DOM._getDoc(node) : Y.config.doc; var win = doc.defaultView || doc.parentWindow, mode = doc[COMPAT_MODE], h = win.innerHeight, w = win.innerWidth, root = doc[DOCUMENT_ELEMENT]; if ( mode && !Y.UA.opera ) { // IE, Gecko if (mode != 'CSS1Compat') { // Quirks root = doc.body; } h = root.clientHeight; w = root.clientWidth; } return { height: h, width: w }; }, _getDocSize: function(node) { var doc = (node) ? Y_DOM._getDoc(node) : Y.config.doc, root = doc[DOCUMENT_ELEMENT]; if (doc[COMPAT_MODE] != 'CSS1Compat') { root = doc.body; } return { height: root.scrollHeight, width: root.scrollWidth }; } }); })(Y); (function(Y) { var TOP = 'top', RIGHT = 'right', BOTTOM = 'bottom', LEFT = 'left', getOffsets = function(r1, r2) { var t = Math.max(r1[TOP], r2[TOP]), r = Math.min(r1[RIGHT], r2[RIGHT]), b = Math.min(r1[BOTTOM], r2[BOTTOM]), l = Math.max(r1[LEFT], r2[LEFT]), ret = {}; ret[TOP] = t; ret[RIGHT] = r; ret[BOTTOM] = b; ret[LEFT] = l; return ret; }, DOM = Y.DOM; Y.mix(DOM, { /** * Returns an Object literal containing the following about this element: (top, right, bottom, left) * @for DOM * @method region * @param {HTMLElement} element The DOM element. * @return {Object} Object literal containing the following about this element: (top, right, bottom, left) */ region: function(node) { var xy = DOM.getXY(node), ret = false; if (node && xy) { ret = DOM._getRegion( xy[1], // top xy[0] + node.offsetWidth, // right xy[1] + node.offsetHeight, // bottom xy[0] // left ); } return ret; }, /** * Find the intersect information for the passed nodes. * @method intersect * @for DOM * @param {HTMLElement} element The first element * @param {HTMLElement | Object} element2 The element or region to check the interect with * @param {Object} altRegion An object literal containing the region for the first element if we already have the data (for performance e.g. DragDrop) * @return {Object} Object literal containing the following intersection data: (top, right, bottom, left, area, yoff, xoff, inRegion) */ intersect: function(node, node2, altRegion) { var r = altRegion || DOM.region(node), region = {}, n = node2, off; if (n.tagName) { region = DOM.region(n); } else if (Y.Lang.isObject(node2)) { region = node2; } else { return false; } off = getOffsets(region, r); return { top: off[TOP], right: off[RIGHT], bottom: off[BOTTOM], left: off[LEFT], area: ((off[BOTTOM] - off[TOP]) * (off[RIGHT] - off[LEFT])), yoff: ((off[BOTTOM] - off[TOP])), xoff: (off[RIGHT] - off[LEFT]), inRegion: DOM.inRegion(node, node2, false, altRegion) }; }, /** * Check if any part of this node is in the passed region * @method inRegion * @for DOM * @param {Object} node The node to get the region from * @param {Object} node2 The second node to get the region from or an Object literal of the region * @param {Boolean} all Should all of the node be inside the region * @param {Object} altRegion An object literal containing the region for this node if we already have the data (for performance e.g. DragDrop) * @return {Boolean} True if in region, false if not. */ inRegion: function(node, node2, all, altRegion) { var region = {}, r = altRegion || DOM.region(node), n = node2, off; if (n.tagName) { region = DOM.region(n); } else if (Y.Lang.isObject(node2)) { region = node2; } else { return false; } if (all) { return ( r[LEFT] >= region[LEFT] && r[RIGHT] <= region[RIGHT] && r[TOP] >= region[TOP] && r[BOTTOM] <= region[BOTTOM] ); } else { off = getOffsets(region, r); if (off[BOTTOM] >= off[TOP] && off[RIGHT] >= off[LEFT]) { return true; } else { return false; } } }, /** * Check if any part of this element is in the viewport * @method inViewportRegion * @for DOM * @param {HTMLElement} element The DOM element. * @param {Boolean} all Should all of the node be inside the region * @param {Object} altRegion An object literal containing the region for this node if we already have the data (for performance e.g. DragDrop) * @return {Boolean} True if in region, false if not. */ inViewportRegion: function(node, all, altRegion) { return DOM.inRegion(node, DOM.viewportRegion(node), all, altRegion); }, _getRegion: function(t, r, b, l) { var region = {}; region[TOP] = region[1] = t; region[LEFT] = region[0] = l; region[BOTTOM] = b; region[RIGHT] = r; region.width = region[RIGHT] - region[LEFT]; region.height = region[BOTTOM] - region[TOP]; return region; }, /** * Returns an Object literal containing the following about the visible region of viewport: (top, right, bottom, left) * @method viewportRegion * @for DOM * @return {Object} Object literal containing the following about the visible region of the viewport: (top, right, bottom, left) */ viewportRegion: function(node) { node = node || Y.config.doc.documentElement; var ret = false, scrollX, scrollY; if (node) { scrollX = DOM.docScrollX(node); scrollY = DOM.docScrollY(node); ret = DOM._getRegion(scrollY, // top DOM.winWidth(node) + scrollX, // right scrollY + DOM.winHeight(node), // bottom scrollX); // left } return ret; } }); })(Y); }, '@VERSION@', {"requires": ["dom-base", "dom-style"]}); YUI.add('selector-native', function (Y, NAME) { (function(Y) { /** * The selector-native module provides support for native querySelector * @module dom * @submodule selector-native * @for Selector */ /** * Provides support for using CSS selectors to query the DOM * @class Selector * @static * @for Selector */ Y.namespace('Selector'); // allow native module to standalone var COMPARE_DOCUMENT_POSITION = 'compareDocumentPosition', OWNER_DOCUMENT = 'ownerDocument'; var Selector = { _types: { esc: { token: '\uE000', re: /\\[:\[\]\(\)#\.\'\>+~"]/gi }, attr: { token: '\uE001', re: /(\[[^\]]*\])/g }, pseudo: { token: '\uE002', re: /(\([^\)]*\))/g } }, useNative: true, _escapeId: function(id) { if (id) { id = id.replace(/([:\[\]\(\)#\.'<>+~"])/g,'\\$1'); } return id; }, _compare: ('sourceIndex' in Y.config.doc.documentElement) ? function(nodeA, nodeB) { var a = nodeA.sourceIndex, b = nodeB.sourceIndex; if (a === b) { return 0; } else if (a > b) { return 1; } return -1; } : (Y.config.doc.documentElement[COMPARE_DOCUMENT_POSITION] ? function(nodeA, nodeB) { if (nodeA[COMPARE_DOCUMENT_POSITION](nodeB) & 4) { return -1; } else { return 1; } } : function(nodeA, nodeB) { var rangeA, rangeB, compare; if (nodeA && nodeB) { rangeA = nodeA[OWNER_DOCUMENT].createRange(); rangeA.setStart(nodeA, 0); rangeB = nodeB[OWNER_DOCUMENT].createRange(); rangeB.setStart(nodeB, 0); compare = rangeA.compareBoundaryPoints(1, rangeB); // 1 === Range.START_TO_END } return compare; }), _sort: function(nodes) { if (nodes) { nodes = Y.Array(nodes, 0, true); if (nodes.sort) { nodes.sort(Selector._compare); } } return nodes; }, _deDupe: function(nodes) { var ret = [], i, node; for (i = 0; (node = nodes[i++]);) { if (!node._found) { ret[ret.length] = node; node._found = true; } } for (i = 0; (node = ret[i++]);) { node._found = null; node.removeAttribute('_found'); } return ret; }, /** * Retrieves a set of nodes based on a given CSS selector. * @method query * * @param {string} selector The CSS Selector to test the node against. * @param {HTMLElement} root optional An HTMLElement to start the query from. Defaults to Y.config.doc * @param {Boolean} firstOnly optional Whether or not to return only the first match. * @return {Array} An array of nodes that match the given selector. * @static */ query: function(selector, root, firstOnly, skipNative) { root = root || Y.config.doc; var ret = [], useNative = (Y.Selector.useNative && Y.config.doc.querySelector && !skipNative), queries = [[selector, root]], query, result, i, fn = (useNative) ? Y.Selector._nativeQuery : Y.Selector._bruteQuery; if (selector && fn) { // split group into seperate queries if (!skipNative && // already done if skipping (!useNative || root.tagName)) { // split native when element scoping is needed queries = Selector._splitQueries(selector, root); } for (i = 0; (query = queries[i++]);) { result = fn(query[0], query[1], firstOnly); if (!firstOnly) { // coerce DOM Collection to Array result = Y.Array(result, 0, true); } if (result) { ret = ret.concat(result); } } if (queries.length > 1) { // remove dupes and sort by doc order ret = Selector._sort(Selector._deDupe(ret)); } } return (firstOnly) ? (ret[0] || null) : ret; }, _replaceSelector: function(selector) { var esc = Y.Selector._parse('esc', selector), // pull escaped colon, brackets, etc. attrs, pseudos; // first replace escaped chars, which could be present in attrs or pseudos selector = Y.Selector._replace('esc', selector); // then replace pseudos before attrs to avoid replacing :not([foo]) pseudos = Y.Selector._parse('pseudo', selector); selector = Selector._replace('pseudo', selector); attrs = Y.Selector._parse('attr', selector); selector = Y.Selector._replace('attr', selector); return { esc: esc, attrs: attrs, pseudos: pseudos, selector: selector }; }, _restoreSelector: function(replaced) { var selector = replaced.selector; selector = Y.Selector._restore('attr', selector, replaced.attrs); selector = Y.Selector._restore('pseudo', selector, replaced.pseudos); selector = Y.Selector._restore('esc', selector, replaced.esc); return selector; }, _replaceCommas: function(selector) { var replaced = Y.Selector._replaceSelector(selector), selector = replaced.selector; if (selector) { selector = selector.replace(/,/g, '\uE007'); replaced.selector = selector; selector = Y.Selector._restoreSelector(replaced); } return selector; }, // allows element scoped queries to begin with combinator // e.g. query('> p', document.body) === query('body > p') _splitQueries: function(selector, node) { if (selector.indexOf(',') > -1) { selector = Y.Selector._replaceCommas(selector); } var groups = selector.split('\uE007'), // split on replaced comma token queries = [], prefix = '', id, i, len; if (node) { // enforce for element scoping if (node.nodeType === 1) { // Elements only id = Y.Selector._escapeId(Y.DOM.getId(node)); if (!id) { id = Y.guid(); Y.DOM.setId(node, id); } prefix = '[id="' + id + '"] '; } for (i = 0, len = groups.length; i < len; ++i) { selector = prefix + groups[i]; queries.push([selector, node]); } } return queries; }, _nativeQuery: function(selector, root, one) { if (Y.UA.webkit && selector.indexOf(':checked') > -1 && (Y.Selector.pseudos && Y.Selector.pseudos.checked)) { // webkit (chrome, safari) fails to pick up "selected" with "checked" return Y.Selector.query(selector, root, one, true); // redo with skipNative true to try brute query } try { return root['querySelector' + (one ? '' : 'All')](selector); } catch(e) { // fallback to brute if available return Y.Selector.query(selector, root, one, true); // redo with skipNative true } }, filter: function(nodes, selector) { var ret = [], i, node; if (nodes && selector) { for (i = 0; (node = nodes[i++]);) { if (Y.Selector.test(node, selector)) { ret[ret.length] = node; } } } else { } return ret; }, test: function(node, selector, root) { var ret = false, useFrag = false, groups, parent, item, items, frag, id, i, j, group; if (node && node.tagName) { // only test HTMLElements if (typeof selector == 'function') { // test with function ret = selector.call(node, node); } else { // test with query // we need a root if off-doc groups = selector.split(','); if (!root && !Y.DOM.inDoc(node)) { parent = node.parentNode; if (parent) { root = parent; } else { // only use frag when no parent to query frag = node[OWNER_DOCUMENT].createDocumentFragment(); frag.appendChild(node); root = frag; useFrag = true; } } root = root || node[OWNER_DOCUMENT]; id = Y.Selector._escapeId(Y.DOM.getId(node)); if (!id) { id = Y.guid(); Y.DOM.setId(node, id); } for (i = 0; (group = groups[i++]);) { // TODO: off-dom test group += '[id="' + id + '"]'; items = Y.Selector.query(group, root); for (j = 0; item = items[j++];) { if (item === node) { ret = true; break; } } if (ret) { break; } } if (useFrag) { // cleanup frag.removeChild(node); } }; } return ret; }, /** * A convenience function to emulate Y.Node's aNode.ancestor(selector). * @param {HTMLElement} element An HTMLElement to start the query from. * @param {String} selector The CSS selector to test the node against. * @return {HTMLElement} The ancestor node matching the selector, or null. * @param {Boolean} testSelf optional Whether or not to include the element in the scan * @static * @method ancestor */ ancestor: function (element, selector, testSelf) { return Y.DOM.ancestor(element, function(n) { return Y.Selector.test(n, selector); }, testSelf); }, _parse: function(name, selector) { return selector.match(Y.Selector._types[name].re); }, _replace: function(name, selector) { var o = Y.Selector._types[name]; return selector.replace(o.re, o.token); }, _restore: function(name, selector, items) { if (items) { var token = Y.Selector._types[name].token, i, len; for (i = 0, len = items.length; i < len; ++i) { selector = selector.replace(token, items[i]); } } return selector; } }; Y.mix(Y.Selector, Selector, true); })(Y); }, '@VERSION@', {"requires": ["dom-base"]}); YUI.add('selector', function (Y, NAME) { }, '@VERSION@', {"requires": ["selector-native"]}); YUI.add('event-custom-base', function (Y, NAME) { /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom */ Y.Env.evt = { handles: {}, plugins: {} }; /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom * @submodule event-custom-base */ /** * Allows for the insertion of methods that are executed before or after * a specified method * @class Do * @static */ var DO_BEFORE = 0, DO_AFTER = 1, DO = { /** * Cache of objects touched by the utility * @property objs * @static * @deprecated Since 3.6.0. The `_yuiaop` property on the AOP'd object * replaces the role of this property, but is considered to be private, and * is only mentioned to provide a migration path. * * If you have a use case which warrants migration to the _yuiaop property, * please file a ticket to let us know what it's used for and we can see if * we need to expose hooks for that functionality more formally. */ objs: null, /** * <p>Execute the supplied method before the specified function. Wrapping * function may optionally return an instance of the following classes to * further alter runtime behavior:</p> * <dl> * <dt></code>Y.Do.Halt(message, returnValue)</code></dt> * <dd>Immediatly stop execution and return * <code>returnValue</code>. No other wrapping functions will be * executed.</dd> * <dt></code>Y.Do.AlterArgs(message, newArgArray)</code></dt> * <dd>Replace the arguments that the original function will be * called with.</dd> * <dt></code>Y.Do.Prevent(message)</code></dt> * <dd>Don't execute the wrapped function. Other before phase * wrappers will be executed.</dd> * </dl> * * @method before * @param fn {Function} the function to execute * @param obj the object hosting the method to displace * @param sFn {string} the name of the method to displace * @param c The execution context for fn * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * when the event fires. * @return {string} handle for the subscription * @static */ before: function(fn, obj, sFn, c) { var f = fn, a; if (c) { a = [fn, c].concat(Y.Array(arguments, 4, true)); f = Y.rbind.apply(Y, a); } return this._inject(DO_BEFORE, f, obj, sFn); }, /** * <p>Execute the supplied method after the specified function. Wrapping * function may optionally return an instance of the following classes to * further alter runtime behavior:</p> * <dl> * <dt></code>Y.Do.Halt(message, returnValue)</code></dt> * <dd>Immediatly stop execution and return * <code>returnValue</code>. No other wrapping functions will be * executed.</dd> * <dt></code>Y.Do.AlterReturn(message, returnValue)</code></dt> * <dd>Return <code>returnValue</code> instead of the wrapped * method's original return value. This can be further altered by * other after phase wrappers.</dd> * </dl> * * <p>The static properties <code>Y.Do.originalRetVal</code> and * <code>Y.Do.currentRetVal</code> will be populated for reference.</p> * * @method after * @param fn {Function} the function to execute * @param obj the object hosting the method to displace * @param sFn {string} the name of the method to displace * @param c The execution context for fn * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * @return {string} handle for the subscription * @static */ after: function(fn, obj, sFn, c) { var f = fn, a; if (c) { a = [fn, c].concat(Y.Array(arguments, 4, true)); f = Y.rbind.apply(Y, a); } return this._inject(DO_AFTER, f, obj, sFn); }, /** * Execute the supplied method before or after the specified function. * Used by <code>before</code> and <code>after</code>. * * @method _inject * @param when {string} before or after * @param fn {Function} the function to execute * @param obj the object hosting the method to displace * @param sFn {string} the name of the method to displace * @param c The execution context for fn * @return {string} handle for the subscription * @private * @static */ _inject: function(when, fn, obj, sFn) { // object id var id = Y.stamp(obj), o, sid; if (!obj._yuiaop) { // create a map entry for the obj if it doesn't exist, to hold overridden methods obj._yuiaop = {}; } o = obj._yuiaop; if (!o[sFn]) { // create a map entry for the method if it doesn't exist o[sFn] = new Y.Do.Method(obj, sFn); // re-route the method to our wrapper obj[sFn] = function() { return o[sFn].exec.apply(o[sFn], arguments); }; } // subscriber id sid = id + Y.stamp(fn) + sFn; // register the callback o[sFn].register(sid, fn, when); return new Y.EventHandle(o[sFn], sid); }, /** * Detach a before or after subscription. * * @method detach * @param handle {string} the subscription handle * @static */ detach: function(handle) { if (handle.detach) { handle.detach(); } }, _unload: function(e, me) { } }; Y.Do = DO; ////////////////////////////////////////////////////////////////////////// /** * Contains the return value from the wrapped method, accessible * by 'after' event listeners. * * @property originalRetVal * @static * @since 3.2.0 */ /** * Contains the current state of the return value, consumable by * 'after' event listeners, and updated if an after subscriber * changes the return value generated by the wrapped function. * * @property currentRetVal * @static * @since 3.2.0 */ ////////////////////////////////////////////////////////////////////////// /** * Wrapper for a displaced method with aop enabled * @class Do.Method * @constructor * @param obj The object to operate on * @param sFn The name of the method to displace */ DO.Method = function(obj, sFn) { this.obj = obj; this.methodName = sFn; this.method = obj[sFn]; this.before = {}; this.after = {}; }; /** * Register a aop subscriber * @method register * @param sid {string} the subscriber id * @param fn {Function} the function to execute * @param when {string} when to execute the function */ DO.Method.prototype.register = function (sid, fn, when) { if (when) { this.after[sid] = fn; } else { this.before[sid] = fn; } }; /** * Unregister a aop subscriber * @method delete * @param sid {string} the subscriber id * @param fn {Function} the function to execute * @param when {string} when to execute the function */ DO.Method.prototype._delete = function (sid) { delete this.before[sid]; delete this.after[sid]; }; /** * <p>Execute the wrapped method. All arguments are passed into the wrapping * functions. If any of the before wrappers return an instance of * <code>Y.Do.Halt</code> or <code>Y.Do.Prevent</code>, neither the wrapped * function nor any after phase subscribers will be executed.</p> * * <p>The return value will be the return value of the wrapped function or one * provided by a wrapper function via an instance of <code>Y.Do.Halt</code> or * <code>Y.Do.AlterReturn</code>. * * @method exec * @param arg* {any} Arguments are passed to the wrapping and wrapped functions * @return {any} Return value of wrapped function unless overwritten (see above) */ DO.Method.prototype.exec = function () { var args = Y.Array(arguments, 0, true), i, ret, newRet, bf = this.before, af = this.after, prevented = false; // execute before for (i in bf) { if (bf.hasOwnProperty(i)) { ret = bf[i].apply(this.obj, args); if (ret) { switch (ret.constructor) { case DO.Halt: return ret.retVal; case DO.AlterArgs: args = ret.newArgs; break; case DO.Prevent: prevented = true; break; default: } } } } // execute method if (!prevented) { ret = this.method.apply(this.obj, args); } DO.originalRetVal = ret; DO.currentRetVal = ret; // execute after methods. for (i in af) { if (af.hasOwnProperty(i)) { newRet = af[i].apply(this.obj, args); // Stop processing if a Halt object is returned if (newRet && newRet.constructor == DO.Halt) { return newRet.retVal; // Check for a new return value } else if (newRet && newRet.constructor == DO.AlterReturn) { ret = newRet.newRetVal; // Update the static retval state DO.currentRetVal = ret; } } } return ret; }; ////////////////////////////////////////////////////////////////////////// /** * Return an AlterArgs object when you want to change the arguments that * were passed into the function. Useful for Do.before subscribers. An * example would be a service that scrubs out illegal characters prior to * executing the core business logic. * @class Do.AlterArgs * @constructor * @param msg {String} (optional) Explanation of the altered return value * @param newArgs {Array} Call parameters to be used for the original method * instead of the arguments originally passed in. */ DO.AlterArgs = function(msg, newArgs) { this.msg = msg; this.newArgs = newArgs; }; /** * Return an AlterReturn object when you want to change the result returned * from the core method to the caller. Useful for Do.after subscribers. * @class Do.AlterReturn * @constructor * @param msg {String} (optional) Explanation of the altered return value * @param newRetVal {any} Return value passed to code that invoked the wrapped * function. */ DO.AlterReturn = function(msg, newRetVal) { this.msg = msg; this.newRetVal = newRetVal; }; /** * Return a Halt object when you want to terminate the execution * of all subsequent subscribers as well as the wrapped method * if it has not exectued yet. Useful for Do.before subscribers. * @class Do.Halt * @constructor * @param msg {String} (optional) Explanation of why the termination was done * @param retVal {any} Return value passed to code that invoked the wrapped * function. */ DO.Halt = function(msg, retVal) { this.msg = msg; this.retVal = retVal; }; /** * Return a Prevent object when you want to prevent the wrapped function * from executing, but want the remaining listeners to execute. Useful * for Do.before subscribers. * @class Do.Prevent * @constructor * @param msg {String} (optional) Explanation of why the termination was done */ DO.Prevent = function(msg) { this.msg = msg; }; /** * Return an Error object when you want to terminate the execution * of all subsequent method calls. * @class Do.Error * @constructor * @param msg {String} (optional) Explanation of the altered return value * @param retVal {any} Return value passed to code that invoked the wrapped * function. * @deprecated use Y.Do.Halt or Y.Do.Prevent */ DO.Error = DO.Halt; ////////////////////////////////////////////////////////////////////////// // Y["Event"] && Y.Event.addListener(window, "unload", Y.Do._unload, Y.Do); /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom * @submodule event-custom-base */ // var onsubscribeType = "_event:onsub", var YArray = Y.Array, AFTER = 'after', CONFIGS = [ 'broadcast', 'monitored', 'bubbles', 'context', 'contextFn', 'currentTarget', 'defaultFn', 'defaultTargetOnly', 'details', 'emitFacade', 'fireOnce', 'async', 'host', 'preventable', 'preventedFn', 'queuable', 'silent', 'stoppedFn', 'target', 'type' ], CONFIGS_HASH = YArray.hash(CONFIGS), nativeSlice = Array.prototype.slice, YUI3_SIGNATURE = 9, YUI_LOG = 'yui:log', mixConfigs = function(r, s, ov) { var p; for (p in s) { if (CONFIGS_HASH[p] && (ov || !(p in r))) { r[p] = s[p]; } } return r; }; /** * The CustomEvent class lets you define events for your application * that can be subscribed to by one or more independent component. * * @param {String} type The type of event, which is passed to the callback * when the event fires. * @param {object} o configuration object. * @class CustomEvent * @constructor */ Y.CustomEvent = function(type, o) { this._kds = Y.CustomEvent.keepDeprecatedSubs; o = o || {}; this.id = Y.stamp(this); /** * The type of event, returned to subscribers when the event fires * @property type * @type string */ this.type = type; /** * The context the the event will fire from by default. Defaults to the YUI * instance. * @property context * @type object */ this.context = Y; /** * Monitor when an event is attached or detached. * * @property monitored * @type boolean */ // this.monitored = false; this.logSystem = (type == YUI_LOG); /** * If 0, this event does not broadcast. If 1, the YUI instance is notified * every time this event fires. If 2, the YUI instance and the YUI global * (if event is enabled on the global) are notified every time this event * fires. * @property broadcast * @type int */ // this.broadcast = 0; /** * By default all custom events are logged in the debug build, set silent * to true to disable debug outpu for this event. * @property silent * @type boolean */ this.silent = this.logSystem; /** * Specifies whether this event should be queued when the host is actively * processing an event. This will effect exectution order of the callbacks * for the various events. * @property queuable * @type boolean * @default false */ // this.queuable = false; /** * The subscribers to this event * @property subscribers * @type Subscriber {} * @deprecated */ if (this._kds) { this.subscribers = {}; } /** * The subscribers to this event * @property _subscribers * @type Subscriber [] * @private */ this._subscribers = []; /** * 'After' subscribers * @property afters * @type Subscriber {} */ if (this._kds) { this.afters = {}; } /** * 'After' subscribers * @property _afters * @type Subscriber [] * @private */ this._afters = []; /** * This event has fired if true * * @property fired * @type boolean * @default false; */ // this.fired = false; /** * An array containing the arguments the custom event * was last fired with. * @property firedWith * @type Array */ // this.firedWith; /** * This event should only fire one time if true, and if * it has fired, any new subscribers should be notified * immediately. * * @property fireOnce * @type boolean * @default false; */ // this.fireOnce = false; /** * fireOnce listeners will fire syncronously unless async * is set to true * @property async * @type boolean * @default false */ //this.async = false; /** * Flag for stopPropagation that is modified during fire() * 1 means to stop propagation to bubble targets. 2 means * to also stop additional subscribers on this target. * @property stopped * @type int */ // this.stopped = 0; /** * Flag for preventDefault that is modified during fire(). * if it is not 0, the default behavior for this event * @property prevented * @type int */ // this.prevented = 0; /** * Specifies the host for this custom event. This is used * to enable event bubbling * @property host * @type EventTarget */ // this.host = null; /** * The default function to execute after event listeners * have fire, but only if the default action was not * prevented. * @property defaultFn * @type Function */ // this.defaultFn = null; /** * The function to execute if a subscriber calls * stopPropagation or stopImmediatePropagation * @property stoppedFn * @type Function */ // this.stoppedFn = null; /** * The function to execute if a subscriber calls * preventDefault * @property preventedFn * @type Function */ // this.preventedFn = null; /** * Specifies whether or not this event's default function * can be cancelled by a subscriber by executing preventDefault() * on the event facade * @property preventable * @type boolean * @default true */ this.preventable = true; /** * Specifies whether or not a subscriber can stop the event propagation * via stopPropagation(), stopImmediatePropagation(), or halt() * * Events can only bubble if emitFacade is true. * * @property bubbles * @type boolean * @default true */ this.bubbles = true; /** * Supports multiple options for listener signatures in order to * port YUI 2 apps. * @property signature * @type int * @default 9 */ this.signature = YUI3_SIGNATURE; // this.subCount = 0; // this.afterCount = 0; // this.hasSubscribers = false; // this.hasAfters = false; /** * If set to true, the custom event will deliver an EventFacade object * that is similar to a DOM event object. * @property emitFacade * @type boolean * @default false */ // this.emitFacade = false; this.applyConfig(o, true); // this.log("Creating " + this.type); }; /** * Static flag to enable population of the <a href="#property_subscribers">`subscribers`</a> * and <a href="#property_subscribers">`afters`</a> properties held on a `CustomEvent` instance. * * These properties were changed to private properties (`_subscribers` and `_afters`), and * converted from objects to arrays for performance reasons. * * Setting this property to true will populate the deprecated `subscribers` and `afters` * properties for people who may be using them (which is expected to be rare). There will * be a performance hit, compared to the new array based implementation. * * If you are using these deprecated properties for a use case which the public API * does not support, please file an enhancement request, and we can provide an alternate * public implementation which doesn't have the performance cost required to maintiain the * properties as objects. * * @property keepDeprecatedSubs * @static * @for CustomEvent * @type boolean * @default false * @deprecated */ Y.CustomEvent.keepDeprecatedSubs = false; Y.CustomEvent.mixConfigs = mixConfigs; Y.CustomEvent.prototype = { constructor: Y.CustomEvent, /** * Returns the number of subscribers for this event as the sum of the on() * subscribers and after() subscribers. * * @method hasSubs * @return Number */ hasSubs: function(when) { var s = this._subscribers.length, a = this._afters.length, sib = this.sibling; if (sib) { s += sib._subscribers.length; a += sib._afters.length; } if (when) { return (when == 'after') ? a : s; } return (s + a); }, /** * Monitor the event state for the subscribed event. The first parameter * is what should be monitored, the rest are the normal parameters when * subscribing to an event. * @method monitor * @param what {string} what to monitor ('detach', 'attach', 'publish'). * @return {EventHandle} return value from the monitor event subscription. */ monitor: function(what) { this.monitored = true; var type = this.id + '|' + this.type + '_' + what, args = nativeSlice.call(arguments, 0); args[0] = type; return this.host.on.apply(this.host, args); }, /** * Get all of the subscribers to this event and any sibling event * @method getSubs * @return {Array} first item is the on subscribers, second the after. */ getSubs: function() { var s = this._subscribers, a = this._afters, sib = this.sibling; s = (sib) ? s.concat(sib._subscribers) : s.concat(); a = (sib) ? a.concat(sib._afters) : a.concat(); return [s, a]; }, /** * Apply configuration properties. Only applies the CONFIG whitelist * @method applyConfig * @param o hash of properties to apply. * @param force {boolean} if true, properties that exist on the event * will be overwritten. */ applyConfig: function(o, force) { mixConfigs(this, o, force); }, /** * Create the Subscription for subscribing function, context, and bound * arguments. If this is a fireOnce event, the subscriber is immediately * notified. * * @method _on * @param fn {Function} Subscription callback * @param [context] {Object} Override `this` in the callback * @param [args] {Array} bound arguments that will be passed to the callback after the arguments generated by fire() * @param [when] {String} "after" to slot into after subscribers * @return {EventHandle} * @protected */ _on: function(fn, context, args, when) { if (!fn) { this.log('Invalid callback for CE: ' + this.type); } var s = new Y.Subscriber(fn, context, args, when); if (this.fireOnce && this.fired) { if (this.async) { setTimeout(Y.bind(this._notify, this, s, this.firedWith), 0); } else { this._notify(s, this.firedWith); } } if (when == AFTER) { this._afters.push(s); } else { this._subscribers.push(s); } if (this._kds) { if (when == AFTER) { this.afters[s.id] = s; } else { this.subscribers[s.id] = s; } } return new Y.EventHandle(this, s); }, /** * Listen for this event * @method subscribe * @param {Function} fn The function to execute. * @return {EventHandle} Unsubscribe handle. * @deprecated use on. */ subscribe: function(fn, context) { var a = (arguments.length > 2) ? nativeSlice.call(arguments, 2) : null; return this._on(fn, context, a, true); }, /** * Listen for this event * @method on * @param {Function} fn The function to execute. * @param {object} context optional execution context. * @param {mixed} arg* 0..n additional arguments to supply to the subscriber * when the event fires. * @return {EventHandle} An object with a detach method to detch the handler(s). */ on: function(fn, context) { var a = (arguments.length > 2) ? nativeSlice.call(arguments, 2) : null; if (this.monitored && this.host) { this.host._monitor('attach', this, { args: arguments }); } return this._on(fn, context, a, true); }, /** * Listen for this event after the normal subscribers have been notified and * the default behavior has been applied. If a normal subscriber prevents the * default behavior, it also prevents after listeners from firing. * @method after * @param {Function} fn The function to execute. * @param {object} context optional execution context. * @param {mixed} arg* 0..n additional arguments to supply to the subscriber * when the event fires. * @return {EventHandle} handle Unsubscribe handle. */ after: function(fn, context) { var a = (arguments.length > 2) ? nativeSlice.call(arguments, 2) : null; return this._on(fn, context, a, AFTER); }, /** * Detach listeners. * @method detach * @param {Function} fn The subscribed function to remove, if not supplied * all will be removed. * @param {Object} context The context object passed to subscribe. * @return {int} returns the number of subscribers unsubscribed. */ detach: function(fn, context) { // unsubscribe handle if (fn && fn.detach) { return fn.detach(); } var i, s, found = 0, subs = this._subscribers, afters = this._afters; for (i = subs.length; i >= 0; i--) { s = subs[i]; if (s && (!fn || fn === s.fn)) { this._delete(s, subs, i); found++; } } for (i = afters.length; i >= 0; i--) { s = afters[i]; if (s && (!fn || fn === s.fn)) { this._delete(s, afters, i); found++; } } return found; }, /** * Detach listeners. * @method unsubscribe * @param {Function} fn The subscribed function to remove, if not supplied * all will be removed. * @param {Object} context The context object passed to subscribe. * @return {int|undefined} returns the number of subscribers unsubscribed. * @deprecated use detach. */ unsubscribe: function() { return this.detach.apply(this, arguments); }, /** * Notify a single subscriber * @method _notify * @param {Subscriber} s the subscriber. * @param {Array} args the arguments array to apply to the listener. * @protected */ _notify: function(s, args, ef) { this.log(this.type + '->' + 'sub: ' + s.id); var ret; ret = s.notify(args, this); if (false === ret || this.stopped > 1) { this.log(this.type + ' cancelled by subscriber'); return false; } return true; }, /** * Logger abstraction to centralize the application of the silent flag * @method log * @param {string} msg message to log. * @param {string} cat log category. */ log: function(msg, cat) { }, /** * Notifies the subscribers. The callback functions will be executed * from the context specified when the event was created, and with the * following parameters: * <ul> * <li>The type of event</li> * <li>All of the arguments fire() was executed with as an array</li> * <li>The custom object (if any) that was passed into the subscribe() * method</li> * </ul> * @method fire * @param {Object*} arguments an arbitrary set of parameters to pass to * the handler. * @return {boolean} false if one of the subscribers returned false, * true otherwise. * */ fire: function() { if (this.fireOnce && this.fired) { this.log('fireOnce event: ' + this.type + ' already fired'); return true; } else { var args = nativeSlice.call(arguments, 0); // this doesn't happen if the event isn't published // this.host._monitor('fire', this.type, args); this.fired = true; if (this.fireOnce) { this.firedWith = args; } if (this.emitFacade) { return this.fireComplex(args); } else { return this.fireSimple(args); } } }, /** * Set up for notifying subscribers of non-emitFacade events. * * @method fireSimple * @param args {Array} Arguments passed to fire() * @return Boolean false if a subscriber returned false * @protected */ fireSimple: function(args) { this.stopped = 0; this.prevented = 0; if (this.hasSubs()) { var subs = this.getSubs(); this._procSubs(subs[0], args); this._procSubs(subs[1], args); } this._broadcast(args); return this.stopped ? false : true; }, // Requires the event-custom-complex module for full funcitonality. fireComplex: function(args) { this.log('Missing event-custom-complex needed to emit a facade for: ' + this.type); args[0] = args[0] || {}; return this.fireSimple(args); }, /** * Notifies a list of subscribers. * * @method _procSubs * @param subs {Array} List of subscribers * @param args {Array} Arguments passed to fire() * @param ef {} * @return Boolean false if a subscriber returns false or stops the event * propagation via e.stopPropagation(), * e.stopImmediatePropagation(), or e.halt() * @private */ _procSubs: function(subs, args, ef) { var s, i, l; for (i = 0, l = subs.length; i < l; i++) { s = subs[i]; if (s && s.fn) { if (false === this._notify(s, args, ef)) { this.stopped = 2; } if (this.stopped == 2) { return false; } } } return true; }, /** * Notifies the YUI instance if the event is configured with broadcast = 1, * and both the YUI instance and Y.Global if configured with broadcast = 2. * * @method _broadcast * @param args {Array} Arguments sent to fire() * @private */ _broadcast: function(args) { if (!this.stopped && this.broadcast) { var a = args.concat(); a.unshift(this.type); if (this.host !== Y) { Y.fire.apply(Y, a); } if (this.broadcast == 2) { Y.Global.fire.apply(Y.Global, a); } } }, /** * Removes all listeners * @method unsubscribeAll * @return {int} The number of listeners unsubscribed. * @deprecated use detachAll. */ unsubscribeAll: function() { return this.detachAll.apply(this, arguments); }, /** * Removes all listeners * @method detachAll * @return {int} The number of listeners unsubscribed. */ detachAll: function() { return this.detach(); }, /** * Deletes the subscriber from the internal store of on() and after() * subscribers. * * @method _delete * @param s subscriber object. * @param subs (optional) on or after subscriber array * @param index (optional) The index found. * @private */ _delete: function(s, subs, i) { var when = s._when; if (!subs) { subs = (when === AFTER) ? this._afters : this._subscribers; i = YArray.indexOf(subs, s, 0); } if (s && subs[i] === s) { subs.splice(i, 1); } if (this._kds) { if (when === AFTER) { delete this.afters[s.id]; } else { delete this.subscribers[s.id]; } } if (this.monitored && this.host) { this.host._monitor('detach', this, { ce: this, sub: s }); } if (s) { s.deleted = true; } } }; /** * Stores the subscriber information to be used when the event fires. * @param {Function} fn The wrapped function to execute. * @param {Object} context The value of the keyword 'this' in the listener. * @param {Array} args* 0..n additional arguments to supply the listener. * * @class Subscriber * @constructor */ Y.Subscriber = function(fn, context, args, when) { /** * The callback that will be execute when the event fires * This is wrapped by Y.rbind if obj was supplied. * @property fn * @type Function */ this.fn = fn; /** * Optional 'this' keyword for the listener * @property context * @type Object */ this.context = context; /** * Unique subscriber id * @property id * @type String */ this.id = Y.stamp(this); /** * Additional arguments to propagate to the subscriber * @property args * @type Array */ this.args = args; this._when = when; /** * Custom events for a given fire transaction. * @property events * @type {EventTarget} */ // this.events = null; /** * This listener only reacts to the event once * @property once */ // this.once = false; }; Y.Subscriber.prototype = { constructor: Y.Subscriber, _notify: function(c, args, ce) { if (this.deleted && !this.postponed) { if (this.postponed) { delete this.fn; delete this.context; } else { delete this.postponed; return null; } } var a = this.args, ret; switch (ce.signature) { case 0: ret = this.fn.call(c, ce.type, args, c); break; case 1: ret = this.fn.call(c, args[0] || null, c); break; default: if (a || args) { args = args || []; a = (a) ? args.concat(a) : args; ret = this.fn.apply(c, a); } else { ret = this.fn.call(c); } } if (this.once) { ce._delete(this); } return ret; }, /** * Executes the subscriber. * @method notify * @param args {Array} Arguments array for the subscriber. * @param ce {CustomEvent} The custom event that sent the notification. */ notify: function(args, ce) { var c = this.context, ret = true; if (!c) { c = (ce.contextFn) ? ce.contextFn() : ce.context; } // only catch errors if we will not re-throw them. if (Y.config && Y.config.throwFail) { ret = this._notify(c, args, ce); } else { try { ret = this._notify(c, args, ce); } catch (e) { Y.error(this + ' failed: ' + e.message, e); } } return ret; }, /** * Returns true if the fn and obj match this objects properties. * Used by the unsubscribe method to match the right subscriber. * * @method contains * @param {Function} fn the function to execute. * @param {Object} context optional 'this' keyword for the listener. * @return {boolean} true if the supplied arguments match this * subscriber's signature. */ contains: function(fn, context) { if (context) { return ((this.fn == fn) && this.context == context); } else { return (this.fn == fn); } }, valueOf : function() { return this.id; } }; /** * Return value from all subscribe operations * @class EventHandle * @constructor * @param {CustomEvent} evt the custom event. * @param {Subscriber} sub the subscriber. */ Y.EventHandle = function(evt, sub) { /** * The custom event * * @property evt * @type CustomEvent */ this.evt = evt; /** * The subscriber object * * @property sub * @type Subscriber */ this.sub = sub; }; Y.EventHandle.prototype = { batch: function(f, c) { f.call(c || this, this); if (Y.Lang.isArray(this.evt)) { Y.Array.each(this.evt, function(h) { h.batch.call(c || h, f); }); } }, /** * Detaches this subscriber * @method detach * @return {int} the number of detached listeners */ detach: function() { var evt = this.evt, detached = 0, i; if (evt) { if (Y.Lang.isArray(evt)) { for (i = 0; i < evt.length; i++) { detached += evt[i].detach(); } } else { evt._delete(this.sub); detached = 1; } } return detached; }, /** * Monitor the event state for the subscribed event. The first parameter * is what should be monitored, the rest are the normal parameters when * subscribing to an event. * @method monitor * @param what {string} what to monitor ('attach', 'detach', 'publish'). * @return {EventHandle} return value from the monitor event subscription. */ monitor: function(what) { return this.evt.monitor.apply(this.evt, arguments); } }; /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom * @submodule event-custom-base */ /** * EventTarget provides the implementation for any object to * publish, subscribe and fire to custom events, and also * alows other EventTargets to target the object with events * sourced from the other object. * EventTarget is designed to be used with Y.augment to wrap * EventCustom in an interface that allows events to be listened to * and fired by name. This makes it possible for implementing code to * subscribe to an event that either has not been created yet, or will * not be created at all. * @class EventTarget * @param opts a configuration object * @config emitFacade {boolean} if true, all events will emit event * facade payloads by default (default false) * @config prefix {String} the prefix to apply to non-prefixed event names */ var L = Y.Lang, PREFIX_DELIMITER = ':', CATEGORY_DELIMITER = '|', AFTER_PREFIX = '~AFTER~', WILD_TYPE_RE = /(.*?)(:)(.*?)/, _wildType = Y.cached(function(type) { return type.replace(WILD_TYPE_RE, "*$2$3"); }), /** * If the instance has a prefix attribute and the * event type is not prefixed, the instance prefix is * applied to the supplied type. * @method _getType * @private */ _getType = Y.cached(function(type, pre) { if (!pre || (typeof type !== "string") || type.indexOf(PREFIX_DELIMITER) > -1) { return type; } return pre + PREFIX_DELIMITER + type; }), /** * Returns an array with the detach key (if provided), * and the prefixed event name from _getType * Y.on('detachcategory| menu:click', fn) * @method _parseType * @private */ _parseType = Y.cached(function(type, pre) { var t = type, detachcategory, after, i; if (!L.isString(t)) { return t; } i = t.indexOf(AFTER_PREFIX); if (i > -1) { after = true; t = t.substr(AFTER_PREFIX.length); } i = t.indexOf(CATEGORY_DELIMITER); if (i > -1) { detachcategory = t.substr(0, (i)); t = t.substr(i+1); if (t == '*') { t = null; } } // detach category, full type with instance prefix, is this an after listener, short type return [detachcategory, (pre) ? _getType(t, pre) : t, after, t]; }), ET = function(opts) { var o = (L.isObject(opts)) ? opts : {}; this._yuievt = this._yuievt || { id: Y.guid(), events: {}, targets: {}, config: o, chain: ('chain' in o) ? o.chain : Y.config.chain, bubbling: false, defaults: { context: o.context || this, host: this, emitFacade: o.emitFacade, fireOnce: o.fireOnce, queuable: o.queuable, monitored: o.monitored, broadcast: o.broadcast, defaultTargetOnly: o.defaultTargetOnly, bubbles: ('bubbles' in o) ? o.bubbles : true } }; }; ET.prototype = { constructor: ET, /** * Listen to a custom event hosted by this object one time. * This is the equivalent to <code>on</code> except the * listener is immediatelly detached when it is executed. * @method once * @param {String} type The name of the event * @param {Function} fn The callback to execute in response to the event * @param {Object} [context] Override `this` object in callback * @param {Any} [arg*] 0..n additional arguments to supply to the subscriber * @return {EventHandle} A subscription handle capable of detaching the * subscription */ once: function() { var handle = this.on.apply(this, arguments); handle.batch(function(hand) { if (hand.sub) { hand.sub.once = true; } }); return handle; }, /** * Listen to a custom event hosted by this object one time. * This is the equivalent to <code>after</code> except the * listener is immediatelly detached when it is executed. * @method onceAfter * @param {String} type The name of the event * @param {Function} fn The callback to execute in response to the event * @param {Object} [context] Override `this` object in callback * @param {Any} [arg*] 0..n additional arguments to supply to the subscriber * @return {EventHandle} A subscription handle capable of detaching that * subscription */ onceAfter: function() { var handle = this.after.apply(this, arguments); handle.batch(function(hand) { if (hand.sub) { hand.sub.once = true; } }); return handle; }, /** * Takes the type parameter passed to 'on' and parses out the * various pieces that could be included in the type. If the * event type is passed without a prefix, it will be expanded * to include the prefix one is supplied or the event target * is configured with a default prefix. * @method parseType * @param {String} type the type * @param {String} [pre=this._yuievt.config.prefix] the prefix * @since 3.3.0 * @return {Array} an array containing: * * the detach category, if supplied, * * the prefixed event type, * * whether or not this is an after listener, * * the supplied event type */ parseType: function(type, pre) { return _parseType(type, pre || this._yuievt.config.prefix); }, /** * Subscribe a callback function to a custom event fired by this object or * from an object that bubbles its events to this object. * * Callback functions for events published with `emitFacade = true` will * receive an `EventFacade` as the first argument (typically named "e"). * These callbacks can then call `e.preventDefault()` to disable the * behavior published to that event's `defaultFn`. See the `EventFacade` * API for all available properties and methods. Subscribers to * non-`emitFacade` events will receive the arguments passed to `fire()` * after the event name. * * To subscribe to multiple events at once, pass an object as the first * argument, where the key:value pairs correspond to the eventName:callback, * or pass an array of event names as the first argument to subscribe to * all listed events with the same callback. * * Returning `false` from a callback is supported as an alternative to * calling `e.preventDefault(); e.stopPropagation();`. However, it is * recommended to use the event methods whenever possible. * * @method on * @param {String} type The name of the event * @param {Function} fn The callback to execute in response to the event * @param {Object} [context] Override `this` object in callback * @param {Any} [arg*] 0..n additional arguments to supply to the subscriber * @return {EventHandle} A subscription handle capable of detaching that * subscription */ on: function(type, fn, context) { var yuievt = this._yuievt, parts = _parseType(type, yuievt.config.prefix), f, c, args, ret, ce, detachcategory, handle, store = Y.Env.evt.handles, after, adapt, shorttype, Node = Y.Node, n, domevent, isArr; // full name, args, detachcategory, after this._monitor('attach', parts[1], { args: arguments, category: parts[0], after: parts[2] }); if (L.isObject(type)) { if (L.isFunction(type)) { return Y.Do.before.apply(Y.Do, arguments); } f = fn; c = context; args = nativeSlice.call(arguments, 0); ret = []; if (L.isArray(type)) { isArr = true; } after = type._after; delete type._after; Y.each(type, function(v, k) { if (L.isObject(v)) { f = v.fn || ((L.isFunction(v)) ? v : f); c = v.context || c; } var nv = (after) ? AFTER_PREFIX : ''; args[0] = nv + ((isArr) ? v : k); args[1] = f; args[2] = c; ret.push(this.on.apply(this, args)); }, this); return (yuievt.chain) ? this : new Y.EventHandle(ret); } detachcategory = parts[0]; after = parts[2]; shorttype = parts[3]; // extra redirection so we catch adaptor events too. take a look at this. if (Node && Y.instanceOf(this, Node) && (shorttype in Node.DOM_EVENTS)) { args = nativeSlice.call(arguments, 0); args.splice(2, 0, Node.getDOMNode(this)); return Y.on.apply(Y, args); } type = parts[1]; if (Y.instanceOf(this, YUI)) { adapt = Y.Env.evt.plugins[type]; args = nativeSlice.call(arguments, 0); args[0] = shorttype; if (Node) { n = args[2]; if (Y.instanceOf(n, Y.NodeList)) { n = Y.NodeList.getDOMNodes(n); } else if (Y.instanceOf(n, Node)) { n = Node.getDOMNode(n); } domevent = (shorttype in Node.DOM_EVENTS); // Captures both DOM events and event plugins. if (domevent) { args[2] = n; } } // check for the existance of an event adaptor if (adapt) { handle = adapt.on.apply(Y, args); } else if ((!type) || domevent) { handle = Y.Event._attach(args); } } if (!handle) { ce = yuievt.events[type] || this.publish(type); handle = ce._on(fn, context, (arguments.length > 3) ? nativeSlice.call(arguments, 3) : null, (after) ? 'after' : true); } if (detachcategory) { store[detachcategory] = store[detachcategory] || {}; store[detachcategory][type] = store[detachcategory][type] || []; store[detachcategory][type].push(handle); } return (yuievt.chain) ? this : handle; }, /** * subscribe to an event * @method subscribe * @deprecated use on */ subscribe: function() { return this.on.apply(this, arguments); }, /** * Detach one or more listeners the from the specified event * @method detach * @param type {string|Object} Either the handle to the subscriber or the * type of event. If the type * is not specified, it will attempt to remove * the listener from all hosted events. * @param fn {Function} The subscribed function to unsubscribe, if not * supplied, all subscribers will be removed. * @param context {Object} The custom object passed to subscribe. This is * optional, but if supplied will be used to * disambiguate multiple listeners that are the same * (e.g., you subscribe many object using a function * that lives on the prototype) * @return {EventTarget} the host */ detach: function(type, fn, context) { var evts = this._yuievt.events, i, Node = Y.Node, isNode = Node && (Y.instanceOf(this, Node)); // detachAll disabled on the Y instance. if (!type && (this !== Y)) { for (i in evts) { if (evts.hasOwnProperty(i)) { evts[i].detach(fn, context); } } if (isNode) { Y.Event.purgeElement(Node.getDOMNode(this)); } return this; } var parts = _parseType(type, this._yuievt.config.prefix), detachcategory = L.isArray(parts) ? parts[0] : null, shorttype = (parts) ? parts[3] : null, adapt, store = Y.Env.evt.handles, detachhost, cat, args, ce, keyDetacher = function(lcat, ltype, host) { var handles = lcat[ltype], ce, i; if (handles) { for (i = handles.length - 1; i >= 0; --i) { ce = handles[i].evt; if (ce.host === host || ce.el === host) { handles[i].detach(); } } } }; if (detachcategory) { cat = store[detachcategory]; type = parts[1]; detachhost = (isNode) ? Y.Node.getDOMNode(this) : this; if (cat) { if (type) { keyDetacher(cat, type, detachhost); } else { for (i in cat) { if (cat.hasOwnProperty(i)) { keyDetacher(cat, i, detachhost); } } } return this; } // If this is an event handle, use it to detach } else if (L.isObject(type) && type.detach) { type.detach(); return this; // extra redirection so we catch adaptor events too. take a look at this. } else if (isNode && ((!shorttype) || (shorttype in Node.DOM_EVENTS))) { args = nativeSlice.call(arguments, 0); args[2] = Node.getDOMNode(this); Y.detach.apply(Y, args); return this; } adapt = Y.Env.evt.plugins[shorttype]; // The YUI instance handles DOM events and adaptors if (Y.instanceOf(this, YUI)) { args = nativeSlice.call(arguments, 0); // use the adaptor specific detach code if if (adapt && adapt.detach) { adapt.detach.apply(Y, args); return this; // DOM event fork } else if (!type || (!adapt && Node && (type in Node.DOM_EVENTS))) { args[0] = type; Y.Event.detach.apply(Y.Event, args); return this; } } // ce = evts[type]; ce = evts[parts[1]]; if (ce) { ce.detach(fn, context); } return this; }, /** * detach a listener * @method unsubscribe * @deprecated use detach */ unsubscribe: function() { return this.detach.apply(this, arguments); }, /** * Removes all listeners from the specified event. If the event type * is not specified, all listeners from all hosted custom events will * be removed. * @method detachAll * @param type {String} The type, or name of the event */ detachAll: function(type) { return this.detach(type); }, /** * Removes all listeners from the specified event. If the event type * is not specified, all listeners from all hosted custom events will * be removed. * @method unsubscribeAll * @param type {String} The type, or name of the event * @deprecated use detachAll */ unsubscribeAll: function() { return this.detachAll.apply(this, arguments); }, /** * Creates a new custom event of the specified type. If a custom event * by that name already exists, it will not be re-created. In either * case the custom event is returned. * * @method publish * * @param type {String} the type, or name of the event * @param opts {object} optional config params. Valid properties are: * * <ul> * <li> * 'broadcast': whether or not the YUI instance and YUI global are notified when the event is fired (false) * </li> * <li> * 'bubbles': whether or not this event bubbles (true) * Events can only bubble if emitFacade is true. * </li> * <li> * 'context': the default execution context for the listeners (this) * </li> * <li> * 'defaultFn': the default function to execute when this event fires if preventDefault was not called * </li> * <li> * 'emitFacade': whether or not this event emits a facade (false) * </li> * <li> * 'prefix': the prefix for this targets events, e.g., 'menu' in 'menu:click' * </li> * <li> * 'fireOnce': if an event is configured to fire once, new subscribers after * the fire will be notified immediately. * </li> * <li> * 'async': fireOnce event listeners will fire synchronously if the event has already * fired unless async is true. * </li> * <li> * 'preventable': whether or not preventDefault() has an effect (true) * </li> * <li> * 'preventedFn': a function that is executed when preventDefault is called * </li> * <li> * 'queuable': whether or not this event can be queued during bubbling (false) * </li> * <li> * 'silent': if silent is true, debug messages are not provided for this event. * </li> * <li> * 'stoppedFn': a function that is executed when stopPropagation is called * </li> * * <li> * 'monitored': specifies whether or not this event should send notifications about * when the event has been attached, detached, or published. * </li> * <li> * 'type': the event type (valid option if not provided as the first parameter to publish) * </li> * </ul> * * @return {CustomEvent} the custom event * */ publish: function(type, opts) { var events, ce, ret, defaults, edata = this._yuievt, pre = edata.config.prefix; if (L.isObject(type)) { ret = {}; Y.each(type, function(v, k) { ret[k] = this.publish(k, v || opts); }, this); return ret; } type = (pre) ? _getType(type, pre) : type; events = edata.events; ce = events[type]; this._monitor('publish', type, { args: arguments }); if (ce) { // ce.log("publish applying new config to published event: '"+type+"' exists", 'info', 'event'); if (opts) { ce.applyConfig(opts, true); } } else { // TODO: Lazy publish goes here. defaults = edata.defaults; // apply defaults ce = new Y.CustomEvent(type, defaults); if (opts) { ce.applyConfig(opts, true); } events[type] = ce; } // make sure we turn the broadcast flag off if this // event was published as a result of bubbling // if (opts instanceof Y.CustomEvent) { // events[type].broadcast = false; // } return events[type]; }, /** * This is the entry point for the event monitoring system. * You can monitor 'attach', 'detach', 'fire', and 'publish'. * When configured, these events generate an event. click -> * click_attach, click_detach, click_publish -- these can * be subscribed to like other events to monitor the event * system. Inividual published events can have monitoring * turned on or off (publish can't be turned off before it * it published) by setting the events 'monitor' config. * * @method _monitor * @param what {String} 'attach', 'detach', 'fire', or 'publish' * @param eventType {String|CustomEvent} The prefixed name of the event being monitored, or the CustomEvent object. * @param o {Object} Information about the event interaction, such as * fire() args, subscription category, publish config * @private */ _monitor: function(what, eventType, o) { var monitorevt, ce, type; if (eventType) { if (typeof eventType === "string") { type = eventType; ce = this.getEvent(eventType, true); } else { ce = eventType; type = eventType.type; } if ((this._yuievt.config.monitored && (!ce || ce.monitored)) || (ce && ce.monitored)) { monitorevt = type + '_' + what; o.monitored = what; this.fire.call(this, monitorevt, o); } } }, /** * Fire a custom event by name. The callback functions will be executed * from the context specified when the event was created, and with the * following parameters. * * If the custom event object hasn't been created, then the event hasn't * been published and it has no subscribers. For performance sake, we * immediate exit in this case. This means the event won't bubble, so * if the intention is that a bubble target be notified, the event must * be published on this object first. * * The first argument is the event type, and any additional arguments are * passed to the listeners as parameters. If the first of these is an * object literal, and the event is configured to emit an event facade, * that object is mixed into the event facade and the facade is provided * in place of the original object. * * @method fire * @param type {String|Object} The type of the event, or an object that contains * a 'type' property. * @param arguments {Object*} an arbitrary set of parameters to pass to * the handler. If the first of these is an object literal and the event is * configured to emit an event facade, the event facade will replace that * parameter after the properties the object literal contains are copied to * the event facade. * @return {EventTarget} the event host */ fire: function(type) { var typeIncluded = L.isString(type), t = (typeIncluded) ? type : (type && type.type), yuievt = this._yuievt, pre = yuievt.config.prefix, ce, ret, ce2, args = (typeIncluded) ? nativeSlice.call(arguments, 1) : arguments; t = (pre) ? _getType(t, pre) : t; ce = this.getEvent(t, true); ce2 = this.getSibling(t, ce); if (ce2 && !ce) { ce = this.publish(t); } this._monitor('fire', (ce || t), { args: args }); // this event has not been published or subscribed to if (!ce) { if (yuievt.hasTargets) { return this.bubble({ type: t }, args, this); } // otherwise there is nothing to be done ret = true; } else { ce.sibling = ce2; ret = ce.fire.apply(ce, args); } return (yuievt.chain) ? this : ret; }, getSibling: function(type, ce) { var ce2; // delegate to *:type events if there are subscribers if (type.indexOf(PREFIX_DELIMITER) > -1) { type = _wildType(type); // console.log(type); ce2 = this.getEvent(type, true); if (ce2) { // console.log("GOT ONE: " + type); ce2.applyConfig(ce); ce2.bubbles = false; ce2.broadcast = 0; // ret = ce2.fire.apply(ce2, a); } } return ce2; }, /** * Returns the custom event of the provided type has been created, a * falsy value otherwise * @method getEvent * @param type {String} the type, or name of the event * @param prefixed {String} if true, the type is prefixed already * @return {CustomEvent} the custom event or null */ getEvent: function(type, prefixed) { var pre, e; if (!prefixed) { pre = this._yuievt.config.prefix; type = (pre) ? _getType(type, pre) : type; } e = this._yuievt.events; return e[type] || null; }, /** * Subscribe to a custom event hosted by this object. The * supplied callback will execute after any listeners add * via the subscribe method, and after the default function, * if configured for the event, has executed. * * @method after * @param {String} type The name of the event * @param {Function} fn The callback to execute in response to the event * @param {Object} [context] Override `this` object in callback * @param {Any} [arg*] 0..n additional arguments to supply to the subscriber * @return {EventHandle} A subscription handle capable of detaching the * subscription */ after: function(type, fn) { var a = nativeSlice.call(arguments, 0); switch (L.type(type)) { case 'function': return Y.Do.after.apply(Y.Do, arguments); case 'array': // YArray.each(a[0], function(v) { // v = AFTER_PREFIX + v; // }); // break; case 'object': a[0]._after = true; break; default: a[0] = AFTER_PREFIX + type; } return this.on.apply(this, a); }, /** * Executes the callback before a DOM event, custom event * or method. If the first argument is a function, it * is assumed the target is a method. For DOM and custom * events, this is an alias for Y.on. * * For DOM and custom events: * type, callback, context, 0-n arguments * * For methods: * callback, object (method host), methodName, context, 0-n arguments * * @method before * @return detach handle */ before: function() { return this.on.apply(this, arguments); } }; Y.EventTarget = ET; // make Y an event target Y.mix(Y, ET.prototype); ET.call(Y, { bubbles: false }); YUI.Env.globalEvents = YUI.Env.globalEvents || new ET(); /** * Hosts YUI page level events. This is where events bubble to * when the broadcast config is set to 2. This property is * only available if the custom event module is loaded. * @property Global * @type EventTarget * @for YUI */ Y.Global = YUI.Env.globalEvents; // @TODO implement a global namespace function on Y.Global? /** `Y.on()` can do many things: <ul> <li>Subscribe to custom events `publish`ed and `fire`d from Y</li> <li>Subscribe to custom events `publish`ed with `broadcast` 1 or 2 and `fire`d from any object in the YUI instance sandbox</li> <li>Subscribe to DOM events</li> <li>Subscribe to the execution of a method on any object, effectively treating that method as an event</li> </ul> For custom event subscriptions, pass the custom event name as the first argument and callback as the second. The `this` object in the callback will be `Y` unless an override is passed as the third argument. Y.on('io:complete', function () { Y.MyApp.updateStatus('Transaction complete'); }); To subscribe to DOM events, pass the name of a DOM event as the first argument and a CSS selector string as the third argument after the callback function. Alternately, the third argument can be a `Node`, `NodeList`, `HTMLElement`, array, or simply omitted (the default is the `window` object). Y.on('click', function (e) { e.preventDefault(); // proceed with ajax form submission var url = this.get('action'); ... }, '#my-form'); The `this` object in DOM event callbacks will be the `Node` targeted by the CSS selector or other identifier. `on()` subscribers for DOM events or custom events `publish`ed with a `defaultFn` can prevent the default behavior with `e.preventDefault()` from the event object passed as the first parameter to the subscription callback. To subscribe to the execution of an object method, pass arguments corresponding to the call signature for <a href="../classes/Do.html#methods_before">`Y.Do.before(...)`</a>. NOTE: The formal parameter list below is for events, not for function injection. See `Y.Do.before` for that signature. @method on @param {String} type DOM or custom event name @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [arg*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching the subscription @see Do.before @for YUI **/ /** Listen for an event one time. Equivalent to `on()`, except that the listener is immediately detached when executed. See the <a href="#methods_on">`on()` method</a> for additional subscription options. @see on @method once @param {String} type DOM or custom event name @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [arg*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching the subscription @for YUI **/ /** Listen for an event one time. Equivalent to `once()`, except, like `after()`, the subscription callback executes after all `on()` subscribers and the event's `defaultFn` (if configured) have executed. Like `after()` if any `on()` phase subscriber calls `e.preventDefault()`, neither the `defaultFn` nor the `after()` subscribers will execute. The listener is immediately detached when executed. See the <a href="#methods_on">`on()` method</a> for additional subscription options. @see once @method onceAfter @param {String} type The custom event name @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [arg*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching the subscription @for YUI **/ /** Like `on()`, this method creates a subscription to a custom event or to the execution of a method on an object. For events, `after()` subscribers are executed after the event's `defaultFn` unless `e.preventDefault()` was called from an `on()` subscriber. See the <a href="#methods_on">`on()` method</a> for additional subscription options. NOTE: The subscription signature shown is for events, not for function injection. See <a href="../classes/Do.html#methods_after">`Y.Do.after`</a> for that signature. @see on @see Do.after @method after @param {String} type The custom event name @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [args*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching the subscription @for YUI **/ }, '@VERSION@', {"requires": ["oop"]}); YUI.add('event-custom-complex', function (Y, NAME) { /** * Adds event facades, preventable default behavior, and bubbling. * events. * @module event-custom * @submodule event-custom-complex */ var FACADE, FACADE_KEYS, key, EMPTY = {}, CEProto = Y.CustomEvent.prototype, ETProto = Y.EventTarget.prototype, mixFacadeProps = function(facade, payload) { var p; for (p in payload) { if (!(FACADE_KEYS.hasOwnProperty(p))) { facade[p] = payload[p]; } } }; /** * Wraps and protects a custom event for use when emitFacade is set to true. * Requires the event-custom-complex module * @class EventFacade * @param e {Event} the custom event * @param currentTarget {HTMLElement} the element the listener was attached to */ Y.EventFacade = function(e, currentTarget) { e = e || EMPTY; this._event = e; /** * The arguments passed to fire * @property details * @type Array */ this.details = e.details; /** * The event type, this can be overridden by the fire() payload * @property type * @type string */ this.type = e.type; /** * The real event type * @property _type * @type string * @private */ this._type = e.type; ////////////////////////////////////////////////////// /** * Node reference for the targeted eventtarget * @property target * @type Node */ this.target = e.target; /** * Node reference for the element that the listener was attached to. * @property currentTarget * @type Node */ this.currentTarget = currentTarget; /** * Node reference to the relatedTarget * @property relatedTarget * @type Node */ this.relatedTarget = e.relatedTarget; }; Y.mix(Y.EventFacade.prototype, { /** * Stops the propagation to the next bubble target * @method stopPropagation */ stopPropagation: function() { this._event.stopPropagation(); this.stopped = 1; }, /** * Stops the propagation to the next bubble target and * prevents any additional listeners from being exectued * on the current target. * @method stopImmediatePropagation */ stopImmediatePropagation: function() { this._event.stopImmediatePropagation(); this.stopped = 2; }, /** * Prevents the event's default behavior * @method preventDefault */ preventDefault: function() { this._event.preventDefault(); this.prevented = 1; }, /** * Stops the event propagation and prevents the default * event behavior. * @method halt * @param immediate {boolean} if true additional listeners * on the current target will not be executed */ halt: function(immediate) { this._event.halt(immediate); this.prevented = 1; this.stopped = (immediate) ? 2 : 1; } }); CEProto.fireComplex = function(args) { var es, ef, q, queue, ce, ret, events, subs, postponed, self = this, host = self.host || self, next, oldbubble; if (self.stack) { // queue this event if the current item in the queue bubbles if (self.queuable && self.type != self.stack.next.type) { self.log('queue ' + self.type); self.stack.queue.push([self, args]); return true; } } es = self.stack || { // id of the first event in the stack id: self.id, next: self, silent: self.silent, stopped: 0, prevented: 0, bubbling: null, type: self.type, // defaultFnQueue: new Y.Queue(), afterQueue: new Y.Queue(), defaultTargetOnly: self.defaultTargetOnly, queue: [] }; subs = self.getSubs(); self.stopped = (self.type !== es.type) ? 0 : es.stopped; self.prevented = (self.type !== es.type) ? 0 : es.prevented; self.target = self.target || host; if (self.stoppedFn) { events = new Y.EventTarget({ fireOnce: true, context: host }); self.events = events; events.on('stopped', self.stoppedFn); } self.currentTarget = host; self.details = args.slice(); // original arguments in the details // self.log("Firing " + self + ", " + "args: " + args); self.log("Firing " + self.type); self._facade = null; // kill facade to eliminate stale properties ef = self._getFacade(args); if (Y.Lang.isObject(args[0])) { args[0] = ef; } else { args.unshift(ef); } if (subs[0]) { self._procSubs(subs[0], args, ef); } // bubble if this is hosted in an event target and propagation has not been stopped if (self.bubbles && host.bubble && !self.stopped) { oldbubble = es.bubbling; es.bubbling = self.type; if (es.type != self.type) { es.stopped = 0; es.prevented = 0; } ret = host.bubble(self, args, null, es); self.stopped = Math.max(self.stopped, es.stopped); self.prevented = Math.max(self.prevented, es.prevented); es.bubbling = oldbubble; } if (self.prevented) { if (self.preventedFn) { self.preventedFn.apply(host, args); } } else if (self.defaultFn && ((!self.defaultTargetOnly && !es.defaultTargetOnly) || host === ef.target)) { self.defaultFn.apply(host, args); } // broadcast listeners are fired as discreet events on the // YUI instance and potentially the YUI global. self._broadcast(args); // Queue the after if (subs[1] && !self.prevented && self.stopped < 2) { if (es.id === self.id || self.type != host._yuievt.bubbling) { self._procSubs(subs[1], args, ef); while ((next = es.afterQueue.last())) { next(); } } else { postponed = subs[1]; if (es.execDefaultCnt) { postponed = Y.merge(postponed); Y.each(postponed, function(s) { s.postponed = true; }); } es.afterQueue.add(function() { self._procSubs(postponed, args, ef); }); } } self.target = null; if (es.id === self.id) { queue = es.queue; while (queue.length) { q = queue.pop(); ce = q[0]; // set up stack to allow the next item to be processed es.next = ce; ce.fire.apply(ce, q[1]); } self.stack = null; } ret = !(self.stopped); if (self.type != host._yuievt.bubbling) { es.stopped = 0; es.prevented = 0; self.stopped = 0; self.prevented = 0; } // Kill the cached facade to free up memory. // Otherwise we have the facade from the last fire, sitting around forever. self._facade = null; return ret; }; CEProto._getFacade = function() { var ef = this._facade, o, args = this.details; if (!ef) { ef = new Y.EventFacade(this, this.currentTarget); } // if the first argument is an object literal, apply the // properties to the event facade o = args && args[0]; if (Y.Lang.isObject(o, true)) { // protect the event facade properties mixFacadeProps(ef, o); // Allow the event type to be faked // http://yuilibrary.com/projects/yui3/ticket/2528376 ef.type = o.type || ef.type; } // update the details field with the arguments // ef.type = this.type; ef.details = this.details; // use the original target when the event bubbled to this target ef.target = this.originalTarget || this.target; ef.currentTarget = this.currentTarget; ef.stopped = 0; ef.prevented = 0; this._facade = ef; return this._facade; }; /** * Stop propagation to bubble targets * @for CustomEvent * @method stopPropagation */ CEProto.stopPropagation = function() { this.stopped = 1; if (this.stack) { this.stack.stopped = 1; } if (this.events) { this.events.fire('stopped', this); } }; /** * Stops propagation to bubble targets, and prevents any remaining * subscribers on the current target from executing. * @method stopImmediatePropagation */ CEProto.stopImmediatePropagation = function() { this.stopped = 2; if (this.stack) { this.stack.stopped = 2; } if (this.events) { this.events.fire('stopped', this); } }; /** * Prevents the execution of this event's defaultFn * @method preventDefault */ CEProto.preventDefault = function() { if (this.preventable) { this.prevented = 1; if (this.stack) { this.stack.prevented = 1; } } }; /** * Stops the event propagation and prevents the default * event behavior. * @method halt * @param immediate {boolean} if true additional listeners * on the current target will not be executed */ CEProto.halt = function(immediate) { if (immediate) { this.stopImmediatePropagation(); } else { this.stopPropagation(); } this.preventDefault(); }; /** * Registers another EventTarget as a bubble target. Bubble order * is determined by the order registered. Multiple targets can * be specified. * * Events can only bubble if emitFacade is true. * * Included in the event-custom-complex submodule. * * @method addTarget * @param o {EventTarget} the target to add * @for EventTarget */ ETProto.addTarget = function(o) { this._yuievt.targets[Y.stamp(o)] = o; this._yuievt.hasTargets = true; }; /** * Returns an array of bubble targets for this object. * @method getTargets * @return EventTarget[] */ ETProto.getTargets = function() { return Y.Object.values(this._yuievt.targets); }; /** * Removes a bubble target * @method removeTarget * @param o {EventTarget} the target to remove * @for EventTarget */ ETProto.removeTarget = function(o) { delete this._yuievt.targets[Y.stamp(o)]; }; /** * Propagate an event. Requires the event-custom-complex module. * @method bubble * @param evt {CustomEvent} the custom event to propagate * @return {boolean} the aggregated return value from Event.Custom.fire * @for EventTarget */ ETProto.bubble = function(evt, args, target, es) { var targs = this._yuievt.targets, ret = true, t, type = evt && evt.type, ce, i, bc, ce2, originalTarget = target || (evt && evt.target) || this, oldbubble; if (!evt || ((!evt.stopped) && targs)) { for (i in targs) { if (targs.hasOwnProperty(i)) { t = targs[i]; ce = t.getEvent(type, true); ce2 = t.getSibling(type, ce); if (ce2 && !ce) { ce = t.publish(type); } oldbubble = t._yuievt.bubbling; t._yuievt.bubbling = type; // if this event was not published on the bubble target, // continue propagating the event. if (!ce) { if (t._yuievt.hasTargets) { t.bubble(evt, args, originalTarget, es); } } else { ce.sibling = ce2; // set the original target to that the target payload on the // facade is correct. ce.target = originalTarget; ce.originalTarget = originalTarget; ce.currentTarget = t; bc = ce.broadcast; ce.broadcast = false; // default publish may not have emitFacade true -- that // shouldn't be what the implementer meant to do ce.emitFacade = true; ce.stack = es; ret = ret && ce.fire.apply(ce, args || evt.details || []); ce.broadcast = bc; ce.originalTarget = null; // stopPropagation() was called if (ce.stopped) { break; } } t._yuievt.bubbling = oldbubble; } } } return ret; }; FACADE = new Y.EventFacade(); FACADE_KEYS = {}; // Flatten whitelist for (key in FACADE) { FACADE_KEYS[key] = true; } }, '@VERSION@', {"requires": ["event-custom-base"]}); YUI.add('node-core', function (Y, NAME) { /** * The Node Utility provides a DOM-like interface for interacting with DOM nodes. * @module node * @main node * @submodule node-core */ /** * The Node class provides a wrapper for manipulating DOM Nodes. * Node properties can be accessed via the set/get methods. * Use `Y.one()` to retrieve Node instances. * * <strong>NOTE:</strong> Node properties are accessed using * the <code>set</code> and <code>get</code> methods. * * @class Node * @constructor * @param {DOMNode} node the DOM node to be mapped to the Node instance. * @uses EventTarget */ // "globals" var DOT = '.', NODE_NAME = 'nodeName', NODE_TYPE = 'nodeType', OWNER_DOCUMENT = 'ownerDocument', TAG_NAME = 'tagName', UID = '_yuid', EMPTY_OBJ = {}, _slice = Array.prototype.slice, Y_DOM = Y.DOM, Y_Node = function(node) { if (!this.getDOMNode) { // support optional "new" return new Y_Node(node); } if (typeof node == 'string') { node = Y_Node._fromString(node); if (!node) { return null; // NOTE: return } } var uid = (node.nodeType !== 9) ? node.uniqueID : node[UID]; if (uid && Y_Node._instances[uid] && Y_Node._instances[uid]._node !== node) { node[UID] = null; // unset existing uid to prevent collision (via clone or hack) } uid = uid || Y.stamp(node); if (!uid) { // stamp failed; likely IE non-HTMLElement uid = Y.guid(); } this[UID] = uid; /** * The underlying DOM node bound to the Y.Node instance * @property _node * @type DOMNode * @private */ this._node = node; this._stateProxy = node; // when augmented with Attribute if (this._initPlugins) { // when augmented with Plugin.Host this._initPlugins(); } }, // used with previous/next/ancestor tests _wrapFn = function(fn) { var ret = null; if (fn) { ret = (typeof fn == 'string') ? function(n) { return Y.Selector.test(n, fn); } : function(n) { return fn(Y.one(n)); }; } return ret; }; // end "globals" Y_Node.ATTRS = {}; Y_Node.DOM_EVENTS = {}; Y_Node._fromString = function(node) { if (node) { if (node.indexOf('doc') === 0) { // doc OR document node = Y.config.doc; } else if (node.indexOf('win') === 0) { // win OR window node = Y.config.win; } else { node = Y.Selector.query(node, null, true); } } return node || null; }; /** * The name of the component * @static * @type String * @property NAME */ Y_Node.NAME = 'node'; /* * The pattern used to identify ARIA attributes */ Y_Node.re_aria = /^(?:role$|aria-)/; Y_Node.SHOW_TRANSITION = 'fadeIn'; Y_Node.HIDE_TRANSITION = 'fadeOut'; /** * A list of Node instances that have been created * @private * @type Object * @property _instances * @static * */ Y_Node._instances = {}; /** * Retrieves the DOM node bound to a Node instance * @method getDOMNode * @static * * @param {Node | HTMLNode} node The Node instance or an HTMLNode * @return {HTMLNode} The DOM node bound to the Node instance. If a DOM node is passed * as the node argument, it is simply returned. */ Y_Node.getDOMNode = function(node) { if (node) { return (node.nodeType) ? node : node._node || null; } return null; }; /** * Checks Node return values and wraps DOM Nodes as Y.Node instances * and DOM Collections / Arrays as Y.NodeList instances. * Other return values just pass thru. If undefined is returned (e.g. no return) * then the Node instance is returned for chainability. * @method scrubVal * @static * * @param {any} node The Node instance or an HTMLNode * @return {Node | NodeList | Any} Depends on what is returned from the DOM node. */ Y_Node.scrubVal = function(val, node) { if (val) { // only truthy values are risky if (typeof val == 'object' || typeof val == 'function') { // safari nodeList === function if (NODE_TYPE in val || Y_DOM.isWindow(val)) {// node || window val = Y.one(val); } else if ((val.item && !val._nodes) || // dom collection or Node instance (val[0] && val[0][NODE_TYPE])) { // array of DOM Nodes val = Y.all(val); } } } else if (typeof val === 'undefined') { val = node; // for chaining } else if (val === null) { val = null; // IE: DOM null not the same as null } return val; }; /** * Adds methods to the Y.Node prototype, routing through scrubVal. * @method addMethod * @static * * @param {String} name The name of the method to add * @param {Function} fn The function that becomes the method * @param {Object} context An optional context to call the method with * (defaults to the Node instance) * @return {any} Depends on what is returned from the DOM node. */ Y_Node.addMethod = function(name, fn, context) { if (name && fn && typeof fn == 'function') { Y_Node.prototype[name] = function() { var args = _slice.call(arguments), node = this, ret; if (args[0] && args[0]._node) { args[0] = args[0]._node; } if (args[1] && args[1]._node) { args[1] = args[1]._node; } args.unshift(node._node); ret = fn.apply(node, args); if (ret) { // scrub truthy ret = Y_Node.scrubVal(ret, node); } (typeof ret != 'undefined') || (ret = node); return ret; }; } else { } }; /** * Imports utility methods to be added as Y.Node methods. * @method importMethod * @static * * @param {Object} host The object that contains the method to import. * @param {String} name The name of the method to import * @param {String} altName An optional name to use in place of the host name * @param {Object} context An optional context to call the method with */ Y_Node.importMethod = function(host, name, altName) { if (typeof name == 'string') { altName = altName || name; Y_Node.addMethod(altName, host[name], host); } else { Y.Array.each(name, function(n) { Y_Node.importMethod(host, n); }); } }; /** * Retrieves a NodeList based on the given CSS selector. * @method all * * @param {string} selector The CSS selector to test against. * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array. * @for YUI */ /** * Returns a single Node instance bound to the node or the * first element matching the given selector. Returns null if no match found. * <strong>Note:</strong> For chaining purposes you may want to * use <code>Y.all</code>, which returns a NodeList when no match is found. * @method one * @param {String | HTMLElement} node a node or Selector * @return {Node | null} a Node instance or null if no match found. * @for YUI */ /** * Returns a single Node instance bound to the node or the * first element matching the given selector. Returns null if no match found. * <strong>Note:</strong> For chaining purposes you may want to * use <code>Y.all</code>, which returns a NodeList when no match is found. * @method one * @static * @param {String | HTMLElement} node a node or Selector * @return {Node | null} a Node instance or null if no match found. * @for Node */ Y_Node.one = function(node) { var instance = null, cachedNode, uid; if (node) { if (typeof node == 'string') { node = Y_Node._fromString(node); if (!node) { return null; // NOTE: return } } else if (node.getDOMNode) { return node; // NOTE: return } if (node.nodeType || Y.DOM.isWindow(node)) { // avoid bad input (numbers, boolean, etc) uid = (node.uniqueID && node.nodeType !== 9) ? node.uniqueID : node._yuid; instance = Y_Node._instances[uid]; // reuse exising instances cachedNode = instance ? instance._node : null; if (!instance || (cachedNode && node !== cachedNode)) { // new Node when nodes don't match instance = new Y_Node(node); if (node.nodeType != 11) { // dont cache document fragment Y_Node._instances[instance[UID]] = instance; // cache node } } } } return instance; }; /** * The default setter for DOM properties * Called with instance context (this === the Node instance) * @method DEFAULT_SETTER * @static * @param {String} name The attribute/property being set * @param {any} val The value to be set * @return {any} The value */ Y_Node.DEFAULT_SETTER = function(name, val) { var node = this._stateProxy, strPath; if (name.indexOf(DOT) > -1) { strPath = name; name = name.split(DOT); // only allow when defined on node Y.Object.setValue(node, name, val); } else if (typeof node[name] != 'undefined') { // pass thru DOM properties node[name] = val; } return val; }; /** * The default getter for DOM properties * Called with instance context (this === the Node instance) * @method DEFAULT_GETTER * @static * @param {String} name The attribute/property to look up * @return {any} The current value */ Y_Node.DEFAULT_GETTER = function(name) { var node = this._stateProxy, val; if (name.indexOf && name.indexOf(DOT) > -1) { val = Y.Object.getValue(node, name.split(DOT)); } else if (typeof node[name] != 'undefined') { // pass thru from DOM val = node[name]; } return val; }; Y.mix(Y_Node.prototype, { DATA_PREFIX: 'data-', /** * The method called when outputting Node instances as strings * @method toString * @return {String} A string representation of the Node instance */ toString: function() { var str = this[UID] + ': not bound to a node', node = this._node, attrs, id, className; if (node) { attrs = node.attributes; id = (attrs && attrs.id) ? node.getAttribute('id') : null; className = (attrs && attrs.className) ? node.getAttribute('className') : null; str = node[NODE_NAME]; if (id) { str += '#' + id; } if (className) { str += '.' + className.replace(' ', '.'); } // TODO: add yuid? str += ' ' + this[UID]; } return str; }, /** * Returns an attribute value on the Node instance. * Unless pre-configured (via `Node.ATTRS`), get hands * off to the underlying DOM node. Only valid * attributes/properties for the node will be queried. * @method get * @param {String} attr The attribute * @return {any} The current value of the attribute */ get: function(attr) { var val; if (this._getAttr) { // use Attribute imple val = this._getAttr(attr); } else { val = this._get(attr); } if (val) { val = Y_Node.scrubVal(val, this); } else if (val === null) { val = null; // IE: DOM null is not true null (even though they ===) } return val; }, /** * Helper method for get. * @method _get * @private * @param {String} attr The attribute * @return {any} The current value of the attribute */ _get: function(attr) { var attrConfig = Y_Node.ATTRS[attr], val; if (attrConfig && attrConfig.getter) { val = attrConfig.getter.call(this); } else if (Y_Node.re_aria.test(attr)) { val = this._node.getAttribute(attr, 2); } else { val = Y_Node.DEFAULT_GETTER.apply(this, arguments); } return val; }, /** * Sets an attribute on the Node instance. * Unless pre-configured (via Node.ATTRS), set hands * off to the underlying DOM node. Only valid * attributes/properties for the node will be set. * To set custom attributes use setAttribute. * @method set * @param {String} attr The attribute to be set. * @param {any} val The value to set the attribute to. * @chainable */ set: function(attr, val) { var attrConfig = Y_Node.ATTRS[attr]; if (this._setAttr) { // use Attribute imple this._setAttr.apply(this, arguments); } else { // use setters inline if (attrConfig && attrConfig.setter) { attrConfig.setter.call(this, val, attr); } else if (Y_Node.re_aria.test(attr)) { // special case Aria this._node.setAttribute(attr, val); } else { Y_Node.DEFAULT_SETTER.apply(this, arguments); } } return this; }, /** * Sets multiple attributes. * @method setAttrs * @param {Object} attrMap an object of name/value pairs to set * @chainable */ setAttrs: function(attrMap) { if (this._setAttrs) { // use Attribute imple this._setAttrs(attrMap); } else { // use setters inline Y.Object.each(attrMap, function(v, n) { this.set(n, v); }, this); } return this; }, /** * Returns an object containing the values for the requested attributes. * @method getAttrs * @param {Array} attrs an array of attributes to get values * @return {Object} An object with attribute name/value pairs. */ getAttrs: function(attrs) { var ret = {}; if (this._getAttrs) { // use Attribute imple this._getAttrs(attrs); } else { // use setters inline Y.Array.each(attrs, function(v, n) { ret[v] = this.get(v); }, this); } return ret; }, /** * Compares nodes to determine if they match. * Node instances can be compared to each other and/or HTMLElements. * @method compareTo * @param {HTMLElement | Node} refNode The reference node to compare to the node. * @return {Boolean} True if the nodes match, false if they do not. */ compareTo: function(refNode) { var node = this._node; if (refNode && refNode._node) { refNode = refNode._node; } return node === refNode; }, /** * Determines whether the node is appended to the document. * @method inDoc * @param {Node|HTMLElement} doc optional An optional document to check against. * Defaults to current document. * @return {Boolean} Whether or not this node is appended to the document. */ inDoc: function(doc) { var node = this._node; doc = (doc) ? doc._node || doc : node[OWNER_DOCUMENT]; if (doc.documentElement) { return Y_DOM.contains(doc.documentElement, node); } }, getById: function(id) { var node = this._node, ret = Y_DOM.byId(id, node[OWNER_DOCUMENT]); if (ret && Y_DOM.contains(node, ret)) { ret = Y.one(ret); } else { ret = null; } return ret; }, /** * Returns the nearest ancestor that passes the test applied by supplied boolean method. * @method ancestor * @param {String | Function} fn A selector string or boolean method for testing elements. * If a function is used, it receives the current node being tested as the only argument. * If fn is not passed as an argument, the parent node will be returned. * @param {Boolean} testSelf optional Whether or not to include the element in the scan * @param {String | Function} stopFn optional A selector string or boolean * method to indicate when the search should stop. The search bails when the function * returns true or the selector matches. * If a function is used, it receives the current node being tested as the only argument. * @return {Node} The matching Node instance or null if not found */ ancestor: function(fn, testSelf, stopFn) { // testSelf is optional, check for stopFn as 2nd arg if (arguments.length === 2 && (typeof testSelf == 'string' || typeof testSelf == 'function')) { stopFn = testSelf; } return Y.one(Y_DOM.ancestor(this._node, _wrapFn(fn), testSelf, _wrapFn(stopFn))); }, /** * Returns the ancestors that pass the test applied by supplied boolean method. * @method ancestors * @param {String | Function} fn A selector string or boolean method for testing elements. * @param {Boolean} testSelf optional Whether or not to include the element in the scan * If a function is used, it receives the current node being tested as the only argument. * @return {NodeList} A NodeList instance containing the matching elements */ ancestors: function(fn, testSelf, stopFn) { if (arguments.length === 2 && (typeof testSelf == 'string' || typeof testSelf == 'function')) { stopFn = testSelf; } return Y.all(Y_DOM.ancestors(this._node, _wrapFn(fn), testSelf, _wrapFn(stopFn))); }, /** * Returns the previous matching sibling. * Returns the nearest element node sibling if no method provided. * @method previous * @param {String | Function} fn A selector or boolean method for testing elements. * If a function is used, it receives the current node being tested as the only argument. * @return {Node} Node instance or null if not found */ previous: function(fn, all) { return Y.one(Y_DOM.elementByAxis(this._node, 'previousSibling', _wrapFn(fn), all)); }, /** * Returns the next matching sibling. * Returns the nearest element node sibling if no method provided. * @method next * @param {String | Function} fn A selector or boolean method for testing elements. * If a function is used, it receives the current node being tested as the only argument. * @return {Node} Node instance or null if not found */ next: function(fn, all) { return Y.one(Y_DOM.elementByAxis(this._node, 'nextSibling', _wrapFn(fn), all)); }, /** * Returns all matching siblings. * Returns all siblings if no method provided. * @method siblings * @param {String | Function} fn A selector or boolean method for testing elements. * If a function is used, it receives the current node being tested as the only argument. * @return {NodeList} NodeList instance bound to found siblings */ siblings: function(fn) { return Y.all(Y_DOM.siblings(this._node, _wrapFn(fn))); }, /** * Retrieves a Node instance of nodes based on the given CSS selector. * @method one * * @param {string} selector The CSS selector to test against. * @return {Node} A Node instance for the matching HTMLElement. */ one: function(selector) { return Y.one(Y.Selector.query(selector, this._node, true)); }, /** * Retrieves a NodeList based on the given CSS selector. * @method all * * @param {string} selector The CSS selector to test against. * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array. */ all: function(selector) { var nodelist = Y.all(Y.Selector.query(selector, this._node)); nodelist._query = selector; nodelist._queryRoot = this._node; return nodelist; }, // TODO: allow fn test /** * Test if the supplied node matches the supplied selector. * @method test * * @param {string} selector The CSS selector to test against. * @return {boolean} Whether or not the node matches the selector. */ test: function(selector) { return Y.Selector.test(this._node, selector); }, /** * Removes the node from its parent. * Shortcut for myNode.get('parentNode').removeChild(myNode); * @method remove * @param {Boolean} destroy whether or not to call destroy() on the node * after removal. * @chainable * */ remove: function(destroy) { var node = this._node; if (node && node.parentNode) { node.parentNode.removeChild(node); } if (destroy) { this.destroy(); } return this; }, /** * Replace the node with the other node. This is a DOM update only * and does not change the node bound to the Node instance. * Shortcut for myNode.get('parentNode').replaceChild(newNode, myNode); * @method replace * @param {Node | HTMLNode} newNode Node to be inserted * @chainable * */ replace: function(newNode) { var node = this._node; if (typeof newNode == 'string') { newNode = Y_Node.create(newNode); } node.parentNode.replaceChild(Y_Node.getDOMNode(newNode), node); return this; }, /** * @method replaceChild * @for Node * @param {String | HTMLElement | Node} node Node to be inserted * @param {HTMLElement | Node} refNode Node to be replaced * @return {Node} The replaced node */ replaceChild: function(node, refNode) { if (typeof node == 'string') { node = Y_DOM.create(node); } return Y.one(this._node.replaceChild(Y_Node.getDOMNode(node), Y_Node.getDOMNode(refNode))); }, /** * Nulls internal node references, removes any plugins and event listeners * @method destroy * @param {Boolean} recursivePurge (optional) Whether or not to remove listeners from the * node's subtree (default is false) * */ destroy: function(recursive) { var UID = Y.config.doc.uniqueID ? 'uniqueID' : '_yuid', instance; this.purge(); // TODO: only remove events add via this Node if (this.unplug) { // may not be a PluginHost this.unplug(); } this.clearData(); if (recursive) { Y.NodeList.each(this.all('*'), function(node) { instance = Y_Node._instances[node[UID]]; if (instance) { instance.destroy(); } else { // purge in case added by other means Y.Event.purgeElement(node); } }); } this._node = null; this._stateProxy = null; delete Y_Node._instances[this._yuid]; }, /** * Invokes a method on the Node instance * @method invoke * @param {String} method The name of the method to invoke * @param {Any} a, b, c, etc. Arguments to invoke the method with. * @return Whatever the underly method returns. * DOM Nodes and Collections return values * are converted to Node/NodeList instances. * */ invoke: function(method, a, b, c, d, e) { var node = this._node, ret; if (a && a._node) { a = a._node; } if (b && b._node) { b = b._node; } ret = node[method](a, b, c, d, e); return Y_Node.scrubVal(ret, this); }, /** * @method swap * @description Swap DOM locations with the given node. * This does not change which DOM node each Node instance refers to. * @param {Node} otherNode The node to swap with * @chainable */ swap: Y.config.doc.documentElement.swapNode ? function(otherNode) { this._node.swapNode(Y_Node.getDOMNode(otherNode)); } : function(otherNode) { otherNode = Y_Node.getDOMNode(otherNode); var node = this._node, parent = otherNode.parentNode, nextSibling = otherNode.nextSibling; if (nextSibling === node) { parent.insertBefore(node, otherNode); } else if (otherNode === node.nextSibling) { parent.insertBefore(otherNode, node); } else { node.parentNode.replaceChild(otherNode, node); Y_DOM.addHTML(parent, node, nextSibling); } return this; }, hasMethod: function(method) { var node = this._node; return !!(node && method in node && typeof node[method] != 'unknown' && (typeof node[method] == 'function' || String(node[method]).indexOf('function') === 1)); // IE reports as object, prepends space }, isFragment: function() { return (this.get('nodeType') === 11); }, /** * Removes and destroys all of the nodes within the node. * @method empty * @chainable */ empty: function() { this.get('childNodes').remove().destroy(true); return this; }, /** * Returns the DOM node bound to the Node instance * @method getDOMNode * @return {DOMNode} */ getDOMNode: function() { return this._node; } }, true); Y.Node = Y_Node; Y.one = Y_Node.one; /** * The NodeList module provides support for managing collections of Nodes. * @module node * @submodule node-core */ /** * The NodeList class provides a wrapper for manipulating DOM NodeLists. * NodeList properties can be accessed via the set/get methods. * Use Y.all() to retrieve NodeList instances. * * @class NodeList * @constructor * @param nodes {String|element|Node|Array} A selector, DOM element, Node, list of DOM elements, or list of Nodes with which to populate this NodeList. */ var NodeList = function(nodes) { var tmp = []; if (nodes) { if (typeof nodes === 'string') { // selector query this._query = nodes; nodes = Y.Selector.query(nodes); } else if (nodes.nodeType || Y_DOM.isWindow(nodes)) { // domNode || window nodes = [nodes]; } else if (nodes._node) { // Y.Node nodes = [nodes._node]; } else if (nodes[0] && nodes[0]._node) { // allow array of Y.Nodes Y.Array.each(nodes, function(node) { if (node._node) { tmp.push(node._node); } }); nodes = tmp; } else { // array of domNodes or domNodeList (no mixed array of Y.Node/domNodes) nodes = Y.Array(nodes, 0, true); } } /** * The underlying array of DOM nodes bound to the Y.NodeList instance * @property _nodes * @private */ this._nodes = nodes || []; }; NodeList.NAME = 'NodeList'; /** * Retrieves the DOM nodes bound to a NodeList instance * @method getDOMNodes * @static * * @param {NodeList} nodelist The NodeList instance * @return {Array} The array of DOM nodes bound to the NodeList */ NodeList.getDOMNodes = function(nodelist) { return (nodelist && nodelist._nodes) ? nodelist._nodes : nodelist; }; NodeList.each = function(instance, fn, context) { var nodes = instance._nodes; if (nodes && nodes.length) { Y.Array.each(nodes, fn, context || instance); } else { } }; NodeList.addMethod = function(name, fn, context) { if (name && fn) { NodeList.prototype[name] = function() { var ret = [], args = arguments; Y.Array.each(this._nodes, function(node) { var UID = (node.uniqueID && node.nodeType !== 9 ) ? 'uniqueID' : '_yuid', instance = Y.Node._instances[node[UID]], ctx, result; if (!instance) { instance = NodeList._getTempNode(node); } ctx = context || instance; result = fn.apply(ctx, args); if (result !== undefined && result !== instance) { ret[ret.length] = result; } }); // TODO: remove tmp pointer return ret.length ? ret : this; }; } else { } }; NodeList.importMethod = function(host, name, altName) { if (typeof name === 'string') { altName = altName || name; NodeList.addMethod(name, host[name]); } else { Y.Array.each(name, function(n) { NodeList.importMethod(host, n); }); } }; NodeList._getTempNode = function(node) { var tmp = NodeList._tempNode; if (!tmp) { tmp = Y.Node.create('<div></div>'); NodeList._tempNode = tmp; } tmp._node = node; tmp._stateProxy = node; return tmp; }; Y.mix(NodeList.prototype, { _invoke: function(method, args, getter) { var ret = (getter) ? [] : this; this.each(function(node) { var val = node[method].apply(node, args); if (getter) { ret.push(val); } }); return ret; }, /** * Retrieves the Node instance at the given index. * @method item * * @param {Number} index The index of the target Node. * @return {Node} The Node instance at the given index. */ item: function(index) { return Y.one((this._nodes || [])[index]); }, /** * Applies the given function to each Node in the NodeList. * @method each * @param {Function} fn The function to apply. It receives 3 arguments: * the current node instance, the node's index, and the NodeList instance * @param {Object} context optional An optional context to apply the function with * Default context is the current Node instance * @chainable */ each: function(fn, context) { var instance = this; Y.Array.each(this._nodes, function(node, index) { node = Y.one(node); return fn.call(context || node, node, index, instance); }); return instance; }, batch: function(fn, context) { var nodelist = this; Y.Array.each(this._nodes, function(node, index) { var instance = Y.Node._instances[node[UID]]; if (!instance) { instance = NodeList._getTempNode(node); } return fn.call(context || instance, instance, index, nodelist); }); return nodelist; }, /** * Executes the function once for each node until a true value is returned. * @method some * @param {Function} fn The function to apply. It receives 3 arguments: * the current node instance, the node's index, and the NodeList instance * @param {Object} context optional An optional context to execute the function from. * Default context is the current Node instance * @return {Boolean} Whether or not the function returned true for any node. */ some: function(fn, context) { var instance = this; return Y.Array.some(this._nodes, function(node, index) { node = Y.one(node); context = context || node; return fn.call(context, node, index, instance); }); }, /** * Creates a documenFragment from the nodes bound to the NodeList instance * @method toFrag * @return {Node} a Node instance bound to the documentFragment */ toFrag: function() { return Y.one(Y.DOM._nl2frag(this._nodes)); }, /** * Returns the index of the node in the NodeList instance * or -1 if the node isn't found. * @method indexOf * @param {Node | DOMNode} node the node to search for * @return {Int} the index of the node value or -1 if not found */ indexOf: function(node) { return Y.Array.indexOf(this._nodes, Y.Node.getDOMNode(node)); }, /** * Filters the NodeList instance down to only nodes matching the given selector. * @method filter * @param {String} selector The selector to filter against * @return {NodeList} NodeList containing the updated collection * @see Selector */ filter: function(selector) { return Y.all(Y.Selector.filter(this._nodes, selector)); }, /** * Creates a new NodeList containing all nodes at every n indices, where * remainder n % index equals r. * (zero-based index). * @method modulus * @param {Int} n The offset to use (return every nth node) * @param {Int} r An optional remainder to use with the modulus operation (defaults to zero) * @return {NodeList} NodeList containing the updated collection */ modulus: function(n, r) { r = r || 0; var nodes = []; NodeList.each(this, function(node, i) { if (i % n === r) { nodes.push(node); } }); return Y.all(nodes); }, /** * Creates a new NodeList containing all nodes at odd indices * (zero-based index). * @method odd * @return {NodeList} NodeList containing the updated collection */ odd: function() { return this.modulus(2, 1); }, /** * Creates a new NodeList containing all nodes at even indices * (zero-based index), including zero. * @method even * @return {NodeList} NodeList containing the updated collection */ even: function() { return this.modulus(2); }, destructor: function() { }, /** * Reruns the initial query, when created using a selector query * @method refresh * @chainable */ refresh: function() { var doc, nodes = this._nodes, query = this._query, root = this._queryRoot; if (query) { if (!root) { if (nodes && nodes[0] && nodes[0].ownerDocument) { root = nodes[0].ownerDocument; } } this._nodes = Y.Selector.query(query, root); } return this; }, /** * Returns the current number of items in the NodeList. * @method size * @return {Int} The number of items in the NodeList. */ size: function() { return this._nodes.length; }, /** * Determines if the instance is bound to any nodes * @method isEmpty * @return {Boolean} Whether or not the NodeList is bound to any nodes */ isEmpty: function() { return this._nodes.length < 1; }, toString: function() { var str = '', errorMsg = this[UID] + ': not bound to any nodes', nodes = this._nodes, node; if (nodes && nodes[0]) { node = nodes[0]; str += node[NODE_NAME]; if (node.id) { str += '#' + node.id; } if (node.className) { str += '.' + node.className.replace(' ', '.'); } if (nodes.length > 1) { str += '...[' + nodes.length + ' items]'; } } return str || errorMsg; }, /** * Returns the DOM node bound to the Node instance * @method getDOMNodes * @return {Array} */ getDOMNodes: function() { return this._nodes; } }, true); NodeList.importMethod(Y.Node.prototype, [ /** * Called on each Node instance. Nulls internal node references, * removes any plugins and event listeners * @method destroy * @param {Boolean} recursivePurge (optional) Whether or not to * remove listeners from the node's subtree (default is false) * @see Node.destroy */ 'destroy', /** * Called on each Node instance. Removes and destroys all of the nodes * within the node * @method empty * @chainable * @see Node.empty */ 'empty', /** * Called on each Node instance. Removes the node from its parent. * Shortcut for myNode.get('parentNode').removeChild(myNode); * @method remove * @param {Boolean} destroy whether or not to call destroy() on the node * after removal. * @chainable * @see Node.remove */ 'remove', /** * Called on each Node instance. Sets an attribute on the Node instance. * Unless pre-configured (via Node.ATTRS), set hands * off to the underlying DOM node. Only valid * attributes/properties for the node will be set. * To set custom attributes use setAttribute. * @method set * @param {String} attr The attribute to be set. * @param {any} val The value to set the attribute to. * @chainable * @see Node.set */ 'set' ]); // one-off implementation to convert array of Nodes to NodeList // e.g. Y.all('input').get('parentNode'); /** Called on each Node instance * @method get * @see Node */ NodeList.prototype.get = function(attr) { var ret = [], nodes = this._nodes, isNodeList = false, getTemp = NodeList._getTempNode, instance, val; if (nodes[0]) { instance = Y.Node._instances[nodes[0]._yuid] || getTemp(nodes[0]); val = instance._get(attr); if (val && val.nodeType) { isNodeList = true; } } Y.Array.each(nodes, function(node) { instance = Y.Node._instances[node._yuid]; if (!instance) { instance = getTemp(node); } val = instance._get(attr); if (!isNodeList) { // convert array of Nodes to NodeList val = Y.Node.scrubVal(val, instance); } ret.push(val); }); return (isNodeList) ? Y.all(ret) : ret; }; Y.NodeList = NodeList; Y.all = function(nodes) { return new NodeList(nodes); }; Y.Node.all = Y.all; /** * @module node * @submodule node-core */ var Y_NodeList = Y.NodeList, ArrayProto = Array.prototype, ArrayMethods = { /** Returns a new NodeList combining the given NodeList(s) * @for NodeList * @method concat * @param {NodeList | Array} valueN Arrays/NodeLists and/or values to * concatenate to the resulting NodeList * @return {NodeList} A new NodeList comprised of this NodeList joined with the input. */ 'concat': 1, /** Removes the last from the NodeList and returns it. * @for NodeList * @method pop * @return {Node} The last item in the NodeList. */ 'pop': 0, /** Adds the given Node(s) to the end of the NodeList. * @for NodeList * @method push * @param {Node | DOMNode} nodes One or more nodes to add to the end of the NodeList. */ 'push': 0, /** Removes the first item from the NodeList and returns it. * @for NodeList * @method shift * @return {Node} The first item in the NodeList. */ 'shift': 0, /** Returns a new NodeList comprising the Nodes in the given range. * @for NodeList * @method slice * @param {Number} begin Zero-based index at which to begin extraction. As a negative index, start indicates an offset from the end of the sequence. slice(-2) extracts the second-to-last element and the last element in the sequence. * @param {Number} end Zero-based index at which to end extraction. slice extracts up to but not including end. slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3). As a negative index, end indicates an offset from the end of the sequence. slice(2,-1) extracts the third element through the second-to-last element in the sequence. If end is omitted, slice extracts to the end of the sequence. * @return {NodeList} A new NodeList comprised of this NodeList joined with the input. */ 'slice': 1, /** Changes the content of the NodeList, adding new elements while removing old elements. * @for NodeList * @method splice * @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end. * @param {Number} howMany An integer indicating the number of old array elements to remove. If howMany is 0, no elements are removed. In this case, you should specify at least one new element. If no howMany parameter is specified (second syntax above, which is a SpiderMonkey extension), all elements after index are removed. * {Node | DOMNode| element1, ..., elementN The elements to add to the array. If you don't specify any elements, splice simply removes elements from the array. * @return {NodeList} The element(s) removed. */ 'splice': 1, /** Adds the given Node(s) to the beginning of the NodeList. * @for NodeList * @method unshift * @param {Node | DOMNode} nodes One or more nodes to add to the NodeList. */ 'unshift': 0 }; Y.Object.each(ArrayMethods, function(returnNodeList, name) { Y_NodeList.prototype[name] = function() { var args = [], i = 0, arg, ret; while (typeof (arg = arguments[i++]) != 'undefined') { // use DOM nodes/nodeLists args.push(arg._node || arg._nodes || arg); } ret = ArrayProto[name].apply(this._nodes, args); if (returnNodeList) { ret = Y.all(ret); } else { ret = Y.Node.scrubVal(ret); } return ret; }; }); /** * @module node * @submodule node-core */ Y.Array.each([ /** * Passes through to DOM method. * @for Node * @method removeChild * @param {HTMLElement | Node} node Node to be removed * @return {Node} The removed node */ 'removeChild', /** * Passes through to DOM method. * @method hasChildNodes * @return {Boolean} Whether or not the node has any childNodes */ 'hasChildNodes', /** * Passes through to DOM method. * @method cloneNode * @param {Boolean} deep Whether or not to perform a deep clone, which includes * subtree and attributes * @return {Node} The clone */ 'cloneNode', /** * Passes through to DOM method. * @method hasAttribute * @param {String} attribute The attribute to test for * @return {Boolean} Whether or not the attribute is present */ 'hasAttribute', /** * Passes through to DOM method. * @method scrollIntoView * @chainable */ 'scrollIntoView', /** * Passes through to DOM method. * @method getElementsByTagName * @param {String} tagName The tagName to collect * @return {NodeList} A NodeList representing the HTMLCollection */ 'getElementsByTagName', /** * Passes through to DOM method. * @method focus * @chainable */ 'focus', /** * Passes through to DOM method. * @method blur * @chainable */ 'blur', /** * Passes through to DOM method. * Only valid on FORM elements * @method submit * @chainable */ 'submit', /** * Passes through to DOM method. * Only valid on FORM elements * @method reset * @chainable */ 'reset', /** * Passes through to DOM method. * @method select * @chainable */ 'select', /** * Passes through to DOM method. * Only valid on TABLE elements * @method createCaption * @chainable */ 'createCaption' ], function(method) { Y.Node.prototype[method] = function(arg1, arg2, arg3) { var ret = this.invoke(method, arg1, arg2, arg3); return ret; }; }); /** * Passes through to DOM method. * @method removeAttribute * @param {String} attribute The attribute to be removed * @chainable */ // one-off implementation due to IE returning boolean, breaking chaining Y.Node.prototype.removeAttribute = function(attr) { var node = this._node; if (node) { node.removeAttribute(attr, 0); // comma zero for IE < 8 to force case-insensitive } return this; }; Y.Node.importMethod(Y.DOM, [ /** * Determines whether the node is an ancestor of another HTML element in the DOM hierarchy. * @method contains * @param {Node | HTMLElement} needle The possible node or descendent * @return {Boolean} Whether or not this node is the needle its ancestor */ 'contains', /** * Allows setting attributes on DOM nodes, normalizing in some cases. * This passes through to the DOM node, allowing for custom attributes. * @method setAttribute * @for Node * @chainable * @param {string} name The attribute name * @param {string} value The value to set */ 'setAttribute', /** * Allows getting attributes on DOM nodes, normalizing in some cases. * This passes through to the DOM node, allowing for custom attributes. * @method getAttribute * @for Node * @param {string} name The attribute name * @return {string} The attribute value */ 'getAttribute', /** * Wraps the given HTML around the node. * @method wrap * @param {String} html The markup to wrap around the node. * @chainable * @for Node */ 'wrap', /** * Removes the node's parent node. * @method unwrap * @chainable */ 'unwrap', /** * Applies a unique ID to the node if none exists * @method generateID * @return {String} The existing or generated ID */ 'generateID' ]); Y.NodeList.importMethod(Y.Node.prototype, [ /** * Allows getting attributes on DOM nodes, normalizing in some cases. * This passes through to the DOM node, allowing for custom attributes. * @method getAttribute * @see Node * @for NodeList * @param {string} name The attribute name * @return {string} The attribute value */ 'getAttribute', /** * Allows setting attributes on DOM nodes, normalizing in some cases. * This passes through to the DOM node, allowing for custom attributes. * @method setAttribute * @see Node * @for NodeList * @chainable * @param {string} name The attribute name * @param {string} value The value to set */ 'setAttribute', /** * Allows for removing attributes on DOM nodes. * This passes through to the DOM node, allowing for custom attributes. * @method removeAttribute * @see Node * @for NodeList * @param {string} name The attribute to remove */ 'removeAttribute', /** * Removes the parent node from node in the list. * @method unwrap * @chainable */ 'unwrap', /** * Wraps the given HTML around each node. * @method wrap * @param {String} html The markup to wrap around the node. * @chainable */ 'wrap', /** * Applies a unique ID to each node if none exists * @method generateID * @return {String} The existing or generated ID */ 'generateID' ]); }, '@VERSION@', {"requires": ["dom-core", "selector"]}); YUI.add('node-base', function (Y, NAME) { /** * @module node * @submodule node-base */ var methods = [ /** * Determines whether each node has the given className. * @method hasClass * @for Node * @param {String} className the class name to search for * @return {Boolean} Whether or not the element has the specified class */ 'hasClass', /** * Adds a class name to each node. * @method addClass * @param {String} className the class name to add to the node's class attribute * @chainable */ 'addClass', /** * Removes a class name from each node. * @method removeClass * @param {String} className the class name to remove from the node's class attribute * @chainable */ 'removeClass', /** * Replace a class with another class for each node. * If no oldClassName is present, the newClassName is simply added. * @method replaceClass * @param {String} oldClassName the class name to be replaced * @param {String} newClassName the class name that will be replacing the old class name * @chainable */ 'replaceClass', /** * If the className exists on the node it is removed, if it doesn't exist it is added. * @method toggleClass * @param {String} className the class name to be toggled * @param {Boolean} force Option to force adding or removing the class. * @chainable */ 'toggleClass' ]; Y.Node.importMethod(Y.DOM, methods); /** * Determines whether each node has the given className. * @method hasClass * @see Node.hasClass * @for NodeList * @param {String} className the class name to search for * @return {Array} An array of booleans for each node bound to the NodeList. */ /** * Adds a class name to each node. * @method addClass * @see Node.addClass * @param {String} className the class name to add to the node's class attribute * @chainable */ /** * Removes a class name from each node. * @method removeClass * @see Node.removeClass * @param {String} className the class name to remove from the node's class attribute * @chainable */ /** * Replace a class with another class for each node. * If no oldClassName is present, the newClassName is simply added. * @method replaceClass * @see Node.replaceClass * @param {String} oldClassName the class name to be replaced * @param {String} newClassName the class name that will be replacing the old class name * @chainable */ /** * If the className exists on the node it is removed, if it doesn't exist it is added. * @method toggleClass * @see Node.toggleClass * @param {String} className the class name to be toggled * @chainable */ Y.NodeList.importMethod(Y.Node.prototype, methods); /** * @module node * @submodule node-base */ var Y_Node = Y.Node, Y_DOM = Y.DOM; /** * Returns a new dom node using the provided markup string. * @method create * @static * @param {String} html The markup used to create the element * Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a> * to escape html content. * @param {HTMLDocument} doc An optional document context * @return {Node} A Node instance bound to a DOM node or fragment * @for Node */ Y_Node.create = function(html, doc) { if (doc && doc._node) { doc = doc._node; } return Y.one(Y_DOM.create(html, doc)); }; Y.mix(Y_Node.prototype, { /** * Creates a new Node using the provided markup string. * @method create * @param {String} html The markup used to create the element. * Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a> * to escape html content. * @param {HTMLDocument} doc An optional document context * @return {Node} A Node instance bound to a DOM node or fragment */ create: Y_Node.create, /** * Inserts the content before the reference node. * @method insert * @param {String | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert * Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a> * to escape html content. * @param {Int | Node | HTMLElement | String} where The position to insert at. * Possible "where" arguments * <dl> * <dt>Y.Node</dt> * <dd>The Node to insert before</dd> * <dt>HTMLElement</dt> * <dd>The element to insert before</dd> * <dt>Int</dt> * <dd>The index of the child element to insert before</dd> * <dt>"replace"</dt> * <dd>Replaces the existing HTML</dd> * <dt>"before"</dt> * <dd>Inserts before the existing HTML</dd> * <dt>"before"</dt> * <dd>Inserts content before the node</dd> * <dt>"after"</dt> * <dd>Inserts content after the node</dd> * </dl> * @chainable */ insert: function(content, where) { this._insert(content, where); return this; }, _insert: function(content, where) { var node = this._node, ret = null; if (typeof where == 'number') { // allow index where = this._node.childNodes[where]; } else if (where && where._node) { // Node where = where._node; } if (content && typeof content != 'string') { // allow Node or NodeList/Array instances content = content._node || content._nodes || content; } ret = Y_DOM.addHTML(node, content, where); return ret; }, /** * Inserts the content as the firstChild of the node. * @method prepend * @param {String | Node | HTMLElement} content The content to insert * Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a> * to escape html content. * @chainable */ prepend: function(content) { return this.insert(content, 0); }, /** * Inserts the content as the lastChild of the node. * @method append * @param {String | Node | HTMLElement} content The content to insert * Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a> * to escape html content. * @chainable */ append: function(content) { return this.insert(content, null); }, /** * @method appendChild * @param {String | HTMLElement | Node} node Node to be appended * Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a> * to escape html content. * @return {Node} The appended node */ appendChild: function(node) { return Y_Node.scrubVal(this._insert(node)); }, /** * @method insertBefore * @param {String | HTMLElement | Node} newNode Node to be appended * @param {HTMLElement | Node} refNode Node to be inserted before * Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a> * to escape html content. * @return {Node} The inserted node */ insertBefore: function(newNode, refNode) { return Y.Node.scrubVal(this._insert(newNode, refNode)); }, /** * Appends the node to the given node. * @method appendTo * @param {Node | HTMLElement} node The node to append to * @chainable */ appendTo: function(node) { Y.one(node).append(this); return this; }, /** * Replaces the node's current content with the content. * Note that this passes to innerHTML and is not escaped. * Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a> * to escape html content or `set('text')` to add as text. * @method setContent * @deprecated Use setHTML * @param {String | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert * @chainable */ setContent: function(content) { this._insert(content, 'replace'); return this; }, /** * Returns the node's current content (e.g. innerHTML) * @method getContent * @deprecated Use getHTML * @return {String} The current content */ getContent: function(content) { return this.get('innerHTML'); } }); /** * Replaces the node's current html content with the content provided. * Note that this passes to innerHTML and is not escaped. * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text. * @method setHTML * @param {String | HTML | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert * @chainable */ Y.Node.prototype.setHTML = Y.Node.prototype.setContent; /** * Returns the node's current html content (e.g. innerHTML) * @method getHTML * @return {String} The html content */ Y.Node.prototype.getHTML = Y.Node.prototype.getContent; Y.NodeList.importMethod(Y.Node.prototype, [ /** * Called on each Node instance * @for NodeList * @method append * @see Node.append */ 'append', /** * Called on each Node instance * @for NodeList * @method insert * @see Node.insert */ 'insert', /** * Called on each Node instance * @for NodeList * @method appendChild * @see Node.appendChild */ 'appendChild', /** * Called on each Node instance * @for NodeList * @method insertBefore * @see Node.insertBefore */ 'insertBefore', /** * Called on each Node instance * @for NodeList * @method prepend * @see Node.prepend */ 'prepend', /** * Called on each Node instance * Note that this passes to innerHTML and is not escaped. * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text. * @for NodeList * @method setContent * @deprecated Use setHTML */ 'setContent', /** * Called on each Node instance * @for NodeList * @method getContent * @deprecated Use getHTML */ 'getContent', /** * Called on each Node instance * Note that this passes to innerHTML and is not escaped. * Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text. * @for NodeList * @method setHTML * @see Node.setHTML */ 'setHTML', /** * Called on each Node instance * @for NodeList * @method getHTML * @see Node.getHTML */ 'getHTML' ]); /** * @module node * @submodule node-base */ var Y_Node = Y.Node, Y_DOM = Y.DOM; /** * Static collection of configuration attributes for special handling * @property ATTRS * @static * @type object */ Y_Node.ATTRS = { /** * Allows for getting and setting the text of an element. * Formatting is preserved and special characters are treated literally. * @config text * @type String */ text: { getter: function() { return Y_DOM.getText(this._node); }, setter: function(content) { Y_DOM.setText(this._node, content); return content; } }, /** * Allows for getting and setting the text of an element. * Formatting is preserved and special characters are treated literally. * @config for * @type String */ 'for': { getter: function() { return Y_DOM.getAttribute(this._node, 'for'); }, setter: function(val) { Y_DOM.setAttribute(this._node, 'for', val); return val; } }, 'options': { getter: function() { return this._node.getElementsByTagName('option'); } }, /** * Returns a NodeList instance of all HTMLElement children. * @readOnly * @config children * @type NodeList */ 'children': { getter: function() { var node = this._node, children = node.children, childNodes, i, len; if (!children) { childNodes = node.childNodes; children = []; for (i = 0, len = childNodes.length; i < len; ++i) { if (childNodes[i].tagName) { children[children.length] = childNodes[i]; } } } return Y.all(children); } }, value: { getter: function() { return Y_DOM.getValue(this._node); }, setter: function(val) { Y_DOM.setValue(this._node, val); return val; } } }; Y.Node.importMethod(Y.DOM, [ /** * Allows setting attributes on DOM nodes, normalizing in some cases. * This passes through to the DOM node, allowing for custom attributes. * @method setAttribute * @for Node * @for NodeList * @chainable * @param {string} name The attribute name * @param {string} value The value to set */ 'setAttribute', /** * Allows getting attributes on DOM nodes, normalizing in some cases. * This passes through to the DOM node, allowing for custom attributes. * @method getAttribute * @for Node * @for NodeList * @param {string} name The attribute name * @return {string} The attribute value */ 'getAttribute' ]); /** * @module node * @submodule node-base */ var Y_Node = Y.Node; var Y_NodeList = Y.NodeList; /** * List of events that route to DOM events * @static * @property DOM_EVENTS * @for Node */ Y_Node.DOM_EVENTS = { abort: 1, beforeunload: 1, blur: 1, change: 1, click: 1, close: 1, command: 1, contextmenu: 1, dblclick: 1, DOMMouseScroll: 1, drag: 1, dragstart: 1, dragenter: 1, dragover: 1, dragleave: 1, dragend: 1, drop: 1, error: 1, focus: 1, key: 1, keydown: 1, keypress: 1, keyup: 1, load: 1, message: 1, mousedown: 1, mouseenter: 1, mouseleave: 1, mousemove: 1, mousemultiwheel: 1, mouseout: 1, mouseover: 1, mouseup: 1, mousewheel: 1, orientationchange: 1, reset: 1, resize: 1, select: 1, selectstart: 1, submit: 1, scroll: 1, textInput: 1, unload: 1 }; // Add custom event adaptors to this list. This will make it so // that delegate, key, available, contentready, etc all will // be available through Node.on Y.mix(Y_Node.DOM_EVENTS, Y.Env.evt.plugins); Y.augment(Y_Node, Y.EventTarget); Y.mix(Y_Node.prototype, { /** * Removes event listeners from the node and (optionally) its subtree * @method purge * @param {Boolean} recurse (optional) Whether or not to remove listeners from the * node's subtree * @param {String} type (optional) Only remove listeners of the specified type * @chainable * */ purge: function(recurse, type) { Y.Event.purgeElement(this._node, recurse, type); return this; } }); Y.mix(Y.NodeList.prototype, { _prepEvtArgs: function(type, fn, context) { // map to Y.on/after signature (type, fn, nodes, context, arg1, arg2, etc) var args = Y.Array(arguments, 0, true); if (args.length < 2) { // type only (event hash) just add nodes args[2] = this._nodes; } else { args.splice(2, 0, this._nodes); } args[3] = context || this; // default to NodeList instance as context return args; }, /** Subscribe a callback function for each `Node` in the collection to execute in response to a DOM event. NOTE: Generally, the `on()` method should be avoided on `NodeLists`, in favor of using event delegation from a parent Node. See the Event user guide for details. Most DOM events are associated with a preventable default behavior, such as link clicks navigating to a new page. Callbacks are passed a `DOMEventFacade` object as their first argument (usually called `e`) that can be used to prevent this default behavior with `e.preventDefault()`. See the `DOMEventFacade` API for all available properties and methods on the object. By default, the `this` object will be the `NodeList` that the subscription came from, <em>not the `Node` that received the event</em>. Use `e.currentTarget` to refer to the `Node`. Returning `false` from a callback is supported as an alternative to calling `e.preventDefault(); e.stopPropagation();`. However, it is recommended to use the event methods. @example Y.all(".sku").on("keydown", function (e) { if (e.keyCode === 13) { e.preventDefault(); // Use e.currentTarget to refer to the individual Node var item = Y.MyApp.searchInventory( e.currentTarget.get('value') ); // etc ... } }); @method on @param {String} type The name of the event @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [arg*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching that subscription @for NodeList **/ on: function(type, fn, context) { return Y.on.apply(Y, this._prepEvtArgs.apply(this, arguments)); }, /** * Applies an one-time event listener to each Node bound to the NodeList. * @method once * @param {String} type The event being listened for * @param {Function} fn The handler to call when the event fires * @param {Object} context The context to call the handler with. * Default is the NodeList instance. * @return {EventHandle} A subscription handle capable of detaching that * subscription * @for NodeList */ once: function(type, fn, context) { return Y.once.apply(Y, this._prepEvtArgs.apply(this, arguments)); }, /** * Applies an event listener to each Node bound to the NodeList. * The handler is called only after all on() handlers are called * and the event is not prevented. * @method after * @param {String} type The event being listened for * @param {Function} fn The handler to call when the event fires * @param {Object} context The context to call the handler with. * Default is the NodeList instance. * @return {EventHandle} A subscription handle capable of detaching that * subscription * @for NodeList */ after: function(type, fn, context) { return Y.after.apply(Y, this._prepEvtArgs.apply(this, arguments)); }, /** * Applies an one-time event listener to each Node bound to the NodeList * that will be called only after all on() handlers are called and the * event is not prevented. * * @method onceAfter * @param {String} type The event being listened for * @param {Function} fn The handler to call when the event fires * @param {Object} context The context to call the handler with. * Default is the NodeList instance. * @return {EventHandle} A subscription handle capable of detaching that * subscription * @for NodeList */ onceAfter: function(type, fn, context) { return Y.onceAfter.apply(Y, this._prepEvtArgs.apply(this, arguments)); } }); Y_NodeList.importMethod(Y.Node.prototype, [ /** * Called on each Node instance * @method detach * @see Node.detach * @for NodeList */ 'detach', /** Called on each Node instance * @method detachAll * @see Node.detachAll * @for NodeList */ 'detachAll' ]); /** Subscribe a callback function to execute in response to a DOM event or custom event. Most DOM events are associated with a preventable default behavior such as link clicks navigating to a new page. Callbacks are passed a `DOMEventFacade` object as their first argument (usually called `e`) that can be used to prevent this default behavior with `e.preventDefault()`. See the `DOMEventFacade` API for all available properties and methods on the object. If the event name passed as the first parameter is not a whitelisted DOM event, it will be treated as a custom event subscriptions, allowing `node.fire('customEventName')` later in the code. Refer to the Event user guide for the full DOM event whitelist. By default, the `this` object in the callback will refer to the subscribed `Node`. Returning `false` from a callback is supported as an alternative to calling `e.preventDefault(); e.stopPropagation();`. However, it is recommended to use the event methods. @example Y.one("#my-form").on("submit", function (e) { e.preventDefault(); // proceed with ajax form submission instead... }); @method on @param {String} type The name of the event @param {Function} fn The callback to execute in response to the event @param {Object} [context] Override `this` object in callback @param {Any} [arg*] 0..n additional arguments to supply to the subscriber @return {EventHandle} A subscription handle capable of detaching that subscription @for Node **/ Y.mix(Y.Node.ATTRS, { offsetHeight: { setter: function(h) { Y.DOM.setHeight(this._node, h); return h; }, getter: function() { return this._node.offsetHeight; } }, offsetWidth: { setter: function(w) { Y.DOM.setWidth(this._node, w); return w; }, getter: function() { return this._node.offsetWidth; } } }); Y.mix(Y.Node.prototype, { sizeTo: function(w, h) { var node; if (arguments.length < 2) { node = Y.one(w); w = node.get('offsetWidth'); h = node.get('offsetHeight'); } this.setAttrs({ offsetWidth: w, offsetHeight: h }); } }); /** * @module node * @submodule node-base */ var Y_Node = Y.Node; Y.mix(Y_Node.prototype, { /** * Makes the node visible. * If the "transition" module is loaded, show optionally * animates the showing of the node using either the default * transition effect ('fadeIn'), or the given named effect. * @method show * @for Node * @param {String} name A named Transition effect to use as the show effect. * @param {Object} config Options to use with the transition. * @param {Function} callback An optional function to run after the transition completes. * @chainable */ show: function(callback) { callback = arguments[arguments.length - 1]; this.toggleView(true, callback); return this; }, /** * The implementation for showing nodes. * Default is to toggle the style.display property. * @method _show * @protected * @chainable */ _show: function() { this.setStyle('display', ''); }, _isHidden: function() { return Y.DOM.getStyle(this._node, 'display') === 'none'; }, /** * Displays or hides the node. * If the "transition" module is loaded, toggleView optionally * animates the toggling of the node using either the default * transition effect ('fadeIn'), or the given named effect. * @method toggleView * @for Node * @param {Boolean} [on] An optional boolean value to force the node to be shown or hidden * @param {Function} [callback] An optional function to run after the transition completes. * @chainable */ toggleView: function(on, callback) { this._toggleView.apply(this, arguments); return this; }, _toggleView: function(on, callback) { callback = arguments[arguments.length - 1]; // base on current state if not forcing if (typeof on != 'boolean') { on = (this._isHidden()) ? 1 : 0; } if (on) { this._show(); } else { this._hide(); } if (typeof callback == 'function') { callback.call(this); } return this; }, /** * Hides the node. * If the "transition" module is loaded, hide optionally * animates the hiding of the node using either the default * transition effect ('fadeOut'), or the given named effect. * @method hide * @param {String} name A named Transition effect to use as the show effect. * @param {Object} config Options to use with the transition. * @param {Function} callback An optional function to run after the transition completes. * @chainable */ hide: function(callback) { callback = arguments[arguments.length - 1]; this.toggleView(false, callback); return this; }, /** * The implementation for hiding nodes. * Default is to toggle the style.display property. * @method _hide * @protected * @chainable */ _hide: function() { this.setStyle('display', 'none'); } }); Y.NodeList.importMethod(Y.Node.prototype, [ /** * Makes each node visible. * If the "transition" module is loaded, show optionally * animates the showing of the node using either the default * transition effect ('fadeIn'), or the given named effect. * @method show * @param {String} name A named Transition effect to use as the show effect. * @param {Object} config Options to use with the transition. * @param {Function} callback An optional function to run after the transition completes. * @for NodeList * @chainable */ 'show', /** * Hides each node. * If the "transition" module is loaded, hide optionally * animates the hiding of the node using either the default * transition effect ('fadeOut'), or the given named effect. * @method hide * @param {String} name A named Transition effect to use as the show effect. * @param {Object} config Options to use with the transition. * @param {Function} callback An optional function to run after the transition completes. * @chainable */ 'hide', /** * Displays or hides each node. * If the "transition" module is loaded, toggleView optionally * animates the toggling of the nodes using either the default * transition effect ('fadeIn'), or the given named effect. * @method toggleView * @param {Boolean} [on] An optional boolean value to force the nodes to be shown or hidden * @param {Function} [callback] An optional function to run after the transition completes. * @chainable */ 'toggleView' ]); if (!Y.config.doc.documentElement.hasAttribute) { // IE < 8 Y.Node.prototype.hasAttribute = function(attr) { if (attr === 'value') { if (this.get('value') !== "") { // IE < 8 fails to populate specified when set in HTML return true; } } return !!(this._node.attributes[attr] && this._node.attributes[attr].specified); }; } // IE throws an error when calling focus() on an element that's invisible, not // displayed, or disabled. Y.Node.prototype.focus = function () { try { this._node.focus(); } catch (e) { } return this; }; // IE throws error when setting input.type = 'hidden', // input.setAttribute('type', 'hidden') and input.attributes.type.value = 'hidden' Y.Node.ATTRS.type = { setter: function(val) { if (val === 'hidden') { try { this._node.type = 'hidden'; } catch(e) { this.setStyle('display', 'none'); this._inputType = 'hidden'; } } else { try { // IE errors when changing the type from "hidden' this._node.type = val; } catch (e) { } } return val; }, getter: function() { return this._inputType || this._node.type; }, _bypassProxy: true // don't update DOM when using with Attribute }; if (Y.config.doc.createElement('form').elements.nodeType) { // IE: elements collection is also FORM node which trips up scrubVal. Y.Node.ATTRS.elements = { getter: function() { return this.all('input, textarea, button, select'); } }; } /** * Provides methods for managing custom Node data. * * @module node * @main node * @submodule node-data */ Y.mix(Y.Node.prototype, { _initData: function() { if (! ('_data' in this)) { this._data = {}; } }, /** * @method getData * @for Node * @description Retrieves arbitrary data stored on a Node instance. * If no data is associated with the Node, it will attempt to retrieve * a value from the corresponding HTML data attribute. (e.g. node.getData('foo') * will check node.getAttribute('data-foo')). * @param {string} name Optional name of the data field to retrieve. * If no name is given, all data is returned. * @return {any | Object} Whatever is stored at the given field, * or an object hash of all fields. */ getData: function(name) { this._initData(); var data = this._data, ret = data; if (arguments.length) { // single field if (name in data) { ret = data[name]; } else { // initialize from HTML attribute ret = this._getDataAttribute(name); } } else if (typeof data == 'object' && data !== null) { // all fields ret = {}; Y.Object.each(data, function(v, n) { ret[n] = v; }); ret = this._getDataAttributes(ret); } return ret; }, _getDataAttributes: function(ret) { ret = ret || {}; var i = 0, attrs = this._node.attributes, len = attrs.length, prefix = this.DATA_PREFIX, prefixLength = prefix.length, name; while (i < len) { name = attrs[i].name; if (name.indexOf(prefix) === 0) { name = name.substr(prefixLength); if (!(name in ret)) { // only merge if not already stored ret[name] = this._getDataAttribute(name); } } i += 1; } return ret; }, _getDataAttribute: function(name) { var name = this.DATA_PREFIX + name, node = this._node, attrs = node.attributes, data = attrs && attrs[name] && attrs[name].value; return data; }, /** * @method setData * @for Node * @description Stores arbitrary data on a Node instance. * This is not stored with the DOM node. * @param {string} name The name of the field to set. If no val * is given, name is treated as the data and overrides any existing data. * @param {any} val The value to be assigned to the field. * @chainable */ setData: function(name, val) { this._initData(); if (arguments.length > 1) { this._data[name] = val; } else { this._data = name; } return this; }, /** * @method clearData * @for Node * @description Clears internally stored data. * @param {string} name The name of the field to clear. If no name * is given, all data is cleared. * @chainable */ clearData: function(name) { if ('_data' in this) { if (typeof name != 'undefined') { delete this._data[name]; } else { delete this._data; } } return this; } }); Y.mix(Y.NodeList.prototype, { /** * @method getData * @for NodeList * @description Retrieves arbitrary data stored on each Node instance * bound to the NodeList. * @see Node * @param {string} name Optional name of the data field to retrieve. * If no name is given, all data is returned. * @return {Array} An array containing all of the data for each Node instance. * or an object hash of all fields. */ getData: function(name) { var args = (arguments.length) ? [name] : []; return this._invoke('getData', args, true); }, /** * @method setData * @for NodeList * @description Stores arbitrary data on each Node instance bound to the * NodeList. This is not stored with the DOM node. * @param {string} name The name of the field to set. If no name * is given, name is treated as the data and overrides any existing data. * @param {any} val The value to be assigned to the field. * @chainable */ setData: function(name, val) { var args = (arguments.length > 1) ? [name, val] : [name]; return this._invoke('setData', args); }, /** * @method clearData * @for NodeList * @description Clears data on all Node instances bound to the NodeList. * @param {string} name The name of the field to clear. If no name * is given, all data is cleared. * @chainable */ clearData: function(name) { var args = (arguments.length) ? [name] : []; return this._invoke('clearData', [name]); } }); }, '@VERSION@', {"requires": ["event-base", "node-core", "dom-base"]}); (function () { var GLOBAL_ENV = YUI.Env; if (!GLOBAL_ENV._ready) { GLOBAL_ENV._ready = function() { GLOBAL_ENV.DOMReady = true; GLOBAL_ENV.remove(YUI.config.doc, 'DOMContentLoaded', GLOBAL_ENV._ready); }; GLOBAL_ENV.add(YUI.config.doc, 'DOMContentLoaded', GLOBAL_ENV._ready); } })(); YUI.add('event-base', function (Y, NAME) { /* * DOM event listener abstraction layer * @module event * @submodule event-base */ /** * The domready event fires at the moment the browser's DOM is * usable. In most cases, this is before images are fully * downloaded, allowing you to provide a more responsive user * interface. * * In YUI 3, domready subscribers will be notified immediately if * that moment has already passed when the subscription is created. * * One exception is if the yui.js file is dynamically injected into * the page. If this is done, you must tell the YUI instance that * you did this in order for DOMReady (and window load events) to * fire normally. That configuration option is 'injected' -- set * it to true if the yui.js script is not included inline. * * This method is part of the 'event-ready' module, which is a * submodule of 'event'. * * @event domready * @for YUI */ Y.publish('domready', { fireOnce: true, async: true }); if (YUI.Env.DOMReady) { Y.fire('domready'); } else { Y.Do.before(function() { Y.fire('domready'); }, YUI.Env, '_ready'); } /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event * @submodule event-base */ /** * Wraps a DOM event, properties requiring browser abstraction are * fixed here. Provids a security layer when required. * @class DOMEventFacade * @param ev {Event} the DOM event * @param currentTarget {HTMLElement} the element the listener was attached to * @param wrapper {Event.Custom} the custom event wrapper for this DOM event */ var ua = Y.UA, EMPTY = {}, /** * webkit key remapping required for Safari < 3.1 * @property webkitKeymap * @private */ webkitKeymap = { 63232: 38, // up 63233: 40, // down 63234: 37, // left 63235: 39, // right 63276: 33, // page up 63277: 34, // page down 25: 9, // SHIFT-TAB (Safari provides a different key code in // this case, even though the shiftKey modifier is set) 63272: 46, // delete 63273: 36, // home 63275: 35 // end }, /** * Returns a wrapped node. Intended to be used on event targets, * so it will return the node's parent if the target is a text * node. * * If accessing a property of the node throws an error, this is * probably the anonymous div wrapper Gecko adds inside text * nodes. This likely will only occur when attempting to access * the relatedTarget. In this case, we now return null because * the anonymous div is completely useless and we do not know * what the related target was because we can't even get to * the element's parent node. * * @method resolve * @private */ resolve = function(n) { if (!n) { return n; } try { if (n && 3 == n.nodeType) { n = n.parentNode; } } catch(e) { return null; } return Y.one(n); }, DOMEventFacade = function(ev, currentTarget, wrapper) { this._event = ev; this._currentTarget = currentTarget; this._wrapper = wrapper || EMPTY; // if not lazy init this.init(); }; Y.extend(DOMEventFacade, Object, { init: function() { var e = this._event, overrides = this._wrapper.overrides, x = e.pageX, y = e.pageY, c, currentTarget = this._currentTarget; this.altKey = e.altKey; this.ctrlKey = e.ctrlKey; this.metaKey = e.metaKey; this.shiftKey = e.shiftKey; this.type = (overrides && overrides.type) || e.type; this.clientX = e.clientX; this.clientY = e.clientY; this.pageX = x; this.pageY = y; // charCode is unknown in keyup, keydown. keyCode is unknown in keypress. // FF 3.6 - 8+? pass 0 for keyCode in keypress events. // Webkit, FF 3.6-8+?, and IE9+? pass 0 for charCode in keydown, keyup. // Webkit and IE9+? duplicate charCode in keyCode. // Opera never sets charCode, always keyCode (though with the charCode). // IE6-8 don't set charCode or which. // All browsers other than IE6-8 set which=keyCode in keydown, keyup, and // which=charCode in keypress. // // Moral of the story: (e.which || e.keyCode) will always return the // known code for that key event phase. e.keyCode is often different in // keypress from keydown and keyup. c = e.keyCode || e.charCode; if (ua.webkit && (c in webkitKeymap)) { c = webkitKeymap[c]; } this.keyCode = c; this.charCode = c; // Fill in e.which for IE - implementers should always use this over // e.keyCode or e.charCode. this.which = e.which || e.charCode || c; // this.button = e.button; this.button = this.which; this.target = resolve(e.target); this.currentTarget = resolve(currentTarget); this.relatedTarget = resolve(e.relatedTarget); if (e.type == "mousewheel" || e.type == "DOMMouseScroll") { this.wheelDelta = (e.detail) ? (e.detail * -1) : Math.round(e.wheelDelta / 80) || ((e.wheelDelta < 0) ? -1 : 1); } if (this._touch) { this._touch(e, currentTarget, this._wrapper); } }, stopPropagation: function() { this._event.stopPropagation(); this._wrapper.stopped = 1; this.stopped = 1; }, stopImmediatePropagation: function() { var e = this._event; if (e.stopImmediatePropagation) { e.stopImmediatePropagation(); } else { this.stopPropagation(); } this._wrapper.stopped = 2; this.stopped = 2; }, preventDefault: function(returnValue) { var e = this._event; e.preventDefault(); e.returnValue = returnValue || false; this._wrapper.prevented = 1; this.prevented = 1; }, halt: function(immediate) { if (immediate) { this.stopImmediatePropagation(); } else { this.stopPropagation(); } this.preventDefault(); } }); DOMEventFacade.resolve = resolve; Y.DOM2EventFacade = DOMEventFacade; Y.DOMEventFacade = DOMEventFacade; /** * The native event * @property _event * @type {Native DOM Event} * @private */ /** The name of the event (e.g. "click") @property type @type {String} **/ /** `true` if the "alt" or "option" key is pressed. @property altKey @type {Boolean} **/ /** `true` if the shift key is pressed. @property shiftKey @type {Boolean} **/ /** `true` if the "Windows" key on a Windows keyboard, "command" key on an Apple keyboard, or "meta" key on other keyboards is pressed. @property metaKey @type {Boolean} **/ /** `true` if the "Ctrl" or "control" key is pressed. @property ctrlKey @type {Boolean} **/ /** * The X location of the event on the page (including scroll) * @property pageX * @type {Number} */ /** * The Y location of the event on the page (including scroll) * @property pageY * @type {Number} */ /** * The X location of the event in the viewport * @property clientX * @type {Number} */ /** * The Y location of the event in the viewport * @property clientY * @type {Number} */ /** * The keyCode for key events. Uses charCode if keyCode is not available * @property keyCode * @type {Number} */ /** * The charCode for key events. Same as keyCode * @property charCode * @type {Number} */ /** * The button that was pushed. 1 for left click, 2 for middle click, 3 for * right click. This is only reliably populated on `mouseup` events. * @property button * @type {Number} */ /** * The button that was pushed. Same as button. * @property which * @type {Number} */ /** * Node reference for the targeted element * @property target * @type {Node} */ /** * Node reference for the element that the listener was attached to. * @property currentTarget * @type {Node} */ /** * Node reference to the relatedTarget * @property relatedTarget * @type {Node} */ /** * Number representing the direction and velocity of the movement of the mousewheel. * Negative is down, the higher the number, the faster. Applies to the mousewheel event. * @property wheelDelta * @type {Number} */ /** * Stops the propagation to the next bubble target * @method stopPropagation */ /** * Stops the propagation to the next bubble target and * prevents any additional listeners from being exectued * on the current target. * @method stopImmediatePropagation */ /** * Prevents the event's default behavior * @method preventDefault * @param returnValue {string} sets the returnValue of the event to this value * (rather than the default false value). This can be used to add a customized * confirmation query to the beforeunload event). */ /** * Stops the event propagation and prevents the default * event behavior. * @method halt * @param immediate {boolean} if true additional listeners * on the current target will not be executed */ (function() { /** * The event utility provides functions to add and remove event listeners, * event cleansing. It also tries to automatically remove listeners it * registers during the unload event. * @module event * @main event * @submodule event-base */ /** * The event utility provides functions to add and remove event listeners, * event cleansing. It also tries to automatically remove listeners it * registers during the unload event. * * @class Event * @static */ Y.Env.evt.dom_wrappers = {}; Y.Env.evt.dom_map = {}; var _eventenv = Y.Env.evt, config = Y.config, win = config.win, add = YUI.Env.add, remove = YUI.Env.remove, onLoad = function() { YUI.Env.windowLoaded = true; Y.Event._load(); remove(win, "load", onLoad); }, onUnload = function() { Y.Event._unload(); }, EVENT_READY = 'domready', COMPAT_ARG = '~yui|2|compat~', shouldIterate = function(o) { try { return (o && typeof o !== "string" && Y.Lang.isNumber(o.length) && !o.tagName && !o.alert); } catch(ex) { return false; } }, // aliases to support DOM event subscription clean up when the last // subscriber is detached. deleteAndClean overrides the DOM event's wrapper // CustomEvent _delete method. _ceProtoDelete = Y.CustomEvent.prototype._delete, _deleteAndClean = function(s) { var ret = _ceProtoDelete.apply(this, arguments); if (!this.hasSubs()) { Y.Event._clean(this); } return ret; }, Event = function() { /** * True after the onload event has fired * @property _loadComplete * @type boolean * @static * @private */ var _loadComplete = false, /** * The number of times to poll after window.onload. This number is * increased if additional late-bound handlers are requested after * the page load. * @property _retryCount * @static * @private */ _retryCount = 0, /** * onAvailable listeners * @property _avail * @static * @private */ _avail = [], /** * Custom event wrappers for DOM events. Key is * 'event:' + Element uid stamp + event type * @property _wrappers * @type Y.Event.Custom * @static * @private */ _wrappers = _eventenv.dom_wrappers, _windowLoadKey = null, /** * Custom event wrapper map DOM events. Key is * Element uid stamp. Each item is a hash of custom event * wrappers as provided in the _wrappers collection. This * provides the infrastructure for getListeners. * @property _el_events * @static * @private */ _el_events = _eventenv.dom_map; return { /** * The number of times we should look for elements that are not * in the DOM at the time the event is requested after the document * has been loaded. The default is 1000@amp;40 ms, so it will poll * for 40 seconds or until all outstanding handlers are bound * (whichever comes first). * @property POLL_RETRYS * @type int * @static * @final */ POLL_RETRYS: 1000, /** * The poll interval in milliseconds * @property POLL_INTERVAL * @type int * @static * @final */ POLL_INTERVAL: 40, /** * addListener/removeListener can throw errors in unexpected scenarios. * These errors are suppressed, the method returns false, and this property * is set * @property lastError * @static * @type Error */ lastError: null, /** * poll handle * @property _interval * @static * @private */ _interval: null, /** * document readystate poll handle * @property _dri * @static * @private */ _dri: null, /** * True when the document is initially usable * @property DOMReady * @type boolean * @static */ DOMReady: false, /** * @method startInterval * @static * @private */ startInterval: function() { if (!Event._interval) { Event._interval = setInterval(Event._poll, Event.POLL_INTERVAL); } }, /** * Executes the supplied callback when the item with the supplied * id is found. This is meant to be used to execute behavior as * soon as possible as the page loads. If you use this after the * initial page load it will poll for a fixed time for the element. * The number of times it will poll and the frequency are * configurable. By default it will poll for 10 seconds. * * <p>The callback is executed with a single parameter: * the custom object parameter, if provided.</p> * * @method onAvailable * * @param {string||string[]} id the id of the element, or an array * of ids to look for. * @param {function} fn what to execute when the element is found. * @param {object} p_obj an optional object to be passed back as * a parameter to fn. * @param {boolean|object} p_override If set to true, fn will execute * in the context of p_obj, if set to an object it * will execute in the context of that object * @param checkContent {boolean} check child node readiness (onContentReady) * @static * @deprecated Use Y.on("available") */ // @TODO fix arguments onAvailable: function(id, fn, p_obj, p_override, checkContent, compat) { var a = Y.Array(id), i, availHandle; for (i=0; i<a.length; i=i+1) { _avail.push({ id: a[i], fn: fn, obj: p_obj, override: p_override, checkReady: checkContent, compat: compat }); } _retryCount = this.POLL_RETRYS; // We want the first test to be immediate, but async setTimeout(Event._poll, 0); availHandle = new Y.EventHandle({ _delete: function() { // set by the event system for lazy DOM listeners if (availHandle.handle) { availHandle.handle.detach(); return; } var i, j; // otherwise try to remove the onAvailable listener(s) for (i = 0; i < a.length; i++) { for (j = 0; j < _avail.length; j++) { if (a[i] === _avail[j].id) { _avail.splice(j, 1); } } } } }); return availHandle; }, /** * Works the same way as onAvailable, but additionally checks the * state of sibling elements to determine if the content of the * available element is safe to modify. * * <p>The callback is executed with a single parameter: * the custom object parameter, if provided.</p> * * @method onContentReady * * @param {string} id the id of the element to look for. * @param {function} fn what to execute when the element is ready. * @param {object} obj an optional object to be passed back as * a parameter to fn. * @param {boolean|object} override If set to true, fn will execute * in the context of p_obj. If an object, fn will * exectute in the context of that object * * @static * @deprecated Use Y.on("contentready") */ // @TODO fix arguments onContentReady: function(id, fn, obj, override, compat) { return Event.onAvailable(id, fn, obj, override, true, compat); }, /** * Adds an event listener * * @method attach * * @param {String} type The type of event to append * @param {Function} fn The method the event invokes * @param {String|HTMLElement|Array|NodeList} el An id, an element * reference, or a collection of ids and/or elements to assign the * listener to. * @param {Object} context optional context object * @param {Boolean|object} args 0..n arguments to pass to the callback * @return {EventHandle} an object to that can be used to detach the listener * * @static */ attach: function(type, fn, el, context) { return Event._attach(Y.Array(arguments, 0, true)); }, _createWrapper: function (el, type, capture, compat, facade) { var cewrapper, ek = Y.stamp(el), key = 'event:' + ek + type; if (false === facade) { key += 'native'; } if (capture) { key += 'capture'; } cewrapper = _wrappers[key]; if (!cewrapper) { // create CE wrapper cewrapper = Y.publish(key, { silent: true, bubbles: false, contextFn: function() { if (compat) { return cewrapper.el; } else { cewrapper.nodeRef = cewrapper.nodeRef || Y.one(cewrapper.el); return cewrapper.nodeRef; } } }); cewrapper.overrides = {}; // for later removeListener calls cewrapper.el = el; cewrapper.key = key; cewrapper.domkey = ek; cewrapper.type = type; cewrapper.fn = function(e) { cewrapper.fire(Event.getEvent(e, el, (compat || (false === facade)))); }; cewrapper.capture = capture; if (el == win && type == "load") { // window load happens once cewrapper.fireOnce = true; _windowLoadKey = key; } cewrapper._delete = _deleteAndClean; _wrappers[key] = cewrapper; _el_events[ek] = _el_events[ek] || {}; _el_events[ek][key] = cewrapper; add(el, type, cewrapper.fn, capture); } return cewrapper; }, _attach: function(args, conf) { var compat, handles, oEl, cewrapper, context, fireNow = false, ret, type = args[0], fn = args[1], el = args[2] || win, facade = conf && conf.facade, capture = conf && conf.capture, overrides = conf && conf.overrides; if (args[args.length-1] === COMPAT_ARG) { compat = true; } if (!fn || !fn.call) { // throw new TypeError(type + " attach call failed, callback undefined"); return false; } // The el argument can be an array of elements or element ids. if (shouldIterate(el)) { handles=[]; Y.each(el, function(v, k) { args[2] = v; handles.push(Event._attach(args.slice(), conf)); }); // return (handles.length === 1) ? handles[0] : handles; return new Y.EventHandle(handles); // If the el argument is a string, we assume it is // actually the id of the element. If the page is loaded // we convert el to the actual element, otherwise we // defer attaching the event until the element is // ready } else if (Y.Lang.isString(el)) { // oEl = (compat) ? Y.DOM.byId(el) : Y.Selector.query(el); if (compat) { oEl = Y.DOM.byId(el); } else { oEl = Y.Selector.query(el); switch (oEl.length) { case 0: oEl = null; break; case 1: oEl = oEl[0]; break; default: args[2] = oEl; return Event._attach(args, conf); } } if (oEl) { el = oEl; // Not found = defer adding the event until the element is available } else { ret = Event.onAvailable(el, function() { ret.handle = Event._attach(args, conf); }, Event, true, false, compat); return ret; } } // Element should be an html element or node if (!el) { return false; } if (Y.Node && Y.instanceOf(el, Y.Node)) { el = Y.Node.getDOMNode(el); } cewrapper = Event._createWrapper(el, type, capture, compat, facade); if (overrides) { Y.mix(cewrapper.overrides, overrides); } if (el == win && type == "load") { // if the load is complete, fire immediately. // all subscribers, including the current one // will be notified. if (YUI.Env.windowLoaded) { fireNow = true; } } if (compat) { args.pop(); } context = args[3]; // set context to the Node if not specified // ret = cewrapper.on.apply(cewrapper, trimmedArgs); ret = cewrapper._on(fn, context, (args.length > 4) ? args.slice(4) : null); if (fireNow) { cewrapper.fire(); } return ret; }, /** * Removes an event listener. Supports the signature the event was bound * with, but the preferred way to remove listeners is using the handle * that is returned when using Y.on * * @method detach * * @param {String} type the type of event to remove. * @param {Function} fn the method the event invokes. If fn is * undefined, then all event handlers for the type of event are * removed. * @param {String|HTMLElement|Array|NodeList|EventHandle} el An * event handle, an id, an element reference, or a collection * of ids and/or elements to remove the listener from. * @return {boolean} true if the unbind was successful, false otherwise. * @static */ detach: function(type, fn, el, obj) { var args=Y.Array(arguments, 0, true), compat, l, ok, i, id, ce; if (args[args.length-1] === COMPAT_ARG) { compat = true; // args.pop(); } if (type && type.detach) { return type.detach(); } // The el argument can be a string if (typeof el == "string") { // el = (compat) ? Y.DOM.byId(el) : Y.all(el); if (compat) { el = Y.DOM.byId(el); } else { el = Y.Selector.query(el); l = el.length; if (l < 1) { el = null; } else if (l == 1) { el = el[0]; } } // return Event.detach.apply(Event, args); } if (!el) { return false; } if (el.detach) { args.splice(2, 1); return el.detach.apply(el, args); // The el argument can be an array of elements or element ids. } else if (shouldIterate(el)) { ok = true; for (i=0, l=el.length; i<l; ++i) { args[2] = el[i]; ok = ( Y.Event.detach.apply(Y.Event, args) && ok ); } return ok; } if (!type || !fn || !fn.call) { return Event.purgeElement(el, false, type); } id = 'event:' + Y.stamp(el) + type; ce = _wrappers[id]; if (ce) { return ce.detach(fn); } else { return false; } }, /** * Finds the event in the window object, the caller's arguments, or * in the arguments of another method in the callstack. This is * executed automatically for events registered through the event * manager, so the implementer should not normally need to execute * this function at all. * @method getEvent * @param {Event} e the event parameter from the handler * @param {HTMLElement} el the element the listener was attached to * @return {Event} the event * @static */ getEvent: function(e, el, noFacade) { var ev = e || win.event; return (noFacade) ? ev : new Y.DOMEventFacade(ev, el, _wrappers['event:' + Y.stamp(el) + e.type]); }, /** * Generates an unique ID for the element if it does not already * have one. * @method generateId * @param el the element to create the id for * @return {string} the resulting id of the element * @static */ generateId: function(el) { return Y.DOM.generateID(el); }, /** * We want to be able to use getElementsByTagName as a collection * to attach a group of events to. Unfortunately, different * browsers return different types of collections. This function * tests to determine if the object is array-like. It will also * fail if the object is an array, but is empty. * @method _isValidCollection * @param o the object to test * @return {boolean} true if the object is array-like and populated * @deprecated was not meant to be used directly * @static * @private */ _isValidCollection: shouldIterate, /** * hook up any deferred listeners * @method _load * @static * @private */ _load: function(e) { if (!_loadComplete) { _loadComplete = true; // Just in case DOMReady did not go off for some reason // E._ready(); if (Y.fire) { Y.fire(EVENT_READY); } // Available elements may not have been detected before the // window load event fires. Try to find them now so that the // the user is more likely to get the onAvailable notifications // before the window load notification Event._poll(); } }, /** * Polling function that runs before the onload event fires, * attempting to attach to DOM Nodes as soon as they are * available * @method _poll * @static * @private */ _poll: function() { if (Event.locked) { return; } if (Y.UA.ie && !YUI.Env.DOMReady) { // Hold off if DOMReady has not fired and check current // readyState to protect against the IE operation aborted // issue. Event.startInterval(); return; } Event.locked = true; // keep trying until after the page is loaded. We need to // check the page load state prior to trying to bind the // elements so that we can be certain all elements have been // tested appropriately var i, len, item, el, notAvail, executeItem, tryAgain = !_loadComplete; if (!tryAgain) { tryAgain = (_retryCount > 0); } // onAvailable notAvail = []; executeItem = function (el, item) { var context, ov = item.override; try { if (item.compat) { if (item.override) { if (ov === true) { context = item.obj; } else { context = ov; } } else { context = el; } item.fn.call(context, item.obj); } else { context = item.obj || Y.one(el); item.fn.apply(context, (Y.Lang.isArray(ov)) ? ov : []); } } catch (e) { } }; // onAvailable for (i=0,len=_avail.length; i<len; ++i) { item = _avail[i]; if (item && !item.checkReady) { // el = (item.compat) ? Y.DOM.byId(item.id) : Y.one(item.id); el = (item.compat) ? Y.DOM.byId(item.id) : Y.Selector.query(item.id, null, true); if (el) { executeItem(el, item); _avail[i] = null; } else { notAvail.push(item); } } } // onContentReady for (i=0,len=_avail.length; i<len; ++i) { item = _avail[i]; if (item && item.checkReady) { // el = (item.compat) ? Y.DOM.byId(item.id) : Y.one(item.id); el = (item.compat) ? Y.DOM.byId(item.id) : Y.Selector.query(item.id, null, true); if (el) { // The element is available, but not necessarily ready // @todo should we test parentNode.nextSibling? if (_loadComplete || (el.get && el.get('nextSibling')) || el.nextSibling) { executeItem(el, item); _avail[i] = null; } } else { notAvail.push(item); } } } _retryCount = (notAvail.length === 0) ? 0 : _retryCount - 1; if (tryAgain) { // we may need to strip the nulled out items here Event.startInterval(); } else { clearInterval(Event._interval); Event._interval = null; } Event.locked = false; return; }, /** * Removes all listeners attached to the given element via addListener. * Optionally, the node's children can also be purged. * Optionally, you can specify a specific type of event to remove. * @method purgeElement * @param {HTMLElement} el the element to purge * @param {boolean} recurse recursively purge this element's children * as well. Use with caution. * @param {string} type optional type of listener to purge. If * left out, all listeners will be removed * @static */ purgeElement: function(el, recurse, type) { // var oEl = (Y.Lang.isString(el)) ? Y.one(el) : el, var oEl = (Y.Lang.isString(el)) ? Y.Selector.query(el, null, true) : el, lis = Event.getListeners(oEl, type), i, len, children, child; if (recurse && oEl) { lis = lis || []; children = Y.Selector.query('*', oEl); i = 0; len = children.length; for (; i < len; ++i) { child = Event.getListeners(children[i], type); if (child) { lis = lis.concat(child); } } } if (lis) { for (i = 0, len = lis.length; i < len; ++i) { lis[i].detachAll(); } } }, /** * Removes all object references and the DOM proxy subscription for * a given event for a DOM node. * * @method _clean * @param wrapper {CustomEvent} Custom event proxy for the DOM * subscription * @private * @static * @since 3.4.0 */ _clean: function (wrapper) { var key = wrapper.key, domkey = wrapper.domkey; remove(wrapper.el, wrapper.type, wrapper.fn, wrapper.capture); delete _wrappers[key]; delete Y._yuievt.events[key]; if (_el_events[domkey]) { delete _el_events[domkey][key]; if (!Y.Object.size(_el_events[domkey])) { delete _el_events[domkey]; } } }, /** * Returns all listeners attached to the given element via addListener. * Optionally, you can specify a specific type of event to return. * @method getListeners * @param el {HTMLElement|string} the element or element id to inspect * @param type {string} optional type of listener to return. If * left out, all listeners will be returned * @return {CustomEvent} the custom event wrapper for the DOM event(s) * @static */ getListeners: function(el, type) { var ek = Y.stamp(el, true), evts = _el_events[ek], results=[] , key = (type) ? 'event:' + ek + type : null, adapters = _eventenv.plugins; if (!evts) { return null; } if (key) { // look for synthetic events if (adapters[type] && adapters[type].eventDef) { key += '_synth'; } if (evts[key]) { results.push(evts[key]); } // get native events as well key += 'native'; if (evts[key]) { results.push(evts[key]); } } else { Y.each(evts, function(v, k) { results.push(v); }); } return (results.length) ? results : null; }, /** * Removes all listeners registered by pe.event. Called * automatically during the unload event. * @method _unload * @static * @private */ _unload: function(e) { Y.each(_wrappers, function(v, k) { if (v.type == 'unload') { v.fire(e); } v.detachAll(); }); remove(win, "unload", onUnload); }, /** * Adds a DOM event directly without the caching, cleanup, context adj, etc * * @method nativeAdd * @param {HTMLElement} el the element to bind the handler to * @param {string} type the type of event handler * @param {function} fn the callback to invoke * @param {boolen} capture capture or bubble phase * @static * @private */ nativeAdd: add, /** * Basic remove listener * * @method nativeRemove * @param {HTMLElement} el the element to bind the handler to * @param {string} type the type of event handler * @param {function} fn the callback to invoke * @param {boolen} capture capture or bubble phase * @static * @private */ nativeRemove: remove }; }(); Y.Event = Event; if (config.injected || YUI.Env.windowLoaded) { onLoad(); } else { add(win, "load", onLoad); } // Process onAvailable/onContentReady items when when the DOM is ready in IE if (Y.UA.ie) { Y.on(EVENT_READY, Event._poll); } try { add(win, "unload", onUnload); } catch(e) { } Event.Custom = Y.CustomEvent; Event.Subscriber = Y.Subscriber; Event.Target = Y.EventTarget; Event.Handle = Y.EventHandle; Event.Facade = Y.EventFacade; Event._poll(); })(); /** * DOM event listener abstraction layer * @module event * @submodule event-base */ /** * Executes the callback as soon as the specified element * is detected in the DOM. This function expects a selector * string for the element(s) to detect. If you already have * an element reference, you don't need this event. * @event available * @param type {string} 'available' * @param fn {function} the callback function to execute. * @param el {string} an selector for the element(s) to attach * @param context optional argument that specifies what 'this' refers to. * @param args* 0..n additional arguments to pass on to the callback function. * These arguments will be added after the event object. * @return {EventHandle} the detach handle * @for YUI */ Y.Env.evt.plugins.available = { on: function(type, fn, id, o) { var a = arguments.length > 4 ? Y.Array(arguments, 4, true) : null; return Y.Event.onAvailable.call(Y.Event, id, fn, o, a); } }; /** * Executes the callback as soon as the specified element * is detected in the DOM with a nextSibling property * (indicating that the element's children are available). * This function expects a selector * string for the element(s) to detect. If you already have * an element reference, you don't need this event. * @event contentready * @param type {string} 'contentready' * @param fn {function} the callback function to execute. * @param el {string} an selector for the element(s) to attach. * @param context optional argument that specifies what 'this' refers to. * @param args* 0..n additional arguments to pass on to the callback function. * These arguments will be added after the event object. * @return {EventHandle} the detach handle * @for YUI */ Y.Env.evt.plugins.contentready = { on: function(type, fn, id, o) { var a = arguments.length > 4 ? Y.Array(arguments, 4, true) : null; return Y.Event.onContentReady.call(Y.Event, id, fn, o, a); } }; }, '@VERSION@', {"requires": ["event-custom-base"]}); YUI.add('pluginhost-base', function (Y, NAME) { /** * Provides the augmentable PluginHost interface, which can be added to any class. * @module pluginhost */ /** * Provides the augmentable PluginHost interface, which can be added to any class. * @module pluginhost-base */ /** * <p> * An augmentable class, which provides the augmented class with the ability to host plugins. * It adds <a href="#method_plug">plug</a> and <a href="#method_unplug">unplug</a> methods to the augmented class, which can * be used to add or remove plugins from instances of the class. * </p> * * <p>Plugins can also be added through the constructor configuration object passed to the host class' constructor using * the "plugins" property. Supported values for the "plugins" property are those defined by the <a href="#method_plug">plug</a> method. * * For example the following code would add the AnimPlugin and IOPlugin to Overlay (the plugin host): * <xmp> * var o = new Overlay({plugins: [ AnimPlugin, {fn:IOPlugin, cfg:{section:"header"}}]}); * </xmp> * </p> * <p> * Plug.Host's protected <a href="#method_initPlugins">_initPlugins</a> and <a href="#method_destroyPlugins">_destroyPlugins</a> * methods should be invoked by the host class at the appropriate point in the host's lifecyle. * </p> * * @class Plugin.Host */ var L = Y.Lang; function PluginHost() { this._plugins = {}; } PluginHost.prototype = { /** * Adds a plugin to the host object. This will instantiate the * plugin and attach it to the configured namespace on the host object. * * @method plug * @chainable * @param P {Function | Object |Array} Accepts the plugin class, or an * object with a "fn" property specifying the plugin class and * a "cfg" property specifying the configuration for the Plugin. * <p> * Additionally an Array can also be passed in, with the above function or * object values, allowing the user to add multiple plugins in a single call. * </p> * @param config (Optional) If the first argument is the plugin class, the second argument * can be the configuration for the plugin. * @return {Base} A reference to the host object */ plug: function(Plugin, config) { var i, ln, ns; if (L.isArray(Plugin)) { for (i = 0, ln = Plugin.length; i < ln; i++) { this.plug(Plugin[i]); } } else { if (Plugin && !L.isFunction(Plugin)) { config = Plugin.cfg; Plugin = Plugin.fn; } // Plugin should be fn by now if (Plugin && Plugin.NS) { ns = Plugin.NS; config = config || {}; config.host = this; if (this.hasPlugin(ns)) { // Update config if (this[ns].setAttrs) { this[ns].setAttrs(config); } } else { // Create new instance this[ns] = new Plugin(config); this._plugins[ns] = Plugin; } } } return this; }, /** * Removes a plugin from the host object. This will destroy the * plugin instance and delete the namespace from the host object. * * @method unplug * @param {String | Function} plugin The namespace of the plugin, or the plugin class with the static NS namespace property defined. If not provided, * all registered plugins are unplugged. * @return {Base} A reference to the host object * @chainable */ unplug: function(plugin) { var ns = plugin, plugins = this._plugins; if (plugin) { if (L.isFunction(plugin)) { ns = plugin.NS; if (ns && (!plugins[ns] || plugins[ns] !== plugin)) { ns = null; } } if (ns) { if (this[ns]) { if (this[ns].destroy) { this[ns].destroy(); } delete this[ns]; } if (plugins[ns]) { delete plugins[ns]; } } } else { for (ns in this._plugins) { if (this._plugins.hasOwnProperty(ns)) { this.unplug(ns); } } } return this; }, /** * Determines if a plugin has plugged into this host. * * @method hasPlugin * @param {String} ns The plugin's namespace * @return {Plugin} Returns a truthy value (the plugin instance) if present, or undefined if not. */ hasPlugin : function(ns) { return (this._plugins[ns] && this[ns]); }, /** * Initializes static plugins registered on the host (using the * Base.plug static method) and any plugins passed to the * instance through the "plugins" configuration property. * * @method _initPlugins * @param {Config} config The configuration object with property name/value pairs. * @private */ _initPlugins: function(config) { this._plugins = this._plugins || {}; if (this._initConfigPlugins) { this._initConfigPlugins(config); } }, /** * Unplugs and destroys all plugins on the host * @method _destroyPlugins * @private */ _destroyPlugins: function() { this.unplug(); } }; Y.namespace("Plugin").Host = PluginHost; }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('pluginhost-config', function (Y, NAME) { /** * Adds pluginhost constructor configuration and static configuration support * @submodule pluginhost-config */ var PluginHost = Y.Plugin.Host, L = Y.Lang; /** * A protected initialization method, used by the host class to initialize * plugin configurations passed the constructor, through the config object. * * Host objects should invoke this method at the appropriate time in their * construction lifecycle. * * @method _initConfigPlugins * @param {Object} config The configuration object passed to the constructor * @protected * @for Plugin.Host */ PluginHost.prototype._initConfigPlugins = function(config) { // Class Configuration var classes = (this._getClasses) ? this._getClasses() : [this.constructor], plug = [], unplug = {}, constructor, i, classPlug, classUnplug, pluginClassName; // TODO: Room for optimization. Can we apply statically/unplug in same pass? for (i = classes.length - 1; i >= 0; i--) { constructor = classes[i]; classUnplug = constructor._UNPLUG; if (classUnplug) { // subclasses over-write Y.mix(unplug, classUnplug, true); } classPlug = constructor._PLUG; if (classPlug) { // subclasses over-write Y.mix(plug, classPlug, true); } } for (pluginClassName in plug) { if (plug.hasOwnProperty(pluginClassName)) { if (!unplug[pluginClassName]) { this.plug(plug[pluginClassName]); } } } // User Configuration if (config && config.plugins) { this.plug(config.plugins); } }; /** * Registers plugins to be instantiated at the class level (plugins * which should be plugged into every instance of the class by default). * * @method plug * @static * * @param {Function} hostClass The host class on which to register the plugins * @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of objects (with fn and cfg properties defined) * @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin * @for Plugin.Host */ PluginHost.plug = function(hostClass, plugin, config) { // Cannot plug into Base, since Plugins derive from Base [ will cause infinite recurrsion ] var p, i, l, name; if (hostClass !== Y.Base) { hostClass._PLUG = hostClass._PLUG || {}; if (!L.isArray(plugin)) { if (config) { plugin = {fn:plugin, cfg:config}; } plugin = [plugin]; } for (i = 0, l = plugin.length; i < l;i++) { p = plugin[i]; name = p.NAME || p.fn.NAME; hostClass._PLUG[name] = p; } } }; /** * Unregisters any class level plugins which have been registered by the host class, or any * other class in the hierarchy. * * @method unplug * @static * * @param {Function} hostClass The host class from which to unregister the plugins * @param {Function | Array} plugin The plugin class, or an array of plugin classes * @for Plugin.Host */ PluginHost.unplug = function(hostClass, plugin) { var p, i, l, name; if (hostClass !== Y.Base) { hostClass._UNPLUG = hostClass._UNPLUG || {}; if (!L.isArray(plugin)) { plugin = [plugin]; } for (i = 0, l = plugin.length; i < l; i++) { p = plugin[i]; name = p.NAME; if (!hostClass._PLUG[name]) { hostClass._UNPLUG[name] = p; } else { delete hostClass._PLUG[name]; } } } }; }, '@VERSION@', {"requires": ["pluginhost-base"]}); YUI.add('event-delegate', function (Y, NAME) { /** * Adds event delegation support to the library. * * @module event * @submodule event-delegate */ var toArray = Y.Array, YLang = Y.Lang, isString = YLang.isString, isObject = YLang.isObject, isArray = YLang.isArray, selectorTest = Y.Selector.test, detachCategories = Y.Env.evt.handles; /** * <p>Sets up event delegation on a container element. The delegated event * will use a supplied selector or filtering function to test if the event * references at least one node that should trigger the subscription * callback.</p> * * <p>Selector string filters will trigger the callback if the event originated * from a node that matches it or is contained in a node that matches it. * Function filters are called for each Node up the parent axis to the * subscribing container node, and receive at each level the Node and the event * object. The function should return true (or a truthy value) if that Node * should trigger the subscription callback. Note, it is possible for filters * to match multiple Nodes for a single event. In this case, the delegate * callback will be executed for each matching Node.</p> * * <p>For each matching Node, the callback will be executed with its 'this' * object set to the Node matched by the filter (unless a specific context was * provided during subscription), and the provided event's * <code>currentTarget</code> will also be set to the matching Node. The * containing Node from which the subscription was originally made can be * referenced as <code>e.container</code>. * * @method delegate * @param type {String} the event type to delegate * @param fn {Function} the callback function to execute. This function * will be provided the event object for the delegated event. * @param el {String|node} the element that is the delegation container * @param filter {string|Function} a selector that must match the target of the * event or a function to test target and its parents for a match * @param context optional argument that specifies what 'this' refers to. * @param args* 0..n additional arguments to pass on to the callback function. * These arguments will be added after the event object. * @return {EventHandle} the detach handle * @static * @for Event */ function delegate(type, fn, el, filter) { var args = toArray(arguments, 0, true), query = isString(el) ? el : null, typeBits, synth, container, categories, cat, i, len, handles, handle; // Support Y.delegate({ click: fnA, key: fnB }, el, filter, ...); // and Y.delegate(['click', 'key'], fn, el, filter, ...); if (isObject(type)) { handles = []; if (isArray(type)) { for (i = 0, len = type.length; i < len; ++i) { args[0] = type[i]; handles.push(Y.delegate.apply(Y, args)); } } else { // Y.delegate({'click', fn}, el, filter) => // Y.delegate('click', fn, el, filter) args.unshift(null); // one arg becomes two; need to make space for (i in type) { if (type.hasOwnProperty(i)) { args[0] = i; args[1] = type[i]; handles.push(Y.delegate.apply(Y, args)); } } } return new Y.EventHandle(handles); } typeBits = type.split(/\|/); if (typeBits.length > 1) { cat = typeBits.shift(); args[0] = type = typeBits.shift(); } synth = Y.Node.DOM_EVENTS[type]; if (isObject(synth) && synth.delegate) { handle = synth.delegate.apply(synth, arguments); } if (!handle) { if (!type || !fn || !el || !filter) { return; } container = (query) ? Y.Selector.query(query, null, true) : el; if (!container && isString(el)) { handle = Y.on('available', function () { Y.mix(handle, Y.delegate.apply(Y, args), true); }, el); } if (!handle && container) { args.splice(2, 2, container); // remove the filter handle = Y.Event._attach(args, { facade: false }); handle.sub.filter = filter; handle.sub._notify = delegate.notifySub; } } if (handle && cat) { categories = detachCategories[cat] || (detachCategories[cat] = {}); categories = categories[type] || (categories[type] = []); categories.push(handle); } return handle; } /** Overrides the <code>_notify</code> method on the normal DOM subscription to inject the filtering logic and only proceed in the case of a match. This method is hosted as a private property of the `delegate` method (e.g. `Y.delegate.notifySub`) @method notifySub @param thisObj {Object} default 'this' object for the callback @param args {Array} arguments passed to the event's <code>fire()</code> @param ce {CustomEvent} the custom event managing the DOM subscriptions for the subscribed event on the subscribing node. @return {Boolean} false if the event was stopped @private @static @since 3.2.0 **/ delegate.notifySub = function (thisObj, args, ce) { // Preserve args for other subscribers args = args.slice(); if (this.args) { args.push.apply(args, this.args); } // Only notify subs if the event occurred on a targeted element var currentTarget = delegate._applyFilter(this.filter, args, ce), //container = e.currentTarget, e, i, len, ret; if (currentTarget) { // Support multiple matches up the the container subtree currentTarget = toArray(currentTarget); // The second arg is the currentTarget, but we'll be reusing this // facade, replacing the currentTarget for each use, so it doesn't // matter what element we seed it with. e = args[0] = new Y.DOMEventFacade(args[0], ce.el, ce); e.container = Y.one(ce.el); for (i = 0, len = currentTarget.length; i < len && !e.stopped; ++i) { e.currentTarget = Y.one(currentTarget[i]); ret = this.fn.apply(this.context || e.currentTarget, args); if (ret === false) { // stop further notifications break; } } return ret; } }; /** Compiles a selector string into a filter function to identify whether Nodes along the parent axis of an event's target should trigger event notification. This function is memoized, so previously compiled filter functions are returned if the same selector string is provided. This function may be useful when defining synthetic events for delegate handling. Hosted as a property of the `delegate` method (e.g. `Y.delegate.compileFilter`). @method compileFilter @param selector {String} the selector string to base the filtration on @return {Function} @since 3.2.0 @static **/ delegate.compileFilter = Y.cached(function (selector) { return function (target, e) { return selectorTest(target._node, selector, (e.currentTarget === e.target) ? null : e.currentTarget._node); }; }); /** Walks up the parent axis of an event's target, and tests each element against a supplied filter function. If any Nodes, including the container, satisfy the filter, the delegated callback will be triggered for each. Hosted as a protected property of the `delegate` method (e.g. `Y.delegate._applyFilter`). @method _applyFilter @param filter {Function} boolean function to test for inclusion in event notification @param args {Array} the arguments that would be passed to subscribers @param ce {CustomEvent} the DOM event wrapper @return {Node|Node[]|undefined} The Node or Nodes that satisfy the filter @protected **/ delegate._applyFilter = function (filter, args, ce) { var e = args[0], container = ce.el, // facadeless events in IE, have no e.currentTarget target = e.target || e.srcElement, match = [], isContainer = false; // Resolve text nodes to their containing element if (target.nodeType === 3) { target = target.parentNode; } // passing target as the first arg rather than leaving well enough alone // making 'this' in the filter function refer to the target. This is to // support bound filter functions. args.unshift(target); if (isString(filter)) { while (target) { isContainer = (target === container); if (selectorTest(target, filter, (isContainer ? null: container))) { match.push(target); } if (isContainer) { break; } target = target.parentNode; } } else { // filter functions are implementer code and should receive wrappers args[0] = Y.one(target); args[1] = new Y.DOMEventFacade(e, container, ce); while (target) { // filter(target, e, extra args...) - this === target if (filter.apply(args[0], args)) { match.push(target); } if (target === container) { break; } target = target.parentNode; args[0] = Y.one(target); } args[1] = e; // restore the raw DOM event } if (match.length <= 1) { match = match[0]; // single match or undefined } // remove the target args.shift(); return match; }; /** * Sets up event delegation on a container element. The delegated event * will use a supplied filter to test if the callback should be executed. * This filter can be either a selector string or a function that returns * a Node to use as the currentTarget for the event. * * The event object for the delegated event is supplied to the callback * function. It is modified slightly in order to support all properties * that may be needed for event delegation. 'currentTarget' is set to * the element that matched the selector string filter or the Node returned * from the filter function. 'container' is set to the element that the * listener is delegated from (this normally would be the 'currentTarget'). * * Filter functions will be called with the arguments that would be passed to * the callback function, including the event object as the first parameter. * The function should return false (or a falsey value) if the success criteria * aren't met, and the Node to use as the event's currentTarget and 'this' * object if they are. * * @method delegate * @param type {string} the event type to delegate * @param fn {function} the callback function to execute. This function * will be provided the event object for the delegated event. * @param el {string|node} the element that is the delegation container * @param filter {string|function} a selector that must match the target of the * event or a function that returns a Node or false. * @param context optional argument that specifies what 'this' refers to. * @param args* 0..n additional arguments to pass on to the callback function. * These arguments will be added after the event object. * @return {EventHandle} the detach handle * @for YUI */ Y.delegate = Y.Event.delegate = delegate; }, '@VERSION@', {"requires": ["node-base"]}); YUI.add('node-event-delegate', function (Y, NAME) { /** * Functionality to make the node a delegated event container * @module node * @submodule node-event-delegate */ /** * <p>Sets up a delegation listener for an event occurring inside the Node. * The delegated event will be verified against a supplied selector or * filtering function to test if the event references at least one node that * should trigger the subscription callback.</p> * * <p>Selector string filters will trigger the callback if the event originated * from a node that matches it or is contained in a node that matches it. * Function filters are called for each Node up the parent axis to the * subscribing container node, and receive at each level the Node and the event * object. The function should return true (or a truthy value) if that Node * should trigger the subscription callback. Note, it is possible for filters * to match multiple Nodes for a single event. In this case, the delegate * callback will be executed for each matching Node.</p> * * <p>For each matching Node, the callback will be executed with its 'this' * object set to the Node matched by the filter (unless a specific context was * provided during subscription), and the provided event's * <code>currentTarget</code> will also be set to the matching Node. The * containing Node from which the subscription was originally made can be * referenced as <code>e.container</code>. * * @method delegate * @param type {String} the event type to delegate * @param fn {Function} the callback function to execute. This function * will be provided the event object for the delegated event. * @param spec {String|Function} a selector that must match the target of the * event or a function to test target and its parents for a match * @param context {Object} optional argument that specifies what 'this' refers to. * @param args* {any} 0..n additional arguments to pass on to the callback function. * These arguments will be added after the event object. * @return {EventHandle} the detach handle * @for Node */ Y.Node.prototype.delegate = function(type) { var args = Y.Array(arguments, 0, true), index = (Y.Lang.isObject(type) && !Y.Lang.isArray(type)) ? 1 : 2; args.splice(index, 0, this._node); return Y.delegate.apply(Y, args); }; }, '@VERSION@', {"requires": ["node-base", "event-delegate"]}); YUI.add('node-pluginhost', function (Y, NAME) { /** * @module node * @submodule node-pluginhost */ /** * Registers plugins to be instantiated at the class level (plugins * which should be plugged into every instance of Node by default). * * @method plug * @static * @for Node * @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of objects (with fn and cfg properties defined) * @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin */ Y.Node.plug = function() { var args = Y.Array(arguments); args.unshift(Y.Node); Y.Plugin.Host.plug.apply(Y.Base, args); return Y.Node; }; /** * Unregisters any class level plugins which have been registered by the Node * * @method unplug * @static * * @param {Function | Array} plugin The plugin class, or an array of plugin classes */ Y.Node.unplug = function() { var args = Y.Array(arguments); args.unshift(Y.Node); Y.Plugin.Host.unplug.apply(Y.Base, args); return Y.Node; }; Y.mix(Y.Node, Y.Plugin.Host, false, null, 1); // allow batching of plug/unplug via NodeList // doesn't use NodeList.importMethod because we need real Nodes (not tmpNode) /** * Adds a plugin to each node in the NodeList. * This will instantiate the plugin and attach it to the configured namespace on each node * @method plug * @for NodeList * @param P {Function | Object |Array} Accepts the plugin class, or an * object with a "fn" property specifying the plugin class and * a "cfg" property specifying the configuration for the Plugin. * <p> * Additionally an Array can also be passed in, with the above function or * object values, allowing the user to add multiple plugins in a single call. * </p> * @param config (Optional) If the first argument is the plugin class, the second argument * can be the configuration for the plugin. * @chainable */ Y.NodeList.prototype.plug = function() { var args = arguments; Y.NodeList.each(this, function(node) { Y.Node.prototype.plug.apply(Y.one(node), args); }); return this; }; /** * Removes a plugin from all nodes in the NodeList. This will destroy the * plugin instance and delete the namespace each node. * @method unplug * @for NodeList * @param {String | Function} plugin The namespace of the plugin, or the plugin class with the static NS namespace property defined. If not provided, * all registered plugins are unplugged. * @chainable */ Y.NodeList.prototype.unplug = function() { var args = arguments; Y.NodeList.each(this, function(node) { Y.Node.prototype.unplug.apply(Y.one(node), args); }); return this; }; }, '@VERSION@', {"requires": ["node-base", "pluginhost"]}); YUI.add('node-screen', function (Y, NAME) { /** * Extended Node interface for managing regions and screen positioning. * Adds support for positioning elements and normalizes window size and scroll detection. * @module node * @submodule node-screen */ // these are all "safe" returns, no wrapping required Y.each([ /** * Returns the inner width of the viewport (exludes scrollbar). * @config winWidth * @for Node * @type {Int} */ 'winWidth', /** * Returns the inner height of the viewport (exludes scrollbar). * @config winHeight * @type {Int} */ 'winHeight', /** * Document width * @config docWidth * @type {Int} */ 'docWidth', /** * Document height * @config docHeight * @type {Int} */ 'docHeight', /** * Pixel distance the page has been scrolled horizontally * @config docScrollX * @type {Int} */ 'docScrollX', /** * Pixel distance the page has been scrolled vertically * @config docScrollY * @type {Int} */ 'docScrollY' ], function(name) { Y.Node.ATTRS[name] = { getter: function() { var args = Array.prototype.slice.call(arguments); args.unshift(Y.Node.getDOMNode(this)); return Y.DOM[name].apply(this, args); } }; } ); Y.Node.ATTRS.scrollLeft = { getter: function() { var node = Y.Node.getDOMNode(this); return ('scrollLeft' in node) ? node.scrollLeft : Y.DOM.docScrollX(node); }, setter: function(val) { var node = Y.Node.getDOMNode(this); if (node) { if ('scrollLeft' in node) { node.scrollLeft = val; } else if (node.document || node.nodeType === 9) { Y.DOM._getWin(node).scrollTo(val, Y.DOM.docScrollY(node)); // scroll window if win or doc } } else { } } }; Y.Node.ATTRS.scrollTop = { getter: function() { var node = Y.Node.getDOMNode(this); return ('scrollTop' in node) ? node.scrollTop : Y.DOM.docScrollY(node); }, setter: function(val) { var node = Y.Node.getDOMNode(this); if (node) { if ('scrollTop' in node) { node.scrollTop = val; } else if (node.document || node.nodeType === 9) { Y.DOM._getWin(node).scrollTo(Y.DOM.docScrollX(node), val); // scroll window if win or doc } } else { } } }; Y.Node.importMethod(Y.DOM, [ /** * Gets the current position of the node in page coordinates. * @method getXY * @for Node * @return {Array} The XY position of the node */ 'getXY', /** * Set the position of the node in page coordinates, regardless of how the node is positioned. * @method setXY * @param {Array} xy Contains X & Y values for new position (coordinates are page-based) * @chainable */ 'setXY', /** * Gets the current position of the node in page coordinates. * @method getX * @return {Int} The X position of the node */ 'getX', /** * Set the position of the node in page coordinates, regardless of how the node is positioned. * @method setX * @param {Int} x X value for new position (coordinates are page-based) * @chainable */ 'setX', /** * Gets the current position of the node in page coordinates. * @method getY * @return {Int} The Y position of the node */ 'getY', /** * Set the position of the node in page coordinates, regardless of how the node is positioned. * @method setY * @param {Int} y Y value for new position (coordinates are page-based) * @chainable */ 'setY', /** * Swaps the XY position of this node with another node. * @method swapXY * @param {Node | HTMLElement} otherNode The node to swap with. * @chainable */ 'swapXY' ]); /** * @module node * @submodule node-screen */ /** * Returns a region object for the node * @config region * @for Node * @type Node */ Y.Node.ATTRS.region = { getter: function() { var node = this.getDOMNode(), region; if (node && !node.tagName) { if (node.nodeType === 9) { // document node = node.documentElement; } } if (Y.DOM.isWindow(node)) { region = Y.DOM.viewportRegion(node); } else { region = Y.DOM.region(node); } return region; } }; /** * Returns a region object for the node's viewport * @config viewportRegion * @type Node */ Y.Node.ATTRS.viewportRegion = { getter: function() { return Y.DOM.viewportRegion(Y.Node.getDOMNode(this)); } }; Y.Node.importMethod(Y.DOM, 'inViewportRegion'); // these need special treatment to extract 2nd node arg /** * Compares the intersection of the node with another node or region * @method intersect * @for Node * @param {Node|Object} node2 The node or region to compare with. * @param {Object} altRegion An alternate region to use (rather than this node's). * @return {Object} An object representing the intersection of the regions. */ Y.Node.prototype.intersect = function(node2, altRegion) { var node1 = Y.Node.getDOMNode(this); if (Y.instanceOf(node2, Y.Node)) { // might be a region object node2 = Y.Node.getDOMNode(node2); } return Y.DOM.intersect(node1, node2, altRegion); }; /** * Determines whether or not the node is within the giving region. * @method inRegion * @param {Node|Object} node2 The node or region to compare with. * @param {Boolean} all Whether or not all of the node must be in the region. * @param {Object} altRegion An alternate region to use (rather than this node's). * @return {Object} An object representing the intersection of the regions. */ Y.Node.prototype.inRegion = function(node2, all, altRegion) { var node1 = Y.Node.getDOMNode(this); if (Y.instanceOf(node2, Y.Node)) { // might be a region object node2 = Y.Node.getDOMNode(node2); } return Y.DOM.inRegion(node1, node2, all, altRegion); }; }, '@VERSION@', {"requires": ["dom-screen", "node-base"]}); YUI.add('node-style', function (Y, NAME) { (function(Y) { /** * Extended Node interface for managing node styles. * @module node * @submodule node-style */ Y.mix(Y.Node.prototype, { /** * Sets a style property of the node. * Use camelCase (e.g. 'backgroundColor') for multi-word properties. * @method setStyle * @param {String} attr The style attribute to set. * @param {String|Number} val The value. * @chainable */ setStyle: function(attr, val) { Y.DOM.setStyle(this._node, attr, val); return this; }, /** * Sets multiple style properties on the node. * Use camelCase (e.g. 'backgroundColor') for multi-word properties. * @method setStyles * @param {Object} hash An object literal of property:value pairs. * @chainable */ setStyles: function(hash) { Y.DOM.setStyles(this._node, hash); return this; }, /** * Returns the style's current value. * Use camelCase (e.g. 'backgroundColor') for multi-word properties. * @method getStyle * @for Node * @param {String} attr The style attribute to retrieve. * @return {String} The current value of the style property for the element. */ getStyle: function(attr) { return Y.DOM.getStyle(this._node, attr); }, /** * Returns the computed value for the given style property. * Use camelCase (e.g. 'backgroundColor') for multi-word properties. * @method getComputedStyle * @param {String} attr The style attribute to retrieve. * @return {String} The computed value of the style property for the element. */ getComputedStyle: function(attr) { return Y.DOM.getComputedStyle(this._node, attr); } }); /** * Returns an array of values for each node. * Use camelCase (e.g. 'backgroundColor') for multi-word properties. * @method getStyle * @for NodeList * @see Node.getStyle * @param {String} attr The style attribute to retrieve. * @return {Array} The current values of the style property for the element. */ /** * Returns an array of the computed value for each node. * Use camelCase (e.g. 'backgroundColor') for multi-word properties. * @method getComputedStyle * @see Node.getComputedStyle * @param {String} attr The style attribute to retrieve. * @return {Array} The computed values for each node. */ /** * Sets a style property on each node. * Use camelCase (e.g. 'backgroundColor') for multi-word properties. * @method setStyle * @see Node.setStyle * @param {String} attr The style attribute to set. * @param {String|Number} val The value. * @chainable */ /** * Sets multiple style properties on each node. * Use camelCase (e.g. 'backgroundColor') for multi-word properties. * @method setStyles * @see Node.setStyles * @param {Object} hash An object literal of property:value pairs. * @chainable */ // These are broken out to handle undefined return (avoid false positive for // chainable) Y.NodeList.importMethod(Y.Node.prototype, ['getStyle', 'getComputedStyle', 'setStyle', 'setStyles']); })(Y); }, '@VERSION@', {"requires": ["dom-style", "node-base"]}); YUI.add('querystring-stringify-simple', function (Y, NAME) { /*global Y */ /** * <p>Provides Y.QueryString.stringify method for converting objects to Query Strings. * This is a subset implementation of the full querystring-stringify.</p> * <p>This module provides the bare minimum functionality (encoding a hash of simple values), * without the additional support for nested data structures. Every key-value pair is * encoded by encodeURIComponent.</p> * <p>This module provides a minimalistic way for io to handle single-level objects * as transaction data.</p> * * @module querystring * @submodule querystring-stringify-simple * @for QueryString * @static */ var QueryString = Y.namespace("QueryString"), EUC = encodeURIComponent; /** * <p>Converts a simple object to a Query String representation.</p> * <p>Nested objects, Arrays, and so on, are not supported.</p> * * @method stringify * @for QueryString * @public * @submodule querystring-stringify-simple * @param obj {Object} A single-level object to convert to a querystring. * @param cfg {Object} (optional) Configuration object. In the simple * module, only the arrayKey setting is * supported. When set to true, the key of an * array will have the '[]' notation appended * to the key;. * @static */ QueryString.stringify = function (obj, c) { var qs = [], // Default behavior is false; standard key notation. s = c && c.arrayKey ? true : false, key, i, l; for (key in obj) { if (obj.hasOwnProperty(key)) { if (Y.Lang.isArray(obj[key])) { for (i = 0, l = obj[key].length; i < l; i++) { qs.push(EUC(s ? key + '[]' : key) + '=' + EUC(obj[key][i])); } } else { qs.push(EUC(key) + '=' + EUC(obj[key])); } } } return qs.join('&'); }; }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('io-base', function (Y, NAME) { /** Base IO functionality. Provides basic XHR transport support. @module io @submodule io-base @for IO **/ var // List of events that comprise the IO event lifecycle. EVENTS = ['start', 'complete', 'end', 'success', 'failure', 'progress'], // Whitelist of used XHR response object properties. XHR_PROPS = ['status', 'statusText', 'responseText', 'responseXML'], win = Y.config.win, uid = 0; /** The IO class is a utility that brokers HTTP requests through a simplified interface. Specifically, it allows JavaScript to make HTTP requests to a resource without a page reload. The underlying transport for making same-domain requests is the XMLHttpRequest object. IO can also use Flash, if specified as a transport, for cross-domain requests. @class IO @constructor @param {Object} config Object of EventTarget's publish method configurations used to configure IO's events. **/ function IO (config) { var io = this; io._uid = 'io:' + uid++; io._init(config); Y.io._map[io._uid] = io; } IO.prototype = { //-------------------------------------- // Properties //-------------------------------------- /** * A counter that increments for each transaction. * * @property _id * @private * @type {Number} */ _id: 0, /** * Object of IO HTTP headers sent with each transaction. * * @property _headers * @private * @type {Object} */ _headers: { 'X-Requested-With' : 'XMLHttpRequest' }, /** * Object that stores timeout values for any transaction with a defined * "timeout" configuration property. * * @property _timeout * @private * @type {Object} */ _timeout: {}, //-------------------------------------- // Methods //-------------------------------------- _init: function(config) { var io = this, i, len; io.cfg = config || {}; Y.augment(io, Y.EventTarget); for (i = 0, len = EVENTS.length; i < len; ++i) { // Publish IO global events with configurations, if any. // IO global events are set to broadcast by default. // These events use the "io:" namespace. io.publish('io:' + EVENTS[i], Y.merge({ broadcast: 1 }, config)); // Publish IO transaction events with configurations, if // any. These events use the "io-trn:" namespace. io.publish('io-trn:' + EVENTS[i], config); } }, /** * Method that creates a unique transaction object for each request. * * @method _create * @private * @param {Object} cfg Configuration object subset to determine if * the transaction is an XDR or file upload, * requiring an alternate transport. * @param {Number} id Transaction id * @return {Object} The transaction object */ _create: function(config, id) { var io = this, transaction = { id : Y.Lang.isNumber(id) ? id : io._id++, uid: io._uid }, alt = config.xdr ? config.xdr.use : null, form = config.form && config.form.upload ? 'iframe' : null, use; if (alt === 'native') { // Non-IE can use XHR level 2 and not rely on an // external transport. alt = Y.UA.ie ? 'xdr' : null; // Prevent "pre-flight" OPTIONS request by removing the // `X-Requested-With` HTTP header from CORS requests. This header // can be added back on a per-request basis, if desired. io.setHeader('X-Requested-With'); } use = alt || form; transaction = use ? Y.merge(Y.IO.customTransport(use), transaction) : Y.merge(Y.IO.defaultTransport(), transaction); if (transaction.notify) { config.notify = function (e, t, c) { io.notify(e, t, c); }; } if (!use) { if (win && win.FormData && config.data instanceof win.FormData) { transaction.c.upload.onprogress = function (e) { io.progress(transaction, e, config); }; transaction.c.onload = function (e) { io.load(transaction, e, config); }; transaction.c.onerror = function (e) { io.error(transaction, e, config); }; transaction.upload = true; } } return transaction; }, _destroy: function(transaction) { if (win && !transaction.notify && !transaction.xdr) { if (XHR && !transaction.upload) { transaction.c.onreadystatechange = null; } else if (transaction.upload) { transaction.c.upload.onprogress = null; transaction.c.onload = null; transaction.c.onerror = null; } else if (Y.UA.ie && !transaction.e) { // IE, when using XMLHttpRequest as an ActiveX Object, will throw // a "Type Mismatch" error if the event handler is set to "null". transaction.c.abort(); } } transaction = transaction.c = null; }, /** * Method for creating and firing events. * * @method _evt * @private * @param {String} eventName Event to be published. * @param {Object} transaction Transaction object. * @param {Object} config Configuration data subset for event subscription. */ _evt: function(eventName, transaction, config) { var io = this, params, args = config['arguments'], emitFacade = io.cfg.emitFacade, globalEvent = "io:" + eventName, trnEvent = "io-trn:" + eventName; // Workaround for #2532107 this.detach(trnEvent); if (transaction.e) { transaction.c = { status: 0, statusText: transaction.e }; } // Fire event with parameters or an Event Facade. params = [ emitFacade ? { id: transaction.id, data: transaction.c, cfg: config, 'arguments': args } : transaction.id ]; if (!emitFacade) { if (eventName === EVENTS[0] || eventName === EVENTS[2]) { if (args) { params.push(args); } } else { if (transaction.evt) { params.push(transaction.evt); } else { params.push(transaction.c); } if (args) { params.push(args); } } } params.unshift(globalEvent); // Fire global events. io.fire.apply(io, params); // Fire transaction events, if receivers are defined. if (config.on) { params[0] = trnEvent; io.once(trnEvent, config.on[eventName], config.context || Y); io.fire.apply(io, params); } }, /** * Fires event "io:start" and creates, fires a transaction-specific * start event, if `config.on.start` is defined. * * @method start * @param {Object} transaction Transaction object. * @param {Object} config Configuration object for the transaction. */ start: function(transaction, config) { /** * Signals the start of an IO request. * @event io:start */ this._evt(EVENTS[0], transaction, config); }, /** * Fires event "io:complete" and creates, fires a * transaction-specific "complete" event, if config.on.complete is * defined. * * @method complete * @param {Object} transaction Transaction object. * @param {Object} config Configuration object for the transaction. */ complete: function(transaction, config) { /** * Signals the completion of the request-response phase of a * transaction. Response status and data are accessible, if * available, in this event. * @event io:complete */ this._evt(EVENTS[1], transaction, config); }, /** * Fires event "io:end" and creates, fires a transaction-specific "end" * event, if config.on.end is defined. * * @method end * @param {Object} transaction Transaction object. * @param {Object} config Configuration object for the transaction. */ end: function(transaction, config) { /** * Signals the end of the transaction lifecycle. * @event io:end */ this._evt(EVENTS[2], transaction, config); this._destroy(transaction); }, /** * Fires event "io:success" and creates, fires a transaction-specific * "success" event, if config.on.success is defined. * * @method success * @param {Object} transaction Transaction object. * @param {Object} config Configuration object for the transaction. */ success: function(transaction, config) { /** * Signals an HTTP response with status in the 2xx range. * Fires after io:complete. * @event io:success */ this._evt(EVENTS[3], transaction, config); this.end(transaction, config); }, /** * Fires event "io:failure" and creates, fires a transaction-specific * "failure" event, if config.on.failure is defined. * * @method failure * @param {Object} transaction Transaction object. * @param {Object} config Configuration object for the transaction. */ failure: function(transaction, config) { /** * Signals an HTTP response with status outside of the 2xx range. * Fires after io:complete. * @event io:failure */ this._evt(EVENTS[4], transaction, config); this.end(transaction, config); }, /** * Fires event "io:progress" and creates, fires a transaction-specific * "progress" event -- for XMLHttpRequest file upload -- if * config.on.progress is defined. * * @method progress * @param {Object} transaction Transaction object. * @param {Object} progress event. * @param {Object} config Configuration object for the transaction. */ progress: function(transaction, e, config) { /** * Signals the interactive state during a file upload transaction. * This event fires after io:start and before io:complete. * @event io:progress */ transaction.evt = e; this._evt(EVENTS[5], transaction, config); }, /** * Fires event "io:complete" and creates, fires a transaction-specific * "complete" event -- for XMLHttpRequest file upload -- if * config.on.complete is defined. * * @method load * @param {Object} transaction Transaction object. * @param {Object} load event. * @param {Object} config Configuration object for the transaction. */ load: function (transaction, e, config) { transaction.evt = e.target; this._evt(EVENTS[1], transaction, config); }, /** * Fires event "io:failure" and creates, fires a transaction-specific * "failure" event -- for XMLHttpRequest file upload -- if * config.on.failure is defined. * * @method error * @param {Object} transaction Transaction object. * @param {Object} error event. * @param {Object} config Configuration object for the transaction. */ error: function (transaction, e, config) { transaction.evt = e; this._evt(EVENTS[4], transaction, config); }, /** * Retry an XDR transaction, using the Flash tranport, if the native * transport fails. * * @method _retry * @private * @param {Object} transaction Transaction object. * @param {String} uri Qualified path to transaction resource. * @param {Object} config Configuration object for the transaction. */ _retry: function(transaction, uri, config) { this._destroy(transaction); config.xdr.use = 'flash'; return this.send(uri, config, transaction.id); }, /** * Method that concatenates string data for HTTP GET transactions. * * @method _concat * @private * @param {String} uri URI or root data. * @param {String} data Data to be concatenated onto URI. * @return {String} */ _concat: function(uri, data) { uri += (uri.indexOf('?') === -1 ? '?' : '&') + data; return uri; }, /** * Stores default client headers for all transactions. If a label is * passed with no value argument, the header will be deleted. * * @method setHeader * @param {String} name HTTP header * @param {String} value HTTP header value */ setHeader: function(name, value) { if (value) { this._headers[name] = value; } else { delete this._headers[name]; } }, /** * Method that sets all HTTP headers to be sent in a transaction. * * @method _setHeaders * @private * @param {Object} transaction - XHR instance for the specific transaction. * @param {Object} headers - HTTP headers for the specific transaction, as * defined in the configuration object passed to YUI.io(). */ _setHeaders: function(transaction, headers) { headers = Y.merge(this._headers, headers); Y.Object.each(headers, function(value, name) { if (value !== 'disable') { transaction.setRequestHeader(name, headers[name]); } }); }, /** * Starts timeout count if the configuration object has a defined * timeout property. * * @method _startTimeout * @private * @param {Object} transaction Transaction object generated by _create(). * @param {Object} timeout Timeout in milliseconds. */ _startTimeout: function(transaction, timeout) { var io = this; io._timeout[transaction.id] = setTimeout(function() { io._abort(transaction, 'timeout'); }, timeout); }, /** * Clears the timeout interval started by _startTimeout(). * * @method _clearTimeout * @private * @param {Number} id - Transaction id. */ _clearTimeout: function(id) { clearTimeout(this._timeout[id]); delete this._timeout[id]; }, /** * Method that determines if a transaction response qualifies as success * or failure, based on the response HTTP status code, and fires the * appropriate success or failure events. * * @method _result * @private * @static * @param {Object} transaction Transaction object generated by _create(). * @param {Object} config Configuration object passed to io(). */ _result: function(transaction, config) { var status; // Firefox will throw an exception if attempting to access // an XHR object's status property, after a request is aborted. try { status = transaction.c.status; } catch(e) { status = 0; } // IE reports HTTP 204 as HTTP 1223. if (status >= 200 && status < 300 || status === 304 || status === 1223) { this.success(transaction, config); } else { this.failure(transaction, config); } }, /** * Event handler bound to onreadystatechange. * * @method _rS * @private * @param {Object} transaction Transaction object generated by _create(). * @param {Object} config Configuration object passed to YUI.io(). */ _rS: function(transaction, config) { var io = this; if (transaction.c.readyState === 4) { if (config.timeout) { io._clearTimeout(transaction.id); } // Yield in the event of request timeout or abort. setTimeout(function() { io.complete(transaction, config); io._result(transaction, config); }, 0); } }, /** * Terminates a transaction due to an explicit abort or timeout. * * @method _abort * @private * @param {Object} transaction Transaction object generated by _create(). * @param {String} type Identifies timed out or aborted transaction. */ _abort: function(transaction, type) { if (transaction && transaction.c) { transaction.e = type; transaction.c.abort(); } }, /** * Requests a transaction. `send()` is implemented as `Y.io()`. Each * transaction may include a configuration object. Its properties are: * * <dl> * <dt>method</dt> * <dd>HTTP method verb (e.g., GET or POST). If this property is not * not defined, the default value will be GET.</dd> * * <dt>data</dt> * <dd>This is the name-value string that will be sent as the * transaction data. If the request is HTTP GET, the data become * part of querystring. If HTTP POST, the data are sent in the * message body.</dd> * * <dt>xdr</dt> * <dd>Defines the transport to be used for cross-domain requests. * By setting this property, the transaction will use the specified * transport instead of XMLHttpRequest. The properties of the * transport object are: * <dl> * <dt>use</dt> * <dd>The transport to be used: 'flash' or 'native'</dd> * <dt>dataType</dt> * <dd>Set the value to 'XML' if that is the expected response * content type.</dd> * </dl></dd> * * <dt>form</dt> * <dd>Form serialization configuration object. Its properties are: * <dl> * <dt>id</dt> * <dd>Node object or id of HTML form</dd> * <dt>useDisabled</dt> * <dd>`true` to also serialize disabled form field values * (defaults to `false`)</dd> * </dl></dd> * * <dt>on</dt> * <dd>Assigns transaction event subscriptions. Available events are: * <dl> * <dt>start</dt> * <dd>Fires when a request is sent to a resource.</dd> * <dt>complete</dt> * <dd>Fires when the transaction is complete.</dd> * <dt>success</dt> * <dd>Fires when the HTTP response status is within the 2xx * range.</dd> * <dt>failure</dt> * <dd>Fires when the HTTP response status is outside the 2xx * range, if an exception occurs, if the transation is aborted, * or if the transaction exceeds a configured `timeout`.</dd> * <dt>end</dt> * <dd>Fires at the conclusion of the transaction * lifecycle, after `success` or `failure`.</dd> * </dl> * * <p>Callback functions for `start` and `end` receive the id of the * transaction as a first argument. For `complete`, `success`, and * `failure`, callbacks receive the id and the response object * (usually the XMLHttpRequest instance). If the `arguments` * property was included in the configuration object passed to * `Y.io()`, the configured data will be passed to all callbacks as * the last argument.</p> * </dd> * * <dt>sync</dt> * <dd>Pass `true` to make a same-domain transaction synchronous. * <strong>CAVEAT</strong>: This will negatively impact the user * experience. Have a <em>very</em> good reason if you intend to use * this.</dd> * * <dt>context</dt> * <dd>The "`this'" object for all configured event handlers. If a * specific context is needed for individual callbacks, bind the * callback to a context using `Y.bind()`.</dd> * * <dt>headers</dt> * <dd>Object map of transaction headers to send to the server. The * object keys are the header names and the values are the header * values.</dd> * * <dt>timeout</dt> * <dd>Millisecond threshold for the transaction before being * automatically aborted.</dd> * * <dt>arguments</dt> * <dd>User-defined data passed to all registered event handlers. * This value is available as the second argument in the "start" and * "end" event handlers. It is the third argument in the "complete", * "success", and "failure" event handlers. <strong>Be sure to quote * this property name in the transaction configuration as * "arguments" is a reserved word in JavaScript</strong> (e.g. * `Y.io({ ..., "arguments": stuff })`).</dd> * </dl> * * @method send * @public * @param {String} uri Qualified path to transaction resource. * @param {Object} config Configuration object for the transaction. * @param {Number} id Transaction id, if already set. * @return {Object} */ send: function(uri, config, id) { var transaction, method, i, len, sync, data, io = this, u = uri, response = {}; config = config ? Y.Object(config) : {}; transaction = io._create(config, id); method = config.method ? config.method.toUpperCase() : 'GET'; sync = config.sync; data = config.data; // Serialize an map object into a key-value string using // querystring-stringify-simple. if ((Y.Lang.isObject(data) && !data.nodeType) && !transaction.upload) { data = Y.QueryString.stringify(data); } if (config.form) { if (config.form.upload) { // This is a file upload transaction, calling // upload() in io-upload-iframe. return io.upload(transaction, uri, config); } else { // Serialize HTML form data into a key-value string. data = io._serialize(config.form, data); } } if (data) { switch (method) { case 'GET': case 'HEAD': case 'DELETE': u = io._concat(u, data); data = ''; break; case 'POST': case 'PUT': // If Content-Type is defined in the configuration object, or // or as a default header, it will be used instead of // 'application/x-www-form-urlencoded; charset=UTF-8' config.headers = Y.merge({ 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }, config.headers); break; } } if (transaction.xdr) { // Route data to io-xdr module for flash and XDomainRequest. return io.xdr(u, transaction, config); } else if (transaction.notify) { // Route data to custom transport return transaction.c.send(transaction, uri, config); } if (!sync && !transaction.upload) { transaction.c.onreadystatechange = function() { io._rS(transaction, config); }; } try { // Determine if request is to be set as // synchronous or asynchronous. transaction.c.open(method, u, !sync, config.username || null, config.password || null); io._setHeaders(transaction.c, config.headers || {}); io.start(transaction, config); // Will work only in browsers that implement the // Cross-Origin Resource Sharing draft. if (config.xdr && config.xdr.credentials) { if (!Y.UA.ie) { transaction.c.withCredentials = true; } } // Using "null" with HTTP POST will result in a request // with no Content-Length header defined. transaction.c.send(data); if (sync) { // Create a response object for synchronous transactions, // mixing id and arguments properties with the xhr // properties whitelist. for (i = 0, len = XHR_PROPS.length; i < len; ++i) { response[XHR_PROPS[i]] = transaction.c[XHR_PROPS[i]]; } response.getAllResponseHeaders = function() { return transaction.c.getAllResponseHeaders(); }; response.getResponseHeader = function(name) { return transaction.c.getResponseHeader(name); }; io.complete(transaction, config); io._result(transaction, config); return response; } } catch(e) { if (transaction.xdr) { // This exception is usually thrown by browsers // that do not support XMLHttpRequest Level 2. // Retry the request with the XDR transport set // to 'flash'. If the Flash transport is not // initialized or available, the transaction // will resolve to a transport error. return io._retry(transaction, uri, config); } else { io.complete(transaction, config); io._result(transaction, config); } } // If config.timeout is defined, and the request is standard XHR, // initialize timeout polling. if (config.timeout) { io._startTimeout(transaction, config.timeout); } return { id: transaction.id, abort: function() { return transaction.c ? io._abort(transaction, 'abort') : false; }, isInProgress: function() { return transaction.c ? (transaction.c.readyState % 4) : false; }, io: io }; } }; /** Method for initiating an ajax call. The first argument is the url end point for the call. The second argument is an object to configure the transaction and attach event subscriptions. The configuration object supports the following properties: <dl> <dt>method</dt> <dd>HTTP method verb (e.g., GET or POST). If this property is not not defined, the default value will be GET.</dd> <dt>data</dt> <dd>This is the name-value string that will be sent as the transaction data. If the request is HTTP GET, the data become part of querystring. If HTTP POST, the data are sent in the message body.</dd> <dt>xdr</dt> <dd>Defines the transport to be used for cross-domain requests. By setting this property, the transaction will use the specified transport instead of XMLHttpRequest. The properties of the transport object are: <dl> <dt>use</dt> <dd>The transport to be used: 'flash' or 'native'</dd> <dt>dataType</dt> <dd>Set the value to 'XML' if that is the expected response content type.</dd> </dl></dd> <dt>form</dt> <dd>Form serialization configuration object. Its properties are: <dl> <dt>id</dt> <dd>Node object or id of HTML form</dd> <dt>useDisabled</dt> <dd>`true` to also serialize disabled form field values (defaults to `false`)</dd> </dl></dd> <dt>on</dt> <dd>Assigns transaction event subscriptions. Available events are: <dl> <dt>start</dt> <dd>Fires when a request is sent to a resource.</dd> <dt>complete</dt> <dd>Fires when the transaction is complete.</dd> <dt>success</dt> <dd>Fires when the HTTP response status is within the 2xx range.</dd> <dt>failure</dt> <dd>Fires when the HTTP response status is outside the 2xx range, if an exception occurs, if the transation is aborted, or if the transaction exceeds a configured `timeout`.</dd> <dt>end</dt> <dd>Fires at the conclusion of the transaction lifecycle, after `success` or `failure`.</dd> </dl> <p>Callback functions for `start` and `end` receive the id of the transaction as a first argument. For `complete`, `success`, and `failure`, callbacks receive the id and the response object (usually the XMLHttpRequest instance). If the `arguments` property was included in the configuration object passed to `Y.io()`, the configured data will be passed to all callbacks as the last argument.</p> </dd> <dt>sync</dt> <dd>Pass `true` to make a same-domain transaction synchronous. <strong>CAVEAT</strong>: This will negatively impact the user experience. Have a <em>very</em> good reason if you intend to use this.</dd> <dt>context</dt> <dd>The "`this'" object for all configured event handlers. If a specific context is needed for individual callbacks, bind the callback to a context using `Y.bind()`.</dd> <dt>headers</dt> <dd>Object map of transaction headers to send to the server. The object keys are the header names and the values are the header values.</dd> <dt>timeout</dt> <dd>Millisecond threshold for the transaction before being automatically aborted.</dd> <dt>arguments</dt> <dd>User-defined data passed to all registered event handlers. This value is available as the second argument in the "start" and "end" event handlers. It is the third argument in the "complete", "success", and "failure" event handlers. <strong>Be sure to quote this property name in the transaction configuration as "arguments" is a reserved word in JavaScript</strong> (e.g. `Y.io({ ..., "arguments": stuff })`).</dd> </dl> @method io @static @param {String} url qualified path to transaction resource. @param {Object} config configuration object for the transaction. @return {Object} @for YUI **/ Y.io = function(url, config) { // Calling IO through the static interface will use and reuse // an instance of IO. var transaction = Y.io._map['io:0'] || new IO(); return transaction.send.apply(transaction, [url, config]); }; /** Method for setting and deleting IO HTTP headers to be sent with every request. Hosted as a property on the `io` function (e.g. `Y.io.header`). @method header @param {String} name HTTP header @param {String} value HTTP header value @static **/ Y.io.header = function(name, value) { // Calling IO through the static interface will use and reuse // an instance of IO. var transaction = Y.io._map['io:0'] || new IO(); transaction.setHeader(name, value); }; Y.IO = IO; // Map of all IO instances created. Y.io._map = {}; var XHR = win && win.XMLHttpRequest, XDR = win && win.XDomainRequest, AX = win && win.ActiveXObject; Y.mix(Y.IO, { /** * The ID of the default IO transport, defaults to `xhr` * @property _default * @type {String} * @static */ _default: 'xhr', /** * * @method defaultTransport * @static * @param {String} [id] The transport to set as the default, if empty a new transport is created. * @return {Object} The transport object with a `send` method */ defaultTransport: function(id) { if (id) { Y.IO._default = id; } else { var o = { c: Y.IO.transports[Y.IO._default](), notify: Y.IO._default === 'xhr' ? false : true }; return o; } }, /** * An object hash of custom transports available to IO * @property transports * @type {Object} * @static */ transports: { xhr: function () { return XHR ? new XMLHttpRequest() : AX ? new ActiveXObject('Microsoft.XMLHTTP') : null; }, xdr: function () { return XDR ? new XDomainRequest() : null; }, iframe: function () { return {}; }, flash: null, nodejs: null }, /** * Create a custom transport of type and return it's object * @method customTransport * @param {String} id The id of the transport to create. * @static */ customTransport: function(id) { var o = { c: Y.IO.transports[id]() }; o[(id === 'xdr' || id === 'flash') ? 'xdr' : 'notify'] = true; return o; } }); Y.mix(Y.IO.prototype, { /** * Fired from the notify method of the transport which in turn fires * the event on the IO object. * @method notify * @param {String} event The name of the event * @param {Object} transaction The transaction object * @param {Object} config The configuration object for this transaction */ notify: function(event, transaction, config) { var io = this; switch (event) { case 'timeout': case 'abort': case 'transport error': transaction.c = { status: 0, statusText: event }; event = 'failure'; default: io[event].apply(io, [transaction, config]); } } }); }, '@VERSION@', {"requires": ["event-custom-base", "querystring-stringify-simple"]}); YUI.add('json-parse', function (Y, NAME) { /** * <p>The JSON module adds support for serializing JavaScript objects into * JSON strings and parsing JavaScript objects from strings in JSON format.</p> * * <p>The JSON namespace is added to your YUI instance including static methods * Y.JSON.parse(..) and Y.JSON.stringify(..).</p> * * <p>The functionality and method signatures follow the ECMAScript 5 * specification. In browsers with native JSON support, the native * implementation is used.</p> * * <p>The <code>json</code> module is a rollup of <code>json-parse</code> and * <code>json-stringify</code>.</p> * * <p>As their names suggest, <code>json-parse</code> adds support for parsing * JSON data (Y.JSON.parse) and <code>json-stringify</code> for serializing * JavaScript data into JSON strings (Y.JSON.stringify). You may choose to * include either of the submodules individually if you don't need the * complementary functionality, or include the rollup for both.</p> * * @module json * @main json * @class JSON * @static */ /** * Provides Y.JSON.parse method to accept JSON strings and return native * JavaScript objects. * * @module json * @submodule json-parse * @for JSON * @static */ // All internals kept private for security reasons function fromGlobal(ref) { return (Y.config.win || this || {})[ref]; } /** * Alias to native browser implementation of the JSON object if available. * * @property Native * @type {Object} * @private */ var _JSON = fromGlobal('JSON'), Native = (Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON), useNative = !!Native, /** * Replace certain Unicode characters that JavaScript may handle incorrectly * during eval--either by deleting them or treating them as line * endings--with escape sequences. * IMPORTANT NOTE: This regex will be used to modify the input if a match is * found. * * @property _UNICODE_EXCEPTIONS * @type {RegExp} * @private */ _UNICODE_EXCEPTIONS = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, /** * First step in the safety evaluation. Regex used to replace all escape * sequences (i.e. "\\", etc) with '@' characters (a non-JSON character). * * @property _ESCAPES * @type {RegExp} * @private */ _ESCAPES = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, /** * Second step in the safety evaluation. Regex used to replace all simple * values with ']' characters. * * @property _VALUES * @type {RegExp} * @private */ _VALUES = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, /** * Third step in the safety evaluation. Regex used to remove all open * square brackets following a colon, comma, or at the beginning of the * string. * * @property _BRACKETS * @type {RegExp} * @private */ _BRACKETS = /(?:^|:|,)(?:\s*\[)+/g, /** * Final step in the safety evaluation. Regex used to test the string left * after all previous replacements for invalid characters. * * @property _UNSAFE * @type {RegExp} * @private */ _UNSAFE = /[^\],:{}\s]/, /** * Replaces specific unicode characters with their appropriate \unnnn * format. Some browsers ignore certain characters during eval. * * @method escapeException * @param c {String} Unicode character * @return {String} the \unnnn escapement of the character * @private */ _escapeException = function (c) { return '\\u'+('0000'+(+(c.charCodeAt(0))).toString(16)).slice(-4); }, /** * Traverses nested objects, applying a reviver function to each (key,value) * from the scope if the key:value's containing object. The value returned * from the function will replace the original value in the key:value pair. * If the value returned is undefined, the key will be omitted from the * returned object. * * @method _revive * @param data {MIXED} Any JavaScript data * @param reviver {Function} filter or mutation function * @return {MIXED} The results of the filtered data * @private */ _revive = function (data, reviver) { var walk = function (o,key) { var k,v,value = o[key]; if (value && typeof value === 'object') { for (k in value) { if (value.hasOwnProperty(k)) { v = walk(value, k); if (v === undefined) { delete value[k]; } else { value[k] = v; } } } } return reviver.call(o,key,value); }; return typeof reviver === 'function' ? walk({'':data},'') : data; }, /** * Parse a JSON string, returning the native JavaScript representation. * * @param s {string} JSON string data * @param reviver {function} (optional) function(k,v) passed each key value * pair of object literals, allowing pruning or altering values * @return {MIXED} the native JavaScript representation of the JSON string * @throws SyntaxError * @method parse * @static */ // JavaScript implementation in lieu of native browser support. Based on // the json2.js library from http://json.org _parse = function (s,reviver) { // Replace certain Unicode characters that are otherwise handled // incorrectly by some browser implementations. // NOTE: This modifies the input if such characters are found! s = s.replace(_UNICODE_EXCEPTIONS, _escapeException); // Test for any remaining invalid characters if (!_UNSAFE.test(s.replace(_ESCAPES,'@'). replace(_VALUES,']'). replace(_BRACKETS,''))) { // Eval the text into a JavaScript data structure, apply any // reviver function, and return return _revive( eval('(' + s + ')'), reviver ); } throw new SyntaxError('JSON.parse'); }; Y.namespace('JSON').parse = function (s,reviver) { if (typeof s !== 'string') { s += ''; } return Native && Y.JSON.useNativeParse ? Native.parse(s,reviver) : _parse(s,reviver); }; function workingNative( k, v ) { return k === "ok" ? true : v; } // Double check basic functionality. This is mainly to catch early broken // implementations of the JSON API in Firefox 3.1 beta1 and beta2 if ( Native ) { try { useNative = ( Native.parse( '{"ok":false}', workingNative ) ).ok; } catch ( e ) { useNative = false; } } /** * Leverage native JSON parse if the browser has a native implementation. * In general, this is a good idea. See the Known Issues section in the * JSON user guide for caveats. The default value is true for browsers with * native JSON support. * * @property useNativeParse * @type Boolean * @default true * @static */ Y.JSON.useNativeParse = useNative; }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('transition', function (Y, NAME) { /** * Provides the transition method for Node. * Transition has no API of its own, but adds the transition method to Node. * * @module transition * @requires node-style */ var CAMEL_VENDOR_PREFIX = '', VENDOR_PREFIX = '', DOCUMENT = Y.config.doc, DOCUMENT_ELEMENT = 'documentElement', TRANSITION = 'transition', TRANSITION_CAMEL = 'Transition', TRANSITION_PROPERTY_CAMEL, TRANSITION_PROPERTY, TRANSITION_DURATION, TRANSITION_TIMING_FUNCTION, TRANSITION_DELAY, TRANSITION_END, ON_TRANSITION_END, TRANSFORM_CAMEL, EMPTY_OBJ = {}, VENDORS = [ 'Webkit', 'Moz' ], VENDOR_TRANSITION_END = { Webkit: 'webkitTransitionEnd' }, /** * A class for constructing transition instances. * Adds the "transition" method to Node. * @class Transition * @constructor */ Transition = function() { this.init.apply(this, arguments); }; Transition._toCamel = function(property) { property = property.replace(/-([a-z])/gi, function(m0, m1) { return m1.toUpperCase(); }); return property; }; Transition._toHyphen = function(property) { property = property.replace(/([A-Z]?)([a-z]+)([A-Z]?)/g, function(m0, m1, m2, m3) { var str = ((m1) ? '-' + m1.toLowerCase() : '') + m2; if (m3) { str += '-' + m3.toLowerCase(); } return str; }); return property; }; Transition.SHOW_TRANSITION = 'fadeIn'; Transition.HIDE_TRANSITION = 'fadeOut'; Transition.useNative = false; Y.Array.each(VENDORS, function(val) { // then vendor specific var property = val + TRANSITION_CAMEL; if (property in DOCUMENT[DOCUMENT_ELEMENT].style) { CAMEL_VENDOR_PREFIX = val; VENDOR_PREFIX = Transition._toHyphen(val) + '-'; Transition.useNative = true; Transition.supported = true; // TODO: remove Transition._VENDOR_PREFIX = val; } }); TRANSITION_CAMEL = CAMEL_VENDOR_PREFIX + TRANSITION_CAMEL; TRANSITION_PROPERTY_CAMEL = CAMEL_VENDOR_PREFIX + 'TransitionProperty'; TRANSITION_PROPERTY = VENDOR_PREFIX + 'transition-property'; TRANSITION_DURATION = VENDOR_PREFIX + 'transition-duration'; TRANSITION_TIMING_FUNCTION = VENDOR_PREFIX + 'transition-timing-function'; TRANSITION_DELAY = VENDOR_PREFIX + 'transition-delay'; TRANSITION_END = 'transitionend'; ON_TRANSITION_END = 'on' + CAMEL_VENDOR_PREFIX.toLowerCase() + 'transitionend'; TRANSITION_END = VENDOR_TRANSITION_END[CAMEL_VENDOR_PREFIX] || TRANSITION_END; TRANSFORM_CAMEL = CAMEL_VENDOR_PREFIX + 'Transform'; Transition.fx = {}; Transition.toggles = {}; Transition._hasEnd = {}; Transition._reKeywords = /^(?:node|duration|iterations|easing|delay|on|onstart|onend)$/i; Y.Node.DOM_EVENTS[TRANSITION_END] = 1; Transition.NAME = 'transition'; Transition.DEFAULT_EASING = 'ease'; Transition.DEFAULT_DURATION = 0.5; Transition.DEFAULT_DELAY = 0; Transition._nodeAttrs = {}; Transition.prototype = { constructor: Transition, init: function(node, config) { var anim = this; anim._node = node; if (!anim._running && config) { anim._config = config; node._transition = anim; // cache for reuse anim._duration = ('duration' in config) ? config.duration: anim.constructor.DEFAULT_DURATION; anim._delay = ('delay' in config) ? config.delay: anim.constructor.DEFAULT_DELAY; anim._easing = config.easing || anim.constructor.DEFAULT_EASING; anim._count = 0; // track number of animated properties anim._running = false; } return anim; }, addProperty: function(prop, config) { var anim = this, node = this._node, uid = Y.stamp(node), nodeInstance = Y.one(node), attrs = Transition._nodeAttrs[uid], computed, compareVal, dur, attr, val; if (!attrs) { attrs = Transition._nodeAttrs[uid] = {}; } attr = attrs[prop]; // might just be a value if (config && config.value !== undefined) { val = config.value; } else if (config !== undefined) { val = config; config = EMPTY_OBJ; } if (typeof val === 'function') { val = val.call(nodeInstance, nodeInstance); } if (attr && attr.transition) { // take control if another transition owns this property if (attr.transition !== anim) { attr.transition._count--; // remapping attr to this transition } } anim._count++; // properties per transition // make 0 async and fire events dur = ((typeof config.duration != 'undefined') ? config.duration : anim._duration) || 0.0001; attrs[prop] = { value: val, duration: dur, delay: (typeof config.delay != 'undefined') ? config.delay : anim._delay, easing: config.easing || anim._easing, transition: anim }; // native end event doesnt fire when setting to same value // supplementing with timer // val may be a string or number (height: 0, etc), but computedStyle is always string computed = Y.DOM.getComputedStyle(node, prop); compareVal = (typeof val === 'string') ? computed : parseFloat(computed); if (Transition.useNative && compareVal === val) { setTimeout(function() { anim._onNativeEnd.call(node, { propertyName: prop, elapsedTime: dur }); }, dur * 1000); } }, removeProperty: function(prop) { var anim = this, attrs = Transition._nodeAttrs[Y.stamp(anim._node)]; if (attrs && attrs[prop]) { delete attrs[prop]; anim._count--; } }, initAttrs: function(config) { var attr, node = this._node; if (config.transform && !config[TRANSFORM_CAMEL]) { config[TRANSFORM_CAMEL] = config.transform; delete config.transform; // TODO: copy } for (attr in config) { if (config.hasOwnProperty(attr) && !Transition._reKeywords.test(attr)) { this.addProperty(attr, config[attr]); // when size is auto or % webkit starts from zero instead of computed // (https://bugs.webkit.org/show_bug.cgi?id=16020) // TODO: selective set if (node.style[attr] === '') { Y.DOM.setStyle(node, attr, Y.DOM.getComputedStyle(node, attr)); } } } }, /** * Starts or an animation. * @method run * @chainable * @private */ run: function(callback) { var anim = this, node = anim._node, config = anim._config, data = { type: 'transition:start', config: config }; if (!anim._running) { anim._running = true; if (config.on && config.on.start) { config.on.start.call(Y.one(node), data); } anim.initAttrs(anim._config); anim._callback = callback; anim._start(); } return anim; }, _start: function() { this._runNative(); }, _prepDur: function(dur) { dur = parseFloat(dur); return dur + 's'; }, _runNative: function(time) { var anim = this, node = anim._node, uid = Y.stamp(node), style = node.style, computed = node.ownerDocument.defaultView.getComputedStyle(node), attrs = Transition._nodeAttrs[uid], cssText = '', cssTransition = computed[Transition._toCamel(TRANSITION_PROPERTY)], transitionText = TRANSITION_PROPERTY + ': ', duration = TRANSITION_DURATION + ': ', easing = TRANSITION_TIMING_FUNCTION + ': ', delay = TRANSITION_DELAY + ': ', hyphy, attr, name; // preserve existing transitions if (cssTransition !== 'all') { transitionText += cssTransition + ','; duration += computed[Transition._toCamel(TRANSITION_DURATION)] + ','; easing += computed[Transition._toCamel(TRANSITION_TIMING_FUNCTION)] + ','; delay += computed[Transition._toCamel(TRANSITION_DELAY)] + ','; } // run transitions mapped to this instance for (name in attrs) { hyphy = Transition._toHyphen(name); attr = attrs[name]; if ((attr = attrs[name]) && attr.transition === anim) { if (name in node.style) { // only native styles allowed duration += anim._prepDur(attr.duration) + ','; delay += anim._prepDur(attr.delay) + ','; easing += (attr.easing) + ','; transitionText += hyphy + ','; cssText += hyphy + ': ' + attr.value + '; '; } else { this.removeProperty(name); } } } transitionText = transitionText.replace(/,$/, ';'); duration = duration.replace(/,$/, ';'); easing = easing.replace(/,$/, ';'); delay = delay.replace(/,$/, ';'); // only one native end event per node if (!Transition._hasEnd[uid]) { node.addEventListener(TRANSITION_END, anim._onNativeEnd, ''); Transition._hasEnd[uid] = true; } style.cssText += transitionText + duration + easing + delay + cssText; }, _end: function(elapsed) { var anim = this, node = anim._node, callback = anim._callback, config = anim._config, data = { type: 'transition:end', config: config, elapsedTime: elapsed }, nodeInstance = Y.one(node); anim._running = false; anim._callback = null; if (node) { if (config.on && config.on.end) { setTimeout(function() { // IE: allow previous update to finish config.on.end.call(nodeInstance, data); // nested to ensure proper fire order if (callback) { callback.call(nodeInstance, data); } }, 1); } else if (callback) { setTimeout(function() { // IE: allow previous update to finish callback.call(nodeInstance, data); }, 1); } } }, _endNative: function(name) { var node = this._node, value = node.ownerDocument.defaultView.getComputedStyle(node, '')[Transition._toCamel(TRANSITION_PROPERTY)]; name = Transition._toHyphen(name); if (typeof value === 'string') { value = value.replace(new RegExp('(?:^|,\\s)' + name + ',?'), ','); value = value.replace(/^,|,$/, ''); node.style[TRANSITION_CAMEL] = value; } }, _onNativeEnd: function(e) { var node = this, uid = Y.stamp(node), event = e,//e._event, name = Transition._toCamel(event.propertyName), elapsed = event.elapsedTime, attrs = Transition._nodeAttrs[uid], attr = attrs[name], anim = (attr) ? attr.transition : null, data, config; if (anim) { anim.removeProperty(name); anim._endNative(name); config = anim._config[name]; data = { type: 'propertyEnd', propertyName: name, elapsedTime: elapsed, config: config }; if (config && config.on && config.on.end) { config.on.end.call(Y.one(node), data); } if (anim._count <= 0) { // after propertyEnd fires anim._end(elapsed); node.style[TRANSITION_PROPERTY_CAMEL] = ''; // clean up style } } }, destroy: function() { var anim = this, node = anim._node; if (node) { node.removeEventListener(TRANSITION_END, anim._onNativeEnd, false); anim._node = null; } } }; Y.Transition = Transition; Y.TransitionNative = Transition; // TODO: remove /** * Animate one or more css properties to a given value. Requires the "transition" module. * <pre>example usage: * Y.one('#demo').transition({ * duration: 1, // in seconds, default is 0.5 * easing: 'ease-out', // default is 'ease' * delay: '1', // delay start for 1 second, default is 0 * * height: '10px', * width: '10px', * * opacity: { // per property * value: 0, * duration: 2, * delay: 2, * easing: 'ease-in' * } * }); * </pre> * @for Node * @method transition * @param {Object} config An object containing one or more style properties, a duration and an easing. * @param {Function} callback A function to run after the transition has completed. * @chainable */ Y.Node.prototype.transition = function(name, config, callback) { var transitionAttrs = Transition._nodeAttrs[Y.stamp(this._node)], anim = (transitionAttrs) ? transitionAttrs.transition || null : null, fxConfig, prop; if (typeof name === 'string') { // named effect, pull config from registry if (typeof config === 'function') { callback = config; config = null; } fxConfig = Transition.fx[name]; if (config && typeof config !== 'boolean') { config = Y.clone(config); for (prop in fxConfig) { if (fxConfig.hasOwnProperty(prop)) { if (! (prop in config)) { config[prop] = fxConfig[prop]; } } } } else { config = fxConfig; } } else { // name is a config, config is a callback or undefined callback = config; config = name; } if (anim && !anim._running) { anim.init(this, config); } else { anim = new Transition(this._node, config); } anim.run(callback); return this; }; Y.Node.prototype.show = function(name, config, callback) { this._show(); // show prior to transition if (name && Y.Transition) { if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default if (typeof config === 'function') { callback = config; config = name; } name = Transition.SHOW_TRANSITION; } this.transition(name, config, callback); } return this; }; var _wrapCallBack = function(anim, fn, callback) { return function() { if (fn) { fn.call(anim); } if (callback) { callback.apply(anim._node, arguments); } }; }; Y.Node.prototype.hide = function(name, config, callback) { if (name && Y.Transition) { if (typeof config === 'function') { callback = config; config = null; } callback = _wrapCallBack(this, this._hide, callback); // wrap with existing callback if (typeof name !== 'string' && !name.push) { // named effect or array of effects supercedes default if (typeof config === 'function') { callback = config; config = name; } name = Transition.HIDE_TRANSITION; } this.transition(name, config, callback); } else { this._hide(); } return this; }; /** * Animate one or more css properties to a given value. Requires the "transition" module. * <pre>example usage: * Y.all('.demo').transition({ * duration: 1, // in seconds, default is 0.5 * easing: 'ease-out', // default is 'ease' * delay: '1', // delay start for 1 second, default is 0 * * height: '10px', * width: '10px', * * opacity: { // per property * value: 0, * duration: 2, * delay: 2, * easing: 'ease-in' * } * }); * </pre> * @for NodeList * @method transition * @param {Object} config An object containing one or more style properties, a duration and an easing. * @param {Function} callback A function to run after the transition has completed. The callback fires * once per item in the NodeList. * @chainable */ Y.NodeList.prototype.transition = function(config, callback) { var nodes = this._nodes, i = 0, node; while ((node = nodes[i++])) { Y.one(node).transition(config, callback); } return this; }; Y.Node.prototype.toggleView = function(name, on, callback) { this._toggles = this._toggles || []; callback = arguments[arguments.length - 1]; if (typeof name == 'boolean') { // no transition, just toggle on = name; name = null; } name = name || Y.Transition.DEFAULT_TOGGLE; if (typeof on == 'undefined' && name in this._toggles) { // reverse current toggle on = ! this._toggles[name]; } on = (on) ? 1 : 0; if (on) { this._show(); } else { callback = _wrapCallBack(this, this._hide, callback); } this._toggles[name] = on; this.transition(Y.Transition.toggles[name][on], callback); return this; }; Y.NodeList.prototype.toggleView = function(name, on, callback) { var nodes = this._nodes, i = 0, node; while ((node = nodes[i++])) { Y.one(node).toggleView(name, on, callback); } return this; }; Y.mix(Transition.fx, { fadeOut: { opacity: 0, duration: 0.5, easing: 'ease-out' }, fadeIn: { opacity: 1, duration: 0.5, easing: 'ease-in' }, sizeOut: { height: 0, width: 0, duration: 0.75, easing: 'ease-out' }, sizeIn: { height: function(node) { return node.get('scrollHeight') + 'px'; }, width: function(node) { return node.get('scrollWidth') + 'px'; }, duration: 0.5, easing: 'ease-in', on: { start: function() { var overflow = this.getStyle('overflow'); if (overflow !== 'hidden') { // enable scrollHeight/Width this.setStyle('overflow', 'hidden'); this._transitionOverflow = overflow; } }, end: function() { if (this._transitionOverflow) { // revert overridden value this.setStyle('overflow', this._transitionOverflow); delete this._transitionOverflow; } } } } }); Y.mix(Transition.toggles, { size: ['sizeOut', 'sizeIn'], fade: ['fadeOut', 'fadeIn'] }); Transition.DEFAULT_TOGGLE = 'fade'; }, '@VERSION@', {"requires": ["node-style"]}); YUI.add('selector-css2', function (Y, NAME) { /** * The selector module provides helper methods allowing CSS2 Selectors to be used with DOM elements. * @module dom * @submodule selector-css2 * @for Selector */ /* * Provides helper methods for collecting and filtering DOM elements. */ var PARENT_NODE = 'parentNode', TAG_NAME = 'tagName', ATTRIBUTES = 'attributes', COMBINATOR = 'combinator', PSEUDOS = 'pseudos', Selector = Y.Selector, SelectorCSS2 = { _reRegExpTokens: /([\^\$\?\[\]\*\+\-\.\(\)\|\\])/, SORT_RESULTS: true, // TODO: better detection, document specific _isXML: (function() { var isXML = (Y.config.doc.createElement('div').tagName !== 'DIV'); return isXML; }()), /** * Mapping of shorthand tokens to corresponding attribute selector * @property shorthand * @type object */ shorthand: { '\\#(-?[_a-z0-9]+[-\\w\\uE000]*)': '[id=$1]', '\\.(-?[_a-z]+[-\\w\\uE000]*)': '[className~=$1]' }, /** * List of operators and corresponding boolean functions. * These functions are passed the attribute and the current node's value of the attribute. * @property operators * @type object */ operators: { '': function(node, attr) { return Y.DOM.getAttribute(node, attr) !== ''; }, // Just test for existence of attribute '~=': '(?:^|\\s+){val}(?:\\s+|$)', // space-delimited '|=': '^{val}-?' // optional hyphen-delimited }, pseudos: { 'first-child': function(node) { return Y.DOM._children(node[PARENT_NODE])[0] === node; } }, _bruteQuery: function(selector, root, firstOnly) { var ret = [], nodes = [], tokens = Selector._tokenize(selector), token = tokens[tokens.length - 1], rootDoc = Y.DOM._getDoc(root), child, id, className, tagName; if (token) { // prefilter nodes id = token.id; className = token.className; tagName = token.tagName || '*'; if (root.getElementsByTagName) { // non-IE lacks DOM api on doc frags // try ID first, unless no root.all && root not in document // (root.all works off document, but not getElementById) if (id && (root.all || (root.nodeType === 9 || Y.DOM.inDoc(root)))) { nodes = Y.DOM.allById(id, root); // try className } else if (className) { nodes = root.getElementsByClassName(className); } else { // default to tagName nodes = root.getElementsByTagName(tagName); } } else { // brute getElementsByTagName() child = root.firstChild; while (child) { // only collect HTMLElements // match tag to supplement missing getElementsByTagName if (child.tagName && (tagName === '*' || child.tagName === tagName)) { nodes.push(child); } child = child.nextSibling || child.firstChild; } } if (nodes.length) { ret = Selector._filterNodes(nodes, tokens, firstOnly); } } return ret; }, _filterNodes: function(nodes, tokens, firstOnly) { var i = 0, j, len = tokens.length, n = len - 1, result = [], node = nodes[0], tmpNode = node, getters = Y.Selector.getters, operator, combinator, token, path, pass, value, tests, test; for (i = 0; (tmpNode = node = nodes[i++]);) { n = len - 1; path = null; testLoop: while (tmpNode && tmpNode.tagName) { token = tokens[n]; tests = token.tests; j = tests.length; if (j && !pass) { while ((test = tests[--j])) { operator = test[1]; if (getters[test[0]]) { value = getters[test[0]](tmpNode, test[0]); } else { value = tmpNode[test[0]]; if (test[0] === 'tagName' && !Selector._isXML) { value = value.toUpperCase(); } if (typeof value != 'string' && value !== undefined && value.toString) { value = value.toString(); // coerce for comparison } else if (value === undefined && tmpNode.getAttribute) { // use getAttribute for non-standard attributes value = tmpNode.getAttribute(test[0], 2); // 2 === force string for IE } } if ((operator === '=' && value !== test[2]) || // fast path for equality (typeof operator !== 'string' && // protect against String.test monkey-patch (Moo) operator.test && !operator.test(value)) || // regex test (!operator.test && // protect against RegExp as function (webkit) typeof operator === 'function' && !operator(tmpNode, test[0], test[2]))) { // function test // skip non element nodes or non-matching tags if ((tmpNode = tmpNode[path])) { while (tmpNode && (!tmpNode.tagName || (token.tagName && token.tagName !== tmpNode.tagName)) ) { tmpNode = tmpNode[path]; } } continue testLoop; } } } n--; // move to next token // now that we've passed the test, move up the tree by combinator if (!pass && (combinator = token.combinator)) { path = combinator.axis; tmpNode = tmpNode[path]; // skip non element nodes while (tmpNode && !tmpNode.tagName) { tmpNode = tmpNode[path]; } if (combinator.direct) { // one pass only path = null; } } else { // success if we made it this far result.push(node); if (firstOnly) { return result; } break; } } } node = tmpNode = null; return result; }, combinators: { ' ': { axis: 'parentNode' }, '>': { axis: 'parentNode', direct: true }, '+': { axis: 'previousSibling', direct: true } }, _parsers: [ { name: ATTRIBUTES, re: /^\uE003(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['"]?([^\uE004'"]*)['"]?\uE004/i, fn: function(match, token) { var operator = match[2] || '', operators = Selector.operators, escVal = (match[3]) ? match[3].replace(/\\/g, '') : '', test; // add prefiltering for ID and CLASS if ((match[1] === 'id' && operator === '=') || (match[1] === 'className' && Y.config.doc.documentElement.getElementsByClassName && (operator === '~=' || operator === '='))) { token.prefilter = match[1]; match[3] = escVal; // escape all but ID for prefilter, which may run through QSA (via Dom.allById) token[match[1]] = (match[1] === 'id') ? match[3] : escVal; } // add tests if (operator in operators) { test = operators[operator]; if (typeof test === 'string') { match[3] = escVal.replace(Selector._reRegExpTokens, '\\$1'); test = new RegExp(test.replace('{val}', match[3])); } match[2] = test; } if (!token.last || token.prefilter !== match[1]) { return match.slice(1); } } }, { name: TAG_NAME, re: /^((?:-?[_a-z]+[\w-]*)|\*)/i, fn: function(match, token) { var tag = match[1]; if (!Selector._isXML) { tag = tag.toUpperCase(); } token.tagName = tag; if (tag !== '*' && (!token.last || token.prefilter)) { return [TAG_NAME, '=', tag]; } if (!token.prefilter) { token.prefilter = 'tagName'; } } }, { name: COMBINATOR, re: /^\s*([>+~]|\s)\s*/, fn: function(match, token) { } }, { name: PSEUDOS, re: /^:([\-\w]+)(?:\uE005['"]?([^\uE005]*)['"]?\uE006)*/i, fn: function(match, token) { var test = Selector[PSEUDOS][match[1]]; if (test) { // reorder match array and unescape special chars for tests if (match[2]) { match[2] = match[2].replace(/\\/g, ''); } return [match[2], test]; } else { // selector token not supported (possibly missing CSS3 module) return false; } } } ], _getToken: function(token) { return { tagName: null, id: null, className: null, attributes: {}, combinator: null, tests: [] }; }, /* Break selector into token units per simple selector. Combinator is attached to the previous token. */ _tokenize: function(selector) { selector = selector || ''; selector = Selector._parseSelector(Y.Lang.trim(selector)); var token = Selector._getToken(), // one token per simple selector (left selector holds combinator) query = selector, // original query for debug report tokens = [], // array of tokens found = false, // whether or not any matches were found this pass match, // the regex match test, i, parser; /* Search for selector patterns, store, and strip them from the selector string until no patterns match (invalid selector) or we run out of chars. Multiple attributes and pseudos are allowed, in any order. for example: 'form:first-child[type=button]:not(button)[lang|=en]' */ outer: do { found = false; // reset after full pass for (i = 0; (parser = Selector._parsers[i++]);) { if ( (match = parser.re.exec(selector)) ) { // note assignment if (parser.name !== COMBINATOR ) { token.selector = selector; } selector = selector.replace(match[0], ''); // strip current match from selector if (!selector.length) { token.last = true; } if (Selector._attrFilters[match[1]]) { // convert class to className, etc. match[1] = Selector._attrFilters[match[1]]; } test = parser.fn(match, token); if (test === false) { // selector not supported found = false; break outer; } else if (test) { token.tests.push(test); } if (!selector.length || parser.name === COMBINATOR) { tokens.push(token); token = Selector._getToken(token); if (parser.name === COMBINATOR) { token.combinator = Y.Selector.combinators[match[1]]; } } found = true; } } } while (found && selector.length); if (!found || selector.length) { // not fully parsed tokens = []; } return tokens; }, _replaceMarkers: function(selector) { selector = selector.replace(/\[/g, '\uE003'); selector = selector.replace(/\]/g, '\uE004'); selector = selector.replace(/\(/g, '\uE005'); selector = selector.replace(/\)/g, '\uE006'); return selector; }, _replaceShorthand: function(selector) { var shorthand = Y.Selector.shorthand, re; for (re in shorthand) { if (shorthand.hasOwnProperty(re)) { selector = selector.replace(new RegExp(re, 'gi'), shorthand[re]); } } return selector; }, _parseSelector: function(selector) { var replaced = Y.Selector._replaceSelector(selector), selector = replaced.selector; // replace shorthand (".foo, #bar") after pseudos and attrs // to avoid replacing unescaped chars selector = Y.Selector._replaceShorthand(selector); selector = Y.Selector._restore('attr', selector, replaced.attrs); selector = Y.Selector._restore('pseudo', selector, replaced.pseudos); // replace braces and parens before restoring escaped chars // to avoid replacing ecaped markers selector = Y.Selector._replaceMarkers(selector); selector = Y.Selector._restore('esc', selector, replaced.esc); return selector; }, _attrFilters: { 'class': 'className', 'for': 'htmlFor' }, getters: { href: function(node, attr) { return Y.DOM.getAttribute(node, attr); }, id: function(node, attr) { return Y.DOM.getId(node); } } }; Y.mix(Y.Selector, SelectorCSS2, true); Y.Selector.getters.src = Y.Selector.getters.rel = Y.Selector.getters.href; // IE wants class with native queries if (Y.Selector.useNative && Y.config.doc.querySelector) { Y.Selector.shorthand['\\.(-?[_a-z]+[-\\w]*)'] = '[class~=$1]'; } }, '@VERSION@', {"requires": ["selector-native"]}); YUI.add('selector-css3', function (Y, NAME) { /** * The selector css3 module provides support for css3 selectors. * @module dom * @submodule selector-css3 * @for Selector */ /* an+b = get every _a_th node starting at the _b_th 0n+b = no repeat ("0" and "n" may both be omitted (together) , e.g. "0n+1" or "1", not "0+1"), return only the _b_th element 1n+b = get every element starting from b ("1" may may be omitted, e.g. "1n+0" or "n+0" or "n") an+0 = get every _a_th element, "0" may be omitted */ Y.Selector._reNth = /^(?:([\-]?\d*)(n){1}|(odd|even)$)*([\-+]?\d*)$/; Y.Selector._getNth = function(node, expr, tag, reverse) { Y.Selector._reNth.test(expr); var a = parseInt(RegExp.$1, 10), // include every _a_ elements (zero means no repeat, just first _a_) n = RegExp.$2, // "n" oddeven = RegExp.$3, // "odd" or "even" b = parseInt(RegExp.$4, 10) || 0, // start scan from element _b_ result = [], siblings = Y.DOM._children(node.parentNode, tag), op; if (oddeven) { a = 2; // always every other op = '+'; n = 'n'; b = (oddeven === 'odd') ? 1 : 0; } else if ( isNaN(a) ) { a = (n) ? 1 : 0; // start from the first or no repeat } if (a === 0) { // just the first if (reverse) { b = siblings.length - b + 1; } if (siblings[b - 1] === node) { return true; } else { return false; } } else if (a < 0) { reverse = !!reverse; a = Math.abs(a); } if (!reverse) { for (var i = b - 1, len = siblings.length; i < len; i += a) { if ( i >= 0 && siblings[i] === node ) { return true; } } } else { for (var i = siblings.length - b, len = siblings.length; i >= 0; i -= a) { if ( i < len && siblings[i] === node ) { return true; } } } return false; }; Y.mix(Y.Selector.pseudos, { 'root': function(node) { return node === node.ownerDocument.documentElement; }, 'nth-child': function(node, expr) { return Y.Selector._getNth(node, expr); }, 'nth-last-child': function(node, expr) { return Y.Selector._getNth(node, expr, null, true); }, 'nth-of-type': function(node, expr) { return Y.Selector._getNth(node, expr, node.tagName); }, 'nth-last-of-type': function(node, expr) { return Y.Selector._getNth(node, expr, node.tagName, true); }, 'last-child': function(node) { var children = Y.DOM._children(node.parentNode); return children[children.length - 1] === node; }, 'first-of-type': function(node) { return Y.DOM._children(node.parentNode, node.tagName)[0] === node; }, 'last-of-type': function(node) { var children = Y.DOM._children(node.parentNode, node.tagName); return children[children.length - 1] === node; }, 'only-child': function(node) { var children = Y.DOM._children(node.parentNode); return children.length === 1 && children[0] === node; }, 'only-of-type': function(node) { var children = Y.DOM._children(node.parentNode, node.tagName); return children.length === 1 && children[0] === node; }, 'empty': function(node) { return node.childNodes.length === 0; }, 'not': function(node, expr) { return !Y.Selector.test(node, expr); }, 'contains': function(node, expr) { var text = node.innerText || node.textContent || ''; return text.indexOf(expr) > -1; }, 'checked': function(node) { return (node.checked === true || node.selected === true); }, enabled: function(node) { return (node.disabled !== undefined && !node.disabled); }, disabled: function(node) { return (node.disabled); } }); Y.mix(Y.Selector.operators, { '^=': '^{val}', // Match starts with value '$=': '{val}$', // Match ends with value '*=': '{val}' // Match contains value as substring }); Y.Selector.combinators['~'] = { axis: 'previousSibling' }; }, '@VERSION@', {"requires": ["selector-native", "selector-css2"]}); YUI.add('yui-log', function (Y, NAME) { /** * Provides console log capability and exposes a custom event for * console implementations. This module is a `core` YUI module, <a href="../classes/YUI.html#method_log">it's documentation is located under the YUI class</a>. * * @module yui * @submodule yui-log */ var INSTANCE = Y, LOGEVENT = 'yui:log', UNDEFINED = 'undefined', LEVELS = { debug: 1, info: 1, warn: 1, error: 1 }; /** * If the 'debug' config is true, a 'yui:log' event will be * dispatched, which the Console widget and anything else * can consume. If the 'useBrowserConsole' config is true, it will * write to the browser console if available. YUI-specific log * messages will only be present in the -debug versions of the * JS files. The build system is supposed to remove log statements * from the raw and minified versions of the files. * * @method log * @for YUI * @param {String} msg The message to log. * @param {String} cat The log category for the message. Default * categories are "info", "warn", "error", time". * Custom categories can be used as well. (opt). * @param {String} src The source of the the message (opt). * @param {boolean} silent If true, the log event won't fire. * @return {YUI} YUI instance. */ INSTANCE.log = function(msg, cat, src, silent) { var bail, excl, incl, m, f, Y = INSTANCE, c = Y.config, publisher = (Y.fire) ? Y : YUI.Env.globalEvents; // suppress log message if the config is off or the event stack // or the event call stack contains a consumer of the yui:log event if (c.debug) { // apply source filters src = src || ""; if (typeof src !== "undefined") { excl = c.logExclude; incl = c.logInclude; if (incl && !(src in incl)) { bail = 1; } else if (incl && (src in incl)) { bail = !incl[src]; } else if (excl && (src in excl)) { bail = excl[src]; } } if (!bail) { if (c.useBrowserConsole) { m = (src) ? src + ': ' + msg : msg; if (Y.Lang.isFunction(c.logFn)) { c.logFn.call(Y, msg, cat, src); } else if (typeof console != UNDEFINED && console.log) { f = (cat && console[cat] && (cat in LEVELS)) ? cat : 'log'; console[f](m); } else if (typeof opera != UNDEFINED) { opera.postError(m); } } if (publisher && !silent) { if (publisher == Y && (!publisher.getEvent(LOGEVENT))) { publisher.publish(LOGEVENT, { broadcast: 2 }); } publisher.fire(LOGEVENT, { msg: msg, cat: cat, src: src }); } } } return Y; }; /** * Write a system message. This message will be preserved in the * minified and raw versions of the YUI files, unlike log statements. * @method message * @for YUI * @param {String} msg The message to log. * @param {String} cat The log category for the message. Default * categories are "info", "warn", "error", time". * Custom categories can be used as well. (opt). * @param {String} src The source of the the message (opt). * @param {boolean} silent If true, the log event won't fire. * @return {YUI} YUI instance. */ INSTANCE.message = function() { return INSTANCE.log.apply(INSTANCE, arguments); }; }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('dump', function (Y, NAME) { /** * Returns a simple string representation of the object or array. * Other types of objects will be returned unprocessed. Arrays * are expected to be indexed. Use object notation for * associative arrays. * * If included, the dump method is added to the YUI instance. * * @module dump */ var L = Y.Lang, OBJ = '{...}', FUN = 'f(){...}', COMMA = ', ', ARROW = ' => ', /** * Returns a simple string representation of the object or array. * Other types of objects will be returned unprocessed. Arrays * are expected to be indexed. * * @method dump * @param {Object} o The object to dump. * @param {Number} d How deep to recurse child objects, default 3. * @return {String} the dump result. * @for YUI */ dump = function(o, d) { var i, len, s = [], type = L.type(o); // Cast non-objects to string // Skip dates because the std toString is what we want // Skip HTMLElement-like objects because trying to dump // an element will cause an unhandled exception in FF 2.x if (!L.isObject(o)) { return o + ''; } else if (type == 'date') { return o; } else if (o.nodeType && o.tagName) { return o.tagName + '#' + o.id; } else if (o.document && o.navigator) { return 'window'; } else if (o.location && o.body) { return 'document'; } else if (type == 'function') { return FUN; } // dig into child objects the depth specifed. Default 3 d = (L.isNumber(d)) ? d : 3; // arrays [1, 2, 3] if (type == 'array') { s.push('['); for (i = 0, len = o.length; i < len; i = i + 1) { if (L.isObject(o[i])) { s.push((d > 0) ? L.dump(o[i], d - 1) : OBJ); } else { s.push(o[i]); } s.push(COMMA); } if (s.length > 1) { s.pop(); } s.push(']'); // regexp /foo/ } else if (type == 'regexp') { s.push(o.toString()); // objects {k1 => v1, k2 => v2} } else { s.push('{'); for (i in o) { if (o.hasOwnProperty(i)) { try { s.push(i + ARROW); if (L.isObject(o[i])) { s.push((d > 0) ? L.dump(o[i], d - 1) : OBJ); } else { s.push(o[i]); } s.push(COMMA); } catch (e) { s.push('Error: ' + e.message); } } } if (s.length > 1) { s.pop(); } s.push('}'); } return s.join(''); }; Y.dump = dump; L.dump = dump; }, '@VERSION@', {"requires": ["yui-base"]}); YUI.add('transition-timer', function (Y, NAME) { /** * Provides the base Transition class, for animating numeric properties. * * @module transition * @submodule transition-timer */ var Transition = Y.Transition; Y.mix(Transition.prototype, { _start: function() { if (Transition.useNative) { this._runNative(); } else { this._runTimer(); } }, _runTimer: function() { var anim = this; anim._initAttrs(); Transition._running[Y.stamp(anim)] = anim; anim._startTime = new Date(); Transition._startTimer(); }, _endTimer: function() { var anim = this; delete Transition._running[Y.stamp(anim)]; anim._startTime = null; }, _runFrame: function() { var t = new Date() - this._startTime; this._runAttrs(t); }, _runAttrs: function(time) { var anim = this, node = anim._node, config = anim._config, uid = Y.stamp(node), attrs = Transition._nodeAttrs[uid], customAttr = Transition.behaviors, done = false, allDone = false, data, name, attribute, setter, elapsed, delay, d, t, i; for (name in attrs) { if ((attribute = attrs[name]) && attribute.transition === anim) { d = attribute.duration; delay = attribute.delay; elapsed = (time - delay) / 1000; t = time; data = { type: 'propertyEnd', propertyName: name, config: config, elapsedTime: elapsed }; setter = (i in customAttr && 'set' in customAttr[i]) ? customAttr[i].set : Transition.DEFAULT_SETTER; done = (t >= d); if (t > d) { t = d; } if (!delay || time >= delay) { setter(anim, name, attribute.from, attribute.to, t - delay, d - delay, attribute.easing, attribute.unit); if (done) { delete attrs[name]; anim._count--; if (config[name] && config[name].on && config[name].on.end) { config[name].on.end.call(Y.one(node), data); } //node.fire('transition:propertyEnd', data); if (!allDone && anim._count <= 0) { allDone = true; anim._end(elapsed); anim._endTimer(); } } } } } }, _initAttrs: function() { var anim = this, customAttr = Transition.behaviors, uid = Y.stamp(anim._node), attrs = Transition._nodeAttrs[uid], attribute, duration, delay, easing, val, name, mTo, mFrom, unit, begin, end; for (name in attrs) { if ((attribute = attrs[name]) && attribute.transition === anim) { duration = attribute.duration * 1000; delay = attribute.delay * 1000; easing = attribute.easing; val = attribute.value; // only allow supported properties if (name in anim._node.style || name in Y.DOM.CUSTOM_STYLES) { begin = (name in customAttr && 'get' in customAttr[name]) ? customAttr[name].get(anim, name) : Transition.DEFAULT_GETTER(anim, name); mFrom = Transition.RE_UNITS.exec(begin); mTo = Transition.RE_UNITS.exec(val); begin = mFrom ? mFrom[1] : begin; end = mTo ? mTo[1] : val; unit = mTo ? mTo[2] : mFrom ? mFrom[2] : ''; // one might be zero TODO: mixed units if (!unit && Transition.RE_DEFAULT_UNIT.test(name)) { unit = Transition.DEFAULT_UNIT; } if (typeof easing === 'string') { if (easing.indexOf('cubic-bezier') > -1) { easing = easing.substring(13, easing.length - 1).split(','); } else if (Transition.easings[easing]) { easing = Transition.easings[easing]; } } attribute.from = Number(begin); attribute.to = Number(end); attribute.unit = unit; attribute.easing = easing; attribute.duration = duration + delay; attribute.delay = delay; } else { delete attrs[name]; anim._count--; } } } }, destroy: function() { this.detachAll(); this._node = null; } }, true); Y.mix(Y.Transition, { _runtimeAttrs: {}, /* * Regex of properties that should use the default unit. * * @property RE_DEFAULT_UNIT * @static */ RE_DEFAULT_UNIT: /^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i, /* * The default unit to use with properties that pass the RE_DEFAULT_UNIT test. * * @property DEFAULT_UNIT * @static */ DEFAULT_UNIT: 'px', /* * Time in milliseconds passed to setInterval for frame processing * * @property intervalTime * @default 20 * @static */ intervalTime: 20, /* * Bucket for custom getters and setters * * @property behaviors * @static */ behaviors: { left: { get: function(anim, attr) { return Y.DOM._getAttrOffset(anim._node, attr); } } }, /* * The default setter to use when setting object properties. * * @property DEFAULT_SETTER * @static */ DEFAULT_SETTER: function(anim, att, from, to, elapsed, duration, fn, unit) { from = Number(from); to = Number(to); var node = anim._node, val = Transition.cubicBezier(fn, elapsed / duration); val = from + val[0] * (to - from); if (node) { if (att in node.style || att in Y.DOM.CUSTOM_STYLES) { unit = unit || ''; Y.DOM.setStyle(node, att, val + unit); } } else { anim._end(); } }, /* * The default getter to use when getting object properties. * * @property DEFAULT_GETTER * @static */ DEFAULT_GETTER: function(anim, att) { var node = anim._node, val = ''; if (att in node.style || att in Y.DOM.CUSTOM_STYLES) { val = Y.DOM.getComputedStyle(node, att); } return val; }, _startTimer: function() { if (!Transition._timer) { Transition._timer = setInterval(Transition._runFrame, Transition.intervalTime); } }, _stopTimer: function() { clearInterval(Transition._timer); Transition._timer = null; }, /* * Called per Interval to handle each animation frame. * @method _runFrame * @private * @static */ _runFrame: function() { var done = true, anim; for (anim in Transition._running) { if (Transition._running[anim]._runFrame) { done = false; Transition._running[anim]._runFrame(); } } if (done) { Transition._stopTimer(); } }, cubicBezier: function(p, t) { var x0 = 0, y0 = 0, x1 = p[0], y1 = p[1], x2 = p[2], y2 = p[3], x3 = 1, y3 = 0, A = x3 - 3 * x2 + 3 * x1 - x0, B = 3 * x2 - 6 * x1 + 3 * x0, C = 3 * x1 - 3 * x0, D = x0, E = y3 - 3 * y2 + 3 * y1 - y0, F = 3 * y2 - 6 * y1 + 3 * y0, G = 3 * y1 - 3 * y0, H = y0, x = (((A*t) + B)*t + C)*t + D, y = (((E*t) + F)*t + G)*t + H; return [x, y]; }, easings: { ease: [0.25, 0, 1, 0.25], linear: [0, 0, 1, 1], 'ease-in': [0.42, 0, 1, 1], 'ease-out': [0, 0, 0.58, 1], 'ease-in-out': [0.42, 0, 0.58, 1] }, _running: {}, _timer: null, RE_UNITS: /^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/ }, true); Transition.behaviors.top = Transition.behaviors.bottom = Transition.behaviors.right = Transition.behaviors.left; Y.Transition = Transition; }, '@VERSION@', {"requires": ["transition"]}); YUI.add('yui', function (Y, NAME) { // empty }, '@VERSION@', {"use": ["yui", "oop", "dom", "event-custom-base", "event-base", "pluginhost", "node", "event-delegate", "io-base", "json-parse", "transition", "selector-css3", "dom-style-ie", "querystring-stringify-simple"]}); var Y = YUI().use('*');
Examples/Movies/SearchBar.ios.js
martinbigio/react-native
/** * The examples provided by Facebook are for non-commercial testing and * evaluation purposes only. * * Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @providesModule SearchBar * @flow */ 'use strict'; var React = require('react'); var ReactNative = require('react-native'); var { ActivityIndicatorIOS, TextInput, StyleSheet, View, } = ReactNative; var SearchBar = React.createClass({ render: function() { return ( <View style={styles.searchBar}> <TextInput autoCapitalize="none" autoCorrect={false} onChange={this.props.onSearchChange} placeholder="Search a movie..." onFocus={this.props.onFocus} style={styles.searchBarInput} /> <ActivityIndicatorIOS animating={this.props.isLoading} style={styles.spinner} /> </View> ); } }); var styles = StyleSheet.create({ searchBar: { marginTop: 64, padding: 3, paddingLeft: 8, flexDirection: 'row', alignItems: 'center', }, searchBarInput: { fontSize: 15, flex: 1, height: 30, }, spinner: { width: 30, }, }); module.exports = SearchBar;
src/svg-icons/communication/rss-feed.js
ArcanisCz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationRssFeed = (props) => ( <SvgIcon {...props}> <circle cx="6.18" cy="17.82" r="2.18"/><path d="M4 4.44v2.83c7.03 0 12.73 5.7 12.73 12.73h2.83c0-8.59-6.97-15.56-15.56-15.56zm0 5.66v2.83c3.9 0 7.07 3.17 7.07 7.07h2.83c0-5.47-4.43-9.9-9.9-9.9z"/> </SvgIcon> ); CommunicationRssFeed = pure(CommunicationRssFeed); CommunicationRssFeed.displayName = 'CommunicationRssFeed'; CommunicationRssFeed.muiName = 'SvgIcon'; export default CommunicationRssFeed;
packages/material-ui-icons/src/RoomServiceTwoTone.js
Kagami/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><path d="M12 9.58c-2.95 0-5.47 1.83-6.5 4.41h13c-1.03-2.58-3.55-4.41-6.5-4.41z" opacity=".3" /><path d="M2 17h20v2H2zM13.84 7.79c.1-.24.16-.51.16-.79 0-1.1-.9-2-2-2s-2 .9-2 2c0 .28.06.55.16.79C6.25 8.6 3.27 11.93 3 16h18c-.27-4.07-3.25-7.4-7.16-8.21zM12 9.58c2.95 0 5.47 1.83 6.5 4.41h-13c1.03-2.58 3.55-4.41 6.5-4.41z" /></React.Fragment> , 'RoomServiceTwoTone');
app/containers/LanguageProvider/index.js
kamil-mrzyglod/AosArmyBuilder
/* * * LanguageProvider * * this component connects the redux state language locale to the * IntlProvider component and i18n messages (loaded from `app/translations`) */ import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { IntlProvider } from 'react-intl'; import { selectLocale } from './selectors'; export class LanguageProvider extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function render() { return ( <IntlProvider locale={this.props.locale} key={this.props.locale} messages={this.props.messages[this.props.locale]}> {React.Children.only(this.props.children)} </IntlProvider> ); } } LanguageProvider.propTypes = { locale: React.PropTypes.string, messages: React.PropTypes.object, children: React.PropTypes.element.isRequired, }; const mapStateToProps = createSelector( selectLocale(), (locale) => ({ locale }) ); function mapDispatchToProps(dispatch) { return { dispatch, }; } export default connect(mapStateToProps, mapDispatchToProps)(LanguageProvider);
investninja-web-ui-admin/src/vendor/recharts/demo/component/Rectangle.js
InvestNinja/InvestNinja-web-ui
import React, { Component } from 'react'; import { Surface, Rectangle } from 'recharts'; class RectangleDemo extends Component { state = { x: 50, y: 50, width: 80, height: 100, }; changeSize() { this.setState({ x: Math.random() * 50, y: Math.random() * 50, width: Math.random() * 400, height: Math.random() * 400, }); } render() { const { width, height, x, y } = this.state; return ( <div> <a href="javascript:void(0);" className="btn" onClick={::this.changeSize} > change size </a> <Surface width={500} height={500}> <Rectangle x={x} y={y} width={width} height={height} radius={[5, 10, 8, 15]} stroke="#ff7300" isAnimationActive fill="none" /> </Surface> </div> ); } } export default RectangleDemo;
js/auth/NewPasswordForm.js
BarberHour/barber-hour
import React, { Component } from 'react'; import { View, Text, StyleSheet, StatusBar, TextInput, Platform } from 'react-native'; import { connect } from 'react-redux'; import t from 'tcomb-form-native'; const Form = t.form.Form; import Button from '../common/Button'; import Toolbar from '../common/Toolbar'; import Login from './Login'; import { newPassword } from '../actions/resetPassword'; class NewPasswordForm extends Component { _newPassword() { let value = this.refs.form.getValue(); // if are any validation errors, value will be null if (value !== null) { this.props.dispatch(newPassword(value, this.props.token)); } } componentDidUpdate() { if (this.props.form.success) { const route = { component: Login, passProps: { skipDeepLinking: true } }; Platform.OS === 'ios' ? this.props.navigator.replace(route) : this.props.navigator.resetTo(route); } } getFormValue() { return { password: this.props.form.password, password_confirmation: this.props.form.password_confirmation }; } render() { const NewPassword = t.struct({ password: t.String, password_confirmation: t.String }); const buttonLabel = this.props.form.isLoading ? 'Alterando...' : 'Alterar'; return( <View style={styles.container}> <StatusBar backgroundColor='#C5C5C5' networkActivityIndicatorVisible={this.props.form.isLoading} /> <Toolbar backIcon navigator={this.props.navigator} /> <View style={styles.innerContainer}> <Text style={styles.title}>Nova senha</Text> <Form ref='form' type={NewPassword} options={this.props.form} value={this.getFormValue()} /> <Button containerStyle={styles.button} text={buttonLabel} onPress={this._newPassword.bind(this)} disabled={this.props.form.isLoading} /> </View> </View> ); } } function select(store) { return { form: store.newPassword }; } export default connect(select)(NewPasswordForm); var styles = StyleSheet.create({ container: { flex: 1, flexDirection: 'column', backgroundColor: 'white', marginTop: Platform.OS === 'ios' ? 55 : 0 }, innerContainer: { padding: 20, }, title: { fontSize: 24, textAlign: 'center' }, button: { marginTop: 20 }, });
assets/jqwidgets/demos/react/app/splitter/loadingsplitpanelswithxhr/app.js
juannelisalde/holter
import React from 'react'; import ReactDOM from 'react-dom'; import JqxSplitter from '../../../jqwidgets-react/react_jqxsplitter.js'; class App extends React.Component { componentDidMount() { let loadPage = (url, tabIndex) => { let request = new XMLHttpRequest(); request.open('GET', url, false); request.setRequestHeader('Content-Type', 'text/json'); request.send(null); // Add 'setTimeout' to slow down the request otherwise cannot see 'ajax-loader.gif' setTimeout(() => { document.getElementById('content' + tabIndex).innerHTML = '<div style="overflow: auto; width: 100%; height: 100%;">' + request.response + '</div>'; }, (tabIndex * 400)); //document.getElementById('content' + tabIndex).innerHTML = '<div style="overflow: auto; width: 100%; height: 100%;">' + request.response + '</div>'; } loadPage('../app/splitter/loadingsplitpanelswithxhr/pages/ajax1.htm', 1); loadPage('../app/splitter/loadingsplitpanelswithxhr/pages/ajax2.htm', 2); } render() { return ( <JqxSplitter ref='mainSplitter' width={850} height={300} panels={[{ size: '50%' }, { size: '50%' }]} > <div id='content1'> <img src='../../images/ajax-loader.gif' /> </div> <div id='content2'> <img src='../../images/ajax-loader.gif' /> </div> </JqxSplitter> ) } } ReactDOM.render(<App />, document.getElementById('app'));
ajax/libs/intl-tel-input/5.1.7/js/intlTelInput.js
yinghunglai/cdnjs
/* International Telephone Input v5.1.7 https://github.com/Bluefieldscom/intl-tel-input.git */ // wrap in UMD - see https://github.com/umdjs/umd/blob/master/jqueryPlugin.js (function(factory) { if (typeof define === "function" && define.amd) { define([ "jquery" ], function($) { factory($, window, document); }); } else { factory(jQuery, window, document); } })(function($, window, document, undefined) { "use strict"; var pluginName = "intlTelInput", id = 1, // give each instance it's own id for namespaced event handling defaults = { // typing digits after a valid number will be added to the extension part of the number allowExtensions: false, // automatically format the number according to the selected country autoFormat: true, // add or remove input placeholder with an example number for the selected country autoPlaceholder: true, // if there is just a dial code in the input: remove it on blur, and re-add it on focus autoHideDialCode: true, // default country defaultCountry: "", // token for ipinfo - required for https or over 1000 daily page views support ipinfoToken: "", // don't insert international dial codes nationalMode: true, // number type to use for placeholders numberType: "MOBILE", // display only these countries onlyCountries: [], // the countries at the top of the list. defaults to united states and united kingdom preferredCountries: [ "us", "gb" ], // specify the path to the libphonenumber script to enable validation/formatting utilsScript: "" }, keys = { UP: 38, DOWN: 40, ENTER: 13, ESC: 27, PLUS: 43, A: 65, Z: 90, ZERO: 48, NINE: 57, SPACE: 32, BSPACE: 8, DEL: 46, CTRL: 17, CMD1: 91, // Chrome CMD2: 224 }, windowLoaded = false; // keep track of if the window.load event has fired as impossible to check after the fact $(window).load(function() { windowLoaded = true; }); function Plugin(element, options) { this.element = element; this.options = $.extend({}, defaults, options); this._defaults = defaults; // event namespace this.ns = "." + pluginName + id++; // Chrome, FF, Safari, IE9+ this.isGoodBrowser = Boolean(element.setSelectionRange); this.hadInitialPlaceholder = Boolean($(element).attr("placeholder")); this._name = pluginName; this.init(); } Plugin.prototype = { init: function() { var that = this; // if defaultCountry is set to "auto", we must do a lookup first if (this.options.defaultCountry == "auto") { // reset this in case lookup fails this.options.defaultCountry = ""; var ipinfoURL = "//ipinfo.io"; if (this.options.ipinfoToken) { ipinfoURL += "?token=" + this.options.ipinfoToken; } $.get(ipinfoURL, function(response) { if (response && response.country) { that.options.defaultCountry = response.country.toLowerCase(); } }, "jsonp").always(function() { that._ready(); }); } else { this._ready(); } }, _ready: function() { // if in nationalMode, disable options relating to dial codes if (this.options.nationalMode) { this.options.autoHideDialCode = false; } // IE Mobile doesn't support the keypress event (see issue 68) which makes autoFormat impossible if (navigator.userAgent.match(/IEMobile/i)) { this.options.autoFormat = false; } // process all the data: onlyCountries, preferredCountries etc this._processCountryData(); // generate the markup this._generateMarkup(); // set the initial state of the input value and the selected flag this._setInitialState(); // start all of the event listeners: autoHideDialCode, input keydown, selectedFlag click this._initListeners(); }, /******************** * PRIVATE METHODS ********************/ // prepare all of the country data, including onlyCountries and preferredCountries options _processCountryData: function() { // set the instances country data objects this._setInstanceCountryData(); // set the preferredCountries property this._setPreferredCountries(); }, // add a country code to this.countryCodes _addCountryCode: function(iso2, dialCode, priority) { if (!(dialCode in this.countryCodes)) { this.countryCodes[dialCode] = []; } var index = priority || 0; this.countryCodes[dialCode][index] = iso2; }, // process onlyCountries array if present, and generate the countryCodes map _setInstanceCountryData: function() { var i; // process onlyCountries option if (this.options.onlyCountries.length) { // standardise case for (i = 0; i < this.options.onlyCountries.length; i++) { this.options.onlyCountries[i] = this.options.onlyCountries[i].toLowerCase(); } // build instance country array this.countries = []; for (i = 0; i < allCountries.length; i++) { if ($.inArray(allCountries[i].iso2, this.options.onlyCountries) != -1) { this.countries.push(allCountries[i]); } } } else { this.countries = allCountries; } // generate countryCodes map this.countryCodes = {}; for (i = 0; i < this.countries.length; i++) { var c = this.countries[i]; this._addCountryCode(c.iso2, c.dialCode, c.priority); // area codes if (c.areaCodes) { for (var j = 0; j < c.areaCodes.length; j++) { // full dial code is country code + dial code this._addCountryCode(c.iso2, c.dialCode + c.areaCodes[j]); } } } }, // process preferred countries - iterate through the preferences, // fetching the country data for each one _setPreferredCountries: function() { this.preferredCountries = []; for (var i = 0; i < this.options.preferredCountries.length; i++) { var countryCode = this.options.preferredCountries[i].toLowerCase(), countryData = this._getCountryData(countryCode, false, true); if (countryData) { this.preferredCountries.push(countryData); } } }, // generate all of the markup for the plugin: the selected flag overlay, and the dropdown _generateMarkup: function() { // telephone input this.telInput = $(this.element); // prevent autocomplete as there's no safe, cross-browser event we can react to, so it can easily put the plugin in an inconsistent state e.g. the wrong flag selected for the autocompleted number, which on submit could mean the wrong number is saved (esp in nationalMode) this.telInput.attr("autocomplete", "off"); // containers (mostly for positioning) this.telInput.wrap($("<div>", { "class": "intl-tel-input" })); var flagsContainer = $("<div>", { "class": "flag-dropdown" }).insertAfter(this.telInput); // currently selected flag (displayed to left of input) var selectedFlag = $("<div>", { "class": "selected-flag" }).appendTo(flagsContainer); this.selectedFlagInner = $("<div>", { "class": "iti-flag" }).appendTo(selectedFlag); // CSS triangle $("<div>", { "class": "arrow" }).appendTo(this.selectedFlagInner); // country list contains: preferred countries, then divider, then all countries this.countryList = $("<ul>", { "class": "country-list v-hide" }).appendTo(flagsContainer); if (this.preferredCountries.length) { this._appendListItems(this.preferredCountries, "preferred"); $("<li>", { "class": "divider" }).appendTo(this.countryList); } this._appendListItems(this.countries, ""); // now we can grab the dropdown height, and hide it properly this.dropdownHeight = this.countryList.outerHeight(); this.countryList.removeClass("v-hide").addClass("hide"); // on small screens make the dropdown the same width as the input if (window.innerWidth < 500) { this.countryList.outerWidth(this.telInput.outerWidth()); } // this is useful in lots of places this.countryListItems = this.countryList.children(".country"); }, // add a country <li> to the countryList <ul> container _appendListItems: function(countries, className) { // we create so many DOM elements, I decided it was faster to build a temp string // and then add everything to the DOM in one go at the end var tmp = ""; // for each country for (var i = 0; i < countries.length; i++) { var c = countries[i]; // open the list item tmp += "<li class='country " + className + "' data-dial-code='" + c.dialCode + "' data-country-code='" + c.iso2 + "'>"; // add the flag tmp += "<div class='iti-flag " + c.iso2 + "'></div>"; // and the country name and dial code tmp += "<span class='country-name'>" + c.name + "</span>"; tmp += "<span class='dial-code'>+" + c.dialCode + "</span>"; // close the list item tmp += "</li>"; } this.countryList.append(tmp); }, // set the initial state of the input value and the selected flag _setInitialState: function() { var val = this.telInput.val(); // if there is a number, and it's valid, we can go ahead and set the flag, else fall back to default if (this._getDialCode(val)) { this._updateFlagFromNumber(val); } else { // check the defaultCountry option, else fall back to the first in the list if (this.options.defaultCountry) { this.options.defaultCountry = this._getCountryData(this.options.defaultCountry.toLowerCase(), false, false); } else { this.options.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0] : this.countries[0]; } this._selectFlag(this.options.defaultCountry.iso2); // if empty, insert the default dial code (this function will check !nationalMode and !autoHideDialCode) if (!val) { this._updateDialCode(this.options.defaultCountry.dialCode, false); } } // format if (val) { // this wont be run after _updateDialCode as that's only called if no val this._updateVal(val, false); } }, // initialise the main event listeners: input keyup, and click selected flag _initListeners: function() { var that = this; this._initKeyListeners(); // autoFormat prevents the change event from firing, so we need to check for changes between focus and blur in order to manually trigger it if (this.options.autoHideDialCode || this.options.autoFormat) { this._initFocusListeners(); } // hack for input nested inside label: clicking the selected-flag to open the dropdown would then automatically trigger a 2nd click on the input which would close it again var label = this.telInput.closest("label"); if (label.length) { label.on("click" + this.ns, function(e) { // if the dropdown is closed, then focus the input, else ignore the click if (that.countryList.hasClass("hide")) { that.telInput.focus(); } else { e.preventDefault(); } }); } // toggle country dropdown on click var selectedFlag = this.selectedFlagInner.parent(); selectedFlag.on("click" + this.ns, function(e) { // only intercept this event if we're opening the dropdown // else let it bubble up to the top ("click-off-to-close" listener) // we cannot just stopPropagation as it may be needed to close another instance if (that.countryList.hasClass("hide") && !that.telInput.prop("disabled") && !that.telInput.prop("readonly")) { that._showDropdown(); } }); // if the user has specified the path to the utils script, fetch it on window.load if (this.options.utilsScript) { // if the plugin is being initialised after the window.load event has already been fired if (windowLoaded) { this.loadUtils(); } else { // wait until the load event so we don't block any other requests e.g. the flags image $(window).load(function() { that.loadUtils(); }); } } }, _initKeyListeners: function() { var that = this; if (this.options.autoFormat) { // format number and update flag on keypress // use keypress event as we want to ignore all input except for a select few keys, // but we dont want to ignore the navigation keys like the arrows etc. // NOTE: no point in refactoring this to only bind these listeners on focus/blur because then you would need to have those 2 listeners running the whole time anyway... this.telInput.on("keypress" + this.ns, function(e) { // 32 is space, and after that it's all chars (not meta/nav keys) // this fix is needed for Firefox, which triggers keypress event for some meta/nav keys // Update: also ignore if this is a metaKey e.g. FF and Safari trigger keypress on the v of Ctrl+v // Update: also ignore if ctrlKey (FF on Windows/Ubuntu) // Update: also check that we have utils before we do any autoFormat stuff if (e.which >= keys.SPACE && !e.ctrlKey && !e.metaKey && window.intlTelInputUtils && !that.telInput.prop("readonly")) { e.preventDefault(); // allowed keys are just numeric keys and plus // we must allow plus for the case where the user does select-all and then hits plus to start typing a new number. we could refine this logic to first check that the selection contains a plus, but that wont work in old browsers, and I think it's overkill anyway var isAllowedKey = e.which >= keys.ZERO && e.which <= keys.NINE || e.which == keys.PLUS, input = that.telInput[0], noSelection = that.isGoodBrowser && input.selectionStart == input.selectionEnd, max = that.telInput.attr("maxlength"), val = that.telInput.val(), // assumes that if max exists, it is >0 isBelowMax = max ? val.length < max : true; // first: ensure we dont go over maxlength. we must do this here to prevent adding digits in the middle of the number // still reformat even if not an allowed key as they could by typing a formatting char, but ignore if there's a selection as doesn't make sense to replace selection with illegal char and then immediately remove it if (isBelowMax && (isAllowedKey || noSelection)) { var newChar = isAllowedKey ? String.fromCharCode(e.which) : null; that._handleInputKey(newChar, true, isAllowedKey); // if something has changed, trigger the input event (which was otherwised squashed by the preventDefault) if (val != that.telInput.val()) { that.telInput.trigger("input"); } } if (!isAllowedKey) { that._handleInvalidKey(); } } }); } // handle keyup event // for autoFormat: we use keyup to catch cut/paste events and also delete events (after the fact) this.telInput.on("keyup" + this.ns, function(e) { // the "enter" key event from selecting a dropdown item is triggered here on the input, because the document.keydown handler that initially handles that event triggers a focus on the input, and so the keyup for that same key event gets triggered here. weird, but just make sure we dont bother doing any re-formatting in this case (we've already done preventDefault in the keydown handler, so it wont actually submit the form or anything). // ALSO: ignore keyup if readonly if (e.which == keys.ENTER || that.telInput.prop("readonly")) {} else if (that.options.autoFormat && window.intlTelInputUtils) { var isCtrl = e.which == keys.CTRL || e.which == keys.CMD1 || e.which == keys.CMD2, input = that.telInput[0], // noSelection defaults to false for bad browsers, else would be reformatting on all ctrl keys e.g. select-all/copy noSelection = that.isGoodBrowser && input.selectionStart == input.selectionEnd, // cursorAtEnd defaults to false for bad browsers else they would never get a reformat on delete cursorAtEnd = that.isGoodBrowser && input.selectionStart == that.telInput.val().length; // if delete in the middle: reformat with no suffix (no need to reformat if delete at end) // if backspace: reformat with no suffix (need to reformat if at end to remove any lingering suffix - this is a feature) // if ctrl and no selection (i.e. could have just been a paste): reformat (if cursorAtEnd: add suffix) if (e.which == keys.DEL && !cursorAtEnd || e.which == keys.BSPACE || isCtrl && noSelection) { // important to remember never to add suffix on any delete key as can fuck up in ie8 so you can never delete a formatting char at the end // UPDATE: pass true for 3rd arg (isAllowedKey) if might have been a paste event - this is just passed through to intlTelInputUtils.formatNumber and used to check an extensions edge case that._handleInputKey(null, isCtrl && cursorAtEnd, isCtrl); } // prevent deleting the plus (if not in nationalMode) if (!that.options.nationalMode) { var val = that.telInput.val(); if (val.charAt(0) != "+") { // newCursorPos is current pos + 1 to account for the plus we are about to add var newCursorPos = that.isGoodBrowser ? input.selectionStart + 1 : 0; that.telInput.val("+" + val); if (that.isGoodBrowser) { input.setSelectionRange(newCursorPos, newCursorPos); } } } } else { // if no autoFormat, just update flag that._updateFlagFromNumber(that.telInput.val()); } }); }, // alert the user to an invalid key event _handleInvalidKey: function() { var that = this; this.telInput.trigger("invalidkey").addClass("iti-invalid-key"); setTimeout(function() { that.telInput.removeClass("iti-invalid-key"); }, 100); }, // when autoFormat is enabled: handle various key events on the input: the 2 main situations are 1) adding a new number character, which will replace any selection, reformat, and preserve the cursor position. and 2) reformatting on backspace, or paste event (etc) _handleInputKey: function(newNumericChar, addSuffix, isAllowedKey) { var val = this.telInput.val(), cleanBefore = this._getClean(val), originalLeftChars, // raw DOM element input = this.telInput[0], digitsOnRight = 0; if (this.isGoodBrowser) { // cursor strategy: maintain the number of digits on the right. we use the right instead of the left so that A) we dont have to account for the new digit (or multiple digits if paste event), and B) we're always on the right side of formatting suffixes digitsOnRight = this._getDigitsOnRight(val, input.selectionEnd); // if handling a new number character: insert it in the right place if (newNumericChar) { // replace any selection they may have made with the new char val = val.substr(0, input.selectionStart) + newNumericChar + val.substring(input.selectionEnd, val.length); } else { // here we're not handling a new char, we're just doing a re-format (e.g. on delete/backspace/paste, after the fact), but we still need to maintain the cursor position. so make note of the char on the left, and then after the re-format, we'll count in the same number of digits from the right, and then keep going through any formatting chars until we hit the same left char that we had before. // UPDATE: now have to store 2 chars as extensions formatting contains 2 spaces so you need to be able to distinguish originalLeftChars = val.substr(input.selectionStart - 2, 2); } } else if (newNumericChar) { val += newNumericChar; } // update the number and flag this.setNumber(val, addSuffix, true, isAllowedKey); // update the cursor position if (this.isGoodBrowser) { var newCursor; val = this.telInput.val(); // if it was at the end, keep it there if (!digitsOnRight) { newCursor = val.length; } else { // else count in the same number of digits from the right newCursor = this._getCursorFromDigitsOnRight(val, digitsOnRight); // but if delete/paste etc, keep going left until hit the same left char as before if (!newNumericChar) { newCursor = this._getCursorFromLeftChar(val, newCursor, originalLeftChars); } } // set the new cursor input.setSelectionRange(newCursor, newCursor); } }, // we start from the position in guessCursor, and work our way left until we hit the originalLeftChars or a number to make sure that after reformatting the cursor has the same char on the left in the case of a delete etc _getCursorFromLeftChar: function(val, guessCursor, originalLeftChars) { for (var i = guessCursor; i > 0; i--) { var leftChar = val.charAt(i - 1); if ($.isNumeric(leftChar) || val.substr(i - 2, 2) == originalLeftChars) { return i; } } return 0; }, // after a reformat we need to make sure there are still the same number of digits to the right of the cursor _getCursorFromDigitsOnRight: function(val, digitsOnRight) { for (var i = val.length - 1; i >= 0; i--) { if ($.isNumeric(val.charAt(i))) { if (--digitsOnRight === 0) { return i; } } } return 0; }, // get the number of numeric digits to the right of the cursor so we can reposition the cursor correctly after the reformat has happened _getDigitsOnRight: function(val, selectionEnd) { var digitsOnRight = 0; for (var i = selectionEnd; i < val.length; i++) { if ($.isNumeric(val.charAt(i))) { digitsOnRight++; } } return digitsOnRight; }, // listen for focus and blur _initFocusListeners: function() { var that = this; if (this.options.autoHideDialCode) { // mousedown decides where the cursor goes, so if we're focusing we must preventDefault as we'll be inserting the dial code, and we want the cursor to be at the end no matter where they click this.telInput.on("mousedown" + this.ns, function(e) { if (!that.telInput.is(":focus") && !that.telInput.val()) { e.preventDefault(); // but this also cancels the focus, so we must trigger that manually that.telInput.focus(); } }); } this.telInput.on("focus" + this.ns, function(e) { var value = that.telInput.val(); // save this to compare on blur that.telInput.data("focusVal", value); // on focus: if empty, insert the dial code for the currently selected flag if (that.options.autoHideDialCode && !value && !that.telInput.prop("readonly") && that.selectedCountryData.dialCode) { that._updateVal("+" + that.selectedCountryData.dialCode, true); // after auto-inserting a dial code, if the first key they hit is '+' then assume they are entering a new number, so remove the dial code. use keypress instead of keydown because keydown gets triggered for the shift key (required to hit the + key), and instead of keyup because that shows the new '+' before removing the old one that.telInput.one("keypress.plus" + that.ns, function(e) { if (e.which == keys.PLUS) { // if autoFormat is enabled, this key event will have already have been handled by another keypress listener (hence we need to add the "+"). if disabled, it will be handled after this by a keyup listener (hence no need to add the "+"). var newVal = that.options.autoFormat && window.intlTelInputUtils ? "+" : ""; that.telInput.val(newVal); } }); // after tabbing in, make sure the cursor is at the end we must use setTimeout to get outside of the focus handler as it seems the selection happens after that setTimeout(function() { var input = that.telInput[0]; if (that.isGoodBrowser) { var len = that.telInput.val().length; input.setSelectionRange(len, len); } }); } }); this.telInput.on("blur" + this.ns, function() { if (that.options.autoHideDialCode) { // on blur: if just a dial code then remove it var value = that.telInput.val(), startsPlus = value.charAt(0) == "+"; if (startsPlus) { var numeric = that._getNumeric(value); // if just a plus, or if just a dial code if (!numeric || that.selectedCountryData.dialCode == numeric) { that.telInput.val(""); } } // remove the keypress listener we added on focus that.telInput.off("keypress.plus" + that.ns); } // if autoFormat, we must manually trigger change event if value has changed if (that.options.autoFormat && window.intlTelInputUtils && that.telInput.val() != that.telInput.data("focusVal")) { that.telInput.trigger("change"); } }); }, // extract the numeric digits from the given string _getNumeric: function(s) { return s.replace(/\D/g, ""); }, _getClean: function(s) { var prefix = s.charAt(0) == "+" ? "+" : ""; return prefix + this._getNumeric(s); }, // show the dropdown _showDropdown: function() { this._setDropdownPosition(); // update highlighting and scroll to active list item var activeListItem = this.countryList.children(".active"); if (activeListItem.length) { this._highlightListItem(activeListItem); } // show it this.countryList.removeClass("hide"); if (activeListItem.length) { this._scrollTo(activeListItem); } // bind all the dropdown-related listeners: mouseover, click, click-off, keydown this._bindDropdownListeners(); // update the arrow this.selectedFlagInner.children(".arrow").addClass("up"); }, // decide where to position dropdown (depends on position within viewport, and scroll) _setDropdownPosition: function() { var inputTop = this.telInput.offset().top, windowTop = $(window).scrollTop(), // dropdownFitsBelow = (dropdownBottom < windowBottom) dropdownFitsBelow = inputTop + this.telInput.outerHeight() + this.dropdownHeight < windowTop + $(window).height(), dropdownFitsAbove = inputTop - this.dropdownHeight > windowTop; // dropdownHeight - 1 for border var cssTop = !dropdownFitsBelow && dropdownFitsAbove ? "-" + (this.dropdownHeight - 1) + "px" : ""; this.countryList.css("top", cssTop); }, // we only bind dropdown listeners when the dropdown is open _bindDropdownListeners: function() { var that = this; // when mouse over a list item, just highlight that one // we add the class "highlight", so if they hit "enter" we know which one to select this.countryList.on("mouseover" + this.ns, ".country", function(e) { that._highlightListItem($(this)); }); // listen for country selection this.countryList.on("click" + this.ns, ".country", function(e) { that._selectListItem($(this)); }); // click off to close // (except when this initial opening click is bubbling up) // we cannot just stopPropagation as it may be needed to close another instance var isOpening = true; $("html").on("click" + this.ns, function(e) { if (!isOpening) { that._closeDropdown(); } isOpening = false; }); // listen for up/down scrolling, enter to select, or letters to jump to country name. // use keydown as keypress doesn't fire for non-char keys and we want to catch if they // just hit down and hold it to scroll down (no keyup event). // listen on the document because that's where key events are triggered if no input has focus var query = "", queryTimer = null; $(document).on("keydown" + this.ns, function(e) { // prevent down key from scrolling the whole page, // and enter key from submitting a form etc e.preventDefault(); if (e.which == keys.UP || e.which == keys.DOWN) { // up and down to navigate that._handleUpDownKey(e.which); } else if (e.which == keys.ENTER) { // enter to select that._handleEnterKey(); } else if (e.which == keys.ESC) { // esc to close that._closeDropdown(); } else if (e.which >= keys.A && e.which <= keys.Z || e.which == keys.SPACE) { // upper case letters (note: keyup/keydown only return upper case letters) // jump to countries that start with the query string if (queryTimer) { clearTimeout(queryTimer); } query += String.fromCharCode(e.which); that._searchForCountry(query); // if the timer hits 1 second, reset the query queryTimer = setTimeout(function() { query = ""; }, 1e3); } }); }, // highlight the next/prev item in the list (and ensure it is visible) _handleUpDownKey: function(key) { var current = this.countryList.children(".highlight").first(); var next = key == keys.UP ? current.prev() : current.next(); if (next.length) { // skip the divider if (next.hasClass("divider")) { next = key == keys.UP ? next.prev() : next.next(); } this._highlightListItem(next); this._scrollTo(next); } }, // select the currently highlighted item _handleEnterKey: function() { var currentCountry = this.countryList.children(".highlight").first(); if (currentCountry.length) { this._selectListItem(currentCountry); } }, // find the first list item whose name starts with the query string _searchForCountry: function(query) { for (var i = 0; i < this.countries.length; i++) { if (this._startsWith(this.countries[i].name, query)) { var listItem = this.countryList.children("[data-country-code=" + this.countries[i].iso2 + "]").not(".preferred"); // update highlighting and scroll this._highlightListItem(listItem); this._scrollTo(listItem, true); break; } } }, // check if (uppercase) string a starts with string b _startsWith: function(a, b) { return a.substr(0, b.length).toUpperCase() == b; }, // update the input's value to the given val // if autoFormat=true, format it first according to the country-specific formatting rules _updateVal: function(val, addSuffix, preventConversion, isAllowedKey) { var formatted; if (this.options.autoFormat && window.intlTelInputUtils) { // if nationalMode and we have a valid intl number, convert it to ntl // preventConversion is false (i.e. we allow conversion) when dev calls setNumber, or on init if (!preventConversion && this.options.nationalMode && val.charAt(0) == "+" && intlTelInputUtils.isValidNumber(val, this.selectedCountryData.iso2)) { formatted = intlTelInputUtils.formatNumberByType(val, this.selectedCountryData.iso2, intlTelInputUtils.numberFormat.NATIONAL); } else { formatted = intlTelInputUtils.formatNumber(val, this.selectedCountryData.iso2, addSuffix, this.options.allowExtensions, isAllowedKey); } // ensure we dont go over maxlength. we must do this here to truncate any formatting suffix, and also handle paste events var max = this.telInput.attr("maxlength"); if (max && formatted.length > max) { formatted = formatted.substr(0, max); } } else { // no autoFormat, so just insert the original value formatted = val; } this.telInput.val(formatted); }, // check if need to select a new flag based on the given number _updateFlagFromNumber: function(number) { // if we're in nationalMode and we're on US/Canada, make sure the number starts with a +1 so _getDialCode will be able to extract the area code // update: if we dont yet have selectedCountryData, but we're here (trying to update the flag from the number), that means we're initialising the plugin with a number that already has a dial code, so fine to ignore this bit if (this.options.nationalMode && this.selectedCountryData && this.selectedCountryData.dialCode == "1" && number.charAt(0) != "+") { if (number.charAt(0) != "1") { number = "1" + number; } number = "+" + number; } // try and extract valid dial code from input var dialCode = this._getDialCode(number), countryCode = null; if (dialCode) { // check if one of the matching countries is already selected var countryCodes = this.countryCodes[this._getNumeric(dialCode)], alreadySelected = this.selectedCountryData && $.inArray(this.selectedCountryData.iso2, countryCodes) != -1; // if a matching country is not already selected (or this is an unknown NANP area code): choose the first in the list if (!alreadySelected || this._isUnknownNanp(number, dialCode)) { // if using onlyCountries option, countryCodes[0] may be empty, so we must find the first non-empty index for (var j = 0; j < countryCodes.length; j++) { if (countryCodes[j]) { countryCode = countryCodes[j]; break; } } } } else if (number.charAt(0) == "+") { // no valid dial code, but only empty it if they've actually typed an invalid one, not just a plus // Note: use getNumeric here because the number has not been formatted yet, so could contain bad shit if (this._getNumeric(number).length) { countryCode = ""; } else if (!this.selectedCountryData.iso2) { // if just a plus and there's no currently selected country, revert to default countryCode = this.options.defaultCountry.iso2; } } else if (!this.selectedCountryData.iso2 && !number) { // if no selected country and no number, revert to default countryCode = this.options.defaultCountry.iso2; } if (countryCode !== null) { this._selectFlag(countryCode); } }, // check if the given number contains an unknown area code from the North American Numbering Plan i.e. the only dialCode that could be extracted was +1 but the actual number's length is >=4 _isUnknownNanp: function(number, dialCode) { return dialCode == "+1" && this._getNumeric(number).length >= 4; }, // remove highlighting from other list items and highlight the given item _highlightListItem: function(listItem) { this.countryListItems.removeClass("highlight"); listItem.addClass("highlight"); }, // find the country data for the given country code // the ignoreOnlyCountriesOption is only used during init() while parsing the onlyCountries array _getCountryData: function(countryCode, ignoreOnlyCountriesOption, allowFail) { var countryList = ignoreOnlyCountriesOption ? allCountries : this.countries; for (var i = 0; i < countryList.length; i++) { if (countryList[i].iso2 == countryCode) { return countryList[i]; } } if (allowFail) { return null; } else { throw new Error("No country data for '" + countryCode + "'"); } }, // select the given flag, update the placeholder and the active list item _selectFlag: function(countryCode) { // do this first as it will throw an error and stop if countryCode is invalid this.selectedCountryData = countryCode ? this._getCountryData(countryCode, false, false) : {}; this.selectedFlagInner.attr("class", "iti-flag " + countryCode); // update the selected country's title attribute var title = countryCode ? this.selectedCountryData.name + ": +" + this.selectedCountryData.dialCode : "Unknown"; this.selectedFlagInner.parent().attr("title", title); // and the input's placeholder this._updatePlaceholder(); // update the active list item this.countryListItems.removeClass("active"); if (countryCode) { this.countryListItems.children(".iti-flag." + countryCode).first().parent().addClass("active"); } }, // update the input placeholder to an example number from the currently selected country _updatePlaceholder: function() { if (window.intlTelInputUtils && !this.hadInitialPlaceholder && this.options.autoPlaceholder) { var iso2 = this.selectedCountryData.iso2, numberType = intlTelInputUtils.numberType[this.options.numberType || "FIXED_LINE"], placeholder = iso2 ? intlTelInputUtils.getExampleNumber(iso2, this.options.nationalMode, numberType) : ""; this.telInput.attr("placeholder", placeholder); } }, // called when the user selects a list item from the dropdown _selectListItem: function(listItem) { // update selected flag and active list item var countryCode = listItem.attr("data-country-code"); this._selectFlag(countryCode); this._closeDropdown(); this._updateDialCode(listItem.attr("data-dial-code"), true); // always fire the change event as even if nationalMode=true (and we haven't updated the input val), the system as a whole has still changed - see country-sync example. think of it as making a selection from a select element. this.telInput.trigger("change"); // focus the input this.telInput.focus(); }, // close the dropdown and unbind any listeners _closeDropdown: function() { this.countryList.addClass("hide"); // update the arrow this.selectedFlagInner.children(".arrow").removeClass("up"); // unbind key events $(document).off(this.ns); // unbind click-off-to-close $("html").off(this.ns); // unbind hover and click listeners this.countryList.off(this.ns); }, // check if an element is visible within it's container, else scroll until it is _scrollTo: function(element, middle) { var container = this.countryList, containerHeight = container.height(), containerTop = container.offset().top, containerBottom = containerTop + containerHeight, elementHeight = element.outerHeight(), elementTop = element.offset().top, elementBottom = elementTop + elementHeight, newScrollTop = elementTop - containerTop + container.scrollTop(), middleOffset = containerHeight / 2 - elementHeight / 2; if (elementTop < containerTop) { // scroll up if (middle) { newScrollTop -= middleOffset; } container.scrollTop(newScrollTop); } else if (elementBottom > containerBottom) { // scroll down if (middle) { newScrollTop += middleOffset; } var heightDifference = containerHeight - elementHeight; container.scrollTop(newScrollTop - heightDifference); } }, // replace any existing dial code with the new one (if not in nationalMode) // also we need to know if we're focusing for a couple of reasons e.g. if so, we want to add any formatting suffix, also if the input is empty and we're not in nationalMode, then we want to insert the dial code _updateDialCode: function(newDialCode, focusing) { var inputVal = this.telInput.val(), newNumber; // save having to pass this every time newDialCode = "+" + newDialCode; if (this.options.nationalMode && inputVal.charAt(0) != "+") { // if nationalMode, we just want to re-format newNumber = inputVal; } else if (inputVal) { // if the previous number contained a valid dial code, replace it // (if more than just a plus character) var prevDialCode = this._getDialCode(inputVal); if (prevDialCode.length > 1) { newNumber = inputVal.replace(prevDialCode, newDialCode); } else { // if the previous number didn't contain a dial code, we should persist it var existingNumber = inputVal.charAt(0) != "+" ? $.trim(inputVal) : ""; newNumber = newDialCode + existingNumber; } } else { newNumber = !this.options.autoHideDialCode || focusing ? newDialCode : ""; } this._updateVal(newNumber, focusing); }, // try and extract a valid international dial code from a full telephone number // Note: returns the raw string inc plus character and any whitespace/dots etc _getDialCode: function(number) { var dialCode = ""; // only interested in international numbers (starting with a plus) if (number.charAt(0) == "+") { var numericChars = ""; // iterate over chars for (var i = 0; i < number.length; i++) { var c = number.charAt(i); // if char is number if ($.isNumeric(c)) { numericChars += c; // if current numericChars make a valid dial code if (this.countryCodes[numericChars]) { // store the actual raw string (useful for matching later) dialCode = number.substr(0, i + 1); } // longest dial code is 4 chars if (numericChars.length == 4) { break; } } } } return dialCode; }, /******************** * PUBLIC METHODS ********************/ // remove plugin destroy: function() { // make sure the dropdown is closed (and unbind listeners) this._closeDropdown(); // key events, and focus/blur events if autoHideDialCode=true this.telInput.off(this.ns); // click event to open dropdown this.selectedFlagInner.parent().off(this.ns); // label click hack this.telInput.closest("label").off(this.ns); // remove markup var container = this.telInput.parent(); container.before(this.telInput).remove(); }, // extract the phone number extension if present getExtension: function() { return this.telInput.val().split(" ext. ")[1] || ""; }, // format the number to the given type getNumber: function(type) { if (window.intlTelInputUtils) { return intlTelInputUtils.formatNumberByType(this.telInput.val(), this.selectedCountryData.iso2, type); } return ""; }, // get the type of the entered number e.g. landline/mobile getNumberType: function() { if (window.intlTelInputUtils) { return intlTelInputUtils.getNumberType(this.telInput.val(), this.selectedCountryData.iso2); } return -99; }, // get the country data for the currently selected flag getSelectedCountryData: function() { // if this is undefined, the plugin will return it's instance instead, so in that case an empty object makes more sense return this.selectedCountryData || {}; }, // get the validation error getValidationError: function() { if (window.intlTelInputUtils) { return intlTelInputUtils.getValidationError(this.telInput.val(), this.selectedCountryData.iso2); } return -99; }, // validate the input val - assumes the global function isValidNumber (from utilsScript) isValidNumber: function() { var val = $.trim(this.telInput.val()), countryCode = this.options.nationalMode ? this.selectedCountryData.iso2 : ""; if (window.intlTelInputUtils) { return intlTelInputUtils.isValidNumber(val, countryCode); } return false; }, // load the utils script loadUtils: function(path) { var utilsScript = path || this.options.utilsScript; if (!$.fn[pluginName].loadedUtilsScript && utilsScript) { // don't do this twice! (dont just check if the global intlTelInputUtils exists as if init plugin multiple times in quick succession, it may not have finished loading yet) $.fn[pluginName].loadedUtilsScript = true; // dont use $.getScript as it prevents caching $.ajax({ url: utilsScript, success: function() { // tell all instances the utils are ready $(".intl-tel-input input").intlTelInput("utilsLoaded"); }, dataType: "script", cache: true }); } }, // update the selected flag, and update the input val accordingly selectCountry: function(countryCode) { countryCode = countryCode.toLowerCase(); // check if already selected if (!this.selectedFlagInner.hasClass(countryCode)) { this._selectFlag(countryCode); this._updateDialCode(this.selectedCountryData.dialCode, false); } }, // set the input value and update the flag setNumber: function(number, addSuffix, preventConversion, isAllowedKey) { // ensure starts with plus if (!this.options.nationalMode && number.charAt(0) != "+") { number = "+" + number; } // we must update the flag first, which updates this.selectedCountryData, which is used later for formatting the number before displaying it this._updateFlagFromNumber(number); this._updateVal(number, addSuffix, preventConversion, isAllowedKey); }, // this is called when the utils are ready utilsLoaded: function() { // if autoFormat is enabled and there's an initial value in the input, then format it if (this.options.autoFormat && this.telInput.val()) { this._updateVal(this.telInput.val()); } this._updatePlaceholder(); } }; // adapted to allow public functions // using https://github.com/jquery-boilerplate/jquery-boilerplate/wiki/Extending-jQuery-Boilerplate $.fn[pluginName] = function(options) { var args = arguments; // Is the first parameter an object (options), or was omitted, // instantiate a new instance of the plugin. if (options === undefined || typeof options === "object") { return this.each(function() { if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, options)); } }); } else if (typeof options === "string" && options[0] !== "_" && options !== "init") { // If the first parameter is a string and it doesn't start // with an underscore or "contains" the `init`-function, // treat this as a call to a public method. // Cache the method call to make it possible to return a value var returns; this.each(function() { var instance = $.data(this, "plugin_" + pluginName); // Tests that there's already a plugin-instance // and checks that the requested public method exists if (instance instanceof Plugin && typeof instance[options] === "function") { // Call the method of our plugin instance, // and pass it the supplied arguments. returns = instance[options].apply(instance, Array.prototype.slice.call(args, 1)); } // Allow instances to be destroyed via the 'destroy' method if (options === "destroy") { $.data(this, "plugin_" + pluginName, null); } }); // If the earlier cached method gives a value back return the value, // otherwise return this to preserve chainability. return returns !== undefined ? returns : this; } }; /******************** * STATIC METHODS ********************/ // get the country data object $.fn[pluginName].getCountryData = function() { return allCountries; }; // Tell JSHint to ignore this warning: "character may get silently deleted by one or more browsers" // jshint -W100 // Array of country objects for the flag dropdown. // Each contains a name, country code (ISO 3166-1 alpha-2) and dial code. // Originally from https://github.com/mledoze/countries // then modified using the following JavaScript (NOW OUT OF DATE): /* var result = []; _.each(countries, function(c) { // ignore countries without a dial code if (c.callingCode[0].length) { result.push({ // var locals contains country names with localised versions in brackets n: _.findWhere(locals, { countryCode: c.cca2 }).name, i: c.cca2.toLowerCase(), d: c.callingCode[0] }); } }); JSON.stringify(result); */ // then with a couple of manual re-arrangements to be alphabetical // then changed Kazakhstan from +76 to +7 // and Vatican City from +379 to +39 (see issue 50) // and Caribean Netherlands from +5997 to +599 // and Curacao from +5999 to +599 // Removed: Åland Islands, Christmas Island, Cocos Islands, Guernsey, Isle of Man, Jersey, Kosovo, Mayotte, Pitcairn Islands, South Georgia, Svalbard, Western Sahara // Update: converted objects to arrays to save bytes! // Update: added "priority" for countries with the same dialCode as others // Update: added array of area codes for countries with the same dialCode as others // So each country array has the following information: // [ // Country name, // iso2 code, // International dial code, // Order (if >1 country with same dial code), // Area codes (if >1 country with same dial code) // ] var allCountries = [ [ "Afghanistan (‫افغانستان‬‎)", "af", "93" ], [ "Albania (Shqipëri)", "al", "355" ], [ "Algeria (‫الجزائر‬‎)", "dz", "213" ], [ "American Samoa", "as", "1684" ], [ "Andorra", "ad", "376" ], [ "Angola", "ao", "244" ], [ "Anguilla", "ai", "1264" ], [ "Antigua and Barbuda", "ag", "1268" ], [ "Argentina", "ar", "54" ], [ "Armenia (Հայաստան)", "am", "374" ], [ "Aruba", "aw", "297" ], [ "Australia", "au", "61" ], [ "Austria (Österreich)", "at", "43" ], [ "Azerbaijan (Azərbaycan)", "az", "994" ], [ "Bahamas", "bs", "1242" ], [ "Bahrain (‫البحرين‬‎)", "bh", "973" ], [ "Bangladesh (বাংলাদেশ)", "bd", "880" ], [ "Barbados", "bb", "1246" ], [ "Belarus (Беларусь)", "by", "375" ], [ "Belgium (België)", "be", "32" ], [ "Belize", "bz", "501" ], [ "Benin (Bénin)", "bj", "229" ], [ "Bermuda", "bm", "1441" ], [ "Bhutan (འབྲུག)", "bt", "975" ], [ "Bolivia", "bo", "591" ], [ "Bosnia and Herzegovina (Босна и Херцеговина)", "ba", "387" ], [ "Botswana", "bw", "267" ], [ "Brazil (Brasil)", "br", "55" ], [ "British Indian Ocean Territory", "io", "246" ], [ "British Virgin Islands", "vg", "1284" ], [ "Brunei", "bn", "673" ], [ "Bulgaria (България)", "bg", "359" ], [ "Burkina Faso", "bf", "226" ], [ "Burundi (Uburundi)", "bi", "257" ], [ "Cambodia (កម្ពុជា)", "kh", "855" ], [ "Cameroon (Cameroun)", "cm", "237" ], [ "Canada", "ca", "1", 1, [ "204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", "418", "431", "437", "438", "450", "506", "514", "519", "548", "579", "581", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905" ] ], [ "Cape Verde (Kabu Verdi)", "cv", "238" ], [ "Caribbean Netherlands", "bq", "599", 1 ], [ "Cayman Islands", "ky", "1345" ], [ "Central African Republic (République centrafricaine)", "cf", "236" ], [ "Chad (Tchad)", "td", "235" ], [ "Chile", "cl", "56" ], [ "China (中国)", "cn", "86" ], [ "Colombia", "co", "57" ], [ "Comoros (‫جزر القمر‬‎)", "km", "269" ], [ "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)", "cd", "243" ], [ "Congo (Republic) (Congo-Brazzaville)", "cg", "242" ], [ "Cook Islands", "ck", "682" ], [ "Costa Rica", "cr", "506" ], [ "Côte d’Ivoire", "ci", "225" ], [ "Croatia (Hrvatska)", "hr", "385" ], [ "Cuba", "cu", "53" ], [ "Curaçao", "cw", "599", 0 ], [ "Cyprus (Κύπρος)", "cy", "357" ], [ "Czech Republic (Česká republika)", "cz", "420" ], [ "Denmark (Danmark)", "dk", "45" ], [ "Djibouti", "dj", "253" ], [ "Dominica", "dm", "1767" ], [ "Dominican Republic (República Dominicana)", "do", "1", 2, [ "809", "829", "849" ] ], [ "Ecuador", "ec", "593" ], [ "Egypt (‫مصر‬‎)", "eg", "20" ], [ "El Salvador", "sv", "503" ], [ "Equatorial Guinea (Guinea Ecuatorial)", "gq", "240" ], [ "Eritrea", "er", "291" ], [ "Estonia (Eesti)", "ee", "372" ], [ "Ethiopia", "et", "251" ], [ "Falkland Islands (Islas Malvinas)", "fk", "500" ], [ "Faroe Islands (Føroyar)", "fo", "298" ], [ "Fiji", "fj", "679" ], [ "Finland (Suomi)", "fi", "358" ], [ "France", "fr", "33" ], [ "French Guiana (Guyane française)", "gf", "594" ], [ "French Polynesia (Polynésie française)", "pf", "689" ], [ "Gabon", "ga", "241" ], [ "Gambia", "gm", "220" ], [ "Georgia (საქართველო)", "ge", "995" ], [ "Germany (Deutschland)", "de", "49" ], [ "Ghana (Gaana)", "gh", "233" ], [ "Gibraltar", "gi", "350" ], [ "Greece (Ελλάδα)", "gr", "30" ], [ "Greenland (Kalaallit Nunaat)", "gl", "299" ], [ "Grenada", "gd", "1473" ], [ "Guadeloupe", "gp", "590", 0 ], [ "Guam", "gu", "1671" ], [ "Guatemala", "gt", "502" ], [ "Guinea (Guinée)", "gn", "224" ], [ "Guinea-Bissau (Guiné Bissau)", "gw", "245" ], [ "Guyana", "gy", "592" ], [ "Haiti", "ht", "509" ], [ "Honduras", "hn", "504" ], [ "Hong Kong (香港)", "hk", "852" ], [ "Hungary (Magyarország)", "hu", "36" ], [ "Iceland (Ísland)", "is", "354" ], [ "India (भारत)", "in", "91" ], [ "Indonesia", "id", "62" ], [ "Iran (‫ایران‬‎)", "ir", "98" ], [ "Iraq (‫العراق‬‎)", "iq", "964" ], [ "Ireland", "ie", "353" ], [ "Israel (‫ישראל‬‎)", "il", "972" ], [ "Italy (Italia)", "it", "39", 0 ], [ "Jamaica", "jm", "1876" ], [ "Japan (日本)", "jp", "81" ], [ "Jordan (‫الأردن‬‎)", "jo", "962" ], [ "Kazakhstan (Казахстан)", "kz", "7", 1 ], [ "Kenya", "ke", "254" ], [ "Kiribati", "ki", "686" ], [ "Kuwait (‫الكويت‬‎)", "kw", "965" ], [ "Kyrgyzstan (Кыргызстан)", "kg", "996" ], [ "Laos (ລາວ)", "la", "856" ], [ "Latvia (Latvija)", "lv", "371" ], [ "Lebanon (‫لبنان‬‎)", "lb", "961" ], [ "Lesotho", "ls", "266" ], [ "Liberia", "lr", "231" ], [ "Libya (‫ليبيا‬‎)", "ly", "218" ], [ "Liechtenstein", "li", "423" ], [ "Lithuania (Lietuva)", "lt", "370" ], [ "Luxembourg", "lu", "352" ], [ "Macau (澳門)", "mo", "853" ], [ "Macedonia (FYROM) (Македонија)", "mk", "389" ], [ "Madagascar (Madagasikara)", "mg", "261" ], [ "Malawi", "mw", "265" ], [ "Malaysia", "my", "60" ], [ "Maldives", "mv", "960" ], [ "Mali", "ml", "223" ], [ "Malta", "mt", "356" ], [ "Marshall Islands", "mh", "692" ], [ "Martinique", "mq", "596" ], [ "Mauritania (‫موريتانيا‬‎)", "mr", "222" ], [ "Mauritius (Moris)", "mu", "230" ], [ "Mexico (México)", "mx", "52" ], [ "Micronesia", "fm", "691" ], [ "Moldova (Republica Moldova)", "md", "373" ], [ "Monaco", "mc", "377" ], [ "Mongolia (Монгол)", "mn", "976" ], [ "Montenegro (Crna Gora)", "me", "382" ], [ "Montserrat", "ms", "1664" ], [ "Morocco (‫المغرب‬‎)", "ma", "212" ], [ "Mozambique (Moçambique)", "mz", "258" ], [ "Myanmar (Burma) (မြန်မာ)", "mm", "95" ], [ "Namibia (Namibië)", "na", "264" ], [ "Nauru", "nr", "674" ], [ "Nepal (नेपाल)", "np", "977" ], [ "Netherlands (Nederland)", "nl", "31" ], [ "New Caledonia (Nouvelle-Calédonie)", "nc", "687" ], [ "New Zealand", "nz", "64" ], [ "Nicaragua", "ni", "505" ], [ "Niger (Nijar)", "ne", "227" ], [ "Nigeria", "ng", "234" ], [ "Niue", "nu", "683" ], [ "Norfolk Island", "nf", "672" ], [ "North Korea (조선 민주주의 인민 공화국)", "kp", "850" ], [ "Northern Mariana Islands", "mp", "1670" ], [ "Norway (Norge)", "no", "47" ], [ "Oman (‫عُمان‬‎)", "om", "968" ], [ "Pakistan (‫پاکستان‬‎)", "pk", "92" ], [ "Palau", "pw", "680" ], [ "Palestine (‫فلسطين‬‎)", "ps", "970" ], [ "Panama (Panamá)", "pa", "507" ], [ "Papua New Guinea", "pg", "675" ], [ "Paraguay", "py", "595" ], [ "Peru (Perú)", "pe", "51" ], [ "Philippines", "ph", "63" ], [ "Poland (Polska)", "pl", "48" ], [ "Portugal", "pt", "351" ], [ "Puerto Rico", "pr", "1", 3, [ "787", "939" ] ], [ "Qatar (‫قطر‬‎)", "qa", "974" ], [ "Réunion (La Réunion)", "re", "262" ], [ "Romania (România)", "ro", "40" ], [ "Russia (Россия)", "ru", "7", 0 ], [ "Rwanda", "rw", "250" ], [ "Saint Barthélemy (Saint-Barthélemy)", "bl", "590", 1 ], [ "Saint Helena", "sh", "290" ], [ "Saint Kitts and Nevis", "kn", "1869" ], [ "Saint Lucia", "lc", "1758" ], [ "Saint Martin (Saint-Martin (partie française))", "mf", "590", 2 ], [ "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)", "pm", "508" ], [ "Saint Vincent and the Grenadines", "vc", "1784" ], [ "Samoa", "ws", "685" ], [ "San Marino", "sm", "378" ], [ "São Tomé and Príncipe (São Tomé e Príncipe)", "st", "239" ], [ "Saudi Arabia (‫المملكة العربية السعودية‬‎)", "sa", "966" ], [ "Senegal (Sénégal)", "sn", "221" ], [ "Serbia (Србија)", "rs", "381" ], [ "Seychelles", "sc", "248" ], [ "Sierra Leone", "sl", "232" ], [ "Singapore", "sg", "65" ], [ "Sint Maarten", "sx", "1721" ], [ "Slovakia (Slovensko)", "sk", "421" ], [ "Slovenia (Slovenija)", "si", "386" ], [ "Solomon Islands", "sb", "677" ], [ "Somalia (Soomaaliya)", "so", "252" ], [ "South Africa", "za", "27" ], [ "South Korea (대한민국)", "kr", "82" ], [ "South Sudan (‫جنوب السودان‬‎)", "ss", "211" ], [ "Spain (España)", "es", "34" ], [ "Sri Lanka (ශ්‍රී ලංකාව)", "lk", "94" ], [ "Sudan (‫السودان‬‎)", "sd", "249" ], [ "Suriname", "sr", "597" ], [ "Swaziland", "sz", "268" ], [ "Sweden (Sverige)", "se", "46" ], [ "Switzerland (Schweiz)", "ch", "41" ], [ "Syria (‫سوريا‬‎)", "sy", "963" ], [ "Taiwan (台灣)", "tw", "886" ], [ "Tajikistan", "tj", "992" ], [ "Tanzania", "tz", "255" ], [ "Thailand (ไทย)", "th", "66" ], [ "Timor-Leste", "tl", "670" ], [ "Togo", "tg", "228" ], [ "Tokelau", "tk", "690" ], [ "Tonga", "to", "676" ], [ "Trinidad and Tobago", "tt", "1868" ], [ "Tunisia (‫تونس‬‎)", "tn", "216" ], [ "Turkey (Türkiye)", "tr", "90" ], [ "Turkmenistan", "tm", "993" ], [ "Turks and Caicos Islands", "tc", "1649" ], [ "Tuvalu", "tv", "688" ], [ "U.S. Virgin Islands", "vi", "1340" ], [ "Uganda", "ug", "256" ], [ "Ukraine (Україна)", "ua", "380" ], [ "United Arab Emirates (‫الإمارات العربية المتحدة‬‎)", "ae", "971" ], [ "United Kingdom", "gb", "44" ], [ "United States", "us", "1", 0 ], [ "Uruguay", "uy", "598" ], [ "Uzbekistan (Oʻzbekiston)", "uz", "998" ], [ "Vanuatu", "vu", "678" ], [ "Vatican City (Città del Vaticano)", "va", "39", 1 ], [ "Venezuela", "ve", "58" ], [ "Vietnam (Việt Nam)", "vn", "84" ], [ "Wallis and Futuna", "wf", "681" ], [ "Yemen (‫اليمن‬‎)", "ye", "967" ], [ "Zambia", "zm", "260" ], [ "Zimbabwe", "zw", "263" ] ]; // loop over all of the countries above for (var i = 0; i < allCountries.length; i++) { var c = allCountries[i]; allCountries[i] = { name: c[0], iso2: c[1], dialCode: c[2], priority: c[3] || 0, areaCodes: c[4] || null }; } });
src/js/components/Services/ServiceTabs.js
hadnazzar/ModernBusinessBootstrap-ReactComponent
import React from 'react'; export default class Body extends React.Component { render() { return( <div class="container"> <div class="row"> <div class="col-lg-12"> <h2 class="page-header">Service Tabs</h2> </div> <div class="col-lg-12"> <ul id="myTab" class="nav nav-tabs nav-justified"> <li class="active"><a href="#service-one" data-toggle="tab"><i class="fa fa-tree"></i> Service One</a> </li> <li class=""><a href="#service-two" data-toggle="tab"><i class="fa fa-car"></i> Service Two</a> </li> <li class=""><a href="#service-three" data-toggle="tab"><i class="fa fa-support"></i> Service Three</a> </li> <li class=""><a href="#service-four" data-toggle="tab"><i class="fa fa-database"></i> Service Four</a> </li> </ul> <div id="myTabContent" class="tab-content"> <div class="tab-pane fade active in" id="service-one"> <h4>Service One</h4> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae repudiandae fugiat illo cupiditate excepturi esse officiis consectetur, laudantium qui voluptatem. Ad necessitatibus velit, accusantium expedita debitis impedit rerum totam id. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus quibusdam recusandae illum, nesciunt, architecto, saepe facere, voluptas eum incidunt dolores magni itaque autem neque velit in. At quia quaerat asperiores.</p> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae repudiandae fugiat illo cupiditate excepturi esse officiis consectetur, laudantium qui voluptatem. Ad necessitatibus velit, accusantium expedita debitis impedit rerum totam id. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus quibusdam recusandae illum, nesciunt, architecto, saepe facere, voluptas eum incidunt dolores magni itaque autem neque velit in. At quia quaerat asperiores.</p> </div> <div class="tab-pane fade" id="service-two"> <h4>Service Two</h4> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae repudiandae fugiat illo cupiditate excepturi esse officiis consectetur, laudantium qui voluptatem. Ad necessitatibus velit, accusantium expedita debitis impedit rerum totam id. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus quibusdam recusandae illum, nesciunt, architecto, saepe facere, voluptas eum incidunt dolores magni itaque autem neque velit in. At quia quaerat asperiores.</p> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae repudiandae fugiat illo cupiditate excepturi esse officiis consectetur, laudantium qui voluptatem. Ad necessitatibus velit, accusantium expedita debitis impedit rerum totam id. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus quibusdam recusandae illum, nesciunt, architecto, saepe facere, voluptas eum incidunt dolores magni itaque autem neque velit in. At quia quaerat asperiores.</p> </div> <div class="tab-pane fade" id="service-three"> <h4>Service Three</h4> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae repudiandae fugiat illo cupiditate excepturi esse officiis consectetur, laudantium qui voluptatem. Ad necessitatibus velit, accusantium expedita debitis impedit rerum totam id. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus quibusdam recusandae illum, nesciunt, architecto, saepe facere, voluptas eum incidunt dolores magni itaque autem neque velit in. At quia quaerat asperiores.</p> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae repudiandae fugiat illo cupiditate excepturi esse officiis consectetur, laudantium qui voluptatem. Ad necessitatibus velit, accusantium expedita debitis impedit rerum totam id. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus quibusdam recusandae illum, nesciunt, architecto, saepe facere, voluptas eum incidunt dolores magni itaque autem neque velit in. At quia quaerat asperiores.</p> </div> <div class="tab-pane fade" id="service-four"> <h4>Service Four</h4> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae repudiandae fugiat illo cupiditate excepturi esse officiis consectetur, laudantium qui voluptatem. Ad necessitatibus velit, accusantium expedita debitis impedit rerum totam id. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus quibusdam recusandae illum, nesciunt, architecto, saepe facere, voluptas eum incidunt dolores magni itaque autem neque velit in. At quia quaerat asperiores.</p> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae repudiandae fugiat illo cupiditate excepturi esse officiis consectetur, laudantium qui voluptatem. Ad necessitatibus velit, accusantium expedita debitis impedit rerum totam id. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Natus quibusdam recusandae illum, nesciunt, architecto, saepe facere, voluptas eum incidunt dolores magni itaque autem neque velit in. At quia quaerat asperiores.</p> </div> </div> </div> </div> </div> ); } }
test/dom-map-view-spec.js
AbdulMuhsinSE/mapjs
/*global MAPJS, jQuery, describe, it, beforeEach, afterEach, _, expect, navigator, jasmine, Color, spyOn, observable, window*/ describe('innerText', function () { 'use strict'; var underTest; beforeEach(function () { jQuery.fn.innerText.check = false; underTest = jQuery('<span></span>').appendTo('body'); spyOn(jQuery.fn, 'text').and.callThrough(); }); afterEach(function () { underTest.detach(); }); it('executes using .text if content does not contain BR elements', function () { underTest.html('does\nthis\nhave\nbreaks'); expect(underTest.innerText()).toEqual('does\nthis\nhave\nbreaks'); expect(jQuery.fn.text).toHaveBeenCalledOnJQueryObject(underTest); }); it('removes html tags and replaces BR with newlines if content contains BR elements (broken firefox contenteditable)', function () { underTest.html('does<br>this<br/>ha<a href="">ve</a><br>breaks'); expect(underTest.innerText()).toEqual('does\nthis\nhave\nbreaks'); expect(jQuery.fn.text).not.toHaveBeenCalledOnJQueryObject(underTest); }); it('removes html tags and replaces divs with newlines if content contains div elements (broken safari contenteditable)', function () { underTest.html('does<div>this</div><div>ha<a href="">ve</a></div>breaks and spaces'); expect(underTest.innerText()).toEqual('does\nthis\nhave\nbreaks and spaces'); expect(jQuery.fn.text).not.toHaveBeenCalledOnJQueryObject(underTest); }); }); describe('updateStage', function () { 'use strict'; var stage, second; beforeEach(function () { stage = jQuery('<div>').appendTo('body'); second = jQuery('<div>').appendTo('body'); }); afterEach(function () { stage.remove(); second.remove(); }); it('applies width and height by adding subtracting offset from data width', function () { stage.data({width: 200, height: 100, offsetX: 50, offsetY: 10}).updateStage(); expect(stage.css('width')).toBe('150px'); expect(stage.css('min-width')).toBe('150px'); expect(stage.css('height')).toBe('90px'); expect(stage.css('min-height')).toBe('90px'); }); it('translates by offsetX, offsetY if scale is 1', function () { /* different browsers report transformations differently so we transform an element and compare css */ stage.data({width: 200, height: 100, offsetX: 50, offsetY: 10, scale: 1}).updateStage(); second.css({'width': '100px', 'height': '200px', 'transform': 'translate(50px,10px)'}); expect(stage.css('transform')).toEqual(second.css('transform')); second.remove(); }); it('scales then transforms', function () { stage.data({width: 200, height: 100, offsetX: 50, offsetY: 10, scale: 2}).updateStage(); second.css({'transform-origin': 'top left', 'width': '100px', 'height': '200px', 'transform': 'scale(2) translate(50px,10px)'}); expect(stage.css('transform')).toEqual(second.css('transform')); expect(stage.css('transform-origin')).toEqual(second.css('transform-origin')); }); it('rounds coordinates for performance', function () { stage.data({width: 137.33, height: 100.34, offsetX: 50.21, offsetY: 10.93, scale: 1}).updateStage(); second.css({'width': '137px', 'height': '100px', 'transform': 'translate(50px,11px)'}); expect(stage.css('transform')).toEqual(second.css('transform')); expect(stage.css('width')).toEqual('87px'); expect(stage.css('min-width')).toEqual('87px'); expect(stage.css('height')).toEqual('89px'); expect(stage.css('min-height')).toEqual('89px'); }); }); describe('getBox', function () { 'use strict'; var underTest; beforeEach(function () { underTest = jQuery('<div>').appendTo('body').css({ position: 'absolute', top: '200px', left: '300px', width: '150px', height: '20px' }); }); afterEach(function () { underTest.remove(); }); it('retrieves offset box from a DOM element', function () { expect(underTest.getBox()).toEqual({ top: 200, left: 300, width: 150, height: 20 }); }); it('retrieves the offset box from the first element of a jQuery selector', function () { var another = jQuery('<div>'); expect(underTest.add(another).getBox()).toEqual({ top: 200, left: 300, width: 150, height: 20 }); }); it('returns false if selector is empty', function () { expect(jQuery('#non-existent').getBox()).toBeFalsy(); }); }); describe('getDataBox', function () { 'use strict'; var underTest, stage; beforeEach(function () { stage = jQuery('<div>').appendTo('body'); underTest = jQuery('<div>').appendTo(stage).css({ position: 'absolute', top: '200px', left: '300px', width: '150px', height: '20px' }).data({ x: 11, y: 12, width: 13, height: 14 }); }); afterEach(function () { underTest.remove(); stage.remove(); }); it('retrieves a pre-calculated box from data attributes if they are present', function () { expect(underTest.getDataBox()).toEqual({ left: 11, top: 12, width: 13, height: 14 }); }); it('ignores stage offset and zoom', function () { stage.data({'offsetX': 200, 'offsetY': 300, 'scale': 2}); expect(underTest.getDataBox()).toEqual({ left: 11, top: 12, width: 13, height: 14 }); }); _.each(['width', 'height'], function (attrib) { it('falls back to DOM boxing if data attribute ' + attrib + ' is not present', function () { underTest.data(attrib, ''); expect(underTest.getDataBox()).toEqual({ top: 200, left: 300, width: 150, height: 20 }); }); }); it('returns false if selector is empty', function () { expect(jQuery('#non-existent').getDataBox()).toBeFalsy(); }); }); describe('editNode', function () { 'use strict'; var textBox, node, resolved, rejected; beforeEach(function () { node = jQuery('<div>').data('title', 'some title').appendTo('body'); textBox = jQuery('<div>').attr('data-mapjs-role', 'title').text('some old text').appendTo(node); spyOn(jQuery.fn, 'focus').and.callThrough(); spyOn(jQuery.fn, 'shadowDraggable').and.callThrough(); resolved = jasmine.createSpy('resolved'); rejected = jasmine.createSpy('rejected'); node.editNode().then(resolved, rejected); }); it('makes the text box content editable', function () { expect(textBox.attr('contenteditable')).toBeTruthy(); }); it('fills the text box with the data title attribute', function () { expect(textBox.text()).toEqual('some title'); }); describe('break word control', function () { it('sets the word break to break-all if the original title is different from the text in the box - this is to avoid long text normally hidden (eg links) messing up the layuot', function () { expect(textBox.css('word-break')).toBe('break-all'); }); it('clears the word break when the editing is completed', function () { textBox.trigger('blur'); // complete previous edit expect(textBox).not.toHaveOwnStyle('word-break'); }); it('clears the word break when the editing is canceled', function () { textBox.trigger(jQuery.Event('keydown', { which: 27 })); expect(textBox).not.toHaveOwnStyle('word-break'); }); it('does not set the word break if the original title and the node text are the same', function () { textBox.trigger('blur'); // complete previous edit textBox.text('some title'); node.editNode(); expect(textBox).not.toHaveOwnStyle('word-break'); }); }); it('focuses on the text box', function () { expect(jQuery.fn.focus).toHaveBeenCalledOnJQueryObject(textBox); }); it('deactivates dragging on the node', function () { expect(jQuery.fn.shadowDraggable).toHaveBeenCalledOnJQueryObject(node); expect(jQuery.fn.shadowDraggable).toHaveBeenCalledWith({disable: true}); }); it('puts the caret at the end of the textbox', function () { var selection = window.getSelection(); expect(selection.type).toEqual('Caret'); expect(selection.baseOffset).toEqual(10); expect(selection.extentOffset).toEqual(10); expect(selection.baseNode.parentElement).toEqual(textBox[0]); expect(selection.extentNode.parentElement).toEqual(textBox[0]); }); it('does not resolve or reject the promise immediately', function () { expect(resolved).not.toHaveBeenCalled(); expect(rejected).not.toHaveBeenCalled(); }); describe('event processing', function () { beforeEach(function () { textBox.text('changed text'); }); it('completes editing when focus is lost', function () { textBox.trigger('blur'); expect(textBox.attr('contenteditable')).toBeFalsy(); expect(resolved).toHaveBeenCalledWith('changed text'); }); it('consumes multi-line text', function () { textBox.html('changed\ntext'); textBox.trigger('blur'); expect(resolved).toHaveBeenCalledWith('changed\ntext'); }); it('consumes broken firefox contenteditable multi-line text', function () { textBox.html('changed<br>text'); textBox.trigger('blur'); expect(resolved).toHaveBeenCalledWith('changed\ntext'); }); it('converts text box content to text using innerText', function () { spyOn(jQuery.fn, 'innerText').and.returnValue('hello there'); textBox.trigger('blur'); expect(resolved).toHaveBeenCalledWith('hello there'); }); it('reactivates dragging when focus is lost', function () { node.attr('mapjs-level', 2); jQuery.fn.shadowDraggable.calls.reset(); textBox.trigger('blur'); expect(jQuery.fn.shadowDraggable).toHaveBeenCalledOnJQueryObject(node); expect(jQuery.fn.shadowDraggable.calls.mostRecent().args).toEqual([]); }); it('completes editing when enter is pressed and prevents further keydown event propagation', function () { var event = jQuery.Event('keydown', { which: 13 }); textBox.trigger(event); expect(textBox.attr('contenteditable')).toBeFalsy(); expect(resolved).toHaveBeenCalledWith('changed text'); expect(event.isPropagationStopped()).toBeTruthy(); }); it('completes editing when tab is pressed, prevents the default to avoid focusing out, but does not prevents event propagation so stage can add a new node', function () { var event = jQuery.Event('keydown', { which: 9 }); textBox.trigger(event); expect(textBox.attr('contenteditable')).toBeFalsy(); expect(resolved).toHaveBeenCalledWith('changed text'); expect(event.isPropagationStopped()).toBeFalsy(); expect(event.isDefaultPrevented()).toBeTruthy(); }); it('does not complete editing or prevent propagation if shift+enter is pressed - instead it lets the document handle the line break', function () { var event = jQuery.Event('keydown', { which: 13, shiftKey: true }); textBox.trigger(event); expect(textBox.attr('contenteditable')).toBeTruthy(); expect(resolved).not.toHaveBeenCalled(); expect(event.isPropagationStopped()).toBeFalsy(); }); it('cancels editing when escape is pressed, restoring original text and stops event propagation', function () { var event = jQuery.Event('keydown', { which: 27 }); textBox.trigger(event); expect(textBox.attr('contenteditable')).toBeFalsy(); expect(rejected).toHaveBeenCalled(); expect(event.isPropagationStopped()).toBeTruthy(); expect(textBox.text()).toBe('some old text'); }); it('cancels editing if the text is not modified, even if the user did not press escape', function () { textBox.text('some title').trigger('blur'); expect(textBox.attr('contenteditable')).toBeFalsy(); expect(rejected).toHaveBeenCalled(); expect(textBox.text()).toBe('some old text'); }); _.each(['ctrl', 'meta'], function (specialKey) { it('stops editing but lets events propagate when ' + specialKey + ' +s is pressed so map can be saved', function () { var options, event; options = { which: 83 }; options[specialKey + 'Key'] = true; event = jQuery.Event('keydown', options); textBox.trigger(event); expect(textBox.attr('contenteditable')).toBeFalsy(); expect(resolved).toHaveBeenCalledWith('changed text'); expect(event.isPropagationStopped()).toBeFalsy(); expect(event.isDefaultPrevented()).toBeTruthy(); }); it('does not cancel editing if text has changed and ' + specialKey + '+z pressed, but cancels propagation so the map does not get this keyclick as well', function () { var options, event; options = { which: 90 }; options[specialKey + 'Key'] = true; event = jQuery.Event('keydown', options); textBox.trigger(event); expect(textBox.attr('contenteditable')).toBeTruthy(); expect(rejected).not.toHaveBeenCalled(); expect(resolved).not.toHaveBeenCalled(); expect(event.isPropagationStopped()).toBeTruthy(); }); it('cancels editing if text has not changed and ' + specialKey + '+z pressed, also cancels propagation so the map does not get this keyclick as well', function () { var options, event; options = { which: 90 }; options[specialKey + 'Key'] = true; textBox.text('some title'); event = jQuery.Event('keydown', options); textBox.trigger(event); expect(textBox.attr('contenteditable')).toBeFalsy(); expect(rejected).toHaveBeenCalled(); expect(event.isPropagationStopped()).toBeTruthy(); }); }); }); afterEach(function () { node.remove(); }); }); describe('animateConnectorToPosition', function () { 'use strict'; var from, to, connector; beforeEach(function () { from = jQuery('<div>').attr('id', 'fromC').appendTo('body').css({position: 'absolute', width: 50, height: 60, left: 70, top: 80}).data({width: 50, height: 60, x: 70, y: 80}); to = jQuery('<div>').attr('id', 'toC').appendTo('body').css({position: 'absolute', width: 90, height: 100, left: 110, top: 120}).data({width: 90, height: 100, x: 110, y: 120}); connector = jQuery('<div>').data({'nodeFrom': from, 'nodeTo': to}).appendTo('body'); spyOn(jQuery.fn, 'animate').and.callThrough(); }); afterEach(function () { from.add(to).add(connector).remove(); }); describe('optimises connector transformations to simple animations if possible', function () { it('when dataBox and real dom boxes for connecting element have just moved by the same offset', function () { from.data('x', from.data('x') + 20); from.data('y', from.data('y') + 30); to.data('x', to.data('x') + 20); to.data('y', to.data('y') + 30); var result = connector.animateConnectorToPosition({ duration : 230, queue : 'animQueue' }); expect(result).toBeTruthy(); expect(jQuery.fn.animate).toHaveBeenCalledWith({ left : 90, top : 110 }, { duration : 230, queue : 'animQueue'}); }); it('when the movement difference is less than threshold (to avoid small rounding errors)', function () { from.data('x', from.data('x') + 22); from.data('y', from.data('y') + 30); to.data('x', to.data('x') + 20); to.data('y', to.data('y') + 33); var result = connector.animateConnectorToPosition({ duration : 230, queue : 'animQueue' }, 5); expect(result).toBeTruthy(); expect(jQuery.fn.animate).toHaveBeenCalledWith({ left : 92, top : 110 }, { duration : 230, queue : 'animQueue'}); }); it('rounds the coordinates to avoid performance problems', function () { from.data('x', from.data('x') + 20.1); from.data('y', from.data('y') + 30.3); to.data('x', to.data('x') + 20.3); to.data('y', to.data('y') + 30.1); var result = connector.animateConnectorToPosition({ duration : 230, queue : 'animQueue' }); expect(result).toBeTruthy(); expect(jQuery.fn.animate).toHaveBeenCalledWith({ left : 90, top : 110 }, { duration : 230, queue : 'animQueue'}); }); }); describe('returns false and does not schedule animations if box differences are nor resolvable using simple translation', function () { it('when orientation changes', function () { var fromData = _.clone(from.data()), result; from.data(to.data()); to.data(fromData); result = connector.animateConnectorToPosition(); expect(result).toBeFalsy(); expect(jQuery.fn.animate).not.toHaveBeenCalled(); }); _.each(['fromC', 'toC'], function (changeId) { _.each(['width', 'height', 'x', 'y'], function (attrib) { it('when node boxes change independently (' + changeId + ' ' + attrib, function () { var changeOb = jQuery('#' + changeId), result; changeOb.data(attrib, changeOb.data(attrib) + 5.1); result = connector.animateConnectorToPosition({}, 5); expect(result).toBeFalsy(); expect(jQuery.fn.animate).not.toHaveBeenCalled(); }); }); }); }); }); describe('updateConnector', function () { 'use strict'; var underTest, fromNode, toNode, third, anotherConnector; beforeEach(function () { fromNode = jQuery('<div>').attr('id', 'node_fr').css({ position: 'absolute', top: '100px', left: '200px', width: '100px', height: '40px'}).appendTo('body'); toNode = jQuery('<div>').attr('id', 'node_to').css({ position: 'absolute', top: '220px', left: '330px', width: '12px', height: '44px'}).appendTo('body'); underTest = MAPJS.createSVG().appendTo('body').attr('data-role', 'test-connector').css('position', 'absolute').data({'nodeFrom': fromNode, 'nodeTo': toNode}); third = jQuery('<div>').attr('id', 'node_third').css({ position: 'absolute', top: '330px', left: '220px', width: '119px', height: '55px'}).appendTo('body'); anotherConnector = MAPJS.createSVG().appendTo('body').attr('data-role', 'test-connector').css('position', 'absolute').data({'nodeFrom': fromNode, 'nodeTo': third}); }); it('returns itself for chaining', function () { expect(underTest.updateConnector()[0]).toEqual(underTest[0]); }); it('draws a cubic curve between the centers of two nodes', function () { underTest.updateConnector(); var path = underTest.find('path'); expect(path.length).toBe(1); expect(path.attr('class')).toEqual('mapjs-connector'); expect(path.attr('d')).toEqual('M50,20Q50,202 130,142'); }); it('positions the connector to the upper left edge of the nodes, and expands it to the bottom right edge of the nodes', function () { underTest.updateConnector(); expect(underTest.css('top')).toEqual('100px'); expect(underTest.css('left')).toEqual('200px'); expect(underTest.css('height')).toEqual('164px'); expect(underTest.css('width')).toEqual('142px'); }); it('updates the existing curve if one is present', function () { var path = MAPJS.createSVG('path').appendTo(underTest); underTest.updateConnector(); expect(underTest.find('path').length).toBe(1); expect(underTest.find('path')[0]).toEqual(path[0]); }); it('updates multiple connectors at once', function () { jQuery('[data-role=test-connector]').updateConnector(); expect(underTest.find('path').attr('d')).toEqual('M50,20Q50,202 130,142'); expect(anotherConnector.find('path').attr('d')).toEqual('M50,20Q50,318 20,258'); }); describe('performance optimisations', function () { it('rounds coordinates', function () { anotherConnector.updateConnector(); expect(anotherConnector.find('path').attr('d')).toEqual('M50,20Q50,318 20,258'); }); it('will not update if the shapes have not moved', function () { underTest.updateConnector(); underTest.find('path').attr('d', ''); underTest.updateConnector(); expect(underTest.find('path').attr('d')).toBe(''); }); it('will update if the shapes move', function () { underTest.updateConnector(); underTest.find('path').attr('d', ''); fromNode.css('top', '50px'); underTest.updateConnector(); expect(underTest.find('path').attr('d')).toBe('M50,20Q50,252 130,192'); }); }); it('does not die if one of the shapes is no longer present', function () { fromNode.remove(); underTest.updateConnector(); }); it('does not die if nodeFrom gets cleared out', function () { underTest.data('nodeFrom', false); underTest.updateLink(); expect(underTest.is(':visible')).toBeFalsy(); }); it('does not die if nodeTo gets cleared out', function () { underTest.data('nodeTo', false); underTest.updateLink(); expect(underTest.is(':visible')).toBeFalsy(); }); afterEach(function () { fromNode.remove(); toNode.remove(); underTest.remove(); third.remove(); anotherConnector.remove(); }); }); describe('updateLink', function () { 'use strict'; var underTest, fromNode, toNode, third, anotherLink; beforeEach(function () { fromNode = jQuery('<div>').attr('id', 'node_fr').css({ position: 'absolute', top: '100px', left: '200px', width: '100px', height: '40px'}).appendTo('body'); toNode = jQuery('<div>').attr('id', 'node_to').css({ position: 'absolute', top: '220px', left: '330px', width: '12px', height: '44px'}).appendTo('body'); underTest = MAPJS.createSVG().appendTo('body').attr('data-role', 'test-link').css('position', 'absolute').data({'nodeFrom': fromNode, 'nodeTo': toNode}); third = jQuery('<div>').attr('id', 'node_third').css({ position: 'absolute', top: '330px', left: '220px', width: '119px', height: '55px'}).appendTo('body'); anotherLink = MAPJS.createSVG().appendTo('body').attr('data-role', 'test-link').css('position', 'absolute').data({'nodeFrom': fromNode, 'nodeTo': third}); }); it('returns itself for chaining', function () { expect(underTest.updateLink()[0]).toEqual(underTest[0]); }); it('draws a straight between the borders of two nodes', function () { underTest.updateLink(); var path = underTest.find('path'); expect(path.length).toBe(2); expect(path.filter('.mapjs-link').attr('d')).toEqual('M100,20L136,120'); expect(path.filter('.mapjs-link-hit').attr('d')).toEqual('M100,20L136,120'); }); it('positions the link to the upper left edge of the nodes, and expands it to the bottom right edge of the nodes', function () { underTest.updateLink(); expect(underTest.css('top')).toEqual('100px'); expect(underTest.css('left')).toEqual('200px'); expect(underTest.css('height')).toEqual('164px'); expect(underTest.css('width')).toEqual('142px'); }); it('uses the lineStyle data attribute to control the dashed styling', function () { underTest.data('lineStyle', 'dashed').updateLink(); expect(underTest.find('path.mapjs-link').attr('stroke-dasharray')).toBe('8, 8'); }); it('clears the dashes if not provided in the lineStyle data attribute', function () { underTest.find('path').attr('stroke-dasharray', '1, 1'); underTest.data('lineStyle', '').updateLink(); expect(underTest.find('path.mapjs-link').attr('stroke-dasharray')).toBeFalsy(); }); it('uses the color attribute to set the line stroke', function () { /*jslint newcap:true*/ underTest.data('color', 'blue').updateLink(); // chrome and phantom return different forms for the same color, so explicit hex needed to make test repeatable expect(Color(underTest.find('path.mapjs-link').css('stroke')).hexString()).toBe('#0000FF'); }); it('updates the existing line if one is present', function () { var path = MAPJS.createSVG('path').attr('class', 'mapjs-link').appendTo(underTest); underTest.updateLink(); expect(underTest.find('path.mapjs-link').length).toBe(1); expect(underTest.find('path.mapjs-link')[0]).toEqual(path[0]); }); it('uses the arrow data attribute to draw an arrow', function () { underTest.data('arrow', 'true').updateLink(); expect(underTest.find('path.mapjs-arrow').css('display')).toBe('inline'); }); it('updates an existing arrow if one is present', function () { var path = MAPJS.createSVG('path').attr('class', 'mapjs-arrow').appendTo(underTest); underTest.data('arrow', 'true').updateLink(); expect(underTest.find('path.mapjs-arrow').length).toBe(1); expect(underTest.find('path.mapjs-arrow')[0]).toEqual(path[0]); }); it('uses the color attribute to set the arrow fill', function () { /*jslint newcap:true*/ underTest.data('arrow', 'true').data('color', '#FF7577').updateLink(); // chrome and phantom return different forms for the same color, so explicit hex needed to make test repeatable expect(Color(underTest.find('path.mapjs-arrow').css('fill')).hexString()).toBe('#FF7577'); }); it('hides an existing arrow when the attribute is no longer present', function () { MAPJS.createSVG('path').attr('class', 'mapjs-arrow').appendTo(underTest); underTest.updateLink(); expect(underTest.find('path.mapjs-arrow').css('display')).toBe('none'); }); it('updates multiple links at once', function () { jQuery('[data-role=test-link]').updateLink(); expect(underTest.find('path').attr('d')).toEqual('M100,20L136,120'); expect(anotherLink.find('path').attr('d')).toEqual('M50,40L80,230'); }); it('does not die if one of the shapes is no longer present', function () { fromNode.remove(); underTest.updateLink(); }); it('does not die if nodeFrom gets cleared out', function () { underTest.data('nodeFrom', false); underTest.updateLink(); expect(underTest.is(':visible')).toBeFalsy(); }); it('does not die if nodeTo gets cleared out', function () { underTest.data('nodeTo', false); underTest.updateLink(); expect(underTest.is(':visible')).toBeFalsy(); }); describe('performance optimisations', function () { it('rounds coordinates', function () { anotherLink.data('arrow', 'true').updateLink(); expect(anotherLink.find('path.mapjs-link').attr('d')).toEqual('M50,40L80,230'); expect(anotherLink.find('path.mapjs-arrow').attr('d')).toEqual('M82,216L80,230L73,218Z'); }); it('will not update if the shapes have not moved and attributes have not changed', function () { underTest.updateLink(); underTest.find('path').attr('d', ''); underTest.updateLink(); expect(underTest.find('path').attr('d')).toBe(''); }); it('will update if the shapes move', function () { underTest.updateLink(); underTest.find('path').attr('d', ''); fromNode.css('top', '50px'); underTest.updateLink(); expect(underTest.find('path').attr('d')).toBe('M100,20L136,170'); }); it('will update if the attributes change', function () { underTest.updateLink(); underTest.find('path').attr('d', ''); underTest.data('lineStyle', 'solid').updateLink(); expect(underTest.find('path').attr('d')).toBe('M100,20L136,120'); }); }); afterEach(function () { fromNode.remove(); toNode.remove(); underTest.remove(); third.remove(); anotherLink.remove(); }); }); describe('updateNodeContent', function () { 'use strict'; var underTest, nodeContent, style, isHeadless = function () { return (navigator.userAgent.indexOf('PhantomJS') !== -1); }; beforeEach(function () { style = jQuery('<style type="text/css"> .test-padding { padding: 5px;} .test-max-width { max-width:160px; display: block }</style>').appendTo('head'); underTest = jQuery('<span>').appendTo('body'); nodeContent = { title: 'Hello World!', level: 3, x: 10, y: 20, width: 30, height: 40 }; }); afterEach(function () { underTest.remove(); style.remove(); }); it('returns itself to allow chaining', function () { expect(underTest.updateNodeContent(nodeContent)[0]).toEqual(underTest[0]); }); describe('dimensions', function () { it('sets the x, y, width, height properties according to node values', function () { underTest.updateNodeContent(nodeContent); expect(underTest.data('x')).toBe(10); expect(underTest.data('y')).toBe(20); expect(underTest.data('width')).toBe(30); expect(underTest.data('height')).toBe(40); }); it('rounds x, y, width and height to improve performance', function () { nodeContent = {id: '12', title: 'zeka', x: 10.02, y: 19.99, width: 30.2, height: 40.3}; underTest.updateNodeContent(nodeContent); expect(underTest.data('x')).toBe(10); expect(underTest.data('y')).toBe(20); expect(underTest.data('width')).toBe(30); expect(underTest.data('height')).toBe(40); }); it('tags the node with a cache mark', function () { underTest.updateNodeContent(nodeContent); expect(underTest.data('nodeCacheMark')).toEqual({ level: 3, title : 'Hello World!', icon : undefined, collapsed : undefined }); }); }); describe('node text', function () { it('sets the node title as the DOM span text', function () { underTest.updateNodeContent(nodeContent); expect(underTest.find('[data-mapjs-role=title]').text()).toEqual(nodeContent.title); }); it('sets the node title as the data attribute', function () { underTest.updateNodeContent(nodeContent); expect(underTest.data('title')).toEqual(nodeContent.title); }); it('reuses the existing span element if it already exists', function () { var existingSpan = jQuery('<span data-mapjs-role="title"></span>').appendTo(underTest); underTest.updateNodeContent(nodeContent); expect(existingSpan.text()).toEqual(nodeContent.title); expect(underTest.children().length).toBe(1); }); it('should not allow text to overflow when there are long words', function () { var textBox = jQuery('<span data-mapjs-role="title" class="test-max-width"></span>').appendTo(underTest); nodeContent.title = 'first shouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshouldshould last'; underTest.updateNodeContent(nodeContent); expect(parseInt(textBox.css('max-width'), 10)).toBeGreaterThan(160); }); it('should not allow the box to shrink width if it is multiline', function () { var textBox = jQuery('<span data-mapjs-role="title" class="test-max-width"></span>').appendTo(underTest).css('width', '100px'); nodeContent.title = 'first should could would maybe not so much and so on go on'; underTest.updateNodeContent(nodeContent); expect(textBox.css('min-width')).toBe('160px'); }); it('should not force expand narrow multi-line text', function () { var textBox = jQuery('<span data-mapjs-role="title" class="test-max-width"></span>').appendTo(underTest).css('width', '100px'); nodeContent.title = 'f\ns\nc'; underTest.updateNodeContent(nodeContent); expect(textBox).not.toHaveOwnStyle('min-width'); }); }); describe('setting the level', function () { it('sets the level attribute to the node content level', function () { underTest.updateNodeContent(nodeContent); expect(underTest.attr('mapjs-level')).toBe('3'); }); }); describe('background', function () { it('uses the style from the background if specified', function () { nodeContent.attr = { style: { background: 'rgb(103, 101, 119)' } }; underTest.updateNodeContent(nodeContent); expect(underTest.css('background-color')).toBe('rgb(103, 101, 119)'); }); it('sets the mapjs-node-dark class if the tinted background luminosity is < 0.5', function () { nodeContent.attr = { style: { background: 'rgb(3, 3, 3)' } }; underTest.updateNodeContent(nodeContent); expect(underTest.hasClass('mapjs-node-dark')).toBeTruthy(); }); it('sets the mapjs-node-light class if the tinted background luminosity is 0.5< <0.9', function () { nodeContent.attr = { style: { background: 'rgb(0, 255, 0)' } }; underTest.updateNodeContent(nodeContent); expect(underTest.hasClass('mapjs-node-light')).toBeTruthy(); }); it('sets the mapjs-node-white class if the tinted background luminosity is >0.9', function () { nodeContent.attr = { style: { background: 'rgb(255, 255, 255)' } }; underTest.updateNodeContent(nodeContent); expect(underTest.hasClass('mapjs-node-white')).toBeTruthy(); }); it('clears background color and mapjs-node-* styles from the style if not specified', function () { underTest.css('background-color', 'blue').addClass('mapjs-node-dark mapjs-node-white mapjs-node-light'); underTest.updateNodeContent(nodeContent); expect(underTest).not.toHaveOwnStyle('background-color'); _.each(['mapsj-node-dark', 'mapjs-node-white', 'mapjs-node-light'], function (cls) { expect(underTest.hasClass(cls)).toBeFalsy(); }); }); describe('handles weird background clearance - some browsers put in crap', function () { _.each([false, 'false', '', 'transparent'], function (weirdBgStyle) { it('deals with ' + weirdBgStyle + ' by clearing the background', function () { nodeContent.attr = { style: { background: weirdBgStyle } }; underTest.updateNodeContent(nodeContent); expect(underTest).not.toHaveOwnStyle('background-color'); }); }); }); }); describe('icon handling', function () { var textBox; beforeEach(function () { textBox = jQuery('<span data-mapjs-role="title" class="test-max-width"></span>').appendTo(underTest); }); describe('when icon is set', function () { beforeEach(function () { MAPJS.DOMRender.fixedLayout = false; nodeContent.attr = { icon: { url: 'http://iconurl/', width: 400, height: 500, position: 'center' } }; nodeContent.title = 'AAAA'; underTest.addClass('test-padding'); }); it('sets the generic background properties to the image which does not repeat', function () { underTest.updateNodeContent(nodeContent); expect(underTest.css('background-image')).toBe('url(http://iconurl/)'); expect(underTest.css('background-repeat')).toBe('no-repeat'); expect(underTest.css('background-size')).toBe('400px 500px'); }); it('translates the URL using the resource translator if provided', function () { var translator = jasmine.createSpy('translator'); translator.and.returnValue('data:xxx'); underTest.updateNodeContent(nodeContent, translator); expect(translator).toHaveBeenCalledWith('http://iconurl/'); expect(underTest.css('background-image')).toBe('url(data:xxx)'); }); it('positions center icons behind text and expands the node if needed to fit the image', function () { underTest.updateNodeContent(nodeContent); expect(underTest.css('background-position')).toBe('50% 50%'); expect(underTest.css('min-width')).toEqual('400px'); expect(underTest.css('min-height')).toEqual('500px'); if (!isHeadless()) { expect(textBox.css('margin-top')).toBe('241px'); } }); it('positions center icons behind text and does not expand the node if not needed', function () { nodeContent.attr.icon.width = 5; nodeContent.attr.icon.height = 5; underTest.updateNodeContent(nodeContent); expect(underTest.css('background-position')).toBe('50% 50%'); expect(underTest.css('min-width')).toBe('5px'); expect(underTest).not.toHaveOwnStyle('min-height'); expect(textBox).not.toHaveOwnStyle('margin-top'); }); it('positions left icons left of node text and vertically centers the text', function () { nodeContent.attr.icon.position = 'left'; underTest.updateNodeContent(nodeContent); expect(underTest.css('background-position')).toBe('5px 50%'); expect(underTest.css('padding-left')).toEqual('410px'); if (!isHeadless()) { expect(textBox.css('margin-top')).toBe('241px'); } }); it('positions right icons right of node text and vertically centers the text', function () { nodeContent.attr.icon.position = 'right'; underTest.updateNodeContent(nodeContent); if (!isHeadless()) { expect(underTest.css('background-position')).toBe('right 5px top 50%'); } expect(underTest.css('padding-right')).toEqual('410px'); if (!isHeadless()) { expect(textBox.css('margin-top')).toBe('241px'); } }); it('positions right icons right of node text and vertically centers the text for a fixed layouts', function () { MAPJS.DOMRender.fixedLayout = true; nodeContent.attr.icon.position = 'right'; underTest.updateNodeContent(nodeContent); expect(underTest.css('background-position')).toBe('170px 50%'); expect(underTest.css('padding-right')).toEqual('410px'); if (!isHeadless()) { expect(textBox.css('margin-top')).toBe('241px'); } }); it('positions top icons top of node text and horizontally centers the text', function () { nodeContent.attr.icon.position = 'top'; underTest.updateNodeContent(nodeContent); expect(underTest.css('background-position')).toBe('50% 5px'); expect(underTest.css('padding-top')).toEqual('510px'); expect(underTest.css('min-width')).toEqual('400px'); expect(textBox.css('margin-left')).toBe('120px'); }); it('positions bottom icons bottom of node text and horizontally centers the text', function () { nodeContent.attr.icon.position = 'bottom'; underTest.updateNodeContent(nodeContent); if (!isHeadless()) { expect(underTest.css('background-position')).toBe('left 50% bottom 5px'); } expect(underTest.css('padding-bottom')).toEqual('510px'); expect(underTest.css('min-width')).toEqual('400px'); expect(textBox.css('margin-left')).toBe('120px'); }); it('positions bottom icons bottom of node text and horizontally centers the text for fixed layout', function () { MAPJS.DOMRender.fixedLayout = true; nodeContent.attr.icon.position = 'bottom'; underTest.updateNodeContent(nodeContent); if (!isHeadless()) { expect(underTest.css('background-position')).toBe('50% 23px'); } expect(underTest.css('padding-bottom')).toEqual('510px'); expect(underTest.css('min-width')).toEqual('400px'); expect(textBox.css('margin-left')).toBe('120px'); }); }); it('removes background image settings and narrows the node if no icon set', function () { underTest.css({ 'min-height': '200px', 'min-width': '20px', 'background-image': 'url(http://iconurl/)', 'background-repeat': 'no-repeat', 'background-size': '20px 20px', 'background-position': 'center center', 'padding': '10px 20px 30px 40px' }); textBox.css('margin-top', '20px'); underTest.updateNodeContent(nodeContent); expect(underTest).not.toHaveOwnStyle(['background', 'padding', 'min-']); expect(textBox).not.toHaveOwnStyle('margin-top'); }); }); describe('collapsed', function () { it('adds a collapsed class when collapsed', function () { nodeContent.attr = {collapsed: true}; underTest.updateNodeContent(nodeContent); expect(underTest.hasClass('collapsed')).toBeTruthy(); }); it('removes the collapsed class when uncollapsed', function () { underTest.addClass('collapsed'); underTest.updateNodeContent(nodeContent); expect(underTest.hasClass('collapsed')).toBeFalsy(); }); }); describe('hyperlink handling', function () { var textBox; beforeEach(function () { textBox = jQuery('<span data-mapjs-role="title"></span>').appendTo(underTest); }); _.each([ ['removes the first link from text', 'google http://www.google.com', 'google'], ['does not touch text without hyperlinks', 'google', 'google'], ['removes only the first link', 'http://xkcd.com google http://www.google.com', 'google http://www.google.com'], ['keeps link if there is no other text', 'http://xkcd.com', 'http://xkcd.com'], ['truncates the link if it is too long and appends ...', 'http://google.com/search?q=onlylink', 'http://google.com/search?...'] ], function (testArgs) { it(testArgs[0], function () { nodeContent.title = testArgs[1]; underTest.updateNodeContent(nodeContent); expect(textBox.text()).toEqual(testArgs[2]); }); }); describe('when there is a link', function () { beforeEach(function () { nodeContent.title = 'google http://www.google.com'; }); it('shows the link element', function () { underTest.updateNodeContent(nodeContent); expect(underTest.find('a.mapjs-hyperlink').is(':visible')).toBeTruthy(); }); it('sets the href with a blank target on the link element to the hyperlink in node', function () { underTest.updateNodeContent(nodeContent); expect(underTest.find('a.mapjs-hyperlink').attr('href')).toEqual('http://www.google.com'); expect(underTest.find('a.mapjs-hyperlink').attr('target')).toEqual('_blank'); }); it('should reuse and show existing element', function () { jQuery('<a href="#" class="mapjs-link"></a>').appendTo(underTest).hide(); underTest.updateNodeContent(nodeContent); expect(underTest.find('a.mapjs-hyperlink').length).toBe(1); expect(underTest.find('a.mapjs-hyperlink').is(':visible')).toBeTruthy(); }); it('sets the whole text with the link as the data title', function () { underTest.updateNodeContent(nodeContent); expect(underTest.data('title')).toEqual('google http://www.google.com'); }); }); describe('when there is no link', function () { it('hides the link element', function () { underTest.updateNodeContent(nodeContent); expect(underTest.find('a.mapjs-hyperlink').is(':visible')).toBeFalsy(); }); }); }); describe('attachment handling', function () { describe('when there is an attachment', function () { beforeEach(function () { nodeContent.attr = { 'attachment': { 'contentType': 'text/html', 'content': 'aa' } }; }); it('shows the paperclip element', function () { underTest.updateNodeContent(nodeContent); expect(underTest.find('a.mapjs-attachment').is(':visible')).toBeTruthy(); }); it('binds the paperclip click to dispatch an attachment-click event', function () { var listener = jasmine.createSpy('listener'); underTest.on('attachment-click', listener); underTest.updateNodeContent(nodeContent); underTest.find('a.mapjs-attachment').click(); expect(listener).toHaveBeenCalled(); }); it('should reuse and show existing element', function () { jQuery('<a href="#" class="mapjs-attachment">hello</a>').appendTo(underTest).hide(); underTest.updateNodeContent(nodeContent); expect(underTest.find('a.mapjs-attachment').length).toBe(1); expect(underTest.find('a.mapjs-attachment').is(':visible')).toBeTruthy(); }); }); describe('when there is no attachment', function () { it('hides the paperclip element', function () { underTest.updateNodeContent(nodeContent); expect(underTest.find('a.mapjs-attachment').is(':visible')).toBeFalsy(); }); }); }); describe('label handling', function () { describe('when there is a label', function () { beforeEach(function () { nodeContent.label = 'foo'; }); it('shows the label element', function () { underTest.updateNodeContent(nodeContent); expect(underTest.find('.mapjs-label').is(':visible')).toBeTruthy(); expect(underTest.find('.mapjs-label').text()).toEqual('foo'); }); it('should reuse and show existing element', function () { jQuery('<span class="mapjs-label">hello</span>').appendTo(underTest).hide(); underTest.updateNodeContent(nodeContent); expect(underTest.find('.mapjs-label').length).toBe(1); expect(underTest.find('.mapjs-label').is(':visible')).toBeTruthy(); expect(underTest.find('.mapjs-label').text()).toEqual('foo'); }); }); describe('when there is no label', function () { it('hides the label element', function () { jQuery('<span class="mapjs-label">hello</span>').appendTo(underTest); underTest.updateNodeContent(nodeContent); expect(underTest.find('.mapjs-label').is(':visible')).toBeFalsy(); }); }); describe('when label is equal to numeric 0', function () { it('hides the label element', function () { nodeContent.label = 0; underTest.updateNodeContent(nodeContent); expect(underTest.find('.mapjs-label').is(':visible')).toBeTruthy(); expect(underTest.find('.mapjs-label').text()).toEqual('0'); }); }); }); }); describe('MAPJS.DOMRender', function () { 'use strict'; describe('nodeCacheMark', function () { describe('returns the same value for two nodes if they have the same title, icon sizes, levels and positions, and collapsed attribute', [ ['no icons, just titles', {level: 1, title: 'zeka', x: 1, attr: {ignored: 1}}, {level: 1, title: 'zeka', x: 2, attr: {ignored: 2}}], ['titles and collapsed', {level: 1, title: 'zeka', x: 1, attr: {ignored: 1, collapsed: true}}, {level: 1, title: 'zeka', x: 2, attr: {ignored: 2, collapsed: true}}], ['titles and icon', {level: 1, title: 'zeka', x: 1, attr: { ignored: 1, icon: {width: 100, height: 120, position: 'top', url: '1'} }}, {level: 1, title: 'zeka', x: 2, attr: {ignored: 2, icon: {width: 100, height: 120, position: 'top', url: '2'}}}] ], function (first, second) { expect(MAPJS.DOMRender.nodeCacheMark(first)).toEqual(MAPJS.DOMRender.nodeCacheMark(second)); }); describe('returns different values for two nodes if they differ in the', [ ['titles', {title: 'zeka'}, {title: 'zeka2'}], ['levels', {title: 'zeka', level: 2}, {title: 'zeka', level: 1}], ['collapsed', {title: 'zeka', attr: {collapsed: true}}, {title: 'zeka', attr: {collapsed: false}}], ['icon width', {title: 'zeka', attr: { icon: {width: 100, height: 120, position: 'top'} }}, {title: 'zeka', attr: { icon: {width: 101, height: 120, position: 'top'}}}], ['icon height', {title: 'zeka', attr: { icon: {width: 100, height: 120, position: 'top'} }}, {title: 'zeka', attr: { icon: {width: 100, height: 121, position: 'top'}}}], ['icon position', {title: 'zeka', attr: { icon: {width: 100, height: 120, position: 'left'} }}, {title: 'zeka', attr: {icon: {width: 100, height: 120, position: 'top'}}}] ], function (first, second) { expect(MAPJS.DOMRender.nodeCacheMark(first)).not.toEqual(MAPJS.DOMRender.nodeCacheMark(second)); }); }); describe('dimensionProvider', function () { var newElement, oldUpdateNodeContent, idea; beforeEach(function () { oldUpdateNodeContent = jQuery.fn.updateNodeContent; idea = {id: 'foo.1', title: 'zeka'}; }); afterEach(function () { if (newElement) { newElement.remove(); } jQuery.fn.updateNodeContent = oldUpdateNodeContent; }); it('calculates the width and height of node by drawing an invisible box with .mapjs-node and detaching it after', function () { newElement = jQuery('<style type="text/css">.mapjs-node { width:456px !important; min-height:789px !important}</style>').appendTo('body'); expect(MAPJS.DOMRender.dimensionProvider(idea)).toEqual({width: 456, height: 789}); expect(jQuery('.mapjs-node').length).toBe(0); }); it('takes level into consideration when calculating node dimensions', function () { newElement = jQuery('<style type="text/css">' + '.mapjs-node { width:356px !important; min-height:389px !important} ' + '.mapjs-node[mapjs-level="1"] { width:456px !important; min-height:789px !important} ' + '</style>').appendTo('body'); expect(MAPJS.DOMRender.dimensionProvider(idea, 1)).toEqual({width: 456, height: 789}); expect(MAPJS.DOMRender.dimensionProvider(idea, 2)).toEqual({width: 356, height: 389}); }); it('applies the updateNodeContent function while calculating dimensions', function () { jQuery.fn.updateNodeContent = function () { this.css('width', '654px'); this.css('height', '786px'); return this; }; expect(MAPJS.DOMRender.dimensionProvider(idea)).toEqual({width: 654, height: 786}); }); describe('caching', function () { beforeEach(function () { jQuery.fn.updateNodeContent = jasmine.createSpy(); jQuery.fn.updateNodeContent.and.callFake(function () { this.css('width', '654px'); this.css('height', '786px'); return this; }); }); it('looks up a DOM object with the matching node ID and if the node cache mark matches, returns the DOM width without re-applying content', function () { newElement = jQuery('<div>').data({width: 111, height: 222}).attr('id', 'node_foo_1').appendTo('body'); newElement.addNodeCacheMark(idea); expect(MAPJS.DOMRender.dimensionProvider(idea)).toEqual({width: 111, height: 222}); expect(jQuery.fn.updateNodeContent).not.toHaveBeenCalled(); }); it('ignores DOM objects where the cache mark does not match', function () { newElement = jQuery('<div>').data({width: 111, height: 222}).attr('id', 'node_foo_1').appendTo('body'); newElement.addNodeCacheMark(idea); expect(MAPJS.DOMRender.dimensionProvider(_.extend(idea, {title: 'not zeka'}))).toEqual({width: 654, height: 786}); expect(jQuery.fn.updateNodeContent).toHaveBeenCalled(); }); it('passes the level as an override when finding the cache mark', function () { newElement = jQuery('<div>').data({width: 111, height: 222}).attr('id', 'node_foo_1').appendTo('body'); idea.level = 5; newElement.addNodeCacheMark(idea); idea.level = undefined; expect(MAPJS.DOMRender.dimensionProvider(idea, 5)).toEqual({width: 111, height: 222}); expect(jQuery.fn.updateNodeContent).not.toHaveBeenCalled(); }); }); }); describe('viewController', function () { var stage, viewPort, mapModel, imageInsertController, resourceTranslator; beforeEach(function () { mapModel = observable(jasmine.createSpyObj('mapModel', ['getReorderBoundary', 'dropImage', 'clickNode', 'positionNodeAt', 'dropNode', 'openAttachment', 'toggleCollapse', 'undo', 'editNode', 'isEditingEnabled', 'editNode', 'setInputEnabled', 'getInputEnabled', 'updateTitle', 'getNodeIdAtPosition', 'selectNode', 'getCurrentlySelectedIdeaId', 'requestContextMenu'])); mapModel.getInputEnabled.and.returnValue(true); mapModel.isEditingEnabled.and.returnValue(true); imageInsertController = observable({}); viewPort = jQuery('<div>').appendTo('body'); stage = jQuery('<div>').css('overflow', 'scroll').appendTo(viewPort); resourceTranslator = jasmine.createSpy('resourceTranslator'); MAPJS.DOMRender.viewController(mapModel, stage, false, imageInsertController, resourceTranslator); spyOn(jQuery.fn, 'queueFadeIn').and.callThrough(); }); afterEach(function () { viewPort.remove(); }); describe('nodeCreated', function () { describe('adds a DIV for the node to the stage', function () { var underTest, node; beforeEach(function () { node = {id: '11.12^13#AB-c', title: 'zeka', x: 10, y: 20, width: 30, height: 40}; spyOn(jQuery.fn, 'updateNodeContent').and.callFake(function () { this.data(node); this.css('height', 40); this.css('width', 30); return this; }); stage.data('offsetX', 200); stage.data('offsetY', 100); stage.data('scale', 3); mapModel.dispatchEvent('nodeCreated', node); underTest = stage.children('[data-mapjs-role=node]').first(); }); it('sanitises the ID by replacing non alphanumeric chars with underscores', function () { expect(underTest.attr('id')).toBe('node_11_12_13_AB-c'); }); it('makes the node focusable by adding a tabindex', function () { expect(underTest.attr('tabIndex')).toBe('0'); }); it('assigns the node role', function () { expect(underTest.attr('data-mapjs-role')).toBe('node'); }); it('adds an absolute position so it can move and have width', function () { expect(underTest.css('display')).toBe('block'); expect(underTest.css('position')).toBe('absolute'); }); it('assigns a mapjs-node css class', function () { expect(underTest.hasClass('mapjs-node')).toBeTruthy(); }); it('updates the node content', function () { expect(jQuery.fn.updateNodeContent).toHaveBeenCalledWith(node, resourceTranslator); expect(jQuery.fn.updateNodeContent).toHaveBeenCalledOnJQueryObject(underTest); expect(jQuery.fn.updateNodeContent.calls.count()).toBe(1); }); it('schedules a fade-in animation', function () { expect(jQuery.fn.queueFadeIn).toHaveBeenCalledOnJQueryObject(underTest); }); it('connects the node tap event to mapModel clickNode', function () { var event = jQuery.Event('tap'); underTest.trigger(event); expect(mapModel.clickNode).toHaveBeenCalledWith('11.12^13#AB-c', event); }); it('does not forward right-click events to the mapModel clickNode to avoid double processing', function () { var event = jQuery.Event('tap', {gesture: { stopPropagation: jasmine.createSpy(), srcEvent: { button: 1}}}); underTest.trigger(event); expect(mapModel.clickNode).not.toHaveBeenCalled(); }); it('selects the node and forwards the contextMenu event by dispatching it for the mapModel', function () { mapModel.requestContextMenu.and.returnValue(true); var event = jQuery.Event('contextmenu', {pageX: 111, pageY: 112}); underTest.trigger(event); expect(mapModel.selectNode).toHaveBeenCalledWith('11.12^13#AB-c'); expect(mapModel.requestContextMenu).toHaveBeenCalledWith(111, 112); expect(event.isDefaultPrevented()).toBeTruthy(); expect(event.result).toBe(false); }); it('does not prevent the default on context menu if mapModel returns false from the context menu request', function () { mapModel.requestContextMenu.and.returnValue(false); var event = jQuery.Event('contextmenu', {pageX: 111, pageY: 112}); underTest.trigger(event); expect(mapModel.selectNode).toHaveBeenCalledWith('11.12^13#AB-c'); expect(mapModel.requestContextMenu).toHaveBeenCalledWith(111, 112); expect(event.isDefaultPrevented()).toBeFalsy(); expect(event.result).toBeUndefined(); }); it('connects the node double-tap event to toggleCollapse if editing is disabled', function () { mapModel.isEditingEnabled.and.returnValue(false); underTest.trigger('doubletap'); expect(mapModel.toggleCollapse).toHaveBeenCalledWith('mouse'); expect(mapModel.editNode).not.toHaveBeenCalled(); }); it('connects the node double-tap event to node editing if editing is enabled', function () { mapModel.isEditingEnabled.and.returnValue(true); underTest.trigger('doubletap'); expect(mapModel.toggleCollapse).not.toHaveBeenCalled(); expect(mapModel.editNode).toHaveBeenCalledWith('mouse'); }); it('connects attachment-click with openAttachment even when editing is disabled', function () { mapModel.isEditingEnabled.and.returnValue(false); underTest.trigger('attachment-click'); expect(mapModel.openAttachment).toHaveBeenCalledWith('mouse', '11.12^13#AB-c'); }); it('fixes the width of the node so it does not condense on movements', function () { expect(underTest.css('min-width')).toBe('30px'); }); it('sets the screen coordinates according to data attributes, ignoring stage zoom and transformations', function () { expect(underTest.css('top')).toBe('20px'); expect(underTest.css('left')).toBe('10px'); }); }); describe('grows the stage if needed to fit in', function () { beforeEach(function () { stage.data({offsetX: 200, offsetY: 100, width: 300, height: 150}); spyOn(jQuery.fn, 'updateStage').and.callThrough(); }); it('grows the stage from the top if y would be negative', function () { mapModel.dispatchEvent('nodeCreated', {x: 20, y: -120, width: 20, height: 10, title: 'zeka', id: 1}); expect(stage.data('offsetY')).toBe(120); expect(stage.data('height')).toBe(170); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('grows the stage from the left if x would be negative', function () { mapModel.dispatchEvent('nodeCreated', {x: -230, y: 20, width: 20, height: 10, title: 'zeka', id: 1}); expect(stage.data('offsetX')).toBe(230); expect(stage.data('width')).toBe(330); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('expands the stage min width without touching the offset if the total width would be over the current boundary', function () { mapModel.dispatchEvent('nodeCreated', {x: 80, y: 20, width: 40, height: 10, title: 'zeka', id: 1}); expect(stage.data('width')).toBe(320); expect(stage.data('offsetX')).toBe(200); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('expands the stage min height without touching the offset if the total height would be over the current boundary', function () { mapModel.dispatchEvent('nodeCreated', {x: 80, y: 20, width: 40, height: 60, title: 'zeka', id: 1}); expect(stage.data('height')).toBe(180); expect(stage.data('offsetY')).toBe(100); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('does not expand the stage or call updateStage if the node would fit into current bounds', function () { mapModel.dispatchEvent('nodeCreated', {x: -10, y: -10, width: 20, height: 20, title: 'zeka', id: 1}); expect(stage.data('width')).toBe(300); expect(stage.data('height')).toBe(150); expect(stage.data('offsetX')).toBe(200); expect(stage.data('offsetY')).toBe(100); expect(jQuery.fn.updateStage).not.toHaveBeenCalled(); }); }); describe('holding node action', function () { var underTest, holdEvent; beforeEach(function () { holdEvent = jQuery.Event('hold', { gesture: { center: {pageX: 70, pageY: 50}, preventDefault: jasmine.createSpy(), stopPropagation: jasmine.createSpy(), srcEvent: 'the real event' } }); }); it('is not applicable to non touch devices', function () { mapModel.dispatchEvent('nodeCreated', {x: 20, y: -120, width: 20, height: 10, title: 'zeka', id: 1}); underTest = stage.children('[data-mapjs-role=node]').first(); spyOn(mapModel, 'dispatchEvent').and.callThrough(); underTest.trigger(holdEvent); expect(mapModel.dispatchEvent).not.toHaveBeenCalled(); expect(mapModel.clickNode).not.toHaveBeenCalled(); }); it('on touch devices sends clickNode message to map model and requests the context menu to be shown', function () { stage.remove(); stage = jQuery('<div>').css('overflow', 'scroll').appendTo(viewPort); MAPJS.DOMRender.viewController(mapModel, stage, true); mapModel.dispatchEvent('nodeCreated', {x: 20, y: -120, width: 20, height: 10, title: 'zeka', id: 1}); underTest = stage.children('[data-mapjs-role=node]').first(); underTest.trigger(holdEvent); expect(mapModel.clickNode).toHaveBeenCalledWith(1, 'the real event'); expect(mapModel.requestContextMenu).toHaveBeenCalledWith(70, 50); }); }); describe('drag and drop features', function () { var underTest, noShift, withShift, outsideViewport, reorderBoundary; beforeEach(function () { mapModel.dispatchEvent('nodeCreated', {x: 20, y: -120, width: 20, level: 2, height: 10, title: 'zeka', id: 1}); mapModel.dispatchEvent('nodeCreated', {x: 20, y: -120, width: 20, level: 1, height: 10, title: 'zeka', id: 2}); mapModel.dispatchEvent('nodeCreated', {x: 20, y: -120, width: 20, level: 2, height: 10, title: 'zeka', id: 3}); jQuery('#node_3').addClass('droppable'); underTest = jQuery('#node_1'); reorderBoundary = [{ edge: 'left', maxY: 130, minY: 120, x: 110, margin: 10 }]; mapModel.getReorderBoundary.and.returnValue(reorderBoundary); underTest.trigger('mm:start-dragging'); viewPort.css({'width': '1000px', 'height': '500px', 'overflow': 'scroll', 'top': '10px', 'left': '10px', 'position': 'absolute'}); stage.data({offsetX: 200, offsetY: 100, width: 3000, height: 1500, scale: 2}).updateStage(); viewPort.scrollLeft(20); viewPort.scrollTop(10); noShift = {gesture: {center: {pageX: 70, pageY: 50}, deltaX: -30, deltaY: -20}, finalPosition: {left: 614, top: 446} }; withShift = {gesture: {srcEvent: {shiftKey: true}, center: {pageX: 70, pageY: 50}}, finalPosition: {left: 614, top: 446}}; outsideViewport = {gesture: {srcEvent: {shiftKey: true}, center: {pageX: 1100, pageY: 446}}}; }); describe('when dragging', function () { it('assigns a dragging class', function () { expect(underTest.hasClass('dragging')).toBeTruthy(); }); it('clears the current droppable if drag event does not have a scrieen position', function () { underTest.trigger('mm:drag'); expect(jQuery('#node_3').hasClass('droppable')).toBeFalsy(); }); it('works out the stage position from the page drop position and calls mapModel.getNodeIdAtPosition', function () { underTest.trigger(jQuery.Event('mm:drag', noShift)); expect(mapModel.getNodeIdAtPosition).toHaveBeenCalledWith(-160, -75); }); describe('when over a node', function () { beforeEach(function () { mapModel.getNodeIdAtPosition.and.returnValue(2); }); it('sets draggable class on the node', function () { underTest.trigger(jQuery.Event('mm:drag', noShift)); expect(jQuery('#node_2').hasClass('droppable')).toBeTruthy(); expect(jQuery('#node_3').hasClass('droppable')).toBeFalsy(); }); it('hides reorder bounds even when the drag object is within reorder bounds', function () { noShift.currentPosition = noShift.finalPosition; underTest.trigger(jQuery.Event('mm:drag', noShift)); expect(stage.find('[data-mapjs-role=reorder-bounds]').length).toBeTruthy(); expect(stage.find('[data-mapjs-role=reorder-bounds]').css('display')).toBe('none'); }); }); describe('when over the background', function () { beforeEach(function () { mapModel.getNodeIdAtPosition.and.returnValue(false); }); it('removes the draggable class from all nodes', function () { underTest.trigger(jQuery.Event('mm:drag', noShift)); expect(jQuery('#node_2').hasClass('droppable')).toBeFalsy(); expect(jQuery('#node_3').hasClass('droppable')).toBeFalsy(); }); it('hides the reorder boundary if current position is above the bounds', function () { noShift.currentPosition = noShift.finalPosition; noShift.currentPosition.top -= 30; underTest.trigger(jQuery.Event('mm:drag', noShift)); expect(stage.find('[data-mapjs-role=reorder-bounds]').length).toBeTruthy(); expect(stage.find('[data-mapjs-role=reorder-bounds]').css('display')).toBe('none'); }); it('shows the reorder boundary if current position is within the bounds', function () { noShift.currentPosition = noShift.finalPosition; underTest.trigger(jQuery.Event('mm:drag', noShift)); expect(stage.find('[data-mapjs-role=reorder-bounds]').length).toBeTruthy(); expect(stage.find('[data-mapjs-role=reorder-bounds]').css('display')).not.toBe('none'); }); it('hides the reorder boundary if shift is pressed', function () { withShift.currentPosition = noShift.finalPosition; underTest.trigger(jQuery.Event('mm:drag', withShift)); expect(stage.find('[data-mapjs-role=reorder-bounds]').length).toBeTruthy(); expect(stage.find('[data-mapjs-role=reorder-bounds]').css('display')).toBe('none'); }); }); describe('when over itself', function () { beforeEach(function () { mapModel.getNodeIdAtPosition.and.returnValue(1); }); it('removes the draggable class from all nodes', function () { underTest.trigger(jQuery.Event('mm:drag', noShift)); expect(jQuery('#node_1').hasClass('droppable')).toBeFalsy(); }); }); }); describe('when dragging is cancelled', function () { beforeEach(function () { stage.find('[data-mapjs-role=reorder-bounds]').show(); underTest.trigger('mm:cancel-dragging'); }); it('removes the dragging class', function () { expect(underTest.hasClass('dragging')).toBeFalsy(); }); it('removes the dropppable class', function () { expect(jQuery('#node_3').hasClass('droppable')).toBeFalsy(); }); it('hides reorder bounds', function () { expect(stage.find('[data-mapjs-role=reorder-bounds]').css('display')).toBe('none'); }); }); describe('when dragging stops', function () { it('hides reorder bounds', function () { stage.find('[data-mapjs-role=reorder-bounds]').show(); underTest.trigger('mm:stop-dragging'); expect(stage.find('[data-mapjs-role=reorder-bounds]').css('display')).toBe('none'); }); it('removes the dragging class', function () { underTest.trigger('mm:stop-dragging'); expect(underTest.hasClass('dragging')).toBeFalsy(); }); it('removes the droppable class', function () { underTest.trigger('mm:stop-dragging'); expect(jQuery('#node_3').hasClass('droppable')).toBeFalsy(); }); it('calls getNodeIdAtPosition to work out if it got dropped on a node', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.getNodeIdAtPosition).toHaveBeenCalledWith(-160, -75); }); describe('when dropped on a node', function () { beforeEach(function () { mapModel.getNodeIdAtPosition.and.returnValue(2); }); it('calls dropNode and passes the dropped node ID', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.dropNode).toHaveBeenCalledWith(1, 2, false); }); it('passes shiftKey status', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', withShift)); expect(mapModel.dropNode).toHaveBeenCalledWith(1, 2, true); }); it('does not set event result to false by default', function () { var e = jQuery.Event('mm:stop-dragging', withShift); underTest.trigger(e); expect(e.result).toBeUndefined(); }); it('sets the result to false if dropNode returns false', function () { mapModel.dropNode.and.returnValue(false); var e = jQuery.Event('mm:stop-dragging', withShift); underTest.trigger(e); expect(e.result === false).toBeTruthy(); }); }); describe('when level > 1 dropped on background', function () { beforeEach(function () { mapModel.getNodeIdAtPosition.and.returnValue(false); }); it('calls positionNode and passes the current (DOM) top and left position', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.positionNodeAt).toHaveBeenCalledWith(1, 112, 123, false); }); describe('reorder or manual position check', function () { it('does not position manually inside reorder bounds', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.positionNodeAt.calls.mostRecent().args[3]).toBeFalsy(); }); it('forces manual position right of reorder bounds', function () { noShift.finalPosition.left += 60; underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.positionNodeAt.calls.mostRecent().args[3]).toBeTruthy(); }); it('forces manual position left of reorder bounds', function () { noShift.finalPosition.left -= 60; underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.positionNodeAt.calls.mostRecent().args[3]).toBeTruthy(); }); it('forces manual position top of reorder bounds', function () { noShift.finalPosition.top -= 30; underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.positionNodeAt.calls.mostRecent().args[3]).toBeTruthy(); }); it('forces manual position below of reorder bounds', function () { noShift.finalPosition.top += 30; underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.positionNodeAt.calls.mostRecent().args[3]).toBeTruthy(); }); it('forces manual positioning if shift is pressed even within bounds', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', withShift)); expect(mapModel.positionNodeAt.calls.mostRecent().args[3]).toBeTruthy(); }); }); it('does not set event result to false by default', function () { var e = jQuery.Event('mm:stop-dragging', withShift); underTest.trigger(e); expect(e.result).toBeUndefined(); }); it('sets the result to false if dropNode returns false', function () { mapModel.positionNodeAt.and.returnValue(false); var e = jQuery.Event('mm:stop-dragging', withShift); underTest.trigger(e); expect(e.result === false).toBeTruthy(); }); }); it('does not position node and returns false when when level = 1 dropped on a background', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); mapModel.positionNodeAt.calls.reset(); underTest = jQuery('#node_2'); underTest.trigger('mm:start-dragging'); var e = jQuery.Event('mm:stop-dragging', noShift); expect(mapModel.positionNodeAt).not.toHaveBeenCalled(); underTest.trigger(e); expect(e.result === true).toBeTruthy(); }); it('scrolls the viewport when level = 1 dropped on a background', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); underTest = jQuery('#node_2'); underTest.trigger('mm:start-dragging'); var e = jQuery.Event('mm:stop-dragging', noShift); underTest.trigger(e); viewPort.finish(); expect(viewPort.scrollLeft()).toBe(80); expect(viewPort.scrollTop()).toBe(50); }); it('does not position node and does not returns false when dropped outside viewport', function () { mapModel.getNodeIdAtPosition.and.returnValue(false); var e = jQuery.Event('mm:stop-dragging', outsideViewport); underTest.trigger(e); expect(mapModel.positionNodeAt).not.toHaveBeenCalled(); expect(e.result).toBeUndefined(); }); describe('when dropped on itself', function () { beforeEach(function () { mapModel.getNodeIdAtPosition.and.returnValue(1); underTest.css({position: 'absolute', top: '123px', left: '112px'}); }); it('triggers automatic positioning if within reorder bounds', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.positionNodeAt).toHaveBeenCalledWith(1, 112, 123, false); expect(mapModel.dropNode).not.toHaveBeenCalled(); }); it('triggers manual positioning outside of reorder bounds', function () { noShift.finalPosition.left += 60; underTest.trigger(jQuery.Event('mm:stop-dragging', noShift)); expect(mapModel.positionNodeAt.calls.mostRecent().args[3]).toBeTruthy(); expect(mapModel.dropNode).not.toHaveBeenCalled(); }); it('triggers manual positioning if shift is pressed', function () { underTest.trigger(jQuery.Event('mm:stop-dragging', withShift)); expect(mapModel.positionNodeAt).toHaveBeenCalledWith(1, 112, 123, true); expect(mapModel.dropNode).not.toHaveBeenCalled(); }); }); }); }); }); describe('activatedNodesChanged', function () { var nodes; beforeEach(function () { var i; nodes = []; for (i = 0; i < 4; i++) { nodes.push(jQuery('<div>').attr('id', 'node_' + i).appendTo(stage)); } }); it('adds the activated class to all the activated nodes', function () { mapModel.dispatchEvent('activatedNodesChanged', [1, 2], []); expect(nodes[0].hasClass('activated')).toBeFalsy(); expect(nodes[1].hasClass('activated')).toBeTruthy(); expect(nodes[2].hasClass('activated')).toBeTruthy(); expect(nodes[3].hasClass('activated')).toBeFalsy(); }); it('removes the activated class from all deactivated nodes', function () { nodes[2].addClass('activated'); nodes[3].addClass('activated'); mapModel.dispatchEvent('activatedNodesChanged', [], [2, 3]); expect(nodes[0].hasClass('activated')).toBeFalsy(); expect(nodes[1].hasClass('activated')).toBeFalsy(); expect(nodes[2].hasClass('activated')).toBeFalsy(); expect(nodes[3].hasClass('activated')).toBeFalsy(); }); it('applies both operations at the same time', function () { nodes[2].addClass('activated'); nodes[3].addClass('activated'); mapModel.dispatchEvent('activatedNodesChanged', [1], [2, 3]); expect(nodes[0].hasClass('activated')).toBeFalsy(); expect(nodes[1].hasClass('activated')).toBeTruthy(); expect(nodes[2].hasClass('activated')).toBeFalsy(); expect(nodes[3].hasClass('activated')).toBeFalsy(); }); }); describe('nodeSelectionChanged', function () { var underTest; beforeEach(function () { var node = {id: '11.12', title: 'zeka', x: -80, y: -35, width: 30, height: 20}; spyOn(jQuery.fn, 'updateNodeContent').and.callFake(function () { this.css('height', 40); this.css('width', 30); this.data(node); return this; }); viewPort.css({'width': '200', 'height': '100', 'overflow': 'scroll'}); stage.data({ 'offsetX': 100, 'offsetY': 50, 'scale': 2, 'width': 500, 'height': 500 }); stage.updateStage(); viewPort.scrollLeft(180); viewPort.scrollTop(80); mapModel.dispatchEvent('nodeCreated', node); underTest = stage.children('[data-mapjs-role=node]').first(); spyOn(jQuery.fn, 'focus').and.callThrough(); spyOn(jQuery.fn, 'animate'); }); describe('when deselected', function () { beforeEach(function () { underTest.addClass('selected'); mapModel.dispatchEvent('nodeSelectionChanged', '11.12', false); }); it('removes the selected class', function () { expect(underTest.hasClass('selected')).toBeFalsy(); }); it('does not move the viewport', function () { expect(viewPort.scrollLeft()).toBe(180); expect(viewPort.scrollTop()).toBe(80); }); it('does not request focus or animate', function () { expect(jQuery.fn.focus).not.toHaveBeenCalled(); expect(jQuery.fn.animate).not.toHaveBeenCalled(); }); }); describe('when selected', function () { describe('when node is visible', function () { beforeEach(function () { viewPort.scrollLeft(5); viewPort.scrollTop(3); mapModel.getCurrentlySelectedIdeaId.and.returnValue('11.12'); mapModel.dispatchEvent('nodeSelectionChanged', '11.12', true); }); it('adds the selected class immediately', function () { expect(underTest.hasClass('selected')).toBeTruthy(); }); it('does not animate', function () { expect(jQuery.fn.animate).not.toHaveBeenCalled(); }); }); _.each([ ['left', -80, 0, {scrollLeft: 30}], ['top', 0, -20, {scrollTop: 50}], ['left', -80, 0, {scrollLeft: 30}], ['top left', -80, -20, {scrollLeft: 30, scrollTop: 50}], ['right', 90, 0, {scrollLeft: 250}], ['bottom', 0, 80, {scrollTop: 210}], ['bottom right', 90, 80, {scrollTop: 210, scrollLeft: 250}] ], function (testArgs) { var caseName = testArgs[0], nodeX = testArgs[1], nodeY = testArgs[2], expectedAnimation = testArgs[3]; describe('when ' + caseName + ' of viewport', function () { beforeEach(function () { underTest.data('x', nodeX); underTest.data('y', nodeY); mapModel.getCurrentlySelectedIdeaId.and.returnValue('11.12'); mapModel.dispatchEvent('nodeSelectionChanged', '11.12', true); }); it('immediately adds the selected class', function () { expect(underTest.hasClass('selected')).toBeTruthy(); }); it('animates scroll movements to show selected node', function () { expect(jQuery.fn.animate).toHaveBeenCalledOnJQueryObject(viewPort); expect(jQuery.fn.animate.calls.first().args[0]).toEqual(expectedAnimation); }); }); }); }); }); describe('nodeVisibilityRequested', function () { var underTest; beforeEach(function () { var node = {id: '11.12', title: 'zeka', x: -80, y: -35, width: 30, height: 20}; spyOn(jQuery.fn, 'updateNodeContent').and.callFake(function () { this.css('height', 40); this.css('width', 30); this.data(node); return this; }); viewPort.css({'width': '200', 'height': '100', 'overflow': 'scroll'}); stage.data({ 'offsetX': 100, 'offsetY': 50, 'scale': 2, 'width': 500, 'height': 500 }); stage.updateStage(); viewPort.scrollLeft(180); viewPort.scrollTop(80); mapModel.dispatchEvent('nodeCreated', node); underTest = stage.children('[data-mapjs-role=node]').first(); spyOn(jQuery.fn, 'animate').and.callThrough(); }); it('should animate scroll movement to show the node', function () { underTest.data('x', -80); underTest.data('y', -20); mapModel.getCurrentlySelectedIdeaId.and.returnValue('11.12'); mapModel.dispatchEvent('nodeVisibilityRequested', '11.12'); expect(jQuery.fn.animate).toHaveBeenCalledOnJQueryObject(viewPort); expect(jQuery.fn.animate.calls.first().args[0]).toEqual({scrollLeft: 30, scrollTop: 50}); expect(viewPort.queue()).toEqual([]); }); }); describe('nodeRemoved', function () { var underTest, node; beforeEach(function () { node = {id: '11', title: 'zeka', x: -80, y: -35, width: 30, height: 20}; mapModel.dispatchEvent('nodeCreated', node); underTest = stage.children('[data-mapjs-role=node]').first(); spyOn(jQuery.fn, 'queueFadeOut'); }); it('animates a fade-out', function () { mapModel.dispatchEvent('nodeRemoved', node); expect(jQuery.fn.queueFadeOut).toHaveBeenCalledOnJQueryObject(underTest); }); }); describe('nodeMoved', function () { var underTest, node; beforeEach(function () { node = {id: 1, title: 'zeka', x: 0, y: 0, width: 20, height: 10}; stage.data({offsetX: 200, offsetY: 100, width: 300, height: 150}); mapModel.dispatchEvent('nodeCreated', node); underTest = stage.children('[data-mapjs-role=node]').first(); spyOn(jQuery.fn, 'updateStage').and.callThrough(); }); it('sets the new data coordinates', function () { mapModel.dispatchEvent('nodeMoved', {x: 20, y: -120, width: 20, height: 10, title: 'zeka', id: 1}); expect(underTest.data('x')).toBe(20); expect(underTest.data('y')).toBe(-120); }); it('rounds the coordinates for performance', function () { mapModel.dispatchEvent('nodeMoved', {x: 20.11, y: -119.99, width: 20, height: 10, title: 'zeka', id: 1}); expect(underTest.data('x')).toBe(20); expect(underTest.data('y')).toBe(-120); }); describe('expands the stage if needed - using a margin', function () { beforeEach(function () { MAPJS.DOMRender.stageMargin = {top: 10, left: 11, bottom: 12, right: 13}; }); afterEach(function () { MAPJS.DOMRender.stageMargin = false; }); it('grows the stage from the top if y would be negative', function () { mapModel.dispatchEvent('nodeMoved', {x: 20, y: -120, width: 20, height: 10, title: 'zeka', id: 1}); expect(stage.data('offsetY')).toBe(130); expect(stage.data('height')).toBe(180); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('grows the stage from the left if x would be negative', function () { mapModel.dispatchEvent('nodeMoved', {x: -230, y: 20, width: 20, height: 10, title: 'zeka', id: 1}); expect(stage.data('offsetX')).toBe(241); expect(stage.data('width')).toBe(341); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('expands the stage min width without touching the offset if the total width would be over the current boundary', function () { mapModel.dispatchEvent('nodeMoved', {x: 90, y: 20, width: 20, height: 10, title: 'zeka', id: 1}); expect(stage.data('width')).toBe(323); expect(stage.data('offsetX')).toBe(200); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('expands the stage min height without touching the offset if the total height would be over the current boundary', function () { mapModel.dispatchEvent('nodeMoved', {x: 20, y: 45, width: 20, height: 10, title: 'zeka', id: 1}); expect(stage.data('height')).toBe(167); expect(stage.data('offsetY')).toBe(100); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('does not expand the stage or call updateStage if the node would fit into current bounds', function () { mapModel.dispatchEvent('nodeMoved', {x: -10, y: -10, width: 20, height: 10, title: 'zeka', id: 1}); expect(stage.data('width')).toBe(300); expect(stage.data('height')).toBe(150); expect(stage.data('offsetX')).toBe(200); expect(stage.data('offsetY')).toBe(100); expect(jQuery.fn.updateStage).not.toHaveBeenCalled(); }); }); describe('viewport interactions', function () { var moveListener, animateMoveListener; beforeEach(function () { viewPort.css({'width': '200', 'height': '100', 'overflow': 'scroll'}); stage.data({ 'offsetX': 100, 'offsetY': 50, 'scale': 2, 'width': 500, 'height': 500 }); stage.updateStage(); viewPort.scrollLeft(180); viewPort.scrollTop(80); moveListener = jasmine.createSpy('mapjs:move'); animateMoveListener = jasmine.createSpy('mapjs:animatemove'); underTest.on('mapjs:move', moveListener).on('mapjs:animatemove', animateMoveListener); spyOn(jQuery.fn, 'animate').and.returnValue(underTest); }); _.each([ ['on left edge of', -20, 10], ['on right edge of', 80, 10], ['on top edge of', 20, -15], ['on bottom edge of', 20, 35], ['inside', 20, 10] ], function (testArgs) { var caseName = testArgs[0], nodeX = testArgs[1], nodeY = testArgs[2]; describe('when ' + caseName + ' viewport', function () { beforeEach(function () { mapModel.dispatchEvent('nodeMoved', {x: nodeX, y: nodeY, width: 20, height: 10, id: 1}); }); it('does not update screen coordinates immediately', function () { expect(underTest.css('left')).toBe('0px'); expect(underTest.css('top')).toBe('0px'); }); it('does not fire the moved event immediately', function () { expect(moveListener).not.toHaveBeenCalled(); }); it('fires the moveanimate event', function () { expect(animateMoveListener).toHaveBeenCalled(); }); it('schedules an animation to move the coordinates', function () { expect(jQuery.fn.animate).toHaveBeenCalledOnJQueryObject(underTest); expect(jQuery.fn.animate.calls.first().args[0]).toEqual({left: nodeX, top: nodeY, opacity: 1}); }); it('fires the move event after the animation completes', function () { jQuery.fn.animate.calls.first().args[1].complete(); expect(underTest.css('left')).toBe(nodeX + 'px'); expect(underTest.css('top')).toBe(nodeY + 'px'); expect(moveListener).toHaveBeenCalled(); expect(underTest).not.toHaveOwnStyle('opacity'); }); }); }); _.each([ ['above', 20, -30], ['below', 20, 45], ['left of', -35, 10], ['right of', 95, 10] ], function (testArgs) { var caseName = testArgs[0], nodeX = testArgs[1], nodeY = testArgs[2]; describe('when ' + caseName + ' viewport', function () { beforeEach(function () { mapModel.dispatchEvent('nodeMoved', {x: nodeX, y: nodeY, width: 20, height: 10, id: 1}); }); it('updates screen coordinates immediately', function () { expect(underTest.css('left')).toBe(nodeX + 'px'); expect(underTest.css('top')).toBe(nodeY + 'px'); }); it('fires the moved event immediately', function () { expect(moveListener).toHaveBeenCalled(); }); it('does not fire the moveanimate event', function () { expect(animateMoveListener).not.toHaveBeenCalled(); }); it('does not schedule an animation', function () { expect(jQuery.fn.animate).not.toHaveBeenCalled(); }); }); }); }); }); _.each(['nodeTitleChanged', 'nodeAttrChanged', 'nodeLabelChanged'], function (eventType) { it('updates node content on ' + eventType, function () { var underTest, node; node = {id: '11', title: 'zeka', x: -80, y: -35, width: 30, height: 20}; mapModel.dispatchEvent('nodeCreated', node); underTest = stage.children('[data-mapjs-role=node]').first(); spyOn(jQuery.fn, 'updateNodeContent'); mapModel.dispatchEvent(eventType, node); expect(jQuery.fn.updateNodeContent).toHaveBeenCalledOnJQueryObject(underTest); expect(jQuery.fn.updateNodeContent).toHaveBeenCalledWith(node, resourceTranslator); }); }); describe('nodeEditRequested', function () { var underTest, node, editDeferred; beforeEach(function () { node = {id: '11', title: 'zeka', x: -80, y: -35, width: 30, height: 20}; mapModel.dispatchEvent('nodeCreated', node); underTest = stage.children('[data-mapjs-role=node]').first(); editDeferred = jQuery.Deferred(); spyOn(jQuery.fn, 'focus'); spyOn(jQuery.fn, 'finish'); spyOn(jQuery.fn, 'editNode').and.returnValue(editDeferred.promise()); }); describe('options', function () { describe('inlineEditingDisabled', function () { beforeEach(function () { viewPort.remove(); spyOn(mapModel, 'addEventListener'); viewPort = jQuery('<div>').appendTo('body'); stage = jQuery('<div>').css('overflow', 'scroll').appendTo(viewPort); resourceTranslator = jasmine.createSpy('resourceTranslator'); }); it('should subscribe to mapModel nodeEditRequested event when no options supplied', function () { MAPJS.DOMRender.viewController(mapModel, stage, false, imageInsertController, resourceTranslator); expect(mapModel.addEventListener).toHaveBeenCalledWith('nodeEditRequested', jasmine.any(Function)); }); it('should subscribe to mapModel nodeEditRequested event when no options.inlineEditingDisabled is false', function () { MAPJS.DOMRender.viewController(mapModel, stage, false, imageInsertController, resourceTranslator, {inlineEditingDisabled: false}); expect(mapModel.addEventListener).toHaveBeenCalledWith('nodeEditRequested', jasmine.any(Function)); }); it('should not subscribe to mapModel nodeEditRequested event when true', function () { MAPJS.DOMRender.viewController(mapModel, stage, false, imageInsertController, resourceTranslator, {inlineEditingDisabled: true}); expect(mapModel.addEventListener).not.toHaveBeenCalledWith('nodeEditRequested', jasmine.any(Function)); }); }); }); describe('when editing an existing node', function () { beforeEach(function () { mapModel.dispatchEvent('nodeEditRequested', '11', false, false); }); it('disables input on mapModel', function () { expect(mapModel.setInputEnabled).toHaveBeenCalledWith(false); }); it('completes all viewport scrolling animations immediately - required to prevent loss of focus when viewport is scrolling', function () { expect(jQuery.fn.finish).toHaveBeenCalledOnJQueryObject(viewPort); }); it('puts the node into edit mode', function () { expect(jQuery.fn.editNode).toHaveBeenCalledOnJQueryObject(underTest); }); describe('when editing completes', function () { beforeEach(function () { mapModel.setInputEnabled.calls.reset(); editDeferred.resolve('new text'); }); it('re-enables input on map model', function () { expect(mapModel.setInputEnabled).toHaveBeenCalledWith(true); }); it('updates the node title', function () { expect(mapModel.updateTitle).toHaveBeenCalledWith('11', 'new text', false); }); it('sets the focus back on the node', function () { expect(jQuery.fn.focus).toHaveBeenCalledOnJQueryObject(underTest); }); }); describe('when editing fails', function () { beforeEach(function () { mapModel.setInputEnabled.calls.reset(); editDeferred.reject(); }); it('re-enables input on map model', function () { expect(mapModel.setInputEnabled).toHaveBeenCalledWith(true); }); it('does not undo the last action', function () { expect(mapModel.undo).not.toHaveBeenCalled(); }); it('sets the focus back on the node', function () { expect(jQuery.fn.focus).toHaveBeenCalledOnJQueryObject(underTest); }); }); }); describe('when editing an existing node', function () { beforeEach(function () { mapModel.dispatchEvent('nodeEditRequested', '11', false, true); }); it('passes the editNew correctly to mapModel when updating the title', function () { editDeferred.resolve('new text'); expect(mapModel.updateTitle).toHaveBeenCalledWith('11', 'new text', true); }); it('calls undo to drop the newly added node when editing is cancelled', function () { editDeferred.reject(); expect(mapModel.undo).toHaveBeenCalled(); }); }); }); describe('connector events', function () { var nodeFrom, nodeTo, underTest, connector; beforeEach(function () { connector = {from: '1.from', to: '1.to'}; mapModel.dispatchEvent('nodeCreated', {id: '1.from', title: 'zeka', x: -80, y: -35, width: 30, height: 20}); mapModel.dispatchEvent('nodeCreated', {id: '1.to', title: 'zeka2', x: 80, y: 35, width: 50, height: 34}); nodeFrom = jQuery('#node_1_from'); nodeTo = jQuery('#node_1_to'); spyOn(jQuery.fn, 'updateConnector').and.callThrough(); jQuery.fn.queueFadeIn.calls.reset(); mapModel.dispatchEvent('connectorCreated', connector); underTest = stage.children('[data-mapjs-role=connector]').first(); }); describe('connectorCreated', function () { it('adds a connector element to the stage', function () { expect(underTest.length).toBe(1); expect(underTest.parent()[0]).toEqual(stage[0]); }); it('creates a SVG mapjs-draw-container class', function () { expect(underTest.prop('tagName')).toBe('svg'); expect(underTest.attr('class')).toEqual('mapjs-draw-container'); }); it('assigns the DOM Id by sanitising node IDs', function () { expect(underTest.prop('id')).toBe('connector_1_from_1_to'); }); it('maps the from and to nodes as jQuery objects to data properties', function () { expect(underTest.data('nodeFrom')[0]).toEqual(nodeFrom[0]); expect(underTest.data('nodeTo')[0]).toEqual(nodeTo[0]); }); it('queues connector fade in', function () { expect(jQuery.fn.queueFadeIn).toHaveBeenCalledWith({ duration : 400, queue : 'nodeQueue', easing : 'linear' }); expect(jQuery.fn.queueFadeIn).toHaveBeenCalledOnJQueryObject(underTest); }); it('updates the connector content', function () { expect(jQuery.fn.updateConnector).toHaveBeenCalledOnJQueryObject(underTest); }); describe('event wiring for node updates', function () { beforeEach(function () { jQuery.fn.updateConnector.calls.reset(); spyOn(jQuery.fn, 'animateConnectorToPosition'); }); _.each(['from', 'to'], function (node) { describe('moving node ' + node, function () { beforeEach(function () { jQuery('#node_1_' + node).trigger('mapjs:move'); }); it('updates connector', function () { expect(jQuery.fn.updateConnector).toHaveBeenCalledOnJQueryObject(underTest); }); it('does not add connectors to animation list', function () { mapModel.dispatchEvent('layoutChangeComplete'); expect(jQuery.fn.animateConnectorToPosition).not.toHaveBeenCalled(); }); }); describe('animating node ' + node, function () { beforeEach(function () { jQuery('#node_1_' + node).trigger('mapjs:animatemove'); }); it('does not update the connector immediately', function () { expect(jQuery.fn.updateConnector).not.toHaveBeenCalled(); }); it('does not animate the connector immediately', function () { expect(jQuery.fn.animateConnectorToPosition).not.toHaveBeenCalled(); }); it('animates the connector after the layout change is complete', function () { mapModel.dispatchEvent('layoutChangeComplete'); expect(jQuery.fn.animateConnectorToPosition).toHaveBeenCalledOnJQueryObject(underTest); }); it('if a connector cannot simply be animated, updates with each animation progress tick', function () { jQuery.fn.animateConnectorToPosition.and.returnValue(false); jQuery.fn.updateConnector.calls.reset(); spyOn(jQuery.fn, 'animate'); mapModel.dispatchEvent('layoutChangeComplete'); jQuery.fn.animate.calls.mostRecent().args[1].progress(); expect(jQuery.fn.updateConnector).toHaveBeenCalledOnJQueryObject(underTest); }); }); }); }); }); describe('connectorRemoved', function () { it('schedules a fade out animation', function () { spyOn(jQuery.fn, 'queueFadeOut'); mapModel.dispatchEvent('connectorRemoved', connector); expect(jQuery.fn.queueFadeOut).toHaveBeenCalledWith({ duration : 400, queue : 'nodeQueue', easing : 'linear' }); expect(jQuery.fn.queueFadeOut).toHaveBeenCalledOnJQueryObject(underTest); }); }); }); describe('link events', function () { var nodeFrom, nodeTo, underTest, link; beforeEach(function () { link = {ideaIdFrom: '1.from', ideaIdTo: '1.to', attr: {style: {color: 'blue', lineStyle: 'solid', arrow: true}}}; mapModel.dispatchEvent('nodeCreated', {id: '1.from', title: 'zeka', x: -80, y: -35, width: 30, height: 20}); mapModel.dispatchEvent('nodeCreated', {id: '1.to', title: 'zeka2', x: 80, y: 35, width: 50, height: 34}); nodeFrom = jQuery('#node_1_from'); nodeTo = jQuery('#node_1_to'); spyOn(jQuery.fn, 'updateLink').and.callThrough(); jQuery.fn.queueFadeIn.calls.reset(); mapModel.dispatchEvent('linkCreated', link); underTest = stage.children('[data-mapjs-role=link]').first(); }); describe('linkCreated', function () { it('adds a link element to the stage', function () { expect(underTest.length).toBe(1); expect(underTest.parent()[0]).toEqual(stage[0]); }); it('creates a SVG mapjs-draw-container class', function () { expect(underTest.prop('tagName')).toBe('svg'); expect(underTest.attr('class')).toEqual('mapjs-draw-container'); }); it('assigns the DOM Id by sanitising node IDs', function () { expect(underTest.prop('id')).toBe('link_1_from_1_to'); }); it('maps the from and to nodes as jQuery objects to data properties', function () { expect(underTest.data('nodeFrom')[0]).toEqual(nodeFrom[0]); expect(underTest.data('nodeTo')[0]).toEqual(nodeTo[0]); }); it('queues link fade in', function () { expect(jQuery.fn.queueFadeIn).toHaveBeenCalledWith({ duration : 400, queue : 'nodeQueue', easing : 'linear' }); expect(jQuery.fn.queueFadeIn).toHaveBeenCalledOnJQueryObject(underTest); }); it('updates the link content', function () { expect(jQuery.fn.updateLink).toHaveBeenCalledOnJQueryObject(underTest); }); it('passes the style properties as data attributes to the DOM object', function () { expect(underTest.data('lineStyle')).toBe('solid'); expect(underTest.data('color')).toBe('blue'); expect(underTest.data('arrow')).toBeTruthy(); }); describe('event wiring for node updates', function () { beforeEach(function () { jQuery.fn.updateLink.calls.reset(); spyOn(jQuery.fn, 'animateConnectorToPosition'); }); _.each(['from', 'to'], function (node) { describe('moving node ' + node, function () { beforeEach(function () { jQuery('#node_1_' + node).trigger('mapjs:move'); }); it('updates link', function () { expect(jQuery.fn.updateLink).toHaveBeenCalledOnJQueryObject(underTest); }); it('does not add links to animation list', function () { mapModel.dispatchEvent('layoutChangeComplete'); expect(jQuery.fn.animateConnectorToPosition).not.toHaveBeenCalled(); }); }); describe('animating node ' + node, function () { beforeEach(function () { jQuery('#node_1_' + node).trigger('mapjs:animatemove'); }); it('does not update the link immediately', function () { expect(jQuery.fn.updateLink).not.toHaveBeenCalled(); }); it('does not animate the link immediately', function () { expect(jQuery.fn.animateConnectorToPosition).not.toHaveBeenCalled(); }); it('animates the link after the layout change is complete', function () { mapModel.dispatchEvent('layoutChangeComplete'); expect(jQuery.fn.animateConnectorToPosition).toHaveBeenCalledOnJQueryObject(underTest); }); it('if a link cannot simply be animated, updates with each animation progress tick', function () { jQuery.fn.animateConnectorToPosition.and.returnValue(false); jQuery.fn.updateLink.calls.reset(); spyOn(jQuery.fn, 'animate'); mapModel.dispatchEvent('layoutChangeComplete'); jQuery.fn.animate.calls.mostRecent().args[1].progress(); expect(jQuery.fn.updateLink).toHaveBeenCalledOnJQueryObject(underTest); }); }); }); }); }); describe('linkRemoved', function () { it('schedules a fade out animation', function () { spyOn(jQuery.fn, 'queueFadeOut'); mapModel.dispatchEvent('linkRemoved', link); expect(jQuery.fn.queueFadeOut).toHaveBeenCalledWith({ duration : 400, queue : 'nodeQueue', easing : 'linear' }); expect(jQuery.fn.queueFadeOut).toHaveBeenCalledOnJQueryObject(underTest); }); }); describe('linkAttrChanged', function () { it('passes the style properties as data attributes to the DOM object', function () { mapModel.dispatchEvent('linkAttrChanged', {ideaIdFrom: '1.from', ideaIdTo: '1.to', attr: {style: {color: 'yellow', lineStyle: 'dashed', arrow: true}}}); expect(underTest.data('lineStyle')).toBe('dashed'); expect(underTest.data('color')).toBe('yellow'); expect(underTest.data('arrow')).toBeTruthy(); }); it('removes arrow if not set', function () { mapModel.dispatchEvent('linkAttrChanged', {ideaIdFrom: '1.from', ideaIdTo: '1.to', attr: {style: {color: 'yellow', lineStyle: 'dashed'}}}); expect(underTest.data('lineStyle')).toBe('dashed'); expect(underTest.data('color')).toBe('yellow'); expect(underTest.data('arrow')).toBeFalsy(); }); it('calls updateLink', function () { jQuery.fn.updateLink.calls.reset(); mapModel.dispatchEvent('linkAttrChanged', {ideaIdFrom: '1.from', ideaIdTo: '1.to', attr: {style: {color: 'yellow', lineStyle: 'dashed'}}}); expect(jQuery.fn.updateLink).toHaveBeenCalledOnJQueryObject(underTest); }); }); describe('addLinkModeToggled', function () { it('gives the stage the mapjs-add-link class if on', function () { mapModel.dispatchEvent('addLinkModeToggled', true); expect(stage.hasClass('mapjs-add-link')).toBeTruthy(); }); it('gives the stage the mapjs-add-link class if on', function () { stage.addClass('mapjs-add-link'); mapModel.dispatchEvent('addLinkModeToggled', false); expect(stage.hasClass('mapjs-add-link')).toBeFalsy(); }); }); }); describe('mapScaleChanged', function () { beforeEach(function () { spyOn(jQuery.fn, 'updateStage').and.callThrough(); spyOn(jQuery.fn, 'animate'); viewPort.css({'width': '200', 'height': '100', 'overflow': 'scroll'}); stage.data({ 'offsetX': 100, 'offsetY': 50, 'scale': 1, 'width': 1000, 'height': 1000 }); stage.updateStage(); viewPort.scrollLeft(180); viewPort.scrollTop(80); stage.updateStage.calls.reset(); mapModel.dispatchEvent('mapScaleChanged', 2); }); it('updates stage data property and calls updateStage to set CSS transformations', function () { expect(stage.data('scale')).toBe(2); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('applies scale factors successively', function () { mapModel.dispatchEvent('mapScaleChanged', 2.5); expect(stage.data('scale')).toBe(5); }); it('keeps the center point in the same position in the new scale', function () { expect(viewPort.scrollLeft()).toBe(460); expect(viewPort.scrollTop()).toBe(210); }); it('does not allow scaling by more than factor of 5', function () { mapModel.dispatchEvent('mapScaleChanged', 10); expect(stage.data('scale')).toBe(5); }); it('does not allow scaling by a factor of less than 0.2', function () { mapModel.dispatchEvent('mapScaleChanged', 0.0001); expect(stage.data('scale')).toBe(0.2); }); }); describe('mapViewResetRequested', function () { beforeEach(function () { spyOn(jQuery.fn, 'updateStage').and.callThrough(); spyOn(jQuery.fn, 'updateConnector').and.callThrough(); spyOn(jQuery.fn, 'updateLink').and.callThrough(); viewPort.css({'width': '200', 'height': '100', 'overflow': 'scroll'}); stage.data({ 'offsetX': 100, 'offsetY': 50, 'scale': 1, 'width': 400, 'height': 300 }).updateStage(); viewPort.scrollLeft(10).scrollTop(10); mapModel.dispatchEvent('nodeCreated', {id: '11.12', title: 'zeka2', x: 100, y: 50, width: 20, height: 10}); mapModel.dispatchEvent('nodeCreated', {id: '12.12', title: 'zeka3', x: 200, y: 150, width: 20, height: 10}); mapModel.dispatchEvent('nodeCreated', {id: '13.12', title: 'zeka3', x: 300, y: 250, width: 20, height: 10}); mapModel.dispatchEvent('connectorCreated', {from: '11.12', to: '12.12'}); mapModel.dispatchEvent('connectorCreated', {from: '12.12', to: '13.12'}); mapModel.dispatchEvent('linkCreated', {ideaIdFrom: '11.12', ideaIdTo: '13.12', attr: {style: {color: 'blue', lineStyle: 'solid', arrow: true}}}); jQuery.fn.updateStage.calls.reset(); }); it('resets stage scale', function () { stage.data({scale: 2}).updateStage(); stage.updateStage.calls.reset(); mapModel.dispatchEvent('mapViewResetRequested'); expect(stage.data('scale')).toBe(1); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('resets stage data', function () { stage.data({'scale': 1, 'height': 500, 'width': 1000, 'offsetX': 20, 'offsetY': 500}).updateStage(); mapModel.dispatchEvent('mapViewResetRequested'); expect(stage.data()).toEqual({'scale': 1, 'height': 310, 'width': 420, 'offsetX': 100, 'offsetY': 50}); }); it('should update Connectors', function () { jQuery.fn.updateConnector.calls.reset(); mapModel.dispatchEvent('mapViewResetRequested'); expect(jQuery.fn.updateConnector).toHaveBeenCalledOnJQueryObject(jQuery('[data-mapjs-role=connector]')); }); it('should update Links', function () { jQuery.fn.updateLink.calls.reset(); mapModel.dispatchEvent('mapViewResetRequested'); expect(jQuery.fn.updateLink).toHaveBeenCalledOnJQueryObject(jQuery('[data-mapjs-role=link]')); }); it('centers the view', function () { mapModel.dispatchEvent('mapViewResetRequested'); expect(viewPort.scrollLeft()).toBe(0); expect(viewPort.scrollTop()).toBe(0); }); }); describe('nodeFocusRequested', function () { beforeEach(function () { spyOn(jQuery.fn, 'updateStage').and.callThrough(); spyOn(jQuery.fn, 'animate').and.callFake(function () { return this; }); viewPort.css({'width': '200', 'height': '100', 'overflow': 'scroll'}); stage.data({ 'offsetX': 100, 'offsetY': 50, 'scale': 1, 'width': 400, 'height': 300 }); stage.updateStage(); viewPort.scrollLeft(180); viewPort.scrollTop(80); mapModel.dispatchEvent('nodeCreated', {id: '11.12', title: 'zeka2', x: 100, y: 50, width: 20, height: 10}); jQuery.fn.animate.calls.reset(); jQuery.fn.updateStage.calls.reset(); }); it('resets stage scale', function () { stage.data({scale: 2}).updateStage(); stage.updateStage.calls.reset(); mapModel.dispatchEvent('nodeFocusRequested', '11.12'); expect(stage.data('scale')).toBe(1); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); }); it('does not immediately change viewport', function () { mapModel.dispatchEvent('nodeFocusRequested', '11.12'); expect(viewPort.scrollLeft()).toBe(180); expect(viewPort.scrollTop()).toBe(80); }); it('schedules an animation for the viewport', function () { mapModel.dispatchEvent('nodeFocusRequested', '11.12'); expect(jQuery.fn.animate.calls.count()).toBe(1); expect(jQuery.fn.animate).toHaveBeenCalledWith({scrollLeft: 110, scrollTop: 55}, {duration: 400}); expect(jQuery.fn.animate).toHaveBeenCalledOnJQueryObject(viewPort); }); it('does not expand the stage if not needed', function () { mapModel.dispatchEvent('nodeFocusRequested', '11.12'); expect(stage.data()).toEqual({ 'offsetX': 100, 'offsetY': 50, 'scale': 1, 'width': 400, 'height': 300 }); expect(jQuery.fn.updateStage).not.toHaveBeenCalled(); }); describe('expands the stage to enable scrolling to the node point when the node is ', [ ['left', -50, 50, 140, 50, 440, 300], ['top', 100, -40, 100, 85, 400, 335], ['right', 270, 50, 100, 50, 480, 300], ['bottom', 100, 230, 100, 50, 400, 335] ], function (nodeX, nodeY, expectedStageOffsetX, expectedStageOffsetY, expectedStageWidth, expectedStageHeight) { jQuery('#node_11_12').data({x: nodeX, y: nodeY}); mapModel.dispatchEvent('nodeFocusRequested', '11.12'); expect(jQuery.fn.updateStage).toHaveBeenCalledOnJQueryObject(stage); expect(stage.data('offsetX')).toEqual(expectedStageOffsetX); expect(stage.data('offsetY')).toEqual(expectedStageOffsetY); expect(stage.data('width')).toEqual(expectedStageWidth); expect(stage.data('height')).toEqual(expectedStageHeight); } ); }); describe('image drag and drop', function () { it('converts event coordinates to stage coordinates and delegates to mapModel.dropImage', function () { viewPort.css({'width': '100px', 'height': '50px', 'overflow': 'scroll', 'top': '10px', 'left': '10px', 'position': 'absolute'}); stage.data({offsetX: 200, offsetY: 100, width: 300, height: 150, scale: 2}).updateStage(); viewPort.scrollLeft(20); viewPort.scrollTop(10); imageInsertController.dispatchEvent('imageInserted', 'http://url', 666, 777, {pageX: 70, pageY: 50}); expect(mapModel.dropImage).toHaveBeenCalledWith('http://url', 666, 777, -160, -75); expect(resourceTranslator).not.toHaveBeenCalled(); }); }); }); });
src/components/slider/demos/disabled.js
isogon/material-components
import React from 'react' import { Slider } from '../../../' export default () => <Slider min={0} max={100} defaultValue={60} disabled />
front_end/front_end_app/src/client/todos/tocheck.react.js
carlodicelico/horizon
import Component from '../components/component.react'; import React from 'react'; import {FormattedHTMLMessage} from 'react-intl'; import {Link} from 'react-router'; export default class ToCheck extends Component { static propTypes = { msg: React.PropTypes.object.isRequired } render() { const {msg} = this.props; return ( <div className="tocheck"> <h3>{msg.header}</h3> <ul> {msg.itemListHtml.map(item => <li key={item.key}> <FormattedHTMLMessage message={item.txt} /> </li> )} <li> {msg.isomorphicPage}{' '} <Link to="/this-is-not-the-web-page-you-are-looking-for">404</Link>. </li> <li> {msg.andMuchMore} </li> </ul> </div> ); } }
imports/ui/components/home.js
AdmitHub/ScholarFisher
import React from 'react' import { Link } from 'react-router' import Burger from './burger'; export default class Home extends React.Component { render() { return ( <div> <div className="hero container-fluid header"> <div className="col-xs-1"> <Burger /> </div> <div className="col-xs-10"> <img className="fisher-logo logo" src="/img/fisherhouse-logo.png" alt="" /> <h2 className="text-center">SCHOLARSHIPS</h2> <div className="fancy text-center"> <h3>FOR SERVICE</h3> </div> </div> </div> <div className="flex-container col"> <div className="flexbox"> <h4 className="text-center"> <i className="fa fa-star"></i> YOUR SCHOLARSHIPS <i className="fa fa-star"></i> </h4> <p className="text-center"> You and your family's service for our country qualifies you for unique funding opportunities. We'll help you find the best matches for your educational goals. </p> </div> <div className="flexbox"> <h4 className="text-center"> <i className="fa fa-star"></i> CUSTOMIZED RESULTS <i className="fa fa-star"></i> </h4> <p className="text-center"> When you finish, you have a customized list of all the scholarships, fellowships, grants, awards, and other funding opportunities that match your goals. </p> </div> <div className="flexbox"> <h4 className="text-center"> <i className="fa fa-star"></i> QUESTIONS <i className="fa fa-star"></i> </h4> <p className="text-center"> If you aren’t sure exactly how best to respond to a question you can click on the question title for more details. </p> </div> </div> <footer className="col-xs-12"> <Link to="/options"> <div className="block"> <button className="button secondary-color"> START </button> </div> </Link> </footer> </div> ); } }
packages/material-ui-icons/src/PlayForWorkTwoTone.js
Kagami/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><path d="M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5h-2zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6z" /></React.Fragment> , 'PlayForWorkTwoTone');
analysis/deathknightblood/src/modules/features/Ossuary.js
anom0ly/WoWAnalyzer
import { t } from '@lingui/macro'; import { formatPercentage } from 'common/format'; import SPELLS from 'common/SPELLS'; import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer'; import Events from 'parser/core/Events'; import BoringSpellValueText from 'parser/ui/BoringSpellValueText'; import Statistic from 'parser/ui/Statistic'; import STATISTIC_ORDER from 'parser/ui/STATISTIC_ORDER'; import React from 'react'; const OSSUARY_RUNICPOWER_REDUCTION = 5; class Ossuary extends Analyzer { dsWithOS = 0; dsWithoutOS = 0; get uptime() { return this.selectedCombatant.getBuffUptime(SPELLS.OSSUARY.id) / this.owner.fightDuration; } get buffedDeathStrikes() { return this.dsWithOS / (this.dsWithOS + this.dsWithoutOS); } constructor(options) { super(options); this.addEventListener(Events.cast.by(SELECTED_PLAYER).spell(SPELLS.DEATH_STRIKE), this.onCast); } onCast(event) { if (this.selectedCombatant.hasBuff(SPELLS.OSSUARY.id)) { this.dsWithOS += 1; } else { this.dsWithoutOS += 1; event.meta = event.meta || {}; event.meta.isInefficientCast = true; event.meta.inefficientCastReason = `This Death Strike cast was without Ossuary.`; } } get efficiencySuggestionThresholds() { return { actual: this.buffedDeathStrikes, isLessThan: { minor: 1, average: 0.9, major: 0.85, }, style: 'percentage', }; } get uptimeSuggestionThresholds() { return { actual: this.uptime, isLessThan: { minor: 0.95, average: 0.9, major: 0.8, }, style: 'percentage', }; } suggestions(when) { when(this.efficiencySuggestionThresholds).addSuggestion((suggest, actual, recommended) => suggest( 'Your Ossuary usage can be improved. Avoid casting Death Strike while not having Ossuary up as you lose Runic Power by doing so.', ) .icon(SPELLS.OSSUARY.icon) .actual( t({ id: 'deathknight.blood.suggestions.ossuary.efficiency', message: `${formatPercentage(actual)}% Ossuary efficiency`, }), ) .recommended(`${formatPercentage(recommended)}% is recommended`), ); } statistic() { return ( <Statistic position={STATISTIC_ORDER.CORE(3)} size="flexible" tooltip={ <> {this.dsWithoutOS * OSSUARY_RUNICPOWER_REDUCTION} RP wasted by casting them without Ossuary up. <br /> {this.dsWithOS * OSSUARY_RUNICPOWER_REDUCTION} RP saved by casting them with Ossuary up. <br /> {formatPercentage(this.uptime)}% uptime. </> } > <BoringSpellValueText spell={SPELLS.OSSUARY}> <> {this.dsWithoutOS} / {this.dsWithOS + this.dsWithoutOS}{' '} <small>Death Strikes without Ossuary</small> </> </BoringSpellValueText> </Statistic> ); } } export default Ossuary;
app/components/MediumEditor/index.js
Zurico/t7
// MIT: FormidableLabs/component-playground import blacklist from 'blacklist'; import React from 'react'; import ReactDOM from 'react-dom'; import 'katex/dist/katex.min.css'; import 'medium-editor/dist/css/medium-editor.css'; import 'medium-editor/dist/css/themes/default.css'; import MediumEditor from 'medium-editor'; import katex from 'katex'; const KatexButton = MediumEditor.Extension.extend({ name: 'katex', init: function () { this.button = this.document.createElement('button'); this.button.classList.add('medium-editor-action'); this.button.innerHTML = '<b>M</b>'; this.button.title = 'Katex'; this.on(this.button, 'click', this.handleClick.bind(this)); }, getButton: function () { return this.button; }, handleClick: function (event) { var sel, range; if (window.getSelection) { // IE9 and non-IE sel = window.getSelection(); if (sel.getRangeAt && sel.rangeCount) { range = sel.getRangeAt(0); //range.deleteContents(); console.log(range); } } const el = document.createElement('span'); const tn = document.createTextNode(''); this.base.getSelectedParentElement().appendChild(el); this.base.getSelectedParentElement().appendChild(tn); // katex.render("c = \\pm\\sqrt{a^2 + b^2}", this.refs.math, { displayMode: true }); katex.render(this.base.getSelectedParentElement().textContent, this.base.getSelectedParentElement()); katex.render(this.base.getSelectedParentElement().textContent, el); this.base.checkContentChanged(); }, isAlreadyApplied: function (node) { return node.classList.contains('katex-display'); }, isActive: function () { return this.button.classList.contains('medium-editor-button-active'); }, setInactive: function () { this.button.classList.remove('medium-editor-button-active'); }, setActive: function () { this.button.classList.add('medium-editor-button-active'); } }); export default class ReactMediumEditor extends React.Component { static defaultProps = { tag: 'div' }; constructor(props) { super(props); this.state = { text: this.props.text }; } componentDidMount() { const dom = ReactDOM.findDOMNode(this); this.props.options.extensions= { 'katex': new KatexButton() }; console.log(this.props.options) this.medium = new MediumEditor(dom, this.props.options); this.medium.subscribe('editableInput', (e) => { this._updated = true; this.change(dom.innerHTML); }); } componentDidUpdate() { this.medium.restoreSelection(); } componentWillUnmount() { this.medium.destroy(); } componentWillReceiveProps(nextProps) { if (nextProps.text !== this.state.text && !this._updated) { this.setState({ text: nextProps.text }); } if (this._updated) this._updated = false; } render() { const tag = this.props.tag; const props = blacklist(this.props, 'options', 'text', 'tag', 'contentEditable', 'dangerouslySetInnerHTML'); Object.assign(props, { dangerouslySetInnerHTML: { __html: this.state.text } }); if (this.medium) { this.medium.saveSelection(); } return React.createElement(tag, props); } change(text) { if (this.props.onChange) this.props.onChange(text, this.medium); } }
src/components/home/index.js
OpenChemistry/mongochemclient
import React, { Component } from 'react'; import withStyles from '@material-ui/core/styles/withStyles'; import Typography from '@material-ui/core/Typography'; import Grid from '@material-ui/core/Grid'; import Card from '@material-ui/core/Card'; import Paper from '@material-ui/core/Paper'; import Button from '@material-ui/core/Button'; import grey from '@material-ui/core/colors/grey'; import ChromeReaderIcon from '@material-ui/icons/ChromeReaderMode' import ContactsIcon from '@material-ui/icons/ImportContacts'; import GroupIcon from '@material-ui/icons/GroupWork'; import { TwitterTimelineEmbed } from 'react-twitter-embed'; import PageHead from '../page-head'; import PageBody from '../page-body'; import BlogFeed from './blog'; import { wc } from '../../utils/webcomponent'; import './index.css'; import { isNil } from 'lodash-es'; const style = theme => ( { root: { height: '100%', display: 'flex', flexDirection: 'column' }, header: { paddingBottom: '0.75rem' }, body: { flexGrow: 1, marginTop: 0 }, evenColumns: { backgroundColor: 'none', padding: theme.spacing.unit * 3 }, oddColumns: { backgroundColor: grey[200], padding: theme.spacing.unit * 3 }, molecule: { width: '100%', height: theme.spacing.unit * 40, marginBottom: theme.spacing.unit * 3 }, columnTitle: { marginBottom: theme.spacing.unit * 3 } } ) let EmbeddedVideo = () => { return ( <Card> <div className="intrinsic-container intrinsic-container-16x9"> <iframe title="reproducible-quantum-chemistry" src="https://www.youtube.com/embed/31THsQEyjYQ" frameBorder="0" allowFullScreen></iframe> </div> </Card> ); } class Home extends Component { constructor(props) { super(props); this.state = { molecules: { 0: null, 1: null }, rotate: true, posts: null } } // Fake fetch of a molecule of the week componentDidMount() { const inchiKeys = [ 'RYYVLZVUVIJVGH-UHFFFAOYSA-N', 'TYQCGQRIZGCHNB-DUZGATOHSA-N' ]; for (let i = 0; i < inchiKeys.length; ++i) { fetch(`/api/v1/molecules/inchikey/${inchiKeys[i]}`) .then((res) => { if (res.status === 200) { res.json() .then((molecule) => { if (molecule && molecule.cjson) { this.setState((state, props) => { state.molecules[i] = molecule.cjson; }); } }); } }); } fetch('https://blog.kitware.com/wp-json/wp/v2/posts?tags=12&per_page=4') .then((res) => { return res.json(); }) .then((posts) => { this.setState({...this.state, posts: posts}); }); } onMoleculeInteract() { if (this.state.rotate) { this.setState({...this.state, rotate: false}); } } render = () => { const { classes } = this.props; const { molecules, rotate, posts } = this.state; return ( <div className={classes.root}> <div className={classes.header}> <PageHead noOverlap> <Grid container spacing={24} alignItems="center"> <Grid item xs={12} md={7}> <Typography color="inherit" gutterBottom variant="display1"> Open Chemistry Data Platform </Typography> <Typography variant="title" paragraph color="inherit"> Prototype data server, online notebook, visualization, and analytics </Typography> <Typography color="inherit" gutterBottom variant="body2"> Welcome to the online home of the Open Chemistry Data Platform, open source project, currently in beta, and deployed on AWS. This project offers a powerful data server, using RESTful APIs, using Python, CherryPy, Girder, and many other open source projects. </Typography> <Typography color="inherit" gutterBottom variant="body2"> The screencast shows an early version of the platform executing computational chemistry calculations using NWChem, with a JupyterLab frontend, and a number of visualization/analytics capabilites from 3DMol, vtk.js, and D3. Code for the platform is hosted on <a href="https://github.com/openchemistry" target="_blank" rel="noopener noreferrer">GitHub</a>. </Typography> </Grid> <Grid item xs={12} md={5}> <div> <EmbeddedVideo/> </div> </Grid> </Grid> </PageHead> </div> <div className={classes.body}> <PageBody noOverlap> <Grid container style={{height: '100%'}} alignItems="stretch"> <Grid item xs={12} md={4} className={classes.evenColumns}> <div className={classes.columnTitle}> <Typography gutterBottom variant="title" color="textSecondary"> <ContactsIcon />&nbsp;Blog </Typography> </div> <BlogFeed posts={posts} /> <Button href="https://blog.kitware.com/tag/open-chemistry/" target="_blank">More posts</Button> </Grid> <Grid item xs={12} md={4} className={classes.oddColumns}> <div className={classes.columnTitle}> <Typography gutterBottom variant="title" color="textSecondary"> <ChromeReaderIcon />&nbsp;Feed </Typography> </div> <Paper> <TwitterTimelineEmbed sourceType="profile" screenName="openchem" options={{height: 800}} /> </Paper> </Grid> <Grid item xs={12} md={4} className={classes.evenColumns}> <div className={classes.columnTitle}> <Typography variant="title" color="textSecondary"> <GroupIcon />&nbsp;Structures </Typography> </div> {Object.values(molecules).map((cjson, i) => { if (isNil(cjson)) { return null; } return ( <Paper className={classes.molecule} onMouseEnter={(e) => {this.onMoleculeInteract()}} key={i} > {cjson && <oc-molecule ref={wc( {}, { cjson, rotate, moleculeRenderer: 'moljs' } )} /> } </Paper> ) })} </Grid> </Grid> </PageBody> </div> </div> ); } } export default withStyles(style)(Home);
src/app/components/Footer.js
akzuki/BoardgameAPI
import React from 'react'; export class Footer extends React.Component { render() { return ( <footer> <div className="container"> <div className="row text-center"> <ul className="list-inline"> <li> <a href="#"><i className="fa fa-facebook fa-2x"></i></a> </li> <li> <a href="#"><i className="fa fa-dropbox fa-2x"></i></a> </li> <li> <a href="#"><i className="fa fa-flickr fa-2x"></i></a> </li> <li> <a href="#"><i className="fa fa-github fa-2x"></i></a> </li> <li> <a href="#"><i className="fa fa-linkedin fa-2x"></i></a> </li> <li> <a href="#"><i className="fa fa-tumblr fa-2x"></i></a> </li> </ul> </div> <div className="row text-center"> <ul className="menu list-inline"> <li> <a href="#">Home</a> </li> <li> <a href="#">About</a> </li> <li> <a href="#">Blog</a> </li> <li> <a href="#">Gallery</a> </li> <li> <a href="#">Contact</a> </li> </ul> </div> </div> </footer> ); } }
ajax/libs/yui/3.10.0/datatable-body/datatable-body.js
AlicanC/cdnjs
YUI.add('datatable-body', function (Y, NAME) { /** View class responsible for rendering the `<tbody>` section of a table. Used as the default `bodyView` for `Y.DataTable.Base` and `Y.DataTable` classes. @module datatable @submodule datatable-body @since 3.5.0 **/ var Lang = Y.Lang, isArray = Lang.isArray, isNumber = Lang.isNumber, isString = Lang.isString, fromTemplate = Lang.sub, htmlEscape = Y.Escape.html, toArray = Y.Array, bind = Y.bind, YObject = Y.Object, valueRegExp = /\{value\}/g; /** View class responsible for rendering the `<tbody>` section of a table. Used as the default `bodyView` for `Y.DataTable.Base` and `Y.DataTable` classes. Translates the provided `modelList` into a rendered `<tbody>` based on the data in the constituent Models, altered or ammended by any special column configurations. The `columns` configuration, passed to the constructor, determines which columns will be rendered. The rendering process involves constructing an HTML template for a complete row of data, built by concatenating a customized copy of the instance's `CELL_TEMPLATE` into the `ROW_TEMPLATE` once for each column. This template is then populated with values from each Model in the `modelList`, aggregating a complete HTML string of all row and column data. A `<tbody>` Node is then created from the markup and any column `nodeFormatter`s are applied. Supported properties of the column objects include: * `key` - Used to link a column to an attribute in a Model. * `name` - Used for columns that don't relate to an attribute in the Model (`formatter` or `nodeFormatter` only) if the implementer wants a predictable name to refer to in their CSS. * `cellTemplate` - Overrides the instance's `CELL_TEMPLATE` for cells in this column only. * `formatter` - Used to customize or override the content value from the Model. These do not have access to the cell or row Nodes and should return string (HTML) content. * `nodeFormatter` - Used to provide content for a cell as well as perform any custom modifications on the cell or row Node that could not be performed by `formatter`s. Should be used sparingly for better performance. * `emptyCellValue` - String (HTML) value to use if the Model data for a column, or the content generated by a `formatter`, is the empty string, `null`, or `undefined`. * `allowHTML` - Set to `true` if a column value, `formatter`, or `emptyCellValue` can contain HTML. This defaults to `false` to protect against XSS. * `className` - Space delimited CSS classes to add to all `<td>`s in a column. A column `formatter` can be: * a function, as described below. * a string which can be: * the name of a pre-defined formatter function which can be located in the `Y.DataTable.BodyView.Formatters` hash using the value of the `formatter` property as the index. * A template that can use the `{value}` placeholder to include the value for the current cell or the name of any field in the underlaying model also enclosed in curly braces. Any number and type of these placeholders can be used. Column `formatter`s are passed an object (`o`) with the following properties: * `value` - The current value of the column's associated attribute, if any. * `data` - An object map of Model keys to their current values. * `record` - The Model instance. * `column` - The column configuration object for the current column. * `className` - Initially empty string to allow `formatter`s to add CSS classes to the cell's `<td>`. * `rowIndex` - The zero-based row number. * `rowClass` - Initially empty string to allow `formatter`s to add CSS classes to the cell's containing row `<tr>`. They may return a value or update `o.value` to assign specific HTML content. A returned value has higher precedence. Column `nodeFormatter`s are passed an object (`o`) with the following properties: * `value` - The current value of the column's associated attribute, if any. * `td` - The `<td>` Node instance. * `cell` - The `<div>` liner Node instance if present, otherwise, the `<td>`. When adding content to the cell, prefer appending into this property. * `data` - An object map of Model keys to their current values. * `record` - The Model instance. * `column` - The column configuration object for the current column. * `rowIndex` - The zero-based row number. They are expected to inject content into the cell's Node directly, including any "empty" cell content. Each `nodeFormatter` will have access through the Node API to all cells and rows in the `<tbody>`, but not to the `<table>`, as it will not be attached yet. If a `nodeFormatter` returns `false`, the `o.td` and `o.cell` Nodes will be `destroy()`ed to remove them from the Node cache and free up memory. The DOM elements will remain as will any content added to them. _It is highly advisable to always return `false` from your `nodeFormatter`s_. @class BodyView @namespace DataTable @extends View @since 3.5.0 **/ Y.namespace('DataTable').BodyView = Y.Base.create('tableBody', Y.View, [], { // -- Instance properties ------------------------------------------------- /** HTML template used to create table cells. @property CELL_TEMPLATE @type {HTML} @default '<td {headers} class="{className}">{content}</td>' @since 3.5.0 **/ CELL_TEMPLATE: '<td {headers} class="{className}">{content}</td>', /** CSS class applied to even rows. This is assigned at instantiation. For DataTable, this will be `yui3-datatable-even`. @property CLASS_EVEN @type {String} @default 'yui3-table-even' @since 3.5.0 **/ //CLASS_EVEN: null /** CSS class applied to odd rows. This is assigned at instantiation. When used by DataTable instances, this will be `yui3-datatable-odd`. @property CLASS_ODD @type {String} @default 'yui3-table-odd' @since 3.5.0 **/ //CLASS_ODD: null /** HTML template used to create table rows. @property ROW_TEMPLATE @type {HTML} @default '<tr id="{rowId}" data-yui3-record="{clientId}" class="{rowClass}">{content}</tr>' @since 3.5.0 **/ ROW_TEMPLATE : '<tr id="{rowId}" data-yui3-record="{clientId}" class="{rowClass}">{content}</tr>', /** The object that serves as the source of truth for column and row data. This property is assigned at instantiation from the `host` property of the configuration object passed to the constructor. @property host @type {Object} @default (initially unset) @since 3.5.0 **/ //TODO: should this be protected? //host: null, /** HTML templates used to create the `<tbody>` containing the table rows. @property TBODY_TEMPLATE @type {HTML} @default '<tbody class="{className}">{content}</tbody>' @since 3.6.0 **/ TBODY_TEMPLATE: '<tbody class="{className}"></tbody>', // -- Public methods ------------------------------------------------------ /** Returns the `<td>` Node from the given row and column index. Alternately, the `seed` can be a Node. If so, the nearest ancestor cell is returned. If the `seed` is a cell, it is returned. If there is no cell at the given coordinates, `null` is returned. Optionally, include an offset array or string to return a cell near the cell identified by the `seed`. The offset can be an array containing the number of rows to shift followed by the number of columns to shift, or one of "above", "below", "next", or "previous". <pre><code>// Previous cell in the previous row var cell = table.getCell(e.target, [-1, -1]); // Next cell var cell = table.getCell(e.target, 'next'); var cell = table.getCell(e.taregt, [0, 1];</pre></code> @method getCell @param {Number[]|Node} seed Array of row and column indexes, or a Node that is either the cell itself or a descendant of one. @param {Number[]|String} [shift] Offset by which to identify the returned cell Node @return {Node} @since 3.5.0 **/ getCell: function (seed, shift) { var tbody = this.tbodyNode, row, cell, index, rowIndexOffset; if (seed && tbody) { if (isArray(seed)) { row = tbody.get('children').item(seed[0]); cell = row && row.get('children').item(seed[1]); } else if (Y.instanceOf(seed, Y.Node)) { cell = seed.ancestor('.' + this.getClassName('cell'), true); } if (cell && shift) { rowIndexOffset = tbody.get('firstChild.rowIndex'); if (isString(shift)) { // TODO this should be a static object map switch (shift) { case 'above' : shift = [-1, 0]; break; case 'below' : shift = [1, 0]; break; case 'next' : shift = [0, 1]; break; case 'previous': shift = [0, -1]; break; } } if (isArray(shift)) { index = cell.get('parentNode.rowIndex') + shift[0] - rowIndexOffset; row = tbody.get('children').item(index); index = cell.get('cellIndex') + shift[1]; cell = row && row.get('children').item(index); } } } return cell || null; }, /** Returns the generated CSS classname based on the input. If the `host` attribute is configured, it will attempt to relay to its `getClassName` or use its static `NAME` property as a string base. If `host` is absent or has neither method nor `NAME`, a CSS classname will be generated using this class's `NAME`. @method getClassName @param {String} token* Any number of token strings to assemble the classname from. @return {String} @protected @since 3.5.0 **/ getClassName: function () { var host = this.host, args; if (host && host.getClassName) { return host.getClassName.apply(host, arguments); } else { args = toArray(arguments); args.unshift(this.constructor.NAME); return Y.ClassNameManager.getClassName .apply(Y.ClassNameManager, args); } }, /** Returns the Model associated to the row Node or id provided. Passing the Node or id for a descendant of the row also works. If no Model can be found, `null` is returned. @method getRecord @param {String|Node} seed Row Node or `id`, or one for a descendant of a row @return {Model} @since 3.5.0 **/ getRecord: function (seed) { var modelList = this.get('modelList'), tbody = this.tbodyNode, row = null, record; if (tbody) { if (isString(seed)) { seed = tbody.one('#' + seed); } if (Y.instanceOf(seed, Y.Node)) { row = seed.ancestor(function (node) { return node.get('parentNode').compareTo(tbody); }, true); record = row && modelList.getByClientId(row.getData('yui3-record')); } } return record || null; }, /** Returns the `<tr>` Node from the given row index, Model, or Model's `clientId`. If the rows haven't been rendered yet, or if the row can't be found by the input, `null` is returned. @method getRow @param {Number|String|Model} id Row index, Model instance, or clientId @return {Node} @since 3.5.0 **/ getRow: function (id) { var tbody = this.tbodyNode, row = null; if (tbody) { if (id) { id = this._idMap[id.get ? id.get('clientId') : id] || id; } row = isNumber(id) ? tbody.get('children').item(id) : tbody.one('#' + id); } return row; }, /** Creates the table's `<tbody>` content by assembling markup generated by populating the `ROW\_TEMPLATE`, and `CELL\_TEMPLATE` templates with content from the `columns` and `modelList` attributes. The rendering process happens in three stages: 1. A row template is assembled from the `columns` attribute (see `_createRowTemplate`) 2. An HTML string is built up by concatening the application of the data in each Model in the `modelList` to the row template. For cells with `formatter`s, the function is called to generate cell content. Cells with `nodeFormatter`s are ignored. For all other cells, the data value from the Model attribute for the given column key is used. The accumulated row markup is then inserted into the container. 3. If any column is configured with a `nodeFormatter`, the `modelList` is iterated again to apply the `nodeFormatter`s. Supported properties of the column objects include: * `key` - Used to link a column to an attribute in a Model. * `name` - Used for columns that don't relate to an attribute in the Model (`formatter` or `nodeFormatter` only) if the implementer wants a predictable name to refer to in their CSS. * `cellTemplate` - Overrides the instance's `CELL_TEMPLATE` for cells in this column only. * `formatter` - Used to customize or override the content value from the Model. These do not have access to the cell or row Nodes and should return string (HTML) content. * `nodeFormatter` - Used to provide content for a cell as well as perform any custom modifications on the cell or row Node that could not be performed by `formatter`s. Should be used sparingly for better performance. * `emptyCellValue` - String (HTML) value to use if the Model data for a column, or the content generated by a `formatter`, is the empty string, `null`, or `undefined`. * `allowHTML` - Set to `true` if a column value, `formatter`, or `emptyCellValue` can contain HTML. This defaults to `false` to protect against XSS. * `className` - Space delimited CSS classes to add to all `<td>`s in a column. Column `formatter`s are passed an object (`o`) with the following properties: * `value` - The current value of the column's associated attribute, if any. * `data` - An object map of Model keys to their current values. * `record` - The Model instance. * `column` - The column configuration object for the current column. * `className` - Initially empty string to allow `formatter`s to add CSS classes to the cell's `<td>`. * `rowIndex` - The zero-based row number. * `rowClass` - Initially empty string to allow `formatter`s to add CSS classes to the cell's containing row `<tr>`. They may return a value or update `o.value` to assign specific HTML content. A returned value has higher precedence. Column `nodeFormatter`s are passed an object (`o`) with the following properties: * `value` - The current value of the column's associated attribute, if any. * `td` - The `<td>` Node instance. * `cell` - The `<div>` liner Node instance if present, otherwise, the `<td>`. When adding content to the cell, prefer appending into this property. * `data` - An object map of Model keys to their current values. * `record` - The Model instance. * `column` - The column configuration object for the current column. * `rowIndex` - The zero-based row number. They are expected to inject content into the cell's Node directly, including any "empty" cell content. Each `nodeFormatter` will have access through the Node API to all cells and rows in the `<tbody>`, but not to the `<table>`, as it will not be attached yet. If a `nodeFormatter` returns `false`, the `o.td` and `o.cell` Nodes will be `destroy()`ed to remove them from the Node cache and free up memory. The DOM elements will remain as will any content added to them. _It is highly advisable to always return `false` from your `nodeFormatter`s_. @method render @return {BodyView} The instance @chainable @since 3.5.0 **/ render: function () { var table = this.get('container'), data = this.get('modelList'), columns = this.get('columns'), tbody = this.tbodyNode || (this.tbodyNode = this._createTBodyNode()); // Needed for mutation this._createRowTemplate(columns); if (data) { tbody.setHTML(this._createDataHTML(columns)); this._applyNodeFormatters(tbody, columns); } if (tbody.get('parentNode') !== table) { table.appendChild(tbody); } this._afterRenderCleanup(); this.bindUI(); return this; }, // -- Protected and private methods --------------------------------------- /** Handles changes in the source's columns attribute. Redraws the table data. @method _afterColumnsChange @param {EventFacade} e The `columnsChange` event object @protected @since 3.5.0 **/ // TODO: Preserve existing DOM // This will involve parsing and comparing the old and new column configs // and reacting to four types of changes: // 1. formatter, nodeFormatter, emptyCellValue changes // 2. column deletions // 3. column additions // 4. column moves (preserve cells) _afterColumnsChange: function () { this.render(); }, /** Handles modelList changes, including additions, deletions, and updates. Modifies the existing table DOM accordingly. @method _afterDataChange @param {EventFacade} e The `change` event from the ModelList @protected @since 3.5.0 **/ _afterDataChange: function () { //var type = e.type.slice(e.type.lastIndexOf(':') + 1); // TODO: Isolate changes this.render(); }, /** Handles replacement of the modelList. Rerenders the `<tbody>` contents. @method _afterModelListChange @param {EventFacade} e The `modelListChange` event @protected @since 3.6.0 **/ _afterModelListChange: function () { var handles = this._eventHandles; if (handles.dataChange) { handles.dataChange.detach(); delete handles.dataChange; this.bindUI(); } if (this.tbodyNode) { this.render(); } }, /** Iterates the `modelList`, and calls any `nodeFormatter`s found in the `columns` param on the appropriate cell Nodes in the `tbody`. @method _applyNodeFormatters @param {Node} tbody The `<tbody>` Node whose columns to update @param {Object[]} columns The column configurations @protected @since 3.5.0 **/ _applyNodeFormatters: function (tbody, columns) { var host = this.host, data = this.get('modelList'), formatters = [], linerQuery = '.' + this.getClassName('liner'), rows, i, len; // Only iterate the ModelList again if there are nodeFormatters for (i = 0, len = columns.length; i < len; ++i) { if (columns[i].nodeFormatter) { formatters.push(i); } } if (data && formatters.length) { rows = tbody.get('childNodes'); data.each(function (record, index) { var formatterData = { data : record.toJSON(), record : record, rowIndex : index }, row = rows.item(index), i, len, col, key, cells, cell, keep; if (row) { cells = row.get('childNodes'); for (i = 0, len = formatters.length; i < len; ++i) { cell = cells.item(formatters[i]); if (cell) { col = formatterData.column = columns[formatters[i]]; key = col.key || col.id; formatterData.value = record.get(key); formatterData.td = cell; formatterData.cell = cell.one(linerQuery) || cell; keep = col.nodeFormatter.call(host,formatterData); if (keep === false) { // Remove from the Node cache to reduce // memory footprint. This also purges events, // which you shouldn't be scoping to a cell // anyway. You've been warned. Incidentally, // you should always return false. Just sayin. cell.destroy(true); } } } } }); } }, /** Binds event subscriptions from the UI and the host (if assigned). @method bindUI @protected @since 3.5.0 **/ bindUI: function () { var handles = this._eventHandles, modelList = this.get('modelList'), changeEvent = modelList.model.NAME + ':change'; if (!handles.columnsChange) { handles.columnsChange = this.after('columnsChange', bind('_afterColumnsChange', this)); } if (modelList && !handles.dataChange) { handles.dataChange = modelList.after( ['add', 'remove', 'reset', changeEvent], bind('_afterDataChange', this)); } }, /** Iterates the `modelList` and applies each Model to the `_rowTemplate`, allowing any column `formatter` or `emptyCellValue` to override cell content for the appropriate column. The aggregated HTML string is returned. @method _createDataHTML @param {Object[]} columns The column configurations to customize the generated cell content or class names @return {HTML} The markup for all Models in the `modelList`, each applied to the `_rowTemplate` @protected @since 3.5.0 **/ _createDataHTML: function (columns) { var data = this.get('modelList'), html = ''; if (data) { data.each(function (model, index) { html += this._createRowHTML(model, index, columns); }, this); } return html; }, /** Applies the data of a given Model, modified by any column formatters and supplemented by other template values to the instance's `_rowTemplate` (see `_createRowTemplate`). The generated string is then returned. The data from Model's attributes is fetched by `toJSON` and this data object is appended with other properties to supply values to {placeholders} in the template. For a template generated from a Model with 'foo' and 'bar' attributes, the data object would end up with the following properties before being used to populate the `_rowTemplate`: * `clientID` - From Model, used the assign the `<tr>`'s 'id' attribute. * `foo` - The value to populate the 'foo' column cell content. This value will be the value stored in the Model's `foo` attribute, or the result of the column's `formatter` if assigned. If the value is '', `null`, or `undefined`, and the column's `emptyCellValue` is assigned, that value will be used. * `bar` - Same for the 'bar' column cell content. * `foo-className` - String of CSS classes to apply to the `<td>`. * `bar-className` - Same. * `rowClass` - String of CSS classes to apply to the `<tr>`. This will be the odd/even class per the specified index plus any additional classes assigned by column formatters (via `o.rowClass`). Because this object is available to formatters, any additional properties can be added to fill in custom {placeholders} in the `_rowTemplate`. @method _createRowHTML @param {Model} model The Model instance to apply to the row template @param {Number} index The index the row will be appearing @param {Object[]} columns The column configurations @return {HTML} The markup for the provided Model, less any `nodeFormatter`s @protected @since 3.5.0 **/ _createRowHTML: function (model, index, columns) { var data = model.toJSON(), clientId = model.get('clientId'), values = { rowId : this._getRowId(clientId), clientId: clientId, rowClass: (index % 2) ? this.CLASS_ODD : this.CLASS_EVEN }, host = this.host || this, i, len, col, token, value, formatterData; for (i = 0, len = columns.length; i < len; ++i) { col = columns[i]; value = data[col.key]; token = col._id || col.key; values[token + '-className'] = ''; if (col._formatterFn) { formatterData = { value : value, data : data, column : col, record : model, className: '', rowClass : '', rowIndex : index }; // Formatters can either return a value value = col._formatterFn.call(host, formatterData); // or update the value property of the data obj passed if (value === undefined) { value = formatterData.value; } values[token + '-className'] = formatterData.className; values.rowClass += ' ' + formatterData.rowClass; } if (value === undefined || value === null || value === '') { value = col.emptyCellValue || ''; } values[token] = col.allowHTML ? value : htmlEscape(value); values.rowClass = values.rowClass.replace(/\s+/g, ' '); } return fromTemplate(this._rowTemplate, values); }, /** Creates a custom HTML template string for use in generating the markup for individual table rows with {placeholder}s to capture data from the Models in the `modelList` attribute or from column `formatter`s. Assigns the `_rowTemplate` property. @method _createRowTemplate @param {Object[]} columns Array of column configuration objects @protected @since 3.5.0 **/ _createRowTemplate: function (columns) { var html = '', cellTemplate = this.CELL_TEMPLATE, F = Y.DataTable.BodyView.Formatters, i, len, col, key, token, headers, tokenValues, formatter; for (i = 0, len = columns.length; i < len; ++i) { col = columns[i]; key = col.key; token = col._id || key; formatter = col.formatter; // Only include headers if there are more than one headers = (col._headers || []).length > 1 ? 'headers="' + col._headers.join(' ') + '"' : ''; tokenValues = { content : '{' + token + '}', headers : headers, className: this.getClassName('col', token) + ' ' + (col.className || '') + ' ' + this.getClassName('cell') + ' {' + token + '-className}' }; if (formatter) { if (Lang.isFunction(formatter)) { col._formatterFn = formatter; } else if (formatter in F) { col._formatterFn = F[formatter].call(this.host || this, col); } else { tokenValues.content = formatter.replace(valueRegExp, tokenValues.content); } } if (col.nodeFormatter) { // Defer all node decoration to the formatter tokenValues.content = ''; } html += fromTemplate(col.cellTemplate || cellTemplate, tokenValues); } this._rowTemplate = fromTemplate(this.ROW_TEMPLATE, { content: html }); }, /** Cleans up temporary values created during rendering. @method _afterRenderCleanup @private */ _afterRenderCleanup: function () { var columns = this.get('columns'), i, len = columns.length; for (i = 0;i < len; i+=1) { delete columns[i]._formatterFn; } }, /** Creates the `<tbody>` node that will store the data rows. @method _createTBodyNode @return {Node} @protected @since 3.6.0 **/ _createTBodyNode: function () { return Y.Node.create(fromTemplate(this.TBODY_TEMPLATE, { className: this.getClassName('data') })); }, /** Destroys the instance. @method destructor @protected @since 3.5.0 **/ destructor: function () { (new Y.EventHandle(YObject.values(this._eventHandles))).detach(); }, /** Holds the event subscriptions needing to be detached when the instance is `destroy()`ed. @property _eventHandles @type {Object} @default undefined (initially unset) @protected @since 3.5.0 **/ //_eventHandles: null, /** Returns the row ID associated with a Model's clientId. @method _getRowId @param {String} clientId The Model clientId @return {String} @protected **/ _getRowId: function (clientId) { return this._idMap[clientId] || (this._idMap[clientId] = Y.guid()); }, /** Map of Model clientIds to row ids. @property _idMap @type {Object} @protected **/ //_idMap, /** Initializes the instance. Reads the following configuration properties in addition to the instance attributes: * `columns` - (REQUIRED) The initial column information * `host` - The object to serve as source of truth for column info and for generating class names @method initializer @param {Object} config Configuration data @protected @since 3.5.0 **/ initializer: function (config) { this.host = config.host; this._eventHandles = { modelListChange: this.after('modelListChange', bind('_afterModelListChange', this)) }; this._idMap = {}; this.CLASS_ODD = this.getClassName('odd'); this.CLASS_EVEN = this.getClassName('even'); } /** The HTML template used to create a full row of markup for a single Model in the `modelList` plus any customizations defined in the column configurations. @property _rowTemplate @type {HTML} @default (initially unset) @protected @since 3.5.0 **/ //_rowTemplate: null },{ /** Hash of formatting functions for cell contents. This property can be populated with a hash of formatting functions by the developer or a set of pre-defined functions can be loaded via the `datatable-formatters` module. See: [DataTable.BodyView.Formatters](./DataTable.BodyView.Formatters.html) @property Formatters @type Object @since 3.8.0 @static **/ Formatters: {} }); }, '@VERSION@', {"requires": ["datatable-core", "view", "classnamemanager"]});
tests/site7/code2/partial2.js
dominikwilkowski/cuttlebelle
import PropTypes from 'prop-types'; import React from 'react'; /** * The Partial component for the default layout of partials */ const Partial = ({ _body, subtitle }) => ( <article> { subtitle && <h2>{ subtitle }</h2> } <div>{ _body }</div> </article> ); Partial.propTypes = { /** * subtitle: Partial title */ subtitle: PropTypes.string, /** * _body: (partials)(4) */ _body: PropTypes.node.isRequired, }; Partial.defaultProps = {}; export default Partial;
ajax/libs/6to5/1.13.6/browser-polyfill.js
perdona/cdnjs
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){(function(global){var ensureSymbol=function(key){Symbol[key]=Symbol[key]||Symbol()};var ensureProto=function(Constructor,key,val){var proto=Constructor.prototype;proto[key]=proto[key]||val};if(typeof Symbol==="undefined"){require("es6-symbol/implement")}require("es6-shim");require("./transformation/transformers/es6-generators/runtime");ensureSymbol("referenceGet");ensureSymbol("referenceSet");ensureSymbol("referenceDelete");ensureProto(Function,Symbol.referenceGet,function(){return this});ensureProto(Map,Symbol.referenceGet,Map.prototype.get);ensureProto(Map,Symbol.referenceSet,Map.prototype.set);ensureProto(Map,Symbol.referenceDelete,Map.prototype.delete);if(global.WeakMap){ensureProto(WeakMap,Symbol.referenceGet,WeakMap.prototype.get);ensureProto(WeakMap,Symbol.referenceSet,WeakMap.prototype.set);ensureProto(WeakMap,Symbol.referenceDelete,WeakMap.prototype.delete)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./transformation/transformers/es6-generators/runtime":2,"es6-shim":4,"es6-symbol/implement":5}],2:[function(require,module,exports){(function(global){var iteratorSymbol=typeof Symbol==="function"&&Symbol.iterator||"@@iterator";var runtime=global.regeneratorRuntime=exports;var hasOwn=Object.prototype.hasOwnProperty;var wrap=runtime.wrap=function wrap(innerFn,outerFn,self,tryList){return new Generator(innerFn,outerFn,self||null,tryList||[])};var GenStateSuspendedStart="suspendedStart";var GenStateSuspendedYield="suspendedYield";var GenStateExecuting="executing";var GenStateCompleted="completed";var ContinueSentinel={};var GF=function GeneratorFunction(){};var GFp=function GeneratorFunctionPrototype(){};var Gp=GFp.prototype=Generator.prototype;(GFp.constructor=GF).prototype=Gp.constructor=GFp;var GFName="GeneratorFunction";if(GF.name!==GFName)GF.name=GFName;if(GF.name!==GFName)throw new Error(GFName+" renamed?");runtime.isGeneratorFunction=function(genFun){var ctor=genFun&&genFun.constructor;return ctor?GF.name===ctor.name:false};runtime.mark=function(genFun){genFun.__proto__=GFp;genFun.prototype=Object.create(Gp);return genFun};runtime.async=function(innerFn,outerFn,self,tryList){return new Promise(function(resolve,reject){var generator=wrap(innerFn,outerFn,self,tryList);var callNext=step.bind(generator.next);var callThrow=step.bind(generator["throw"]);function step(arg){var info;var value;try{info=this(arg);value=info.value}catch(error){return reject(error)}if(info.done){resolve(value)}else{Promise.resolve(value).then(callNext,callThrow)}}callNext()})};function Generator(innerFn,outerFn,self,tryList){var generator=outerFn?Object.create(outerFn.prototype):this;var context=new Context(tryList);var state=GenStateSuspendedStart;function invoke(method,arg){if(state===GenStateExecuting){throw new Error("Generator is already running")}if(state===GenStateCompleted){throw new Error("Generator has already finished")}while(true){var delegate=context.delegate;var info;if(delegate){try{info=delegate.iterator[method](arg);method="next";arg=undefined}catch(uncaught){context.delegate=null;method="throw";arg=uncaught;continue}if(info.done){context[delegate.resultName]=info.value;context.next=delegate.nextLoc}else{state=GenStateSuspendedYield;return info}context.delegate=null}if(method==="next"){if(state===GenStateSuspendedStart&&typeof arg!=="undefined"){throw new TypeError("attempt to send "+JSON.stringify(arg)+" to newborn generator")}if(state===GenStateSuspendedYield){context.sent=arg}else{delete context.sent}}else if(method==="throw"){if(state===GenStateSuspendedStart){state=GenStateCompleted;throw arg}if(context.dispatchException(arg)){method="next";arg=undefined}}else if(method==="return"){context.abrupt("return",arg)}state=GenStateExecuting;try{var value=innerFn.call(self,context);state=context.done?GenStateCompleted:GenStateSuspendedYield;info={value:value,done:context.done};if(value===ContinueSentinel){if(context.delegate&&method==="next"){arg=undefined}}else{return info}}catch(thrown){state=GenStateCompleted;if(method==="next"){context.dispatchException(thrown)}else{arg=thrown}}}}generator.next=invoke.bind(generator,"next");generator["throw"]=invoke.bind(generator,"throw");generator["return"]=invoke.bind(generator,"return");return generator}Gp[iteratorSymbol]=function(){return this};Gp.toString=function(){return"[object Generator]"};function pushTryEntry(triple){var entry={tryLoc:triple[0]};if(1 in triple){entry.catchLoc=triple[1]}if(2 in triple){entry.finallyLoc=triple[2]}this.tryEntries.push(entry)}function resetTryEntry(entry,i){var record=entry.completion||{};record.type=i===0?"normal":"return";delete record.arg;entry.completion=record}function Context(tryList){this.tryEntries=[{tryLoc:"root"}];tryList.forEach(pushTryEntry,this);this.reset()}runtime.keys=function(object){var keys=[];for(var key in object){keys.push(key)}keys.reverse();return function next(){while(keys.length){var key=keys.pop();if(key in object){next.value=key;next.done=false;return next}}next.done=true;return next}};function values(iterable){var iterator=iterable;if(iteratorSymbol in iterable){iterator=iterable[iteratorSymbol]()}else if(!isNaN(iterable.length)){var i=-1;iterator=function next(){while(++i<iterable.length){if(i in iterable){next.value=iterable[i];next.done=false;return next}}next.done=true;return next};iterator.next=iterator}return iterator}runtime.values=values;Context.prototype={constructor:Context,reset:function(){this.prev=0;this.next=0;this.sent=undefined;this.done=false;this.delegate=null;this.tryEntries.forEach(resetTryEntry);for(var tempIndex=0,tempName;hasOwn.call(this,tempName="t"+tempIndex)||tempIndex<20;++tempIndex){this[tempName]=null}},stop:function(){this.done=true;var rootEntry=this.tryEntries[0];var rootRecord=rootEntry.completion;if(rootRecord.type==="throw"){throw rootRecord.arg}return this.rval},dispatchException:function(exception){if(this.done){throw exception}var context=this;function handle(loc,caught){record.type="throw";record.arg=exception;context.next=loc;return!!caught}for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev<entry.catchLoc){return handle(entry.catchLoc,true)}else if(this.prev<entry.finallyLoc){return handle(entry.finallyLoc)}}else if(hasCatch){if(this.prev<entry.catchLoc){return handle(entry.catchLoc,true)}}else if(hasFinally){if(this.prev<entry.finallyLoc){return handle(entry.finallyLoc)}}else{throw new Error("try statement without catch or finally")}}}},_findFinallyEntry:function(finallyLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&(entry.finallyLoc===finallyLoc||this.prev<entry.finallyLoc)){return entry}}},abrupt:function(type,arg){var entry=this._findFinallyEntry();var record=entry?entry.completion:{};record.type=type;record.arg=arg;if(entry){this.next=entry.finallyLoc}else{this.complete(record)}return ContinueSentinel},complete:function(record){if(record.type==="throw"){throw record.arg}if(record.type==="break"||record.type==="continue"){this.next=record.arg}else if(record.type==="return"){this.rval=record.arg;this.next="end"}return ContinueSentinel},finish:function(finallyLoc){var entry=this._findFinallyEntry(finallyLoc);return this.complete(entry.completion)},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;var thrown;if(record.type==="throw"){thrown=record.arg;resetTryEntry(entry,i)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],3:[function(require,module,exports){var process=module.exports={};process.nextTick=function(){var canSetImmediate=typeof window!=="undefined"&&window.setImmediate;var canMutationObserver=typeof window!=="undefined"&&window.MutationObserver;var canPost=typeof window!=="undefined"&&window.postMessage&&window.addEventListener;if(canSetImmediate){return function(f){return window.setImmediate(f)}}var queue=[];if(canMutationObserver){var hiddenDiv=document.createElement("div");var observer=new MutationObserver(function(){var queueList=queue.slice();queue.length=0;queueList.forEach(function(fn){fn()})});observer.observe(hiddenDiv,{attributes:true});return function nextTick(fn){if(!queue.length){hiddenDiv.setAttribute("yes","no")}queue.push(fn)}}if(canPost){window.addEventListener("message",function(ev){var source=ev.source;if((source===window||source===null)&&ev.data==="process-tick"){ev.stopPropagation();if(queue.length>0){var fn=queue.shift();fn()}}},true);return function nextTick(fn){queue.push(fn);window.postMessage("process-tick","*")}}return function nextTick(fn){setTimeout(fn,0)}}();process.title="browser";process.browser=true;process.env={};process.argv=[];function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")}},{}],4:[function(require,module,exports){(function(process){(function(root,factory){if(typeof define==="function"&&define.amd){define(factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.returnExports=factory()}})(this,function(){"use strict";var isCallableWithoutNew=function(func){try{func()}catch(e){return false}return true};var supportsSubclassing=function(C,f){try{var Sub=function(){C.apply(this,arguments)};if(!Sub.__proto__){return false}Object.setPrototypeOf(Sub,C);Sub.prototype=Object.create(C.prototype,{constructor:{value:C}});return f(Sub)}catch(e){return false}};var arePropertyDescriptorsSupported=function(){try{Object.defineProperty({},"x",{});return true}catch(e){return false}};var startsWithRejectsRegex=function(){var rejectsRegex=false;if(String.prototype.startsWith){try{"/a/".startsWith(/a/)}catch(e){rejectsRegex=true}}return rejectsRegex};var getGlobal=new Function("return this;");var globals=getGlobal();var global_isFinite=globals.isFinite;var supportsDescriptors=!!Object.defineProperty&&arePropertyDescriptorsSupported();var startsWithIsCompliant=startsWithRejectsRegex();var _slice=Array.prototype.slice;var _indexOf=String.prototype.indexOf;var _toString=Object.prototype.toString;var _hasOwnProperty=Object.prototype.hasOwnProperty;var ArrayIterator;var defineProperty=function(object,name,value,force){if(!force&&name in object){return}if(supportsDescriptors){Object.defineProperty(object,name,{configurable:true,enumerable:false,writable:true,value:value})}else{object[name]=value}};var defineProperties=function(object,map){Object.keys(map).forEach(function(name){var method=map[name];defineProperty(object,name,method,false)})};var create=Object.create||function(prototype,properties){function Type(){}Type.prototype=prototype;var object=new Type;if(typeof properties!=="undefined"){defineProperties(object,properties)}return object};var $iterator$=typeof Symbol==="function"&&Symbol.iterator||"_es6shim_iterator_";if(globals.Set&&typeof(new globals.Set)["@@iterator"]==="function"){$iterator$="@@iterator"}var addIterator=function(prototype,impl){if(!impl){impl=function iterator(){return this}}var o={};o[$iterator$]=impl;defineProperties(prototype,o);if(!prototype[$iterator$]&&typeof $iterator$==="symbol"){prototype[$iterator$]=impl}};var isArguments=function isArguments(value){var str=_toString.call(value);var result=str==="[object Arguments]";if(!result){result=str!=="[object Array]"&&value!==null&&typeof value==="object"&&typeof value.length==="number"&&value.length>=0&&_toString.call(value.callee)==="[object Function]"}return result};var emulateES6construct=function(o){if(!ES.TypeIsObject(o)){throw new TypeError("bad object")}if(!o._es6construct){if(o.constructor&&ES.IsCallable(o.constructor["@@create"])){o=o.constructor["@@create"](o)}defineProperties(o,{_es6construct:true})}return o};var ES={CheckObjectCoercible:function(x,optMessage){if(x==null){throw new TypeError(optMessage||"Cannot call method on "+x)}return x},TypeIsObject:function(x){return x!=null&&Object(x)===x},ToObject:function(o,optMessage){return Object(ES.CheckObjectCoercible(o,optMessage))},IsCallable:function(x){return typeof x==="function"&&_toString.call(x)==="[object Function]"},ToInt32:function(x){return x>>0},ToUint32:function(x){return x>>>0},ToInteger:function(value){var number=+value;if(Number.isNaN(number)){return 0}if(number===0||!Number.isFinite(number)){return number}return(number>0?1:-1)*Math.floor(Math.abs(number))},ToLength:function(value){var len=ES.ToInteger(value);if(len<=0){return 0}if(len>Number.MAX_SAFE_INTEGER){return Number.MAX_SAFE_INTEGER}return len},SameValue:function(a,b){if(a===b){if(a===0){return 1/a===1/b}return true}return Number.isNaN(a)&&Number.isNaN(b)},SameValueZero:function(a,b){return a===b||Number.isNaN(a)&&Number.isNaN(b)},IsIterable:function(o){return ES.TypeIsObject(o)&&(typeof o[$iterator$]!=="undefined"||isArguments(o))},GetIterator:function(o){if(isArguments(o)){return new ArrayIterator(o,"value")}var itFn=o[$iterator$];if(!ES.IsCallable(itFn)){throw new TypeError("value is not an iterable")}var it=itFn.call(o);if(!ES.TypeIsObject(it)){throw new TypeError("bad iterator")}return it},IteratorNext:function(it){var result=arguments.length>1?it.next(arguments[1]):it.next();if(!ES.TypeIsObject(result)){throw new TypeError("bad iterator")}return result},Construct:function(C,args){var obj;if(ES.IsCallable(C["@@create"])){obj=C["@@create"]()}else{obj=create(C.prototype||null)}defineProperties(obj,{_es6construct:true});var result=C.apply(obj,args);return ES.TypeIsObject(result)?result:obj}};var numberConversion=function(){function roundToEven(n){var w=Math.floor(n),f=n-w;if(f<.5){return w}if(f>.5){return w+1}return w%2?w+1:w}function packIEEE754(v,ebits,fbits){var bias=(1<<ebits-1)-1,s,e,f,i,bits,str,bytes;if(v!==v){e=(1<<ebits)-1;f=Math.pow(2,fbits-1);s=0}else if(v===Infinity||v===-Infinity){e=(1<<ebits)-1;f=0;s=v<0?1:0}else if(v===0){e=0;f=0;s=1/v===-Infinity?1:0}else{s=v<0;v=Math.abs(v);if(v>=Math.pow(2,1-bias)){e=Math.min(Math.floor(Math.log(v)/Math.LN2),1023);f=roundToEven(v/Math.pow(2,e)*Math.pow(2,fbits));if(f/Math.pow(2,fbits)>=2){e=e+1;f=1}if(e>bias){e=(1<<ebits)-1;f=0}else{e=e+bias;f=f-Math.pow(2,fbits)}}else{e=0;f=roundToEven(v/Math.pow(2,1-bias-fbits))}}bits=[];for(i=fbits;i;i-=1){bits.push(f%2?1:0);f=Math.floor(f/2)}for(i=ebits;i;i-=1){bits.push(e%2?1:0);e=Math.floor(e/2)}bits.push(s?1:0);bits.reverse();str=bits.join("");bytes=[];while(str.length){bytes.push(parseInt(str.slice(0,8),2));str=str.slice(8)}return bytes}function unpackIEEE754(bytes,ebits,fbits){var bits=[],i,j,b,str,bias,s,e,f;for(i=bytes.length;i;i-=1){b=bytes[i-1];for(j=8;j;j-=1){bits.push(b%2?1:0);b=b>>1}}bits.reverse();str=bits.join("");bias=(1<<ebits-1)-1;s=parseInt(str.slice(0,1),2)?-1:1;e=parseInt(str.slice(1,1+ebits),2);f=parseInt(str.slice(1+ebits),2);if(e===(1<<ebits)-1){return f!==0?NaN:s*Infinity}else if(e>0){return s*Math.pow(2,e-bias)*(1+f/Math.pow(2,fbits))}else if(f!==0){return s*Math.pow(2,-(bias-1))*(f/Math.pow(2,fbits))}else{return s<0?-0:0}}function unpackFloat64(b){return unpackIEEE754(b,11,52)}function packFloat64(v){return packIEEE754(v,11,52)}function unpackFloat32(b){return unpackIEEE754(b,8,23)}function packFloat32(v){return packIEEE754(v,8,23)}var conversions={toFloat32:function(num){return unpackFloat32(packFloat32(num))}};if(typeof Float32Array!=="undefined"){var float32array=new Float32Array(1);conversions.toFloat32=function(num){float32array[0]=num;return float32array[0]}}return conversions}();defineProperties(String,{fromCodePoint:function(_){var points=_slice.call(arguments,0,arguments.length);var result=[];var next;for(var i=0,length=points.length;i<length;i++){next=Number(points[i]);if(!ES.SameValue(next,ES.ToInteger(next))||next<0||next>1114111){throw new RangeError("Invalid code point "+next)}if(next<65536){result.push(String.fromCharCode(next))}else{next-=65536;result.push(String.fromCharCode((next>>10)+55296));result.push(String.fromCharCode(next%1024+56320))}}return result.join("")},raw:function(callSite){var substitutions=_slice.call(arguments,1,arguments.length);var cooked=ES.ToObject(callSite,"bad callSite");var rawValue=cooked.raw;var raw=ES.ToObject(rawValue,"bad raw value");var len=Object.keys(raw).length;var literalsegments=ES.ToLength(len);if(literalsegments===0){return""}var stringElements=[];var nextIndex=0;var nextKey,next,nextSeg,nextSub;while(nextIndex<literalsegments){nextKey=String(nextIndex);next=raw[nextKey];nextSeg=String(next);stringElements.push(nextSeg);if(nextIndex+1>=literalsegments){break}next=substitutions[nextKey];if(typeof next==="undefined"){break}nextSub=String(next);stringElements.push(nextSub);nextIndex++}return stringElements.join("")}});if(String.fromCodePoint.length!==1){var originalFromCodePoint=String.fromCodePoint;defineProperty(String,"fromCodePoint",function(_){return originalFromCodePoint.apply(this,arguments)},true)}var StringShims={repeat:function(){var repeat=function(s,times){if(times<1){return""}if(times%2){return repeat(s,times-1)+s}var half=repeat(s,times/2);return half+half};return function(times){var thisStr=String(ES.CheckObjectCoercible(this));times=ES.ToInteger(times);if(times<0||times===Infinity){throw new RangeError("Invalid String#repeat value")}return repeat(thisStr,times)}}(),startsWith:function(searchStr){var thisStr=String(ES.CheckObjectCoercible(this));if(_toString.call(searchStr)==="[object RegExp]"){throw new TypeError('Cannot call method "startsWith" with a regex')}searchStr=String(searchStr);var startArg=arguments.length>1?arguments[1]:void 0;var start=Math.max(ES.ToInteger(startArg),0);return thisStr.slice(start,start+searchStr.length)===searchStr},endsWith:function(searchStr){var thisStr=String(ES.CheckObjectCoercible(this));if(_toString.call(searchStr)==="[object RegExp]"){throw new TypeError('Cannot call method "endsWith" with a regex')}searchStr=String(searchStr);var thisLen=thisStr.length;var posArg=arguments.length>1?arguments[1]:void 0;var pos=typeof posArg==="undefined"?thisLen:ES.ToInteger(posArg);var end=Math.min(Math.max(pos,0),thisLen);return thisStr.slice(end-searchStr.length,end)===searchStr},contains:function(searchString){var position=arguments.length>1?arguments[1]:void 0;return _indexOf.call(this,searchString,position)!==-1},codePointAt:function(pos){var thisStr=String(ES.CheckObjectCoercible(this));var position=ES.ToInteger(pos);var length=thisStr.length;if(position<0||position>=length){return}var first=thisStr.charCodeAt(position);var isEnd=position+1===length;if(first<55296||first>56319||isEnd){return first}var second=thisStr.charCodeAt(position+1);if(second<56320||second>57343){return first}return(first-55296)*1024+(second-56320)+65536}};defineProperties(String.prototype,StringShims);var hasStringTrimBug="…".trim().length!==1;if(hasStringTrimBug){var originalStringTrim=String.prototype.trim;delete String.prototype.trim;var ws=[" \n \f\r   ᠎    ","          \u2028","\u2029"].join("");var trimRegexp=new RegExp("(^["+ws+"]+)|(["+ws+"]+$)","g");defineProperties(String.prototype,{trim:function(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}return String(this).replace(trimRegexp,"")}})}var StringIterator=function(s){this._s=String(ES.CheckObjectCoercible(s));this._i=0};StringIterator.prototype.next=function(){var s=this._s,i=this._i;if(typeof s==="undefined"||i>=s.length){this._s=void 0;return{value:void 0,done:true}}var first=s.charCodeAt(i),second,len;if(first<55296||first>56319||i+1==s.length){len=1}else{second=s.charCodeAt(i+1);len=second<56320||second>57343?1:2}this._i=i+len;return{value:s.substr(i,len),done:false}};addIterator(StringIterator.prototype);addIterator(String.prototype,function(){return new StringIterator(this)});if(!startsWithIsCompliant){String.prototype.startsWith=StringShims.startsWith;String.prototype.endsWith=StringShims.endsWith}var ArrayShims={from:function(iterable){var mapFn=arguments.length>1?arguments[1]:void 0;var list=ES.ToObject(iterable,"bad iterable");if(typeof mapFn!=="undefined"&&!ES.IsCallable(mapFn)){throw new TypeError("Array.from: when provided, the second argument must be a function")}var hasThisArg=arguments.length>2;var thisArg=hasThisArg?arguments[2]:void 0;var usingIterator=ES.IsIterable(list);var length;var result,i,value;if(usingIterator){i=0;result=ES.IsCallable(this)?Object(new this):[];var it=usingIterator?ES.GetIterator(list):null;var iterationValue;do{iterationValue=ES.IteratorNext(it);if(!iterationValue.done){value=iterationValue.value;if(mapFn){result[i]=hasThisArg?mapFn.call(thisArg,value,i):mapFn(value,i)}else{result[i]=value}i+=1}}while(!iterationValue.done);length=i}else{length=ES.ToLength(list.length);result=ES.IsCallable(this)?Object(new this(length)):new Array(length);for(i=0;i<length;++i){value=list[i];if(mapFn){result[i]=hasThisArg?mapFn.call(thisArg,value,i):mapFn(value,i)}else{result[i]=value}}}result.length=length;return result},of:function(){return Array.from(arguments)}};defineProperties(Array,ArrayShims);var arrayFromSwallowsNegativeLengths=function(){try{return Array.from({length:-1}).length===0}catch(e){return false}};if(!arrayFromSwallowsNegativeLengths()){defineProperty(Array,"from",ArrayShims.from,true)}ArrayIterator=function(array,kind){this.i=0;this.array=array;this.kind=kind};defineProperties(ArrayIterator.prototype,{next:function(){var i=this.i,array=this.array;if(!(this instanceof ArrayIterator)){throw new TypeError("Not an ArrayIterator")}if(typeof array!=="undefined"){var len=ES.ToLength(array.length);for(;i<len;i++){var kind=this.kind;var retval;if(kind==="key"){retval=i}else if(kind==="value"){retval=array[i]}else if(kind==="entry"){retval=[i,array[i]]}this.i=i+1;return{value:retval,done:false}}}this.array=void 0;return{value:void 0,done:true}}});addIterator(ArrayIterator.prototype);var ArrayPrototypeShims={copyWithin:function(target,start){var end=arguments[2];var o=ES.ToObject(this);var len=ES.ToLength(o.length);target=ES.ToInteger(target);start=ES.ToInteger(start);var to=target<0?Math.max(len+target,0):Math.min(target,len);var from=start<0?Math.max(len+start,0):Math.min(start,len);end=typeof end==="undefined"?len:ES.ToInteger(end);var fin=end<0?Math.max(len+end,0):Math.min(end,len);var count=Math.min(fin-from,len-to);var direction=1;if(from<to&&to<from+count){direction=-1;from+=count-1;to+=count-1}while(count>0){if(_hasOwnProperty.call(o,from)){o[to]=o[from]}else{delete o[from]}from+=direction;to+=direction;count-=1}return o},fill:function(value){var start=arguments.length>1?arguments[1]:void 0;var end=arguments.length>2?arguments[2]:void 0;var O=ES.ToObject(this);var len=ES.ToLength(O.length);start=ES.ToInteger(typeof start==="undefined"?0:start);end=ES.ToInteger(typeof end==="undefined"?len:end);var relativeStart=start<0?Math.max(len+start,0):Math.min(start,len);var relativeEnd=end<0?len+end:end;for(var i=relativeStart;i<len&&i<relativeEnd;++i){O[i]=value}return O},find:function find(predicate){var list=ES.ToObject(this);var length=ES.ToLength(list.length);if(!ES.IsCallable(predicate)){throw new TypeError("Array#find: predicate must be a function")}var thisArg=arguments[1];for(var i=0,value;i<length;i++){value=list[i];if(predicate.call(thisArg,value,i,list)){return value}}return},findIndex:function findIndex(predicate){var list=ES.ToObject(this);var length=ES.ToLength(list.length);if(!ES.IsCallable(predicate)){throw new TypeError("Array#findIndex: predicate must be a function")}var thisArg=arguments[1];for(var i=0;i<length;i++){if(predicate.call(thisArg,list[i],i,list)){return i}}return-1},keys:function(){return new ArrayIterator(this,"key")},values:function(){return new ArrayIterator(this,"value")},entries:function(){return new ArrayIterator(this,"entry")}};if(Array.prototype.keys&&!ES.IsCallable([1].keys().next)){delete Array.prototype.keys}if(Array.prototype.entries&&!ES.IsCallable([1].entries().next)){delete Array.prototype.entries}if(Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[$iterator$]){defineProperties(Array.prototype,{values:Array.prototype[$iterator$]})}defineProperties(Array.prototype,ArrayPrototypeShims);addIterator(Array.prototype,function(){return this.values()});if(Object.getPrototypeOf){addIterator(Object.getPrototypeOf([].values()))}var maxSafeInteger=Math.pow(2,53)-1;defineProperties(Number,{MAX_SAFE_INTEGER:maxSafeInteger,MIN_SAFE_INTEGER:-maxSafeInteger,EPSILON:2.220446049250313e-16,parseInt:globals.parseInt,parseFloat:globals.parseFloat,isFinite:function(value){return typeof value==="number"&&global_isFinite(value)},isInteger:function(value){return Number.isFinite(value)&&ES.ToInteger(value)===value},isSafeInteger:function(value){return Number.isInteger(value)&&Math.abs(value)<=Number.MAX_SAFE_INTEGER},isNaN:function(value){return value!==value}});if(![,1].find(function(item,idx){return idx===0})){defineProperty(Array.prototype,"find",ArrayPrototypeShims.find,true)}if([,1].findIndex(function(item,idx){return idx===0})!==0){defineProperty(Array.prototype,"findIndex",ArrayPrototypeShims.findIndex,true)}if(supportsDescriptors){defineProperties(Object,{getPropertyDescriptor:function(subject,name){var pd=Object.getOwnPropertyDescriptor(subject,name);var proto=Object.getPrototypeOf(subject);while(typeof pd==="undefined"&&proto!==null){pd=Object.getOwnPropertyDescriptor(proto,name);proto=Object.getPrototypeOf(proto)}return pd},getPropertyNames:function(subject){var result=Object.getOwnPropertyNames(subject);var proto=Object.getPrototypeOf(subject);var addProperty=function(property){if(result.indexOf(property)===-1){result.push(property)}};while(proto!==null){Object.getOwnPropertyNames(proto).forEach(addProperty);proto=Object.getPrototypeOf(proto)}return result}});defineProperties(Object,{assign:function(target,source){if(!ES.TypeIsObject(target)){throw new TypeError("target must be an object")}return Array.prototype.reduce.call(arguments,function(target,source){return Object.keys(Object(source)).reduce(function(target,key){target[key]=source[key];return target},target)})},is:function(a,b){return ES.SameValue(a,b)},setPrototypeOf:function(Object,magic){var set;var checkArgs=function(O,proto){if(!ES.TypeIsObject(O)){throw new TypeError("cannot set prototype on a non-object")}if(!(proto===null||ES.TypeIsObject(proto))){throw new TypeError("can only set prototype to an object or null"+proto)}};var setPrototypeOf=function(O,proto){checkArgs(O,proto);set.call(O,proto);return O};try{set=Object.getOwnPropertyDescriptor(Object.prototype,magic).set;set.call({},null)}catch(e){if(Object.prototype!=={}[magic]){return}set=function(proto){this[magic]=proto};setPrototypeOf.polyfill=setPrototypeOf(setPrototypeOf({},null),Object.prototype)instanceof Object}return setPrototypeOf}(Object,"__proto__")})}if(Object.setPrototypeOf&&Object.getPrototypeOf&&Object.getPrototypeOf(Object.setPrototypeOf({},null))!==null&&Object.getPrototypeOf(Object.create(null))===null){(function(){var FAKENULL=Object.create(null);var gpo=Object.getPrototypeOf,spo=Object.setPrototypeOf;Object.getPrototypeOf=function(o){var result=gpo(o);return result===FAKENULL?null:result};Object.setPrototypeOf=function(o,p){if(p===null){p=FAKENULL}return spo(o,p)};Object.setPrototypeOf.polyfill=false})()}try{Object.keys("foo")}catch(e){var originalObjectKeys=Object.keys;Object.keys=function(obj){return originalObjectKeys(ES.ToObject(obj))}}var MathShims={acosh:function(value){value=Number(value);if(Number.isNaN(value)||value<1){return NaN}if(value===1){return 0}if(value===Infinity){return value}return Math.log(value+Math.sqrt(value*value-1))},asinh:function(value){value=Number(value);if(value===0||!global_isFinite(value)){return value}return value<0?-Math.asinh(-value):Math.log(value+Math.sqrt(value*value+1))},atanh:function(value){value=Number(value);if(Number.isNaN(value)||value<-1||value>1){return NaN}if(value===-1){return-Infinity}if(value===1){return Infinity}if(value===0){return value}return.5*Math.log((1+value)/(1-value))},cbrt:function(value){value=Number(value);if(value===0){return value}var negate=value<0,result;if(negate){value=-value}result=Math.pow(value,1/3);return negate?-result:result},clz32:function(value){value=Number(value);var number=ES.ToUint32(value);if(number===0){return 32}return 32-number.toString(2).length},cosh:function(value){value=Number(value);if(value===0){return 1}if(Number.isNaN(value)){return NaN}if(!global_isFinite(value)){return Infinity}if(value<0){value=-value}if(value>21){return Math.exp(value)/2}return(Math.exp(value)+Math.exp(-value))/2},expm1:function(value){value=Number(value);if(value===-Infinity){return-1}if(!global_isFinite(value)||value===0){return value}return Math.exp(value)-1},hypot:function(x,y){var anyNaN=false;var allZero=true;var anyInfinity=false;var numbers=[];Array.prototype.every.call(arguments,function(arg){var num=Number(arg);if(Number.isNaN(num)){anyNaN=true}else if(num===Infinity||num===-Infinity){anyInfinity=true}else if(num!==0){allZero=false}if(anyInfinity){return false}else if(!anyNaN){numbers.push(Math.abs(num))}return true});if(anyInfinity){return Infinity}if(anyNaN){return NaN}if(allZero){return 0}numbers.sort(function(a,b){return b-a});var largest=numbers[0];var divided=numbers.map(function(number){return number/largest});var sum=divided.reduce(function(sum,number){return sum+=number*number},0);return largest*Math.sqrt(sum)},log2:function(value){return Math.log(value)*Math.LOG2E},log10:function(value){return Math.log(value)*Math.LOG10E},log1p:function(value){value=Number(value);if(value<-1||Number.isNaN(value)){return NaN}if(value===0||value===Infinity){return value}if(value===-1){return-Infinity}var result=0;var n=50;if(value<0||value>1){return Math.log(1+value)}for(var i=1;i<n;i++){if(i%2===0){result-=Math.pow(value,i)/i}else{result+=Math.pow(value,i)/i}}return result},sign:function(value){var number=+value;if(number===0){return number}if(Number.isNaN(number)){return number}return number<0?-1:1},sinh:function(value){value=Number(value);if(!global_isFinite(value)||value===0){return value}return(Math.exp(value)-Math.exp(-value))/2},tanh:function(value){value=Number(value);if(Number.isNaN(value)||value===0){return value}if(value===Infinity){return 1}if(value===-Infinity){return-1}return(Math.exp(value)-Math.exp(-value))/(Math.exp(value)+Math.exp(-value))},trunc:function(value){var number=Number(value);return number<0?-Math.floor(-number):Math.floor(number)},imul:function(x,y){x=ES.ToUint32(x);y=ES.ToUint32(y);var ah=x>>>16&65535;var al=x&65535;var bh=y>>>16&65535;var bl=y&65535;return al*bl+(ah*bl+al*bh<<16>>>0)|0},fround:function(x){if(x===0||x===Infinity||x===-Infinity||Number.isNaN(x)){return x}var num=Number(x);return numberConversion.toFloat32(num)}};defineProperties(Math,MathShims);if(Math.imul(4294967295,5)!==-5){Math.imul=MathShims.imul }var PromiseShim=function(){var Promise,Promise$prototype;ES.IsPromise=function(promise){if(!ES.TypeIsObject(promise)){return false}if(!promise._promiseConstructor){return false}if(typeof promise._status==="undefined"){return false}return true};var PromiseCapability=function(C){if(!ES.IsCallable(C)){throw new TypeError("bad promise constructor")}var capability=this;var resolver=function(resolve,reject){capability.resolve=resolve;capability.reject=reject};capability.promise=ES.Construct(C,[resolver]);if(!capability.promise._es6construct){throw new TypeError("bad promise constructor")}if(!(ES.IsCallable(capability.resolve)&&ES.IsCallable(capability.reject))){throw new TypeError("bad promise constructor")}};var setTimeout=globals.setTimeout;var makeZeroTimeout;if(typeof window!=="undefined"&&ES.IsCallable(window.postMessage)){makeZeroTimeout=function(){var timeouts=[];var messageName="zero-timeout-message";var setZeroTimeout=function(fn){timeouts.push(fn);window.postMessage(messageName,"*")};var handleMessage=function(event){if(event.source==window&&event.data==messageName){event.stopPropagation();if(timeouts.length===0){return}var fn=timeouts.shift();fn()}};window.addEventListener("message",handleMessage,true);return setZeroTimeout}}var makePromiseAsap=function(){var P=globals.Promise;return P&&P.resolve&&function(task){return P.resolve().then(task)}};var enqueue=ES.IsCallable(globals.setImmediate)?globals.setImmediate.bind(globals):typeof process==="object"&&process.nextTick?process.nextTick:makePromiseAsap()||(ES.IsCallable(makeZeroTimeout)?makeZeroTimeout():function(task){setTimeout(task,0)});var triggerPromiseReactions=function(reactions,x){reactions.forEach(function(reaction){enqueue(function(){var handler=reaction.handler;var capability=reaction.capability;var resolve=capability.resolve;var reject=capability.reject;try{var result=handler(x);if(result===capability.promise){throw new TypeError("self resolution")}var updateResult=updatePromiseFromPotentialThenable(result,capability);if(!updateResult){resolve(result)}}catch(e){reject(e)}})})};var updatePromiseFromPotentialThenable=function(x,capability){if(!ES.TypeIsObject(x)){return false}var resolve=capability.resolve;var reject=capability.reject;try{var then=x.then;if(!ES.IsCallable(then)){return false}then.call(x,resolve,reject)}catch(e){reject(e)}return true};var promiseResolutionHandler=function(promise,onFulfilled,onRejected){return function(x){if(x===promise){return onRejected(new TypeError("self resolution"))}var C=promise._promiseConstructor;var capability=new PromiseCapability(C);var updateResult=updatePromiseFromPotentialThenable(x,capability);if(updateResult){return capability.promise.then(onFulfilled,onRejected)}else{return onFulfilled(x)}}};Promise=function(resolver){var promise=this;promise=emulateES6construct(promise);if(!promise._promiseConstructor){throw new TypeError("bad promise")}if(typeof promise._status!=="undefined"){throw new TypeError("promise already initialized")}if(!ES.IsCallable(resolver)){throw new TypeError("not a valid resolver")}promise._status="unresolved";promise._resolveReactions=[];promise._rejectReactions=[];var resolve=function(resolution){if(promise._status!=="unresolved"){return}var reactions=promise._resolveReactions;promise._result=resolution;promise._resolveReactions=void 0;promise._rejectReactions=void 0;promise._status="has-resolution";triggerPromiseReactions(reactions,resolution)};var reject=function(reason){if(promise._status!=="unresolved"){return}var reactions=promise._rejectReactions;promise._result=reason;promise._resolveReactions=void 0;promise._rejectReactions=void 0;promise._status="has-rejection";triggerPromiseReactions(reactions,reason)};try{resolver(resolve,reject)}catch(e){reject(e)}return promise};Promise$prototype=Promise.prototype;defineProperties(Promise,{"@@create":function(obj){var constructor=this;var prototype=constructor.prototype||Promise$prototype;obj=obj||create(prototype);defineProperties(obj,{_status:void 0,_result:void 0,_resolveReactions:void 0,_rejectReactions:void 0,_promiseConstructor:void 0});obj._promiseConstructor=constructor;return obj}});var _promiseAllResolver=function(index,values,capability,remaining){var done=false;return function(x){if(done){return}done=true;values[index]=x;if(--remaining.count===0){var resolve=capability.resolve;resolve(values)}}};Promise.all=function(iterable){var C=this;var capability=new PromiseCapability(C);var resolve=capability.resolve;var reject=capability.reject;try{if(!ES.IsIterable(iterable)){throw new TypeError("bad iterable")}var it=ES.GetIterator(iterable);var values=[],remaining={count:1};for(var index=0;;index++){var next=ES.IteratorNext(it);if(next.done){break}var nextPromise=C.resolve(next.value);var resolveElement=_promiseAllResolver(index,values,capability,remaining);remaining.count++;nextPromise.then(resolveElement,capability.reject)}if(--remaining.count===0){resolve(values)}}catch(e){reject(e)}return capability.promise};Promise.race=function(iterable){var C=this;var capability=new PromiseCapability(C);var resolve=capability.resolve;var reject=capability.reject;try{if(!ES.IsIterable(iterable)){throw new TypeError("bad iterable")}var it=ES.GetIterator(iterable);while(true){var next=ES.IteratorNext(it);if(next.done){break}var nextPromise=C.resolve(next.value);nextPromise.then(resolve,reject)}}catch(e){reject(e)}return capability.promise};Promise.reject=function(reason){var C=this;var capability=new PromiseCapability(C);var reject=capability.reject;reject(reason);return capability.promise};Promise.resolve=function(v){var C=this;if(ES.IsPromise(v)){var constructor=v._promiseConstructor;if(constructor===C){return v}}var capability=new PromiseCapability(C);var resolve=capability.resolve;resolve(v);return capability.promise};Promise.prototype["catch"]=function(onRejected){return this.then(void 0,onRejected)};Promise.prototype.then=function(onFulfilled,onRejected){var promise=this;if(!ES.IsPromise(promise)){throw new TypeError("not a promise")}var C=this.constructor;var capability=new PromiseCapability(C);if(!ES.IsCallable(onRejected)){onRejected=function(e){throw e}}if(!ES.IsCallable(onFulfilled)){onFulfilled=function(x){return x}}var resolutionHandler=promiseResolutionHandler(promise,onFulfilled,onRejected);var resolveReaction={capability:capability,handler:resolutionHandler};var rejectReaction={capability:capability,handler:onRejected};switch(promise._status){case"unresolved":promise._resolveReactions.push(resolveReaction);promise._rejectReactions.push(rejectReaction);break;case"has-resolution":triggerPromiseReactions([resolveReaction],promise._result);break;case"has-rejection":triggerPromiseReactions([rejectReaction],promise._result);break;default:throw new TypeError("unexpected")}return capability.promise};return Promise}();defineProperties(globals,{Promise:PromiseShim});var promiseSupportsSubclassing=supportsSubclassing(globals.Promise,function(S){return S.resolve(42)instanceof S});var promiseIgnoresNonFunctionThenCallbacks=function(){try{globals.Promise.reject(42).then(null,5).then(null,function(){});return true}catch(ex){return false}}();var promiseRequiresObjectContext=function(){try{Promise.call(3,function(){})}catch(e){return true}return false}();if(!promiseSupportsSubclassing||!promiseIgnoresNonFunctionThenCallbacks||!promiseRequiresObjectContext){globals.Promise=PromiseShim}var testOrder=function(a){var b=Object.keys(a.reduce(function(o,k){o[k]=true;return o},{}));return a.join(":")===b.join(":")};var preservesInsertionOrder=testOrder(["z","a","bb"]);var preservesNumericInsertionOrder=testOrder(["z",1,"a","3",2]);if(supportsDescriptors){var fastkey=function fastkey(key){if(!preservesInsertionOrder){return null}var type=typeof key;if(type==="string"){return"$"+key}else if(type==="number"){if(!preservesNumericInsertionOrder){return"n"+key}return key}return null};var emptyObject=function emptyObject(){return Object.create?Object.create(null):{}};var collectionShims={Map:function(){var empty={};function MapEntry(key,value){this.key=key;this.value=value;this.next=null;this.prev=null}MapEntry.prototype.isRemoved=function(){return this.key===empty};function MapIterator(map,kind){this.head=map._head;this.i=this.head;this.kind=kind}MapIterator.prototype={next:function(){var i=this.i,kind=this.kind,head=this.head,result;if(typeof this.i==="undefined"){return{value:void 0,done:true}}while(i.isRemoved()&&i!==head){i=i.prev}while(i.next!==head){i=i.next;if(!i.isRemoved()){if(kind==="key"){result=i.key}else if(kind==="value"){result=i.value}else{result=[i.key,i.value]}this.i=i;return{value:result,done:false}}}this.i=void 0;return{value:void 0,done:true}}};addIterator(MapIterator.prototype);function Map(iterable){var map=this;if(!ES.TypeIsObject(map)){throw new TypeError("Map does not accept arguments when called as a function")}map=emulateES6construct(map);if(!map._es6map){throw new TypeError("bad map")}var head=new MapEntry(null,null);head.next=head.prev=head;defineProperties(map,{_head:head,_storage:emptyObject(),_size:0});if(typeof iterable!=="undefined"&&iterable!==null){var it=ES.GetIterator(iterable);var adder=map.set;if(!ES.IsCallable(adder)){throw new TypeError("bad map")}while(true){var next=ES.IteratorNext(it);if(next.done){break}var nextItem=next.value;if(!ES.TypeIsObject(nextItem)){throw new TypeError("expected iterable of pairs")}adder.call(map,nextItem[0],nextItem[1])}}return map}var Map$prototype=Map.prototype;defineProperties(Map,{"@@create":function(obj){var constructor=this;var prototype=constructor.prototype||Map$prototype;obj=obj||create(prototype);defineProperties(obj,{_es6map:true});return obj}});Object.defineProperty(Map.prototype,"size",{configurable:true,enumerable:false,get:function(){if(typeof this._size==="undefined"){throw new TypeError("size method called on incompatible Map")}return this._size}});defineProperties(Map.prototype,{get:function(key){var fkey=fastkey(key);if(fkey!==null){var entry=this._storage[fkey];if(entry){return entry.value}else{return}}var head=this._head,i=head;while((i=i.next)!==head){if(ES.SameValueZero(i.key,key)){return i.value}}return},has:function(key){var fkey=fastkey(key);if(fkey!==null){return typeof this._storage[fkey]!=="undefined"}var head=this._head,i=head;while((i=i.next)!==head){if(ES.SameValueZero(i.key,key)){return true}}return false},set:function(key,value){var head=this._head,i=head,entry;var fkey=fastkey(key);if(fkey!==null){if(typeof this._storage[fkey]!=="undefined"){this._storage[fkey].value=value;return this}else{entry=this._storage[fkey]=new MapEntry(key,value);i=head.prev}}while((i=i.next)!==head){if(ES.SameValueZero(i.key,key)){i.value=value;return this}}entry=entry||new MapEntry(key,value);if(ES.SameValue(-0,key)){entry.key=+0}entry.next=this._head;entry.prev=this._head.prev;entry.prev.next=entry;entry.next.prev=entry;this._size+=1;return this},"delete":function(key){var head=this._head,i=head;var fkey=fastkey(key);if(fkey!==null){if(typeof this._storage[fkey]==="undefined"){return false}i=this._storage[fkey].prev;delete this._storage[fkey]}while((i=i.next)!==head){if(ES.SameValueZero(i.key,key)){i.key=i.value=empty;i.prev.next=i.next;i.next.prev=i.prev;this._size-=1;return true}}return false},clear:function(){this._size=0;this._storage=emptyObject();var head=this._head,i=head,p=i.next;while((i=p)!==head){i.key=i.value=empty;p=i.next;i.next=i.prev=head}head.next=head.prev=head},keys:function(){return new MapIterator(this,"key")},values:function(){return new MapIterator(this,"value")},entries:function(){return new MapIterator(this,"key+value")},forEach:function(callback){var context=arguments.length>1?arguments[1]:null;var it=this.entries();for(var entry=it.next();!entry.done;entry=it.next()){callback.call(context,entry.value[1],entry.value[0],this)}}});addIterator(Map.prototype,function(){return this.entries()});return Map}(),Set:function(){var SetShim=function Set(iterable){var set=this;if(!ES.TypeIsObject(set)){throw new TypeError("Set does not accept arguments when called as a function")}set=emulateES6construct(set);if(!set._es6set){throw new TypeError("bad set")}defineProperties(set,{"[[SetData]]":null,_storage:emptyObject()});if(typeof iterable!=="undefined"&&iterable!==null){var it=ES.GetIterator(iterable);var adder=set.add;if(!ES.IsCallable(adder)){throw new TypeError("bad set")}while(true){var next=ES.IteratorNext(it);if(next.done){break}var nextItem=next.value;adder.call(set,nextItem)}}return set};var Set$prototype=SetShim.prototype;defineProperties(SetShim,{"@@create":function(obj){var constructor=this;var prototype=constructor.prototype||Set$prototype;obj=obj||create(prototype);defineProperties(obj,{_es6set:true});return obj}});var ensureMap=function ensureMap(set){if(!set["[[SetData]]"]){var m=set["[[SetData]]"]=new collectionShims.Map;Object.keys(set._storage).forEach(function(k){if(k.charCodeAt(0)===36){k=k.slice(1)}else if(k.charAt(0)==="n"){k=+k.slice(1)}else{k=+k}m.set(k,k)});set._storage=null}};Object.defineProperty(SetShim.prototype,"size",{configurable:true,enumerable:false,get:function(){if(typeof this._storage==="undefined"){throw new TypeError("size method called on incompatible Set")}ensureMap(this);return this["[[SetData]]"].size}});defineProperties(SetShim.prototype,{has:function(key){var fkey;if(this._storage&&(fkey=fastkey(key))!==null){return!!this._storage[fkey]}ensureMap(this);return this["[[SetData]]"].has(key)},add:function(key){var fkey;if(this._storage&&(fkey=fastkey(key))!==null){this._storage[fkey]=true;return this}ensureMap(this);this["[[SetData]]"].set(key,key);return this},"delete":function(key){var fkey;if(this._storage&&(fkey=fastkey(key))!==null){var hasFKey=_hasOwnProperty.call(this._storage,fkey);return delete this._storage[fkey]&&hasFKey}ensureMap(this);return this["[[SetData]]"]["delete"](key)},clear:function(){if(this._storage){this._storage=emptyObject();return}return this["[[SetData]]"].clear()},keys:function(){ensureMap(this);return this["[[SetData]]"].keys()},values:function(){ensureMap(this);return this["[[SetData]]"].values()},entries:function(){ensureMap(this);return this["[[SetData]]"].entries()},forEach:function(callback){var context=arguments.length>1?arguments[1]:null;var entireSet=this;ensureMap(this);this["[[SetData]]"].forEach(function(value,key){callback.call(context,key,key,entireSet)})}});addIterator(SetShim.prototype,function(){return this.values()});return SetShim}()};defineProperties(globals,collectionShims);if(globals.Map||globals.Set){if(typeof globals.Map.prototype.clear!=="function"||(new globals.Set).size!==0||(new globals.Map).size!==0||typeof globals.Map.prototype.keys!=="function"||typeof globals.Set.prototype.keys!=="function"||typeof globals.Map.prototype.forEach!=="function"||typeof globals.Set.prototype.forEach!=="function"||isCallableWithoutNew(globals.Map)||isCallableWithoutNew(globals.Set)||!supportsSubclassing(globals.Map,function(M){var m=new M([]);m.set(42,42);return m instanceof M})){globals.Map=collectionShims.Map;globals.Set=collectionShims.Set}}addIterator(Object.getPrototypeOf((new globals.Map).keys()));addIterator(Object.getPrototypeOf((new globals.Set).keys()))}return globals})}).call(this,require("_process"))},{_process:3}],5:[function(require,module,exports){"use strict";if(!require("./is-implemented")()){Object.defineProperty(require("es5-ext/global"),"Symbol",{value:require("./polyfill"),configurable:true,enumerable:false,writable:true})}},{"./is-implemented":6,"./polyfill":21,"es5-ext/global":8}],6:[function(require,module,exports){"use strict";module.exports=function(){var symbol;if(typeof Symbol!=="function")return false;symbol=Symbol("test symbol");try{String(symbol)}catch(e){return false}if(typeof Symbol.iterator==="symbol")return true;if(typeof Symbol.isConcatSpreadable!=="object")return false;if(typeof Symbol.isRegExp!=="object")return false;if(typeof Symbol.iterator!=="object")return false;if(typeof Symbol.toPrimitive!=="object")return false;if(typeof Symbol.toStringTag!=="object")return false;if(typeof Symbol.unscopables!=="object")return false;return true}},{}],7:[function(require,module,exports){"use strict";var assign=require("es5-ext/object/assign"),normalizeOpts=require("es5-ext/object/normalize-options"),isCallable=require("es5-ext/object/is-callable"),contains=require("es5-ext/string/#/contains"),d;d=module.exports=function(dscr,value){var c,e,w,options,desc;if(arguments.length<2||typeof dscr!=="string"){options=value;value=dscr;dscr=null}else{options=arguments[2]}if(dscr==null){c=w=true;e=false}else{c=contains.call(dscr,"c");e=contains.call(dscr,"e");w=contains.call(dscr,"w")}desc={value:value,configurable:c,enumerable:e,writable:w};return!options?desc:assign(normalizeOpts(options),desc)};d.gs=function(dscr,get,set){var c,e,options,desc;if(typeof dscr!=="string"){options=set;set=get;get=dscr;dscr=null}else{options=arguments[3]}if(get==null){get=undefined}else if(!isCallable(get)){options=get;get=set=undefined}else if(set==null){set=undefined}else if(!isCallable(set)){options=set;set=undefined}if(dscr==null){c=true;e=false}else{c=contains.call(dscr,"c");e=contains.call(dscr,"e")}desc={get:get,set:set,configurable:c,enumerable:e};return!options?desc:assign(normalizeOpts(options),desc)}},{"es5-ext/object/assign":9,"es5-ext/object/is-callable":12,"es5-ext/object/normalize-options":16,"es5-ext/string/#/contains":18}],8:[function(require,module,exports){"use strict";module.exports=new Function("return this")()},{}],9:[function(require,module,exports){"use strict";module.exports=require("./is-implemented")()?Object.assign:require("./shim")},{"./is-implemented":10,"./shim":11}],10:[function(require,module,exports){"use strict";module.exports=function(){var assign=Object.assign,obj;if(typeof assign!=="function")return false;obj={foo:"raz"};assign(obj,{bar:"dwa"},{trzy:"trzy"});return obj.foo+obj.bar+obj.trzy==="razdwatrzy"}},{}],11:[function(require,module,exports){"use strict";var keys=require("../keys"),value=require("../valid-value"),max=Math.max;module.exports=function(dest,src){var error,i,l=max(arguments.length,2),assign;dest=Object(value(dest));assign=function(key){try{dest[key]=src[key]}catch(e){if(!error)error=e}};for(i=1;i<l;++i){src=arguments[i];keys(src).forEach(assign)}if(error!==undefined)throw error;return dest}},{"../keys":13,"../valid-value":17}],12:[function(require,module,exports){"use strict";module.exports=function(obj){return typeof obj==="function"}},{}],13:[function(require,module,exports){"use strict";module.exports=require("./is-implemented")()?Object.keys:require("./shim")},{"./is-implemented":14,"./shim":15}],14:[function(require,module,exports){"use strict";module.exports=function(){try{Object.keys("primitive");return true}catch(e){return false}}},{}],15:[function(require,module,exports){"use strict";var keys=Object.keys;module.exports=function(object){return keys(object==null?object:Object(object))}},{}],16:[function(require,module,exports){"use strict";var assign=require("./assign"),forEach=Array.prototype.forEach,create=Object.create,getPrototypeOf=Object.getPrototypeOf,process;process=function(src,obj){var proto=getPrototypeOf(src);return assign(proto?process(proto,obj):obj,src)};module.exports=function(options){var result=create(null);forEach.call(arguments,function(options){if(options==null)return;process(Object(options),result)});return result}},{"./assign":9}],17:[function(require,module,exports){"use strict";module.exports=function(value){if(value==null)throw new TypeError("Cannot use null or undefined");return value}},{}],18:[function(require,module,exports){"use strict";module.exports=require("./is-implemented")()?String.prototype.contains:require("./shim")},{"./is-implemented":19,"./shim":20}],19:[function(require,module,exports){"use strict";var str="razdwatrzy";module.exports=function(){if(typeof str.contains!=="function")return false;return str.contains("dwa")===true&&str.contains("foo")===false}},{}],20:[function(require,module,exports){"use strict";var indexOf=String.prototype.indexOf;module.exports=function(searchString){return indexOf.call(this,searchString,arguments[1])>-1}},{}],21:[function(require,module,exports){"use strict";var d=require("d"),create=Object.create,defineProperties=Object.defineProperties,generateName,Symbol;generateName=function(){var created=create(null);return function(desc){var postfix=0;while(created[desc+(postfix||"")])++postfix;desc+=postfix||"";created[desc]=true;return"@@"+desc}}();module.exports=Symbol=function(description){var symbol;if(this instanceof Symbol){throw new TypeError("TypeError: Symbol is not a constructor")}symbol=create(Symbol.prototype);description=description===undefined?"":String(description);return defineProperties(symbol,{__description__:d("",description),__name__:d("",generateName(description))})};Object.defineProperties(Symbol,{create:d("",Symbol("create")),hasInstance:d("",Symbol("hasInstance")),isConcatSpreadable:d("",Symbol("isConcatSpreadable")),isRegExp:d("",Symbol("isRegExp")),iterator:d("",Symbol("iterator")),toPrimitive:d("",Symbol("toPrimitive")),toStringTag:d("",Symbol("toStringTag")),unscopables:d("",Symbol("unscopables"))});defineProperties(Symbol.prototype,{properToString:d(function(){return"Symbol ("+this.__description__+")"}),toString:d("",function(){return this.__name__})});Object.defineProperty(Symbol.prototype,Symbol.toPrimitive,d("",function(hint){throw new TypeError("Conversion of symbol objects is not allowed")}));Object.defineProperty(Symbol.prototype,Symbol.toStringTag,d("c","Symbol"))},{d:7}]},{},[1]);
src/scenes/session/components/scene/index.js
fokye/react-webpack-skeleton
import Panel from '_/components/panel'; import PropTypes from 'prop-types'; import React from 'react'; import styles from './styles.css'; import { t } from '_/services/i18n'; /** * This scene renders the UI for creating a session (i.e: a sign in page). */ class SessionScene extends React.Component { static get propTypes() { const { bool, func } = PropTypes; return { isCreating: bool.isRequired, onCreate: func.isRequired }; } // Define callback handlers like this with a `handle` prefix, and bind them like this (as a lambda function assigned to an instance property. handleCreate = (event) => { const { props: { onCreate } } = this; event.preventDefault(); onCreate(); return false; }; render() { const { handleCreate, props: { isCreating } } = this; return ( <div className={styles.sessionScene}> <Panel footer={( <div className={styles.action}> <button disabled={isCreating} onClick={handleCreate}>{t('sign_in')}</button> </div> )} header={( <div>{t('sign_in')}</div> )}> <div className={styles.field}> <input disabled={isCreating} placeholder="you@example.com" type="email"/> </div> <div className={styles.field}> <input disabled={isCreating} placeholder={t('password')} type="password"/> </div> </Panel> </div> ); } } export default SessionScene;
src/svg-icons/av/fiber-manual-record.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvFiberManualRecord = (props) => ( <SvgIcon {...props}> <circle cx="12" cy="12" r="8"/> </SvgIcon> ); AvFiberManualRecord = pure(AvFiberManualRecord); AvFiberManualRecord.displayName = 'AvFiberManualRecord'; export default AvFiberManualRecord;
ajax/libs/muicss/0.5.4/extra/mui-react-combined.min.js
him2him2/cdnjs
!function(e){var t=e.babelHelpers={};t["typeof"]="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},t.jsx=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,i,o,n){var l=t&&t.defaultProps,r=arguments.length-3;if(i||0===r||(i={}),i&&l)for(var a in l)void 0===i[a]&&(i[a]=l[a]);else i||(i=l||{});if(1===r)i.children=n;else if(r>1){for(var s=Array(r),u=0;r>u;u++)s[u]=arguments[u+3];i.children=s}return{$$typeof:e,type:t,key:void 0===o?null:""+o,ref:null,props:i,_owner:null}}}(),t.asyncToGenerator=function(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,i){function o(n,l){try{var r=t[n](l),a=r.value}catch(s){return void i(s)}return r.done?void e(a):Promise.resolve(a).then(function(e){return o("next",e)},function(e){return o("throw",e)})}return o("next")})}},t.classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),t.defineEnumerableProperties=function(e,t){for(var i in t){var o=t[i];o.configurable=o.enumerable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i,o)}return e},t.defaults=function(e,t){for(var i=Object.getOwnPropertyNames(t),o=0;o<i.length;o++){var n=i[o],l=Object.getOwnPropertyDescriptor(t,n);l&&l.configurable&&void 0===e[n]&&Object.defineProperty(e,n,l)}return e},t.defineProperty=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},t["extends"]=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},t.get=function i(e,t,o){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var l=Object.getPrototypeOf(e);return null===l?void 0:i(l,t,o)}if("value"in n)return n.value;var r=n.get;if(void 0!==r)return r.call(o)},t.inherits=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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},t["instanceof"]=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t},t.interopRequireDefault=function(e){return e&&e.__esModule?e:{"default":e}},t.interopRequireWildcard=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t},t.newArrowCheck=function(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")},t.objectDestructuringEmpty=function(e){if(null==e)throw new TypeError("Cannot destructure undefined")},t.objectWithoutProperties=function(e,t){var i={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=e[o]);return i},t.possibleConstructorReturn=function(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},t.selfGlobal="undefined"==typeof e?self:e,t.set=function o(e,t,i,n){var l=Object.getOwnPropertyDescriptor(e,t);if(void 0===l){var r=Object.getPrototypeOf(e);null!==r&&o(r,t,i,n)}else if("value"in l&&l.writable)l.value=i;else{var a=l.set;void 0!==a&&a.call(n,i)}return i},t.slicedToArray=function(){function e(e,t){var i=[],o=!0,n=!1,l=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(s){n=!0,l=s}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw l}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t.slicedToArrayLoose=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var i,o=[],n=e[Symbol.iterator]();!(i=n.next()).done&&(o.push(i.value),!t||o.length!==t););return o}throw new TypeError("Invalid attempt to destructure non-iterable instance")},t.taggedTemplateLiteral=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},t.taggedTemplateLiteralLoose=function(e,t){return e.raw=t,e},t.temporalRef=function(e,t,i){if(e===i)throw new ReferenceError(t+" is not defined - temporal dead zone");return e},t.temporalUndefined={},t.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},t.toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}}("undefined"==typeof global?self:global),function e(t,i,o){function n(r,a){if(!i[r]){if(!t[r]){var s="function"==typeof require&&require;if(!a&&s)return s(r,!0);if(l)return l(r,!0);throw new Error("Cannot find module '"+r+"'")}var u=i[r]={exports:{}};t[r][0].call(u.exports,function(e){var i=t[r][1][e];return n(i?i:e)},u,u.exports,e,t,i,o)}return i[r].exports}for(var l="function"==typeof require&&require,r=0;r<o.length;r++)n(o[r]);return n}({1:[function(e,t,i){"use strict";!function(t){if(!t._muiReactLoaded){t._muiReactLoaded=!0;var i=t.mui=t.mui||[],o=i.react={};o.Appbar=e("src/react/appbar"),o.Button=e("src/react/button"),o.Caret=e("src/react/caret"),o.Checkbox=e("src/react/checkbox"),o.Col=e("src/react/col"),o.Container=e("src/react/container"),o.Divider=e("src/react/divider"),o.Dropdown=e("src/react/dropdown"),o.DropdownItem=e("src/react/dropdown-item"),o.Form=e("src/react/form"),o.Input=e("src/react/input"),o.Option=e("src/react/option"),o.Panel=e("src/react/panel"),o.Radio=e("src/react/radio"),o.Row=e("src/react/row"),o.Select=e("src/react/select"),o.Tab=e("src/react/tab"),o.Tabs=e("src/react/tabs"),o.Textarea=e("src/react/textarea")}}(window)},{"src/react/appbar":14,"src/react/button":15,"src/react/caret":16,"src/react/checkbox":17,"src/react/col":18,"src/react/container":19,"src/react/divider":20,"src/react/dropdown":22,"src/react/dropdown-item":21,"src/react/form":23,"src/react/input":24,"src/react/option":25,"src/react/panel":26,"src/react/radio":27,"src/react/row":28,"src/react/select":29,"src/react/tab":30,"src/react/tabs":31,"src/react/textarea":32}],2:[function(e,t,i){"use strict";!function(t){if(!t._muiReactCombinedLoaded){t._muiReactCombinedLoaded=!0;var i=e("src/js/lib/util");i.loadStyle(e("mui.min.css")),e("./cdn-react")}}(window)},{"./cdn-react":1,"mui.min.css":12,"src/js/lib/util":13}],3:[function(e,t,i){"use strict";t.exports={debug:!0}},{}],4:[function(e,t,i){"use strict";function o(e,t,i){var o,s,u,c,p=document.documentElement.clientHeight,d=t*r+2*a,m=Math.min(d,p);s=a+r-(n+l),s-=i*r,u=-1*e.getBoundingClientRect().top,c=p-m+u,o=Math.min(Math.max(s,u),c);var b,f,h=0;return d>p&&(b=a+(i+1)*r-(-1*o+n+l),f=t*r+2*a-m,h=Math.min(b,f)),{height:m+"px",top:o+"px",scrollTop:h}}var n=15,l=32,r=42,a=8;t.exports={getMenuPositionalCSS:o}},{}],5:[function(e,t,i){"use strict";function o(e,t){if(t&&e.setAttribute){for(var i,o=f(e),n=t.split(" "),l=0;l<n.length;l++)i=n[l].trim(),-1===o.indexOf(" "+i+" ")&&(o+=i+" ");e.setAttribute("class",o.trim())}}function n(e,t,i){if(void 0===t)return getComputedStyle(e);var o=r(t);{if("object"!==o){"string"===o&&void 0!==i&&(e.style[h(t)]=i);var n=getComputedStyle(e),l="array"===r(t);if(!l)return g(e,t,n);for(var a,s={},u=0;u<t.length;u++)a=t[u],s[a]=g(e,a,n);return s}for(var a in t)e.style[h(a)]=t[a]}}function l(e,t){return t&&e.getAttribute?f(e).indexOf(" "+t+" ")>-1:!1}function r(e){if(void 0===e)return"undefined";var t=Object.prototype.toString.call(e);if(0===t.indexOf("[object "))return t.slice(8,-1).toLowerCase();throw new Error("MUI: Could not understand type: "+t)}function a(e,t,i,o){o=void 0===o?!1:o,e.addEventListener(t,i,o);var n=e._muiEventCache=e._muiEventCache||{};n[t]=n[t]||[],n[t].push([i,o])}function s(e,t,i,o){o=void 0===o?!1:o;var n,l,r=e._muiEventCache=e._muiEventCache||{},a=r[t]||[];for(l=a.length;l--;)n=a[l],(void 0===i||n[0]===i&&n[1]===o)&&(a.splice(l,1),e.removeEventListener(t,n[0],n[1]))}function u(e,t,i,o){a(e,t,function n(o){i&&i.apply(this,arguments),s(e,t,n)},o)}function c(e,t){var i=window;if(void 0===t){if(e===i){var o=document.documentElement;return(i.pageXOffset||o.scrollLeft)-(o.clientLeft||0)}return e.scrollLeft}e===i?i.scrollTo(t,p(i)):e.scrollLeft=t}function p(e,t){var i=window;if(void 0===t){if(e===i){var o=document.documentElement;return(i.pageYOffset||o.scrollTop)-(o.clientTop||0)}return e.scrollTop}e===i?i.scrollTo(c(i),t):e.scrollTop=t}function d(e){var t=window,i=e.getBoundingClientRect(),o=p(t),n=c(t);return{top:i.top+o,left:i.left+n,height:i.height,width:i.width}}function m(e){var t=!1,i=!0,o=document,n=o.defaultView,l=o.documentElement,r=o.addEventListener?"addEventListener":"attachEvent",a=o.addEventListener?"removeEventListener":"detachEvent",s=o.addEventListener?"":"on",u=function d(i){"readystatechange"==i.type&&"complete"!=o.readyState||(("load"==i.type?n:o)[a](s+i.type,d,!1),!t&&(t=!0)&&e.call(n,i.type||i))},c=function m(){try{l.doScroll("left")}catch(e){return void setTimeout(m,50)}u("poll")};if("complete"==o.readyState)e.call(n,"lazy");else{if(o.createEventObject&&l.doScroll){try{i=!n.frameElement}catch(p){}i&&c()}o[r](s+"DOMContentLoaded",u,!1),o[r](s+"readystatechange",u,!1),n[r](s+"load",u,!1)}}function b(e,t){if(t&&e.setAttribute){for(var i,o=f(e),n=t.split(" "),l=0;l<n.length;l++)for(i=n[l].trim();o.indexOf(" "+i+" ")>=0;)o=o.replace(" "+i+" "," ");e.setAttribute("class",o.trim())}}function f(e){var t=(e.getAttribute("class")||"").replace(/[\n\t]/g,"");return" "+t+" "}function h(e){return e.replace(v,function(e,t,i,o){return o?i.toUpperCase():i}).replace(y,"Moz$1")}function g(e,t,i){var o;return o=i.getPropertyValue(t),""!==o||e.ownerDocument||(o=e.style[h(t)]),o}var x,v=/([\:\-\_]+(.))/g,y=/^moz([A-Z])/;x={multiple:!0,selected:!0,checked:!0,disabled:!0,readonly:!0,required:!0,open:!0},t.exports={addClass:o,css:n,hasClass:l,off:s,offset:d,on:a,one:u,ready:m,removeClass:b,type:r,scrollLeft:c,scrollTop:p}},{}],6:[function(e,t,i){"use strict";function o(){var e=window;if(h.debug&&"undefined"!=typeof e.console)try{e.console.log.apply(e.console,arguments)}catch(t){var i=Array.prototype.slice.call(arguments);e.console.log(i.join("\n"))}}function n(e){var t,i=document;t=i.head||i.getElementsByTagName("head")[0]||i.documentElement;var o=i.createElement("style");return o.type="text/css",o.styleSheet?o.styleSheet.cssText=e:o.appendChild(i.createTextNode(e)),t.insertBefore(o,t.firstChild),o}function l(e,t){if(!t)throw new Error("MUI: "+e);"undefined"!=typeof console&&console.error("MUI Warning: "+e)}function r(e){if(x.push(e),void 0===x._initialized){var t=document;g.on(t,"animationstart",a),g.on(t,"mozAnimationStart",a),g.on(t,"webkitAnimationStart",a),x._initialized=!0}}function a(e){if("mui-node-inserted"===e.animationName)for(var t=e.target,i=x.length-1;i>=0;i--)x[i](t)}function s(e){var t="";for(var i in e)t+=e[i]?i+" ":"";return t.trim()}function u(){if(void 0!==f)return f;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",f="auto"===e.style.pointerEvents}function c(e,t){return function(){e[t].apply(e,arguments)}}function p(e,t,i,o,n){var l,r=document.createEvent("HTMLEvents"),i=void 0!==i?i:!0,o=void 0!==o?o:!0;if(r.initEvent(t,i,o),n)for(l in n)r[l]=n[l];return e&&e.dispatchEvent(r),r}function d(){if(v+=1,1===v){var e=window,t=document;b={left:g.scrollLeft(e),top:g.scrollTop(e)},g.addClass(t.body,y),e.scrollTo(b.left,b.top)}}function m(){if(0!==v&&(v-=1,0===v)){var e=window,t=document;g.removeClass(t.body,y),e.scrollTo(b.left,b.top)}}var b,f,h=e("../config"),g=e("./jqLite"),x=[],v=0,y="mui-body--scroll-lock";t.exports={callback:c,classNames:s,disableScrollLock:m,dispatchEvent:p,enableScrollLock:d,log:o,loadStyle:n,onNodeInserted:r,raiseError:l,supportsPointerEvents:u}},{"../config":3,"./jqLite":5}],7:[function(e,t,i){"use strict";var o="You provided a `value` prop to a form field without an `OnChange` handler. Please see React documentation on controlled components";t.exports={controlledMessage:o}},{}],8:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("../js/lib/jqLite"),r=babelHelpers.interopRequireWildcard(l),a=e("../js/lib/util"),s=(babelHelpers.interopRequireWildcard(a),n["default"].PropTypes),u="mui-btn",c="mui-ripple-effect",p={color:1,variant:1,size:1},d=function(e){function t(){var e,i,o,n;babelHelpers.classCallCheck(this,t);for(var l=arguments.length,r=Array(l),a=0;l>a;a++)r[a]=arguments[a];return i=o=babelHelpers.possibleConstructorReturn(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(r))),o.state={ripples:{}},n=i,babelHelpers.possibleConstructorReturn(o,n)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"componentDidMount",value:function(){var e=this.refs.buttonEl;e._muiDropdown=!0,e._muiRipple=!0}},{key:"onClick",value:function(e){var t=this.props.onClick;t&&t(e)}},{key:"onMouseDown",value:function(e){var t=r.offset(this.refs.buttonEl),i=t.height;"fab"===this.props.variant&&(i/=2);var o=this.state.ripples,n=Date.now();o[n]={xPos:e.pageX-t.left,yPos:e.pageY-t.top,diameter:i,teardownFn:this.teardownRipple.bind(this,n)},this.setState({ripples:o})}},{key:"onTouchStart",value:function(e){}},{key:"teardownRipple",value:function(e){var t=this.state.ripples;delete t[e],this.setState({ripples:t})}},{key:"render",value:function(){var e=u,t=void 0,i=void 0,o=this.state.ripples;for(t in p)i=this.props[t],"default"!==i&&(e+=" "+u+"--"+i);return n["default"].createElement("button",babelHelpers["extends"]({},this.props,{ref:"buttonEl",className:e+" "+this.props.className,onClick:this.onClick.bind(this),onMouseDown:this.onMouseDown.bind(this)}),this.props.children,Object.keys(o).map(function(e,t){var i=o[e];return n["default"].createElement(m,{key:e,xPos:i.xPos,yPos:i.yPos,diameter:i.diameter,onTeardown:i.teardownFn})}))}}]),t}(n["default"].Component);d.propTypes={color:s.oneOf(["default","primary","danger","dark","accent"]),disabled:s.bool,size:s.oneOf(["default","small","large"]),type:s.oneOf(["submit","button"]),variant:s.oneOf(["default","flat","raised","fab"]),onClick:s.func},d.defaultProps={className:"",color:"default",disabled:!1,size:"default",type:null,variant:"default",onClick:null};var m=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"componentDidMount",value:function(){var e=this,t=setTimeout(function(){var t=e.props.onTeardown;t&&t()},2e3);this.setState({teardownTimer:t})}},{key:"componentWillUnmount",value:function(){clearTimeout(this.state.teardownTimer)}},{key:"render",value:function(){var e=this.props.diameter,t=e/2,i={height:e,width:e,top:this.props.yPos-t||0,left:this.props.xPos-t||0};return n["default"].createElement("div",{className:c,style:i})}}]),t}(n["default"].Component);m.propTypes={xPos:s.number,yPos:s.number,diameter:s.number,onTeardown:s.func},m.defaultProps={xPos:0,yPos:0,diameter:0,onTeardown:null},i["default"]=d,t.exports=i["default"]},{"../js/lib/jqLite":5,"../js/lib/util":6,react:"CwoHg3"}],9:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props,t=(e.children,babelHelpers.objectWithoutProperties(e,["children"]));return n["default"].createElement("span",babelHelpers["extends"]({},t,{className:"mui-caret "+this.props.className}))}}]),t}(n["default"].Component);l.defaultProps={className:""},i["default"]=l,t.exports=i["default"]},{react:"CwoHg3"}],10:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=n["default"].PropTypes,r=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){return null}}]),t}(n["default"].Component);r.propTypes={value:l.any,label:l.string,onActive:l.func},r.defaultProps={value:null,label:"",onActive:null},i["default"]=r,t.exports=i["default"]},{react:"CwoHg3"}],11:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.TextField=void 0;var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("../js/lib/util"),r=babelHelpers.interopRequireWildcard(l),a=e("./_helpers"),s=n["default"].PropTypes,u=function(e){function t(e){babelHelpers.classCallCheck(this,t);var i=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e)),o=e.value,n=o||e.defaultValue;i.state={innerValue:n,isDirty:Boolean(n)},void 0!==o&&null===e.onChange&&r.raiseError(a.controlledMessage,!0);var l=r.callback;return i.onChangeCB=l(i,"onChange"),i.onFocusCB=l(i,"onFocus"),i}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"componentDidMount",value:function(){this.refs.inputEl._muiTextfield=!0}},{key:"onChange",value:function(e){this.setState({innerValue:e.target.value});var t=this.props.onChange;t&&t(e)}},{key:"onFocus",value:function(e){this.setState({isDirty:!0})}},{key:"triggerFocus",value:function(){this.refs.inputEl.focus()}},{key:"render",value:function(){var e={},t=Boolean(this.state.innerValue),i=void 0;e["mui--is-empty"]=!t,e["mui--is-not-empty"]=t,e["mui--is-dirty"]=this.state.isDirty,e["mui--is-invalid"]=this.props.invalid,e=r.classNames(e);var o=this.props,l=(o.children,babelHelpers.objectWithoutProperties(o,["children"]));return i="textarea"===this.props.type?n["default"].createElement("textarea",babelHelpers["extends"]({},l,{ref:"inputEl",className:e,rows:this.props.rows,placeholder:this.props.hint,value:this.props.value,defaultValue:this.props.defaultValue,autoFocus:this.props.autoFocus,onChange:this.onChangeCB,onFocus:this.onFocusCB,required:this.props.required})):n["default"].createElement("input",babelHelpers["extends"]({},l,{ref:"inputEl",className:e,type:this.props.type,value:this.props.value,defaultValue:this.props.defaultValue,placeholder:this.props.hint,autoFocus:this.props.autofocus,onChange:this.onChangeCB,onFocus:this.onFocusCB,required:this.props.required}))}}]),t}(n["default"].Component);u.propTypes={hint:s.string,value:s.string,type:s.string,autoFocus:s.bool,onChange:s.func},u.defaultProps={hint:null,type:null,autoFocus:!1,onChange:null};var c=function(e){function t(){var e,i,o,n;babelHelpers.classCallCheck(this,t);for(var l=arguments.length,r=Array(l),a=0;l>a;a++)r[a]=arguments[a];return i=o=babelHelpers.possibleConstructorReturn(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(r))),o.state={style:{}},n=i,babelHelpers.possibleConstructorReturn(o,n)}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"componentDidMount",value:function(){var e=this;setTimeout(function(){var t=".15s ease-out",i=void 0;i={transition:t,WebkitTransition:t,MozTransition:t,OTransition:t,msTransform:t},e.setState({style:i})},150)}},{key:"render",value:function(){return n["default"].createElement("label",{style:this.state.style,onClick:this.props.onClick},this.props.text)}}]),t}(n["default"].Component);c.defaultProps={text:"",onClick:null};var p=function(e){function t(e){babelHelpers.classCallCheck(this,t);var i=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));return i.onClickCB=r.callback(i,"onClick"),i}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"onClick",value:function(e){r.supportsPointerEvents()===!1&&(e.target.style.cursor="text",this.refs.inputEl.triggerFocus())}},{key:"render",value:function(){var e={},t=void 0;return this.props.label.length&&(t=n["default"].createElement(c,{text:this.props.label,onClick:this.onClickCB})),e["mui-textfield"]=!0,e["mui-textfield--float-label"]=this.props.floatingLabel,e=r.classNames(e),n["default"].createElement("div",{className:e},n["default"].createElement(u,babelHelpers["extends"]({ref:"inputEl"},this.props)),t)}}]),t}(n["default"].Component);p.propTypes={label:s.string,floatingLabel:s.bool},p.defaultProps={label:"",floatingLabel:!1},i.TextField=p},{"../js/lib/util":6,"./_helpers":7,react:"CwoHg3"}],12:[function(e,t,i){t.exports='/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{box-sizing:border-box}:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:Arial,Verdana,Tahoma;font-size:14px;font-weight:400;line-height:1.429;color:rgba(0,0,0,.87);background-color:#FFF}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#2196F3;text-decoration:none}a:focus,a:hover{color:#1976D2;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}p{margin:0 0 10px}ol,ul{margin-top:0;margin-bottom:10px}figure{margin:0}img{vertical-align:middle}hr{margin-top:20px;margin-bottom:20px;border:0;height:1px;background-color:rgba(0,0,0,.12)}legend{display:block;width:100%;padding:0;margin-bottom:10px;font-size:21px;color:rgba(0,0,0,.87);line-height:inherit;border:0}input[type=search]{box-sizing:border-box;-webkit-appearance:none}input[type=checkbox]:focus,input[type=radio]:focus,input[type=file]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}input[type=checkbox]:disabled,input[type=radio]:disabled{cursor:not-allowed}strong{font-weight:700}abbr[title]{cursor:help;border-bottom:1px dotted #2196F3}h1,h2,h3{margin-top:20px;margin-bottom:10px}h4,h5,h6{margin-top:10px;margin-bottom:10px}.mui--appbar-height{height:56px}.mui--appbar-min-height,.mui-appbar{min-height:56px}.mui--appbar-line-height{line-height:56px}.mui--appbar-top{top:56px}@media (orientation:landscape) and (max-height:480px){.mui--appbar-height{height:48px}.mui--appbar-min-height,.mui-appbar{min-height:48px}.mui--appbar-line-height{line-height:48px}.mui--appbar-top{top:48px}}@media (min-width:480px){.mui--appbar-height{height:64px}.mui--appbar-min-height,.mui-appbar{min-height:64px}.mui--appbar-line-height{line-height:64px}.mui--appbar-top{top:64px}}.mui-appbar{background-color:#2196F3;color:#FFF}.mui-btn{-webkit-animation-duration:.1ms;animation-duration:.1ms;-webkit-animation-name:mui-node-inserted;animation-name:mui-node-inserted;font-weight:500;font-size:14px;line-height:18px;text-transform:uppercase;color:rgba(0,0,0,.87);background-color:#FFF;transition:all .2s ease-in-out;display:inline-block;height:36px;padding:0 26px;margin-top:6px;margin-bottom:6px;border:none;border-radius:2px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation;background-image:none;text-align:center;line-height:36px;vertical-align:middle;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;letter-spacing:.03em;position:relative;overflow:hidden}.mui-btn:active,.mui-btn:focus,.mui-btn:hover{color:rgba(0,0,0,.87);background-color:#fff}.mui-btn[disabled]:active,.mui-btn[disabled]:focus,.mui-btn[disabled]:hover{color:rgba(0,0,0,.87);background-color:#FFF}.mui-btn.mui-btn--flat{color:rgba(0,0,0,.87);background-color:transparent}.mui-btn.mui-btn--flat:active,.mui-btn.mui-btn--flat:focus,.mui-btn.mui-btn--flat:hover{color:rgba(0,0,0,.87);background-color:#f2f2f2}.mui-btn.mui-btn--flat[disabled]:active,.mui-btn.mui-btn--flat[disabled]:focus,.mui-btn.mui-btn--flat[disabled]:hover{color:rgba(0,0,0,.87);background-color:transparent}.mui-btn:active,.mui-btn:focus,.mui-btn:hover{outline:0;text-decoration:none;color:rgba(0,0,0,.87)}.mui-btn:focus,.mui-btn:hover{box-shadow:0 0 2px rgba(0,0,0,.12),0 2px 2px rgba(0,0,0,.2)}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.mui-btn:focus,.mui-btn:hover{box-shadow:0 -1px 2px rgba(0,0,0,.12),-1px 0 2px rgba(0,0,0,.12),0 0 2px rgba(0,0,0,.12),0 2px 2px rgba(0,0,0,.2)}}.mui-btn:active{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.mui-btn:active{box-shadow:0 -1px 2px rgba(0,0,0,.12),-1px 0 2px rgba(0,0,0,.12),0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}}.mui-btn.mui--is-disabled,.mui-btn:disabled{cursor:not-allowed;pointer-events:none;opacity:.6;box-shadow:none}.mui-btn+.mui-btn{margin-left:8px}.mui-btn--flat{background-color:transparent}.mui-btn--flat:active,.mui-btn--flat:focus,.mui-btn--flat:hover{box-shadow:none;background-color:#f2f2f2}.mui-btn--fab,.mui-btn--raised{box-shadow:0 0 2px rgba(0,0,0,.12),0 2px 2px rgba(0,0,0,.2)}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.mui-btn--fab,.mui-btn--raised{box-shadow:0 -1px 2px rgba(0,0,0,.12),-1px 0 2px rgba(0,0,0,.12),0 0 2px rgba(0,0,0,.12),0 2px 2px rgba(0,0,0,.2)}}.mui-btn--fab:active,.mui-btn--raised:active{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.mui-btn--fab:active,.mui-btn--raised:active{box-shadow:0 -1px 2px rgba(0,0,0,.12),-1px 0 2px rgba(0,0,0,.12),0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}}.mui-btn--fab{position:relative;padding:0;width:55px;height:55px;line-height:55px;border-radius:50%;z-index:1}.mui-btn--primary{color:#FFF;background-color:#2196F3}.mui-btn--primary:active,.mui-btn--primary:focus,.mui-btn--primary:hover{color:#FFF;background-color:#39a1f4}.mui-btn--primary[disabled]:active,.mui-btn--primary[disabled]:focus,.mui-btn--primary[disabled]:hover{color:#FFF;background-color:#2196F3}.mui-btn--primary.mui-btn--flat{color:#2196F3;background-color:transparent}.mui-btn--primary.mui-btn--flat:active,.mui-btn--primary.mui-btn--flat:focus,.mui-btn--primary.mui-btn--flat:hover{color:#2196F3;background-color:#f2f2f2}.mui-btn--primary.mui-btn--flat[disabled]:active,.mui-btn--primary.mui-btn--flat[disabled]:focus,.mui-btn--primary.mui-btn--flat[disabled]:hover{color:#2196F3;background-color:transparent}.mui-btn--dark{color:#FFF;background-color:#424242}.mui-btn--dark:active,.mui-btn--dark:focus,.mui-btn--dark:hover{color:#FFF;background-color:#4f4f4f}.mui-btn--dark[disabled]:active,.mui-btn--dark[disabled]:focus,.mui-btn--dark[disabled]:hover{color:#FFF;background-color:#424242}.mui-btn--dark.mui-btn--flat{color:#424242;background-color:transparent}.mui-btn--dark.mui-btn--flat:active,.mui-btn--dark.mui-btn--flat:focus,.mui-btn--dark.mui-btn--flat:hover{color:#424242;background-color:#f2f2f2}.mui-btn--dark.mui-btn--flat[disabled]:active,.mui-btn--dark.mui-btn--flat[disabled]:focus,.mui-btn--dark.mui-btn--flat[disabled]:hover{color:#424242;background-color:transparent}.mui-btn--danger{color:#FFF;background-color:#F44336}.mui-btn--danger:active,.mui-btn--danger:focus,.mui-btn--danger:hover{color:#FFF;background-color:#f55a4e}.mui-btn--danger[disabled]:active,.mui-btn--danger[disabled]:focus,.mui-btn--danger[disabled]:hover{color:#FFF;background-color:#F44336}.mui-btn--danger.mui-btn--flat{color:#F44336;background-color:transparent}.mui-btn--danger.mui-btn--flat:active,.mui-btn--danger.mui-btn--flat:focus,.mui-btn--danger.mui-btn--flat:hover{color:#F44336;background-color:#f2f2f2}.mui-btn--danger.mui-btn--flat[disabled]:active,.mui-btn--danger.mui-btn--flat[disabled]:focus,.mui-btn--danger.mui-btn--flat[disabled]:hover{color:#F44336;background-color:transparent}.mui-btn--accent{color:#FFF;background-color:#FF4081}.mui-btn--accent:active,.mui-btn--accent:focus,.mui-btn--accent:hover{color:#FFF;background-color:#ff5a92}.mui-btn--accent[disabled]:active,.mui-btn--accent[disabled]:focus,.mui-btn--accent[disabled]:hover{color:#FFF;background-color:#FF4081}.mui-btn--accent.mui-btn--flat{color:#FF4081;background-color:transparent}.mui-btn--accent.mui-btn--flat:active,.mui-btn--accent.mui-btn--flat:focus,.mui-btn--accent.mui-btn--flat:hover{color:#FF4081;background-color:#f2f2f2}.mui-btn--accent.mui-btn--flat[disabled]:active,.mui-btn--accent.mui-btn--flat[disabled]:focus,.mui-btn--accent.mui-btn--flat[disabled]:hover{color:#FF4081;background-color:transparent}.mui-btn--small{height:30.6px;line-height:30.6px;padding:0 16px;font-size:13px}.mui-btn--large{height:54px;line-height:54px;padding:0 26px;font-size:14px}.mui-btn--fab.mui-btn--small{width:44px;height:44px;line-height:44px}.mui-btn--fab.mui-btn--large{width:75px;height:75px;line-height:75px}.mui-checkbox,.mui-radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.mui-checkbox>label,.mui-radio>label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.mui-checkbox--inline>label>input[type=checkbox],.mui-checkbox>label>input[type=checkbox],.mui-radio--inline>label>input[type=radio],.mui-radio>label>input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px}.mui-checkbox+.mui-checkbox,.mui-radio+.mui-radio{margin-top:-5px}.mui-checkbox--inline,.mui-radio--inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.mui-checkbox--inline>input[type=checkbox],.mui-checkbox--inline>input[type=radio],.mui-checkbox--inline>label>input[type=checkbox],.mui-checkbox--inline>label>input[type=radio],.mui-radio--inline>input[type=checkbox],.mui-radio--inline>input[type=radio],.mui-radio--inline>label>input[type=checkbox],.mui-radio--inline>label>input[type=radio]{margin:4px 0 0;line-height:normal}.mui-checkbox--inline+.mui-checkbox--inline,.mui-radio--inline+.mui-radio--inline{margin-top:0;margin-left:10px}.mui-container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.mui-container:after,.mui-container:before{content:" ";display:table}.mui-container:after{clear:both}@media (min-width:544px){.mui-container{max-width:570px}}@media (min-width:768px){.mui-container{max-width:740px}}@media (min-width:992px){.mui-container{max-width:960px}}@media (min-width:1200px){.mui-container{max-width:1170px}}.mui-container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.mui-container-fluid:after,.mui-container-fluid:before{content:" ";display:table}.mui-container-fluid:after{clear:both}.mui-divider{display:block;height:1px;background-color:rgba(0,0,0,.12)}.mui--divider-top{border-top:1px solid rgba(0,0,0,.12)}.mui--divider-bottom{border-bottom:1px solid rgba(0,0,0,.12)}.mui--divider-left{border-left:1px solid rgba(0,0,0,.12)}.mui--divider-right{border-right:1px solid rgba(0,0,0,.12)}.mui-dropdown{display:inline-block;position:relative}[data-mui-toggle=dropdown]{-webkit-animation-duration:.1ms;animation-duration:.1ms;-webkit-animation-name:mui-node-inserted;animation-name:mui-node-inserted;outline:0}.mui-dropdown__menu{position:absolute;top:100%;left:0;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#FFF;border-radius:2px;z-index:1;background-clip:padding-box}.mui-dropdown__menu.mui--is-open{display:block}.mui-dropdown__menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.429;color:rgba(0,0,0,.87);white-space:nowrap}.mui-dropdown__menu>li>a:focus,.mui-dropdown__menu>li>a:hover{text-decoration:none;color:rgba(0,0,0,.87);background-color:#EEE}.mui-dropdown__menu>.mui--is-disabled>a,.mui-dropdown__menu>.mui--is-disabled>a:focus,.mui-dropdown__menu>.mui--is-disabled>a:hover{color:#EEE}.mui-dropdown__menu>.mui--is-disabled>a:focus,.mui-dropdown__menu>.mui--is-disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;cursor:not-allowed}.mui-dropdown__menu--right{left:auto;right:0}@media (min-width:544px){.mui-form--inline>.mui-textfield{display:inline-block;margin-bottom:0}.mui-form--inline>.mui-checkbox,.mui-form--inline>.mui-radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.mui-form--inline>.mui-checkbox>label,.mui-form--inline>.mui-radio>label{padding-left:0}.mui-form--inline>.mui-checkbox>label>input[type=checkbox],.mui-form--inline>.mui-radio>label>input[type=radio]{position:relative;margin-left:0}.mui-form--inline>.mui-select{display:inline-block}.mui-form--inline>.mui-btn{margin-bottom:0;margin-top:0;vertical-align:bottom}}.mui-row{margin-left:-15px;margin-right:-15px}.mui-row:after,.mui-row:before{content:" ";display:table}.mui-row:after{clear:both}.mui-col-lg-1,.mui-col-lg-10,.mui-col-lg-11,.mui-col-lg-12,.mui-col-lg-2,.mui-col-lg-3,.mui-col-lg-4,.mui-col-lg-5,.mui-col-lg-6,.mui-col-lg-7,.mui-col-lg-8,.mui-col-lg-9,.mui-col-md-1,.mui-col-md-10,.mui-col-md-11,.mui-col-md-12,.mui-col-md-2,.mui-col-md-3,.mui-col-md-4,.mui-col-md-5,.mui-col-md-6,.mui-col-md-7,.mui-col-md-8,.mui-col-md-9,.mui-col-sm-1,.mui-col-sm-10,.mui-col-sm-11,.mui-col-sm-12,.mui-col-sm-2,.mui-col-sm-3,.mui-col-sm-4,.mui-col-sm-5,.mui-col-sm-6,.mui-col-sm-7,.mui-col-sm-8,.mui-col-sm-9,.mui-col-xs-1,.mui-col-xs-10,.mui-col-xs-11,.mui-col-xs-12,.mui-col-xs-2,.mui-col-xs-3,.mui-col-xs-4,.mui-col-xs-5,.mui-col-xs-6,.mui-col-xs-7,.mui-col-xs-8,.mui-col-xs-9{min-height:1px;padding-left:15px;padding-right:15px}.mui-col-xs-1,.mui-col-xs-10,.mui-col-xs-11,.mui-col-xs-12,.mui-col-xs-2,.mui-col-xs-3,.mui-col-xs-4,.mui-col-xs-5,.mui-col-xs-6,.mui-col-xs-7,.mui-col-xs-8,.mui-col-xs-9{float:left}.mui-col-xs-1{width:8.33333%}.mui-col-xs-2{width:16.66667%}.mui-col-xs-3{width:25%}.mui-col-xs-4{width:33.33333%}.mui-col-xs-5{width:41.66667%}.mui-col-xs-6{width:50%}.mui-col-xs-7{width:58.33333%}.mui-col-xs-8{width:66.66667%}.mui-col-xs-9{width:75%}.mui-col-xs-10{width:83.33333%}.mui-col-xs-11{width:91.66667%}.mui-col-xs-12{width:100%}.mui-col-xs-offset-0{margin-left:0}.mui-col-xs-offset-1{margin-left:8.33333%}.mui-col-xs-offset-2{margin-left:16.66667%}.mui-col-xs-offset-3{margin-left:25%}.mui-col-xs-offset-4{margin-left:33.33333%}.mui-col-xs-offset-5{margin-left:41.66667%}.mui-col-xs-offset-6{margin-left:50%}.mui-col-xs-offset-7{margin-left:58.33333%}.mui-col-xs-offset-8{margin-left:66.66667%}.mui-col-xs-offset-9{margin-left:75%}.mui-col-xs-offset-10{margin-left:83.33333%}.mui-col-xs-offset-11{margin-left:91.66667%}.mui-col-xs-offset-12{margin-left:100%}@media (min-width:544px){.mui-col-sm-1,.mui-col-sm-10,.mui-col-sm-11,.mui-col-sm-12,.mui-col-sm-2,.mui-col-sm-3,.mui-col-sm-4,.mui-col-sm-5,.mui-col-sm-6,.mui-col-sm-7,.mui-col-sm-8,.mui-col-sm-9{float:left}.mui-col-sm-1{width:8.33333%}.mui-col-sm-2{width:16.66667%}.mui-col-sm-3{width:25%}.mui-col-sm-4{width:33.33333%}.mui-col-sm-5{width:41.66667%}.mui-col-sm-6{width:50%}.mui-col-sm-7{width:58.33333%}.mui-col-sm-8{width:66.66667%}.mui-col-sm-9{width:75%}.mui-col-sm-10{width:83.33333%}.mui-col-sm-11{width:91.66667%}.mui-col-sm-12{width:100%}.mui-col-sm-offset-0{margin-left:0}.mui-col-sm-offset-1{margin-left:8.33333%}.mui-col-sm-offset-2{margin-left:16.66667%}.mui-col-sm-offset-3{margin-left:25%}.mui-col-sm-offset-4{margin-left:33.33333%}.mui-col-sm-offset-5{margin-left:41.66667%}.mui-col-sm-offset-6{margin-left:50%}.mui-col-sm-offset-7{margin-left:58.33333%}.mui-col-sm-offset-8{margin-left:66.66667%}.mui-col-sm-offset-9{margin-left:75%}.mui-col-sm-offset-10{margin-left:83.33333%}.mui-col-sm-offset-11{margin-left:91.66667%}.mui-col-sm-offset-12{margin-left:100%}}@media (min-width:768px){.mui-col-md-1,.mui-col-md-10,.mui-col-md-11,.mui-col-md-12,.mui-col-md-2,.mui-col-md-3,.mui-col-md-4,.mui-col-md-5,.mui-col-md-6,.mui-col-md-7,.mui-col-md-8,.mui-col-md-9{float:left}.mui-col-md-1{width:8.33333%}.mui-col-md-2{width:16.66667%}.mui-col-md-3{width:25%}.mui-col-md-4{width:33.33333%}.mui-col-md-5{width:41.66667%}.mui-col-md-6{width:50%}.mui-col-md-7{width:58.33333%}.mui-col-md-8{width:66.66667%}.mui-col-md-9{width:75%}.mui-col-md-10{width:83.33333%}.mui-col-md-11{width:91.66667%}.mui-col-md-12{width:100%}.mui-col-md-offset-0{margin-left:0}.mui-col-md-offset-1{margin-left:8.33333%}.mui-col-md-offset-2{margin-left:16.66667%}.mui-col-md-offset-3{margin-left:25%}.mui-col-md-offset-4{margin-left:33.33333%}.mui-col-md-offset-5{margin-left:41.66667%}.mui-col-md-offset-6{margin-left:50%}.mui-col-md-offset-7{margin-left:58.33333%}.mui-col-md-offset-8{margin-left:66.66667%}.mui-col-md-offset-9{margin-left:75%}.mui-col-md-offset-10{margin-left:83.33333%}.mui-col-md-offset-11{margin-left:91.66667%}.mui-col-md-offset-12{margin-left:100%}}@media (min-width:992px){.mui-col-lg-1,.mui-col-lg-10,.mui-col-lg-11,.mui-col-lg-12,.mui-col-lg-2,.mui-col-lg-3,.mui-col-lg-4,.mui-col-lg-5,.mui-col-lg-6,.mui-col-lg-7,.mui-col-lg-8,.mui-col-lg-9{float:left}.mui-col-lg-1{width:8.33333%}.mui-col-lg-2{width:16.66667%}.mui-col-lg-3{width:25%}.mui-col-lg-4{width:33.33333%}.mui-col-lg-5{width:41.66667%}.mui-col-lg-6{width:50%}.mui-col-lg-7{width:58.33333%}.mui-col-lg-8{width:66.66667%}.mui-col-lg-9{width:75%}.mui-col-lg-10{width:83.33333%}.mui-col-lg-11{width:91.66667%}.mui-col-lg-12{width:100%}.mui-col-lg-offset-0{margin-left:0}.mui-col-lg-offset-1{margin-left:8.33333%}.mui-col-lg-offset-2{margin-left:16.66667%}.mui-col-lg-offset-3{margin-left:25%}.mui-col-lg-offset-4{margin-left:33.33333%}.mui-col-lg-offset-5{margin-left:41.66667%}.mui-col-lg-offset-6{margin-left:50%}.mui-col-lg-offset-7{margin-left:58.33333%}.mui-col-lg-offset-8{margin-left:66.66667%}.mui-col-lg-offset-9{margin-left:75%}.mui-col-lg-offset-10{margin-left:83.33333%}.mui-col-lg-offset-11{margin-left:91.66667%}.mui-col-lg-offset-12{margin-left:100%}}@media (min-width:1200px){.mui-col-xl-1,.mui-col-xl-10,.mui-col-xl-11,.mui-col-xl-12,.mui-col-xl-2,.mui-col-xl-3,.mui-col-xl-4,.mui-col-xl-5,.mui-col-xl-6,.mui-col-xl-7,.mui-col-xl-8,.mui-col-xl-9{float:left}.mui-col-xl-1{width:8.33333%}.mui-col-xl-2{width:16.66667%}.mui-col-xl-3{width:25%}.mui-col-xl-4{width:33.33333%}.mui-col-xl-5{width:41.66667%}.mui-col-xl-6{width:50%}.mui-col-xl-7{width:58.33333%}.mui-col-xl-8{width:66.66667%}.mui-col-xl-9{width:75%}.mui-col-xl-10{width:83.33333%}.mui-col-xl-11{width:91.66667%}.mui-col-xl-12{width:100%}.mui-col-xl-offset-0{margin-left:0}.mui-col-xl-offset-1{margin-left:8.33333%}.mui-col-xl-offset-2{margin-left:16.66667%}.mui-col-xl-offset-3{margin-left:25%}.mui-col-xl-offset-4{margin-left:33.33333%}.mui-col-xl-offset-5{margin-left:41.66667%}.mui-col-xl-offset-6{margin-left:50%}.mui-col-xl-offset-7{margin-left:58.33333%}.mui-col-xl-offset-8{margin-left:66.66667%}.mui-col-xl-offset-9{margin-left:75%}.mui-col-xl-offset-10{margin-left:83.33333%}.mui-col-xl-offset-11{margin-left:91.66667%}.mui-col-xl-offset-12{margin-left:100%}}.mui-panel{padding:15px;margin-bottom:20px;border-radius:0;background-color:#FFF;box-shadow:0 2px 2px 0 rgba(0,0,0,.16),0 0 2px 0 rgba(0,0,0,.12)}.mui-panel:after,.mui-panel:before{content:" ";display:table}.mui-panel:after{clear:both}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.mui-panel{box-shadow:0 -1px 2px 0 rgba(0,0,0,.12),-1px 0 2px 0 rgba(0,0,0,.12),0 2px 2px 0 rgba(0,0,0,.16),0 0 2px 0 rgba(0,0,0,.12)}}.mui-select{display:block;padding-top:15px;margin-bottom:20px;position:relative}.mui-select:focus{outline:0}.mui-select:focus>select{height:33px;margin-bottom:-1px;border-color:#2196F3;border-width:2px}.mui-select>select{-webkit-animation-duration:.1ms;animation-duration:.1ms;-webkit-animation-name:mui-node-inserted;animation-name:mui-node-inserted;display:block;height:32px;width:100%;appearance:none;-webkit-appearance:none;-moz-appearance:none;outline:0;border:none;border-bottom:1px solid rgba(0,0,0,.26);border-radius:0;box-shadow:none;background-color:transparent;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNiIgd2lkdGg9IjEwIj48cG9seWdvbiBwb2ludHM9IjAsMCAxMCwwIDUsNiIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwuMjQpOyIvPjwvc3ZnPg==);background-repeat:no-repeat;background-position:right center;cursor:pointer;color:rgba(0,0,0,.87);font-size:16px;padding:0 25px 0 0}.mui-select>select::-ms-expand{display:none}.mui-select>select:focus{outline:0;height:33px;margin-bottom:-1px;border-color:#2196F3;border-width:2px}.mui-select>select:disabled{color:rgba(0,0,0,.38);cursor:not-allowed;background-color:transparent;opacity:1}.mui-select__menu{position:absolute;z-index:1;min-width:100%;overflow-y:auto;padding:8px 0;background-color:#FFF;font-size:16px}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.mui-select__menu{border-left:1px solid rgba(0,0,0,.12);border-top:1px solid rgba(0,0,0,.12)}}.mui-select__menu>div{padding:0 22px;height:42px;line-height:42px;cursor:pointer;white-space:nowrap}.mui-select__menu>div:hover{background-color:#E0E0E0}.mui-select__menu>div.mui--is-selected{background-color:#EEE}th{text-align:left}.mui-table{width:100%;max-width:100%;margin-bottom:20px}.mui-table>tbody>tr>td,.mui-table>tbody>tr>th,.mui-table>tfoot>tr>td,.mui-table>tfoot>tr>th,.mui-table>thead>tr>td,.mui-table>thead>tr>th{padding:10px;line-height:1.429}.mui-table>thead>tr>th{border-bottom:2px solid rgba(0,0,0,.12);font-weight:700}.mui-table>tbody+tbody{border-top:2px solid rgba(0,0,0,.12)}.mui-table.mui-table--bordered>tbody>tr>td{border-bottom:1px solid rgba(0,0,0,.12)}.mui-tabs__bar{list-style:none;padding-left:0;margin-bottom:0;background-color:transparent;white-space:nowrap;overflow-x:auto}.mui-tabs__bar>li{display:inline-block}.mui-tabs__bar>li>a{display:block;white-space:nowrap;text-transform:uppercase;font-weight:500;font-size:14px;color:rgba(0,0,0,.87);cursor:default;height:48px;line-height:48px;padding-left:24px;padding-right:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mui-tabs__bar>li>a:hover{text-decoration:none}.mui-tabs__bar>li.mui--is-active{border-bottom:2px solid #2196F3}.mui-tabs__bar>li.mui--is-active>a{color:#2196F3}.mui-tabs__bar.mui-tabs__bar--justified{display:table;width:100%;table-layout:fixed}.mui-tabs__bar.mui-tabs__bar--justified>li{display:table-cell}.mui-tabs__bar.mui-tabs__bar--justified>li>a{text-align:center;padding-left:0;padding-right:0}.mui-tabs__pane{display:none}.mui-tabs__pane.mui--is-active{display:block}[data-mui-toggle=tab]{-webkit-animation-duration:.1ms;animation-duration:.1ms;-webkit-animation-name:mui-node-inserted;animation-name:mui-node-inserted}.mui-textfield{display:block;padding-top:15px;margin-bottom:20px;position:relative}.mui-textfield>label{position:absolute;top:0;display:block;width:100%;color:rgba(0,0,0,.54);font-size:12px;font-weight:400;line-height:15px;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.mui-textfield>textarea{padding-top:5px}.mui-textfield>input,.mui-textfield>textarea{display:block}.mui-textfield>input:focus~label,.mui-textfield>textarea:focus~label{color:#2196F3}.mui-textfield--float-label>label{position:absolute;-webkit-transform:translate(0,15px);transform:translate(0,15px);font-size:16px;line-height:32px;color:rgba(0,0,0,.26);text-overflow:clip;cursor:text;pointer-events:none}.mui-textfield--float-label>input:focus~label,.mui-textfield--float-label>textarea:focus~label{-webkit-transform:translate(0,0);transform:translate(0,0);font-size:12px;line-height:15px;text-overflow:ellipsis}.mui-textfield--float-label>input:not(:focus).mui--is-not-empty~label,.mui-textfield--float-label>input:not(:focus):not(:empty):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield--float-label>input:not(:focus)[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield--float-label>textarea:not(:focus).mui--is-not-empty~label,.mui-textfield--float-label>textarea:not(:focus):not(:empty):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield--float-label>textarea:not(:focus)[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty)~label{color:rgba(0,0,0,.54);font-size:12px;line-height:15px;-webkit-transform:translate(0,0);transform:translate(0,0);text-overflow:ellipsis}.mui-textfield--wrap-label{display:table;width:100%;padding-top:0}.mui-textfield--wrap-label:not(.mui-textfield--float-label)>label{display:table-header-group;position:static;white-space:normal;overflow-x:visible}.mui-textfield>input,.mui-textfield>textarea{-webkit-animation-duration:.1ms;animation-duration:.1ms;-webkit-animation-name:mui-node-inserted;animation-name:mui-node-inserted;display:block;background-color:transparent;color:rgba(0,0,0,.87);border:none;border-bottom:1px solid rgba(0,0,0,.26);outline:0;width:100%;font-size:16px;padding:0;box-shadow:none;border-radius:0;background-image:none}.mui-textfield>input:focus,.mui-textfield>textarea:focus{border-color:#2196F3;border-width:2px}.mui-textfield>input:-moz-read-only,.mui-textfield>input:disabled,.mui-textfield>textarea:-moz-read-only,.mui-textfield>textarea:disabled{cursor:not-allowed;background-color:transparent;opacity:1}.mui-textfield>input:disabled,.mui-textfield>input:read-only,.mui-textfield>textarea:disabled,.mui-textfield>textarea:read-only{cursor:not-allowed;background-color:transparent;opacity:1}.mui-textfield>input::-webkit-input-placeholder,.mui-textfield>textarea::-webkit-input-placeholder{color:rgba(0,0,0,.26);opacity:1}.mui-textfield>input::-moz-placeholder,.mui-textfield>textarea::-moz-placeholder{color:rgba(0,0,0,.26);opacity:1}.mui-textfield>input:-ms-input-placeholder,.mui-textfield>textarea:-ms-input-placeholder{color:rgba(0,0,0,.26);opacity:1}.mui-textfield>input::placeholder,.mui-textfield>textarea::placeholder{color:rgba(0,0,0,.26);opacity:1}.mui-textfield>input{height:32px}.mui-textfield>input:focus{height:33px;margin-bottom:-1px}.mui-textfield>textarea{min-height:64px}.mui-textfield>textarea[rows]:not([rows="2"]):focus{margin-bottom:-1px}.mui-textfield>input:focus{height:33px;margin-bottom:-1px}.mui-textfield>input:invalid:not(:focus):not(:required),.mui-textfield>input:invalid:not(:focus):required.mui--is-empty.mui--is-dirty,.mui-textfield>input:invalid:not(:focus):required.mui--is-not-empty,.mui-textfield>input:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>input:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>input:not(:focus).mui--is-invalid:not(:required),.mui-textfield>input:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty,.mui-textfield>input:not(:focus).mui--is-invalid:required.mui--is-not-empty,.mui-textfield>input:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>input:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>textarea:invalid:not(:focus):not(:required),.mui-textfield>textarea:invalid:not(:focus):required.mui--is-empty.mui--is-dirty,.mui-textfield>textarea:invalid:not(:focus):required.mui--is-not-empty,.mui-textfield>textarea:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>textarea:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>textarea:not(:focus).mui--is-invalid:not(:required),.mui-textfield>textarea:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty,.mui-textfield>textarea:not(:focus).mui--is-invalid:required.mui--is-not-empty,.mui-textfield>textarea:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>textarea:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty){border-color:#F44336;border-width:2px}.mui-textfield>input:invalid:not(:focus):not(:required),.mui-textfield>input:invalid:not(:focus):required.mui--is-empty.mui--is-dirty,.mui-textfield>input:invalid:not(:focus):required.mui--is-not-empty,.mui-textfield>input:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>input:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>input:not(:focus).mui--is-invalid:not(:required),.mui-textfield>input:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty,.mui-textfield>input:not(:focus).mui--is-invalid:required.mui--is-not-empty,.mui-textfield>input:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty),.mui-textfield>input:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty){height:33px;margin-bottom:-1px}.mui-textfield>input:invalid:not(:focus):not(:required)~label,.mui-textfield>input:invalid:not(:focus):required.mui--is-not-empty~label,.mui-textfield>input:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield>input:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield>input:not(:focus).mui--is-invalid:not(:required)~label,.mui-textfield>input:not(:focus).mui--is-invalid:required.mui--is-not-empty~label,.mui-textfield>input:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield>input:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield>textarea:invalid:not(:focus):not(:required)~label,.mui-textfield>textarea:invalid:not(:focus):required.mui--is-not-empty~label,.mui-textfield>textarea:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield>textarea:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield>textarea:not(:focus).mui--is-invalid:not(:required)~label,.mui-textfield>textarea:not(:focus).mui--is-invalid:required.mui--is-not-empty~label,.mui-textfield>textarea:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty)~label,.mui-textfield>textarea:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty)~label{color:#F44336}.mui-textfield:not(.mui-textfield--float-label)>input:invalid:not(:focus):required.mui--is-empty.mui--is-dirty~label,.mui-textfield:not(.mui-textfield--float-label)>input:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty~label,.mui-textfield:not(.mui-textfield--float-label)>textarea:invalid:not(:focus):required.mui--is-empty.mui--is-dirty~label,.mui-textfield:not(.mui-textfield--float-label)>textarea:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty~label{color:#F44336}@-webkit-keyframes mui-node-inserted{from{opacity:.99}to{opacity:1}}@keyframes mui-node-inserted{from{opacity:.99}to{opacity:1}}.mui--no-transition{transition:none!important}.mui--no-user-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mui-caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.mui--text-left{text-align:left!important}.mui--text-right{text-align:right!important}.mui--text-center{text-align:center!important}.mui--text-justify{text-align:justify!important}.mui--text-nowrap{white-space:nowrap!important}.mui--align-baseline{vertical-align:baseline!important}.mui--align-top{vertical-align:top!important}.mui--align-middle{vertical-align:middle!important}.mui--align-bottom{vertical-align:bottom!important}.mui--text-dark{color:rgba(0,0,0,.87)}.mui--text-dark-secondary{color:rgba(0,0,0,.54)}.mui--text-dark-hint{color:rgba(0,0,0,.38)}.mui--text-light{color:#FFF}.mui--text-light-secondary{color:rgba(255,255,255,.7)}.mui--text-light-hint{color:rgba(255,255,255,.3)}.mui--text-accent{color:rgba(255,64,129,.87)}.mui--text-accent-secondary{color:rgba(255,64,129,.54)}.mui--text-accent-hint{color:rgba(255,64,129,.38)}.mui--text-black{color:#000}.mui--text-white{color:#FFF}.mui--text-danger{color:#F44336}.mui-list--unstyled{padding-left:0;list-style:none}.mui-list--inline{padding-left:0;list-style:none;margin-left:-5px}.mui-list--inline>li{display:inline-block;padding-left:5px;padding-right:5px}.mui--z1,.mui-dropdown__menu,.mui-select__menu{box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.mui--z2{box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.mui--z3{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.mui--z4{box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}.mui--z5{box-shadow:0 19px 38px rgba(0,0,0,.3),0 15px 12px rgba(0,0,0,.22)}.mui--clearfix:after,.mui--clearfix:before{content:" ";display:table}.mui--clearfix:after{clear:both}.mui--pull-right{float:right!important}.mui--pull-left{float:left!important}.mui--hide{display:none!important}.mui--show{display:block!important}.mui--invisible{visibility:hidden}.mui--overflow-hidden{overflow:hidden!important}.mui--overflow-hidden-x{overflow-x:hidden!important}.mui--overflow-hidden-y{overflow-y:hidden!important}.mui--visible-lg-block,.mui--visible-lg-inline,.mui--visible-lg-inline-block,.mui--visible-md-block,.mui--visible-md-inline,.mui--visible-md-inline-block,.mui--visible-sm-block,.mui--visible-sm-inline,.mui--visible-sm-inline-block,.mui--visible-xl-block,.mui--visible-xl-inline,.mui--visible-xl-inline-block,.mui--visible-xs-block,.mui--visible-xs-inline,.mui--visible-xs-inline-block{display:none!important}@media (max-width:543px){.mui-visible-xs{display:block!important}table.mui-visible-xs{display:table}tr.mui-visible-xs{display:table-row!important}td.mui-visible-xs,th.mui-visible-xs{display:table-cell!important}.mui--visible-xs-block{display:block!important}.mui--visible-xs-inline{display:inline!important}.mui--visible-xs-inline-block{display:inline-block!important}}@media (min-width:544px) and (max-width:767px){.mui-visible-sm{display:block!important}table.mui-visible-sm{display:table}tr.mui-visible-sm{display:table-row!important}td.mui-visible-sm,th.mui-visible-sm{display:table-cell!important}.mui--visible-sm-block{display:block!important}.mui--visible-sm-inline{display:inline!important}.mui--visible-sm-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.mui-visible-md{display:block!important}table.mui-visible-md{display:table}tr.mui-visible-md{display:table-row!important}td.mui-visible-md,th.mui-visible-md{display:table-cell!important}.mui--visible-md-block{display:block!important}.mui--visible-md-inline{display:inline!important}.mui--visible-md-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.mui-visible-lg{display:block!important}table.mui-visible-lg{display:table}tr.mui-visible-lg{display:table-row!important}td.mui-visible-lg,th.mui-visible-lg{display:table-cell!important}.mui--visible-lg-block{display:block!important}.mui--visible-lg-inline{display:inline!important}.mui--visible-lg-inline-block{display:inline-block!important}}@media (min-width:1200px){.mui-visible-xl{display:block!important}table.mui-visible-xl{display:table}tr.mui-visible-xl{display:table-row!important}td.mui-visible-xl,th.mui-visible-xl{display:table-cell!important}.mui--visible-xl-block{display:block!important}.mui--visible-xl-inline{display:inline!important}.mui--visible-xl-inline-block{display:inline-block!important}}@media (max-width:543px){.mui--hidden-xs{display:none!important}}@media (min-width:544px) and (max-width:767px){.mui--hidden-sm{display:none!important}}@media (min-width:768px) and (max-width:991px){.mui--hidden-md{display:none!important}}@media (min-width:992px) and (max-width:1199px){.mui--hidden-lg{display:none!important}}@media (min-width:1200px){.mui--hidden-xl{display:none!important}}body.mui-body--scroll-lock{overflow:hidden!important}#mui-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:99999999;background-color:rgba(0,0,0,.2);overflow:auto}.mui-ripple-effect{position:absolute;border-radius:50%;pointer-events:none;opacity:0;-webkit-animation:mui-ripple-animation 2s;animation:mui-ripple-animation 2s}@-webkit-keyframes mui-ripple-animation{from{-webkit-transform:scale(1);transform:scale(1);opacity:.4}to{-webkit-transform:scale(100);transform:scale(100);opacity:0}}@keyframes mui-ripple-animation{from{-webkit-transform:scale(1);transform:scale(1);opacity:.4}to{-webkit-transform:scale(100);transform:scale(100);opacity:0}}.mui-btn>.mui-ripple-effect{background-color:#a6a6a6}.mui-btn--primary>.mui-ripple-effect{background-color:#FFF}.mui-btn--dark>.mui-ripple-effect{background-color:#FFF}.mui-btn--danger>.mui-ripple-effect{background-color:#FFF}.mui-btn--accent>.mui-ripple-effect{background-color:#FFF}.mui-btn--flat>.mui-ripple-effect{background-color:#a6a6a6}.mui--text-display4{font-weight:300;font-size:112px;line-height:112px}.mui--text-display3{font-weight:400;font-size:56px;line-height:56px}.mui--text-display2{font-weight:400;font-size:45px;line-height:48px}.mui--text-display1,h1{font-weight:400;font-size:34px;line-height:40px}.mui--text-headline,h2{font-weight:400;font-size:24px;line-height:32px}.mui--text-title,h3{font-weight:400;font-size:20px;line-height:28px}.mui--text-subhead,h4{font-weight:400;font-size:16px;line-height:24px}.mui--text-body2,h5{font-weight:500;font-size:14px;line-height:24px}.mui--text-body1{font-weight:400;font-size:14px;line-height:20px}.mui--text-caption{font-weight:400;font-size:12px;line-height:16px}.mui--text-menu{font-weight:500;font-size:13px;line-height:17px}.mui--text-button{font-weight:500;font-size:14px;line-height:18px;text-transform:uppercase}'; },{}],13:[function(e,t,i){t.exports=e(6)},{"../config":3,"./jqLite":5}],14:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){return n["default"].createElement("div",babelHelpers["extends"]({},this.props,{className:"mui-appbar "+this.props.className}),this.props.children)}}]),t}(n["default"].Component);l.defaultProps={className:""},i["default"]=l,t.exports=i["default"]},{react:"CwoHg3"}],15:[function(e,t,i){t.exports=e(8)},{"../js/lib/jqLite":5,"../js/lib/util":6,react:"CwoHg3"}],16:[function(e,t,i){t.exports=e(9)},{react:"CwoHg3"}],17:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("../js/lib/util"),r=(babelHelpers.interopRequireWildcard(l),e("./_helpers"),n["default"].PropTypes),a=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props,t=(e.children,e.onChange,babelHelpers.objectWithoutProperties(e,["children","onChange"]));return n["default"].createElement("div",babelHelpers["extends"]({},t,{className:"mui-checkbox "+this.props.className}),n["default"].createElement("label",null,n["default"].createElement("input",{ref:"inputEl",type:"checkbox",name:this.props.name,value:this.props.value,checked:this.props.checked,defaultChecked:this.props.defaultChecked,disabled:this.props.disabled,onChange:this.props.onChange}),this.props.label))}}]),t}(n["default"].Component);a.propTypes={name:r.string,label:r.string,value:r.string,checked:r.bool,defaultChecked:r.bool,disabled:r.bool,onChange:r.func},a.defaultProps={className:"",name:null,label:null,disabled:!1,onChange:null},i["default"]=a,t.exports=i["default"]},{"../js/lib/util":6,"./_helpers":7,react:"CwoHg3"}],18:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("../js/lib/util"),r=babelHelpers.interopRequireWildcard(l),a=["xs","sm","md","lg","xl"],s=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"defaultProps",value:function(){var e={className:""},t=void 0,i=void 0;for(t=a.length-1;t>-1;t--)i=a[t],e[i]=null,e[i+"-offset"]=null;return e}},{key:"render",value:function(){var e={},t=void 0,i=void 0,o=void 0,l=void 0;for(t=a.length-1;t>-1;t--)i=a[t],l="mui-col-"+i,o=this.props[i],o&&(e[l+"-"+o]=!0),o=this.props[i+"-offset"],o&&(e[l+"-offset-"+o]=!0);return e=r.classNames(e),n["default"].createElement("div",babelHelpers["extends"]({},this.props,{className:e+" "+this.props.className}),this.props.children)}}]),t}(n["default"].Component);i["default"]=s,t.exports=i["default"]},{"../js/lib/util":6,react:"CwoHg3"}],19:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e="mui-container";return this.props.fluid&&(e+="-fluid"),n["default"].createElement("div",babelHelpers["extends"]({},this.props,{className:e+" "+this.props.className}),this.props.children)}}]),t}(n["default"].Component);l.propTypes={fluid:n["default"].PropTypes.bool},l.defaultProps={className:"",fluid:!1},i["default"]=l,t.exports=i["default"]},{react:"CwoHg3"}],20:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props,t=(e.children,babelHelpers.objectWithoutProperties(e,["children"]));return n["default"].createElement("div",babelHelpers["extends"]({},t,{className:"mui-divider "+this.props.className}))}}]),t}(n["default"].Component);l.defaultProps={className:""},i["default"]=l,t.exports=i["default"]},{react:"CwoHg3"}],21:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("../js/lib/util"),r=babelHelpers.interopRequireWildcard(l),a=n["default"].PropTypes,s=function(e){function t(e){babelHelpers.classCallCheck(this,t);var i=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));return i.onClickCB=r.callback(i,"onClick"),i}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"onClick",value:function(e){this.props.onClick&&this.props.onClick(this,e)}},{key:"render",value:function(){var e=this.props,t=e.children,i=(e.onClick,babelHelpers.objectWithoutProperties(e,["children","onClick"]));return n["default"].createElement("li",i,n["default"].createElement("a",{href:this.props.link,target:this.props.target,"data-mui-value":this.props.value,onClick:this.onClickCB},t))}}]),t}(n["default"].Component);s.propTypes={link:a.string,target:a.string,onClick:a.func},i["default"]=s,t.exports=i["default"]},{"../js/lib/util":6,react:"CwoHg3"}],22:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("./button"),r=babelHelpers.interopRequireDefault(l),a=e("./caret"),s=babelHelpers.interopRequireDefault(a),u=e("../js/lib/jqLite"),c=babelHelpers.interopRequireWildcard(u),p=e("../js/lib/util"),d=babelHelpers.interopRequireWildcard(p),m=n["default"].PropTypes,b="mui-dropdown",f="mui-dropdown__menu",h="mui--is-open",g="mui-dropdown__menu--right",x=function(e){function t(e){babelHelpers.classCallCheck(this,t);var i=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));i.state={opened:!1,menuTop:0};var o=d.callback;return i.selectCB=o(i,"select"),i.onClickCB=o(i,"onClick"),i.onOutsideClickCB=o(i,"onOutsideClick"),i}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"componentWillMount",value:function(){document.addEventListener("click",this.onOutsideClickCB)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.onOutsideClickCB)}},{key:"onClick",value:function(e){if(0===e.button&&!this.props.disabled&&!e.defaultPrevented){this.toggle();var t=this.props.onClick;t&&t(e)}}},{key:"toggle",value:function(){return this.props.children?void(this.state.opened?this.close():this.open()):d.raiseError("Dropdown menu element not found")}},{key:"open",value:function(){var e=this.refs.wrapperEl.getBoundingClientRect(),t=void 0;t=this.refs.button.refs.buttonEl.getBoundingClientRect(),this.setState({opened:!0,menuTop:t.top-e.top+t.height})}},{key:"close",value:function(){this.setState({opened:!1})}},{key:"select",value:function(e){this.props.onSelect&&"A"===e.target.tagName&&this.props.onSelect(e.target.getAttribute("data-mui-value")),e.defaultPrevented||this.close()}},{key:"onOutsideClick",value:function(e){var t=this.refs.wrapperEl.contains(e.target);t||this.close()}},{key:"render",value:function(){var e=void 0,t=void 0,i=void 0;if(i="string"===c.type(this.props.label)?n["default"].createElement("span",null,this.props.label," ",n["default"].createElement(s["default"],null)):this.props.label,e=n["default"].createElement(r["default"],{ref:"button",type:"button",onClick:this.onClickCB,color:this.props.color,variant:this.props.variant,size:this.props.size,disabled:this.props.disabled},i),this.state.opened){var o={};o[f]=!0,o[h]=this.state.opened,o[g]="right"===this.props.alignMenu,o=d.classNames(o),t=n["default"].createElement("ul",{ref:"menuEl",className:o,style:{top:this.state.menuTop},onClick:this.selectCB},this.props.children)}var l=this.props,a=l.className,u=(l.children,l.onClick,babelHelpers.objectWithoutProperties(l,["className","children","onClick"]));return n["default"].createElement("div",babelHelpers["extends"]({},u,{ref:"wrapperEl",className:b+" "+a}),e,t)}}]),t}(n["default"].Component);x.propTypes={color:m.oneOf(["default","primary","danger","dark","accent"]),variant:m.oneOf(["default","flat","raised","fab"]),size:m.oneOf(["default","small","large"]),label:m.oneOfType([m.string,m.element]),alignMenu:m.oneOf(["left","right"]),onClick:m.func,onSelect:m.func,disabled:m.bool},x.defaultProps={className:"",color:"default",variant:"default",size:"default",label:"",alignMenu:"left",onClick:null,onSelect:null,disabled:!1},i["default"]=x,t.exports=i["default"]},{"../js/lib/jqLite":5,"../js/lib/util":6,"./button":8,"./caret":9,react:"CwoHg3"}],23:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e="";return this.props.inline&&(e="mui-form--inline"),n["default"].createElement("form",babelHelpers["extends"]({},this.props,{className:e+" "+this.props.className}),this.props.children)}}]),t}(n["default"].Component);l.propTypes={inline:n["default"].PropTypes.bool},l.defaultProps={className:"",inline:!1},i["default"]=l,t.exports=i["default"]},{react:"CwoHg3"}],24:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("./text-field"),r=n["default"].PropTypes,a=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){return n["default"].createElement(l.TextField,this.props)}}]),t}(n["default"].Component);a.propTypes={type:r.oneOf(["text","email","url","tel","password"])},a.defaultProps={type:"text"},i["default"]=a,t.exports=i["default"]},{"./text-field":11,react:"CwoHg3"}],25:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("../js/lib/forms"),r=(babelHelpers.interopRequireWildcard(l),e("../js/lib/jqLite")),a=(babelHelpers.interopRequireWildcard(r),e("../js/lib/util")),s=(babelHelpers.interopRequireWildcard(a),n["default"].PropTypes),u=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props,t=(e.children,babelHelpers.objectWithoutProperties(e,["children"]));return n["default"].createElement("option",babelHelpers["extends"]({},t,{value:this.props.value}),this.props.label)}}]),t}(n["default"].Component);u.propTypes={value:s.string,label:s.string},u.defaultProps={value:null,label:null},i["default"]=u,t.exports=i["default"]},{"../js/lib/forms":4,"../js/lib/jqLite":5,"../js/lib/util":6,react:"CwoHg3"}],26:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){return n["default"].createElement("div",babelHelpers["extends"]({},this.props,{className:"mui-panel "+this.props.className}),this.props.children)}}]),t}(n["default"].Component);l.defaultProps={className:""},i["default"]=l,t.exports=i["default"]},{react:"CwoHg3"}],27:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=n["default"].PropTypes,r=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props,t=(e.children,e.onChange,babelHelpers.objectWithoutProperties(e,["children","onChange"]));return n["default"].createElement("div",babelHelpers["extends"]({},t,{className:"mui-radio "+this.props.className}),n["default"].createElement("label",null,n["default"].createElement("input",{ref:"inputEl",type:"radio",name:this.props.name,value:this.props.value,checked:this.props.checked,defaultChecked:this.props.defaultChecked,disabled:this.props.disabled,onChange:this.props.onChange}),this.props.label))}}]),t}(n["default"].Component);r.propTypes={name:l.string,label:l.string,value:l.string,checked:l.bool,defaultChecked:l.bool,disabled:l.bool,onChange:l.func},r.defaultProps={className:"",name:null,label:null,disabled:!1,onChange:null},i["default"]=r,t.exports=i["default"]},{react:"CwoHg3"}],28:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("../js/lib/util"),r=(babelHelpers.interopRequireWildcard(l),function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){return n["default"].createElement("div",babelHelpers["extends"]({},this.props,{className:"mui-row "+this.props.className}),this.props.children)}}]),t}(n["default"].Component));r.defaultProps={className:""},i["default"]=r,t.exports=i["default"]},{"../js/lib/util":6,react:"CwoHg3"}],29:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("../js/lib/forms"),r=babelHelpers.interopRequireWildcard(l),a=e("../js/lib/jqLite"),s=babelHelpers.interopRequireWildcard(a),u=e("../js/lib/util"),c=babelHelpers.interopRequireWildcard(u),p=e("./_helpers"),d=n["default"].PropTypes,m=function(e){function t(e){babelHelpers.classCallCheck(this,t);var i=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));i.state={showMenu:!1},e.readOnly===!1&&void 0!==e.value&&null===e.onChange&&c.raiseError(p.controlledMessage,!0),i.state.value=e.value;var o=c.callback;return i.hideMenuCB=o(i,"hideMenu"),i.onInnerChangeCB=o(i,"onInnerChange"),i.onInnerClickCB=o(i,"onInnerClick"),i.onInnerFocusCB=o(i,"onInnerFocus"),i.onInnerMouseDownCB=o(i,"onInnerMouseDown"),i.onKeydownCB=o(i,"onKeydown"),i.onMenuChangeCB=o(i,"onMenuChange"),i.onOuterFocusCB=o(i,"onOuterFocus"),i.onOuterBlurCB=o(i,"onOuterBlur"),i}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"componentDidMount",value:function(){this.refs.selectEl._muiSelect=!0,this.refs.wrapperEl.tabIndex=-1,this.props.autoFocus&&this.refs.wrapperEl.focus()}},{key:"componentWillReceiveProps",value:function(e){this.setState({value:e.value})}},{key:"onInnerMouseDown",value:function(e){0===e.button&&this.props.useDefault!==!0&&e.preventDefault()}},{key:"onInnerChange",value:function(e){var t=e.target.value;this.setState({value:t});var i=this.props.onChange;i&&i(t)}},{key:"onInnerClick",value:function(e){0===e.button&&this.showMenu()}},{key:"onInnerFocus",value:function(e){var t=this;this.props.useDefault!==!0&&setTimeout(function(){t.refs.wrapperEl.focus()},0)}},{key:"onOuterFocus",value:function(e){if(e.target===this.refs.wrapperEl){var t=this.refs.selectEl;return t._muiOrigIndex=t.tabIndex,t.tabIndex=-1,t.disabled?this.refs.wrapperEl.blur():void s.on(document,"keydown",this.onKeydownCB)}}},{key:"onOuterBlur",value:function(e){if(e.target===this.refs.wrapperEl){var t=this.refs.selectEl;t.tabIndex=t._muiOrigIndex,s.off(document,"keydown",this.onKeydownCB)}}},{key:"onKeydown",value:function(e){32!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),this.refs.selectEl.disabled!==!0&&this.showMenu())}},{key:"showMenu",value:function(){this.props.useDefault!==!0&&(c.enableScrollLock(),s.on(window,"resize",this.hideMenuCB),s.on(document,"click",this.hideMenuCB),this.setState({showMenu:!0}))}},{key:"hideMenu",value:function(){c.disableScrollLock(),s.off(window,"resize",this.hideMenuCB),s.off(document,"click",this.hideMenuCB),this.setState({showMenu:!1}),this.refs.selectEl.focus()}},{key:"onMenuChange",value:function(e){if(this.props.readOnly!==!0){this.setState({value:e});var t=this.props.onChange;t&&t(e)}}},{key:"render",value:function(){var e=void 0;this.state.showMenu&&(e=n["default"].createElement(b,{optionEls:this.refs.selectEl.children,wrapperEl:this.refs.wrapperEl,onChange:this.onMenuChangeCB,onClose:this.hideMenuCB}));var t=this.props,i=(t.children,t.onChange,babelHelpers.objectWithoutProperties(t,["children","onChange"]));return n["default"].createElement("div",babelHelpers["extends"]({},i,{ref:"wrapperEl",className:"mui-select "+this.props.className,onFocus:this.onOuterFocusCB,onBlur:this.onOuterBlurCB}),n["default"].createElement("select",{ref:"selectEl",name:this.props.name,value:this.state.value,defaultValue:this.props.defaultValue,disabled:this.props.disabled,multiple:this.props.multiple,readOnly:this.props.readOnly,required:this.props.required,onChange:this.onInnerChangeCB,onMouseDown:this.onInnerMouseDownCB,onClick:this.onInnerClickCB,onFocus:this.onInnerFocusCB},this.props.children),e)}}]),t}(n["default"].Component);m.propTypes={name:d.string,value:d.string,defaultValue:d.string,autoFocus:d.bool,disabled:d.bool,multiple:d.bool,readOnly:d.bool,required:d.bool,useDefault:d.bool,onChange:d.func},m.defaultProps={className:"",name:null,autoFocus:!1,disabled:!1,multiple:!1,readOnly:!1,required:!1,useDefault:!1,onChange:null};var b=function(e){function t(e){babelHelpers.classCallCheck(this,t);var i=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));return i.state={origIndex:null,currentIndex:null},i.onKeydownCB=c.callback(i,"onKeydown"),i}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"componentWillMount",value:function(){var e=this.props.optionEls,t=e.length,i=0,o=void 0;for(o=t-1;o>-1;o--)e[o].selected&&(i=o);this.setState({origIndex:i,currentIndex:i})}},{key:"componentDidMount",value:function(){setTimeout(function(){var e=document.activeElement;"body"!==e.nodeName.toLowerCase()&&e.blur()},0);var e=r.getMenuPositionalCSS(this.props.wrapperEl,this.props.optionEls.length,this.state.currentIndex),t=this.refs.wrapperEl;s.css(t,e),s.scrollTop(t,e.scrollTop),s.on(document,"keydown",this.onKeydownCB)}},{key:"componentWillUnmount",value:function(){s.off(document,"keydown",this.onKeydownCB)}},{key:"onClick",value:function(e,t){t.stopPropagation(),this.selectAndDestroy(e)}},{key:"onKeydown",value:function(e){var t=e.keyCode;return 9===t?this.destroy():(27!==t&&40!==t&&38!==t&&13!==t||e.preventDefault(),void(27===t?this.destroy():40===t?this.increment():38===t?this.decrement():13===t&&this.selectAndDestroy()))}},{key:"increment",value:function(){this.state.currentIndex!==this.props.optionEls.length-1&&this.setState({currentIndex:this.state.currentIndex+1})}},{key:"decrement",value:function(){0!==this.state.currentIndex&&this.setState({currentIndex:this.state.currentIndex-1})}},{key:"selectAndDestroy",value:function(e){e=void 0===e?this.state.currentIndex:e,e!==this.state.origIndex&&this.props.onChange(this.props.optionEls[e].value),this.destroy()}},{key:"destroy",value:function(){this.props.onClose()}},{key:"render",value:function(){var e=[],t=this.props.optionEls,i=t.length,o=void 0,l=void 0;for(l=0;i>l;l++)o=l===this.state.currentIndex?"mui--is-selected":"",e.push(n["default"].createElement("div",{key:l,className:o,onClick:this.onClick.bind(this,l)},t[l].textContent));return n["default"].createElement("div",{ref:"wrapperEl",className:"mui-select__menu"},e)}}]),t}(n["default"].Component);b.defaultProps={optionEls:[],wrapperEl:null,onChange:null,onClose:null},i["default"]=m,t.exports=i["default"]},{"../js/lib/forms":4,"../js/lib/jqLite":5,"../js/lib/util":6,"./_helpers":7,react:"CwoHg3"}],30:[function(e,t,i){t.exports=e(10)},{react:"CwoHg3"}],31:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("./tab"),r=babelHelpers.interopRequireDefault(l),a=e("../js/lib/util"),s=babelHelpers.interopRequireWildcard(a),u=n["default"].PropTypes,c="mui-tabs__bar",p="mui-tabs__bar--justified",d="mui-tabs__pane",m="mui--is-active",b=function(e){function t(e){babelHelpers.classCallCheck(this,t);var i=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));return i.state={currentSelectedIndex:e.initialSelectedIndex},i}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"onClick",value:function(e,t,i){e!==this.state.currentSelectedIndex&&(this.setState({currentSelectedIndex:e}),t.props.onActive&&t.props.onActive(t),this.props.onChange&&this.props.onChange(e,t.props.value,t,i))}},{key:"render",value:function(){var e=this.props,t=e.children,i=babelHelpers.objectWithoutProperties(e,["children"]),o=[],l=[],a=t.length,u=this.state.currentSelectedIndex%a,b=void 0,f=void 0,h=void 0,g=void 0;for(g=0;a>g;g++)f=t[g],f.type!==r["default"]&&s.raiseError("Expecting MUITab React Element"),b=g===u,o.push(n["default"].createElement("li",{key:g,className:b?m:""},n["default"].createElement("a",{onClick:this.onClick.bind(this,g,f)},f.props.label))),h=d+" ",b&&(h+=m),l.push(n["default"].createElement("div",{key:g,className:h},f.props.children));return h=c,this.props.justified&&(h+=" "+p),n["default"].createElement("div",i,n["default"].createElement("ul",{className:h},o),l)}}]),t}(n["default"].Component);b.propTypes={initialSelectedIndex:u.number,justified:u.bool,onChange:u.func},b.defaultProps={className:"",initialSelectedIndex:0,justified:!1,onChange:null},i["default"]=b,t.exports=i["default"]},{"../js/lib/util":6,"./tab":10,react:"CwoHg3"}],32:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var o=window.React,n=babelHelpers.interopRequireDefault(o),l=e("./text-field"),r=n["default"].PropTypes,a=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"render",value:function(){return n["default"].createElement(l.TextField,this.props)}}]),t}(n["default"].Component);a.propTypes={rows:r.number},a.defaultProps={type:"textarea",rows:2},i["default"]=a,t.exports=i["default"]},{"./text-field":11,react:"CwoHg3"}]},{},[2]);
packages/material-ui-icons/src/CameraRoll.js
dsslimshaddy/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let CameraRoll = props => <SvgIcon {...props}> <path d="M14 5c0-1.1-.9-2-2-2h-1V2c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2h8V5h-8zm-2 13h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2z" /> </SvgIcon>; CameraRoll = pure(CameraRoll); CameraRoll.muiName = 'SvgIcon'; export default CameraRoll;
packages/react/components/list-button.js
AdrianV/Framework7
import React from 'react'; import Utils from '../utils/utils'; import Mixins from '../utils/mixins'; import __reactComponentDispatchEvent from '../runtime-helpers/react-component-dispatch-event.js'; import __reactComponentSlots from '../runtime-helpers/react-component-slots.js'; import __reactComponentSetProps from '../runtime-helpers/react-component-set-props.js'; class F7ListButton extends React.Component { constructor(props, context) { super(props, context); } onClick(event) { this.dispatchEvent('click', event); } get attrs() { const self = this; const props = self.props; const { link, href, target, tabLink } = props; return Utils.extend({ href: typeof link === 'boolean' && typeof href === 'boolean' ? '#' : link || href, target, 'data-tab': Utils.isStringProp(tabLink) && tabLink }, Mixins.linkRouterAttrs(props), Mixins.linkActionsAttrs(props)); } get classes() { const self = this; const props = self.props; const { noFastclick, noFastClick, tabLink, tabLinkActive } = props; return Utils.classNames({ 'item-link': true, 'list-button': true, 'tab-link': tabLink || tabLink === '', 'tab-link-active': tabLinkActive, 'no-fastclick': noFastclick || noFastClick }, Mixins.colorClasses(props), Mixins.linkRouterClasses(props), Mixins.linkActionsClasses(props)); } render() { const self = this; const props = this.props; const { className, id, style, title, text } = props; return React.createElement('li', { id: id, style: style, className: className }, React.createElement('a', Object.assign({ className: self.classes }, self.attrs, { onClick: self.onClick.bind(self) }), this.slots['default'], !this.slots.default && (title || text))); } get slots() { return __reactComponentSlots(this.props); } dispatchEvent(events, ...args) { return __reactComponentDispatchEvent(this, events, ...args); } } __reactComponentSetProps(F7ListButton, Object.assign({ id: [String, Number], noFastclick: Boolean, noFastClick: Boolean, title: [String, Number], text: [String, Number], tabLink: [Boolean, String], tabLinkActive: Boolean, link: [Boolean, String], href: [Boolean, String], target: String }, Mixins.colorProps, Mixins.linkRouterProps, Mixins.linkActionsProps)); F7ListButton.displayName = 'f7-list-button'; export default F7ListButton;
ajax/libs/redux-form/7.0.0-alpha.3/redux-form.js
nolsherry/cdnjs
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-redux"), require("redux")); else if(typeof define === 'function' && define.amd) define(["react", "react-redux", "redux"], factory); else if(typeof exports === 'object') exports["ReduxForm"] = factory(require("react"), require("react-redux"), require("redux")); else root["ReduxForm"] = factory(root["React"], root["ReactRedux"], root["Redux"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_35__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 45); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _splice = __webpack_require__(58); var _splice2 = _interopRequireDefault(_splice); var _getIn = __webpack_require__(59); var _getIn2 = _interopRequireDefault(_getIn); var _setIn = __webpack_require__(66); var _setIn2 = _interopRequireDefault(_setIn); var _deepEqual = __webpack_require__(67); var _deepEqual2 = _interopRequireDefault(_deepEqual); var _deleteIn = __webpack_require__(84); var _deleteIn2 = _interopRequireDefault(_deleteIn); var _keys = __webpack_require__(85); var _keys2 = _interopRequireDefault(_keys); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var structure = { allowsArrayErrors: true, empty: {}, emptyList: [], getIn: _getIn2.default, setIn: _setIn2.default, deepEqual: _deepEqual2.default, deleteIn: _deleteIn2.default, forEach: function forEach(items, callback) { return items.forEach(callback); }, fromJS: function fromJS(value) { return value; }, keys: _keys2.default, size: function size(array) { return array ? array.length : 0; }, some: function some(items, callback) { return items.some(callback); }, splice: _splice2.default, toJS: function toJS(value) { return value; } }; exports.default = structure; /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ if (true) { var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; var isValidElement = function(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; }; // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(47)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = require('./factoryWithThrowingShims')(); } /***/ }), /* 2 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_2__; /***/ }), /* 3 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_3__; /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var formatName = function formatName(_ref, name) { var sectionPrefix = _ref._reduxForm.sectionPrefix; return sectionPrefix ? sectionPrefix + '.' + name : name; }; exports.default = formatName; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if (true) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(60), copyArray = __webpack_require__(27), isArray = __webpack_require__(7), isSymbol = __webpack_require__(61), stringToPath = __webpack_require__(62), toKey = __webpack_require__(64), toString = __webpack_require__(65); /** * Converts `value` to a property path array. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {*} value The value to convert. * @returns {Array} Returns the new property path array. * @example * * _.toPath('a.b.c'); * // => ['a', 'b', 'c'] * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] */ function toPath(value) { if (isArray(value)) { return arrayMap(value, toKey); } return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); } module.exports = toPath; /***/ }), /* 7 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(11); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(92); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 10 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 11 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 12 */ /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /* 13 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _hasError = __webpack_require__(123); var _hasError2 = _interopRequireDefault(_hasError); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var createIsValid = function createIsValid(structure) { var getIn = structure.getIn, keys = structure.keys; var hasError = (0, _hasError2.default)(structure); return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; var ignoreSubmitErrors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; return function (state) { var formState = getFormState(state); var syncError = getIn(formState, form + '.syncError'); if (syncError) { return false; } if (!ignoreSubmitErrors) { var error = getIn(formState, form + '.error'); if (error) { return false; } } var syncErrors = getIn(formState, form + '.syncErrors'); var asyncErrors = getIn(formState, form + '.asyncErrors'); var submitErrors = ignoreSubmitErrors ? undefined : getIn(formState, form + '.submitErrors'); if (!syncErrors && !asyncErrors && !submitErrors) { return true; } var registeredFields = getIn(formState, form + '.registeredFields'); if (!registeredFields) { return true; } return !keys(registeredFields).filter(function (name) { return getIn(registeredFields, '[\'' + name + '\'].count') > 0; }).some(function (name) { return hasError(getIn(registeredFields, '[\'' + name + '\']'), syncErrors, asyncErrors, submitErrors); }); }; }; }; exports.default = createIsValid; /***/ }), /* 15 */ /***/ (function(module, exports) { module.exports = isPromise; function isPromise(obj) { return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; } /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var prefix = exports.prefix = '@@redux-form/'; var ARRAY_INSERT = exports.ARRAY_INSERT = prefix + 'ARRAY_INSERT'; var ARRAY_MOVE = exports.ARRAY_MOVE = prefix + 'ARRAY_MOVE'; var ARRAY_POP = exports.ARRAY_POP = prefix + 'ARRAY_POP'; var ARRAY_PUSH = exports.ARRAY_PUSH = prefix + 'ARRAY_PUSH'; var ARRAY_REMOVE = exports.ARRAY_REMOVE = prefix + 'ARRAY_REMOVE'; var ARRAY_REMOVE_ALL = exports.ARRAY_REMOVE_ALL = prefix + 'ARRAY_REMOVE_ALL'; var ARRAY_SHIFT = exports.ARRAY_SHIFT = prefix + 'ARRAY_SHIFT'; var ARRAY_SPLICE = exports.ARRAY_SPLICE = prefix + 'ARRAY_SPLICE'; var ARRAY_UNSHIFT = exports.ARRAY_UNSHIFT = prefix + 'ARRAY_UNSHIFT'; var ARRAY_SWAP = exports.ARRAY_SWAP = prefix + 'ARRAY_SWAP'; var AUTOFILL = exports.AUTOFILL = prefix + 'AUTOFILL'; var BLUR = exports.BLUR = prefix + 'BLUR'; var CHANGE = exports.CHANGE = prefix + 'CHANGE'; var CLEAR_SUBMIT = exports.CLEAR_SUBMIT = prefix + 'CLEAR_SUBMIT'; var CLEAR_SUBMIT_ERRORS = exports.CLEAR_SUBMIT_ERRORS = prefix + 'CLEAR_SUBMIT_ERRORS'; var CLEAR_ASYNC_ERROR = exports.CLEAR_ASYNC_ERROR = prefix + 'CLEAR_ASYNC_ERROR'; var DESTROY = exports.DESTROY = prefix + 'DESTROY'; var FOCUS = exports.FOCUS = prefix + 'FOCUS'; var INITIALIZE = exports.INITIALIZE = prefix + 'INITIALIZE'; var REGISTER_FIELD = exports.REGISTER_FIELD = prefix + 'REGISTER_FIELD'; var RESET = exports.RESET = prefix + 'RESET'; var SET_SUBMIT_FAILED = exports.SET_SUBMIT_FAILED = prefix + 'SET_SUBMIT_FAILED'; var SET_SUBMIT_SUCCEEDED = exports.SET_SUBMIT_SUCCEEDED = prefix + 'SET_SUBMIT_SUCCEEDED'; var START_ASYNC_VALIDATION = exports.START_ASYNC_VALIDATION = prefix + 'START_ASYNC_VALIDATION'; var START_SUBMIT = exports.START_SUBMIT = prefix + 'START_SUBMIT'; var STOP_ASYNC_VALIDATION = exports.STOP_ASYNC_VALIDATION = prefix + 'STOP_ASYNC_VALIDATION'; var STOP_SUBMIT = exports.STOP_SUBMIT = prefix + 'STOP_SUBMIT'; var SUBMIT = exports.SUBMIT = prefix + 'SUBMIT'; var TOUCH = exports.TOUCH = prefix + 'TOUCH'; var UNREGISTER_FIELD = exports.UNREGISTER_FIELD = prefix + 'UNREGISTER_FIELD'; var UNTOUCH = exports.UNTOUCH = prefix + 'UNTOUCH'; var UPDATE_SYNC_ERRORS = exports.UPDATE_SYNC_ERRORS = prefix + 'UPDATE_SYNC_ERRORS'; var UPDATE_SYNC_WARNINGS = exports.UPDATE_SYNC_WARNINGS = prefix + 'UPDATE_SYNC_WARNINGS'; /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) { var initialized = _ref.initialized, trigger = _ref.trigger, pristine = _ref.pristine, syncValidationPasses = _ref.syncValidationPasses; if (!syncValidationPasses) { return false; } switch (trigger) { case 'blur': // blurring return true; case 'submit': // submitting, so only async validate if form is dirty or was never initialized // conversely, DON'T async validate if the form is pristine just as it was initialized return !pristine || !initialized; default: return false; } }; exports.default = defaultShouldAsyncValidate; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var defaultShouldValidate = function defaultShouldValidate(_ref) { var values = _ref.values, nextProps = _ref.nextProps, initialRender = _ref.initialRender, lastFieldValidatorKeys = _ref.lastFieldValidatorKeys, fieldValidatorKeys = _ref.fieldValidatorKeys, structure = _ref.structure; if (initialRender) { return true; } return !structure.deepEqual(values, nextProps && nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys); }; exports.default = defaultShouldValidate; /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * */ function makeEmptyFunction(arg) { return function () { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ var emptyFunction = function emptyFunction() {}; emptyFunction.thatReturns = makeEmptyFunction; emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); emptyFunction.thatReturnsThis = function () { return this; }; emptyFunction.thatReturnsArgument = function (arg) { return arg; }; module.exports = emptyFunction; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var validateFormat = function validateFormat(format) {}; if (true) { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ var emptyFunction = __webpack_require__(19); /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = emptyFunction; if (true) { (function () { var printWarning = function printWarning(format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; warning = function warning(condition, format) { if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { return; // Ignore CompositeComponent proptype check. } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; })(); } module.exports = warning; /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _es6Error = __webpack_require__(50); var _es6Error2 = _interopRequireDefault(_es6Error); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SubmissionError = function (_ExtendableError) { _inherits(SubmissionError, _ExtendableError); function SubmissionError(errors) { _classCallCheck(this, SubmissionError); var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed')); _this.errors = errors; return _this; } return SubmissionError; }(_es6Error2.default); exports.default = SubmissionError; /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var processProps = function processProps(type, props, _value) { var value = props.value; if (type === 'checkbox') { return _extends({}, props, { checked: !!value }); } if (type === 'radio') { return _extends({}, props, { checked: value === _value, value: _value }); } if (type === 'select-multiple') { return _extends({}, props, { value: value || [] }); } if (type === 'file') { return _extends({}, props, { value: value || undefined }); } return props; }; var createFieldProps = function createFieldProps(_ref2, name, _ref) { var getIn = _ref2.getIn, toJS = _ref2.toJS; var asyncError = _ref.asyncError, asyncValidating = _ref.asyncValidating, onBlur = _ref.onBlur, onChange = _ref.onChange, onDrop = _ref.onDrop, onDragStart = _ref.onDragStart, dirty = _ref.dirty, dispatch = _ref.dispatch, onFocus = _ref.onFocus, form = _ref.form, format = _ref.format, initial = _ref.initial, parse = _ref.parse, pristine = _ref.pristine, props = _ref.props, state = _ref.state, submitError = _ref.submitError, submitFailed = _ref.submitFailed, submitting = _ref.submitting, syncError = _ref.syncError, syncWarning = _ref.syncWarning, validate = _ref.validate, value = _ref.value, _value = _ref._value, warn = _ref.warn, custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'initial', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']); var error = syncError || asyncError || submitError; var warning = syncWarning; var formatFieldValue = function formatFieldValue(value, format) { if (format === null) { return value; } var defaultFormattedValue = value == null ? '' : value; return format ? format(value, name) : defaultFormattedValue; }; var formattedFieldValue = formatFieldValue(value, format); return { input: processProps(custom.type, { name: name, onBlur: onBlur, onChange: onChange, onDragStart: onDragStart, onDrop: onDrop, onFocus: onFocus, value: formattedFieldValue }, _value), meta: _extends({}, toJS(state), { active: !!(state && getIn(state, 'active')), asyncValidating: asyncValidating, autofilled: !!(state && getIn(state, 'autofilled')), dirty: dirty, dispatch: dispatch, error: error, form: form, initial: initial, warning: warning, invalid: !!error, pristine: pristine, submitting: !!submitting, submitFailed: !!submitFailed, touched: !!(state && getIn(state, 'touched')), valid: !error, visited: !!(state && getIn(state, 'visited')) }), custom: _extends({}, custom, props) }; }; exports.default = createFieldProps; /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getValue = __webpack_require__(55); var _getValue2 = _interopRequireDefault(_getValue); var _isReactNative = __webpack_require__(56); var _isReactNative2 = _interopRequireDefault(_isReactNative); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var onChangeValue = function onChangeValue(event, _ref) { var name = _ref.name, parse = _ref.parse, normalize = _ref.normalize; // read value from input var value = (0, _getValue2.default)(event, _isReactNative2.default); // parse value if we have a parser if (parse) { value = parse(value, name); } // normalize value if (normalize) { value = normalize(name, value); } return value; }; exports.default = onChangeValue; /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var isEvent = function isEvent(candidate) { return !!(candidate && candidate.stopPropagation && candidate.preventDefault); }; exports.default = isEvent; /***/ }), /* 27 */ /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(68); /** * This method is like `_.isEqual` except that it accepts `customizer` which * is invoked to compare values. If `customizer` returns `undefined`, comparisons * are handled by the method instead. The `customizer` is invoked with up to * six arguments: (objValue, othValue [, index|key, object, other, stack]). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * function isGreeting(value) { * return /^h(?:i|ello)$/.test(value); * } * * function customizer(objValue, othValue) { * if (isGreeting(objValue) && isGreeting(othValue)) { * return true; * } * } * * var array = ['hello', 'goodbye']; * var other = ['hi', 'goodbye']; * * _.isEqualWith(array, other, customizer); * // => true */ function isEqualWith(value, other, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; var result = customizer ? customizer(value, other) : undefined; return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; } module.exports = isEqualWith; /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(70), listCacheDelete = __webpack_require__(71), listCacheGet = __webpack_require__(72), listCacheHas = __webpack_require__(73), listCacheSet = __webpack_require__(74); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 30 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 31 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEqualWith2 = __webpack_require__(28); var _isEqualWith3 = _interopRequireDefault(_isEqualWith2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) { // https://lodash.com/docs/4.17.4#isEqualWith if (stack) { // Shallow compares // For 1st level, stack === undefined. // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level) // For 2nd level and up, stack !== undefined. // -> Compare by === operator return objectValue === otherValue; } }; var shallowCompare = function shallowCompare(instance, nextProps, nextState) { return !(0, _isEqualWith3.default)(instance.props, nextProps, customizer) || !(0, _isEqualWith3.default)(instance.state, nextState, customizer); }; exports.default = shallowCompare; /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(9), baseForOwn = __webpack_require__(94), baseIteratee = __webpack_require__(97); /** * Creates an object with the same keys as `object` and values generated * by running each own enumerable string keyed property of `object` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, key, object). * * @static * @memberOf _ * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example * * var users = { * 'fred': { 'user': 'fred', 'age': 40 }, * 'pebbles': { 'user': 'pebbles', 'age': 1 } * }; * * _.mapValues(users, function(o) { return o.age; }); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) * * // The `_.property` iteratee shorthand. * _.mapValues(users, 'age'); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) */ function mapValues(object, iteratee) { var result = {}; iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } module.exports = mapValues; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(95); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /* 35 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_35__; /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createIsPristine = function createIsPristine(_ref) { var deepEqual = _ref.deepEqual, empty = _ref.empty, getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { var formState = getFormState(state); var initial = getIn(formState, form + '.initial') || empty; var values = getIn(formState, form + '.values') || initial; return deepEqual(initial, values); }; }; }; exports.default = createIsPristine; /***/ }), /* 37 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(9), eq = __webpack_require__(11); /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignMergeValue; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(139); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(12); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(41), isObject = __webpack_require__(10); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 41 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /* 42 */ /***/ (function(module, exports) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _actionTypes = __webpack_require__(16); var arrayInsert = function arrayInsert(form, field, index, value) { return { type: _actionTypes.ARRAY_INSERT, meta: { form: form, field: field, index: index }, payload: value }; }; var arrayMove = function arrayMove(form, field, from, to) { return { type: _actionTypes.ARRAY_MOVE, meta: { form: form, field: field, from: from, to: to } }; }; var arrayPop = function arrayPop(form, field) { return { type: _actionTypes.ARRAY_POP, meta: { form: form, field: field } }; }; var arrayPush = function arrayPush(form, field, value) { return { type: _actionTypes.ARRAY_PUSH, meta: { form: form, field: field }, payload: value }; }; var arrayRemove = function arrayRemove(form, field, index) { return { type: _actionTypes.ARRAY_REMOVE, meta: { form: form, field: field, index: index } }; }; var arrayRemoveAll = function arrayRemoveAll(form, field) { return { type: _actionTypes.ARRAY_REMOVE_ALL, meta: { form: form, field: field } }; }; var arrayShift = function arrayShift(form, field) { return { type: _actionTypes.ARRAY_SHIFT, meta: { form: form, field: field } }; }; var arraySplice = function arraySplice(form, field, index, removeNum, value) { var action = { type: _actionTypes.ARRAY_SPLICE, meta: { form: form, field: field, index: index, removeNum: removeNum } }; if (value !== undefined) { action.payload = value; } return action; }; var arraySwap = function arraySwap(form, field, indexA, indexB) { if (indexA === indexB) { throw new Error('Swap indices cannot be equal'); } if (indexA < 0 || indexB < 0) { throw new Error('Swap indices cannot be negative'); } return { type: _actionTypes.ARRAY_SWAP, meta: { form: form, field: field, indexA: indexA, indexB: indexB } }; }; var arrayUnshift = function arrayUnshift(form, field, value) { return { type: _actionTypes.ARRAY_UNSHIFT, meta: { form: form, field: field }, payload: value }; }; var autofill = function autofill(form, field, value) { return { type: _actionTypes.AUTOFILL, meta: { form: form, field: field }, payload: value }; }; var blur = function blur(form, field, value, touch) { return { type: _actionTypes.BLUR, meta: { form: form, field: field, touch: touch }, payload: value }; }; var change = function change(form, field, value, touch, persistentSubmitErrors) { return { type: _actionTypes.CHANGE, meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors }, payload: value }; }; var clearSubmit = function clearSubmit(form) { return { type: _actionTypes.CLEAR_SUBMIT, meta: { form: form } }; }; var clearSubmitErrors = function clearSubmitErrors(form) { return { type: _actionTypes.CLEAR_SUBMIT_ERRORS, meta: { form: form } }; }; var clearAsyncError = function clearAsyncError(form, field) { return { type: _actionTypes.CLEAR_ASYNC_ERROR, meta: { form: form, field: field } }; }; var destroy = function destroy() { for (var _len = arguments.length, form = Array(_len), _key = 0; _key < _len; _key++) { form[_key] = arguments[_key]; } return { type: _actionTypes.DESTROY, meta: { form: form } }; }; var focus = function focus(form, field) { return { type: _actionTypes.FOCUS, meta: { form: form, field: field } }; }; var initialize = function initialize(form, values, keepDirty) { var otherMeta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; if (keepDirty instanceof Object) { otherMeta = keepDirty; keepDirty = false; } return { type: _actionTypes.INITIALIZE, meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta), payload: values }; }; var registerField = function registerField(form, name, type) { return { type: _actionTypes.REGISTER_FIELD, meta: { form: form }, payload: { name: name, type: type } }; }; var reset = function reset(form) { return { type: _actionTypes.RESET, meta: { form: form } }; }; var startAsyncValidation = function startAsyncValidation(form, field) { return { type: _actionTypes.START_ASYNC_VALIDATION, meta: { form: form, field: field } }; }; var startSubmit = function startSubmit(form) { return { type: _actionTypes.START_SUBMIT, meta: { form: form } }; }; var stopAsyncValidation = function stopAsyncValidation(form, errors) { return { type: _actionTypes.STOP_ASYNC_VALIDATION, meta: { form: form }, payload: errors, error: !!(errors && Object.keys(errors).length) }; }; var stopSubmit = function stopSubmit(form, errors) { return { type: _actionTypes.STOP_SUBMIT, meta: { form: form }, payload: errors, error: !!(errors && Object.keys(errors).length) }; }; var submit = function submit(form) { return { type: _actionTypes.SUBMIT, meta: { form: form } }; }; var setSubmitFailed = function setSubmitFailed(form) { for (var _len2 = arguments.length, fields = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { fields[_key2 - 1] = arguments[_key2]; } return { type: _actionTypes.SET_SUBMIT_FAILED, meta: { form: form, fields: fields }, error: true }; }; var setSubmitSucceeded = function setSubmitSucceeded(form) { for (var _len3 = arguments.length, fields = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { fields[_key3 - 1] = arguments[_key3]; } return { type: _actionTypes.SET_SUBMIT_SUCCEEDED, meta: { form: form, fields: fields }, error: false }; }; var touch = function touch(form) { for (var _len4 = arguments.length, fields = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { fields[_key4 - 1] = arguments[_key4]; } return { type: _actionTypes.TOUCH, meta: { form: form, fields: fields } }; }; var unregisterField = function unregisterField(form, name) { var destroyOnUnmount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; return { type: _actionTypes.UNREGISTER_FIELD, meta: { form: form }, payload: { name: name, destroyOnUnmount: destroyOnUnmount } }; }; var untouch = function untouch(form) { for (var _len5 = arguments.length, fields = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { fields[_key5 - 1] = arguments[_key5]; } return { type: _actionTypes.UNTOUCH, meta: { form: form, fields: fields } }; }; var updateSyncErrors = function updateSyncErrors(form) { var syncErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var error = arguments[2]; return { type: _actionTypes.UPDATE_SYNC_ERRORS, meta: { form: form }, payload: { syncErrors: syncErrors, error: error } }; }; var updateSyncWarnings = function updateSyncWarnings(form) { var syncWarnings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var warning = arguments[2]; return { type: _actionTypes.UPDATE_SYNC_WARNINGS, meta: { form: form }, payload: { syncWarnings: syncWarnings, warning: warning } }; }; var actions = { arrayInsert: arrayInsert, arrayMove: arrayMove, arrayPop: arrayPop, arrayPush: arrayPush, arrayRemove: arrayRemove, arrayRemoveAll: arrayRemoveAll, arrayShift: arrayShift, arraySplice: arraySplice, arraySwap: arraySwap, arrayUnshift: arrayUnshift, autofill: autofill, blur: blur, change: change, clearSubmit: clearSubmit, clearSubmitErrors: clearSubmitErrors, clearAsyncError: clearAsyncError, destroy: destroy, focus: focus, initialize: initialize, registerField: registerField, reset: reset, startAsyncValidation: startAsyncValidation, startSubmit: startSubmit, stopAsyncValidation: stopAsyncValidation, stopSubmit: stopSubmit, submit: submit, setSubmitFailed: setSubmitFailed, setSubmitSucceeded: setSubmitSucceeded, touch: touch, unregisterField: unregisterField, untouch: untouch, updateSyncErrors: updateSyncErrors, updateSyncWarnings: updateSyncWarnings }; exports.default = actions; /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEvent = __webpack_require__(26); var _isEvent2 = _interopRequireDefault(_isEvent); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var silenceEvent = function silenceEvent(event) { var is = (0, _isEvent2.default)(event); if (is) { event.preventDefault(); } return is; }; exports.default = silenceEvent; /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.untouch = exports.unregisterField = exports.touch = exports.submit = exports.stopSubmit = exports.stopAsyncValidation = exports.startSubmit = exports.startAsyncValidation = exports.setSubmitSucceeded = exports.setSubmitFailed = exports.reset = exports.registerField = exports.initialize = exports.focus = exports.destroy = exports.clearSubmitErrors = exports.change = exports.blur = exports.autofill = exports.arrayUnshift = exports.arraySwap = exports.arraySplice = exports.arrayShift = exports.arrayRemoveAll = exports.arrayRemove = exports.arrayPush = exports.arrayPop = exports.arrayMove = exports.arrayInsert = exports.actionTypes = exports.values = exports.reducer = exports.reduxForm = exports.hasSubmitFailed = exports.hasSubmitSucceeded = exports.isSubmitting = exports.isValid = exports.isPristine = exports.isInvalid = exports.isDirty = exports.getFormSubmitErrors = exports.getFormSyncWarnings = exports.getFormAsyncErrors = exports.getFormMeta = exports.getFormSyncErrors = exports.getFormInitialValues = exports.getFormValues = exports.getFormNames = exports.formValues = exports.formValueSelector = exports.FieldArray = exports.Fields = exports.Field = exports.formPropTypes = exports.fieldPropTypes = exports.fieldMetaPropTypes = exports.fieldInputPropTypes = exports.propTypes = exports.SubmissionError = exports.FormSection = exports.Form = exports.defaultShouldValidate = exports.defaultShouldAsyncValidate = undefined; var _defaultShouldAsyncValidate = __webpack_require__(17); Object.defineProperty(exports, 'defaultShouldAsyncValidate', { enumerable: true, get: function get() { return _interopRequireDefault(_defaultShouldAsyncValidate).default; } }); var _defaultShouldValidate = __webpack_require__(18); Object.defineProperty(exports, 'defaultShouldValidate', { enumerable: true, get: function get() { return _interopRequireDefault(_defaultShouldValidate).default; } }); var _Form = __webpack_require__(46); Object.defineProperty(exports, 'Form', { enumerable: true, get: function get() { return _interopRequireDefault(_Form).default; } }); var _FormSection = __webpack_require__(49); Object.defineProperty(exports, 'FormSection', { enumerable: true, get: function get() { return _interopRequireDefault(_FormSection).default; } }); var _SubmissionError = __webpack_require__(23); Object.defineProperty(exports, 'SubmissionError', { enumerable: true, get: function get() { return _interopRequireDefault(_SubmissionError).default; } }); var _propTypes = __webpack_require__(51); Object.defineProperty(exports, 'propTypes', { enumerable: true, get: function get() { return _interopRequireDefault(_propTypes).default; } }); Object.defineProperty(exports, 'fieldInputPropTypes', { enumerable: true, get: function get() { return _propTypes.fieldInputPropTypes; } }); Object.defineProperty(exports, 'fieldMetaPropTypes', { enumerable: true, get: function get() { return _propTypes.fieldMetaPropTypes; } }); Object.defineProperty(exports, 'fieldPropTypes', { enumerable: true, get: function get() { return _propTypes.fieldPropTypes; } }); Object.defineProperty(exports, 'formPropTypes', { enumerable: true, get: function get() { return _propTypes.formPropTypes; } }); var _Field = __webpack_require__(52); Object.defineProperty(exports, 'Field', { enumerable: true, get: function get() { return _interopRequireDefault(_Field).default; } }); var _Fields = __webpack_require__(86); Object.defineProperty(exports, 'Fields', { enumerable: true, get: function get() { return _interopRequireDefault(_Fields).default; } }); var _FieldArray = __webpack_require__(89); Object.defineProperty(exports, 'FieldArray', { enumerable: true, get: function get() { return _interopRequireDefault(_FieldArray).default; } }); var _formValueSelector = __webpack_require__(99); Object.defineProperty(exports, 'formValueSelector', { enumerable: true, get: function get() { return _interopRequireDefault(_formValueSelector).default; } }); var _formValues = __webpack_require__(101); Object.defineProperty(exports, 'formValues', { enumerable: true, get: function get() { return _interopRequireDefault(_formValues).default; } }); var _getFormNames = __webpack_require__(103); Object.defineProperty(exports, 'getFormNames', { enumerable: true, get: function get() { return _interopRequireDefault(_getFormNames).default; } }); var _getFormValues = __webpack_require__(105); Object.defineProperty(exports, 'getFormValues', { enumerable: true, get: function get() { return _interopRequireDefault(_getFormValues).default; } }); var _getFormInitialValues = __webpack_require__(107); Object.defineProperty(exports, 'getFormInitialValues', { enumerable: true, get: function get() { return _interopRequireDefault(_getFormInitialValues).default; } }); var _getFormSyncErrors = __webpack_require__(109); Object.defineProperty(exports, 'getFormSyncErrors', { enumerable: true, get: function get() { return _interopRequireDefault(_getFormSyncErrors).default; } }); var _getFormMeta = __webpack_require__(111); Object.defineProperty(exports, 'getFormMeta', { enumerable: true, get: function get() { return _interopRequireDefault(_getFormMeta).default; } }); var _getFormAsyncErrors = __webpack_require__(113); Object.defineProperty(exports, 'getFormAsyncErrors', { enumerable: true, get: function get() { return _interopRequireDefault(_getFormAsyncErrors).default; } }); var _getFormSyncWarnings = __webpack_require__(115); Object.defineProperty(exports, 'getFormSyncWarnings', { enumerable: true, get: function get() { return _interopRequireDefault(_getFormSyncWarnings).default; } }); var _getFormSubmitErrors = __webpack_require__(117); Object.defineProperty(exports, 'getFormSubmitErrors', { enumerable: true, get: function get() { return _interopRequireDefault(_getFormSubmitErrors).default; } }); var _isDirty = __webpack_require__(119); Object.defineProperty(exports, 'isDirty', { enumerable: true, get: function get() { return _interopRequireDefault(_isDirty).default; } }); var _isInvalid = __webpack_require__(121); Object.defineProperty(exports, 'isInvalid', { enumerable: true, get: function get() { return _interopRequireDefault(_isInvalid).default; } }); var _isPristine = __webpack_require__(124); Object.defineProperty(exports, 'isPristine', { enumerable: true, get: function get() { return _interopRequireDefault(_isPristine).default; } }); var _isValid = __webpack_require__(125); Object.defineProperty(exports, 'isValid', { enumerable: true, get: function get() { return _interopRequireDefault(_isValid).default; } }); var _isSubmitting = __webpack_require__(126); Object.defineProperty(exports, 'isSubmitting', { enumerable: true, get: function get() { return _interopRequireDefault(_isSubmitting).default; } }); var _hasSubmitSucceeded = __webpack_require__(128); Object.defineProperty(exports, 'hasSubmitSucceeded', { enumerable: true, get: function get() { return _interopRequireDefault(_hasSubmitSucceeded).default; } }); var _hasSubmitFailed = __webpack_require__(130); Object.defineProperty(exports, 'hasSubmitFailed', { enumerable: true, get: function get() { return _interopRequireDefault(_hasSubmitFailed).default; } }); var _reduxForm = __webpack_require__(132); Object.defineProperty(exports, 'reduxForm', { enumerable: true, get: function get() { return _interopRequireDefault(_reduxForm).default; } }); var _reducer = __webpack_require__(168); Object.defineProperty(exports, 'reducer', { enumerable: true, get: function get() { return _interopRequireDefault(_reducer).default; } }); var _values = __webpack_require__(171); Object.defineProperty(exports, 'values', { enumerable: true, get: function get() { return _interopRequireDefault(_values).default; } }); var _actions = __webpack_require__(43); var _actions2 = _interopRequireDefault(_actions); var _actionTypes2 = __webpack_require__(16); var _actionTypes = _interopRequireWildcard(_actionTypes2); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var actionTypes = exports.actionTypes = _actionTypes; var arrayInsert = exports.arrayInsert = _actions2.default.arrayInsert; var arrayMove = exports.arrayMove = _actions2.default.arrayMove; var arrayPop = exports.arrayPop = _actions2.default.arrayPop; var arrayPush = exports.arrayPush = _actions2.default.arrayPush; var arrayRemove = exports.arrayRemove = _actions2.default.arrayRemove; var arrayRemoveAll = exports.arrayRemoveAll = _actions2.default.arrayRemoveAll; var arrayShift = exports.arrayShift = _actions2.default.arrayShift; var arraySplice = exports.arraySplice = _actions2.default.arraySplice; var arraySwap = exports.arraySwap = _actions2.default.arraySwap; var arrayUnshift = exports.arrayUnshift = _actions2.default.arrayUnshift; var autofill = exports.autofill = _actions2.default.autofill; var blur = exports.blur = _actions2.default.blur; var change = exports.change = _actions2.default.change; var clearSubmitErrors = exports.clearSubmitErrors = _actions2.default.clearSubmitErrors; var destroy = exports.destroy = _actions2.default.destroy; var focus = exports.focus = _actions2.default.focus; var initialize = exports.initialize = _actions2.default.initialize; var registerField = exports.registerField = _actions2.default.registerField; var reset = exports.reset = _actions2.default.reset; var setSubmitFailed = exports.setSubmitFailed = _actions2.default.setSubmitFailed; var setSubmitSucceeded = exports.setSubmitSucceeded = _actions2.default.setSubmitSucceeded; var startAsyncValidation = exports.startAsyncValidation = _actions2.default.startAsyncValidation; var startSubmit = exports.startSubmit = _actions2.default.startSubmit; var stopAsyncValidation = exports.stopAsyncValidation = _actions2.default.stopAsyncValidation; var stopSubmit = exports.stopSubmit = _actions2.default.stopSubmit; var submit = exports.submit = _actions2.default.submit; var touch = exports.touch = _actions2.default.touch; var unregisterField = exports.unregisterField = _actions2.default.unregisterField; var untouch = exports.untouch = _actions2.default.untouch; /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Form = function (_Component) { _inherits(Form, _Component); function Form(props, context) { _classCallCheck(this, Form); var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context)); if (!context._reduxForm) { throw new Error('Form must be inside a component decorated with reduxForm()'); } return _this; } _createClass(Form, [{ key: 'componentWillMount', value: function componentWillMount() { this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit); } }, { key: 'render', value: function render() { return _react2.default.createElement('form', this.props); } }]); return Form; }(_react.Component); Form.propTypes = { onSubmit: _propTypes2.default.func.isRequired }; Form.contextTypes = { _reduxForm: _propTypes2.default.object }; exports.default = Form; /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var emptyFunction = __webpack_require__(19); var invariant = __webpack_require__(20); var warning = __webpack_require__(21); var ReactPropTypesSecret = __webpack_require__(22); var checkPropTypes = __webpack_require__(48); module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. /** * Returns the iterator method function contained on the iterable object. * * Be sure to invoke the function with the iterable as context: * * var iteratorFn = getIteratorFn(myIterable); * if (iteratorFn) { * var iterator = iteratorFn.call(myIterable); * ... * } * * @param {?object} maybeIterable * @return {?function} */ function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } /** * Collection of methods that allow declaration and validation of props that are * supplied to React components. Example usage: * * var Props = require('ReactPropTypes'); * var MyArticle = React.createClass({ * propTypes: { * // An optional string prop named "description". * description: Props.string, * * // A required enum prop named "category". * category: Props.oneOf(['News','Photos']).isRequired, * * // A prop named "dialog" that requires an instance of Dialog. * dialog: Props.instanceOf(Dialog).isRequired * }, * render: function() { ... } * }); * * A more formal specification of how these methods are used: * * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) * decl := ReactPropTypes.{type}(.isRequired)? * * Each and every declaration produces a function with the same signature. This * allows the creation of custom validation functions. For example: * * var MyLink = React.createClass({ * propTypes: { * // An optional string or URI prop named "href". * href: function(props, propName, componentName) { * var propValue = props[propName]; * if (propValue != null && typeof propValue !== 'string' && * !(propValue instanceof URI)) { * return new Error( * 'Expected a string or an URI for ' + propName + ' in ' + * componentName * ); * } * } * }, * render: function() {...} * }); * * @internal */ var ANONYMOUS = '<<anonymous>>'; // Important! // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. var ReactPropTypes = { array: createPrimitiveTypeChecker('array'), bool: createPrimitiveTypeChecker('boolean'), func: createPrimitiveTypeChecker('function'), number: createPrimitiveTypeChecker('number'), object: createPrimitiveTypeChecker('object'), string: createPrimitiveTypeChecker('string'), symbol: createPrimitiveTypeChecker('symbol'), any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, element: createElementTypeChecker(), instanceOf: createInstanceTypeChecker, node: createNodeChecker(), objectOf: createObjectOfTypeChecker, oneOf: createEnumTypeChecker, oneOfType: createUnionTypeChecker, shape: createShapeTypeChecker }; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ /*eslint-disable no-self-compare*/ function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /*eslint-enable no-self-compare*/ /** * We use an Error-like object for backward compatibility as people may call * PropTypes directly and inspect their output. However, we don't use real * Errors anymore. We don't inspect their stack anyway, and creating them * is prohibitively expensive if they are created too often, such as what * happens in oneOfType() for any type before the one that matched. */ function PropTypeError(message) { this.message = message; this.stack = ''; } // Make `instanceof Error` still work for returned errors. PropTypeError.prototype = Error.prototype; function createChainableTypeChecker(validate) { if (true) { var manualPropTypeCallCache = {}; var manualPropTypeWarningCount = 0; } function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = componentName || ANONYMOUS; propFullName = propFullName || propName; if (secret !== ReactPropTypesSecret) { if (throwOnDirectAccess) { // New behavior only for users of `prop-types` package invariant( false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); } else if ("development" !== 'production' && typeof console !== 'undefined') { // Old behavior for people using React.PropTypes var cacheKey = componentName + ':' + propName; if ( !manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors manualPropTypeWarningCount < 3 ) { warning( false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName ); manualPropTypeCallCache[cacheKey] = true; manualPropTypeWarningCount++; } } } if (props[propName] == null) { if (isRequired) { if (props[propName] === null) { return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); } return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); } return null; } else { return validate(props, propName, componentName, location, propFullName); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createPrimitiveTypeChecker(expectedType) { function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/regexp, pass the 'object' // check, but we can offer a more precise error message here rather than // 'of type `object`'. var preciseType = getPreciseType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); } return null; } return createChainableTypeChecker(validate); } function createAnyTypeChecker() { return createChainableTypeChecker(emptyFunction.thatReturnsNull); } function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propName]; if (!Array.isArray(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); if (error instanceof Error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createElementTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); } return null; } return createChainableTypeChecker(validate); } function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } return createChainableTypeChecker(validate); } function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { true ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; return emptyFunction.thatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (is(propValue, expectedValues[i])) { return null; } } var valuesString = JSON.stringify(expectedValues); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (propValue.hasOwnProperty(key)) { var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error instanceof Error) { return error; } } } return null; } return createChainableTypeChecker(validate); } function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { true ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; return emptyFunction.thatReturnsNull; } for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (typeof checker !== 'function') { warning( false, 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + 'received %s at index %s.', getPostfixForTypeWarning(checker), i ); return emptyFunction.thatReturnsNull; } } function validate(props, propName, componentName, location, propFullName) { for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { return null; } } return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } return createChainableTypeChecker(validate); } function createNodeChecker() { function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } return createChainableTypeChecker(validate); } function createShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; if (!checker) { continue; } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function isNode(propValue) { switch (typeof propValue) { case 'number': case 'string': case 'undefined': return true; case 'boolean': return !propValue; case 'object': if (Array.isArray(propValue)) { return propValue.every(isNode); } if (propValue === null || isValidElement(propValue)) { return true; } var iteratorFn = getIteratorFn(propValue); if (iteratorFn) { var iterator = iteratorFn.call(propValue); var step; if (iteratorFn !== propValue.entries) { while (!(step = iterator.next()).done) { if (!isNode(step.value)) { return false; } } } else { // Iterator will provide entry [k,v] tuples rather than values. while (!(step = iterator.next()).done) { var entry = step.value; if (entry) { if (!isNode(entry[1])) { return false; } } } } } else { return false; } return true; default: return false; } } function isSymbol(propType, propValue) { // Native Symbol. if (propType === 'symbol') { return true; } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' if (propValue['@@toStringTag'] === 'Symbol') { return true; } // Fallback for non-spec compliant Symbols which are polyfilled. if (typeof Symbol === 'function' && propValue instanceof Symbol) { return true; } return false; } // Equivalent of `typeof` but with special handling for array and regexp. function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; } // This handles more types than `getPropType`. Only used for error messages. // See `createPrimitiveTypeChecker`. function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; } // Returns a string that is postfixed to a warning about an invalid type. // For example, "undefined" or "of type array" function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } } // Returns class name of the object, if any. function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; } ReactPropTypes.checkPropTypes = checkPropTypes; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ if (true) { var invariant = __webpack_require__(20); var warning = __webpack_require__(21); var ReactPropTypesSecret = __webpack_require__(22); var loggedTypeFailures = {}; } /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @private */ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (true) { for (var typeSpecName in typeSpecs) { if (typeSpecs.hasOwnProperty(typeSpecName)) { var error; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); } catch (ex) { error = ex; } warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error.message] = true; var stack = getStack ? getStack() : ''; warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); } } } } } module.exports = checkPropTypes; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _prefixName = __webpack_require__(4); var _prefixName2 = _interopRequireDefault(_prefixName); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var FormSection = function (_Component) { _inherits(FormSection, _Component); function FormSection(props, context) { _classCallCheck(this, FormSection); var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context)); if (!context._reduxForm) { throw new Error('FormSection must be inside a component decorated with reduxForm()'); } return _this; } _createClass(FormSection, [{ key: 'getChildContext', value: function getChildContext() { var context = this.context, name = this.props.name; return { _reduxForm: _extends({}, context._reduxForm, { sectionPrefix: (0, _prefixName2.default)(context, name) }) }; } }, { key: 'render', value: function render() { var _props = this.props, children = _props.children, name = _props.name, component = _props.component, rest = _objectWithoutProperties(_props, ['children', 'name', 'component']); if (_react2.default.isValidElement(children)) { return children; } return (0, _react.createElement)(component, _extends({}, rest, { children: children })); } }]); return FormSection; }(_react.Component); FormSection.propTypes = { name: _propTypes2.default.string.isRequired, component: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]) }; FormSection.defaultProps = { component: 'div' }; FormSection.childContextTypes = { _reduxForm: _propTypes2.default.object.isRequired }; FormSection.contextTypes = { _reduxForm: _propTypes2.default.object }; exports.default = FormSection; /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _extendableBuiltin(cls) { function ExtendableBuiltin() { cls.apply(this, arguments); } ExtendableBuiltin.prototype = Object.create(cls.prototype, { constructor: { value: cls, enumerable: false, writable: true, configurable: true } }); if (Object.setPrototypeOf) { Object.setPrototypeOf(ExtendableBuiltin, cls); } else { ExtendableBuiltin.__proto__ = cls; } return ExtendableBuiltin; } var ExtendableError = function (_extendableBuiltin2) { _inherits(ExtendableError, _extendableBuiltin2); function ExtendableError() { var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; _classCallCheck(this, ExtendableError); // extending Error is weird and does not propagate `message` var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message)); Object.defineProperty(_this, 'message', { configurable: true, enumerable: false, value: message, writable: true }); Object.defineProperty(_this, 'name', { configurable: true, enumerable: false, value: _this.constructor.name, writable: true }); if (Error.hasOwnProperty('captureStackTrace')) { Error.captureStackTrace(_this, _this.constructor); return _possibleConstructorReturn(_this); } Object.defineProperty(_this, 'stack', { configurable: true, enumerable: false, value: new Error(message).stack, writable: true }); return _this; } return ExtendableError; }(_extendableBuiltin(Error)); exports.default = ExtendableError; module.exports = exports['default']; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fieldPropTypes = exports.fieldMetaPropTypes = exports.fieldInputPropTypes = exports.formPropTypes = undefined; var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var any = _propTypes2.default.any, bool = _propTypes2.default.bool, func = _propTypes2.default.func, shape = _propTypes2.default.shape, string = _propTypes2.default.string, oneOfType = _propTypes2.default.oneOfType, object = _propTypes2.default.object; var formPropTypes = exports.formPropTypes = { // State: anyTouched: bool.isRequired, // true if any of the fields have been marked as touched asyncValidating: oneOfType([bool, string]).isRequired, // true if async validation is running, a string if a field triggered async validation dirty: bool.isRequired, // true if any values are different from initialValues error: any, // form-wide error from '_error' key in validation result form: string.isRequired, // the name of the form invalid: bool.isRequired, // true if there are any validation errors initialized: bool.isRequired, // true if the form has been initialized initialValues: object, // the initialValues object passed to reduxForm pristine: bool.isRequired, // true if the values are the same as initialValues pure: bool.isRequired, // if true, implements shouldComponentUpdate submitting: bool.isRequired, // true if the form is in the process of being submitted submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason submitSucceeded: bool.isRequired, // true if the form was successfully submitted valid: bool.isRequired, // true if there are no validation errors warning: any, // form-wide warning from '_warning' key in validation result // Actions: array: shape({ insert: func.isRequired, // function to insert a value into an array field move: func.isRequired, // function to move a value within an array field pop: func.isRequired, // function to pop a value off of an array field push: func.isRequired, // function to push a value onto an array field remove: func.isRequired, // function to remove a value from an array field removeAll: func.isRequired, // function to remove all the values from an array field shift: func.isRequired, // function to shift a value out of an array field splice: func.isRequired, // function to splice a value into an array field swap: func.isRequired, // function to swap values in an array field unshift: func.isRequired // function to unshift a value into an array field }), asyncValidate: func.isRequired, // function to trigger async validation autofill: func.isRequired, // action to set a value of a field and mark it as autofilled blur: func.isRequired, // action to mark a field as blurred change: func.isRequired, // action to change the value of a field clearAsyncError: func.isRequired, // action to clear the async error of a field destroy: func.isRequired, // action to destroy the form's data in Redux dispatch: func.isRequired, // the Redux dispatch action handleSubmit: func.isRequired, // function to submit the form initialize: func.isRequired, // action to initialize form data reset: func.isRequired, // action to reset the form data to previously initialized values touch: func.isRequired, // action to mark fields as touched submit: func.isRequired, // action to trigger a submission of the specified form untouch: func.isRequired, // action to mark fields as untouched // triggerSubmit triggerSubmit: bool, // if true, submits the form on componentWillReceiveProps clearSubmit: func.isRequired // called before a triggered submit, by default clears triggerSubmit }; var fieldInputPropTypes = exports.fieldInputPropTypes = { checked: bool, name: string.isRequired, onBlur: func.isRequired, onChange: func.isRequired, onDragStart: func.isRequired, onDrop: func.isRequired, onFocus: func.isRequired, value: any }; var fieldMetaPropTypes = exports.fieldMetaPropTypes = { active: bool.isRequired, asyncValidating: bool.isRequired, autofilled: bool.isRequired, dirty: bool.isRequired, dispatch: func.isRequired, error: string, form: string.isRequired, invalid: bool.isRequired, pristine: bool.isRequired, submitting: bool.isRequired, submitFailed: bool.isRequired, touched: bool.isRequired, valid: bool.isRequired, visited: bool.isRequired, warning: string }; var fieldPropTypes = exports.fieldPropTypes = { input: shape(fieldInputPropTypes).isRequired, meta: shape(fieldMetaPropTypes).isRequired, custom: object.isRequired }; exports.default = formPropTypes; /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createField = __webpack_require__(53); var _createField2 = _interopRequireDefault(_createField); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _createField2.default)(_plain2.default); /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(2); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _invariant = __webpack_require__(5); var _invariant2 = _interopRequireDefault(_invariant); var _ConnectedField = __webpack_require__(54); var _ConnectedField2 = _interopRequireDefault(_ConnectedField); var _shallowCompare = __webpack_require__(32); var _shallowCompare2 = _interopRequireDefault(_shallowCompare); var _prefixName = __webpack_require__(4); var _prefixName2 = _interopRequireDefault(_prefixName); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var createField = function createField(structure) { var ConnectedField = (0, _ConnectedField2.default)(structure); var setIn = structure.setIn; var Field = function (_Component) { _inherits(Field, _Component); function Field(props, context) { _classCallCheck(this, Field); var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context)); _this.saveRef = function (ref) { return _this.ref = ref; }; _this.normalize = function (name, value) { var normalize = _this.props.normalize; if (!normalize) { return value; } var previousValues = _this.context._reduxForm.getValues(); var previousValue = _this.value; var nextValues = setIn(previousValues, name, value); return normalize(value, previousValue, nextValues, previousValues); }; if (!context._reduxForm) { throw new Error('Field must be inside a component decorated with reduxForm()'); } return _this; } _createClass(Field, [{ key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { return (0, _shallowCompare2.default)(this, nextProps); } }, { key: 'componentWillMount', value: function componentWillMount() { var _this2 = this; this.context._reduxForm.register(this.name, 'Field', function () { return _this2.props.validate; }, function () { return _this2.props.warn; }); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (this.props.name !== nextProps.name || this.props.validate !== nextProps.validate || this.props.warn !== nextProps.warn) { // unregister old name this.context._reduxForm.unregister(this.name); // register new name this.context._reduxForm.register((0, _prefixName2.default)(this.context, nextProps.name), 'Field', function () { return nextProps.validate; }, function () { return nextProps.warn; }); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.context._reduxForm.unregister(this.name); } }, { key: 'getRenderedComponent', value: function getRenderedComponent() { (0, _invariant2.default)(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field'); return this.ref.getWrappedInstance().getRenderedComponent(); } }, { key: 'render', value: function render() { return (0, _react.createElement)(ConnectedField, _extends({}, this.props, { name: this.name, normalize: this.normalize, _reduxForm: this.context._reduxForm, ref: this.saveRef })); } }, { key: 'name', get: function get() { return (0, _prefixName2.default)(this.context, this.props.name); } }, { key: 'dirty', get: function get() { return !this.pristine; } }, { key: 'pristine', get: function get() { return this.ref.getWrappedInstance().isPristine(); } }, { key: 'value', get: function get() { return this.ref && this.ref.getWrappedInstance().getValue(); } }]); return Field; }(_react.Component); Field.propTypes = { name: _propTypes2.default.string.isRequired, component: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]).isRequired, format: _propTypes2.default.func, normalize: _propTypes2.default.func, onBlur: _propTypes2.default.func, onChange: _propTypes2.default.func, onFocus: _propTypes2.default.func, onDragStart: _propTypes2.default.func, onDrop: _propTypes2.default.func, parse: _propTypes2.default.func, props: _propTypes2.default.object, validate: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.arrayOf(_propTypes2.default.func)]), warn: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.arrayOf(_propTypes2.default.func)]), withRef: _propTypes2.default.bool }; Field.contextTypes = { _reduxForm: _propTypes2.default.object }; return Field; }; exports.default = createField; /***/ }), /* 54 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _react = __webpack_require__(2); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactRedux = __webpack_require__(3); var _createFieldProps2 = __webpack_require__(24); var _createFieldProps3 = _interopRequireDefault(_createFieldProps2); var _onChangeValue = __webpack_require__(25); var _onChangeValue2 = _interopRequireDefault(_onChangeValue); var _eventConsts = __webpack_require__(57); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var propsToNotUpdateFor = ['_reduxForm']; var isObject = function isObject(entity) { return entity && (typeof entity === 'undefined' ? 'undefined' : _typeof(entity)) === 'object'; }; var isFunction = function isFunction(entity) { return entity && typeof entity === 'function'; }; var eventPreventDefault = function eventPreventDefault(event) { if (isObject(event) && isFunction(event.preventDefault)) { event.preventDefault(); } }; var eventDataTransferGetData = function eventDataTransferGetData(event, key) { if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.getData)) { return event.dataTransfer.getData(key); } }; var eventDataTransferSetData = function eventDataTransferSetData(event, key, value) { if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.setData)) { event.dataTransfer.setData(key, value); } }; var createConnectedField = function createConnectedField(structure) { var deepEqual = structure.deepEqual, getIn = structure.getIn; var getSyncError = function getSyncError(syncErrors, name) { var error = _plain2.default.getIn(syncErrors, name); // Because the error for this field might not be at a level in the error structure where // it can be set directly, it might need to be unwrapped from the _error property return error && error._error ? error._error : error; }; var getSyncWarning = function getSyncWarning(syncWarnings, name) { var warning = getIn(syncWarnings, name); // Because the warning for this field might not be at a level in the warning structure where // it can be set directly, it might need to be unwrapped from the _warning property return warning && warning._warning ? warning._warning : warning; }; var ConnectedField = function (_Component) { _inherits(ConnectedField, _Component); function ConnectedField() { var _ref; var _temp, _this, _ret; _classCallCheck(this, ConnectedField); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call.apply(_ref, [this].concat(args))), _this), _this.saveRef = function (ref) { return _this.ref = ref; }, _this.isPristine = function () { return _this.props.pristine; }, _this.getValue = function () { return _this.props.value; }, _this.handleChange = function (event) { var _this$props = _this.props, name = _this$props.name, dispatch = _this$props.dispatch, parse = _this$props.parse, normalize = _this$props.normalize, onChange = _this$props.onChange, _reduxForm = _this$props._reduxForm, previousValue = _this$props.value; var newValue = (0, _onChangeValue2.default)(event, { name: name, parse: parse, normalize: normalize }); var defaultPrevented = false; if (onChange) { onChange(_extends({}, event, { preventDefault: function preventDefault() { defaultPrevented = true; return eventPreventDefault(event); } }), newValue, previousValue); } if (!defaultPrevented) { // dispatch change action dispatch(_reduxForm.change(name, newValue)); } }, _this.handleFocus = function (event) { var _this$props2 = _this.props, name = _this$props2.name, dispatch = _this$props2.dispatch, onFocus = _this$props2.onFocus, _reduxForm = _this$props2._reduxForm; var defaultPrevented = false; if (onFocus) { onFocus(_extends({}, event, { preventDefault: function preventDefault() { defaultPrevented = true; return eventPreventDefault(event); } })); } if (!defaultPrevented) { dispatch(_reduxForm.focus(name)); } }, _this.handleBlur = function (event) { var _this$props3 = _this.props, name = _this$props3.name, dispatch = _this$props3.dispatch, parse = _this$props3.parse, normalize = _this$props3.normalize, onBlur = _this$props3.onBlur, _reduxForm = _this$props3._reduxForm, _value = _this$props3._value, previousValue = _this$props3.value; var newValue = (0, _onChangeValue2.default)(event, { name: name, parse: parse, normalize: normalize }); // for checkbox and radio, if the value property of checkbox or radio equals // the value passed by blur event, then fire blur action with previousValue. if (newValue === _value && _value !== undefined) { newValue = previousValue; } var defaultPrevented = false; if (onBlur) { onBlur(_extends({}, event, { preventDefault: function preventDefault() { defaultPrevented = true; return eventPreventDefault(event); } }), newValue, previousValue); } if (!defaultPrevented) { // dispatch blur action dispatch(_reduxForm.blur(name, newValue)); // call post-blur callback if (_reduxForm.asyncValidate) { _reduxForm.asyncValidate(name, newValue); } } }, _this.handleDragStart = function (event) { var _this$props4 = _this.props, onDragStart = _this$props4.onDragStart, value = _this$props4.value; eventDataTransferSetData(event, _eventConsts.dataKey, value == null ? '' : value); if (onDragStart) { onDragStart(event); } }, _this.handleDrop = function (event) { var _this$props5 = _this.props, name = _this$props5.name, dispatch = _this$props5.dispatch, onDrop = _this$props5.onDrop, _reduxForm = _this$props5._reduxForm, previousValue = _this$props5.value; var newValue = eventDataTransferGetData(event, _eventConsts.dataKey); var defaultPrevented = false; if (onDrop) { onDrop(_extends({}, event, { preventDefault: function preventDefault() { defaultPrevented = true; return eventPreventDefault(event); } }), newValue, previousValue); } if (!defaultPrevented) { // dispatch change action dispatch(_reduxForm.change(name, newValue)); eventPreventDefault(event); } }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(ConnectedField, [{ key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { var _this2 = this; var nextPropsKeys = Object.keys(nextProps); var thisPropsKeys = Object.keys(this.props); return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); }); } }, { key: 'getRenderedComponent', value: function getRenderedComponent() { return this.ref; } }, { key: 'render', value: function render() { var _props = this.props, component = _props.component, withRef = _props.withRef, name = _props.name, _reduxForm = _props._reduxForm, normalize = _props.normalize, onBlur = _props.onBlur, onChange = _props.onChange, onFocus = _props.onFocus, onDragStart = _props.onDragStart, onDrop = _props.onDrop, rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']); var _createFieldProps = (0, _createFieldProps3.default)(structure, name, _extends({}, rest, { form: _reduxForm.form, onBlur: this.handleBlur, onChange: this.handleChange, onDrop: this.handleDrop, onDragStart: this.handleDragStart, onFocus: this.handleFocus })), custom = _createFieldProps.custom, props = _objectWithoutProperties(_createFieldProps, ['custom']); if (withRef) { custom.ref = this.saveRef; } if (typeof component === 'string') { var input = props.input, meta = props.meta; // eslint-disable-line no-unused-vars // flatten input into other props return (0, _react.createElement)(component, _extends({}, input, custom)); } else { return (0, _react.createElement)(component, _extends({}, props, custom)); } } }]); return ConnectedField; }(_react.Component); ConnectedField.propTypes = { component: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]).isRequired, props: _propTypes2.default.object }; var connector = (0, _reactRedux.connect)(function (state, ownProps) { var name = ownProps.name, _ownProps$_reduxForm = ownProps._reduxForm, initialValues = _ownProps$_reduxForm.initialValues, getFormState = _ownProps$_reduxForm.getFormState; var formState = getFormState(state); var initialState = getIn(formState, 'initial.' + name); var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); var value = getIn(formState, 'values.' + name); var submitting = getIn(formState, 'submitting'); var syncError = getSyncError(getIn(formState, 'syncErrors'), name); var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); var pristine = deepEqual(value, initial); return { asyncError: getIn(formState, 'asyncErrors.' + name), asyncValidating: getIn(formState, 'asyncValidating') === name, dirty: !pristine, pristine: pristine, state: getIn(formState, 'fields.' + name), submitError: getIn(formState, 'submitErrors.' + name), submitFailed: getIn(formState, 'submitFailed'), submitting: submitting, syncError: syncError, syncWarning: syncWarning, initial: initial, value: value, _value: ownProps.value // save value passed in (for checkboxes) }; }, undefined, undefined, { withRef: true }); return connector(ConnectedField); }; exports.default = createConnectedField; /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEvent = __webpack_require__(26); var _isEvent2 = _interopRequireDefault(_isEvent); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var getSelectedValues = function getSelectedValues(options) { var result = []; if (options) { for (var index = 0; index < options.length; index++) { var option = options[index]; if (option.selected) { result.push(option.value); } } } return result; }; var getValue = function getValue(event, isReactNative) { if ((0, _isEvent2.default)(event)) { if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) { return event.nativeEvent.text; } if (isReactNative && event.nativeEvent !== undefined) { return event.nativeEvent.text; } var _event$target = event.target, type = _event$target.type, value = _event$target.value, checked = _event$target.checked, files = _event$target.files, dataTransfer = event.dataTransfer; if (type === 'checkbox') { return checked || ''; } if (type === 'file') { return files || dataTransfer && dataTransfer.files; } if (type === 'select-multiple') { return getSelectedValues(event.target.options); } return value; } return event; }; exports.default = getValue; /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative'; exports.default = isReactNative; /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dataKey = exports.dataKey = 'text'; /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var splice = function splice(array, index, removeNum, value) { array = array || []; if (index < array.length) { if (value === undefined && !removeNum) { // inserting undefined var _copy2 = [].concat(_toConsumableArray(array)); _copy2.splice(index, 0, true); // temporary placeholder _copy2[index] = undefined; // set to undefined return _copy2; } if (value != null) { var _copy3 = [].concat(_toConsumableArray(array)); _copy3.splice(index, removeNum, value); // removing and adding return _copy3; } var _copy = [].concat(_toConsumableArray(array)); _copy.splice(index, removeNum); // removing return _copy; } if (removeNum) { // trying to remove non-existant item: return original array return array; } // trying to add outside of range: just set value var copy = [].concat(_toConsumableArray(array)); copy[index] = value; return copy; }; exports.default = splice; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _toPath2 = __webpack_require__(6); var _toPath3 = _interopRequireDefault(_toPath2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var getIn = function getIn(state, field) { if (!state) { return state; } var path = (0, _toPath3.default)(field); var length = path.length; if (!length) { return undefined; } var result = state; for (var i = 0; i < length && result; ++i) { result = result[path[i]]; } return result; }; exports.default = getIn; /***/ }), /* 60 */ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 61 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__(63); /** Used to match property names within property paths. */ var reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (reLeadingDot.test(string)) { result.push(''); } string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /* 63 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 64 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 65 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _toPath2 = __webpack_require__(6); var _toPath3 = _interopRequireDefault(_toPath2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var setInWithPath = function setInWithPath(state, value, path, pathIndex) { if (pathIndex >= path.length) { return value; } var first = path[pathIndex]; var firstState = state && (Array.isArray(state) ? state[Number(first)] : state[first]); var next = setInWithPath(firstState, value, path, pathIndex + 1); if (!state) { if (isNaN(first)) { return _defineProperty({}, first, next); } var initialized = []; initialized[parseInt(first, 10)] = next; return initialized; } if (Array.isArray(state)) { var copy = [].concat(state); copy[parseInt(first, 10)] = next; return copy; } return _extends({}, state, _defineProperty({}, first, next)); }; var setIn = function setIn(state, field, value) { return setInWithPath(state, value, (0, _toPath3.default)(field), 0); }; exports.default = setIn; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEqualWith2 = __webpack_require__(28); var _isEqualWith3 = _interopRequireDefault(_isEqualWith2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var customizer = function customizer(obj, other) { if (obj === other) return true; if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) { return !(obj === undefined && other === false || obj === false && other === undefined); } if (obj && other && obj._error !== other._error) return false; if (obj && other && obj._warning !== other._warning) return false; }; var deepEqual = function deepEqual(a, b) { return (0, _isEqualWith3.default)(a, b, customizer); }; exports.default = deepEqual; /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(69), isObjectLike = __webpack_require__(13); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /* 69 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(29), equalArrays = __webpack_require__(75), equalByTag = __webpack_require__(80), equalObjects = __webpack_require__(81), getTag = __webpack_require__(83), isArray = __webpack_require__(7), isBuffer = __webpack_require__(30), isTypedArray = __webpack_require__(31); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /* 70 */ /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(8); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(8); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(8); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(8); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(76), arraySome = __webpack_require__(77), cacheHas = __webpack_require__(78); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(7); /** * Casts `value` as an array if it's not one. * * @static * @memberOf _ * @since 4.4.0 * @category Lang * @param {*} value The value to inspect. * @returns {Array} Returns the cast array. * @example * * _.castArray(1); * // => [1] * * _.castArray({ 'a': 1 }); * // => [{ 'a': 1 }] * * _.castArray('abc'); * // => ['abc'] * * _.castArray(null); * // => [null] * * _.castArray(undefined); * // => [undefined] * * _.castArray(); * // => [] * * var array = [1, 2, 3]; * console.log(_.castArray(array) === array); * // => true */ function castArray() { if (!arguments.length) { return []; } var value = arguments[0]; return isArray(value) ? value : [value]; } module.exports = castArray; /***/ }), /* 77 */ /***/ (function(module, exports) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(79); /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; /***/ }), /* 79 */ /***/ (function(module, exports) { /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; /***/ }), /* 80 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { var getAllKeys = __webpack_require__(82); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(12); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 83 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _toPath2 = __webpack_require__(6); var _toPath3 = _interopRequireDefault(_toPath2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function deleteInWithPath(state, first) { if (state === undefined || state === null || first === undefined || first === null) { return state; } for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { rest[_key - 2] = arguments[_key]; } if (rest.length) { if (Array.isArray(state)) { if (isNaN(first)) { throw new Error('Must access array elements with a number, not "' + String(first) + '".'); } var firstIndex = Number(first); if (firstIndex < state.length) { var result = deleteInWithPath.apply(undefined, [state && state[firstIndex]].concat(_toConsumableArray(rest))); if (result !== state[firstIndex]) { var copy = [].concat(_toConsumableArray(state)); copy[firstIndex] = result; return copy; } } return state; } if (first in state) { var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(_toConsumableArray(rest))); return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result)); } return state; } if (Array.isArray(state)) { if (isNaN(first)) { throw new Error('Cannot delete non-numerical index from an array. Given: "' + String(first)); } var _firstIndex = Number(first); if (_firstIndex < state.length) { var _copy = [].concat(_toConsumableArray(state)); _copy.splice(_firstIndex, 1); return _copy; } return state; } if (first in state) { var _copy2 = _extends({}, state); delete _copy2[first]; return _copy2; } return state; } var deleteIn = function deleteIn(state, field) { return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray((0, _toPath3.default)(field)))); }; exports.default = deleteIn; /***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function keys(value) { if (!value) { return []; } if (Array.isArray(value)) { return value.map(function (i) { return i.name; }); } return Object.keys(value); } exports.default = keys; /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createFields = __webpack_require__(87); var _createFields2 = _interopRequireDefault(_createFields); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _createFields2.default)(_plain2.default); /***/ }), /* 87 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(2); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _invariant = __webpack_require__(5); var _invariant2 = _interopRequireDefault(_invariant); var _ConnectedFields = __webpack_require__(88); var _ConnectedFields2 = _interopRequireDefault(_ConnectedFields); var _shallowCompare = __webpack_require__(32); var _shallowCompare2 = _interopRequireDefault(_shallowCompare); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); var _prefixName = __webpack_require__(4); var _prefixName2 = _interopRequireDefault(_prefixName); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var validateNameProp = function validateNameProp(prop) { if (!prop) { return new Error('No "names" prop was specified <Fields/>'); } if (!Array.isArray(prop) && !prop._isFieldArray) { return new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'); } }; var createFields = function createFields(structure) { var ConnectedFields = (0, _ConnectedFields2.default)(structure); var Fields = function (_Component) { _inherits(Fields, _Component); function Fields(props, context) { _classCallCheck(this, Fields); var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context)); if (!context._reduxForm) { throw new Error('Fields must be inside a component decorated with reduxForm()'); } return _this; } _createClass(Fields, [{ key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { return (0, _shallowCompare2.default)(this, nextProps); } }, { key: 'componentWillMount', value: function componentWillMount() { var error = validateNameProp(this.props.names); if (error) { throw error; } var context = this.context; var register = context._reduxForm.register; this.names.forEach(function (name) { return register(name, 'Field'); }); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (!_plain2.default.deepEqual(this.props.names, nextProps.names)) { var context = this.context; var _context$_reduxForm = context._reduxForm, register = _context$_reduxForm.register, unregister = _context$_reduxForm.unregister; // unregister old name this.props.names.forEach(function (name) { return unregister((0, _prefixName2.default)(context, name)); }); // register new name nextProps.names.forEach(function (name) { return register((0, _prefixName2.default)(context, name), 'Field'); }); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { var context = this.context; var unregister = context._reduxForm.unregister; this.props.names.forEach(function (name) { return unregister((0, _prefixName2.default)(context, name)); }); } }, { key: 'getRenderedComponent', value: function getRenderedComponent() { (0, _invariant2.default)(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields'); return this.refs.connected.getWrappedInstance().getRenderedComponent(); } }, { key: 'render', value: function render() { var context = this.context; return (0, _react.createElement)(ConnectedFields, _extends({}, this.props, { names: this.props.names.map(function (name) { return (0, _prefixName2.default)(context, name); }), _reduxForm: this.context._reduxForm, ref: 'connected' })); } }, { key: 'names', get: function get() { var context = this.context; return this.props.names.map(function (name) { return (0, _prefixName2.default)(context, name); }); } }, { key: 'dirty', get: function get() { return this.refs.connected.getWrappedInstance().isDirty(); } }, { key: 'pristine', get: function get() { return !this.dirty; } }, { key: 'values', get: function get() { return this.refs.connected && this.refs.connected.getWrappedInstance().getValues(); } }]); return Fields; }(_react.Component); Fields.propTypes = { names: function names(props, propName) { return validateNameProp(props[propName]); }, component: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]).isRequired, format: _propTypes2.default.func, parse: _propTypes2.default.func, props: _propTypes2.default.object, withRef: _propTypes2.default.bool }; Fields.contextTypes = { _reduxForm: _propTypes2.default.object }; return Fields; }; exports.default = createFields; /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(2); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactRedux = __webpack_require__(3); var _createFieldProps2 = __webpack_require__(24); var _createFieldProps3 = _interopRequireDefault(_createFieldProps2); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); var _onChangeValue = __webpack_require__(25); var _onChangeValue2 = _interopRequireDefault(_onChangeValue); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var propsToNotUpdateFor = ['_reduxForm']; var createConnectedFields = function createConnectedFields(structure) { var deepEqual = structure.deepEqual, getIn = structure.getIn, size = structure.size; var getSyncError = function getSyncError(syncErrors, name) { // Because the error for this field might not be at a level in the error structure where // it can be set directly, it might need to be unwrapped from the _error property return _plain2.default.getIn(syncErrors, name + '._error') || _plain2.default.getIn(syncErrors, name); }; var getSyncWarning = function getSyncWarning(syncWarnings, name) { var warning = getIn(syncWarnings, name); // Because the warning for this field might not be at a level in the warning structure where // it can be set directly, it might need to be unwrapped from the _warning property return warning && warning._warning ? warning._warning : warning; }; var ConnectedFields = function (_Component) { _inherits(ConnectedFields, _Component); function ConnectedFields(props) { _classCallCheck(this, ConnectedFields); var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props)); _this.onChangeFns = {}; _this.onFocusFns = {}; _this.onBlurFns = {}; _this.prepareEventHandlers = function (_ref) { var names = _ref.names; return names.forEach(function (name) { _this.onChangeFns[name] = function (event) { return _this.handleChange(name, event); }; _this.onFocusFns[name] = function () { return _this.handleFocus(name); }; _this.onBlurFns[name] = function (event) { return _this.handleBlur(name, event); }; }); }; _this.handleChange = function (name, event) { var _this$props = _this.props, dispatch = _this$props.dispatch, parse = _this$props.parse, _reduxForm = _this$props._reduxForm; var value = (0, _onChangeValue2.default)(event, { name: name, parse: parse }); dispatch(_reduxForm.change(name, value)); }; _this.handleFocus = function (name) { var _this$props2 = _this.props, dispatch = _this$props2.dispatch, _reduxForm = _this$props2._reduxForm; dispatch(_reduxForm.focus(name)); }; _this.handleBlur = function (name, event) { var _this$props3 = _this.props, dispatch = _this$props3.dispatch, parse = _this$props3.parse, _reduxForm = _this$props3._reduxForm; var value = (0, _onChangeValue2.default)(event, { name: name, parse: parse }); // dispatch blur action dispatch(_reduxForm.blur(name, value)); // call post-blur callback if (_reduxForm.asyncValidate) { _reduxForm.asyncValidate(name, value); } }; _this.prepareEventHandlers(props); return _this; } _createClass(ConnectedFields, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var _this2 = this; if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) { return !_this2.props._fields[nextName]; }))) { // names has changed. The cached event handlers need to be updated this.prepareEventHandlers(nextProps); } } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { var _this3 = this; var nextPropsKeys = Object.keys(nextProps); var thisPropsKeys = Object.keys(this.props); return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); }); } }, { key: 'isDirty', value: function isDirty() { var _fields = this.props._fields; return Object.keys(_fields).some(function (name) { return _fields[name].dirty; }); } }, { key: 'getValues', value: function getValues() { var _fields = this.props._fields; return Object.keys(_fields).reduce(function (accumulator, name) { return _plain2.default.setIn(accumulator, name, _fields[name].value); }, {}); } }, { key: 'getRenderedComponent', value: function getRenderedComponent() { return this.refs.renderedComponent; } }, { key: 'render', value: function render() { var _this4 = this; var _props = this.props, component = _props.component, withRef = _props.withRef, _fields = _props._fields, _reduxForm = _props._reduxForm, rest = _objectWithoutProperties(_props, ['component', 'withRef', '_fields', '_reduxForm']); var sectionPrefix = _reduxForm.sectionPrefix, form = _reduxForm.form; var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) { var connectedProps = _fields[name]; var _createFieldProps = (0, _createFieldProps3.default)(structure, name, _extends({}, connectedProps, rest, { form: form, onBlur: _this4.onBlurFns[name], onChange: _this4.onChangeFns[name], onFocus: _this4.onFocusFns[name] })), custom = _createFieldProps.custom, fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']); accumulator.custom = custom; var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; return _plain2.default.setIn(accumulator, fieldName, fieldProps); }, {}), custom = _Object$keys$reduce.custom, props = _objectWithoutProperties(_Object$keys$reduce, ['custom']); if (withRef) { props.ref = 'renderedComponent'; } return (0, _react.createElement)(component, _extends({}, props, custom)); } }]); return ConnectedFields; }(_react.Component); ConnectedFields.propTypes = { component: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]).isRequired, _fields: _propTypes2.default.object.isRequired, props: _propTypes2.default.object }; var connector = (0, _reactRedux.connect)(function (state, ownProps) { var names = ownProps.names, _ownProps$_reduxForm = ownProps._reduxForm, initialValues = _ownProps$_reduxForm.initialValues, getFormState = _ownProps$_reduxForm.getFormState; var formState = getFormState(state); return { _fields: names.reduce(function (accumulator, name) { var initialState = getIn(formState, 'initial.' + name); var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); var value = getIn(formState, 'values.' + name); var syncError = getSyncError(getIn(formState, 'syncErrors'), name); var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); var submitting = getIn(formState, 'submitting'); var pristine = value === initial; accumulator[name] = { asyncError: getIn(formState, 'asyncErrors.' + name), asyncValidating: getIn(formState, 'asyncValidating') === name, dirty: !pristine, initial: initial, pristine: pristine, state: getIn(formState, 'fields.' + name), submitError: getIn(formState, 'submitErrors.' + name), submitFailed: getIn(formState, 'submitFailed'), submitting: submitting, syncError: syncError, syncWarning: syncWarning, value: value, _value: ownProps.value // save value passed in (for checkboxes) }; return accumulator; }, {}) }; }, undefined, undefined, { withRef: true }); return connector(ConnectedFields); }; exports.default = createConnectedFields; /***/ }), /* 89 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createFieldArray = __webpack_require__(90); var _createFieldArray2 = _interopRequireDefault(_createFieldArray); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _createFieldArray2.default)(_plain2.default); /***/ }), /* 90 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(2); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _invariant = __webpack_require__(5); var _invariant2 = _interopRequireDefault(_invariant); var _ConnectedFieldArray = __webpack_require__(91); var _ConnectedFieldArray2 = _interopRequireDefault(_ConnectedFieldArray); var _prefixName = __webpack_require__(4); var _prefixName2 = _interopRequireDefault(_prefixName); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var toArray = function toArray(value) { return Array.isArray(value) ? value : [value]; }; var wrapError = function wrapError(fn, key) { return fn && function () { var validators = toArray(fn); for (var i = 0; i < validators.length; i++) { var result = validators[i].apply(validators, arguments); if (result) { return _defineProperty({}, key, result); } } }; }; var createFieldArray = function createFieldArray(structure) { var ConnectedFieldArray = (0, _ConnectedFieldArray2.default)(structure); var FieldArray = function (_Component) { _inherits(FieldArray, _Component); function FieldArray(props, context) { _classCallCheck(this, FieldArray); var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context)); _this.saveRef = function (ref) { return _this.ref = ref; }; if (!context._reduxForm) { throw new Error('FieldArray must be inside a component decorated with reduxForm()'); } return _this; } _createClass(FieldArray, [{ key: 'componentWillMount', value: function componentWillMount() { var _this2 = this; this.context._reduxForm.register(this.name, 'FieldArray', function () { return wrapError(_this2.props.validate, '_error'); }, function () { return wrapError(_this2.props.warn, '_warning'); }); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (this.props.name !== nextProps.name) { // unregister old name this.context._reduxForm.unregister(this.name); // register new name this.context._reduxForm.register((0, _prefixName2.default)(this.context, nextProps.name), 'FieldArray'); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.context._reduxForm.unregister(this.name); } }, { key: 'getRenderedComponent', value: function getRenderedComponent() { (0, _invariant2.default)(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray'); return this.ref.getWrappedInstance().getRenderedComponent(); } }, { key: 'render', value: function render() { return (0, _react.createElement)(ConnectedFieldArray, _extends({}, this.props, { name: this.name, _reduxForm: this.context._reduxForm, ref: this.saveRef })); } }, { key: 'name', get: function get() { return (0, _prefixName2.default)(this.context, this.props.name); } }, { key: 'dirty', get: function get() { return this.ref.getWrappedInstance().dirty; } }, { key: 'pristine', get: function get() { return this.ref.getWrappedInstance().pristine; } }, { key: 'value', get: function get() { return this.ref.getWrappedInstance().value; } }]); return FieldArray; }(_react.Component); FieldArray.propTypes = { name: _propTypes2.default.string.isRequired, component: _propTypes2.default.func.isRequired, props: _propTypes2.default.object, validate: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.arrayOf(_propTypes2.default.func)]), warn: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.arrayOf(_propTypes2.default.func)]), withRef: _propTypes2.default.bool }; FieldArray.contextTypes = { _reduxForm: _propTypes2.default.object }; return FieldArray; }; exports.default = createFieldArray; /***/ }), /* 91 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _mapValues2 = __webpack_require__(33); var _mapValues3 = _interopRequireDefault(_mapValues2); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(2); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactRedux = __webpack_require__(3); var _redux = __webpack_require__(35); var _createFieldArrayProps = __webpack_require__(98); var _createFieldArrayProps2 = _interopRequireDefault(_createFieldArrayProps); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var propsToNotUpdateFor = ['_reduxForm', 'value']; var createConnectedFieldArray = function createConnectedFieldArray(structure) { var deepEqual = structure.deepEqual, getIn = structure.getIn, size = structure.size; var getSyncError = function getSyncError(syncErrors, name) { // For an array, the error can _ONLY_ be under _error. // This is why this getSyncError is not the same as the // one in Field. return _plain2.default.getIn(syncErrors, name + '._error'); }; var getSyncWarning = function getSyncWarning(syncWarnings, name) { // For an array, the warning can _ONLY_ be under _warning. // This is why this getSyncError is not the same as the // one in Field. return getIn(syncWarnings, name + '._warning'); }; var ConnectedFieldArray = function (_Component) { _inherits(ConnectedFieldArray, _Component); function ConnectedFieldArray() { var _ref; var _temp, _this, _ret; _classCallCheck(this, ConnectedFieldArray); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call.apply(_ref, [this].concat(args))), _this), _this.getValue = function (index) { return _this.props.value && getIn(_this.props.value, String(index)); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(ConnectedFieldArray, [{ key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { var _this2 = this; // Update if the elements of the value array was updated. var thisValue = this.props.value; var nextValue = nextProps.value; if (thisValue && nextValue) { if (thisValue.length !== nextValue.length || nextProps.rerenderOnEveryChange && thisValue.some(function (val, index) { return !deepEqual(val, nextValue[index]); })) { return true; } } var nextPropsKeys = Object.keys(nextProps); var thisPropsKeys = Object.keys(this.props); return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { // useful to debug rerenders // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) // } return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); }); } }, { key: 'getRenderedComponent', value: function getRenderedComponent() { return this.refs.renderedComponent; } }, { key: 'render', value: function render() { var _props = this.props, component = _props.component, withRef = _props.withRef, name = _props.name, _reduxForm = _props._reduxForm, validate = _props.validate, warn = _props.warn, rerenderOnEveryChange = _props.rerenderOnEveryChange, rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn', 'rerenderOnEveryChange']); var props = (0, _createFieldArrayProps2.default)(structure, name, _reduxForm.form, _reduxForm.sectionPrefix, this.getValue, rest); if (withRef) { props.ref = 'renderedComponent'; } return (0, _react.createElement)(component, props); } }, { key: 'dirty', get: function get() { return this.props.dirty; } }, { key: 'pristine', get: function get() { return this.props.pristine; } }, { key: 'value', get: function get() { return this.props.value; } }]); return ConnectedFieldArray; }(_react.Component); ConnectedFieldArray.propTypes = { component: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]).isRequired, props: _propTypes2.default.object, rerenderOnEveryChange: _propTypes2.default.bool }; ConnectedFieldArray.defaultProps = { rerenderOnEveryChange: false }; ConnectedFieldArray.contextTypes = { _reduxForm: _propTypes2.default.object }; var connector = (0, _reactRedux.connect)(function (state, ownProps) { var name = ownProps.name, _ownProps$_reduxForm = ownProps._reduxForm, initialValues = _ownProps$_reduxForm.initialValues, getFormState = _ownProps$_reduxForm.getFormState; var formState = getFormState(state); var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name); var value = getIn(formState, 'values.' + name); var submitting = getIn(formState, 'submitting'); var syncError = getSyncError(getIn(formState, 'syncErrors'), name); var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); var pristine = deepEqual(value, initial); return { asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), dirty: !pristine, pristine: pristine, state: getIn(formState, 'fields.' + name), submitError: getIn(formState, 'submitErrors.' + name + '._error'), submitFailed: getIn(formState, 'submitFailed'), submitting: submitting, syncError: syncError, syncWarning: syncWarning, value: value, length: size(value) }; }, function (dispatch, ownProps) { var name = ownProps.name, _reduxForm = ownProps._reduxForm; var arrayInsert = _reduxForm.arrayInsert, arrayMove = _reduxForm.arrayMove, arrayPop = _reduxForm.arrayPop, arrayPush = _reduxForm.arrayPush, arrayRemove = _reduxForm.arrayRemove, arrayRemoveAll = _reduxForm.arrayRemoveAll, arrayShift = _reduxForm.arrayShift, arraySplice = _reduxForm.arraySplice, arraySwap = _reduxForm.arraySwap, arrayUnshift = _reduxForm.arrayUnshift; return (0, _mapValues3.default)({ arrayInsert: arrayInsert, arrayMove: arrayMove, arrayPop: arrayPop, arrayPush: arrayPush, arrayRemove: arrayRemove, arrayRemoveAll: arrayRemoveAll, arrayShift: arrayShift, arraySplice: arraySplice, arraySwap: arraySwap, arrayUnshift: arrayUnshift }, function (actionCreator) { return (0, _redux.bindActionCreators)(actionCreator.bind(null, name), dispatch); }); }, undefined, { withRef: true }); return connector(ConnectedFieldArray); }; exports.default = createConnectedFieldArray; /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(93); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /* 93 */ /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /* 94 */ /***/ (function(module, exports, __webpack_require__) { var baseFor = __webpack_require__(34), keys = __webpack_require__(96); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } module.exports = baseForOwn; /***/ }), /* 95 */ /***/ (function(module, exports) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(12); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 97 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 98 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var createFieldArrayProps = function createFieldArrayProps(_ref2, name, form, sectionPrefix, getValue, _ref) { var getIn = _ref2.getIn; var arrayInsert = _ref.arrayInsert, arrayMove = _ref.arrayMove, arrayPop = _ref.arrayPop, arrayPush = _ref.arrayPush, arrayRemove = _ref.arrayRemove, arrayRemoveAll = _ref.arrayRemoveAll, arrayShift = _ref.arrayShift, arraySplice = _ref.arraySplice, arraySwap = _ref.arraySwap, arrayUnshift = _ref.arrayUnshift, asyncError = _ref.asyncError, dirty = _ref.dirty, length = _ref.length, pristine = _ref.pristine, submitError = _ref.submitError, state = _ref.state, submitFailed = _ref.submitFailed, submitting = _ref.submitting, syncError = _ref.syncError, syncWarning = _ref.syncWarning, value = _ref.value, props = _ref.props, rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']); var error = syncError || asyncError || submitError; var warning = syncWarning; var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; var finalProps = _extends({ fields: { _isFieldArray: true, forEach: function forEach(callback) { return (value || []).forEach(function (item, index) { return callback(fieldName + '[' + index + ']', index, finalProps.fields); }); }, get: getValue, getAll: function getAll() { return value; }, insert: arrayInsert, length: length, map: function map(callback) { return (value || []).map(function (item, index) { return callback(fieldName + '[' + index + ']', index, finalProps.fields); }); }, move: arrayMove, name: name, pop: function pop() { arrayPop(); return getIn(value, String(length - 1)); }, push: arrayPush, reduce: function reduce(callback, initial) { return (value || []).reduce(function (accumulator, item, index) { return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields); }, initial); }, remove: arrayRemove, removeAll: arrayRemoveAll, shift: function shift() { arrayShift(); return getIn(value, '0'); }, swap: arraySwap, unshift: arrayUnshift }, meta: { dirty: dirty, error: error, form: form, warning: warning, invalid: !!error, pristine: pristine, submitting: submitting, submitFailed: submitFailed, valid: !error } }, props, rest); return finalProps; }; exports.default = createFieldArrayProps; /***/ }), /* 99 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createFormValueSelector = __webpack_require__(100); var _createFormValueSelector2 = _interopRequireDefault(_createFormValueSelector); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _createFormValueSelector2.default)(_plain2.default); /***/ }), /* 100 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _invariant = __webpack_require__(5); var _invariant2 = _interopRequireDefault(_invariant); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var createFormValueSelector = function createFormValueSelector(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; (0, _invariant2.default)(form, 'Form value must be specified'); return function (state) { for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { fields[_key - 1] = arguments[_key]; } (0, _invariant2.default)(fields.length, 'No fields specified'); return fields.length === 1 ? // only selecting one field, so return its value getIn(getFormState(state), form + '.values.' + fields[0]) : // selecting many fields, so return an object of field values fields.reduce(function (accumulator, field) { var value = getIn(getFormState(state), form + '.values.' + field); return value === undefined ? accumulator : _plain2.default.setIn(accumulator, field, value); }, {}); }; }; }; exports.default = createFormValueSelector; /***/ }), /* 101 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createFormValues = __webpack_require__(102); var _createFormValues2 = _interopRequireDefault(_createFormValues); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _createFormValues2.default)(_plain2.default); /***/ }), /* 102 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactRedux = __webpack_require__(3); var _prefixName = __webpack_require__(4); var _prefixName2 = _interopRequireDefault(_prefixName); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var createValues = function createValues(_ref) { var getIn = _ref.getIn; return function (firstArg) { for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { rest[_key - 1] = arguments[_key]; } var valuesMap = void 0; if (typeof firstArg === 'string') { valuesMap = [firstArg].concat(_toConsumableArray(rest)).map(function (k) { return { prop: k, path: k }; }); } else { var config = firstArg; valuesMap = Object.keys(config).map(function (k) { return { prop: k, path: config[k] }; }); } if (!valuesMap.length) { throw new Error('formValues(): You must specify values to get as formValues(name1, name2, ...) or formValues({propName1: propPath1, ...})'); } // create a class that reads current form name and creates a selector // return return function (Component) { var FormValues = function (_React$Component) { _inherits(FormValues, _React$Component); function FormValues(props, context) { _classCallCheck(this, FormValues); var _this = _possibleConstructorReturn(this, (FormValues.__proto__ || Object.getPrototypeOf(FormValues)).call(this, props, context)); if (!context._reduxForm) { throw new Error('formValues() must be used inside a React tree decorated with reduxForm()'); } var getValues = context._reduxForm.getValues; var formValuesSelector = function formValuesSelector(_) { // Yes, we're only using connect() for listening to updates var props = {}; var values = getValues(); valuesMap.forEach(function (_ref2) { var prop = _ref2.prop, path = _ref2.path; return props[prop] = getIn(values, (0, _prefixName2.default)(context, path)); }); return props; }; _this.Component = (0, _reactRedux.connect)(formValuesSelector, function () { return {}; } // ignore dispatch )(Component); return _this; } _createClass(FormValues, [{ key: 'render', value: function render() { return _react2.default.createElement(this.Component, this.props); } }]); return FormValues; }(_react2.default.Component); FormValues.contextTypes = { _reduxForm: _propTypes2.default.object }; return FormValues; }; }; }; exports.default = createValues; /***/ }), /* 103 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getFormNames = __webpack_require__(104); var _getFormNames2 = _interopRequireDefault(_getFormNames); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _getFormNames2.default)(_plain2.default); /***/ }), /* 104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createGetFormNames = function createGetFormNames(_ref) { var getIn = _ref.getIn, keys = _ref.keys; return function () { var getFormState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) { return getIn(state, 'form'); }; return function (state) { return keys(getFormState(state)); }; }; }; exports.default = createGetFormNames; /***/ }), /* 105 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getFormValues = __webpack_require__(106); var _getFormValues2 = _interopRequireDefault(_getFormValues); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _getFormValues2.default)(_plain2.default); /***/ }), /* 106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createGetFormValues = function createGetFormValues(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return getIn(getFormState(state), form + '.values'); }; }; }; exports.default = createGetFormValues; /***/ }), /* 107 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getFormInitialValues = __webpack_require__(108); var _getFormInitialValues2 = _interopRequireDefault(_getFormInitialValues); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _getFormInitialValues2.default)(_plain2.default); /***/ }), /* 108 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createGetFormInitialValues = function createGetFormInitialValues(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return getIn(getFormState(state), form + '.initial'); }; }; }; exports.default = createGetFormInitialValues; /***/ }), /* 109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getFormSyncErrors = __webpack_require__(110); var _getFormSyncErrors2 = _interopRequireDefault(_getFormSyncErrors); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _getFormSyncErrors2.default)(_plain2.default); /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return getIn(getFormState(state), form + '.syncErrors'); }; }; }; exports.default = createGetFormSyncErrors; /***/ }), /* 111 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getFormMeta = __webpack_require__(112); var _getFormMeta2 = _interopRequireDefault(_getFormMeta); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _getFormMeta2.default)(_plain2.default); /***/ }), /* 112 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createGetFormMeta = function createGetFormMeta(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return getIn(getFormState(state), form + '.fields'); }; }; }; exports.default = createGetFormMeta; /***/ }), /* 113 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getFormAsyncErrors = __webpack_require__(114); var _getFormAsyncErrors2 = _interopRequireDefault(_getFormAsyncErrors); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _getFormAsyncErrors2.default)(_plain2.default); /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return getIn(getFormState(state), form + '.asyncErrors'); }; }; }; exports.default = createGetFormAsyncErrors; /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getFormSyncWarnings = __webpack_require__(116); var _getFormSyncWarnings2 = _interopRequireDefault(_getFormSyncWarnings); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _getFormSyncWarnings2.default)(_plain2.default); /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createGetFormSyncWarnings = function createGetFormSyncWarnings(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return getIn(getFormState(state), form + '.syncWarnings'); }; }; }; exports.default = createGetFormSyncWarnings; /***/ }), /* 117 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getFormSubmitErrors = __webpack_require__(118); var _getFormSubmitErrors2 = _interopRequireDefault(_getFormSubmitErrors); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _getFormSubmitErrors2.default)(_plain2.default); /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return getIn(getFormState(state), form + '.submitErrors'); }; }; }; exports.default = createGetFormSubmitErrors; /***/ }), /* 119 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isDirty = __webpack_require__(120); var _isDirty2 = _interopRequireDefault(_isDirty); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _isDirty2.default)(_plain2.default); /***/ }), /* 120 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isPristine = __webpack_require__(36); var _isPristine2 = _interopRequireDefault(_isPristine); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var createIsDirty = function createIsDirty(structure) { return function (form, getFormState) { var isPristine = (0, _isPristine2.default)(structure)(form, getFormState); return function (state) { return !isPristine(state); }; }; }; exports.default = createIsDirty; /***/ }), /* 121 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isInvalid = __webpack_require__(122); var _isInvalid2 = _interopRequireDefault(_isInvalid); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _isInvalid2.default)(_plain2.default); /***/ }), /* 122 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isValid = __webpack_require__(14); var _isValid2 = _interopRequireDefault(_isValid); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var createIsInvalid = function createIsInvalid(structure) { return function (form, getFormState) { var isValid = (0, _isValid2.default)(structure)(form, getFormState); return function (state) { return !isValid(state); }; }; }; exports.default = createIsInvalid; /***/ }), /* 123 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var getErrorKeys = function getErrorKeys(name, type) { switch (type) { case 'Field': return [name, name + '._error']; case 'FieldArray': return [name + '._error']; default: throw new Error('Unknown field type'); } }; var createHasError = function createHasError(_ref) { var getIn = _ref.getIn; var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) { if (!syncErrors && !asyncErrors && !submitErrors) { return false; } var name = getIn(field, 'name'); var type = getIn(field, 'type'); return getErrorKeys(name, type).some(function (key) { return getIn(syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key); }); }; return hasError; }; exports.default = createHasError; /***/ }), /* 124 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isPristine = __webpack_require__(36); var _isPristine2 = _interopRequireDefault(_isPristine); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _isPristine2.default)(_plain2.default); /***/ }), /* 125 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isValid = __webpack_require__(14); var _isValid2 = _interopRequireDefault(_isValid); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _isValid2.default)(_plain2.default); /***/ }), /* 126 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isSubmitting = __webpack_require__(127); var _isSubmitting2 = _interopRequireDefault(_isSubmitting); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _isSubmitting2.default)(_plain2.default); /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createIsSubmitting = function createIsSubmitting(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return !!getIn(getFormState(state), form + '.submitting'); }; }; }; exports.default = createIsSubmitting; /***/ }), /* 128 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _hasSubmitSucceeded = __webpack_require__(129); var _hasSubmitSucceeded2 = _interopRequireDefault(_hasSubmitSucceeded); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _hasSubmitSucceeded2.default)(_plain2.default); /***/ }), /* 129 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return !!getIn(getFormState(state), form + '.submitSucceeded'); }; }; }; exports.default = createHasSubmitSucceeded; /***/ }), /* 130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _hasSubmitFailed = __webpack_require__(131); var _hasSubmitFailed2 = _interopRequireDefault(_hasSubmitFailed); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _hasSubmitFailed2.default)(_plain2.default); /***/ }), /* 131 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var createHasSubmitFailed = function createHasSubmitFailed(_ref) { var getIn = _ref.getIn; return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); }; return function (state) { return !!getIn(getFormState(state), form + '.submitFailed'); }; }; }; exports.default = createHasSubmitFailed; /***/ }), /* 132 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createReduxForm = __webpack_require__(133); var _createReduxForm2 = _interopRequireDefault(_createReduxForm); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _createReduxForm2.default)(_plain2.default); /***/ }), /* 133 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _merge4 = __webpack_require__(134); var _merge5 = _interopRequireDefault(_merge4); var _mapValues2 = __webpack_require__(33); var _mapValues3 = _interopRequireDefault(_mapValues2); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _hoistNonReactStatics = __webpack_require__(162); var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); var _isPromise = __webpack_require__(15); var _isPromise2 = _interopRequireDefault(_isPromise); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _react = __webpack_require__(2); var _reactRedux = __webpack_require__(3); var _redux = __webpack_require__(35); var _actions = __webpack_require__(43); var _actions2 = _interopRequireDefault(_actions); var _asyncValidation = __webpack_require__(163); var _asyncValidation2 = _interopRequireDefault(_asyncValidation); var _defaultShouldAsyncValidate = __webpack_require__(17); var _defaultShouldAsyncValidate2 = _interopRequireDefault(_defaultShouldAsyncValidate); var _defaultShouldValidate = __webpack_require__(18); var _defaultShouldValidate2 = _interopRequireDefault(_defaultShouldValidate); var _silenceEvent = __webpack_require__(44); var _silenceEvent2 = _interopRequireDefault(_silenceEvent); var _silenceEvents = __webpack_require__(164); var _silenceEvents2 = _interopRequireDefault(_silenceEvents); var _generateValidator = __webpack_require__(165); var _generateValidator2 = _interopRequireDefault(_generateValidator); var _handleSubmit = __webpack_require__(166); var _handleSubmit2 = _interopRequireDefault(_handleSubmit); var _isValid = __webpack_require__(14); var _isValid2 = _interopRequireDefault(_isValid); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); var _getDisplayName = __webpack_require__(167); var _getDisplayName2 = _interopRequireDefault(_getDisplayName); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var isClassComponent = function isClassComponent(Component) { return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object'); }; // extract field-specific actions var arrayInsert = _actions2.default.arrayInsert, arrayMove = _actions2.default.arrayMove, arrayPop = _actions2.default.arrayPop, arrayPush = _actions2.default.arrayPush, arrayRemove = _actions2.default.arrayRemove, arrayRemoveAll = _actions2.default.arrayRemoveAll, arrayShift = _actions2.default.arrayShift, arraySplice = _actions2.default.arraySplice, arraySwap = _actions2.default.arraySwap, arrayUnshift = _actions2.default.arrayUnshift, blur = _actions2.default.blur, change = _actions2.default.change, focus = _actions2.default.focus, formActions = _objectWithoutProperties(_actions2.default, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']); var arrayActions = { arrayInsert: arrayInsert, arrayMove: arrayMove, arrayPop: arrayPop, arrayPush: arrayPush, arrayRemove: arrayRemove, arrayRemoveAll: arrayRemoveAll, arrayShift: arrayShift, arraySplice: arraySplice, arraySwap: arraySwap, arrayUnshift: arrayUnshift }; var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(_actions2.default)), ['array', 'asyncErrors', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']); var checkSubmit = function checkSubmit(submit) { if (!submit || typeof submit !== 'function') { throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop'); } return submit; }; /** * The decorator that is the main API to redux-form */ var createReduxForm = function createReduxForm(structure) { var deepEqual = structure.deepEqual, empty = structure.empty, getIn = structure.getIn, setIn = structure.setIn, keys = structure.keys, fromJS = structure.fromJS; var isValid = (0, _isValid2.default)(structure); return function (initialConfig) { var config = _extends({ touchOnBlur: true, touchOnChange: false, persistentSubmitErrors: false, destroyOnUnmount: true, shouldAsyncValidate: _defaultShouldAsyncValidate2.default, shouldValidate: _defaultShouldValidate2.default, enableReinitialize: false, keepDirtyOnReinitialize: false, getFormState: function getFormState(state) { return getIn(state, 'form'); }, pure: true, forceUnregisterOnUnmount: false }, initialConfig); return function (WrappedComponent) { var Form = function (_Component) { _inherits(Form, _Component); function Form() { var _ref; var _temp, _this, _ret; _classCallCheck(this, Form); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Form.__proto__ || Object.getPrototypeOf(Form)).call.apply(_ref, [this].concat(args))), _this), _this.destroyed = false, _this.fieldValidators = {}, _this.lastFieldValidatorKeys = [], _this.fieldWarners = {}, _this.lastFieldWarnerKeys = [], _this.innerOnSubmit = undefined, _this.submitPromise = undefined, _this.getValues = function () { return _this.props.values; }, _this.isValid = function () { return _this.props.valid; }, _this.isPristine = function () { return _this.props.pristine; }, _this.register = function (name, type, getValidator, getWarner) { _this.props.registerField(name, type); if (getValidator) { _this.fieldValidators[name] = getValidator; } if (getWarner) { _this.fieldWarners[name] = getWarner; } }, _this.unregister = function (name) { if (!_this.destroyed) { if (_this.props.destroyOnUnmount || _this.props.forceUnregisterOnUnmount) { _this.props.unregisterField(name); delete _this.fieldValidators[name]; delete _this.fieldWarners[name]; } else { _this.props.unregisterField(name, false); } } }, _this.getFieldList = function (options) { var registeredFields = _this.props.registeredFields; var list = []; if (!registeredFields) { return list; } var keySeq = keys(registeredFields); if (options && options.excludeFieldArray) { keySeq = keySeq.filter(function (name) { return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray'; }); } return fromJS(keySeq.reduce(function (acc, key) { acc.push(key); return acc; }, list)); }, _this.getValidators = function () { var validators = {}; Object.keys(_this.fieldValidators).forEach(function (name) { var validator = _this.fieldValidators[name](); if (validator) { validators[name] = validator; } }); return validators; }, _this.generateValidator = function () { var validators = _this.getValidators(); return Object.keys(validators).length ? (0, _generateValidator2.default)(validators, structure) : undefined; }, _this.getWarners = function () { var warners = {}; Object.keys(_this.fieldWarners).forEach(function (name) { var warner = _this.fieldWarners[name](); if (warner) { warners[name] = warner; } }); return warners; }, _this.generateWarner = function () { var warners = _this.getWarners(); return Object.keys(warners).length ? (0, _generateValidator2.default)(warners, structure) : undefined; }, _this.asyncValidate = function (name, value) { var _this$props = _this.props, asyncBlurFields = _this$props.asyncBlurFields, asyncErrors = _this$props.asyncErrors, asyncValidate = _this$props.asyncValidate, dispatch = _this$props.dispatch, initialized = _this$props.initialized, pristine = _this$props.pristine, shouldAsyncValidate = _this$props.shouldAsyncValidate, startAsyncValidation = _this$props.startAsyncValidation, stopAsyncValidation = _this$props.stopAsyncValidation, syncErrors = _this$props.syncErrors, values = _this$props.values; var submitting = !name; if (asyncValidate) { var valuesToValidate = submitting ? values : setIn(values, name, value); var syncValidationPasses = submitting || !getIn(syncErrors, name); var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]'))); if ((isBlurredField || submitting) && shouldAsyncValidate({ asyncErrors: asyncErrors, initialized: initialized, trigger: submitting ? 'submit' : 'blur', blurredField: name, pristine: pristine, syncValidationPasses: syncValidationPasses })) { return (0, _asyncValidation2.default)(function () { return asyncValidate(valuesToValidate, dispatch, _this.props, name); }, startAsyncValidation, stopAsyncValidation, name); } } }, _this.submitCompleted = function (result) { delete _this.submitPromise; return result; }, _this.submitFailed = function (error) { delete _this.submitPromise; throw error; }, _this.listenToSubmit = function (promise) { if (!(0, _isPromise2.default)(promise)) { return promise; } _this.submitPromise = promise; return promise.then(_this.submitCompleted, _this.submitFailed); }, _this.submit = function (submitOrEvent) { var _this$props2 = _this.props, onSubmit = _this$props2.onSubmit, blur = _this$props2.blur, change = _this$props2.change, dispatch = _this$props2.dispatch; if (!submitOrEvent || (0, _silenceEvent2.default)(submitOrEvent)) { // submitOrEvent is an event: fire submit if not already submitting if (!_this.submitPromise) { // avoid recursive stack trace if use Form with onSubmit as handleSubmit if (_this.innerOnSubmit && _this.innerOnSubmit !== _this.submit) { // will call "submitOrEvent is the submit function" block below return _this.innerOnSubmit(); } else { return _this.listenToSubmit((0, _handleSubmit2.default)(checkSubmit(onSubmit), _extends({}, _this.props, (0, _redux.bindActionCreators)({ blur: blur, change: change }, dispatch)), _this.props.validExceptSubmit, _this.asyncValidate, _this.getFieldList({ excludeFieldArray: true }))); } } } else { // submitOrEvent is the submit function: return deferred submit thunk return (0, _silenceEvents2.default)(function () { return !_this.submitPromise && _this.listenToSubmit((0, _handleSubmit2.default)(checkSubmit(submitOrEvent), _extends({}, _this.props, (0, _redux.bindActionCreators)({ blur: blur, change: change }, dispatch)), _this.props.validExceptSubmit, _this.asyncValidate, _this.getFieldList({ excludeFieldArray: true }))); }); } }, _this.reset = function () { return _this.props.reset(); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Form, [{ key: 'getChildContext', value: function getChildContext() { var _this2 = this; return { _reduxForm: _extends({}, this.props, { getFormState: function getFormState(state) { return getIn(_this2.props.getFormState(state), _this2.props.form); }, asyncValidate: this.asyncValidate, getValues: this.getValues, sectionPrefix: undefined, register: this.register, unregister: this.unregister, registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) { return _this2.innerOnSubmit = innerOnSubmit; } }) }; } }, { key: 'initIfNeeded', value: function initIfNeeded(nextProps) { var enableReinitialize = this.props.enableReinitialize; if (nextProps) { if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) { var _keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize; this.props.initialize(nextProps.initialValues, _keepDirty, { lastInitialValues: this.props.initialValues }); } } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) { this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize); } } }, { key: 'updateSyncErrorsIfNeeded', value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError, lastSyncErrors) { var _props = this.props, error = _props.error, updateSyncErrors = _props.updateSyncErrors; var noErrors = (!lastSyncErrors || !Object.keys(lastSyncErrors).length) && !error; var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError; if (!(noErrors && nextNoErrors) && (!_plain2.default.deepEqual(lastSyncErrors, nextSyncErrors) || !_plain2.default.deepEqual(error, nextError))) { updateSyncErrors(nextSyncErrors, nextError); } } }, { key: 'clearSubmitPromiseIfNeeded', value: function clearSubmitPromiseIfNeeded(nextProps) { var submitting = this.props.submitting; if (this.submitPromise && submitting && !nextProps.submitting) { delete this.submitPromise; } } }, { key: 'submitIfNeeded', value: function submitIfNeeded(nextProps) { var _props2 = this.props, clearSubmit = _props2.clearSubmit, triggerSubmit = _props2.triggerSubmit; if (!triggerSubmit && nextProps.triggerSubmit) { clearSubmit(); this.submit(); } } }, { key: 'validateIfNeeded', value: function validateIfNeeded(nextProps) { var _props3 = this.props, shouldValidate = _props3.shouldValidate, validate = _props3.validate, values = _props3.values; var fieldLevelValidate = this.generateValidator(); if (validate || fieldLevelValidate) { var initialRender = nextProps === undefined; var fieldValidatorKeys = Object.keys(this.getValidators()); var shouldValidateResult = shouldValidate({ values: values, nextProps: nextProps, props: this.props, initialRender: initialRender, lastFieldValidatorKeys: this.lastFieldValidatorKeys, fieldValidatorKeys: fieldValidatorKeys, structure: structure }); if (shouldValidateResult) { var propsToValidate = initialRender || !nextProps ? this.props : nextProps; var _merge2 = (0, _merge5.default)(validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}), _error = _merge2._error, nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']); this.lastFieldValidatorKeys = fieldValidatorKeys; this.updateSyncErrorsIfNeeded(nextSyncErrors, _error, propsToValidate.syncErrors); } } } }, { key: 'updateSyncWarningsIfNeeded', value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning, lastSyncWarnings) { var _props4 = this.props, warning = _props4.warning, syncWarnings = _props4.syncWarnings, updateSyncWarnings = _props4.updateSyncWarnings; var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning; var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning; if (!(noWarnings && nextNoWarnings) && (!_plain2.default.deepEqual(lastSyncWarnings, nextSyncWarnings) || !_plain2.default.deepEqual(warning, nextWarning))) { updateSyncWarnings(nextSyncWarnings, nextWarning); } } }, { key: 'warnIfNeeded', value: function warnIfNeeded(nextProps) { var _props5 = this.props, shouldValidate = _props5.shouldValidate, warn = _props5.warn, values = _props5.values; var fieldLevelWarn = this.generateWarner(); if (warn || fieldLevelWarn) { var initialRender = nextProps === undefined; var fieldWarnerKeys = Object.keys(this.getWarners()); var shouldWarnResult = shouldValidate({ values: values, nextProps: nextProps, props: this.props, initialRender: initialRender, lastFieldValidatorKeys: this.lastFieldWarnerKeys, fieldValidatorKeys: fieldWarnerKeys, structure: structure }); if (shouldWarnResult) { var propsToWarn = initialRender || !nextProps ? this.props : nextProps; var _merge3 = (0, _merge5.default)(warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}), _warning = _merge3._warning, nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']); this.lastFieldWarnerKeys = fieldWarnerKeys; this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning, propsToWarn.syncWarnings); } } } }, { key: 'componentWillMount', value: function componentWillMount() { this.initIfNeeded(); this.validateIfNeeded(); this.warnIfNeeded(); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { this.initIfNeeded(nextProps); this.validateIfNeeded(nextProps); this.warnIfNeeded(nextProps); this.clearSubmitPromiseIfNeeded(nextProps); this.submitIfNeeded(nextProps); var onChange = nextProps.onChange, values = nextProps.values, dispatch = nextProps.dispatch; if (onChange && !deepEqual(values, this.props.values)) { onChange(values, dispatch, nextProps); } } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { var _this3 = this; if (!this.props.pure) return true; var _config$immutableProp = config.immutableProps, immutableProps = _config$immutableProp === undefined ? [] : _config$immutableProp; return Object.keys(nextProps).some(function (prop) { // useful to debug rerenders // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) // } if (~immutableProps.indexOf(prop)) { return _this3.props[prop] !== nextProps[prop]; } return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); }); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { var _props6 = this.props, destroyOnUnmount = _props6.destroyOnUnmount, destroy = _props6.destroy; if (destroyOnUnmount) { this.destroyed = true; destroy(); } } }, { key: 'render', value: function render() { // remove some redux-form config-only props /* eslint-disable no-unused-vars */ var _props7 = this.props, anyTouched = _props7.anyTouched, arrayInsert = _props7.arrayInsert, arrayMove = _props7.arrayMove, arrayPop = _props7.arrayPop, arrayPush = _props7.arrayPush, arrayRemove = _props7.arrayRemove, arrayRemoveAll = _props7.arrayRemoveAll, arrayShift = _props7.arrayShift, arraySplice = _props7.arraySplice, arraySwap = _props7.arraySwap, arrayUnshift = _props7.arrayUnshift, asyncErrors = _props7.asyncErrors, asyncValidate = _props7.asyncValidate, asyncValidating = _props7.asyncValidating, blur = _props7.blur, change = _props7.change, clearSubmit = _props7.clearSubmit, destroy = _props7.destroy, destroyOnUnmount = _props7.destroyOnUnmount, forceUnregisterOnUnmount = _props7.forceUnregisterOnUnmount, dirty = _props7.dirty, dispatch = _props7.dispatch, enableReinitialize = _props7.enableReinitialize, error = _props7.error, focus = _props7.focus, form = _props7.form, getFormState = _props7.getFormState, initialize = _props7.initialize, initialized = _props7.initialized, initialValues = _props7.initialValues, invalid = _props7.invalid, keepDirtyOnReinitialize = _props7.keepDirtyOnReinitialize, pristine = _props7.pristine, propNamespace = _props7.propNamespace, registeredFields = _props7.registeredFields, registerField = _props7.registerField, reset = _props7.reset, setSubmitFailed = _props7.setSubmitFailed, setSubmitSucceeded = _props7.setSubmitSucceeded, shouldAsyncValidate = _props7.shouldAsyncValidate, shouldValidate = _props7.shouldValidate, startAsyncValidation = _props7.startAsyncValidation, startSubmit = _props7.startSubmit, stopAsyncValidation = _props7.stopAsyncValidation, stopSubmit = _props7.stopSubmit, submitting = _props7.submitting, submitFailed = _props7.submitFailed, submitSucceeded = _props7.submitSucceeded, touch = _props7.touch, touchOnBlur = _props7.touchOnBlur, touchOnChange = _props7.touchOnChange, persistentSubmitErrors = _props7.persistentSubmitErrors, syncErrors = _props7.syncErrors, syncWarnings = _props7.syncWarnings, unregisterField = _props7.unregisterField, untouch = _props7.untouch, updateSyncErrors = _props7.updateSyncErrors, updateSyncWarnings = _props7.updateSyncWarnings, valid = _props7.valid, validExceptSubmit = _props7.validExceptSubmit, values = _props7.values, warning = _props7.warning, rest = _objectWithoutProperties(_props7, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'clearSubmit', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']); /* eslint-enable no-unused-vars */ var reduxFormProps = _extends({ anyTouched: anyTouched, asyncValidate: this.asyncValidate, asyncValidating: asyncValidating }, (0, _redux.bindActionCreators)({ blur: blur, change: change }, dispatch), { clearSubmit: clearSubmit, destroy: destroy, dirty: dirty, dispatch: dispatch, error: error, form: form, handleSubmit: this.submit, initialize: initialize, initialized: initialized, initialValues: initialValues, invalid: invalid, pristine: pristine, reset: reset, submitting: submitting, submitFailed: submitFailed, submitSucceeded: submitSucceeded, touch: touch, untouch: untouch, valid: valid, warning: warning }); var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest); if (isClassComponent(WrappedComponent)) { propsToPass.ref = 'wrapped'; } return (0, _react.createElement)(WrappedComponent, propsToPass); } }]); return Form; }(_react.Component); Form.displayName = 'Form(' + (0, _getDisplayName2.default)(WrappedComponent) + ')'; Form.WrappedComponent = WrappedComponent; Form.childContextTypes = { _reduxForm: _propTypes2.default.object.isRequired }; Form.propTypes = { destroyOnUnmount: _propTypes2.default.bool, forceUnregisterOnUnmount: _propTypes2.default.bool, form: _propTypes2.default.string.isRequired, initialValues: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.object]), getFormState: _propTypes2.default.func, onSubmitFail: _propTypes2.default.func, onSubmitSuccess: _propTypes2.default.func, propNamespace: _propTypes2.default.string, validate: _propTypes2.default.func, warn: _propTypes2.default.func, touchOnBlur: _propTypes2.default.bool, touchOnChange: _propTypes2.default.bool, triggerSubmit: _propTypes2.default.bool, persistentSubmitErrors: _propTypes2.default.bool, registeredFields: _propTypes2.default.any }; var connector = (0, _reactRedux.connect)(function (state, props) { var form = props.form, getFormState = props.getFormState, initialValues = props.initialValues, enableReinitialize = props.enableReinitialize, keepDirtyOnReinitialize = props.keepDirtyOnReinitialize; var formState = getIn(getFormState(state) || empty, form) || empty; var stateInitial = getIn(formState, 'initial'); var initialized = !!stateInitial; var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial); var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize; var initial = initialValues || stateInitial || empty; if (shouldUpdateInitialValues) { initial = stateInitial || empty; } var values = getIn(formState, 'values') || initial; if (shouldResetValues) { values = initial; } var pristine = shouldResetValues || deepEqual(initial, values); var asyncErrors = getIn(formState, 'asyncErrors'); var syncErrors = getIn(formState, 'syncErrors') || empty; var syncWarnings = getIn(formState, 'syncWarnings') || empty; var registeredFields = getIn(formState, 'registeredFields'); var valid = isValid(form, getFormState, false)(state); var validExceptSubmit = isValid(form, getFormState, true)(state); var anyTouched = !!getIn(formState, 'anyTouched'); var submitting = !!getIn(formState, 'submitting'); var submitFailed = !!getIn(formState, 'submitFailed'); var submitSucceeded = !!getIn(formState, 'submitSucceeded'); var error = getIn(formState, 'error'); var warning = getIn(formState, 'warning'); var triggerSubmit = getIn(formState, 'triggerSubmit'); return { anyTouched: anyTouched, asyncErrors: asyncErrors, asyncValidating: getIn(formState, 'asyncValidating') || false, dirty: !pristine, error: error, initialized: initialized, invalid: !valid, pristine: pristine, registeredFields: registeredFields, submitting: submitting, submitFailed: submitFailed, submitSucceeded: submitSucceeded, syncErrors: syncErrors, syncWarnings: syncWarnings, triggerSubmit: triggerSubmit, values: values, valid: valid, validExceptSubmit: validExceptSubmit, warning: warning }; }, function (dispatch, initialProps) { var bindForm = function bindForm(actionCreator) { return actionCreator.bind(null, initialProps.form); }; // Bind the first parameter on `props.form` var boundFormACs = (0, _mapValues3.default)(formActions, bindForm); var boundArrayACs = (0, _mapValues3.default)(arrayActions, bindForm); var boundBlur = function boundBlur(field, value) { return blur(initialProps.form, field, value, !!initialProps.touchOnBlur); }; var boundChange = function boundChange(field, value) { return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors); }; var boundFocus = bindForm(focus); // Wrap action creators with `dispatch` var connectedFormACs = (0, _redux.bindActionCreators)(boundFormACs, dispatch); var connectedArrayACs = { insert: (0, _redux.bindActionCreators)(boundArrayACs.arrayInsert, dispatch), move: (0, _redux.bindActionCreators)(boundArrayACs.arrayMove, dispatch), pop: (0, _redux.bindActionCreators)(boundArrayACs.arrayPop, dispatch), push: (0, _redux.bindActionCreators)(boundArrayACs.arrayPush, dispatch), remove: (0, _redux.bindActionCreators)(boundArrayACs.arrayRemove, dispatch), removeAll: (0, _redux.bindActionCreators)(boundArrayACs.arrayRemoveAll, dispatch), shift: (0, _redux.bindActionCreators)(boundArrayACs.arrayShift, dispatch), splice: (0, _redux.bindActionCreators)(boundArrayACs.arraySplice, dispatch), swap: (0, _redux.bindActionCreators)(boundArrayACs.arraySwap, dispatch), unshift: (0, _redux.bindActionCreators)(boundArrayACs.arrayUnshift, dispatch) }; var computedActions = _extends({}, connectedFormACs, boundArrayACs, { blur: boundBlur, change: boundChange, array: connectedArrayACs, focus: boundFocus, dispatch: dispatch }); return function () { return computedActions; }; }, undefined, { withRef: true }); var ConnectedForm = (0, _hoistNonReactStatics2.default)(connector(Form), WrappedComponent); ConnectedForm.defaultProps = config; // build outer component to expose instance api return function (_Component2) { _inherits(ReduxForm, _Component2); function ReduxForm() { _classCallCheck(this, ReduxForm); return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments)); } _createClass(ReduxForm, [{ key: 'submit', value: function submit() { return this.refs.wrapped.getWrappedInstance().submit(); } }, { key: 'reset', value: function reset() { return this.refs.wrapped.getWrappedInstance().reset(); } }, { key: 'render', value: function render() { var _props8 = this.props, initialValues = _props8.initialValues, rest = _objectWithoutProperties(_props8, ['initialValues']); return (0, _react.createElement)(ConnectedForm, _extends({}, rest, { ref: 'wrapped', // convert initialValues if need to initialValues: fromJS(initialValues) })); } }, { key: 'valid', get: function get() { return this.refs.wrapped.getWrappedInstance().isValid(); } }, { key: 'invalid', get: function get() { return !this.valid; } }, { key: 'pristine', get: function get() { return this.refs.wrapped.getWrappedInstance().isPristine(); } }, { key: 'dirty', get: function get() { return !this.pristine; } }, { key: 'values', get: function get() { return this.refs.wrapped.getWrappedInstance().getValues(); } }, { key: 'fieldList', get: function get() { // mainly provided for testing return this.refs.wrapped.getWrappedInstance().getFieldList(); } }, { key: 'wrappedInstance', get: function get() { // for testing return this.refs.wrapped.getWrappedInstance().refs.wrapped; } }]); return ReduxForm; }(_react.Component); }; }; }; exports.default = createReduxForm; /***/ }), /* 134 */ /***/ (function(module, exports, __webpack_require__) { var baseMerge = __webpack_require__(135), createAssigner = __webpack_require__(155); /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); module.exports = merge; /***/ }), /* 135 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(29), assignMergeValue = __webpack_require__(37), baseFor = __webpack_require__(34), baseMergeDeep = __webpack_require__(136), isObject = __webpack_require__(10), keysIn = __webpack_require__(42); /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(object[key], srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } module.exports = baseMerge; /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { var assignMergeValue = __webpack_require__(37), cloneBuffer = __webpack_require__(137), cloneTypedArray = __webpack_require__(141), copyArray = __webpack_require__(27), initCloneObject = __webpack_require__(144), isArguments = __webpack_require__(147), isArray = __webpack_require__(7), isArrayLikeObject = __webpack_require__(148), isBuffer = __webpack_require__(30), isFunction = __webpack_require__(40), isObject = __webpack_require__(10), isPlainObject = __webpack_require__(151), isTypedArray = __webpack_require__(31), toPlainObject = __webpack_require__(152); /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = object[key], srcValue = source[key], stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } assignMergeValue(object, key, newValue); } module.exports = baseMergeDeep; /***/ }), /* 137 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(38); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(138)(module))) /***/ }), /* 138 */ /***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default if(!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function() { return module.i; } }); module.webpackPolyfill = 1; } return module; }; /***/ }), /* 139 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(140))) /***/ }), /* 140 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 141 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(142); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /* 142 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(143); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 143 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(38); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /* 144 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(145), getPrototype = __webpack_require__(39), isPrototype = __webpack_require__(146); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /* 145 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(10); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /* 146 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 147 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 148 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(149), isObjectLike = __webpack_require__(13); /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } module.exports = isArrayLikeObject; /***/ }), /* 149 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(40), isLength = __webpack_require__(150); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 150 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 151 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(41), getPrototype = __webpack_require__(39), isObjectLike = __webpack_require__(13); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(153), keysIn = __webpack_require__(42); /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return copyObject(value, keysIn(value)); } module.exports = toPlainObject; /***/ }), /* 153 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(154), baseAssignValue = __webpack_require__(9); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 154 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(9), eq = __webpack_require__(11); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /* 155 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(156), isIterateeCall = __webpack_require__(161); /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } module.exports = createAssigner; /***/ }), /* 156 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(157), overRest = __webpack_require__(158), setToString = __webpack_require__(160); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ''); } module.exports = baseRest; /***/ }), /* 157 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(159); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } module.exports = overRest; /***/ }), /* 159 */ /***/ (function(module, exports) { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /* 160 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 161 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 162 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, mixins: true, propTypes: true, type: true }; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = getPrototypeOf && getPrototypeOf(Object); module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } for (var key in sourceComponent) { if (!REACT_STATICS[key] && (!blacklist || !blacklist[key])) { if (hasOwnProperty.call(sourceComponent, key)) { try { // Avoid failures from read-only properties targetComponent[key] = sourceComponent[key]; } catch (e) {} } } } if (getOwnPropertySymbols) { var symbols = getOwnPropertySymbols(sourceComponent); for (var i = 0; i < symbols.length; i++) { if (!REACT_STATICS[symbols[i]] && (!blacklist || !blacklist[symbols[i]])) { if (propIsEnumerable.call(sourceComponent, symbols[i])) { try { // Avoid failures from read-only properties targetComponent[symbols[i]] = sourceComponent[symbols[i]]; } catch(e) {} } } } } return targetComponent; } return targetComponent; }; /***/ }), /* 163 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isPromise = __webpack_require__(15); var _isPromise2 = _interopRequireDefault(_isPromise); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var asyncValidation = function asyncValidation(fn, start, stop, field) { start(field); var promise = fn(); if (!(0, _isPromise2.default)(promise)) { throw new Error('asyncValidate function passed to reduxForm must return a promise'); } var handleErrors = function handleErrors(rejected) { return function (errors) { if (errors && Object.keys(errors).length) { stop(errors); return errors; } else if (rejected) { stop(); throw new Error('Asynchronous validation promise was rejected without errors.'); } stop(); return Promise.resolve(); }; }; return promise.then(handleErrors(false), handleErrors(true)); }; exports.default = asyncValidation; /***/ }), /* 164 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _silenceEvent = __webpack_require__(44); var _silenceEvent2 = _interopRequireDefault(_silenceEvent); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var silenceEvents = function silenceEvents(fn) { return function (event) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return (0, _silenceEvent2.default)(event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args)); }; }; exports.default = silenceEvents; /***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var toArray = function toArray(value) { return Array.isArray(value) ? value : [value]; }; var getError = function getError(value, values, props, validators) { var array = toArray(validators); for (var i = 0; i < array.length; i++) { var error = array[i](value, values, props); if (error) { return error; } } }; var generateValidator = function generateValidator(validators, _ref) { var getIn = _ref.getIn; return function (values, props) { var errors = {}; Object.keys(validators).forEach(function (name) { var value = getIn(values, name); var error = getError(value, values, props, validators[name]); if (error) { errors = _plain2.default.setIn(errors, name, error); } }); return errors; }; }; exports.default = generateValidator; /***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isPromise = __webpack_require__(15); var _isPromise2 = _interopRequireDefault(_isPromise); var _SubmissionError = __webpack_require__(23); var _SubmissionError2 = _interopRequireDefault(_SubmissionError); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) { var dispatch = props.dispatch, onSubmitFail = props.onSubmitFail, onSubmitSuccess = props.onSubmitSuccess, startSubmit = props.startSubmit, stopSubmit = props.stopSubmit, setSubmitFailed = props.setSubmitFailed, setSubmitSucceeded = props.setSubmitSucceeded, syncErrors = props.syncErrors, touch = props.touch, values = props.values, persistentSubmitErrors = props.persistentSubmitErrors; touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched if (valid || persistentSubmitErrors) { var doSubmit = function doSubmit() { var result = void 0; try { result = submit(values, dispatch, props); } catch (submitError) { var error = submitError instanceof _SubmissionError2.default ? submitError.errors : undefined; stopSubmit(error); setSubmitFailed.apply(undefined, _toConsumableArray(fields)); if (onSubmitFail) { onSubmitFail(error, dispatch, submitError, props); } if (error || onSubmitFail) { // if you've provided an onSubmitFail callback, don't re-throw the error return error; } else { throw submitError; } } if ((0, _isPromise2.default)(result)) { startSubmit(); return result.then(function (submitResult) { stopSubmit(); setSubmitSucceeded(); if (onSubmitSuccess) { onSubmitSuccess(submitResult, dispatch, props); } return submitResult; }, function (submitError) { var error = submitError instanceof _SubmissionError2.default ? submitError.errors : undefined; stopSubmit(error); setSubmitFailed.apply(undefined, _toConsumableArray(fields)); if (onSubmitFail) { onSubmitFail(error, dispatch, submitError, props); } if (error || onSubmitFail) { // if you've provided an onSubmitFail callback, don't re-throw the error return error; } else { throw submitError; } }); } else { setSubmitSucceeded(); if (onSubmitSuccess) { onSubmitSuccess(result, dispatch, props); } } return result; }; var asyncValidateResult = asyncValidate && asyncValidate(); if (asyncValidateResult) { return asyncValidateResult.then(function (asyncErrors) { if (asyncErrors) { throw asyncErrors; } return doSubmit(); }).catch(function (asyncErrors) { setSubmitFailed.apply(undefined, _toConsumableArray(fields)); if (onSubmitFail) { onSubmitFail(asyncErrors, dispatch, null, props); } return Promise.reject(asyncErrors); }); } else { return doSubmit(); } } else { setSubmitFailed.apply(undefined, _toConsumableArray(fields)); if (onSubmitFail) { onSubmitFail(syncErrors, dispatch, null, props); } return syncErrors; } }; exports.default = handleSubmit; /***/ }), /* 167 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var getDisplayName = function getDisplayName(Comp) { return Comp.displayName || Comp.name || 'Component'; }; exports.default = getDisplayName; /***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createReducer = __webpack_require__(169); var _createReducer2 = _interopRequireDefault(_createReducer); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _createReducer2.default)(_plain2.default); /***/ }), /* 169 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _actionTypes = __webpack_require__(16); var _deleteInWithCleanUp = __webpack_require__(170); var _deleteInWithCleanUp2 = _interopRequireDefault(_deleteInWithCleanUp); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var isReduxFormAction = function isReduxFormAction(action) { return action && action.type && action.type.length > _actionTypes.prefix.length && action.type.substring(0, _actionTypes.prefix.length) === _actionTypes.prefix; }; function createReducer(structure) { var _behaviors; var deepEqual = structure.deepEqual, empty = structure.empty, forEach = structure.forEach, getIn = structure.getIn, setIn = structure.setIn, deleteIn = structure.deleteIn, fromJS = structure.fromJS, keys = structure.keys, size = structure.size, some = structure.some, splice = structure.splice; var deleteInWithCleanUp = (0, _deleteInWithCleanUp2.default)(structure); var doSplice = function doSplice(state, key, field, index, removeNum, value, force) { var existing = getIn(state, key + '.' + field); return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state; }; var doPlainSplice = function doPlainSplice(state, key, field, index, removeNum, value, force) { var slice = getIn(state, key); var existing = _plain2.default.getIn(slice, field); return existing || force ? setIn(state, key, _plain2.default.setIn(slice, field, _plain2.default.splice(existing, index, removeNum, value))) : state; }; var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors']; var arraySplice = function arraySplice(state, field, index, removeNum, value) { var result = state; var nonValuesValue = value != null ? empty : undefined; result = doSplice(result, 'values', field, index, removeNum, value, true); result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue); result = doPlainSplice(result, 'syncErrors', field, index, removeNum, undefined); result = doPlainSplice(result, 'syncWarnings', field, index, removeNum, undefined); result = doSplice(result, 'submitErrors', field, index, removeNum, undefined); result = doSplice(result, 'asyncErrors', field, index, removeNum, undefined); return result; }; var behaviors = (_behaviors = {}, _defineProperty(_behaviors, _actionTypes.ARRAY_INSERT, function (state, _ref) { var _ref$meta = _ref.meta, field = _ref$meta.field, index = _ref$meta.index, payload = _ref.payload; return arraySplice(state, field, index, 0, payload); }), _defineProperty(_behaviors, _actionTypes.ARRAY_MOVE, function (state, _ref2) { var _ref2$meta = _ref2.meta, field = _ref2$meta.field, from = _ref2$meta.from, to = _ref2$meta.to; var array = getIn(state, 'values.' + field); var length = array ? size(array) : 0; var result = state; if (length) { rootKeys.forEach(function (key) { var path = key + '.' + field; if (getIn(result, path)) { var value = getIn(result, path + '[' + from + ']'); result = setIn(result, path, splice(getIn(result, path), from, 1)); // remove result = setIn(result, path, splice(getIn(result, path), to, 0, value)); // insert } }); } return result; }), _defineProperty(_behaviors, _actionTypes.ARRAY_POP, function (state, _ref3) { var field = _ref3.meta.field; var array = getIn(state, 'values.' + field); var length = array ? size(array) : 0; return length ? arraySplice(state, field, length - 1, 1) : state; }), _defineProperty(_behaviors, _actionTypes.ARRAY_PUSH, function (state, _ref4) { var field = _ref4.meta.field, payload = _ref4.payload; var array = getIn(state, 'values.' + field); var length = array ? size(array) : 0; return arraySplice(state, field, length, 0, payload); }), _defineProperty(_behaviors, _actionTypes.ARRAY_REMOVE, function (state, _ref5) { var _ref5$meta = _ref5.meta, field = _ref5$meta.field, index = _ref5$meta.index; return arraySplice(state, field, index, 1); }), _defineProperty(_behaviors, _actionTypes.ARRAY_REMOVE_ALL, function (state, _ref6) { var field = _ref6.meta.field; var array = getIn(state, 'values.' + field); var length = array ? size(array) : 0; return length ? arraySplice(state, field, 0, length) : state; }), _defineProperty(_behaviors, _actionTypes.ARRAY_SHIFT, function (state, _ref7) { var field = _ref7.meta.field; return arraySplice(state, field, 0, 1); }), _defineProperty(_behaviors, _actionTypes.ARRAY_SPLICE, function (state, _ref8) { var _ref8$meta = _ref8.meta, field = _ref8$meta.field, index = _ref8$meta.index, removeNum = _ref8$meta.removeNum, payload = _ref8.payload; return arraySplice(state, field, index, removeNum, payload); }), _defineProperty(_behaviors, _actionTypes.ARRAY_SWAP, function (state, _ref9) { var _ref9$meta = _ref9.meta, field = _ref9$meta.field, indexA = _ref9$meta.indexA, indexB = _ref9$meta.indexB; var result = state; rootKeys.forEach(function (key) { var valueA = getIn(result, key + '.' + field + '[' + indexA + ']'); var valueB = getIn(result, key + '.' + field + '[' + indexB + ']'); if (valueA !== undefined || valueB !== undefined) { result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB); result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA); } }); return result; }), _defineProperty(_behaviors, _actionTypes.ARRAY_UNSHIFT, function (state, _ref10) { var field = _ref10.meta.field, payload = _ref10.payload; return arraySplice(state, field, 0, 0, payload); }), _defineProperty(_behaviors, _actionTypes.AUTOFILL, function (state, _ref11) { var field = _ref11.meta.field, payload = _ref11.payload; var result = state; result = deleteInWithCleanUp(result, 'asyncErrors.' + field); result = deleteInWithCleanUp(result, 'submitErrors.' + field); result = setIn(result, 'fields.' + field + '.autofilled', true); result = setIn(result, 'values.' + field, payload); return result; }), _defineProperty(_behaviors, _actionTypes.BLUR, function (state, _ref12) { var _ref12$meta = _ref12.meta, field = _ref12$meta.field, touch = _ref12$meta.touch, payload = _ref12.payload; var result = state; var initial = getIn(result, 'initial.' + field); if (initial === undefined && payload === '') { result = deleteInWithCleanUp(result, 'values.' + field); } else if (payload !== undefined) { result = setIn(result, 'values.' + field, payload); } if (field === getIn(result, 'active')) { result = deleteIn(result, 'active'); } result = deleteIn(result, 'fields.' + field + '.active'); if (touch) { result = setIn(result, 'fields.' + field + '.touched', true); result = setIn(result, 'anyTouched', true); } return result; }), _defineProperty(_behaviors, _actionTypes.CHANGE, function (state, _ref13) { var _ref13$meta = _ref13.meta, field = _ref13$meta.field, touch = _ref13$meta.touch, persistentSubmitErrors = _ref13$meta.persistentSubmitErrors, payload = _ref13.payload; var result = state; var initial = getIn(result, 'initial.' + field); if (initial === undefined && payload === '') { result = deleteInWithCleanUp(result, 'values.' + field); } else if (payload !== undefined) { result = setIn(result, 'values.' + field, payload); } result = deleteInWithCleanUp(result, 'asyncErrors.' + field); if (!persistentSubmitErrors) { result = deleteInWithCleanUp(result, 'submitErrors.' + field); } result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled'); if (touch) { result = setIn(result, 'fields.' + field + '.touched', true); result = setIn(result, 'anyTouched', true); } return result; }), _defineProperty(_behaviors, _actionTypes.CLEAR_SUBMIT, function (state) { return deleteIn(state, 'triggerSubmit'); }), _defineProperty(_behaviors, _actionTypes.CLEAR_SUBMIT_ERRORS, function (state) { var result = state; result = deleteInWithCleanUp(result, 'submitErrors'); result = deleteIn(result, 'error'); return result; }), _defineProperty(_behaviors, _actionTypes.CLEAR_ASYNC_ERROR, function (state, _ref14) { var field = _ref14.meta.field; return deleteIn(state, 'asyncErrors.' + field); }), _defineProperty(_behaviors, _actionTypes.FOCUS, function (state, _ref15) { var field = _ref15.meta.field; var result = state; var previouslyActive = getIn(state, 'active'); result = deleteIn(result, 'fields.' + previouslyActive + '.active'); result = setIn(result, 'fields.' + field + '.visited', true); result = setIn(result, 'fields.' + field + '.active', true); result = setIn(result, 'active', field); return result; }), _defineProperty(_behaviors, _actionTypes.INITIALIZE, function (state, _ref16) { var payload = _ref16.payload, _ref16$meta = _ref16.meta, keepDirty = _ref16$meta.keepDirty, keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded; var mapData = fromJS(payload); var result = empty; // clean all field state // persist old warnings, they will get recalculated if the new form values are different from the old values var warning = getIn(state, 'warning'); if (warning) { result = setIn(result, 'warning', warning); } var syncWarnings = getIn(state, 'syncWarnings'); if (syncWarnings) { result = setIn(result, 'syncWarnings', syncWarnings); } // persist old errors, they will get recalculated if the new form values are different from the old values var error = getIn(state, 'error'); if (error) { result = setIn(result, 'error', error); } var syncErrors = getIn(state, 'syncErrors'); if (syncErrors) { result = setIn(result, 'syncErrors', syncErrors); } var registeredFields = getIn(state, 'registeredFields'); if (registeredFields) { result = setIn(result, 'registeredFields', registeredFields); } var previousValues = getIn(state, 'values'); var previousInitialValues = getIn(state, 'initial'); var newInitialValues = mapData; var newValues = previousValues; if (keepDirty && registeredFields) { if (!deepEqual(newInitialValues, previousInitialValues)) { // // Keep the value of dirty fields while updating the value of // pristine fields. This way, apps can reinitialize forms while // avoiding stomping on user edits. // // Note 1: The initialize action replaces all initial values // regardless of keepDirty. // // Note 2: When a field is dirty, keepDirty is enabled, and the field // value is the same as the new initial value for the field, the // initialize action causes the field to become pristine. That effect // is what we want. // forEach(keys(registeredFields), function (name) { var previousInitialValue = getIn(previousInitialValues, name); var previousValue = getIn(previousValues, name); if (deepEqual(previousValue, previousInitialValue)) { // Overwrite the old pristine value with the new pristine value var newInitialValue = getIn(newInitialValues, name); // This check prevents any 'setIn' call that would create useless // nested objects, since the path to the new field value would // evaluate to the same (especially for undefined values) if (getIn(newValues, name) !== newInitialValue) { newValues = setIn(newValues, name, newInitialValue); } } }); forEach(keys(newInitialValues), function (name) { var previousInitialValue = getIn(previousInitialValues, name); if (typeof previousInitialValue === 'undefined') { // Add new values at the root level. var newInitialValue = getIn(newInitialValues, name); newValues = setIn(newValues, name, newInitialValue); } }); } } else { newValues = newInitialValues; } if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) { result = setIn(result, 'submitSucceeded', true); } result = setIn(result, 'values', newValues); result = setIn(result, 'initial', newInitialValues); return result; }), _defineProperty(_behaviors, _actionTypes.REGISTER_FIELD, function (state, _ref17) { var _ref17$payload = _ref17.payload, name = _ref17$payload.name, type = _ref17$payload.type; var key = 'registeredFields[\'' + name + '\']'; var field = getIn(state, key); if (field) { var count = getIn(field, 'count') + 1; field = setIn(field, 'count', count); } else { field = fromJS({ name: name, type: type, count: 1 }); } return setIn(state, key, field); }), _defineProperty(_behaviors, _actionTypes.RESET, function (state) { var result = empty; var registeredFields = getIn(state, 'registeredFields'); if (registeredFields) { result = setIn(result, 'registeredFields', registeredFields); } var values = getIn(state, 'initial'); if (values) { result = setIn(result, 'values', values); result = setIn(result, 'initial', values); } return result; }), _defineProperty(_behaviors, _actionTypes.SUBMIT, function (state) { return setIn(state, 'triggerSubmit', true); }), _defineProperty(_behaviors, _actionTypes.START_ASYNC_VALIDATION, function (state, _ref18) { var field = _ref18.meta.field; return setIn(state, 'asyncValidating', field || true); }), _defineProperty(_behaviors, _actionTypes.START_SUBMIT, function (state) { return setIn(state, 'submitting', true); }), _defineProperty(_behaviors, _actionTypes.STOP_ASYNC_VALIDATION, function (state, _ref19) { var payload = _ref19.payload; var result = state; result = deleteIn(result, 'asyncValidating'); if (payload && Object.keys(payload).length) { var _error = payload._error, fieldErrors = _objectWithoutProperties(payload, ['_error']); if (_error) { result = setIn(result, 'error', _error); } if (Object.keys(fieldErrors).length) { result = setIn(result, 'asyncErrors', fromJS(fieldErrors)); } } else { result = deleteIn(result, 'error'); } return result; }), _defineProperty(_behaviors, _actionTypes.STOP_SUBMIT, function (state, _ref20) { var payload = _ref20.payload; var result = state; result = deleteIn(result, 'submitting'); result = deleteIn(result, 'submitFailed'); result = deleteIn(result, 'submitSucceeded'); if (payload && Object.keys(payload).length) { var _error = payload._error, fieldErrors = _objectWithoutProperties(payload, ['_error']); if (_error) { result = setIn(result, 'error', _error); } else { result = deleteIn(result, 'error'); } if (Object.keys(fieldErrors).length) { result = setIn(result, 'submitErrors', fromJS(fieldErrors)); } else { result = deleteIn(result, 'submitErrors'); } result = setIn(result, 'submitFailed', true); } else { result = setIn(result, 'submitSucceeded', true); result = deleteIn(result, 'error'); result = deleteIn(result, 'submitErrors'); } return result; }), _defineProperty(_behaviors, _actionTypes.SET_SUBMIT_FAILED, function (state, _ref21) { var fields = _ref21.meta.fields; var result = state; result = setIn(result, 'submitFailed', true); result = deleteIn(result, 'submitSucceeded'); result = deleteIn(result, 'submitting'); fields.forEach(function (field) { return result = setIn(result, 'fields.' + field + '.touched', true); }); if (fields.length) { result = setIn(result, 'anyTouched', true); } return result; }), _defineProperty(_behaviors, _actionTypes.SET_SUBMIT_SUCCEEDED, function (state) { var result = state; result = deleteIn(result, 'submitFailed'); result = setIn(result, 'submitSucceeded', true); return result; }), _defineProperty(_behaviors, _actionTypes.TOUCH, function (state, _ref22) { var fields = _ref22.meta.fields; var result = state; fields.forEach(function (field) { return result = setIn(result, 'fields.' + field + '.touched', true); }); result = setIn(result, 'anyTouched', true); return result; }), _defineProperty(_behaviors, _actionTypes.UNREGISTER_FIELD, function (state, _ref23) { var _ref23$payload = _ref23.payload, name = _ref23$payload.name, destroyOnUnmount = _ref23$payload.destroyOnUnmount; var result = state; var key = 'registeredFields[\'' + name + '\']'; var field = getIn(result, key); if (!field) { return result; } var count = getIn(field, 'count') - 1; if (count <= 0 && destroyOnUnmount) { // Note: Cannot use deleteWithCleanUp here because of the flat nature of registeredFields result = deleteIn(result, key); if (deepEqual(getIn(result, 'registeredFields'), empty)) { result = deleteIn(result, 'registeredFields'); } result = deleteInWithCleanUp(result, 'syncErrors.' + name); result = deleteInWithCleanUp(result, 'submitErrors.' + name); result = deleteInWithCleanUp(result, 'asyncErrors.' + name); result = deleteInWithCleanUp(result, 'syncWarnings.' + name); } else { field = setIn(field, 'count', count); result = setIn(result, key, field); } return result; }), _defineProperty(_behaviors, _actionTypes.UNTOUCH, function (state, _ref24) { var fields = _ref24.meta.fields; var result = state; fields.forEach(function (field) { return result = deleteIn(result, 'fields.' + field + '.touched'); }); var anyTouched = some(keys(getIn(result, 'registeredFields')), function (key) { return getIn(result, 'fields.' + key + '.touched'); }); result = anyTouched ? setIn(result, 'anyTouched', true) : deleteIn(result, 'anyTouched'); return result; }), _defineProperty(_behaviors, _actionTypes.UPDATE_SYNC_ERRORS, function (state, _ref25) { var _ref25$payload = _ref25.payload, syncErrors = _ref25$payload.syncErrors, error = _ref25$payload.error; var result = state; if (error) { result = setIn(result, 'error', error); result = setIn(result, 'syncError', true); } else { result = deleteIn(result, 'error'); result = deleteIn(result, 'syncError'); } if (Object.keys(syncErrors).length) { result = setIn(result, 'syncErrors', syncErrors); } else { result = deleteIn(result, 'syncErrors'); } return result; }), _defineProperty(_behaviors, _actionTypes.UPDATE_SYNC_WARNINGS, function (state, _ref26) { var _ref26$payload = _ref26.payload, syncWarnings = _ref26$payload.syncWarnings, warning = _ref26$payload.warning; var result = state; if (warning) { result = setIn(result, 'warning', warning); } else { result = deleteIn(result, 'warning'); } if (Object.keys(syncWarnings).length) { result = setIn(result, 'syncWarnings', syncWarnings); } else { result = deleteIn(result, 'syncWarnings'); } return result; }), _behaviors); var reducer = function reducer() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; var action = arguments[1]; var behavior = behaviors[action.type]; return behavior ? behavior(state, action) : state; }; var byForm = function byForm(reducer) { return function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { type: 'NONE' }; var form = action && action.meta && action.meta.form; if (!form || !isReduxFormAction(action)) { return state; } if (action.type === _actionTypes.DESTROY && action.meta && action.meta.form) { return action.meta.form.reduce(function (result, form) { return deleteInWithCleanUp(result, form); }, state); } var formState = getIn(state, form); var result = reducer(formState, action); return result === formState ? state : setIn(state, form, result); }; }; /** * Adds additional functionality to the reducer */ function decorate(target) { target.plugin = function plugin(reducers) { var _this = this; // use 'function' keyword to enable 'this' return decorate(function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { type: 'NONE' }; return Object.keys(reducers).reduce(function (accumulator, key) { var previousState = getIn(accumulator, key); var nextState = reducers[key](previousState, action, getIn(state, key)); return nextState === previousState ? accumulator : setIn(accumulator, key, nextState); }, _this(state, action)); }); }; return target; } return decorate(byForm(reducer)); } exports.default = createReducer; /***/ }), /* 170 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _toPath2 = __webpack_require__(6); var _toPath3 = _interopRequireDefault(_toPath2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function createDeleteInWithCleanUp(_ref) { var deepEqual = _ref.deepEqual, empty = _ref.empty, getIn = _ref.getIn, deleteIn = _ref.deleteIn, setIn = _ref.setIn; var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) { if (path[path.length - 1] === ']') { // array path var pathTokens = (0, _toPath3.default)(path); pathTokens.pop(); var parent = getIn(state, pathTokens.join('.')); return parent ? setIn(state, path) : state; } var result = state; if (getIn(state, path) !== undefined) { result = deleteIn(state, path); } var dotIndex = path.lastIndexOf('.'); if (dotIndex > 0) { var parentPath = path.substring(0, dotIndex); if (parentPath[parentPath.length - 1] !== ']') { var _parent = getIn(result, parentPath); if (deepEqual(_parent, empty)) { return deleteInWithCleanUp(result, parentPath); } } } return result; }; return deleteInWithCleanUp; } exports.default = createDeleteInWithCleanUp; /***/ }), /* 171 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createValues = __webpack_require__(172); var _createValues2 = _interopRequireDefault(_createValues); var _plain = __webpack_require__(0); var _plain2 = _interopRequireDefault(_plain); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = (0, _createValues2.default)(_plain2.default); /***/ }), /* 172 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _reactRedux = __webpack_require__(3); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var createValues = function createValues(_ref) { var getIn = _ref.getIn; return function (config) { var _prop$getFormState$co = _extends({ prop: 'values', getFormState: function getFormState(state) { return getIn(state, 'form'); } }, config), form = _prop$getFormState$co.form, prop = _prop$getFormState$co.prop, getFormState = _prop$getFormState$co.getFormState; return (0, _reactRedux.connect)(function (state) { return _defineProperty({}, prop, getIn(getFormState(state), form + '.values')); } // ignore dispatch ); }; }; exports.default = createValues; /***/ }) /******/ ]); });
examples/animated-framer-motion/src/index.js
react-tools/react-table
import React from 'react' import ReactDOM from 'react-dom' import './index.css' import App from './App' ReactDOM.render(<App />, document.getElementById('root'))
src/card/test.js
twilson63/t63
import React from 'react' import test from 'tape' import { shallow } from 'enzyme' import Card from './' const { Text } = Card test('<Card />', t => { const wrapper = shallow( <Card> <Text>Hello World</Text> </Card> ) t.ok(wrapper.contains(<Text>Hello World</Text>)) t.end() })
node_modules/antd/es/tree/index.js
prodigalyijun/demo-by-antd
import _extends from 'babel-runtime/helpers/extends'; import _defineProperty from 'babel-runtime/helpers/defineProperty'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import React from 'react'; import RcTree, { TreeNode } from 'rc-tree'; import animation from '../_util/openAnimation'; import classNames from 'classnames'; export var AntTreeNode = function (_React$Component) { _inherits(AntTreeNode, _React$Component); function AntTreeNode() { _classCallCheck(this, AntTreeNode); return _possibleConstructorReturn(this, (AntTreeNode.__proto__ || Object.getPrototypeOf(AntTreeNode)).apply(this, arguments)); } _createClass(AntTreeNode, [{ key: 'render', value: function render() { return React.createElement(AntTreeNode, this.props); } }]); return AntTreeNode; }(React.Component); var Tree = function (_React$Component2) { _inherits(Tree, _React$Component2); function Tree() { _classCallCheck(this, Tree); return _possibleConstructorReturn(this, (Tree.__proto__ || Object.getPrototypeOf(Tree)).apply(this, arguments)); } _createClass(Tree, [{ key: 'render', value: function render() { var props = this.props; var prefixCls = props.prefixCls, className = props.className, showLine = props.showLine; var checkable = props.checkable; var classString = classNames(_defineProperty({}, prefixCls + '-show-line', !!showLine), className); return React.createElement( RcTree, _extends({}, props, { className: classString, checkable: checkable ? React.createElement('span', { className: prefixCls + '-checkbox-inner' }) : checkable }), this.props.children ); } }]); return Tree; }(React.Component); export default Tree; Tree.TreeNode = TreeNode; Tree.defaultProps = { prefixCls: 'ant-tree', checkable: false, showIcon: false, openAnimation: animation };
ajax/libs/yasqe/1.1.0/yasqe.min.js
OnsenUI/cdnjs
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.YASQE=e()}}(function(){var e;return function t(e,r,i){function n(s,a){if(!r[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var u=r[s]={exports:{}};e[s][0].call(u.exports,function(t){var r=e[s][1][t];return n(r?r:t)},u,u.exports,t,e,r,i)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)n(i[s]);return n}({1:[function(t,r,i){!function(n){"object"==typeof i&&"object"==typeof r?n(t("codemirror")):"function"==typeof e&&e.amd?e(["codemirror"],n):n(CodeMirror)}(function(e){"use strict";e.defineMode("sparql11",function(e){function t(){var e,t,r="<[^<>\"'|{}^\\\x00- ]*>",i="[A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]",n=i+"|_",o="("+n+"|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])",s="("+n+"|[0-9])("+n+"|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*",a="\\?"+s,l="\\$"+s,p="("+i+")((("+o+")|\\.)*("+o+"))?",c="[0-9A-Fa-f]",d="(%"+c+c+")",E="(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%])",h="("+d+"|"+E+")";"sparql11"==u?(e="("+n+"|:|[0-9]|"+h+")(("+o+"|\\.|:|"+h+")*("+o+"|:|"+h+"))?",t="_:("+n+"|[0-9])(("+o+"|\\.)*"+o+")?"):(e="("+n+"|[0-9])((("+o+")|\\.)*("+o+"))?",t="_:"+e);var f="("+p+")?:",m=f+e,g="@[a-zA-Z]+(-[a-zA-Z0-9]+)*",v="[eE][\\+-]?[0-9]+",x="[0-9]+",N="(([0-9]+\\.[0-9]*)|(\\.[0-9]+))",L="(([0-9]+\\.[0-9]*"+v+")|(\\.[0-9]+"+v+")|([0-9]+"+v+"))",I="\\+"+x,T="\\+"+N,y="\\+"+L,A="-"+x,S="-"+N,C="-"+L,R="\\\\[tbnrf\\\\\"']",b="'(([^\\x27\\x5C\\x0A\\x0D])|"+R+")*'",O='"(([^\\x22\\x5C\\x0A\\x0D])|'+R+')*"',P="'''(('|'')?([^'\\\\]|"+R+"))*'''",D='"""(("|"")?([^"\\\\]|'+R+'))*"""',_="[\\x20\\x09\\x0D\\x0A]",M="#([^\\n\\r]*[\\n\\r]|[^\\n\\r]*$)",w="("+_+"|("+M+"))*",G="\\("+w+"\\)",k="\\["+w+"\\]",B={terminal:[{name:"WS",regex:new RegExp("^"+_+"+"),style:"ws"},{name:"COMMENT",regex:new RegExp("^"+M),style:"comment"},{name:"IRI_REF",regex:new RegExp("^"+r),style:"variable-3"},{name:"VAR1",regex:new RegExp("^"+a),style:"atom"},{name:"VAR2",regex:new RegExp("^"+l),style:"atom"},{name:"LANGTAG",regex:new RegExp("^"+g),style:"meta"},{name:"DOUBLE",regex:new RegExp("^"+L),style:"number"},{name:"DECIMAL",regex:new RegExp("^"+N),style:"number"},{name:"INTEGER",regex:new RegExp("^"+x),style:"number"},{name:"DOUBLE_POSITIVE",regex:new RegExp("^"+y),style:"number"},{name:"DECIMAL_POSITIVE",regex:new RegExp("^"+T),style:"number"},{name:"INTEGER_POSITIVE",regex:new RegExp("^"+I),style:"number"},{name:"DOUBLE_NEGATIVE",regex:new RegExp("^"+C),style:"number"},{name:"DECIMAL_NEGATIVE",regex:new RegExp("^"+S),style:"number"},{name:"INTEGER_NEGATIVE",regex:new RegExp("^"+A),style:"number"},{name:"STRING_LITERAL_LONG1",regex:new RegExp("^"+P),style:"string"},{name:"STRING_LITERAL_LONG2",regex:new RegExp("^"+D),style:"string"},{name:"STRING_LITERAL1",regex:new RegExp("^"+b),style:"string"},{name:"STRING_LITERAL2",regex:new RegExp("^"+O),style:"string"},{name:"NIL",regex:new RegExp("^"+G),style:"punc"},{name:"ANON",regex:new RegExp("^"+k),style:"punc"},{name:"PNAME_LN",regex:new RegExp("^"+m),style:"string-2"},{name:"PNAME_NS",regex:new RegExp("^"+f),style:"string-2"},{name:"BLANK_NODE_LABEL",regex:new RegExp("^"+t),style:"string-2"}]};return B}function r(e){var t=[],r=o[e];if(void 0!=r)for(var i in r)t.push(i.toString());else t.push(e);return t}function i(e,t){function i(){for(var t=null,r=0;r<E.length;++r)if(t=e.match(E[r].regex,!0,!1))return{cat:E[r].name,style:E[r].style,text:t[0]};return(t=e.match(s,!0,!1))?{cat:e.current().toUpperCase(),style:"keyword",text:t[0]}:(t=e.match(a,!0,!1))?{cat:e.current(),style:"punc",text:t[0]}:(t=e.match(/^.[A-Za-z0-9]*/,!0,!1),{cat:"<invalid_token>",style:"error",text:t[0]})}function n(){var r=e.column();t.errorStartPos=r,t.errorEndPos=r+c.text.length}function l(e){null==t.queryType&&("SELECT"==e||"CONSTRUCT"==e||"ASK"==e||"DESCRIBE"==e)&&(t.queryType=e)}function u(e){"disallowVars"==e?t.allowVars=!1:"allowVars"==e?t.allowVars=!0:"disallowBnodes"==e?t.allowBnodes=!1:"allowBnodes"==e?t.allowBnodes=!0:"storeProperty"==e&&(t.storeProperty=!0)}function p(e){return(t.allowVars||"var"!=e)&&(t.allowBnodes||"blankNode"!=e&&"blankNodePropertyList"!=e&&"blankNodePropertyListPath"!=e)}0==e.pos&&(t.possibleCurrent=t.possibleNext);var c=i();if("<invalid_token>"==c.cat)return 1==t.OK&&(t.OK=!1,n()),t.complete=!1,c.style;if("WS"==c.cat||"COMMENT"==c.cat)return t.possibleCurrent=t.possibleNext,c.style;for(var d,h=!1,f=c.cat;t.stack.length>0&&f&&t.OK&&!h;)if(d=t.stack.pop(),o[d]){var m=o[d][f];if(void 0!=m&&p(d)){for(var g=m.length-1;g>=0;--g)t.stack.push(m[g]);u(d)}else t.OK=!1,t.complete=!1,n(),t.stack.push(d)}else if(d==f){h=!0,l(d);for(var v=!0,x=t.stack.length;x>0;--x){var N=o[t.stack[x-1]];N&&N.$||(v=!1)}t.complete=v,t.storeProperty&&"punc"!=f.cat&&(t.lastProperty=c.text,t.storeProperty=!1)}else t.OK=!1,t.complete=!1,n();return!h&&t.OK&&(t.OK=!1,t.complete=!1,n()),t.possibleCurrent=t.possibleNext,t.possibleNext=r(t.stack[t.stack.length-1]),c.style}function n(t,r){var i=0,n=t.stack.length-1;if(/^[\}\]\)]/.test(r)){for(var o=r.substr(0,1);n>=0;--n)if(t.stack[n]==o){--n;break}}else{var s=h[t.stack[n]];s&&(i+=s,--n)}for(;n>=0;--n){var s=f[t.stack[n]];s&&(i+=s)}return i*e.indentUnit}var o=(e.indentUnit,{"*[&&,valueLogical]":{"&&":["[&&,valueLogical]","*[&&,valueLogical]"],AS:[],")":[],",":[],"||":[],";":[]},"*[,,expression]":{",":["[,,expression]","*[,,expression]"],")":[]},"*[,,objectPath]":{",":["[,,objectPath]","*[,,objectPath]"],".":[],";":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[,,object]":{",":["[,,object]","*[,,object]"],".":[],";":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[/,pathEltOrInverse]":{"/":["[/,pathEltOrInverse]","*[/,pathEltOrInverse]"],"|":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[;,?[or([verbPath,verbSimple]),objectList]]":{";":["[;,?[or([verbPath,verbSimple]),objectList]]","*[;,?[or([verbPath,verbSimple]),objectList]]"],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[;,?[verb,objectList]]":{";":["[;,?[verb,objectList]]","*[;,?[verb,objectList]]"],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[UNION,groupGraphPattern]":{UNION:["[UNION,groupGraphPattern]","*[UNION,groupGraphPattern]"],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[graphPatternNotTriples,?.,?triplesBlock]":{"{":["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":[]},"*[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["[quadsNotTriples,?.,?triplesTemplate]","*[quadsNotTriples,?.,?triplesTemplate]"],"}":[]},"*[|,pathOneInPropertySet]":{"|":["[|,pathOneInPropertySet]","*[|,pathOneInPropertySet]"],")":[]},"*[|,pathSequence]":{"|":["[|,pathSequence]","*[|,pathSequence]"],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[||,conditionalAndExpression]":{"||":["[||,conditionalAndExpression]","*[||,conditionalAndExpression]"],AS:[],")":[],",":[],";":[]},"*dataBlockValue":{UNDEF:["dataBlockValue","*dataBlockValue"],IRI_REF:["dataBlockValue","*dataBlockValue"],TRUE:["dataBlockValue","*dataBlockValue"],FALSE:["dataBlockValue","*dataBlockValue"],PNAME_LN:["dataBlockValue","*dataBlockValue"],PNAME_NS:["dataBlockValue","*dataBlockValue"],STRING_LITERAL1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL2:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG2:["dataBlockValue","*dataBlockValue"],INTEGER:["dataBlockValue","*dataBlockValue"],DECIMAL:["dataBlockValue","*dataBlockValue"],DOUBLE:["dataBlockValue","*dataBlockValue"],INTEGER_POSITIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_POSITIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_POSITIVE:["dataBlockValue","*dataBlockValue"],INTEGER_NEGATIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_NEGATIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_NEGATIVE:["dataBlockValue","*dataBlockValue"],"}":[],")":[]},"*datasetClause":{FROM:["datasetClause","*datasetClause"],WHERE:[],"{":[]},"*describeDatasetClause":{FROM:["describeDatasetClause","*describeDatasetClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],VALUES:[],$:[]},"*graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"],")":[]},"*graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"],")":[]},"*groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"*havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"*or([[ (,*dataBlockValue,)],NIL])":{"(":["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],NIL:["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],"}":[]},"*or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],";":[]},"*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"*or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],WHERE:[],"{":[],FROM:[]},"*orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"*prefixDecl":{PREFIX:["prefixDecl","*prefixDecl"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[]},"*usingClause":{USING:["usingClause","*usingClause"],WHERE:[]},"*var":{VAR1:["var","*var"],VAR2:["var","*var"],")":[]},"*varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],FROM:[],VALUES:[],$:[]},"+graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"]},"+graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"]},"+groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"]},"+havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"]},"+or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"]},"+orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"]},"+varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"]},"?.":{".":["."],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?DISTINCT":{DISTINCT:["DISTINCT"],"!":[],"+":[],"-":[],VAR1:[],VAR2:[],"(":[],STR:[],LANG:[],LANGMATCHES:[],DATATYPE:[],BOUND:[],IRI:[],URI:[],BNODE:[],RAND:[],ABS:[],CEIL:[],FLOOR:[],ROUND:[],CONCAT:[],STRLEN:[],UCASE:[],LCASE:[],ENCODE_FOR_URI:[],CONTAINS:[],STRSTARTS:[],STRENDS:[],STRBEFORE:[],STRAFTER:[],YEAR:[],MONTH:[],DAY:[],HOURS:[],MINUTES:[],SECONDS:[],TIMEZONE:[],TZ:[],NOW:[],UUID:[],STRUUID:[],MD5:[],SHA1:[],SHA256:[],SHA384:[],SHA512:[],COALESCE:[],IF:[],STRLANG:[],STRDT:[],SAMETERM:[],ISIRI:[],ISURI:[],ISBLANK:[],ISLITERAL:[],ISNUMERIC:[],TRUE:[],FALSE:[],COUNT:[],SUM:[],MIN:[],MAX:[],AVG:[],SAMPLE:[],GROUP_CONCAT:[],SUBSTR:[],REPLACE:[],REGEX:[],EXISTS:[],NOT:[],IRI_REF:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],PNAME_LN:[],PNAME_NS:[],"*":[]},"?GRAPH":{GRAPH:["GRAPH"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT":{SILENT:["SILENT"],VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_1":{SILENT:["SILENT"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_2":{SILENT:["SILENT"],GRAPH:[],DEFAULT:[],NAMED:[],ALL:[]},"?SILENT_3":{SILENT:["SILENT"],GRAPH:[]},"?SILENT_4":{SILENT:["SILENT"],DEFAULT:[],GRAPH:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?WHERE":{WHERE:["WHERE"],"{":[]},"?[,,expression]":{",":["[,,expression]"],")":[]},"?[.,?constructTriples]":{".":["[.,?constructTriples]"],"}":[]},"?[.,?triplesBlock]":{".":["[.,?triplesBlock]"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[.,?triplesTemplate]":{".":["[.,?triplesTemplate]"],"}":[],GRAPH:[]},"?[;,SEPARATOR,=,string]":{";":["[;,SEPARATOR,=,string]"],")":[]},"?[;,update]":{";":["[;,update]"],$:[]},"?[AS,var]":{AS:["[AS,var]"],")":[]},"?[INTO,graphRef]":{INTO:["[INTO,graphRef]"],";":[],$:[]},"?[or([verbPath,verbSimple]),objectList]":{VAR1:["[or([verbPath,verbSimple]),objectList]"],VAR2:["[or([verbPath,verbSimple]),objectList]"],"^":["[or([verbPath,verbSimple]),objectList]"],a:["[or([verbPath,verbSimple]),objectList]"],"!":["[or([verbPath,verbSimple]),objectList]"],"(":["[or([verbPath,verbSimple]),objectList]"],IRI_REF:["[or([verbPath,verbSimple]),objectList]"],PNAME_LN:["[or([verbPath,verbSimple]),objectList]"],PNAME_NS:["[or([verbPath,verbSimple]),objectList]"],";":[],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],"^":["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],IRI_REF:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_LN:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_NS:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],")":[]},"?[update1,?[;,update]]":{INSERT:["[update1,?[;,update]]"],DELETE:["[update1,?[;,update]]"],LOAD:["[update1,?[;,update]]"],CLEAR:["[update1,?[;,update]]"],DROP:["[update1,?[;,update]]"],ADD:["[update1,?[;,update]]"],MOVE:["[update1,?[;,update]]"],COPY:["[update1,?[;,update]]"],CREATE:["[update1,?[;,update]]"],WITH:["[update1,?[;,update]]"],$:[]},"?[verb,objectList]":{a:["[verb,objectList]"],VAR1:["[verb,objectList]"],VAR2:["[verb,objectList]"],IRI_REF:["[verb,objectList]"],PNAME_LN:["[verb,objectList]"],PNAME_NS:["[verb,objectList]"],";":[],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?argList":{NIL:["argList"],"(":["argList"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],"*":[],"/":[],";":[]},"?baseDecl":{BASE:["baseDecl"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[],PREFIX:[]},"?constructTriples":{VAR1:["constructTriples"],VAR2:["constructTriples"],NIL:["constructTriples"],"(":["constructTriples"],"[":["constructTriples"],IRI_REF:["constructTriples"],TRUE:["constructTriples"],FALSE:["constructTriples"],BLANK_NODE_LABEL:["constructTriples"],ANON:["constructTriples"],PNAME_LN:["constructTriples"],PNAME_NS:["constructTriples"],STRING_LITERAL1:["constructTriples"],STRING_LITERAL2:["constructTriples"],STRING_LITERAL_LONG1:["constructTriples"],STRING_LITERAL_LONG2:["constructTriples"],INTEGER:["constructTriples"],DECIMAL:["constructTriples"],DOUBLE:["constructTriples"],INTEGER_POSITIVE:["constructTriples"],DECIMAL_POSITIVE:["constructTriples"],DOUBLE_POSITIVE:["constructTriples"],INTEGER_NEGATIVE:["constructTriples"],DECIMAL_NEGATIVE:["constructTriples"],DOUBLE_NEGATIVE:["constructTriples"],"}":[]},"?groupClause":{GROUP:["groupClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"?havingClause":{HAVING:["havingClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"?insertClause":{INSERT:["insertClause"],WHERE:[],USING:[]},"?limitClause":{LIMIT:["limitClause"],VALUES:[],$:[],"}":[]},"?limitOffsetClauses":{LIMIT:["limitOffsetClauses"],OFFSET:["limitOffsetClauses"],VALUES:[],$:[],"}":[]},"?offsetClause":{OFFSET:["offsetClause"],VALUES:[],$:[],"}":[]},"?or([DISTINCT,REDUCED])":{DISTINCT:["or([DISTINCT,REDUCED])"],REDUCED:["or([DISTINCT,REDUCED])"],"*":[],"(":[],VAR1:[],VAR2:[]},"?or([LANGTAG,[^^,iriRef]])":{LANGTAG:["or([LANGTAG,[^^,iriRef]])"],"^^":["or([LANGTAG,[^^,iriRef]])"],UNDEF:[],IRI_REF:[],TRUE:[],FALSE:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],a:[],VAR1:[],VAR2:[],"^":[],"!":[],"(":[],".":[],";":[],",":[],AS:[],")":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],"*":[],"/":[],"}":[],"[":[],NIL:[],BLANK_NODE_LABEL:[],ANON:[],"]":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])"],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"!=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IN:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AS:[],")":[],",":[],"||":[],"&&":[],";":[]},"?orderClause":{ORDER:["orderClause"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"?pathMod":{"*":["pathMod"],"?":["pathMod"],"+":["pathMod"],"{":["pathMod"],"|":[],"/":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"?triplesBlock":{VAR1:["triplesBlock"],VAR2:["triplesBlock"],NIL:["triplesBlock"],"(":["triplesBlock"],"[":["triplesBlock"],IRI_REF:["triplesBlock"],TRUE:["triplesBlock"],FALSE:["triplesBlock"],BLANK_NODE_LABEL:["triplesBlock"],ANON:["triplesBlock"],PNAME_LN:["triplesBlock"],PNAME_NS:["triplesBlock"],STRING_LITERAL1:["triplesBlock"],STRING_LITERAL2:["triplesBlock"],STRING_LITERAL_LONG1:["triplesBlock"],STRING_LITERAL_LONG2:["triplesBlock"],INTEGER:["triplesBlock"],DECIMAL:["triplesBlock"],DOUBLE:["triplesBlock"],INTEGER_POSITIVE:["triplesBlock"],DECIMAL_POSITIVE:["triplesBlock"],DOUBLE_POSITIVE:["triplesBlock"],INTEGER_NEGATIVE:["triplesBlock"],DECIMAL_NEGATIVE:["triplesBlock"],DOUBLE_NEGATIVE:["triplesBlock"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?triplesTemplate":{VAR1:["triplesTemplate"],VAR2:["triplesTemplate"],NIL:["triplesTemplate"],"(":["triplesTemplate"],"[":["triplesTemplate"],IRI_REF:["triplesTemplate"],TRUE:["triplesTemplate"],FALSE:["triplesTemplate"],BLANK_NODE_LABEL:["triplesTemplate"],ANON:["triplesTemplate"],PNAME_LN:["triplesTemplate"],PNAME_NS:["triplesTemplate"],STRING_LITERAL1:["triplesTemplate"],STRING_LITERAL2:["triplesTemplate"],STRING_LITERAL_LONG1:["triplesTemplate"],STRING_LITERAL_LONG2:["triplesTemplate"],INTEGER:["triplesTemplate"],DECIMAL:["triplesTemplate"],DOUBLE:["triplesTemplate"],INTEGER_POSITIVE:["triplesTemplate"],DECIMAL_POSITIVE:["triplesTemplate"],DOUBLE_POSITIVE:["triplesTemplate"],INTEGER_NEGATIVE:["triplesTemplate"],DECIMAL_NEGATIVE:["triplesTemplate"],DOUBLE_NEGATIVE:["triplesTemplate"],"}":[],GRAPH:[]},"?whereClause":{WHERE:["whereClause"],"{":["whereClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],VALUES:[],$:[]},"[ (,*dataBlockValue,)]":{"(":["(","*dataBlockValue",")"]},"[ (,*var,)]":{"(":["(","*var",")"]},"[ (,expression,)]":{"(":["(","expression",")"]},"[ (,expression,AS,var,)]":{"(":["(","expression","AS","var",")"]},"[!=,numericExpression]":{"!=":["!=","numericExpression"]},"[&&,valueLogical]":{"&&":["&&","valueLogical"]},"[*,unaryExpression]":{"*":["*","unaryExpression"]},"[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]":{WHERE:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"],FROM:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"]},"[+,multiplicativeExpression]":{"+":["+","multiplicativeExpression"]},"[,,expression]":{",":[",","expression"]},"[,,integer,}]":{",":[",","integer","}"]},"[,,objectPath]":{",":[",","objectPath"]},"[,,object]":{",":[",","object"]},"[,,or([},[integer,}]])]":{",":[",","or([},[integer,}]])"]},"[-,multiplicativeExpression]":{"-":["-","multiplicativeExpression"]},"[.,?constructTriples]":{".":[".","?constructTriples"]},"[.,?triplesBlock]":{".":[".","?triplesBlock"]},"[.,?triplesTemplate]":{".":[".","?triplesTemplate"]},"[/,pathEltOrInverse]":{"/":["/","pathEltOrInverse"]},"[/,unaryExpression]":{"/":["/","unaryExpression"]},"[;,?[or([verbPath,verbSimple]),objectList]]":{";":[";","?[or([verbPath,verbSimple]),objectList]"]},"[;,?[verb,objectList]]":{";":[";","?[verb,objectList]"]},"[;,SEPARATOR,=,string]":{";":[";","SEPARATOR","=","string"]},"[;,update]":{";":[";","update"]},"[<,numericExpression]":{"<":["<","numericExpression"]},"[<=,numericExpression]":{"<=":["<=","numericExpression"]},"[=,numericExpression]":{"=":["=","numericExpression"]},"[>,numericExpression]":{">":[">","numericExpression"]},"[>=,numericExpression]":{">=":[">=","numericExpression"]},"[AS,var]":{AS:["AS","var"]},"[IN,expressionList]":{IN:["IN","expressionList"]},"[INTO,graphRef]":{INTO:["INTO","graphRef"]},"[NAMED,iriRef]":{NAMED:["NAMED","iriRef"]},"[NOT,IN,expressionList]":{NOT:["NOT","IN","expressionList"]},"[UNION,groupGraphPattern]":{UNION:["UNION","groupGraphPattern"]},"[^^,iriRef]":{"^^":["^^","iriRef"]},"[constructTemplate,*datasetClause,whereClause,solutionModifier]":{"{":["constructTemplate","*datasetClause","whereClause","solutionModifier"]},"[deleteClause,?insertClause]":{DELETE:["deleteClause","?insertClause"]},"[graphPatternNotTriples,?.,?triplesBlock]":{"{":["graphPatternNotTriples","?.","?triplesBlock"],OPTIONAL:["graphPatternNotTriples","?.","?triplesBlock"],MINUS:["graphPatternNotTriples","?.","?triplesBlock"],GRAPH:["graphPatternNotTriples","?.","?triplesBlock"],SERVICE:["graphPatternNotTriples","?.","?triplesBlock"],FILTER:["graphPatternNotTriples","?.","?triplesBlock"],BIND:["graphPatternNotTriples","?.","?triplesBlock"],VALUES:["graphPatternNotTriples","?.","?triplesBlock"]},"[integer,or([[,,or([},[integer,}]])],}])]":{INTEGER:["integer","or([[,,or([},[integer,}]])],}])"]},"[integer,}]":{INTEGER:["integer","}"]},"[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]":{INTEGER_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"]},"[or([verbPath,verbSimple]),objectList]":{VAR1:["or([verbPath,verbSimple])","objectList"],VAR2:["or([verbPath,verbSimple])","objectList"],"^":["or([verbPath,verbSimple])","objectList"],a:["or([verbPath,verbSimple])","objectList"],"!":["or([verbPath,verbSimple])","objectList"],"(":["or([verbPath,verbSimple])","objectList"],IRI_REF:["or([verbPath,verbSimple])","objectList"],PNAME_LN:["or([verbPath,verbSimple])","objectList"],PNAME_NS:["or([verbPath,verbSimple])","objectList"]},"[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],"^":["pathOneInPropertySet","*[|,pathOneInPropertySet]"],IRI_REF:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_LN:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_NS:["pathOneInPropertySet","*[|,pathOneInPropertySet]"]},"[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["quadsNotTriples","?.","?triplesTemplate"]},"[update1,?[;,update]]":{INSERT:["update1","?[;,update]"],DELETE:["update1","?[;,update]"],LOAD:["update1","?[;,update]"],CLEAR:["update1","?[;,update]"],DROP:["update1","?[;,update]"],ADD:["update1","?[;,update]"],MOVE:["update1","?[;,update]"],COPY:["update1","?[;,update]"],CREATE:["update1","?[;,update]"],WITH:["update1","?[;,update]"]},"[verb,objectList]":{a:["verb","objectList"],VAR1:["verb","objectList"],VAR2:["verb","objectList"],IRI_REF:["verb","objectList"],PNAME_LN:["verb","objectList"],PNAME_NS:["verb","objectList"]},"[|,pathOneInPropertySet]":{"|":["|","pathOneInPropertySet"]},"[|,pathSequence]":{"|":["|","pathSequence"]},"[||,conditionalAndExpression]":{"||":["||","conditionalAndExpression"]},add:{ADD:["ADD","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},additiveExpression:{"!":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"+":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"(":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANGMATCHES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DATATYPE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BOUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BNODE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],RAND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ABS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CEIL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FLOOR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ROUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLEN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ENCODE_FOR_URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONTAINS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRSTARTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRENDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRBEFORE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRAFTER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],YEAR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MONTH:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DAY:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],HOURS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MINUTES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SECONDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TIMEZONE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TZ:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOW:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRUUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MD5:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA256:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA384:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA512:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COALESCE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRDT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMETERM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISIRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISURI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISBLANK:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISLITERAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISNUMERIC:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TRUE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FALSE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COUNT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MIN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MAX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AVG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMPLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],GROUP_CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUBSTR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REPLACE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REGEX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],EXISTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI_REF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_LN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_NS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"]},aggregate:{COUNT:["COUNT","(","?DISTINCT","or([*,expression])",")"],SUM:["SUM","(","?DISTINCT","expression",")"],MIN:["MIN","(","?DISTINCT","expression",")"],MAX:["MAX","(","?DISTINCT","expression",")"],AVG:["AVG","(","?DISTINCT","expression",")"],SAMPLE:["SAMPLE","(","?DISTINCT","expression",")"],GROUP_CONCAT:["GROUP_CONCAT","(","?DISTINCT","expression","?[;,SEPARATOR,=,string]",")"]},allowBnodes:{"}":[]},allowVars:{"}":[]},argList:{NIL:["NIL"],"(":["(","?DISTINCT","expression","*[,,expression]",")"]},askQuery:{ASK:["ASK","*datasetClause","whereClause","solutionModifier"]},baseDecl:{BASE:["BASE","IRI_REF"]},bind:{BIND:["BIND","(","expression","AS","var",")"]},blankNode:{BLANK_NODE_LABEL:["BLANK_NODE_LABEL"],ANON:["ANON"]},blankNodePropertyList:{"[":["[","propertyListNotEmpty","]"]},blankNodePropertyListPath:{"[":["[","propertyListPathNotEmpty","]"]},booleanLiteral:{TRUE:["TRUE"],FALSE:["FALSE"]},brackettedExpression:{"(":["(","expression",")"]},builtInCall:{STR:["STR","(","expression",")"],LANG:["LANG","(","expression",")"],LANGMATCHES:["LANGMATCHES","(","expression",",","expression",")"],DATATYPE:["DATATYPE","(","expression",")"],BOUND:["BOUND","(","var",")"],IRI:["IRI","(","expression",")"],URI:["URI","(","expression",")"],BNODE:["BNODE","or([[ (,expression,)],NIL])"],RAND:["RAND","NIL"],ABS:["ABS","(","expression",")"],CEIL:["CEIL","(","expression",")"],FLOOR:["FLOOR","(","expression",")"],ROUND:["ROUND","(","expression",")"],CONCAT:["CONCAT","expressionList"],SUBSTR:["substringExpression"],STRLEN:["STRLEN","(","expression",")"],REPLACE:["strReplaceExpression"],UCASE:["UCASE","(","expression",")"],LCASE:["LCASE","(","expression",")"],ENCODE_FOR_URI:["ENCODE_FOR_URI","(","expression",")"],CONTAINS:["CONTAINS","(","expression",",","expression",")"],STRSTARTS:["STRSTARTS","(","expression",",","expression",")"],STRENDS:["STRENDS","(","expression",",","expression",")"],STRBEFORE:["STRBEFORE","(","expression",",","expression",")"],STRAFTER:["STRAFTER","(","expression",",","expression",")"],YEAR:["YEAR","(","expression",")"],MONTH:["MONTH","(","expression",")"],DAY:["DAY","(","expression",")"],HOURS:["HOURS","(","expression",")"],MINUTES:["MINUTES","(","expression",")"],SECONDS:["SECONDS","(","expression",")"],TIMEZONE:["TIMEZONE","(","expression",")"],TZ:["TZ","(","expression",")"],NOW:["NOW","NIL"],UUID:["UUID","NIL"],STRUUID:["STRUUID","NIL"],MD5:["MD5","(","expression",")"],SHA1:["SHA1","(","expression",")"],SHA256:["SHA256","(","expression",")"],SHA384:["SHA384","(","expression",")"],SHA512:["SHA512","(","expression",")"],COALESCE:["COALESCE","expressionList"],IF:["IF","(","expression",",","expression",",","expression",")"],STRLANG:["STRLANG","(","expression",",","expression",")"],STRDT:["STRDT","(","expression",",","expression",")"],SAMETERM:["SAMETERM","(","expression",",","expression",")"],ISIRI:["ISIRI","(","expression",")"],ISURI:["ISURI","(","expression",")"],ISBLANK:["ISBLANK","(","expression",")"],ISLITERAL:["ISLITERAL","(","expression",")"],ISNUMERIC:["ISNUMERIC","(","expression",")"],REGEX:["regexExpression"],EXISTS:["existsFunc"],NOT:["notExistsFunc"]},clear:{CLEAR:["CLEAR","?SILENT_2","graphRefAll"]},collection:{"(":["(","+graphNode",")"]},collectionPath:{"(":["(","+graphNodePath",")"]},conditionalAndExpression:{"!":["valueLogical","*[&&,valueLogical]"],"+":["valueLogical","*[&&,valueLogical]"],"-":["valueLogical","*[&&,valueLogical]"],VAR1:["valueLogical","*[&&,valueLogical]"],VAR2:["valueLogical","*[&&,valueLogical]"],"(":["valueLogical","*[&&,valueLogical]"],STR:["valueLogical","*[&&,valueLogical]"],LANG:["valueLogical","*[&&,valueLogical]"],LANGMATCHES:["valueLogical","*[&&,valueLogical]"],DATATYPE:["valueLogical","*[&&,valueLogical]"],BOUND:["valueLogical","*[&&,valueLogical]"],IRI:["valueLogical","*[&&,valueLogical]"],URI:["valueLogical","*[&&,valueLogical]"],BNODE:["valueLogical","*[&&,valueLogical]"],RAND:["valueLogical","*[&&,valueLogical]"],ABS:["valueLogical","*[&&,valueLogical]"],CEIL:["valueLogical","*[&&,valueLogical]"],FLOOR:["valueLogical","*[&&,valueLogical]"],ROUND:["valueLogical","*[&&,valueLogical]"],CONCAT:["valueLogical","*[&&,valueLogical]"],STRLEN:["valueLogical","*[&&,valueLogical]"],UCASE:["valueLogical","*[&&,valueLogical]"],LCASE:["valueLogical","*[&&,valueLogical]"],ENCODE_FOR_URI:["valueLogical","*[&&,valueLogical]"],CONTAINS:["valueLogical","*[&&,valueLogical]"],STRSTARTS:["valueLogical","*[&&,valueLogical]"],STRENDS:["valueLogical","*[&&,valueLogical]"],STRBEFORE:["valueLogical","*[&&,valueLogical]"],STRAFTER:["valueLogical","*[&&,valueLogical]"],YEAR:["valueLogical","*[&&,valueLogical]"],MONTH:["valueLogical","*[&&,valueLogical]"],DAY:["valueLogical","*[&&,valueLogical]"],HOURS:["valueLogical","*[&&,valueLogical]"],MINUTES:["valueLogical","*[&&,valueLogical]"],SECONDS:["valueLogical","*[&&,valueLogical]"],TIMEZONE:["valueLogical","*[&&,valueLogical]"],TZ:["valueLogical","*[&&,valueLogical]"],NOW:["valueLogical","*[&&,valueLogical]"],UUID:["valueLogical","*[&&,valueLogical]"],STRUUID:["valueLogical","*[&&,valueLogical]"],MD5:["valueLogical","*[&&,valueLogical]"],SHA1:["valueLogical","*[&&,valueLogical]"],SHA256:["valueLogical","*[&&,valueLogical]"],SHA384:["valueLogical","*[&&,valueLogical]"],SHA512:["valueLogical","*[&&,valueLogical]"],COALESCE:["valueLogical","*[&&,valueLogical]"],IF:["valueLogical","*[&&,valueLogical]"],STRLANG:["valueLogical","*[&&,valueLogical]"],STRDT:["valueLogical","*[&&,valueLogical]"],SAMETERM:["valueLogical","*[&&,valueLogical]"],ISIRI:["valueLogical","*[&&,valueLogical]"],ISURI:["valueLogical","*[&&,valueLogical]"],ISBLANK:["valueLogical","*[&&,valueLogical]"],ISLITERAL:["valueLogical","*[&&,valueLogical]"],ISNUMERIC:["valueLogical","*[&&,valueLogical]"],TRUE:["valueLogical","*[&&,valueLogical]"],FALSE:["valueLogical","*[&&,valueLogical]"],COUNT:["valueLogical","*[&&,valueLogical]"],SUM:["valueLogical","*[&&,valueLogical]"],MIN:["valueLogical","*[&&,valueLogical]"],MAX:["valueLogical","*[&&,valueLogical]"],AVG:["valueLogical","*[&&,valueLogical]"],SAMPLE:["valueLogical","*[&&,valueLogical]"],GROUP_CONCAT:["valueLogical","*[&&,valueLogical]"],SUBSTR:["valueLogical","*[&&,valueLogical]"],REPLACE:["valueLogical","*[&&,valueLogical]"],REGEX:["valueLogical","*[&&,valueLogical]"],EXISTS:["valueLogical","*[&&,valueLogical]"],NOT:["valueLogical","*[&&,valueLogical]"],IRI_REF:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL2:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG2:["valueLogical","*[&&,valueLogical]"],INTEGER:["valueLogical","*[&&,valueLogical]"],DECIMAL:["valueLogical","*[&&,valueLogical]"],DOUBLE:["valueLogical","*[&&,valueLogical]"],INTEGER_POSITIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_POSITIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_POSITIVE:["valueLogical","*[&&,valueLogical]"],INTEGER_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_NEGATIVE:["valueLogical","*[&&,valueLogical]"],PNAME_LN:["valueLogical","*[&&,valueLogical]"],PNAME_NS:["valueLogical","*[&&,valueLogical]"]},conditionalOrExpression:{"!":["conditionalAndExpression","*[||,conditionalAndExpression]"],"+":["conditionalAndExpression","*[||,conditionalAndExpression]"],"-":["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR1:["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR2:["conditionalAndExpression","*[||,conditionalAndExpression]"],"(":["conditionalAndExpression","*[||,conditionalAndExpression]"],STR:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANGMATCHES:["conditionalAndExpression","*[||,conditionalAndExpression]"],DATATYPE:["conditionalAndExpression","*[||,conditionalAndExpression]"],BOUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],BNODE:["conditionalAndExpression","*[||,conditionalAndExpression]"],RAND:["conditionalAndExpression","*[||,conditionalAndExpression]"],ABS:["conditionalAndExpression","*[||,conditionalAndExpression]"],CEIL:["conditionalAndExpression","*[||,conditionalAndExpression]"],FLOOR:["conditionalAndExpression","*[||,conditionalAndExpression]"],ROUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLEN:["conditionalAndExpression","*[||,conditionalAndExpression]"],UCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],LCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],ENCODE_FOR_URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONTAINS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRSTARTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRENDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRBEFORE:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRAFTER:["conditionalAndExpression","*[||,conditionalAndExpression]"],YEAR:["conditionalAndExpression","*[||,conditionalAndExpression]"],MONTH:["conditionalAndExpression","*[||,conditionalAndExpression]"],DAY:["conditionalAndExpression","*[||,conditionalAndExpression]"],HOURS:["conditionalAndExpression","*[||,conditionalAndExpression]"],MINUTES:["conditionalAndExpression","*[||,conditionalAndExpression]"],SECONDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],TIMEZONE:["conditionalAndExpression","*[||,conditionalAndExpression]"],TZ:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOW:["conditionalAndExpression","*[||,conditionalAndExpression]"],UUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRUUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],MD5:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA1:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA256:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA384:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA512:["conditionalAndExpression","*[||,conditionalAndExpression]"],COALESCE:["conditionalAndExpression","*[||,conditionalAndExpression]"],IF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRDT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMETERM:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISIRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISURI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISBLANK:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISLITERAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISNUMERIC:["conditionalAndExpression","*[||,conditionalAndExpression]"],TRUE:["conditionalAndExpression","*[||,conditionalAndExpression]"],FALSE:["conditionalAndExpression","*[||,conditionalAndExpression]"],COUNT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUM:["conditionalAndExpression","*[||,conditionalAndExpression]"],MIN:["conditionalAndExpression","*[||,conditionalAndExpression]"],MAX:["conditionalAndExpression","*[||,conditionalAndExpression]"],AVG:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMPLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],GROUP_CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUBSTR:["conditionalAndExpression","*[||,conditionalAndExpression]"],REPLACE:["conditionalAndExpression","*[||,conditionalAndExpression]"],REGEX:["conditionalAndExpression","*[||,conditionalAndExpression]"],EXISTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOT:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI_REF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL2:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG2:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_LN:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_NS:["conditionalAndExpression","*[||,conditionalAndExpression]"]},constraint:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"]},constructQuery:{CONSTRUCT:["CONSTRUCT","or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])"]},constructTemplate:{"{":["{","?constructTriples","}"]},constructTriples:{VAR1:["triplesSameSubject","?[.,?constructTriples]"],VAR2:["triplesSameSubject","?[.,?constructTriples]"],NIL:["triplesSameSubject","?[.,?constructTriples]"],"(":["triplesSameSubject","?[.,?constructTriples]"],"[":["triplesSameSubject","?[.,?constructTriples]"],IRI_REF:["triplesSameSubject","?[.,?constructTriples]"],TRUE:["triplesSameSubject","?[.,?constructTriples]"],FALSE:["triplesSameSubject","?[.,?constructTriples]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?constructTriples]"],ANON:["triplesSameSubject","?[.,?constructTriples]"],PNAME_LN:["triplesSameSubject","?[.,?constructTriples]"],PNAME_NS:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL2:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?constructTriples]"],INTEGER:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"]},copy:{COPY:["COPY","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},create:{CREATE:["CREATE","?SILENT_3","graphRef"]},dataBlock:{NIL:["or([inlineDataOneVar,inlineDataFull])"],"(":["or([inlineDataOneVar,inlineDataFull])"],VAR1:["or([inlineDataOneVar,inlineDataFull])"],VAR2:["or([inlineDataOneVar,inlineDataFull])"]},dataBlockValue:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],UNDEF:["UNDEF"]},datasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},defaultGraphClause:{IRI_REF:["sourceSelector"],PNAME_LN:["sourceSelector"],PNAME_NS:["sourceSelector"]},delete1:{DATA:["DATA","quadDataNoBnodes"],WHERE:["WHERE","quadPatternNoBnodes"],"{":["quadPatternNoBnodes","?insertClause","*usingClause","WHERE","groupGraphPattern"]},deleteClause:{DELETE:["DELETE","quadPattern"]},describeDatasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},describeQuery:{DESCRIBE:["DESCRIBE","or([+varOrIRIref,*])","*describeDatasetClause","?whereClause","solutionModifier"]},disallowBnodes:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},disallowVars:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},drop:{DROP:["DROP","?SILENT_2","graphRefAll"]},existsFunc:{EXISTS:["EXISTS","groupGraphPattern"]},expression:{"!":["conditionalOrExpression"],"+":["conditionalOrExpression"],"-":["conditionalOrExpression"],VAR1:["conditionalOrExpression"],VAR2:["conditionalOrExpression"],"(":["conditionalOrExpression"],STR:["conditionalOrExpression"],LANG:["conditionalOrExpression"],LANGMATCHES:["conditionalOrExpression"],DATATYPE:["conditionalOrExpression"],BOUND:["conditionalOrExpression"],IRI:["conditionalOrExpression"],URI:["conditionalOrExpression"],BNODE:["conditionalOrExpression"],RAND:["conditionalOrExpression"],ABS:["conditionalOrExpression"],CEIL:["conditionalOrExpression"],FLOOR:["conditionalOrExpression"],ROUND:["conditionalOrExpression"],CONCAT:["conditionalOrExpression"],STRLEN:["conditionalOrExpression"],UCASE:["conditionalOrExpression"],LCASE:["conditionalOrExpression"],ENCODE_FOR_URI:["conditionalOrExpression"],CONTAINS:["conditionalOrExpression"],STRSTARTS:["conditionalOrExpression"],STRENDS:["conditionalOrExpression"],STRBEFORE:["conditionalOrExpression"],STRAFTER:["conditionalOrExpression"],YEAR:["conditionalOrExpression"],MONTH:["conditionalOrExpression"],DAY:["conditionalOrExpression"],HOURS:["conditionalOrExpression"],MINUTES:["conditionalOrExpression"],SECONDS:["conditionalOrExpression"],TIMEZONE:["conditionalOrExpression"],TZ:["conditionalOrExpression"],NOW:["conditionalOrExpression"],UUID:["conditionalOrExpression"],STRUUID:["conditionalOrExpression"],MD5:["conditionalOrExpression"],SHA1:["conditionalOrExpression"],SHA256:["conditionalOrExpression"],SHA384:["conditionalOrExpression"],SHA512:["conditionalOrExpression"],COALESCE:["conditionalOrExpression"],IF:["conditionalOrExpression"],STRLANG:["conditionalOrExpression"],STRDT:["conditionalOrExpression"],SAMETERM:["conditionalOrExpression"],ISIRI:["conditionalOrExpression"],ISURI:["conditionalOrExpression"],ISBLANK:["conditionalOrExpression"],ISLITERAL:["conditionalOrExpression"],ISNUMERIC:["conditionalOrExpression"],TRUE:["conditionalOrExpression"],FALSE:["conditionalOrExpression"],COUNT:["conditionalOrExpression"],SUM:["conditionalOrExpression"],MIN:["conditionalOrExpression"],MAX:["conditionalOrExpression"],AVG:["conditionalOrExpression"],SAMPLE:["conditionalOrExpression"],GROUP_CONCAT:["conditionalOrExpression"],SUBSTR:["conditionalOrExpression"],REPLACE:["conditionalOrExpression"],REGEX:["conditionalOrExpression"],EXISTS:["conditionalOrExpression"],NOT:["conditionalOrExpression"],IRI_REF:["conditionalOrExpression"],STRING_LITERAL1:["conditionalOrExpression"],STRING_LITERAL2:["conditionalOrExpression"],STRING_LITERAL_LONG1:["conditionalOrExpression"],STRING_LITERAL_LONG2:["conditionalOrExpression"],INTEGER:["conditionalOrExpression"],DECIMAL:["conditionalOrExpression"],DOUBLE:["conditionalOrExpression"],INTEGER_POSITIVE:["conditionalOrExpression"],DECIMAL_POSITIVE:["conditionalOrExpression"],DOUBLE_POSITIVE:["conditionalOrExpression"],INTEGER_NEGATIVE:["conditionalOrExpression"],DECIMAL_NEGATIVE:["conditionalOrExpression"],DOUBLE_NEGATIVE:["conditionalOrExpression"],PNAME_LN:["conditionalOrExpression"],PNAME_NS:["conditionalOrExpression"]},expressionList:{NIL:["NIL"],"(":["(","expression","*[,,expression]",")"]},filter:{FILTER:["FILTER","constraint"]},functionCall:{IRI_REF:["iriRef","argList"],PNAME_LN:["iriRef","argList"],PNAME_NS:["iriRef","argList"]},graphGraphPattern:{GRAPH:["GRAPH","varOrIRIref","groupGraphPattern"]},graphNode:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNode"],"[":["triplesNode"]},graphNodePath:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNodePath"],"[":["triplesNodePath"]},graphOrDefault:{DEFAULT:["DEFAULT"],IRI_REF:["?GRAPH","iriRef"],PNAME_LN:["?GRAPH","iriRef"],PNAME_NS:["?GRAPH","iriRef"],GRAPH:["?GRAPH","iriRef"]},graphPatternNotTriples:{"{":["groupOrUnionGraphPattern"],OPTIONAL:["optionalGraphPattern"],MINUS:["minusGraphPattern"],GRAPH:["graphGraphPattern"],SERVICE:["serviceGraphPattern"],FILTER:["filter"],BIND:["bind"],VALUES:["inlineData"]},graphRef:{GRAPH:["GRAPH","iriRef"]},graphRefAll:{GRAPH:["graphRef"],DEFAULT:["DEFAULT"],NAMED:["NAMED"],ALL:["ALL"]},graphTerm:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],BLANK_NODE_LABEL:["blankNode"],ANON:["blankNode"],NIL:["NIL"]},groupClause:{GROUP:["GROUP","BY","+groupCondition"]},groupCondition:{STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"],"(":["(","expression","?[AS,var]",")"],VAR1:["var"],VAR2:["var"]},groupGraphPattern:{"{":["{","or([subSelect,groupGraphPatternSub])","}"]},groupGraphPatternSub:{"{":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],NIL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"(":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"[":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],IRI_REF:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],TRUE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FALSE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BLANK_NODE_LABEL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],ANON:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_LN:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_NS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"]},groupOrUnionGraphPattern:{"{":["groupGraphPattern","*[UNION,groupGraphPattern]"]},havingClause:{HAVING:["HAVING","+havingCondition"]},havingCondition:{"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"]},inlineData:{VALUES:["VALUES","dataBlock"]},inlineDataFull:{NIL:["or([NIL,[ (,*var,)]])","{","*or([[ (,*dataBlockValue,)],NIL])","}"],"(":["or([NIL,[ (,*var,)]])","{","*or([[ (,*dataBlockValue,)],NIL])","}"]},inlineDataOneVar:{VAR1:["var","{","*dataBlockValue","}"],VAR2:["var","{","*dataBlockValue","}"]},insert1:{DATA:["DATA","quadData"],"{":["quadPattern","*usingClause","WHERE","groupGraphPattern"]},insertClause:{INSERT:["INSERT","quadPattern"]},integer:{INTEGER:["INTEGER"]},iriRef:{IRI_REF:["IRI_REF"],PNAME_LN:["prefixedName"],PNAME_NS:["prefixedName"]},iriRefOrFunction:{IRI_REF:["iriRef","?argList"],PNAME_LN:["iriRef","?argList"],PNAME_NS:["iriRef","?argList"]},limitClause:{LIMIT:["LIMIT","INTEGER"]},limitOffsetClauses:{LIMIT:["limitClause","?offsetClause"],OFFSET:["offsetClause","?limitClause"]},load:{LOAD:["LOAD","?SILENT_1","iriRef","?[INTO,graphRef]"]},minusGraphPattern:{MINUS:["MINUS","groupGraphPattern"]},modify:{WITH:["WITH","iriRef","or([[deleteClause,?insertClause],insertClause])","*usingClause","WHERE","groupGraphPattern"]},move:{MOVE:["MOVE","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},multiplicativeExpression:{"!":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"+":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"-":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"(":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANGMATCHES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DATATYPE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BOUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BNODE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],RAND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ABS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CEIL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FLOOR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ROUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLEN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ENCODE_FOR_URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONTAINS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRSTARTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRENDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRBEFORE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRAFTER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],YEAR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MONTH:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DAY:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],HOURS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MINUTES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SECONDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TIMEZONE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TZ:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOW:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRUUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MD5:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA256:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA384:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA512:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COALESCE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRDT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMETERM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISIRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISURI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISBLANK:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISLITERAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISNUMERIC:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TRUE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FALSE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COUNT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MIN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MAX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],AVG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMPLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],GROUP_CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUBSTR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REPLACE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REGEX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],EXISTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI_REF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_LN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_NS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"]},namedGraphClause:{NAMED:["NAMED","sourceSelector"]},notExistsFunc:{NOT:["NOT","EXISTS","groupGraphPattern"]},numericExpression:{"!":["additiveExpression"],"+":["additiveExpression"],"-":["additiveExpression"],VAR1:["additiveExpression"],VAR2:["additiveExpression"],"(":["additiveExpression"],STR:["additiveExpression"],LANG:["additiveExpression"],LANGMATCHES:["additiveExpression"],DATATYPE:["additiveExpression"],BOUND:["additiveExpression"],IRI:["additiveExpression"],URI:["additiveExpression"],BNODE:["additiveExpression"],RAND:["additiveExpression"],ABS:["additiveExpression"],CEIL:["additiveExpression"],FLOOR:["additiveExpression"],ROUND:["additiveExpression"],CONCAT:["additiveExpression"],STRLEN:["additiveExpression"],UCASE:["additiveExpression"],LCASE:["additiveExpression"],ENCODE_FOR_URI:["additiveExpression"],CONTAINS:["additiveExpression"],STRSTARTS:["additiveExpression"],STRENDS:["additiveExpression"],STRBEFORE:["additiveExpression"],STRAFTER:["additiveExpression"],YEAR:["additiveExpression"],MONTH:["additiveExpression"],DAY:["additiveExpression"],HOURS:["additiveExpression"],MINUTES:["additiveExpression"],SECONDS:["additiveExpression"],TIMEZONE:["additiveExpression"],TZ:["additiveExpression"],NOW:["additiveExpression"],UUID:["additiveExpression"],STRUUID:["additiveExpression"],MD5:["additiveExpression"],SHA1:["additiveExpression"],SHA256:["additiveExpression"],SHA384:["additiveExpression"],SHA512:["additiveExpression"],COALESCE:["additiveExpression"],IF:["additiveExpression"],STRLANG:["additiveExpression"],STRDT:["additiveExpression"],SAMETERM:["additiveExpression"],ISIRI:["additiveExpression"],ISURI:["additiveExpression"],ISBLANK:["additiveExpression"],ISLITERAL:["additiveExpression"],ISNUMERIC:["additiveExpression"],TRUE:["additiveExpression"],FALSE:["additiveExpression"],COUNT:["additiveExpression"],SUM:["additiveExpression"],MIN:["additiveExpression"],MAX:["additiveExpression"],AVG:["additiveExpression"],SAMPLE:["additiveExpression"],GROUP_CONCAT:["additiveExpression"],SUBSTR:["additiveExpression"],REPLACE:["additiveExpression"],REGEX:["additiveExpression"],EXISTS:["additiveExpression"],NOT:["additiveExpression"],IRI_REF:["additiveExpression"],STRING_LITERAL1:["additiveExpression"],STRING_LITERAL2:["additiveExpression"],STRING_LITERAL_LONG1:["additiveExpression"],STRING_LITERAL_LONG2:["additiveExpression"],INTEGER:["additiveExpression"],DECIMAL:["additiveExpression"],DOUBLE:["additiveExpression"],INTEGER_POSITIVE:["additiveExpression"],DECIMAL_POSITIVE:["additiveExpression"],DOUBLE_POSITIVE:["additiveExpression"],INTEGER_NEGATIVE:["additiveExpression"],DECIMAL_NEGATIVE:["additiveExpression"],DOUBLE_NEGATIVE:["additiveExpression"],PNAME_LN:["additiveExpression"],PNAME_NS:["additiveExpression"]},numericLiteral:{INTEGER:["numericLiteralUnsigned"],DECIMAL:["numericLiteralUnsigned"],DOUBLE:["numericLiteralUnsigned"],INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},numericLiteralNegative:{INTEGER_NEGATIVE:["INTEGER_NEGATIVE"],DECIMAL_NEGATIVE:["DECIMAL_NEGATIVE"],DOUBLE_NEGATIVE:["DOUBLE_NEGATIVE"]},numericLiteralPositive:{INTEGER_POSITIVE:["INTEGER_POSITIVE"],DECIMAL_POSITIVE:["DECIMAL_POSITIVE"],DOUBLE_POSITIVE:["DOUBLE_POSITIVE"]},numericLiteralUnsigned:{INTEGER:["INTEGER"],DECIMAL:["DECIMAL"],DOUBLE:["DOUBLE"]},object:{"(":["graphNode"],"[":["graphNode"],VAR1:["graphNode"],VAR2:["graphNode"],NIL:["graphNode"],IRI_REF:["graphNode"],TRUE:["graphNode"],FALSE:["graphNode"],BLANK_NODE_LABEL:["graphNode"],ANON:["graphNode"],PNAME_LN:["graphNode"],PNAME_NS:["graphNode"],STRING_LITERAL1:["graphNode"],STRING_LITERAL2:["graphNode"],STRING_LITERAL_LONG1:["graphNode"],STRING_LITERAL_LONG2:["graphNode"],INTEGER:["graphNode"],DECIMAL:["graphNode"],DOUBLE:["graphNode"],INTEGER_POSITIVE:["graphNode"],DECIMAL_POSITIVE:["graphNode"],DOUBLE_POSITIVE:["graphNode"],INTEGER_NEGATIVE:["graphNode"],DECIMAL_NEGATIVE:["graphNode"],DOUBLE_NEGATIVE:["graphNode"]},objectList:{"(":["object","*[,,object]"],"[":["object","*[,,object]"],VAR1:["object","*[,,object]"],VAR2:["object","*[,,object]"],NIL:["object","*[,,object]"],IRI_REF:["object","*[,,object]"],TRUE:["object","*[,,object]"],FALSE:["object","*[,,object]"],BLANK_NODE_LABEL:["object","*[,,object]"],ANON:["object","*[,,object]"],PNAME_LN:["object","*[,,object]"],PNAME_NS:["object","*[,,object]"],STRING_LITERAL1:["object","*[,,object]"],STRING_LITERAL2:["object","*[,,object]"],STRING_LITERAL_LONG1:["object","*[,,object]"],STRING_LITERAL_LONG2:["object","*[,,object]"],INTEGER:["object","*[,,object]"],DECIMAL:["object","*[,,object]"],DOUBLE:["object","*[,,object]"],INTEGER_POSITIVE:["object","*[,,object]"],DECIMAL_POSITIVE:["object","*[,,object]"],DOUBLE_POSITIVE:["object","*[,,object]"],INTEGER_NEGATIVE:["object","*[,,object]"],DECIMAL_NEGATIVE:["object","*[,,object]"],DOUBLE_NEGATIVE:["object","*[,,object]"]},objectListPath:{"(":["objectPath","*[,,objectPath]"],"[":["objectPath","*[,,objectPath]"],VAR1:["objectPath","*[,,objectPath]"],VAR2:["objectPath","*[,,objectPath]"],NIL:["objectPath","*[,,objectPath]"],IRI_REF:["objectPath","*[,,objectPath]"],TRUE:["objectPath","*[,,objectPath]"],FALSE:["objectPath","*[,,objectPath]"],BLANK_NODE_LABEL:["objectPath","*[,,objectPath]"],ANON:["objectPath","*[,,objectPath]"],PNAME_LN:["objectPath","*[,,objectPath]"],PNAME_NS:["objectPath","*[,,objectPath]"],STRING_LITERAL1:["objectPath","*[,,objectPath]"],STRING_LITERAL2:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG1:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG2:["objectPath","*[,,objectPath]"],INTEGER:["objectPath","*[,,objectPath]"],DECIMAL:["objectPath","*[,,objectPath]"],DOUBLE:["objectPath","*[,,objectPath]"],INTEGER_POSITIVE:["objectPath","*[,,objectPath]"],DECIMAL_POSITIVE:["objectPath","*[,,objectPath]"],DOUBLE_POSITIVE:["objectPath","*[,,objectPath]"],INTEGER_NEGATIVE:["objectPath","*[,,objectPath]"],DECIMAL_NEGATIVE:["objectPath","*[,,objectPath]"],DOUBLE_NEGATIVE:["objectPath","*[,,objectPath]"]},objectPath:{"(":["graphNodePath"],"[":["graphNodePath"],VAR1:["graphNodePath"],VAR2:["graphNodePath"],NIL:["graphNodePath"],IRI_REF:["graphNodePath"],TRUE:["graphNodePath"],FALSE:["graphNodePath"],BLANK_NODE_LABEL:["graphNodePath"],ANON:["graphNodePath"],PNAME_LN:["graphNodePath"],PNAME_NS:["graphNodePath"],STRING_LITERAL1:["graphNodePath"],STRING_LITERAL2:["graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath"],INTEGER:["graphNodePath"],DECIMAL:["graphNodePath"],DOUBLE:["graphNodePath"],INTEGER_POSITIVE:["graphNodePath"],DECIMAL_POSITIVE:["graphNodePath"],DOUBLE_POSITIVE:["graphNodePath"],INTEGER_NEGATIVE:["graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath"]},offsetClause:{OFFSET:["OFFSET","INTEGER"]},optionalGraphPattern:{OPTIONAL:["OPTIONAL","groupGraphPattern"]},"or([*,expression])":{"*":["*"],"!":["expression"],"+":["expression"],"-":["expression"],VAR1:["expression"],VAR2:["expression"],"(":["expression"],STR:["expression"],LANG:["expression"],LANGMATCHES:["expression"],DATATYPE:["expression"],BOUND:["expression"],IRI:["expression"],URI:["expression"],BNODE:["expression"],RAND:["expression"],ABS:["expression"],CEIL:["expression"],FLOOR:["expression"],ROUND:["expression"],CONCAT:["expression"],STRLEN:["expression"],UCASE:["expression"],LCASE:["expression"],ENCODE_FOR_URI:["expression"],CONTAINS:["expression"],STRSTARTS:["expression"],STRENDS:["expression"],STRBEFORE:["expression"],STRAFTER:["expression"],YEAR:["expression"],MONTH:["expression"],DAY:["expression"],HOURS:["expression"],MINUTES:["expression"],SECONDS:["expression"],TIMEZONE:["expression"],TZ:["expression"],NOW:["expression"],UUID:["expression"],STRUUID:["expression"],MD5:["expression"],SHA1:["expression"],SHA256:["expression"],SHA384:["expression"],SHA512:["expression"],COALESCE:["expression"],IF:["expression"],STRLANG:["expression"],STRDT:["expression"],SAMETERM:["expression"],ISIRI:["expression"],ISURI:["expression"],ISBLANK:["expression"],ISLITERAL:["expression"],ISNUMERIC:["expression"],TRUE:["expression"],FALSE:["expression"],COUNT:["expression"],SUM:["expression"],MIN:["expression"],MAX:["expression"],AVG:["expression"],SAMPLE:["expression"],GROUP_CONCAT:["expression"],SUBSTR:["expression"],REPLACE:["expression"],REGEX:["expression"],EXISTS:["expression"],NOT:["expression"],IRI_REF:["expression"],STRING_LITERAL1:["expression"],STRING_LITERAL2:["expression"],STRING_LITERAL_LONG1:["expression"],STRING_LITERAL_LONG2:["expression"],INTEGER:["expression"],DECIMAL:["expression"],DOUBLE:["expression"],INTEGER_POSITIVE:["expression"],DECIMAL_POSITIVE:["expression"],DOUBLE_POSITIVE:["expression"],INTEGER_NEGATIVE:["expression"],DECIMAL_NEGATIVE:["expression"],DOUBLE_NEGATIVE:["expression"],PNAME_LN:["expression"],PNAME_NS:["expression"]},"or([+or([var,[ (,expression,AS,var,)]]),*])":{"(":["+or([var,[ (,expression,AS,var,)]])"],VAR1:["+or([var,[ (,expression,AS,var,)]])"],VAR2:["+or([var,[ (,expression,AS,var,)]])"],"*":["*"]},"or([+varOrIRIref,*])":{VAR1:["+varOrIRIref"],VAR2:["+varOrIRIref"],IRI_REF:["+varOrIRIref"],PNAME_LN:["+varOrIRIref"],PNAME_NS:["+varOrIRIref"],"*":["*"]},"or([ASC,DESC])":{ASC:["ASC"],DESC:["DESC"]},"or([DISTINCT,REDUCED])":{DISTINCT:["DISTINCT"],REDUCED:["REDUCED"]},"or([LANGTAG,[^^,iriRef]])":{LANGTAG:["LANGTAG"],"^^":["[^^,iriRef]"]},"or([NIL,[ (,*var,)]])":{NIL:["NIL"],"(":["[ (,*var,)]"]},"or([[ (,*dataBlockValue,)],NIL])":{"(":["[ (,*dataBlockValue,)]"],NIL:["NIL"]},"or([[ (,expression,)],NIL])":{"(":["[ (,expression,)]"],NIL:["NIL"]},"or([[*,unaryExpression],[/,unaryExpression]])":{"*":["[*,unaryExpression]"],"/":["[/,unaryExpression]"]},"or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["[+,multiplicativeExpression]"],"-":["[-,multiplicativeExpression]"],INTEGER_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],INTEGER_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"]},"or([[,,or([},[integer,}]])],}])":{",":["[,,or([},[integer,}]])]"],"}":["}"]},"or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["[=,numericExpression]"],"!=":["[!=,numericExpression]"],"<":["[<,numericExpression]"],">":["[>,numericExpression]"],"<=":["[<=,numericExpression]"],">=":["[>=,numericExpression]"],IN:["[IN,expressionList]"],NOT:["[NOT,IN,expressionList]"]},"or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])":{"{":["[constructTemplate,*datasetClause,whereClause,solutionModifier]"],WHERE:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"],FROM:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"]},"or([[deleteClause,?insertClause],insertClause])":{DELETE:["[deleteClause,?insertClause]"],INSERT:["insertClause"]},"or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])":{INTEGER:["[integer,or([[,,or([},[integer,}]])],}])]"],",":["[,,integer,}]"]},"or([defaultGraphClause,namedGraphClause])":{IRI_REF:["defaultGraphClause"],PNAME_LN:["defaultGraphClause"],PNAME_NS:["defaultGraphClause"],NAMED:["namedGraphClause"]},"or([inlineDataOneVar,inlineDataFull])":{VAR1:["inlineDataOneVar"],VAR2:["inlineDataOneVar"],NIL:["inlineDataFull"],"(":["inlineDataFull"]},"or([iriRef,[NAMED,iriRef]])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],NAMED:["[NAMED,iriRef]"]},"or([iriRef,a])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"]},"or([numericLiteralPositive,numericLiteralNegative])":{INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},"or([queryAll,updateAll])":{CONSTRUCT:["queryAll"],DESCRIBE:["queryAll"],ASK:["queryAll"],SELECT:["queryAll"],INSERT:["updateAll"],DELETE:["updateAll"],LOAD:["updateAll"],CLEAR:["updateAll"],DROP:["updateAll"],ADD:["updateAll"],MOVE:["updateAll"],COPY:["updateAll"],CREATE:["updateAll"],WITH:["updateAll"],$:["updateAll"]},"or([selectQuery,constructQuery,describeQuery,askQuery])":{SELECT:["selectQuery"],CONSTRUCT:["constructQuery"],DESCRIBE:["describeQuery"],ASK:["askQuery"]},"or([subSelect,groupGraphPatternSub])":{SELECT:["subSelect"],"{":["groupGraphPatternSub"],OPTIONAL:["groupGraphPatternSub"],MINUS:["groupGraphPatternSub"],GRAPH:["groupGraphPatternSub"],SERVICE:["groupGraphPatternSub"],FILTER:["groupGraphPatternSub"],BIND:["groupGraphPatternSub"],VALUES:["groupGraphPatternSub"],VAR1:["groupGraphPatternSub"],VAR2:["groupGraphPatternSub"],NIL:["groupGraphPatternSub"],"(":["groupGraphPatternSub"],"[":["groupGraphPatternSub"],IRI_REF:["groupGraphPatternSub"],TRUE:["groupGraphPatternSub"],FALSE:["groupGraphPatternSub"],BLANK_NODE_LABEL:["groupGraphPatternSub"],ANON:["groupGraphPatternSub"],PNAME_LN:["groupGraphPatternSub"],PNAME_NS:["groupGraphPatternSub"],STRING_LITERAL1:["groupGraphPatternSub"],STRING_LITERAL2:["groupGraphPatternSub"],STRING_LITERAL_LONG1:["groupGraphPatternSub"],STRING_LITERAL_LONG2:["groupGraphPatternSub"],INTEGER:["groupGraphPatternSub"],DECIMAL:["groupGraphPatternSub"],DOUBLE:["groupGraphPatternSub"],INTEGER_POSITIVE:["groupGraphPatternSub"],DECIMAL_POSITIVE:["groupGraphPatternSub"],DOUBLE_POSITIVE:["groupGraphPatternSub"],INTEGER_NEGATIVE:["groupGraphPatternSub"],DECIMAL_NEGATIVE:["groupGraphPatternSub"],DOUBLE_NEGATIVE:["groupGraphPatternSub"],"}":["groupGraphPatternSub"]},"or([var,[ (,expression,AS,var,)]])":{VAR1:["var"],VAR2:["var"],"(":["[ (,expression,AS,var,)]"]},"or([verbPath,verbSimple])":{"^":["verbPath"],a:["verbPath"],"!":["verbPath"],"(":["verbPath"],IRI_REF:["verbPath"],PNAME_LN:["verbPath"],PNAME_NS:["verbPath"],VAR1:["verbSimple"],VAR2:["verbSimple"]},"or([},[integer,}]])":{"}":["}"],INTEGER:["[integer,}]"]},orderClause:{ORDER:["ORDER","BY","+orderCondition"]},orderCondition:{ASC:["or([ASC,DESC])","brackettedExpression"],DESC:["or([ASC,DESC])","brackettedExpression"],"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"],VAR1:["var"],VAR2:["var"]},path:{"^":["pathAlternative"],a:["pathAlternative"],"!":["pathAlternative"],"(":["pathAlternative"],IRI_REF:["pathAlternative"],PNAME_LN:["pathAlternative"],PNAME_NS:["pathAlternative"]},pathAlternative:{"^":["pathSequence","*[|,pathSequence]"],a:["pathSequence","*[|,pathSequence]"],"!":["pathSequence","*[|,pathSequence]"],"(":["pathSequence","*[|,pathSequence]"],IRI_REF:["pathSequence","*[|,pathSequence]"],PNAME_LN:["pathSequence","*[|,pathSequence]"],PNAME_NS:["pathSequence","*[|,pathSequence]"]},pathElt:{a:["pathPrimary","?pathMod"],"!":["pathPrimary","?pathMod"],"(":["pathPrimary","?pathMod"],IRI_REF:["pathPrimary","?pathMod"],PNAME_LN:["pathPrimary","?pathMod"],PNAME_NS:["pathPrimary","?pathMod"]},pathEltOrInverse:{a:["pathElt"],"!":["pathElt"],"(":["pathElt"],IRI_REF:["pathElt"],PNAME_LN:["pathElt"],PNAME_NS:["pathElt"],"^":["^","pathElt"]},pathMod:{"*":["*"],"?":["?"],"+":["+"],"{":["{","or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])"]},pathNegatedPropertySet:{a:["pathOneInPropertySet"],"^":["pathOneInPropertySet"],IRI_REF:["pathOneInPropertySet"],PNAME_LN:["pathOneInPropertySet"],PNAME_NS:["pathOneInPropertySet"],"(":["(","?[pathOneInPropertySet,*[|,pathOneInPropertySet]]",")"]},pathOneInPropertySet:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"],"^":["^","or([iriRef,a])"]},pathPrimary:{IRI_REF:["storeProperty","iriRef"],PNAME_LN:["storeProperty","iriRef"],PNAME_NS:["storeProperty","iriRef"],a:["storeProperty","a"],"!":["!","pathNegatedPropertySet"],"(":["(","path",")"]},pathSequence:{"^":["pathEltOrInverse","*[/,pathEltOrInverse]"],a:["pathEltOrInverse","*[/,pathEltOrInverse]"],"!":["pathEltOrInverse","*[/,pathEltOrInverse]"],"(":["pathEltOrInverse","*[/,pathEltOrInverse]"],IRI_REF:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_LN:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_NS:["pathEltOrInverse","*[/,pathEltOrInverse]"]},prefixDecl:{PREFIX:["PREFIX","PNAME_NS","IRI_REF"]},prefixedName:{PNAME_LN:["PNAME_LN"],PNAME_NS:["PNAME_NS"]},primaryExpression:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["iriRefOrFunction"],PNAME_LN:["iriRefOrFunction"],PNAME_NS:["iriRefOrFunction"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],VAR1:["var"],VAR2:["var"],COUNT:["aggregate"],SUM:["aggregate"],MIN:["aggregate"],MAX:["aggregate"],AVG:["aggregate"],SAMPLE:["aggregate"],GROUP_CONCAT:["aggregate"]},prologue:{PREFIX:["?baseDecl","*prefixDecl"],BASE:["?baseDecl","*prefixDecl"],$:["?baseDecl","*prefixDecl"],CONSTRUCT:["?baseDecl","*prefixDecl"],DESCRIBE:["?baseDecl","*prefixDecl"],ASK:["?baseDecl","*prefixDecl"],INSERT:["?baseDecl","*prefixDecl"],DELETE:["?baseDecl","*prefixDecl"],SELECT:["?baseDecl","*prefixDecl"],LOAD:["?baseDecl","*prefixDecl"],CLEAR:["?baseDecl","*prefixDecl"],DROP:["?baseDecl","*prefixDecl"],ADD:["?baseDecl","*prefixDecl"],MOVE:["?baseDecl","*prefixDecl"],COPY:["?baseDecl","*prefixDecl"],CREATE:["?baseDecl","*prefixDecl"],WITH:["?baseDecl","*prefixDecl"]},propertyList:{a:["propertyListNotEmpty"],VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"}":[],GRAPH:[]},propertyListNotEmpty:{a:["verb","objectList","*[;,?[verb,objectList]]"],VAR1:["verb","objectList","*[;,?[verb,objectList]]"],VAR2:["verb","objectList","*[;,?[verb,objectList]]"],IRI_REF:["verb","objectList","*[;,?[verb,objectList]]"],PNAME_LN:["verb","objectList","*[;,?[verb,objectList]]"],PNAME_NS:["verb","objectList","*[;,?[verb,objectList]]"]},propertyListPath:{a:["propertyListNotEmpty"],VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},propertyListPathNotEmpty:{VAR1:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],VAR2:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"^":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],a:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"!":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"(":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],IRI_REF:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_LN:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_NS:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"]},quadData:{"{":["{","disallowVars","quads","allowVars","}"]},quadDataNoBnodes:{"{":["{","disallowBnodes","disallowVars","quads","allowVars","allowBnodes","}"]},quadPattern:{"{":["{","quads","}"]},quadPatternNoBnodes:{"{":["{","disallowBnodes","quads","allowBnodes","}"]},quads:{GRAPH:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],NIL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"(":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"[":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],IRI_REF:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],TRUE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],FALSE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],BLANK_NODE_LABEL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],ANON:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_LN:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_NS:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"}":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"]},quadsNotTriples:{GRAPH:["GRAPH","varOrIRIref","{","?triplesTemplate","}"]},queryAll:{CONSTRUCT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],DESCRIBE:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],ASK:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],SELECT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"]},rdfLiteral:{STRING_LITERAL1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL2:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG2:["string","?or([LANGTAG,[^^,iriRef]])"]},regexExpression:{REGEX:["REGEX","(","expression",",","expression","?[,,expression]",")"]},relationalExpression:{"!":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"+":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"-":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"(":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANGMATCHES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DATATYPE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BOUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BNODE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],RAND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ABS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CEIL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FLOOR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ROUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLEN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ENCODE_FOR_URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONTAINS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRSTARTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRENDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRBEFORE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRAFTER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],YEAR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MONTH:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DAY:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],HOURS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MINUTES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SECONDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TIMEZONE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TZ:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOW:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRUUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MD5:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA256:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA384:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA512:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COALESCE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRDT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMETERM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISIRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISURI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISBLANK:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISLITERAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISNUMERIC:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TRUE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FALSE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COUNT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MIN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MAX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AVG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMPLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],GROUP_CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUBSTR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REPLACE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REGEX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],EXISTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI_REF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_LN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_NS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"]},selectClause:{SELECT:["SELECT","?or([DISTINCT,REDUCED])","or([+or([var,[ (,expression,AS,var,)]]),*])"]},selectQuery:{SELECT:["selectClause","*datasetClause","whereClause","solutionModifier"]},serviceGraphPattern:{SERVICE:["SERVICE","?SILENT","varOrIRIref","groupGraphPattern"]},solutionModifier:{LIMIT:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],OFFSET:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],ORDER:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],HAVING:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],GROUP:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],VALUES:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],$:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],"}":["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"]},sourceSelector:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},sparql11:{$:["prologue","or([queryAll,updateAll])","$"],CONSTRUCT:["prologue","or([queryAll,updateAll])","$"],DESCRIBE:["prologue","or([queryAll,updateAll])","$"],ASK:["prologue","or([queryAll,updateAll])","$"],INSERT:["prologue","or([queryAll,updateAll])","$"],DELETE:["prologue","or([queryAll,updateAll])","$"],SELECT:["prologue","or([queryAll,updateAll])","$"],LOAD:["prologue","or([queryAll,updateAll])","$"],CLEAR:["prologue","or([queryAll,updateAll])","$"],DROP:["prologue","or([queryAll,updateAll])","$"],ADD:["prologue","or([queryAll,updateAll])","$"],MOVE:["prologue","or([queryAll,updateAll])","$"],COPY:["prologue","or([queryAll,updateAll])","$"],CREATE:["prologue","or([queryAll,updateAll])","$"],WITH:["prologue","or([queryAll,updateAll])","$"],PREFIX:["prologue","or([queryAll,updateAll])","$"],BASE:["prologue","or([queryAll,updateAll])","$"]},storeProperty:{VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[],a:[]},strReplaceExpression:{REPLACE:["REPLACE","(","expression",",","expression",",","expression","?[,,expression]",")"]},string:{STRING_LITERAL1:["STRING_LITERAL1"],STRING_LITERAL2:["STRING_LITERAL2"],STRING_LITERAL_LONG1:["STRING_LITERAL_LONG1"],STRING_LITERAL_LONG2:["STRING_LITERAL_LONG2"]},subSelect:{SELECT:["selectClause","whereClause","solutionModifier","valuesClause"]},substringExpression:{SUBSTR:["SUBSTR","(","expression",",","expression","?[,,expression]",")"]},triplesBlock:{VAR1:["triplesSameSubjectPath","?[.,?triplesBlock]"],VAR2:["triplesSameSubjectPath","?[.,?triplesBlock]"],NIL:["triplesSameSubjectPath","?[.,?triplesBlock]"],"(":["triplesSameSubjectPath","?[.,?triplesBlock]"],"[":["triplesSameSubjectPath","?[.,?triplesBlock]"],IRI_REF:["triplesSameSubjectPath","?[.,?triplesBlock]"],TRUE:["triplesSameSubjectPath","?[.,?triplesBlock]"],FALSE:["triplesSameSubjectPath","?[.,?triplesBlock]"],BLANK_NODE_LABEL:["triplesSameSubjectPath","?[.,?triplesBlock]"],ANON:["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_LN:["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_NS:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL2:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG2:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"]},triplesNode:{"(":["collection"],"[":["blankNodePropertyList"]},triplesNodePath:{"(":["collectionPath"],"[":["blankNodePropertyListPath"]},triplesSameSubject:{VAR1:["varOrTerm","propertyListNotEmpty"],VAR2:["varOrTerm","propertyListNotEmpty"],NIL:["varOrTerm","propertyListNotEmpty"],IRI_REF:["varOrTerm","propertyListNotEmpty"],TRUE:["varOrTerm","propertyListNotEmpty"],FALSE:["varOrTerm","propertyListNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListNotEmpty"],ANON:["varOrTerm","propertyListNotEmpty"],PNAME_LN:["varOrTerm","propertyListNotEmpty"],PNAME_NS:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListNotEmpty"],INTEGER:["varOrTerm","propertyListNotEmpty"],DECIMAL:["varOrTerm","propertyListNotEmpty"],DOUBLE:["varOrTerm","propertyListNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListNotEmpty"],"(":["triplesNode","propertyList"],"[":["triplesNode","propertyList"]},triplesSameSubjectPath:{VAR1:["varOrTerm","propertyListPathNotEmpty"],VAR2:["varOrTerm","propertyListPathNotEmpty"],NIL:["varOrTerm","propertyListPathNotEmpty"],IRI_REF:["varOrTerm","propertyListPathNotEmpty"],TRUE:["varOrTerm","propertyListPathNotEmpty"],FALSE:["varOrTerm","propertyListPathNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListPathNotEmpty"],ANON:["varOrTerm","propertyListPathNotEmpty"],PNAME_LN:["varOrTerm","propertyListPathNotEmpty"],PNAME_NS:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListPathNotEmpty"],INTEGER:["varOrTerm","propertyListPathNotEmpty"],DECIMAL:["varOrTerm","propertyListPathNotEmpty"],DOUBLE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],"(":["triplesNodePath","propertyListPath"],"[":["triplesNodePath","propertyListPath"]},triplesTemplate:{VAR1:["triplesSameSubject","?[.,?triplesTemplate]"],VAR2:["triplesSameSubject","?[.,?triplesTemplate]"],NIL:["triplesSameSubject","?[.,?triplesTemplate]"],"(":["triplesSameSubject","?[.,?triplesTemplate]"],"[":["triplesSameSubject","?[.,?triplesTemplate]"],IRI_REF:["triplesSameSubject","?[.,?triplesTemplate]"],TRUE:["triplesSameSubject","?[.,?triplesTemplate]"],FALSE:["triplesSameSubject","?[.,?triplesTemplate]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?triplesTemplate]"],ANON:["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_LN:["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_NS:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL2:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"]},unaryExpression:{"!":["!","primaryExpression"],"+":["+","primaryExpression"],"-":["-","primaryExpression"],VAR1:["primaryExpression"],VAR2:["primaryExpression"],"(":["primaryExpression"],STR:["primaryExpression"],LANG:["primaryExpression"],LANGMATCHES:["primaryExpression"],DATATYPE:["primaryExpression"],BOUND:["primaryExpression"],IRI:["primaryExpression"],URI:["primaryExpression"],BNODE:["primaryExpression"],RAND:["primaryExpression"],ABS:["primaryExpression"],CEIL:["primaryExpression"],FLOOR:["primaryExpression"],ROUND:["primaryExpression"],CONCAT:["primaryExpression"],STRLEN:["primaryExpression"],UCASE:["primaryExpression"],LCASE:["primaryExpression"],ENCODE_FOR_URI:["primaryExpression"],CONTAINS:["primaryExpression"],STRSTARTS:["primaryExpression"],STRENDS:["primaryExpression"],STRBEFORE:["primaryExpression"],STRAFTER:["primaryExpression"],YEAR:["primaryExpression"],MONTH:["primaryExpression"],DAY:["primaryExpression"],HOURS:["primaryExpression"],MINUTES:["primaryExpression"],SECONDS:["primaryExpression"],TIMEZONE:["primaryExpression"],TZ:["primaryExpression"],NOW:["primaryExpression"],UUID:["primaryExpression"],STRUUID:["primaryExpression"],MD5:["primaryExpression"],SHA1:["primaryExpression"],SHA256:["primaryExpression"],SHA384:["primaryExpression"],SHA512:["primaryExpression"],COALESCE:["primaryExpression"],IF:["primaryExpression"],STRLANG:["primaryExpression"],STRDT:["primaryExpression"],SAMETERM:["primaryExpression"],ISIRI:["primaryExpression"],ISURI:["primaryExpression"],ISBLANK:["primaryExpression"],ISLITERAL:["primaryExpression"],ISNUMERIC:["primaryExpression"],TRUE:["primaryExpression"],FALSE:["primaryExpression"],COUNT:["primaryExpression"],SUM:["primaryExpression"],MIN:["primaryExpression"],MAX:["primaryExpression"],AVG:["primaryExpression"],SAMPLE:["primaryExpression"],GROUP_CONCAT:["primaryExpression"],SUBSTR:["primaryExpression"],REPLACE:["primaryExpression"],REGEX:["primaryExpression"],EXISTS:["primaryExpression"],NOT:["primaryExpression"],IRI_REF:["primaryExpression"],STRING_LITERAL1:["primaryExpression"],STRING_LITERAL2:["primaryExpression"],STRING_LITERAL_LONG1:["primaryExpression"],STRING_LITERAL_LONG2:["primaryExpression"],INTEGER:["primaryExpression"],DECIMAL:["primaryExpression"],DOUBLE:["primaryExpression"],INTEGER_POSITIVE:["primaryExpression"],DECIMAL_POSITIVE:["primaryExpression"],DOUBLE_POSITIVE:["primaryExpression"],INTEGER_NEGATIVE:["primaryExpression"],DECIMAL_NEGATIVE:["primaryExpression"],DOUBLE_NEGATIVE:["primaryExpression"],PNAME_LN:["primaryExpression"],PNAME_NS:["primaryExpression"]},update:{INSERT:["prologue","?[update1,?[;,update]]"],DELETE:["prologue","?[update1,?[;,update]]"],LOAD:["prologue","?[update1,?[;,update]]"],CLEAR:["prologue","?[update1,?[;,update]]"],DROP:["prologue","?[update1,?[;,update]]"],ADD:["prologue","?[update1,?[;,update]]"],MOVE:["prologue","?[update1,?[;,update]]"],COPY:["prologue","?[update1,?[;,update]]"],CREATE:["prologue","?[update1,?[;,update]]"],WITH:["prologue","?[update1,?[;,update]]"],PREFIX:["prologue","?[update1,?[;,update]]"],BASE:["prologue","?[update1,?[;,update]]"],$:["prologue","?[update1,?[;,update]]"]},update1:{LOAD:["load"],CLEAR:["clear"],DROP:["drop"],ADD:["add"],MOVE:["move"],COPY:["copy"],CREATE:["create"],INSERT:["INSERT","insert1"],DELETE:["DELETE","delete1"],WITH:["modify"]},updateAll:{INSERT:["?[update1,?[;,update]]"],DELETE:["?[update1,?[;,update]]"],LOAD:["?[update1,?[;,update]]"],CLEAR:["?[update1,?[;,update]]"],DROP:["?[update1,?[;,update]]"],ADD:["?[update1,?[;,update]]"],MOVE:["?[update1,?[;,update]]"],COPY:["?[update1,?[;,update]]"],CREATE:["?[update1,?[;,update]]"],WITH:["?[update1,?[;,update]]"],$:["?[update1,?[;,update]]"]},usingClause:{USING:["USING","or([iriRef,[NAMED,iriRef]])"]},valueLogical:{"!":["relationalExpression"],"+":["relationalExpression"],"-":["relationalExpression"],VAR1:["relationalExpression"],VAR2:["relationalExpression"],"(":["relationalExpression"],STR:["relationalExpression"],LANG:["relationalExpression"],LANGMATCHES:["relationalExpression"],DATATYPE:["relationalExpression"],BOUND:["relationalExpression"],IRI:["relationalExpression"],URI:["relationalExpression"],BNODE:["relationalExpression"],RAND:["relationalExpression"],ABS:["relationalExpression"],CEIL:["relationalExpression"],FLOOR:["relationalExpression"],ROUND:["relationalExpression"],CONCAT:["relationalExpression"],STRLEN:["relationalExpression"],UCASE:["relationalExpression"],LCASE:["relationalExpression"],ENCODE_FOR_URI:["relationalExpression"],CONTAINS:["relationalExpression"],STRSTARTS:["relationalExpression"],STRENDS:["relationalExpression"],STRBEFORE:["relationalExpression"],STRAFTER:["relationalExpression"],YEAR:["relationalExpression"],MONTH:["relationalExpression"],DAY:["relationalExpression"],HOURS:["relationalExpression"],MINUTES:["relationalExpression"],SECONDS:["relationalExpression"],TIMEZONE:["relationalExpression"],TZ:["relationalExpression"],NOW:["relationalExpression"],UUID:["relationalExpression"],STRUUID:["relationalExpression"],MD5:["relationalExpression"],SHA1:["relationalExpression"],SHA256:["relationalExpression"],SHA384:["relationalExpression"],SHA512:["relationalExpression"],COALESCE:["relationalExpression"],IF:["relationalExpression"],STRLANG:["relationalExpression"],STRDT:["relationalExpression"],SAMETERM:["relationalExpression"],ISIRI:["relationalExpression"],ISURI:["relationalExpression"],ISBLANK:["relationalExpression"],ISLITERAL:["relationalExpression"],ISNUMERIC:["relationalExpression"],TRUE:["relationalExpression"],FALSE:["relationalExpression"],COUNT:["relationalExpression"],SUM:["relationalExpression"],MIN:["relationalExpression"],MAX:["relationalExpression"],AVG:["relationalExpression"],SAMPLE:["relationalExpression"],GROUP_CONCAT:["relationalExpression"],SUBSTR:["relationalExpression"],REPLACE:["relationalExpression"],REGEX:["relationalExpression"],EXISTS:["relationalExpression"],NOT:["relationalExpression"],IRI_REF:["relationalExpression"],STRING_LITERAL1:["relationalExpression"],STRING_LITERAL2:["relationalExpression"],STRING_LITERAL_LONG1:["relationalExpression"],STRING_LITERAL_LONG2:["relationalExpression"],INTEGER:["relationalExpression"],DECIMAL:["relationalExpression"],DOUBLE:["relationalExpression"],INTEGER_POSITIVE:["relationalExpression"],DECIMAL_POSITIVE:["relationalExpression"],DOUBLE_POSITIVE:["relationalExpression"],INTEGER_NEGATIVE:["relationalExpression"],DECIMAL_NEGATIVE:["relationalExpression"],DOUBLE_NEGATIVE:["relationalExpression"],PNAME_LN:["relationalExpression"],PNAME_NS:["relationalExpression"]},valuesClause:{VALUES:["VALUES","dataBlock"],$:[],"}":[]},"var":{VAR1:["VAR1"],VAR2:["VAR2"]},varOrIRIref:{VAR1:["var"],VAR2:["var"],IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},varOrTerm:{VAR1:["var"],VAR2:["var"],NIL:["graphTerm"],IRI_REF:["graphTerm"],TRUE:["graphTerm"],FALSE:["graphTerm"],BLANK_NODE_LABEL:["graphTerm"],ANON:["graphTerm"],PNAME_LN:["graphTerm"],PNAME_NS:["graphTerm"],STRING_LITERAL1:["graphTerm"],STRING_LITERAL2:["graphTerm"],STRING_LITERAL_LONG1:["graphTerm"],STRING_LITERAL_LONG2:["graphTerm"],INTEGER:["graphTerm"],DECIMAL:["graphTerm"],DOUBLE:["graphTerm"],INTEGER_POSITIVE:["graphTerm"],DECIMAL_POSITIVE:["graphTerm"],DOUBLE_POSITIVE:["graphTerm"],INTEGER_NEGATIVE:["graphTerm"],DECIMAL_NEGATIVE:["graphTerm"],DOUBLE_NEGATIVE:["graphTerm"]},verb:{VAR1:["storeProperty","varOrIRIref"],VAR2:["storeProperty","varOrIRIref"],IRI_REF:["storeProperty","varOrIRIref"],PNAME_LN:["storeProperty","varOrIRIref"],PNAME_NS:["storeProperty","varOrIRIref"],a:["storeProperty","a"]},verbPath:{"^":["path"],a:["path"],"!":["path"],"(":["path"],IRI_REF:["path"],PNAME_LN:["path"],PNAME_NS:["path"]},verbSimple:{VAR1:["var"],VAR2:["var"]},whereClause:{"{":["?WHERE","groupGraphPattern"],WHERE:["?WHERE","groupGraphPattern"]}}),s=/^(GROUP_CONCAT|DATATYPE|BASE|PREFIX|SELECT|CONSTRUCT|DESCRIBE|ASK|FROM|NAMED|ORDER|BY|LIMIT|ASC|DESC|OFFSET|DISTINCT|REDUCED|WHERE|GRAPH|OPTIONAL|UNION|FILTER|GROUP|HAVING|AS|VALUES|LOAD|CLEAR|DROP|CREATE|MOVE|COPY|SILENT|INSERT|DELETE|DATA|WITH|TO|USING|NAMED|MINUS|BIND|LANGMATCHES|LANG|BOUND|SAMETERM|ISIRI|ISURI|ISBLANK|ISLITERAL|REGEX|TRUE|FALSE|UNDEF|ADD|DEFAULT|ALL|SERVICE|INTO|IN|NOT|IRI|URI|BNODE|RAND|ABS|CEIL|FLOOR|ROUND|CONCAT|STRLEN|UCASE|LCASE|ENCODE_FOR_URI|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|NOW|UUID|STRUUID|MD5|SHA1|SHA256|SHA384|SHA512|COALESCE|IF|STRLANG|STRDT|ISNUMERIC|SUBSTR|REPLACE|EXISTS|COUNT|SUM|MIN|MAX|AVG|SAMPLE|SEPARATOR|STR)/i,a=/^(\*|a|\.|\{|\}|,|\(|\)|;|\[|\]|\|\||&&|=|!=|!|<=|>=|<|>|\+|-|\/|\^\^|\?|\||\^)/,l=null,u="sparql11",p="sparql11",c=!0,d=t(),E=d.terminal,h={"*[,, object]":3,"*[(,),object]":3,"*[(,),objectPath]":3,"*[/,pathEltOrInverse]":2,object:2,objectPath:2,objectList:2,objectListPath:2,storeProperty:2,pathMod:2,"?pathMod":2,propertyListNotEmpty:1,propertyList:1,propertyListPath:1,propertyListPathNotEmpty:1,"?[verb,objectList]":1,"?[or([verbPath, verbSimple]),objectList]":1},f={"}":1,"]":0,")":1,"{":-1,"(":-1,"*[;,?[or([verbPath,verbSimple]),objectList]]":1}; return{token:i,startState:function(){return{tokenize:i,OK:!0,complete:c,errorStartPos:null,errorEndPos:null,queryType:l,possibleCurrent:r(p),possibleNext:r(p),allowVars:!0,allowBnodes:!0,storeProperty:!1,lastProperty:"",stack:[p]}},indent:n,electricChars:"}])"}}),e.defineMIME("application/x-sparql-query","sparql11")})},{codemirror:7}],2:[function(e,t){t.exports=Trie=function(){this.words=0,this.prefixes=0,this.children=[]},Trie.prototype={insert:function(e,t){if(0!=e.length){var r,i,n=this;if(void 0===t&&(t=0),t===e.length)return void n.words++;n.prefixes++,r=e[t],void 0===n.children[r]&&(n.children[r]=new Trie),i=n.children[r],i.insert(e,t+1)}},remove:function(e,t){if(0!=e.length){var r,i,n=this;if(void 0===t&&(t=0),void 0!==n){if(t===e.length)return void n.words--;n.prefixes--,r=e[t],i=n.children[r],i.remove(e,t+1)}}},update:function(e,t){0!=e.length&&0!=t.length&&(this.remove(e),this.insert(t))},countWord:function(e,t){if(0==e.length)return 0;var r,i,n=this,o=0;return void 0===t&&(t=0),t===e.length?n.words:(r=e[t],i=n.children[r],void 0!==i&&(o=i.countWord(e,t+1)),o)},countPrefix:function(e,t){if(0==e.length)return 0;var r,i,n=this,o=0;if(void 0===t&&(t=0),t===e.length)return n.prefixes;var r=e[t];return i=n.children[r],void 0!==i&&(o=i.countPrefix(e,t+1)),o},find:function(e){return 0==e.length?!1:this.countWord(e)>0?!0:!1},getAllWords:function(e){var t,r,i=this,n=[];if(void 0===e&&(e=""),void 0===i)return[];i.words>0&&n.push(e);for(t in i.children)r=i.children[t],n=n.concat(r.getAllWords(e+t));return n},autoComplete:function(e,t){if(0==e.length)return[];var r,i,n=this;return void 0===t&&(t=0),r=e[t],i=n.children[r],void 0===i?[]:t===e.length-1?i.getAllWords(e):i.autoComplete(e,t+1)}}},{}],3:[function(t,r,i){!function(n){"object"==typeof i&&"object"==typeof r?n(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],n):n(CodeMirror)}(function(e){function t(e,t,i,n){var o=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&a[o.text.charAt(l)]||a[o.text.charAt(++l)];if(!u)return null;var p=">"==u.charAt(1)?1:-1;if(i&&p>0!=(l==t.ch))return null;var c=e.getTokenTypeAt(s(t.line,l+1)),d=r(e,s(t.line,l+(p>0?1:0)),p,c||null,n);return null==d?null:{from:s(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:p>0}}function r(e,t,r,i,n){for(var o=n&&n.maxScanLineLength||1e4,l=n&&n.maxScanLines||1e3,u=[],p=n&&n.bracketRegex?n.bracketRegex:/[(){}[\]]/,c=r>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=c;d+=r){var E=e.getLine(d);if(E){var h=r>0?0:E.length-1,f=r>0?E.length:-1;if(!(E.length>o))for(d==t.line&&(h=t.ch-(0>r?1:0));h!=f;h+=r){var m=E.charAt(h);if(p.test(m)&&(void 0===i||e.getTokenTypeAt(s(d,h+1))==i)){var g=a[m];if(">"==g.charAt(1)==r>0)u.push(m);else{if(!u.length)return{pos:s(d,h),ch:m};u.pop()}}}}}return d-r==(r>0?e.lastLine():e.firstLine())?!1:null}function i(e,r,i){for(var n=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],l=e.listSelections(),u=0;u<l.length;u++){var p=l[u].empty()&&t(e,l[u].head,!1,i);if(p&&e.getLine(p.from.line).length<=n){var c=p.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(p.from,s(p.from.line,p.from.ch+1),{className:c})),p.to&&e.getLine(p.to.line).length<=n&&a.push(e.markText(p.to,s(p.to.line,p.to.ch+1),{className:c}))}}if(a.length){o&&e.state.focused&&e.display.input.focus();var d=function(){e.operation(function(){for(var e=0;e<a.length;e++)a[e].clear()})};if(!r)return d;setTimeout(d,800)}}function n(e){e.operation(function(){l&&(l(),l=null),l=i(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),s=e.Pos,a={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,r,i){i&&i!=e.Init&&t.off("cursorActivity",n),r&&(t.state.matchBrackets="object"==typeof r?r:{},t.on("cursorActivity",n))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,r,i){return t(this,e,r,i)}),e.defineExtension("scanForBracket",function(e,t,i,n){return r(this,e,t,i,n)})})},{"../../lib/codemirror":7}],4:[function(t,r,i){!function(n){"object"==typeof i&&"object"==typeof r?n(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],n):n(CodeMirror)}(function(e){"use strict";function t(e,t,r){this.cm=e,this.getHints=t,this.options=r,this.widget=this.onClose=null}function r(e){return"string"==typeof e?e:e.text}function i(e,t){function r(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:i.hasOwnProperty(r)?i[r]:r,n[e]=o}var i={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},n=e.customKeys?{}:i;if(e.customKeys)for(var o in e.customKeys)e.customKeys.hasOwnProperty(o)&&r(o,e.customKeys[o]);if(e.extraKeys)for(var o in e.extraKeys)e.extraKeys.hasOwnProperty(o)&&r(o,e.extraKeys[o]);return n}function n(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function o(t,o){this.completion=t,this.data=o;var l=this,u=t.cm,p=t.options,c=this.hints=document.createElement("ul");c.className="CodeMirror-hints",this.selectedHint=p.getDefaultSelection?p.getDefaultSelection(u,p,o):0;for(var d=o.list,E=0;E<d.length;++E){var h=c.appendChild(document.createElement("li")),f=d[E],m=s+(E!=this.selectedHint?"":" "+a);null!=f.className&&(m=f.className+" "+m),h.className=m,f.render?f.render(h,o,f):h.appendChild(document.createTextNode(f.displayText||r(f))),h.hintId=E}var g=u.cursorCoords(p.alignWithWord!==!1?o.from:null),v=g.left,x=g.bottom,N=!0;c.style.left=v+"px",c.style.top=x+"px";var L=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),I=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(p.container||document.body).appendChild(c);var T=c.getBoundingClientRect(),y=T.bottom-I;if(y>0){var A=T.bottom-T.top,S=T.top-(g.bottom-g.top);if(S-A>0)c.style.top=(x=S-A)+"px",N=!1;else if(A>I){c.style.height=I-5+"px",c.style.top=(x=g.bottom-T.top)+"px";var C=u.getCursor();o.from.ch!=C.ch&&(g=u.cursorCoords(C),c.style.left=(v=g.left)+"px",T=c.getBoundingClientRect())}}var R=T.left-L;if(R>0&&(T.right-T.left>L&&(c.style.width=L-5+"px",R-=T.right-T.left-L),c.style.left=(v=g.left-R)+"px"),u.addKeyMap(this.keyMap=i(p,{moveFocus:function(e,t){l.changeActive(l.selectedHint+e,t)},setFocus:function(e){l.changeActive(e)},menuSize:function(){return l.screenAmount()},length:d.length,close:function(){t.close()},pick:function(){l.pick()},data:o})),p.closeOnUnfocus!==!1){var b;u.on("blur",this.onBlur=function(){b=setTimeout(function(){t.close()},100)}),u.on("focus",this.onFocus=function(){clearTimeout(b)})}var O=u.getScrollInfo();return u.on("scroll",this.onScroll=function(){var e=u.getScrollInfo(),r=u.getWrapperElement().getBoundingClientRect(),i=x+O.top-e.top,n=i-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return N||(n+=c.offsetHeight),n<=r.top||n>=r.bottom?t.close():(c.style.top=i+"px",void(c.style.left=v+O.left-e.left+"px"))}),e.on(c,"dblclick",function(e){var t=n(c,e.target||e.srcElement);t&&null!=t.hintId&&(l.changeActive(t.hintId),l.pick())}),e.on(c,"click",function(e){var t=n(c,e.target||e.srcElement);t&&null!=t.hintId&&(l.changeActive(t.hintId),p.completeOnSingleClick&&l.pick())}),e.on(c,"mousedown",function(){setTimeout(function(){u.focus()},20)}),e.signal(o,"select",d[0],c.firstChild),!0}var s="CodeMirror-hint",a="CodeMirror-hint-active";e.showHint=function(r,i,n){if(!(r.listSelections().length>1||r.somethingSelected())){if(null==i){if(n&&n.async)return;i=e.hint.auto}r.state.completionActive&&r.state.completionActive.close();var o=r.state.completionActive=new t(r,i,n||{});return e.signal(r,"startCompletion",r),o.options.async?void i(r,function(e){o.showHints(e)},o.options):o.showHints(i(r,o.options))}},t.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.widget&&this.widget.close(),this.onClose&&this.onClose(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,i){var n=t.list[i];n.hint?n.hint(this.cm,t,n):this.cm.replaceRange(r(n),n.from||t.from,n.to||t.to,"complete"),e.signal(t,"pick",n),this.close()},showHints:function(e){return e&&e.list.length&&this.active()?void(0!=this.options.completeSingle&&1==e.list.length?this.pick(e,0):this.showWidget(e)):this.close()},showWidget:function(t){function r(){l||(l=!0,p.close(),p.cm.off("cursorActivity",a),t&&e.signal(t,"close"))}function i(){l||(e.signal(t,"update"),p.options.async?p.getHints(p.cm,n,p.options):n(p.getHints(p.cm,p.options)))}function n(e){if(t=e,!l){if(!t||!t.list.length)return r();p.widget&&p.widget.close(),p.widget=new o(p,t)}}function s(){u&&(f(u),u=0)}function a(){s();var e=p.cm.getCursor(),t=p.cm.getLine(e.line);e.line!=d.line||t.length-e.ch!=E-d.ch||e.ch<d.ch||p.cm.somethingSelected()||e.ch&&c.test(t.charAt(e.ch-1))?p.close():(u=h(i),p.widget&&p.widget.close())}this.widget=new o(this,t),e.signal(t,"shown");var l,u=0,p=this,c=this.options.closeCharacters||/[\s()\[\]{};:>,]/,d=this.cm.getCursor(),E=this.cm.getLine(d.line).length,h=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},f=window.cancelAnimationFrame||clearTimeout;this.cm.on("cursorActivity",a),this.onClose=r}},o.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm;this.completion.options.closeOnUnfocus!==!1&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,r){if(t>=this.data.list.length?t=r?this.data.list.length-1:0:0>t&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i.className=i.className.replace(" "+a,""),i=this.hints.childNodes[this.selectedHint=t],i.className+=" "+a,i.offsetTop<this.hints.scrollTop?this.hints.scrollTop=i.offsetTop-3:i.offsetTop+i.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",function(t,r){var i,n=t.getHelpers(t.getCursor(),"hint");if(n.length)for(var o=0;o<n.length;o++){var s=n[o](t,r);if(s&&s.list.length)return s}else if(i=t.getHelper(t.getCursor(),"hintWords")){if(i)return e.hint.fromList(t,{words:i})}else if(e.hint.anyword)return e.hint.anyword(t,r)}),e.registerHelper("hint","fromList",function(t,r){for(var i=t.getCursor(),n=t.getTokenAt(i),o=[],s=0;s<r.words.length;s++){var a=r.words[s];a.slice(0,n.string.length)==n.string&&o.push(a)}return o.length?{list:o,from:e.Pos(i.line,n.start),to:e.Pos(i.line,n.end)}:void 0}),e.commands.autocomplete=e.showHint})},{"../../lib/codemirror":7}],5:[function(t,r,i){!function(n){"object"==typeof i&&"object"==typeof r?n(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],n):n(CodeMirror)}(function(e){"use strict";e.runMode=function(t,r,i,n){var o=e.getMode(e.defaults,r),s=/MSIE \d/.test(navigator.userAgent),a=s&&(null==document.documentMode||document.documentMode<9);if(1==i.nodeType){var l=n&&n.tabSize||e.defaults.tabSize,u=i,p=0;u.innerHTML="",i=function(e,t){if("\n"==e)return u.appendChild(document.createTextNode(a?"\r":e)),void(p=0);for(var r="",i=0;;){var n=e.indexOf(" ",i);if(-1==n){r+=e.slice(i),p+=e.length-i;break}p+=n-i,r+=e.slice(i,n);var o=l-p%l;p+=o;for(var s=0;o>s;++s)r+=" ";i=n+1}if(t){var c=u.appendChild(document.createElement("span"));c.className="cm-"+t.replace(/ +/g," cm-"),c.appendChild(document.createTextNode(r))}else u.appendChild(document.createTextNode(r))}}for(var c=e.splitLines(t),d=n&&n.state||e.startState(o),E=0,h=c.length;h>E;++E){E&&i("\n");var f=new e.StringStream(c[E]);for(!f.string&&o.blankLine&&o.blankLine();!f.eol();){var m=o.token(f,d);i(f.current(),m,E,f.start,d),f.start=f.pos}}}})},{"../../lib/codemirror":7}],6:[function(t,r,i){!function(n){"object"==typeof i&&"object"==typeof r?n(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],n):n(CodeMirror)}(function(e){"use strict";function t(e,t,n,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof t&&(o=!1),n=n?e.clipPos(n):i(0,0),this.pos={from:n,to:n},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(r,n){if(r){t.lastIndex=0;for(var o,s,a=e.getLine(n.line).slice(0,n.ch),l=0;;){t.lastIndex=l;var u=t.exec(a);if(!u)break;if(o=u,s=o.index,l=o.index+(o[0].length||1),l==a.length)break}var p=o&&o[0].length||0;p||(0==s&&0==a.length?o=void 0:s!=e.getLine(n.line).length&&p++)}else{t.lastIndex=n.ch;var a=e.getLine(n.line),o=t.exec(a),p=o&&o[0].length||0,s=o&&o.index;s+p==a.length||p||(p=1)}return o&&p?{from:i(n.line,s),to:i(n.line,s+p),match:o}:void 0};else{var s=t;o&&(t=t.toLowerCase());var a=o?function(e){return e.toLowerCase()}:function(e){return e},l=t.split("\n");if(1==l.length)this.matches=t.length?function(n,o){if(n){var l=e.getLine(o.line).slice(0,o.ch),u=a(l),p=u.lastIndexOf(t);if(p>-1)return p=r(l,u,p),{from:i(o.line,p),to:i(o.line,p+s.length)}}else{var l=e.getLine(o.line).slice(o.ch),u=a(l),p=u.indexOf(t);if(p>-1)return p=r(l,u,p)+o.ch,{from:i(o.line,p),to:i(o.line,p+s.length)}}}:function(){};else{var u=s.split("\n");this.matches=function(t,r){var n=l.length-1;if(t){if(r.line-(l.length-1)<e.firstLine())return;if(a(e.getLine(r.line).slice(0,u[n].length))!=l[l.length-1])return;for(var o=i(r.line,u[n].length),s=r.line-1,p=n-1;p>=1;--p,--s)if(l[p]!=a(e.getLine(s)))return;var c=e.getLine(s),d=c.length-u[0].length;if(a(c.slice(d))!=l[0])return;return{from:i(s,d),to:o}}if(!(r.line+(l.length-1)>e.lastLine())){var c=e.getLine(r.line),d=c.length-u[0].length;if(a(c.slice(d))==l[0]){for(var E=i(r.line,d),s=r.line+1,p=1;n>p;++p,++s)if(l[p]!=a(e.getLine(s)))return;if(e.getLine(s).slice(0,u[n].length)==l[n])return{from:E,to:i(s,u[n].length)}}}}}}}function r(e,t,r){if(e.length==t.length)return r;for(var i=Math.min(r,e.length);;){var n=e.slice(0,i).toLowerCase().length;if(r>n)++i;else{if(!(n>r))return i;--i}}}var i=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=i(e,0);return r.pos={from:t,to:t},r.atOccurrence=!1,!1}for(var r=this,n=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,n))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!n.line)return t(0);n=i(n.line-1,this.doc.getLine(n.line-1).length)}else{var o=this.doc.lineCount();if(n.line==o-1)return t(o);n=i(n.line+1,0)}}},from:function(){return this.atOccurrence?this.pos.from:void 0},to:function(){return this.atOccurrence?this.pos.to:void 0},replace:function(t){if(this.atOccurrence){var r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to),this.pos.to=i(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,r,i){return new t(this.doc,e,r,i)}),e.defineDocExtension("getSearchCursor",function(e,r,i){return new t(this,e,r,i)}),e.defineExtension("selectMatches",function(t,r){for(var i,n=[],o=this.getSearchCursor(t,this.getCursor("from"),r);(i=o.findNext())&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)n.push({anchor:o.from(),head:o.to()});n.length&&this.setSelections(n,0)})})},{"../../lib/codemirror":7}],7:[function(t,r,i){!function(t){if("object"==typeof i&&"object"==typeof r)r.exports=t();else{if("function"==typeof e&&e.amd)return e([],t);this.CodeMirror=t()}}(function(){"use strict";function e(r,i){if(!(this instanceof e))return new e(r,i);this.options=i=i||{},io(ms,i,!1),h(i);var n=i.value;"string"==typeof n&&(n=new Vs(n,i.mode)),this.doc=n;var o=this.display=new t(r,n);o.wrapper.CodeMirror=this,p(this),l(this),i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),i.autofocus&&!Ko&&Er(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new $n},_o&&setTimeout(no(dr,this,!0),20),mr(this);var s=this;$t(this,function(){s.curOp.forceUpdate=!0,gn(s,n),i.autofocus&&!Ko||co()==o.input?setTimeout(no(Br,s),20):Ur(s);for(var e in gs)gs.hasOwnProperty(e)&&gs[e](s,i[e],vs);for(var t=0;t<Is.length;++t)Is[t](s)})}function t(e,t){var r=this,i=r.input=ao("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");Uo?i.style.width="1000px":i.setAttribute("wrap","off"),Xo&&(i.style.border="1px solid black"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck","false"),r.inputDiv=ao("div",[i],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),r.scrollbarH=ao("div",[ao("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar"),r.scrollbarV=ao("div",[ao("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r.scrollbarFiller=ao("div",null,"CodeMirror-scrollbar-filler"),r.gutterFiller=ao("div",null,"CodeMirror-gutter-filler"),r.lineDiv=ao("div",null,"CodeMirror-code"),r.selectionDiv=ao("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=ao("div",null,"CodeMirror-cursors"),r.measure=ao("div",null,"CodeMirror-measure"),r.lineMeasure=ao("div",null,"CodeMirror-measure"),r.lineSpace=ao("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none"),r.mover=ao("div",[ao("div",[r.lineSpace],"CodeMirror-lines")],null,"position: relative"),r.sizer=ao("div",[r.mover],"CodeMirror-sizer"),r.heightForcer=ao("div",null,null,"position: absolute; height: "+Qs+"px; width: 1px;"),r.gutters=ao("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=ao("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=ao("div",[r.inputDiv,r.scrollbarH,r.scrollbarV,r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),Mo&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),Xo&&(i.style.width="0px"),Uo||(r.scroller.draggable=!0),Wo&&(r.inputDiv.style.height="1px",r.inputDiv.style.position="absolute"),Mo&&(r.scrollbarH.style.minHeight=r.scrollbarV.style.minWidth="18px"),e.appendChild?e.appendChild(r.wrapper):e(r.wrapper),r.viewFrom=r.viewTo=t.first,r.view=[],r.externalMeasured=null,r.viewOffset=0,r.lastSizeC=0,r.updateLineNumbers=null,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.prevInput="",r.alignWidgets=!1,r.pollingFast=!1,r.poll=new $n,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.inaccurateSelection=!1,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1}function r(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),i(t)}function i(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,vt(e,100),e.state.modeGen++,e.curOp&&rr(e)}function n(e){e.options.lineWrapping?(fo(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth=""):(ho(e.display.wrapper,"CodeMirror-wrap"),E(e)),s(e),rr(e),wt(e),setTimeout(function(){m(e)},100)}function o(e){var t=zt(e.display),r=e.options.lineWrapping,i=r&&Math.max(5,e.display.scroller.clientWidth/Xt(e.display)-3);return function(n){if(ji(e.doc,n))return 0;var o=0;if(n.widgets)for(var s=0;s<n.widgets.length;s++)n.widgets[s].height&&(o+=n.widgets[s].height);return r?o+(Math.ceil(n.text.length/i)||1)*t:o+t}}function s(e){var t=e.doc,r=o(e);t.iter(function(e){var t=r(e);t!=e.height&&Ln(e,t)})}function a(e){var t=Cs[e.options.keyMap],r=t.style;e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(r?" cm-keymap-"+r:"")}function l(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wt(e)}function u(e){p(e),rr(e),setTimeout(function(){v(e)},20)}function p(e){var t=e.display.gutters,r=e.options.gutters;lo(t);for(var i=0;i<r.length;++i){var n=r[i],o=t.appendChild(ao("div",null,"CodeMirror-gutter "+n));"CodeMirror-linenumbers"==n&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=i?"":"none",c(e)}function c(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px",e.display.scrollbarH.style.left=e.options.fixedGutter?t+"px":0}function d(e){if(0==e.height)return 0;for(var t,r=e.text.length,i=e;t=Gi(i);){var n=t.find(0,!0);i=n.from.line,r+=n.from.ch-n.to.ch}for(i=e;t=ki(i);){var n=t.find(0,!0);r-=i.text.length-n.from.ch,i=n.to.line,r+=i.text.length-n.to.ch}return r}function E(e){var t=e.display,r=e.doc;t.maxLine=vn(r,r.first),t.maxLineLength=d(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=d(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function h(e){var t=eo(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function f(e){var t=e.display.scroller;return{clientHeight:t.clientHeight,barHeight:e.display.scrollbarV.clientHeight,scrollWidth:t.scrollWidth,clientWidth:t.clientWidth,barWidth:e.display.scrollbarH.clientWidth,docHeight:Math.round(e.doc.height+Tt(e.display))}}function m(e,t){t||(t=f(e));var r=e.display,i=t.docHeight+Qs,n=t.scrollWidth>t.clientWidth,o=i>t.clientHeight;if(o?(r.scrollbarV.style.display="block",r.scrollbarV.style.bottom=n?go(r.measure)+"px":"0",r.scrollbarV.firstChild.style.height=Math.max(0,i-t.clientHeight+(t.barHeight||r.scrollbarV.clientHeight))+"px"):(r.scrollbarV.style.display="",r.scrollbarV.firstChild.style.height="0"),n?(r.scrollbarH.style.display="block",r.scrollbarH.style.right=o?go(r.measure)+"px":"0",r.scrollbarH.firstChild.style.width=t.scrollWidth-t.clientWidth+(t.barWidth||r.scrollbarH.clientWidth)+"px"):(r.scrollbarH.style.display="",r.scrollbarH.firstChild.style.width="0"),n&&o?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=r.scrollbarFiller.style.width=go(r.measure)+"px"):r.scrollbarFiller.style.display="",n&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=go(r.measure)+"px",r.gutterFiller.style.width=r.gutters.offsetWidth+"px"):r.gutterFiller.style.display="",!e.state.checkedOverlayScrollbar&&t.clientHeight>0){if(0===go(r.measure)){var s=Yo&&!qo?"12px":"18px";r.scrollbarV.style.minWidth=r.scrollbarH.style.minHeight=s;var a=function(t){Fn(t)!=r.scrollbarV&&Fn(t)!=r.scrollbarH&&Qt(e,xr)(t)};Xs(r.scrollbarV,"mousedown",a),Xs(r.scrollbarH,"mousedown",a)}e.state.checkedOverlayScrollbar=!0}}function g(e,t,r){var i=r&&null!=r.top?r.top:e.scroller.scrollTop;i=Math.floor(i-It(e));var n=r&&null!=r.bottom?r.bottom:i+e.wrapper.clientHeight,o=Tn(t,i),s=Tn(t,n);if(r&&r.ensure){var a=r.ensure.from.line,l=r.ensure.to.line;if(o>a)return{from:a,to:Tn(t,yn(vn(t,a))+e.wrapper.clientHeight)};if(Math.min(l,t.lastLine())>=s)return{from:Tn(t,yn(vn(t,l))-e.wrapper.clientHeight),to:l}}return{from:o,to:s}}function v(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=L(t)-t.scroller.scrollLeft+e.doc.scrollLeft,n=t.gutters.offsetWidth,o=i+"px",s=0;s<r.length;s++)if(!r[s].hidden){e.options.fixedGutter&&r[s].gutter&&(r[s].gutter.style.left=o);var a=r[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=i+n+"px")}}function x(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=N(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var n=i.measure.appendChild(ao("div",[ao("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=n.firstChild.offsetWidth,s=n.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-s),i.lineNumWidth=i.lineNumInnerWidth+s,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",c(e),!0}return!1}function N(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function L(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function I(e,t,r){for(var i,n=e.display.viewFrom,o=e.display.viewTo,s=g(e.display,e.doc,t),a=!0;;a=!1){var l=e.display.scroller.clientWidth;if(!T(e,s,r))break;i=!0,e.display.maxLineChanged&&!e.options.lineWrapping&&y(e);var u=f(e);if(ht(e),A(e,u),m(e,u),Uo&&e.options.lineWrapping&&S(e,u),a&&e.options.lineWrapping&&l!=e.display.scroller.clientWidth)r=!0;else if(r=!1,t&&null!=t.top&&(t={top:Math.min(u.docHeight-Qs-u.clientHeight,t.top)}),s=g(e.display,e.doc,t),s.from>=e.display.viewFrom&&s.to<=e.display.viewTo)break}return e.display.updateLineNumbers=null,i&&(Wn(e,"update",e),(e.display.viewFrom!=n||e.display.viewTo!=o)&&Wn(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo)),i}function T(e,t,r){var i=e.display,n=e.doc;if(!i.wrapper.offsetWidth)return void nr(e);if(!(!r&&t.from>=i.viewFrom&&t.to<=i.viewTo&&0==lr(e))){x(e)&&nr(e);var o=b(e),s=n.first+n.size,a=Math.max(t.from-e.options.viewportMargin,n.first),l=Math.min(s,t.to+e.options.viewportMargin);i.viewFrom<a&&a-i.viewFrom<20&&(a=Math.max(n.first,i.viewFrom)),i.viewTo>l&&i.viewTo-l<20&&(l=Math.min(s,i.viewTo)),ts&&(a=Hi(e.doc,a),l=Fi(e.doc,l));var u=a!=i.viewFrom||l!=i.viewTo||i.lastSizeC!=i.wrapper.clientHeight;ar(e,a,l),i.viewOffset=yn(vn(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var p=lr(e);if(u||0!=p||r){var c=co();return p>4&&(i.lineDiv.style.display="none"),O(e,i.updateLineNumbers,o),p>4&&(i.lineDiv.style.display=""),c&&co()!=c&&c.offsetHeight&&c.focus(),lo(i.cursorDiv),lo(i.selectionDiv),u&&(i.lastSizeC=i.wrapper.clientHeight,vt(e,400)),C(e),!0}}}function y(e){var t=e.display,r=Rt(e,t.maxLine,t.maxLine.text.length).left;t.maxLineChanged=!1;var i=Math.max(0,r+3),n=Math.max(0,t.sizer.offsetLeft+i+Qs-t.scroller.clientWidth);t.sizer.style.minWidth=i+"px",n<e.doc.scrollLeft&&Rr(e,Math.min(t.scroller.scrollLeft,n),!0)}function A(e,t){e.display.sizer.style.minHeight=e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=Math.max(t.docHeight,t.clientHeight-Qs)+"px"}function S(e,t){e.display.sizer.offsetWidth+e.display.gutters.offsetWidth<e.display.scroller.clientWidth-1&&(e.display.sizer.style.minHeight=e.display.heightForcer.style.top="0px",e.display.gutters.style.height=t.docHeight+"px")}function C(e){for(var t=e.display,r=t.lineDiv.offsetTop,i=0;i<t.view.length;i++){var n,o=t.view[i];if(!o.hidden){if(Mo){var s=o.node.offsetTop+o.node.offsetHeight;n=s-r,r=s}else{var a=o.node.getBoundingClientRect();n=a.bottom-a.top}var l=o.line.height-n;if(2>n&&(n=zt(t)),(l>.001||-.001>l)&&(Ln(o.line,n),R(o.line),o.rest))for(var u=0;u<o.rest.length;u++)R(o.rest[u])}}}function R(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.offsetHeight}function b(e){for(var t=e.display,r={},i={},n=t.gutters.firstChild,o=0;n;n=n.nextSibling,++o)r[e.options.gutters[o]]=n.offsetLeft,i[e.options.gutters[o]]=n.offsetWidth;return{fixedPos:L(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function O(e,t,r){function i(t){var r=t.nextSibling;return Uo&&Yo&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var n=e.display,o=e.options.lineNumbers,s=n.lineDiv,a=s.firstChild,l=n.view,u=n.viewFrom,p=0;p<l.length;p++){var c=l[p];if(c.hidden);else if(c.node){for(;a!=c.node;)a=i(a);var d=o&&null!=t&&u>=t&&c.lineNumber;c.changes&&(eo(c.changes,"gutter")>-1&&(d=!1),P(e,c,u,r)),d&&(lo(c.lineNumber),c.lineNumber.appendChild(document.createTextNode(N(e.options,u)))),a=c.node.nextSibling}else{var E=U(e,c,u,r);s.insertBefore(E,a)}u+=c.size}for(;a;)a=i(a)}function P(e,t,r,i){for(var n=0;n<t.changes.length;n++){var o=t.changes[n];"text"==o?w(e,t):"gutter"==o?k(e,t,r,i):"class"==o?G(t):"widget"==o&&B(t,i)}t.changes=null}function D(e){return e.node==e.text&&(e.node=ao("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),Mo&&(e.node.style.zIndex=2)),e.node}function _(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var r=D(e);e.background=r.insertBefore(ao("div",null,t),r.firstChild)}}function M(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):on(e,t)}function w(e,t){var r=t.text.className,i=M(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,G(t)):r&&(t.text.className=r)}function G(e){_(e),e.line.wrapClass?D(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function k(e,t,r,i){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var n=t.line.gutterMarkers;if(e.options.lineNumbers||n){var o=D(t),s=t.gutter=o.insertBefore(ao("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px"),t.text);if(!e.options.lineNumbers||n&&n["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(ao("div",N(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),n)for(var a=0;a<e.options.gutters.length;++a){var l=e.options.gutters[a],u=n.hasOwnProperty(l)&&n[l];u&&s.appendChild(ao("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[l]+"px; width: "+i.gutterWidth[l]+"px"))}}}function B(e,t){e.alignable&&(e.alignable=null);for(var r,i=e.node.firstChild;i;i=r){var r=i.nextSibling;"CodeMirror-linewidget"==i.className&&e.node.removeChild(i)}V(e,t)}function U(e,t,r,i){var n=M(e,t);return t.text=t.node=n.pre,n.bgClass&&(t.bgClass=n.bgClass),n.textClass&&(t.textClass=n.textClass),G(t),k(e,t,r,i),V(t,i),t.node}function V(e,t){if(H(e.line,e,t,!0),e.rest)for(var r=0;r<e.rest.length;r++)H(e.rest[r],e,t,!1)}function H(e,t,r,i){if(e.widgets)for(var n=D(t),o=0,s=e.widgets;o<s.length;++o){var a=s[o],l=ao("div",[a.node],"CodeMirror-linewidget");a.handleMouseEvents||(l.ignoreEvents=!0),F(a,l,t,r),i&&a.above?n.insertBefore(l,t.gutter||t.text):n.appendChild(l),Wn(a,"redraw")}}function F(e,t,r,i){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var n=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(n-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=n+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function j(e){return rs(e.line,e.ch)}function W(e,t){return is(e,t)<0?t:e}function q(e,t){return is(e,t)<0?e:t}function z(e,t){this.ranges=e,this.primIndex=t}function X(e,t){this.anchor=e,this.head=t}function K(e,t){var r=e[t];e.sort(function(e,t){return is(e.from(),t.from())}),t=eo(e,r);for(var i=1;i<e.length;i++){var n=e[i],o=e[i-1];if(is(o.to(),n.from())>=0){var s=q(o.from(),n.from()),a=W(o.to(),n.to()),l=o.empty()?n.from()==n.head:o.from()==o.head;t>=i&&--t,e.splice(--i,2,new X(l?a:s,l?s:a))}}return new z(e,t)}function Y(e,t){return new z([new X(e,t||e)],0) }function $(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Q(e,t){if(t.line<e.first)return rs(e.first,0);var r=e.first+e.size-1;return t.line>r?rs(r,vn(e,r).text.length):Z(t,vn(e,t.line).text.length)}function Z(e,t){var r=e.ch;return null==r||r>t?rs(e.line,t):0>r?rs(e.line,0):e}function J(e,t){return t>=e.first&&t<e.first+e.size}function et(e,t){for(var r=[],i=0;i<t.length;i++)r[i]=Q(e,t[i]);return r}function tt(e,t,r,i){if(e.cm&&e.cm.display.shift||e.extend){var n=t.anchor;if(i){var o=is(r,n)<0;o!=is(i,n)<0?(n=r,r=i):o!=is(r,i)<0&&(r=i)}return new X(n,r)}return new X(i||r,r)}function rt(e,t,r,i){lt(e,new z([tt(e,e.sel.primary(),t,r)],0),i)}function it(e,t,r){for(var i=[],n=0;n<e.sel.ranges.length;n++)i[n]=tt(e,e.sel.ranges[n],t[n],null);var o=K(i,e.sel.primIndex);lt(e,o,r)}function nt(e,t,r,i){var n=e.sel.ranges.slice(0);n[t]=r,lt(e,K(n,e.sel.primIndex),i)}function ot(e,t,r,i){lt(e,Y(t,r),i)}function st(e,t){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new X(Q(e,t[r].anchor),Q(e,t[r].head))}};return Ys(e,"beforeSelectionChange",e,r),e.cm&&Ys(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?K(r.ranges,r.ranges.length-1):t}function at(e,t,r){var i=e.history.done,n=Jn(i);n&&n.ranges?(i[i.length-1]=t,ut(e,t,r)):lt(e,t,r)}function lt(e,t,r){ut(e,t,r),Dn(e,e.sel,e.cm?e.cm.curOp.id:0/0,r)}function ut(e,t,r){(Kn(e,"beforeSelectionChange")||e.cm&&Kn(e.cm,"beforeSelectionChange"))&&(t=st(e,t));var i=is(t.primary().head,e.sel.primary().head)<0?-1:1;pt(e,dt(e,t,i,!0)),r&&r.scroll===!1||!e.cm||oi(e.cm)}function pt(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Xn(e.cm)),Wn(e,"cursorActivity",e))}function ct(e){pt(e,dt(e,e.sel,null,!1),Js)}function dt(e,t,r,i){for(var n,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=Et(e,s.anchor,r,i),l=Et(e,s.head,r,i);(n||a!=s.anchor||l!=s.head)&&(n||(n=t.ranges.slice(0,o)),n[o]=new X(a,l))}return n?K(n,t.primIndex):t}function Et(e,t,r,i){var n=!1,o=t,s=r||1;e.cantEdit=!1;e:for(;;){var a=vn(e,o.line);if(a.markedSpans)for(var l=0;l<a.markedSpans.length;++l){var u=a.markedSpans[l],p=u.marker;if((null==u.from||(p.inclusiveLeft?u.from<=o.ch:u.from<o.ch))&&(null==u.to||(p.inclusiveRight?u.to>=o.ch:u.to>o.ch))){if(i&&(Ys(p,"beforeCursorEnter"),p.explicitlyCleared)){if(a.markedSpans){--l;continue}break}if(!p.atomic)continue;var c=p.find(0>s?-1:1);if(0==is(c,o)&&(c.ch+=s,c.ch<0?c=c.line>e.first?Q(e,rs(c.line-1)):null:c.ch>a.text.length&&(c=c.line<e.first+e.size-1?rs(c.line+1,0):null),!c)){if(n)return i?(e.cantEdit=!0,rs(e.first,0)):Et(e,t,r,!0);n=!0,c=t,s=-s}o=c;continue e}}return o}}function ht(e){for(var t=e.display,r=e.doc,i=document.createDocumentFragment(),n=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){var s=r.sel.ranges[o],a=s.empty();(a||e.options.showCursorWhenSelecting)&&ft(e,s,i),a||mt(e,s,n)}if(e.options.moveInputWithCursor){var l=Ht(e,r.sel.primary().head,"div"),u=t.wrapper.getBoundingClientRect(),p=t.lineDiv.getBoundingClientRect(),c=Math.max(0,Math.min(t.wrapper.clientHeight-10,l.top+p.top-u.top)),d=Math.max(0,Math.min(t.wrapper.clientWidth-10,l.left+p.left-u.left));t.inputDiv.style.top=c+"px",t.inputDiv.style.left=d+"px"}uo(t.cursorDiv,i),uo(t.selectionDiv,n)}function ft(e,t,r){var i=Ht(e,t.head,"div"),n=r.appendChild(ao("div"," ","CodeMirror-cursor"));if(n.style.left=i.left+"px",n.style.top=i.top+"px",n.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var o=r.appendChild(ao("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=i.other.left+"px",o.style.top=i.other.top+"px",o.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function mt(e,t,r){function i(e,t,r,i){0>t&&(t=0),t=Math.round(t),i=Math.round(i),a.appendChild(ao("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==r?p-e:r)+"px; height: "+(i-t)+"px"))}function n(t,r,n){function o(r,i){return Vt(e,rs(t,r),"div",c,i)}var a,l,c=vn(s,t),d=c.text.length;return No(An(c),r||0,null==n?d:n,function(e,t,s){var c,E,h,f=o(e,"left");if(e==t)c=f,E=h=f.left;else{if(c=o(t-1,"right"),"rtl"==s){var m=f;f=c,c=m}E=f.left,h=c.right}null==r&&0==e&&(E=u),c.top-f.top>3&&(i(E,f.top,null,f.bottom),E=u,f.bottom<c.top&&i(E,f.bottom,null,c.top)),null==n&&t==d&&(h=p),(!a||f.top<a.top||f.top==a.top&&f.left<a.left)&&(a=f),(!l||c.bottom>l.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),u+1>E&&(E=u),i(E,c.top,h-E,c.bottom)}),{start:a,end:l}}var o=e.display,s=e.doc,a=document.createDocumentFragment(),l=yt(e.display),u=l.left,p=o.lineSpace.offsetWidth-l.right,c=t.from(),d=t.to();if(c.line==d.line)n(c.line,c.ch,d.ch);else{var E=vn(s,c.line),h=vn(s,d.line),f=Ui(E)==Ui(h),m=n(c.line,c.ch,f?E.text.length+1:null).end,g=n(d.line,f?0:null,d.ch).start;f&&(m.top<g.top-2?(i(m.right,m.top,null,m.bottom),i(u,g.top,g.left,g.bottom)):i(m.right,m.top,g.left-m.right,m.bottom)),m.bottom<g.top&&i(u,m.bottom,null,g.top)}r.appendChild(a)}function gt(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0&&(t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate))}}function vt(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,no(xt,e))}function xt(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,i=ys(t.mode,Lt(e,t.frontier));$t(e,function(){t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(n){if(t.frontier>=e.display.viewFrom){var o=n.styles,s=en(e,n,i,!0);n.styles=s.styles,s.classes?n.styleClasses=s.classes:n.styleClasses&&(n.styleClasses=null);for(var a=!o||o.length!=n.styles.length,l=0;!a&&l<o.length;++l)a=o[l]!=n.styles[l];a&&ir(e,t.frontier,"text"),n.stateAfter=ys(t.mode,i)}else rn(e,n.text,i),n.stateAfter=t.frontier%5==0?ys(t.mode,i):null;return++t.frontier,+new Date>r?(vt(e,e.options.workDelay),!0):void 0})})}}function Nt(e,t,r){for(var i,n,o=e.doc,s=r?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=vn(o,a-1);if(l.stateAfter&&(!r||a<=o.frontier))return a;var u=ra(l.text,null,e.options.tabSize);(null==n||i>u)&&(n=a-1,i=u)}return n}function Lt(e,t,r){var i=e.doc,n=e.display;if(!i.mode.startState)return!0;var o=Nt(e,t,r),s=o>i.first&&vn(i,o-1).stateAfter;return s=s?ys(i.mode,s):As(i.mode),i.iter(o,t,function(r){rn(e,r.text,s);var a=o==t-1||o%5==0||o>=n.viewFrom&&o<n.viewTo;r.stateAfter=a?ys(i.mode,s):null,++o}),r&&(i.frontier=o),s}function It(e){return e.lineSpace.offsetTop}function Tt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function yt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=uo(e.measure,ao("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function At(e,t,r){var i=e.options.lineWrapping,n=i&&e.display.scroller.clientWidth;if(!t.measure.heights||i&&t.measure.width!=n){var o=t.measure.heights=[];if(i){t.measure.width=n;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],u=s[a+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function St(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var i=0;i<e.rest.length;i++)if(In(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ct(e,t){t=Ui(t);var r=In(t),i=e.display.externalMeasured=new er(e.doc,t,r);i.lineN=r;var n=i.built=on(e,i);return i.text=n.pre,uo(e.display.lineMeasure,n.pre),i}function Rt(e,t,r,i){return Pt(e,Ot(e,t),r,i)}function bt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[or(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Ot(e,t){var r=In(t),i=bt(e,r);i&&!i.text?i=null:i&&i.changes&&P(e,i,r,b(e)),i||(i=Ct(e,t));var n=St(i,t,r);return{line:t,view:i,rect:null,map:n.map,cache:n.cache,before:n.before,hasHeights:!1}}function Pt(e,t,r,i){t.before&&(r=-1);var n,o=r+(i||"");return t.cache.hasOwnProperty(o)?n=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(At(e,t.view,t.rect),t.hasHeights=!0),n=Dt(e,t,r,i),n.bogus||(t.cache[o]=n)),{left:n.left,right:n.right,top:n.top,bottom:n.bottom}}function Dt(e,t,r,i){for(var n,o,s,a,l=t.map,u=0;u<l.length;u+=3){var p=l[u],c=l[u+1];if(p>r?(o=0,s=1,a="left"):c>r?(o=r-p,s=o+1):(u==l.length-3||r==c&&l[u+3]>r)&&(s=c-p,o=s-1,r>=c&&(a="right")),null!=o){if(n=l[u+2],p==c&&i==(n.insertLeft?"left":"right")&&(a=i),"left"==i&&0==o)for(;u&&l[u-2]==l[u-3]&&l[u-1].insertLeft;)n=l[(u-=3)+2],a="left";if("right"==i&&o==c-p)for(;u<l.length-3&&l[u+3]==l[u+4]&&!l[u+5].insertLeft;)n=l[(u+=3)+2],a="right";break}}var d;if(3==n.nodeType){for(;o&&so(t.line.text.charAt(p+o));)--o;for(;c>p+s&&so(t.line.text.charAt(p+s));)++s;if(wo&&0==o&&s==c-p)d=n.parentNode.getBoundingClientRect();else if(Bo&&e.options.lineWrapping){var E=oa(n,o,s).getClientRects();d=E.length?E["right"==i?E.length-1:0]:as}else d=oa(n,o,s).getBoundingClientRect()}else{o>0&&(a=i="right");var E;d=e.options.lineWrapping&&(E=n.getClientRects()).length>1?E["right"==i?E.length-1:0]:n.getBoundingClientRect()}if(wo&&!o&&(!d||!d.left&&!d.right)){var h=n.parentNode.getClientRects()[0];d=h?{left:h.left,right:h.left+Xt(e.display),top:h.top,bottom:h.bottom}:as}for(var f,m=(d.bottom+d.top)/2-t.rect.top,g=t.view.measure.heights,u=0;u<g.length-1&&!(m<g[u]);u++);f=u?g[u-1]:0,m=g[u];var v={left:("right"==a?d.right:d.left)-t.rect.left,right:("left"==a?d.left:d.right)-t.rect.left,top:f,bottom:m};return d.left||d.right||(v.bogus=!0),v}function _t(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Mt(e){e.display.externalMeasure=null,lo(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)_t(e.display.view[t])}function wt(e){Mt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Gt(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function kt(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function Bt(e,t,r,i){if(t.widgets)for(var n=0;n<t.widgets.length;++n)if(t.widgets[n].above){var o=zi(t.widgets[n]);r.top+=o,r.bottom+=o}if("line"==i)return r;i||(i="local");var s=yn(t);if("local"==i?s+=It(e.display):s-=e.display.viewOffset,"page"==i||"window"==i){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==i?0:kt());var l=a.left+("window"==i?0:Gt());r.left+=l,r.right+=l}return r.top+=s,r.bottom+=s,r}function Ut(e,t,r){if("div"==r)return t;var i=t.left,n=t.top;if("page"==r)i-=Gt(),n-=kt();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();i+=o.left,n+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:i-s.left,top:n-s.top}}function Vt(e,t,r,i,n){return i||(i=vn(e.doc,t.line)),Bt(e,i,Rt(e,i,t.ch,n),r)}function Ht(e,t,r,i,n){function o(t,o){var s=Pt(e,n,t,o?"right":"left");return o?s.left=s.right:s.right=s.left,Bt(e,i,s,r)}function s(e,t){var r=a[t],i=r.level%2;return e==Lo(r)&&t&&r.level<a[t-1].level?(r=a[--t],e=Io(r)-(r.level%2?0:1),i=!0):e==Io(r)&&t<a.length-1&&r.level<a[t+1].level&&(r=a[++t],e=Lo(r)-r.level%2,i=!1),i&&e==r.to&&e>r.from?o(e-1):o(e,i)}i=i||vn(e.doc,t.line),n||(n=Ot(e,i));var a=An(i),l=t.ch;if(!a)return o(l);var u=Ro(a,l),p=s(l,u);return null!=ga&&(p.other=s(l,ga)),p}function Ft(e,t){var r=0,t=Q(e.doc,t);e.options.lineWrapping||(r=Xt(e.display)*t.ch);var i=vn(e.doc,t.line),n=yn(i)+It(e.display);return{left:r,right:r,top:n,bottom:n+i.height}}function jt(e,t,r,i){var n=rs(e,t);return n.xRel=i,r&&(n.outside=!0),n}function Wt(e,t,r){var i=e.doc;if(r+=e.display.viewOffset,0>r)return jt(i.first,0,!0,-1);var n=Tn(i,r),o=i.first+i.size-1;if(n>o)return jt(i.first+i.size-1,vn(i,o).text.length,!0,1);0>t&&(t=0);for(var s=vn(i,n);;){var a=qt(e,s,n,t,r),l=ki(s),u=l&&l.find(0,!0);if(!l||!(a.ch>u.from.ch||a.ch==u.from.ch&&a.xRel>0))return a;n=In(s=u.to.line)}}function qt(e,t,r,i,n){function o(i){var n=Ht(e,rs(r,i),"line",t,u);return a=!0,s>n.bottom?n.left-l:s<n.top?n.left+l:(a=!1,n.left)}var s=n-yn(t),a=!1,l=2*e.display.wrapper.clientWidth,u=Ot(e,t),p=An(t),c=t.text.length,d=To(t),E=yo(t),h=o(d),f=a,m=o(E),g=a;if(i>m)return jt(r,E,g,1);for(;;){if(p?E==d||E==Oo(t,d,1):1>=E-d){for(var v=h>i||m-i>=i-h?d:E,x=i-(v==d?h:m);so(t.text.charAt(v));)++v;var N=jt(r,v,v==d?f:g,-1>x?-1:x>1?1:0);return N}var L=Math.ceil(c/2),I=d+L;if(p){I=d;for(var T=0;L>T;++T)I=Oo(t,I,1)}var y=o(I);y>i?(E=I,m=y,(g=a)&&(m+=1e3),c=L):(d=I,h=y,f=a,c-=L)}}function zt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ns){ns=ao("pre");for(var t=0;49>t;++t)ns.appendChild(document.createTextNode("x")),ns.appendChild(ao("br"));ns.appendChild(document.createTextNode("x"))}uo(e.measure,ns);var r=ns.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),lo(e.measure),r||1}function Xt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=ao("span","xxxxxxxxxx"),r=ao("pre",[t]);uo(e.measure,r);var i=t.getBoundingClientRect(),n=(i.right-i.left)/10;return n>2&&(e.cachedCharWidth=n),n||10}function Kt(e){e.curOp={viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++ls},$s++||(js=[])}function Yt(e){var t=e.curOp,r=e.doc,i=e.display;if(e.curOp=null,t.updateMaxLine&&E(e),t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<i.viewFrom||t.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&e.options.lineWrapping){var n=I(e,{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate);e.display.scroller.offsetHeight&&(e.doc.scrollTop=e.display.scroller.scrollTop)}if(!n&&t.selectionChanged&&ht(e),n||t.startHeight==e.doc.height||m(e),null!=t.scrollTop&&i.scroller.scrollTop!=t.scrollTop){var o=Math.max(0,Math.min(i.scroller.scrollHeight-i.scroller.clientHeight,t.scrollTop));i.scroller.scrollTop=i.scrollbarV.scrollTop=r.scrollTop=o}if(null!=t.scrollLeft&&i.scroller.scrollLeft!=t.scrollLeft){var s=Math.max(0,Math.min(i.scroller.scrollWidth-i.scroller.clientWidth,t.scrollLeft));i.scroller.scrollLeft=i.scrollbarH.scrollLeft=r.scrollLeft=s,v(e)}if(t.scrollToPos){var a=ti(e,Q(e.doc,t.scrollToPos.from),Q(e.doc,t.scrollToPos.to),t.scrollToPos.margin);t.scrollToPos.isCursor&&e.state.focused&&ei(e,a)}t.selectionChanged&&gt(e),e.state.focused&&t.updateInput&&dr(e,t.typing);var l=t.maybeHiddenMarkers,u=t.maybeUnhiddenMarkers;if(l)for(var p=0;p<l.length;++p)l[p].lines.length||Ys(l[p],"hide");if(u)for(var p=0;p<u.length;++p)u[p].lines.length&&Ys(u[p],"unhide");var c;if(--$s||(c=js,js=null),t.changeObjs&&Ys(e,"changes",e,t.changeObjs),c)for(var p=0;p<c.length;++p)c[p]();if(t.cursorActivityHandlers)for(var p=0;p<t.cursorActivityHandlers.length;p++)t.cursorActivityHandlers[p](e)}function $t(e,t){if(e.curOp)return t();Kt(e);try{return t()}finally{Yt(e)}}function Qt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Kt(e);try{return t.apply(e,arguments)}finally{Yt(e)}}}function Zt(e){return function(){if(this.curOp)return e.apply(this,arguments);Kt(this);try{return e.apply(this,arguments)}finally{Yt(this)}}}function Jt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Kt(t);try{return e.apply(this,arguments)}finally{Yt(t)}}}function er(e,t,r){this.line=t,this.rest=Vi(t),this.size=this.rest?In(Jn(this.rest))-r+1:1,this.node=this.text=null,this.hidden=ji(e,t)}function tr(e,t,r){for(var i,n=[],o=t;r>o;o=i){var s=new er(e.doc,vn(e.doc,o),o);i=o+s.size,n.push(s)}return n}function rr(e,t,r,i){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),i||(i=0);var n=e.display;if(i&&r<n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>t)&&(n.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=n.viewTo)ts&&Hi(e.doc,t)<n.viewTo&&nr(e);else if(r<=n.viewFrom)ts&&Fi(e.doc,r+i)>n.viewFrom?nr(e):(n.viewFrom+=i,n.viewTo+=i);else if(t<=n.viewFrom&&r>=n.viewTo)nr(e);else if(t<=n.viewFrom){var o=sr(e,r,r+i,1);o?(n.view=n.view.slice(o.index),n.viewFrom=o.lineN,n.viewTo+=i):nr(e)}else if(r>=n.viewTo){var o=sr(e,t,t,-1);o?(n.view=n.view.slice(0,o.index),n.viewTo=o.lineN):nr(e)}else{var s=sr(e,t,t,-1),a=sr(e,r,r+i,1);s&&a?(n.view=n.view.slice(0,s.index).concat(tr(e,s.lineN,a.lineN)).concat(n.view.slice(a.index)),n.viewTo+=i):nr(e)}var l=n.externalMeasured;l&&(r<l.lineN?l.lineN+=i:t<l.lineN+l.size&&(n.externalMeasured=null))}function ir(e,t,r){e.curOp.viewChanged=!0;var i=e.display,n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size&&(i.externalMeasured=null),!(t<i.viewFrom||t>=i.viewTo)){var o=i.view[or(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==eo(s,r)&&s.push(r)}}}function nr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function or(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var r=e.display.view,i=0;i<r.length;i++)if(t-=r[i].size,0>t)return i}function sr(e,t,r,i){var n,o=or(e,t),s=e.display.view;if(!ts)return{index:o,lineN:r};for(var a=0,l=e.display.viewFrom;o>a;a++)l+=s[a].size;if(l!=t){if(i>0){if(o==s.length-1)return null;n=l+s[o].size-t,o++}else n=l-t;t+=n,r+=n}for(;Hi(e.doc,r)!=r;){if(o==(0>i?0:s.length-1))return null;r+=i*s[o-(0>i?1:0)].size,o+=i}return{index:o,lineN:r}}function ar(e,t,r){var i=e.display,n=i.view;0==n.length||t>=i.viewTo||r<=i.viewFrom?(i.view=tr(e,t,r),i.viewFrom=t):(i.viewFrom>t?i.view=tr(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(or(e,t))),i.viewFrom=t,i.viewTo<r?i.view=i.view.concat(tr(e,i.viewTo,r)):i.viewTo>r&&(i.view=i.view.slice(0,or(e,r)))),i.viewTo=r}function lr(e){for(var t=e.display.view,r=0,i=0;i<t.length;i++){var n=t[i];n.hidden||n.node&&!n.changes||++r}return r}function ur(e){e.display.pollingFast||e.display.poll.set(e.options.pollInterval,function(){cr(e),e.state.focused&&ur(e)})}function pr(e){function t(){var i=cr(e);i||r?(e.display.pollingFast=!1,ur(e)):(r=!0,e.display.poll.set(60,t))}var r=!1;e.display.pollingFast=!0,e.display.poll.set(20,t)}function cr(e){var t=e.display.input,r=e.display.prevInput,i=e.doc;if(!e.state.focused||ha(t)&&!r||fr(e)||e.options.disableInput)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var n=t.value;if(n==r&&!e.somethingSelected())return!1;if(Bo&&!wo&&e.display.inputHasSelection===n)return dr(e),!1;var o=!e.curOp;o&&Kt(e),e.display.shift=!1;for(var s=0,a=Math.min(r.length,n.length);a>s&&r.charCodeAt(s)==n.charCodeAt(s);)++s;for(var l=n.slice(s),u=Ea(l),p=e.state.pasteIncoming&&u.length>1&&i.sel.ranges.length==u.length,c=i.sel.ranges.length-1;c>=0;c--){var d=i.sel.ranges[c],E=d.from(),h=d.to();s<r.length?E=rs(E.line,E.ch-(r.length-s)):e.state.overwrite&&d.empty()&&!e.state.pasteIncoming&&(h=rs(h.line,Math.min(vn(i,h.line).text.length,h.ch+Jn(u).length)));var f=e.curOp.updateInput,m={from:E,to:h,text:p?[u[c]]:u,origin:e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input"};if(Xr(e.doc,m),Wn(e,"inputRead",e,m),l&&!e.state.pasteIncoming&&e.options.electricChars&&e.options.smartIndent&&d.head.ch<100&&(!c||i.sel.ranges[c-1].head.line!=d.head.line)){var g=e.getModeAt(d.head);if(g.electricChars){for(var v=0;v<g.electricChars.length;v++)if(l.indexOf(g.electricChars.charAt(v))>-1){ai(e,d.head.line,"smart");break}}else if(g.electricInput){var x=fs(m);g.electricInput.test(vn(i,x.line).text.slice(0,x.ch))&&ai(e,d.head.line,"smart")}}}return oi(e),e.curOp.updateInput=f,e.curOp.typing=!0,n.length>1e3||n.indexOf("\n")>-1?t.value=e.display.prevInput="":e.display.prevInput=n,o&&Yt(e),e.state.pasteIncoming=e.state.cutIncoming=!1,!0}function dr(e,t){var r,i,n=e.doc;if(e.somethingSelected()){e.display.prevInput="";var o=n.sel.primary();r=fa&&(o.to().line-o.from().line>100||(i=e.getSelection()).length>1e3);var s=r?"-":i||e.getSelection();e.display.input.value=s,e.state.focused&&na(e.display.input),Bo&&!wo&&(e.display.inputHasSelection=s)}else t||(e.display.prevInput=e.display.input.value="",Bo&&!wo&&(e.display.inputHasSelection=null));e.display.inaccurateSelection=r}function Er(e){"nocursor"==e.options.readOnly||Ko&&co()==e.display.input||e.display.input.focus()}function hr(e){e.state.focused||(Er(e),Br(e))}function fr(e){return e.options.readOnly||e.doc.cantEdit}function mr(e){function t(){e.state.focused&&setTimeout(no(Er,e),0)}function r(){null==a&&(a=setTimeout(function(){a=null,s.cachedCharWidth=s.cachedTextHeight=s.cachedPaddingH=ua=null,e.setSize()},100))}function i(){po(document.body,s.wrapper)?setTimeout(i,5e3):Ks(window,"resize",r)}function n(t){zn(e,t)||zs(t)}function o(t){if(e.somethingSelected())s.inaccurateSelection&&(s.prevInput="",s.inaccurateSelection=!1,s.input.value=e.getSelection(),na(s.input));else{for(var r="",i=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,a={anchor:rs(o,0),head:rs(o+1,0)};i.push(a),r+=e.getRange(a.anchor,a.head)}"cut"==t.type?e.setSelections(i,null,Js):(s.prevInput="",s.input.value=r,na(s.input))}"cut"==t.type&&(e.state.cutIncoming=!0)}var s=e.display;Xs(s.scroller,"mousedown",Qt(e,xr)),_o?Xs(s.scroller,"dblclick",Qt(e,function(t){if(!zn(e,t)){var r=vr(e,t);if(r&&!yr(e,t)&&!gr(e.display,t)){Ws(t);var i=di(e.doc,r);rt(e.doc,i.anchor,i.head)}}})):Xs(s.scroller,"dblclick",function(t){zn(e,t)||Ws(t)}),Xs(s.lineSpace,"selectstart",function(e){gr(s,e)||Ws(e)}),Jo||Xs(s.scroller,"contextmenu",function(t){Vr(e,t)}),Xs(s.scroller,"scroll",function(){s.scroller.clientHeight&&(Cr(e,s.scroller.scrollTop),Rr(e,s.scroller.scrollLeft,!0),Ys(e,"scroll",e))}),Xs(s.scrollbarV,"scroll",function(){s.scroller.clientHeight&&Cr(e,s.scrollbarV.scrollTop)}),Xs(s.scrollbarH,"scroll",function(){s.scroller.clientHeight&&Rr(e,s.scrollbarH.scrollLeft)}),Xs(s.scroller,"mousewheel",function(t){br(e,t)}),Xs(s.scroller,"DOMMouseScroll",function(t){br(e,t)}),Xs(s.scrollbarH,"mousedown",t),Xs(s.scrollbarV,"mousedown",t),Xs(s.wrapper,"scroll",function(){s.wrapper.scrollTop=s.wrapper.scrollLeft=0});var a;Xs(window,"resize",r),setTimeout(i,5e3),Xs(s.input,"keyup",Qt(e,Gr)),Xs(s.input,"input",function(){Bo&&!wo&&e.display.inputHasSelection&&(e.display.inputHasSelection=null),pr(e)}),Xs(s.input,"keydown",Qt(e,Mr)),Xs(s.input,"keypress",Qt(e,kr)),Xs(s.input,"focus",no(Br,e)),Xs(s.input,"blur",no(Ur,e)),e.options.dragDrop&&(Xs(s.scroller,"dragstart",function(t){Sr(e,t)}),Xs(s.scroller,"dragenter",n),Xs(s.scroller,"dragover",n),Xs(s.scroller,"drop",Qt(e,Ar))),Xs(s.scroller,"paste",function(t){gr(s,t)||(e.state.pasteIncoming=!0,Er(e),pr(e))}),Xs(s.input,"paste",function(){if(Uo&&!e.state.fakedLastChar&&!(new Date-e.state.lastMiddleDown<200)){var t=s.input.selectionStart,r=s.input.selectionEnd;s.input.value+="$",s.input.selectionStart=t,s.input.selectionEnd=r,e.state.fakedLastChar=!0}e.state.pasteIncoming=!0,pr(e)}),Xs(s.input,"cut",o),Xs(s.input,"copy",o),Wo&&Xs(s.sizer,"mouseup",function(){co()==s.input&&s.input.blur(),Er(e)})}function gr(e,t){for(var r=Fn(t);r!=e.wrapper;r=r.parentNode)if(!r||r.ignoreEvents||r.parentNode==e.sizer&&r!=e.mover)return!0}function vr(e,t,r,i){var n=e.display;if(!r){var o=Fn(t);if(o==n.scrollbarH||o==n.scrollbarV||o==n.scrollbarFiller||o==n.gutterFiller)return null}var s,a,l=n.lineSpace.getBoundingClientRect();try{s=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var u,p=Wt(e,s,a);if(i&&1==p.xRel&&(u=vn(e.doc,p.line).text).length==p.ch){var c=ra(u,u.length,e.options.tabSize)-u.length;p=rs(p.line,Math.max(0,Math.round((s-yt(e.display).left)/Xt(e.display))-c))}return p}function xr(e){if(!zn(this,e)){var t=this,r=t.display;if(r.shift=e.shiftKey,gr(r,e))return void(Uo||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100)));if(!yr(t,e)){var i=vr(t,e);switch(window.focus(),jn(e)){case 1:i?Nr(t,e,i):Fn(e)==r.scroller&&Ws(e);break;case 2:Uo&&(t.state.lastMiddleDown=+new Date),i&&rt(t.doc,i),setTimeout(no(Er,t),20),Ws(e);break;case 3:Jo&&Vr(t,e)}}}}function Nr(e,t,r){setTimeout(no(hr,e),0);var i,n=+new Date;ss&&ss.time>n-400&&0==is(ss.pos,r)?i="triple":os&&os.time>n-400&&0==is(os.pos,r)?(i="double",ss={time:n,pos:r}):(i="single",os={time:n,pos:r});var o=e.doc.sel,s=Yo?t.metaKey:t.ctrlKey;e.options.dragDrop&&da&&!s&&!fr(e)&&"single"==i&&o.contains(r)>-1&&o.somethingSelected()?Lr(e,t,r):Ir(e,t,r,i,s)}function Lr(e,t,r){var i=e.display,n=Qt(e,function(o){Uo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ks(document,"mouseup",n),Ks(i.scroller,"drop",n),Math.abs(t.clientX-o.clientX)+Math.abs(t.clientY-o.clientY)<10&&(Ws(o),rt(e.doc,r),Er(e),_o&&!wo&&setTimeout(function(){document.body.focus(),Er(e)},20))});Uo&&(i.scroller.draggable=!0),e.state.draggingText=n,i.scroller.dragDrop&&i.scroller.dragDrop(),Xs(document,"mouseup",n),Xs(i.scroller,"drop",n)}function Ir(e,t,r,i,n){function o(t){if(0!=is(f,t))if(f=t,"rect"==i){for(var n=[],o=e.options.tabSize,s=ra(vn(u,r.line).text,r.ch,o),a=ra(vn(u,t.line).text,t.ch,o),l=Math.min(s,a),E=Math.max(s,a),h=Math.min(r.line,t.line),m=Math.min(e.lastLine(),Math.max(r.line,t.line));m>=h;h++){var g=vn(u,h).text,v=Qn(g,l,o);l==E?n.push(new X(rs(h,v),rs(h,v))):g.length>v&&n.push(new X(rs(h,v),rs(h,Qn(g,E,o))))}n.length||n.push(new X(r,r)),lt(u,K(d.ranges.slice(0,c).concat(n),c),ea)}else{var x=p,N=x.anchor,L=t;if("single"!=i){if("double"==i)var I=di(u,t);else var I=new X(rs(t.line,0),Q(u,rs(t.line+1,0)));is(I.anchor,N)>0?(L=I.head,N=q(x.from(),I.anchor)):(L=I.anchor,N=W(x.to(),I.head))}var n=d.ranges.slice(0);n[c]=new X(Q(u,N),L),lt(u,K(n,c),ea)}}function s(t){var r=++v,n=vr(e,t,!0,"rect"==i);if(n)if(0!=is(n,f)){hr(e),o(n);var a=g(l,u);(n.line>=a.to||n.line<a.from)&&setTimeout(Qt(e,function(){v==r&&s(t)}),150)}else{var p=t.clientY<m.top?-20:t.clientY>m.bottom?20:0;p&&setTimeout(Qt(e,function(){v==r&&(l.scroller.scrollTop+=p,s(t))}),50)}}function a(t){v=1/0,Ws(t),Er(e),Ks(document,"mousemove",x),Ks(document,"mouseup",N),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;Ws(t);var p,c,d=u.sel;if(n&&!t.shiftKey?(c=u.sel.contains(r),p=c>-1?u.sel.ranges[c]:new X(r,r)):p=u.sel.primary(),t.altKey)i="rect",n||(p=new X(r,r)),r=vr(e,t,!0,!0),c=-1;else if("double"==i){var E=di(u,r);p=e.display.shift||u.extend?tt(u,p,E.anchor,E.head):E}else if("triple"==i){var h=new X(rs(r.line,0),Q(u,rs(r.line+1,0)));p=e.display.shift||u.extend?tt(u,p,h.anchor,h.head):h}else p=tt(u,p,r);n?c>-1?nt(u,c,p,ea):(c=u.sel.ranges.length,lt(u,K(u.sel.ranges.concat([p]),c),{scroll:!1,origin:"*mouse"})):(c=0,lt(u,new z([p],0),ea),d=u.sel);var f=r,m=l.wrapper.getBoundingClientRect(),v=0,x=Qt(e,function(e){(Bo&&!Go?e.buttons:jn(e))?s(e):a(e)}),N=Qt(e,a);Xs(document,"mousemove",x),Xs(document,"mouseup",N)}function Tr(e,t,r,i,n){try{var o=t.clientX,s=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Ws(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(s>l.bottom||!Kn(e,r))return Hn(t);s-=l.top-a.viewOffset;for(var u=0;u<e.options.gutters.length;++u){var p=a.gutters.childNodes[u];if(p&&p.getBoundingClientRect().right>=o){var c=Tn(e.doc,s),d=e.options.gutters[u];return n(e,r,e,c,d,t),Hn(t)}}}function yr(e,t){return Tr(e,t,"gutterClick",!0,Wn)}function Ar(e){var t=this;if(!zn(t,e)&&!gr(t.display,e)){Ws(e),Bo&&(us=+new Date);var r=vr(t,e,!0),i=e.dataTransfer.files;if(r&&!fr(t))if(i&&i.length&&window.FileReader&&window.File)for(var n=i.length,o=Array(n),s=0,a=function(e,i){var a=new FileReader;a.onload=Qt(t,function(){if(o[i]=a.result,++s==n){r=Q(t.doc,r);var e={from:r,to:r,text:Ea(o.join("\n")),origin:"paste"};Xr(t.doc,e),at(t.doc,Y(r,fs(e)))}}),a.readAsText(e)},l=0;n>l;++l)a(i[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(no(Er,t),20);try{var o=e.dataTransfer.getData("Text");if(o){var u=t.state.draggingText&&t.listSelections();if(ut(t.doc,Y(r,r)),u)for(var l=0;l<u.length;++l)Jr(t.doc,"",u[l].anchor,u[l].head,"drag");t.replaceSelection(o,"around","paste"),Er(t)}}catch(e){}}}}function Sr(e,t){if(Bo&&(!e.state.draggingText||+new Date-us<100))return void zs(t);if(!zn(e,t)&&!gr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.setDragImage&&!jo)){var r=ao("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Fo&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),Fo&&r.parentNode.removeChild(r)}}function Cr(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,Do||I(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbarV.scrollTop!=t&&(e.display.scrollbarV.scrollTop=t),Do&&I(e),vt(e,100))}function Rr(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,v(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbarH.scrollLeft!=t&&(e.display.scrollbarH.scrollLeft=t))}function br(e,t){var r=t.wheelDeltaX,i=t.wheelDeltaY;null==r&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(r=t.detail),null==i&&t.detail&&t.axis==t.VERTICAL_AXIS?i=t.detail:null==i&&(i=t.wheelDelta);var n=e.display,o=n.scroller;if(r&&o.scrollWidth>o.clientWidth||i&&o.scrollHeight>o.clientHeight){if(i&&Yo&&Uo)e:for(var s=t.target,a=n.view;s!=o;s=s.parentNode)for(var l=0;l<a.length;l++)if(a[l].node==s){e.display.currentWheelTarget=s;break e}if(r&&!Do&&!Fo&&null!=cs)return i&&Cr(e,Math.max(0,Math.min(o.scrollTop+i*cs,o.scrollHeight-o.clientHeight))),Rr(e,Math.max(0,Math.min(o.scrollLeft+r*cs,o.scrollWidth-o.clientWidth))),Ws(t),void(n.wheelStartX=null);if(i&&null!=cs){var u=i*cs,p=e.doc.scrollTop,c=p+n.wrapper.clientHeight;0>u?p=Math.max(0,p+u-50):c=Math.min(e.doc.height,c+u+50),I(e,{top:p,bottom:c})}20>ps&&(null==n.wheelStartX?(n.wheelStartX=o.scrollLeft,n.wheelStartY=o.scrollTop,n.wheelDX=r,n.wheelDY=i,setTimeout(function(){if(null!=n.wheelStartX){var e=o.scrollLeft-n.wheelStartX,t=o.scrollTop-n.wheelStartY,r=t&&n.wheelDY&&t/n.wheelDY||e&&n.wheelDX&&e/n.wheelDX;n.wheelStartX=n.wheelStartY=null,r&&(cs=(cs*ps+r)/(ps+1),++ps)}},200)):(n.wheelDX+=r,n.wheelDY+=i))}}function Or(e,t,r){if("string"==typeof t&&(t=Ss[t],!t))return!1;e.display.pollingFast&&cr(e)&&(e.display.pollingFast=!1);var i=e.display.shift,n=!1;try{fr(e)&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),n=t(e)!=Zs}finally{e.display.shift=i,e.state.suppressEdits=!1}return n}function Pr(e){var t=e.state.keyMaps.slice(0);return e.options.extraKeys&&t.push(e.options.extraKeys),t.push(e.options.keyMap),t}function Dr(e,t){var r=hi(e.options.keyMap),i=r.auto;clearTimeout(ds),i&&!bs(t)&&(ds=setTimeout(function(){hi(e.options.keyMap)==r&&(e.options.keyMap=i.call?i.call(null,e):i,a(e))},50));var n=Os(t,!0),o=!1;if(!n)return!1;var s=Pr(e);return o=t.shiftKey?Rs("Shift-"+n,s,function(t){return Or(e,t,!0)})||Rs(n,s,function(t){return("string"==typeof t?/^go[A-Z]/.test(t):t.motion)?Or(e,t):void 0}):Rs(n,s,function(t){return Or(e,t)}),o&&(Ws(t),gt(e),Wn(e,"keyHandled",e,n,t)),o}function _r(e,t,r){var i=Rs("'"+r+"'",Pr(e),function(t){return Or(e,t,!0)});return i&&(Ws(t),gt(e),Wn(e,"keyHandled",e,"'"+r+"'",t)),i}function Mr(e){var t=this;if(hr(t),!zn(t,e)){_o&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=Dr(t,e);Fo&&(hs=i?r:null,!i&&88==r&&!fa&&(Yo?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||wr(t) }}function wr(e){function t(e){18!=e.keyCode&&e.altKey||(ho(r,"CodeMirror-crosshair"),Ks(document,"keyup",t),Ks(document,"mouseover",t))}var r=e.display.lineDiv;fo(r,"CodeMirror-crosshair"),Xs(document,"keyup",t),Xs(document,"mouseover",t)}function Gr(e){zn(this,e)||16==e.keyCode&&(this.doc.sel.shift=!1)}function kr(e){var t=this;if(!zn(t,e)){var r=e.keyCode,i=e.charCode;if(Fo&&r==hs)return hs=null,void Ws(e);if(!(Fo&&(!e.which||e.which<10)||Wo)||!Dr(t,e)){var n=String.fromCharCode(null==i?r:i);_r(t,e,n)||(Bo&&!wo&&(t.display.inputHasSelection=null),pr(t))}}}function Br(e){"nocursor"!=e.options.readOnly&&(e.state.focused||(Ys(e,"focus",e),e.state.focused=!0,fo(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu!=e.doc.sel||(dr(e),Uo&&setTimeout(no(dr,e,!0),0))),ur(e),gt(e))}function Ur(e){e.state.focused&&(Ys(e,"blur",e),e.state.focused=!1,ho(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Vr(e,t){function r(){if(null!=n.input.selectionStart){var t=e.somethingSelected(),r=n.input.value="​"+(t?n.input.value:"");n.prevInput=t?"":"​",n.input.selectionStart=1,n.input.selectionEnd=r.length}}function i(){if(n.inputDiv.style.position="relative",n.input.style.cssText=l,wo&&(n.scrollbarV.scrollTop=n.scroller.scrollTop=s),ur(e),null!=n.input.selectionStart){(!Bo||wo)&&r(),clearTimeout(Es);var t=0,i=function(){n.selForContextMenu==e.doc.sel&&0==n.input.selectionStart?Qt(e,Ss.selectAll)(e):t++<10?Es=setTimeout(i,500):dr(e)};Es=setTimeout(i,200)}}if(!zn(e,t,"contextmenu")){var n=e.display;if(!gr(n,t)&&!Hr(e,t)){var o=vr(e,t),s=n.scroller.scrollTop;if(o&&!Fo){var a=e.options.resetSelectionOnContextMenu;a&&-1==e.doc.sel.contains(o)&&Qt(e,lt)(e.doc,Y(o),Js);var l=n.input.style.cssText;if(n.inputDiv.style.position="absolute",n.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(t.clientY-5)+"px; left: "+(t.clientX-5)+"px; z-index: 1000; background: "+(Bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Er(e),dr(e),e.somethingSelected()||(n.input.value=n.prevInput=" "),n.selForContextMenu=e.doc.sel,Bo&&!wo&&r(),Jo){zs(t);var u=function(){Ks(window,"mouseup",u),setTimeout(i,20)};Xs(window,"mouseup",u)}else setTimeout(i,50)}}}}function Hr(e,t){return Kn(e,"gutterContextMenu")?Tr(e,t,"gutterContextMenu",!1,Ys):!1}function Fr(e,t){if(is(e,t.from)<0)return e;if(is(e,t.to)<=0)return fs(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=fs(t).ch-t.to.ch),rs(r,i)}function jr(e,t){for(var r=[],i=0;i<e.sel.ranges.length;i++){var n=e.sel.ranges[i];r.push(new X(Fr(n.anchor,t),Fr(n.head,t)))}return K(r,e.sel.primIndex)}function Wr(e,t,r){return e.line==t.line?rs(r.line,e.ch-t.ch+r.ch):rs(r.line+(e.line-t.line),e.ch)}function qr(e,t,r){for(var i=[],n=rs(e.first,0),o=n,s=0;s<t.length;s++){var a=t[s],l=Wr(a.from,n,o),u=Wr(fs(a),n,o);if(n=a.to,o=u,"around"==r){var p=e.sel.ranges[s],c=is(p.head,p.anchor)<0;i[s]=new X(c?u:l,c?l:u)}else i[s]=new X(l,l)}return new z(i,e.sel.primIndex)}function zr(e,t,r){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return r&&(i.update=function(t,r,i,n){t&&(this.from=Q(e,t)),r&&(this.to=Q(e,r)),i&&(this.text=i),void 0!==n&&(this.origin=n)}),Ys(e,"beforeChange",e,i),e.cm&&Ys(e.cm,"beforeChange",e.cm,i),i.canceled?null:{from:i.from,to:i.to,text:i.text,origin:i.origin}}function Xr(e,t,r){if(e.cm){if(!e.cm.curOp)return Qt(e.cm,Xr)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(Kn(e,"beforeChange")||e.cm&&Kn(e.cm,"beforeChange"))||(t=zr(e,t,!0))){var i=es&&!r&&bi(e,t.from,t.to);if(i)for(var n=i.length-1;n>=0;--n)Kr(e,{from:i[n].from,to:i[n].to,text:n?[""]:t.text});else Kr(e,t)}}function Kr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=is(t.from,t.to)){var r=jr(e,t);On(e,t,r,e.cm?e.cm.curOp.id:0/0),Qr(e,t,r,Si(e,t));var i=[];mn(e,function(e,r){r||-1!=eo(i,e.history)||(Vn(e.history,t),i.push(e.history)),Qr(e,t,null,Si(e,t))})}}function Yr(e,t,r){if(!e.cm||!e.cm.state.suppressEdits){for(var i,n=e.history,o=e.sel,s="undo"==t?n.done:n.undone,a="undo"==t?n.undone:n.done,l=0;l<s.length&&(i=s[l],r?!i.ranges||i.equals(e.sel):i.ranges);l++);if(l!=s.length){for(n.lastOrigin=n.lastSelOrigin=null;i=s.pop(),i.ranges;){if(_n(i,a),r&&!i.equals(e.sel))return void lt(e,i,{clearRedo:!1});o=i}var u=[];_n(o,a),a.push({changes:u,generation:n.generation}),n.generation=i.generation||++n.maxGeneration;for(var p=Kn(e,"beforeChange")||e.cm&&Kn(e.cm,"beforeChange"),l=i.changes.length-1;l>=0;--l){var c=i.changes[l];if(c.origin=t,p&&!zr(e,c,!1))return void(s.length=0);u.push(Cn(e,c));var d=l?jr(e,c,null):Jn(s);Qr(e,c,d,Ri(e,c)),e.cm&&oi(e.cm);var E=[];mn(e,function(e,t){t||-1!=eo(E,e.history)||(Vn(e.history,c),E.push(e.history)),Qr(e,c,null,Ri(e,c))})}}}}function $r(e,t){e.first+=t,e.sel=new z(to(e.sel.ranges,function(e){return new X(rs(e.anchor.line+t,e.anchor.ch),rs(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm&&rr(e.cm,e.first,e.first-t,t)}function Qr(e,t,r,i){if(e.cm&&!e.cm.curOp)return Qt(e.cm,Qr)(e,t,r,i);if(t.to.line<e.first)return void $r(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var n=t.text.length-1-(e.first-t.from.line);$r(e,n),t={from:rs(e.first,0),to:rs(t.to.line+n,t.to.ch),text:[Jn(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:rs(o,vn(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=xn(e,t.from,t.to),r||(r=jr(e,t,null)),e.cm?Zr(e.cm,t,i):En(e,t,i),ut(e,r,Js)}}function Zr(e,t,r){var i=e.doc,n=e.display,s=t.from,a=t.to,l=!1,u=s.line;e.options.lineWrapping||(u=In(Ui(vn(i,s.line))),i.iter(u,a.line+1,function(e){return e==n.maxLine?(l=!0,!0):void 0})),i.sel.contains(t.from,t.to)>-1&&Xn(e),En(i,t,r,o(e)),e.options.lineWrapping||(i.iter(u,s.line+t.text.length,function(e){var t=d(e);t>n.maxLineLength&&(n.maxLine=e,n.maxLineLength=t,n.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,s.line),vt(e,400);var p=t.text.length-(a.line-s.line)-1;s.line!=a.line||1!=t.text.length||dn(e.doc,t)?rr(e,s.line,a.line+1,p):ir(e,s.line,"text");var c=Kn(e,"changes"),E=Kn(e,"change");if(E||c){var h={from:s,to:a,text:t.text,removed:t.removed,origin:t.origin};E&&Wn(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}}function Jr(e,t,r,i,n){if(i||(i=r),is(i,r)<0){var o=i;i=r,r=o}"string"==typeof t&&(t=Ea(t)),Xr(e,{from:r,to:i,text:t,origin:n})}function ei(e,t){var r=e.display,i=r.sizer.getBoundingClientRect(),n=null;if(t.top+i.top<0?n=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(n=!1),null!=n&&!zo){var o=ao("div","​",null,"position: absolute; top: "+(t.top-r.viewOffset-It(e.display))+"px; height: "+(t.bottom-t.top+Qs)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(n),e.display.lineSpace.removeChild(o)}}function ti(e,t,r,i){for(null==i&&(i=0);;){var n=!1,o=Ht(e,t),s=r&&r!=t?Ht(e,r):o,a=ii(e,Math.min(o.left,s.left),Math.min(o.top,s.top)-i,Math.max(o.left,s.left),Math.max(o.bottom,s.bottom)+i),l=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=a.scrollTop&&(Cr(e,a.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(n=!0)),null!=a.scrollLeft&&(Rr(e,a.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(n=!0)),!n)return o}}function ri(e,t,r,i,n){var o=ii(e,t,r,i,n);null!=o.scrollTop&&Cr(e,o.scrollTop),null!=o.scrollLeft&&Rr(e,o.scrollLeft)}function ii(e,t,r,i,n){var o=e.display,s=zt(e.display);0>r&&(r=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=o.scroller.clientHeight-Qs,u={},p=e.doc.height+Tt(o),c=s>r,d=n>p-s;if(a>r)u.scrollTop=c?0:r;else if(n>a+l){var E=Math.min(r,(d?p:n)-l);E!=a&&(u.scrollTop=E)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,f=o.scroller.clientWidth-Qs;t+=o.gutters.offsetWidth,i+=o.gutters.offsetWidth;var m=o.gutters.offsetWidth,g=m+10>t;return h+m>t||g?(g&&(t=0),u.scrollLeft=Math.max(0,t-10-m)):i>f+h-3&&(u.scrollLeft=i+10-f),u}function ni(e,t,r){(null!=t||null!=r)&&si(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function oi(e){si(e);var t=e.getCursor(),r=t,i=t;e.options.lineWrapping||(r=t.ch?rs(t.line,t.ch-1):t,i=rs(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:i,margin:e.options.cursorScrollMargin,isCursor:!0}}function si(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=Ft(e,t.from),i=Ft(e,t.to),n=ii(e,Math.min(r.left,i.left),Math.min(r.top,i.top)-t.margin,Math.max(r.right,i.right),Math.max(r.bottom,i.bottom)+t.margin);e.scrollTo(n.scrollLeft,n.scrollTop)}}function ai(e,t,r,i){var n,o=e.doc;null==r&&(r="add"),"smart"==r&&(e.doc.mode.indent?n=Lt(e,t):r="prev");var s=e.options.tabSize,a=vn(o,t),l=ra(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var u,p=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==r&&(u=e.doc.mode.indent(n,a.text.slice(p.length),a.text),u==Zs)){if(!i)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?ra(vn(o,t-1).text,null,s):0:"add"==r?u=l+e.options.indentUnit:"subtract"==r?u=l-e.options.indentUnit:"number"==typeof r&&(u=l+r),u=Math.max(0,u);var c="",d=0;if(e.options.indentWithTabs)for(var E=Math.floor(u/s);E;--E)d+=s,c+=" ";if(u>d&&(c+=Zn(u-d)),c!=p)Jr(e.doc,c,rs(t,0),rs(t,p.length),"+input");else for(var E=0;E<o.sel.ranges.length;E++){var h=o.sel.ranges[E];if(h.head.line==t&&h.head.ch<p.length){var d=rs(t,p.length);nt(o,E,new X(d,d));break}}a.stateAfter=null}function li(e,t,r,i){var n=t,o=t,s=e.doc;return"number"==typeof t?o=vn(s,$(s,t)):n=In(t),null==n?null:(i(o,n)&&ir(e,n,r),o)}function ui(e,t){for(var r=e.doc.sel.ranges,i=[],n=0;n<r.length;n++){for(var o=t(r[n]);i.length&&is(o.from,Jn(i).to)<=0;){var s=i.pop();if(is(s.from,o.from)<0){o.from=s.from;break}}i.push(o)}$t(e,function(){for(var t=i.length-1;t>=0;t--)Jr(e.doc,"",i[t].from,i[t].to,"+delete");oi(e)})}function pi(e,t,r,i,n){function o(){var t=a+r;return t<e.first||t>=e.first+e.size?c=!1:(a=t,p=vn(e,t))}function s(e){var t=(n?Oo:Po)(p,l,r,!0);if(null==t){if(e||!o())return c=!1;l=n?(0>r?yo:To)(p):0>r?p.text.length:0}else l=t;return!0}var a=t.line,l=t.ch,u=r,p=vn(e,a),c=!0;if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var d=null,E="group"==i,h=!0;!(0>r)||s(!h);h=!1){var f=p.text.charAt(l)||"\n",m=aa(f)?"w":E&&"\n"==f?"n":!E||/\s/.test(f)?null:"p";if(!E||h||m||(m="s"),d&&d!=m){0>r&&(r=1,s());break}if(m&&(d=m),r>0&&!s(!h))break}var g=Et(e,rs(a,l),u,!0);return c||(g.hitSide=!0),g}function ci(e,t,r,i){var n,o=e.doc,s=t.left;if("page"==i){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);n=t.top+r*(a-(0>r?1.5:.5)*zt(e.display))}else"line"==i&&(n=r>0?t.bottom+3:t.top-3);for(;;){var l=Wt(e,s,n);if(!l.outside)break;if(0>r?0>=n:n>=o.height){l.hitSide=!0;break}n+=5*r}return l}function di(e,t){var r=vn(e,t.line).text,i=t.ch,n=t.ch;if(r){(t.xRel<0||n==r.length)&&i?--i:++n;for(var o=r.charAt(i),s=aa(o)?aa:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!aa(e)};i>0&&s(r.charAt(i-1));)--i;for(;n<r.length&&s(r.charAt(n));)++n}return new X(rs(t.line,i),rs(t.line,n))}function Ei(t,r,i,n){e.defaults[t]=r,i&&(gs[t]=n?function(e,t,r){r!=vs&&i(e,t,r)}:i)}function hi(e){return"string"==typeof e?Cs[e]:e}function fi(e,t,r,i,n){if(i&&i.shared)return mi(e,t,r,i,n);if(e.cm&&!e.cm.curOp)return Qt(e.cm,fi)(e,t,r,i,n);var o=new Ds(e,n),s=is(t,r);if(i&&io(i,o,!1),s>0||0==s&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=ao("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||(o.widgetNode.ignoreEvents=!0),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Bi(e,t.line,t,r,o)||t.line!=r.line&&Bi(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");ts=!0}o.addToHistory&&On(e,{from:t,to:r,origin:"markText"},e.sel,0/0);var a,l=t.line,u=e.cm;if(e.iter(l,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&Ui(e)==u.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&Ln(e,0),Ti(e,new Ni(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(t){ji(e,t)&&Ln(t,0)}),o.clearOnEnter&&Xs(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(es=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++_s,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)rr(u,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle)for(var p=t.line;p<=r.line;p++)ir(u,p,"text");o.atomic&&ct(u.doc),Wn(u,"markerAdded",u,o)}return o}function mi(e,t,r,i,n){i=io(i),i.shared=!1;var o=[fi(e,t,r,i,n)],s=o[0],a=i.widgetNode;return mn(e,function(e){a&&(i.widgetNode=a.cloneNode(!0)),o.push(fi(e,Q(e,t),Q(e,r),i,n));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=Jn(o)}),new Ms(o,s)}function gi(e){return e.findMarks(rs(e.first,0),e.clipPos(rs(e.lastLine())),function(e){return e.parent})}function vi(e,t){for(var r=0;r<t.length;r++){var i=t[r],n=i.find(),o=e.clipPos(n.from),s=e.clipPos(n.to);if(is(o,s)){var a=fi(e,o,s,i.primary,i.primary.type);i.markers.push(a),a.parent=i}}}function xi(e){for(var t=0;t<e.length;t++){var r=e[t],i=[r.primary.doc];mn(r.primary.doc,function(e){i.push(e)});for(var n=0;n<r.markers.length;n++){var o=r.markers[n];-1==eo(i,o.doc)&&(o.parent=null,r.markers.splice(n--,1))}}}function Ni(e,t,r){this.marker=e,this.from=t,this.to=r}function Li(e,t){if(e)for(var r=0;r<e.length;++r){var i=e[r];if(i.marker==t)return i}}function Ii(e,t){for(var r,i=0;i<e.length;++i)e[i]!=t&&(r||(r=[])).push(e[i]);return r}function Ti(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function yi(e,t,r){if(e)for(var i,n=0;n<e.length;++n){var o=e[n],s=o.marker,a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&"bookmark"==s.type&&(!r||!o.marker.insertLeft)){var l=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(i||(i=[])).push(new Ni(s,o.from,l?null:o.to))}}return i}function Ai(e,t,r){if(e)for(var i,n=0;n<e.length;++n){var o=e[n],s=o.marker,a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!r||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(i||(i=[])).push(new Ni(s,l?null:o.from-t,null==o.to?null:o.to-t))}}return i}function Si(e,t){var r=J(e,t.from.line)&&vn(e,t.from.line).markedSpans,i=J(e,t.to.line)&&vn(e,t.to.line).markedSpans;if(!r&&!i)return null;var n=t.from.ch,o=t.to.ch,s=0==is(t.from,t.to),a=yi(r,n,s),l=Ai(i,o,s),u=1==t.text.length,p=Jn(t.text).length+(u?n:0);if(a)for(var c=0;c<a.length;++c){var d=a[c];if(null==d.to){var E=Li(l,d.marker);E?u&&(d.to=null==E.to?null:E.to+p):d.to=n}}if(l)for(var c=0;c<l.length;++c){var d=l[c];if(null!=d.to&&(d.to+=p),null==d.from){var E=Li(a,d.marker);E||(d.from=p,u&&(a||(a=[])).push(d))}else d.from+=p,u&&(a||(a=[])).push(d)}a&&(a=Ci(a)),l&&l!=a&&(l=Ci(l));var h=[a];if(!u){var f,m=t.text.length-2;if(m>0&&a)for(var c=0;c<a.length;++c)null==a[c].to&&(f||(f=[])).push(new Ni(a[c].marker,null,null));for(var c=0;m>c;++c)h.push(f);h.push(l)}return h}function Ci(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ri(e,t){var r=Gn(e,t),i=Si(e,t);if(!r)return i;if(!i)return r;for(var n=0;n<r.length;++n){var o=r[n],s=i[n];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else s&&(r[n]=s)}return r}function bi(e,t,r){var i=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||i&&-1!=eo(i,r)||(i||(i=[])).push(r)}}),!i)return null;for(var n=[{from:t,to:r}],o=0;o<i.length;++o)for(var s=i[o],a=s.find(0),l=0;l<n.length;++l){var u=n[l];if(!(is(u.to,a.from)<0||is(u.from,a.to)>0)){var p=[l,1],c=is(u.from,a.from),d=is(u.to,a.to);(0>c||!s.inclusiveLeft&&!c)&&p.push({from:u.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&p.push({from:a.to,to:u.to}),n.splice.apply(n,p),l+=p.length-1}}return n}function Oi(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Pi(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Di(e){return e.inclusiveLeft?-1:0}function _i(e){return e.inclusiveRight?1:0}function Mi(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var i=e.find(),n=t.find(),o=is(i.from,n.from)||Di(e)-Di(t);if(o)return-o;var s=is(i.to,n.to)||_i(e)-_i(t);return s?s:t.id-e.id}function wi(e,t){var r,i=ts&&e.markedSpans;if(i)for(var n,o=0;o<i.length;++o)n=i[o],n.marker.collapsed&&null==(t?n.from:n.to)&&(!r||Mi(r,n.marker)<0)&&(r=n.marker);return r}function Gi(e){return wi(e,!0)}function ki(e){return wi(e,!1)}function Bi(e,t,r,i,n){var o=vn(e,t),s=ts&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var u=l.marker.find(0),p=is(u.from,r)||Di(l.marker)-Di(n),c=is(u.to,i)||_i(l.marker)-_i(n);if(!(p>=0&&0>=c||0>=p&&c>=0)&&(0>=p&&(is(u.to,r)||_i(l.marker)-Di(n))>0||p>=0&&(is(u.from,i)||Di(l.marker)-_i(n))<0))return!0}}}function Ui(e){for(var t;t=Gi(e);)e=t.find(-1,!0).line;return e}function Vi(e){for(var t,r;t=ki(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Hi(e,t){var r=vn(e,t),i=Ui(r);return r==i?t:In(i)}function Fi(e,t){if(t>e.lastLine())return t;var r,i=vn(e,t);if(!ji(e,i))return t;for(;r=ki(i);)i=r.find(1,!0).line;return In(i)+1}function ji(e,t){var r=ts&&t.markedSpans;if(r)for(var i,n=0;n<r.length;++n)if(i=r[n],i.marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&Wi(e,t,i))return!0}}function Wi(e,t,r){if(null==r.to){var i=r.marker.find(1,!0);return Wi(e,i.line,Li(i.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var n,o=0;o<t.markedSpans.length;++o)if(n=t.markedSpans[o],n.marker.collapsed&&!n.marker.widgetNode&&n.from==r.to&&(null==n.to||n.to!=r.from)&&(n.marker.inclusiveLeft||r.marker.inclusiveRight)&&Wi(e,t,n))return!0}function qi(e,t,r){yn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ni(e,null,r)}function zi(e){return null!=e.height?e.height:(po(document.body,e.node)||uo(e.cm.display.measure,ao("div",[e.node],null,"position: relative")),e.height=e.node.offsetHeight)}function Xi(e,t,r,i){var n=new ws(e,r,i);return n.noHScroll&&(e.display.alignWidgets=!0),li(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==n.insertAt?r.push(n):r.splice(Math.min(r.length-1,Math.max(0,n.insertAt)),0,n),n.line=t,!ji(e.doc,t)){var i=yn(t)<e.doc.scrollTop;Ln(t,t.height+zi(n)),i&&ni(e,null,n.height),e.curOp.forceUpdate=!0}return!0}),n}function Ki(e,t,r,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Oi(e),Pi(e,r);var n=i?i(e):1;n!=e.height&&Ln(e,n)}function Yi(e){e.parent=null,Oi(e)}function $i(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var i=r[1]?"bgClass":"textClass";null==t[i]?t[i]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[i])||(t[i]+=" "+r[2])}return e}function Qi(t,r){if(t.blankLine)return t.blankLine(r);if(t.innerMode){var i=e.innerMode(t,r);return i.mode.blankLine?i.mode.blankLine(i.state):void 0}}function Zi(e,t,r){var i=e.token(t,r);if(t.pos<=t.start)throw new Error("Mode "+e.name+" failed to advance stream.");return i}function Ji(t,r,i,n,o,s,a){var l=i.flattenSpans;null==l&&(l=t.options.flattenSpans);var u,p=0,c=null,d=new Ps(r,t.options.tabSize);for(""==r&&$i(Qi(i,n),s);!d.eol();){if(d.pos>t.options.maxHighlightLength?(l=!1,a&&rn(t,r,n,d.pos),d.pos=r.length,u=null):u=$i(Zi(i,d,n),s),t.options.addModeClass){var E=e.innerMode(i,n).mode.name;E&&(u="m-"+(u?E+" "+u:E))}l&&c==u||(p<d.start&&o(d.start,c),p=d.start,c=u),d.start=d.pos}for(;p<d.pos;){var h=Math.min(d.pos,p+5e4);o(h,c),p=h}}function en(e,t,r,i){var n=[e.state.modeGen],o={};Ji(e,t.text,e.doc.mode,r,function(e,t){n.push(e,t)},o,i);for(var s=0;s<e.state.overlays.length;++s){var a=e.state.overlays[s],l=1,u=0;Ji(e,t.text,a.mode,!0,function(e,t){for(var r=l;e>u;){var i=n[l];i>e&&n.splice(l,1,e,n[l+1],i),l+=2,u=Math.min(e,i)}if(t)if(a.opaque)n.splice(r,l-r,e,"cm-overlay "+t),l=r+2;else for(;l>r;r+=2){var o=n[r+1];n[r+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:n,classes:o.bgClass||o.textClass?o:null}}function tn(e,t){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=en(e,t,t.stateAfter=Lt(e,In(t)));t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null)}return t.styles}function rn(e,t,r,i){var n=e.doc.mode,o=new Ps(t,e.options.tabSize);for(o.start=o.pos=i||0,""==t&&Qi(n,r);!o.eol()&&o.pos<=e.options.maxHighlightLength;)Zi(n,o,r),o.start=o.pos}function nn(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Bs:ks;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function on(e,t){var r=ao("span",null,null,Uo?"padding-right: .1px":null),i={pre:ao("pre",[r]),content:r,col:0,pos:0,cm:e};t.measure={};for(var n=0;n<=(t.rest?t.rest.length:0);n++){var o,s=n?t.rest[n-1]:t.line;i.pos=0,i.addToken=an,(Bo||Uo)&&e.getOption("lineWrapping")&&(i.addToken=ln(i.addToken)),xo(e.display.measure)&&(o=An(s))&&(i.addToken=un(i.addToken,o)),i.map=[],cn(s,i,tn(e,s)),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=mo(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=mo(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(vo(e.display.measure))),0==n?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return Ys(e,"renderLine",e,t.line,i.pre),i}function sn(e){var t=ao("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t}function an(e,t,r,i,n,o){if(t){var s=e.cm.options.specialChars,a=!1;if(s.test(t))for(var l=document.createDocumentFragment(),u=0;;){s.lastIndex=u;var p=s.exec(t),c=p?p.index-u:t.length-u;if(c){var d=document.createTextNode(t.slice(u,u+c));l.appendChild(wo?ao("span",[d]):d),e.map.push(e.pos,e.pos+c,d),e.col+=c,e.pos+=c}if(!p)break;if(u+=c+1," "==p[0]){var E=e.cm.options.tabSize,h=E-e.col%E,d=l.appendChild(ao("span",Zn(h),"cm-tab"));e.col+=h}else{var d=e.cm.options.specialCharPlaceholder(p[0]);l.appendChild(wo?ao("span",[d]):d),e.col+=1}e.map.push(e.pos,e.pos+1,d),e.pos++}else{e.col+=t.length;var l=document.createTextNode(t);e.map.push(e.pos,e.pos+t.length,l),wo&&(a=!0),e.pos+=t.length}if(r||i||n||a){var f=r||"";i&&(f+=i),n&&(f+=n);var m=ao("span",[l],f);return o&&(m.title=o),e.content.appendChild(m)}e.content.appendChild(l)}}function ln(e){function t(e){for(var t=" ",r=0;r<e.length-2;++r)t+=r%2?" ":" ";return t+=" "}return function(r,i,n,o,s,a){e(r,i.replace(/ {3,}/g,t),n,o,s,a)}}function un(e,t){return function(r,i,n,o,s,a){n=n?n+" cm-force-border":"cm-force-border";for(var l=r.pos,u=l+i.length;;){for(var p=0;p<t.length;p++){var c=t[p];if(c.to>l&&c.from<=l)break}if(c.to>=u)return e(r,i,n,o,s,a);e(r,i.slice(0,c.to-l),n,o,null,a),o=null,i=i.slice(c.to-l),l=c.to}}}function pn(e,t,r,i){var n=!i&&r.widgetNode;n&&(e.map.push(e.pos,e.pos+t,n),e.content.appendChild(n)),e.pos+=t}function cn(e,t,r){var i=e.markedSpans,n=e.text,o=0;if(i)for(var s,a,l,u,p,c,d=n.length,E=0,h=1,f="",m=0;;){if(m==E){a=l=u=p="",c=null,m=1/0;for(var g=[],v=0;v<i.length;++v){var x=i[v],N=x.marker;x.from<=E&&(null==x.to||x.to>E)?(null!=x.to&&m>x.to&&(m=x.to,l=""),N.className&&(a+=" "+N.className),N.startStyle&&x.from==E&&(u+=" "+N.startStyle),N.endStyle&&x.to==m&&(l+=" "+N.endStyle),N.title&&!p&&(p=N.title),N.collapsed&&(!c||Mi(c.marker,N)<0)&&(c=x)):x.from>E&&m>x.from&&(m=x.from),"bookmark"==N.type&&x.from==E&&N.widgetNode&&g.push(N)}if(c&&(c.from||0)==E&&(pn(t,(null==c.to?d+1:c.to)-E,c.marker,null==c.from),null==c.to))return;if(!c&&g.length)for(var v=0;v<g.length;++v)pn(t,0,g[v])}if(E>=d)break;for(var L=Math.min(d,m);;){if(f){var I=E+f.length;if(!c){var T=I>L?f.slice(0,L-E):f;t.addToken(t,T,s?s+a:a,u,E+T.length==m?l:"",p)}if(I>=L){f=f.slice(L-E),E=L;break}E=I,u=""}f=n.slice(o,o=r[h++]),s=nn(r[h++],t.cm.options)}}else for(var h=1;h<r.length;h+=2)t.addToken(t,n.slice(o,o=r[h]),nn(r[h+1],t.cm.options))}function dn(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Jn(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function En(e,t,r,i){function n(e){return r?r[e]:null}function o(e,r,n){Ki(e,r,n,i),Wn(e,"change",e,t)}var s=t.from,a=t.to,l=t.text,u=vn(e,s.line),p=vn(e,a.line),c=Jn(l),d=n(l.length-1),E=a.line-s.line;if(dn(e,t)){for(var h=0,f=[];h<l.length-1;++h)f.push(new Gs(l[h],n(h),i));o(p,p.text,d),E&&e.remove(s.line,E),f.length&&e.insert(s.line,f)}else if(u==p)if(1==l.length)o(u,u.text.slice(0,s.ch)+c+u.text.slice(a.ch),d);else{for(var f=[],h=1;h<l.length-1;++h)f.push(new Gs(l[h],n(h),i));f.push(new Gs(c+u.text.slice(a.ch),d,i)),o(u,u.text.slice(0,s.ch)+l[0],n(0)),e.insert(s.line+1,f)}else if(1==l.length)o(u,u.text.slice(0,s.ch)+l[0]+p.text.slice(a.ch),n(0)),e.remove(s.line+1,E);else{o(u,u.text.slice(0,s.ch)+l[0],n(0)),o(p,c+p.text.slice(a.ch),d);for(var h=1,f=[];h<l.length-1;++h)f.push(new Gs(l[h],n(h),i));E>1&&e.remove(s.line+1,E-1),e.insert(s.line+1,f)}Wn(e,"change",e,t)}function hn(e){this.lines=e,this.parent=null;for(var t=0,r=0;t<e.length;++t)e[t].parent=this,r+=e[t].height;this.height=r}function fn(e){this.children=e;for(var t=0,r=0,i=0;i<e.length;++i){var n=e[i];t+=n.chunkSize(),r+=n.height,n.parent=this}this.size=t,this.height=r,this.parent=null}function mn(e,t,r){function i(e,n,o){if(e.linked)for(var s=0;s<e.linked.length;++s){var a=e.linked[s];if(a.doc!=n){var l=o&&a.sharedHist;(!r||l)&&(t(a.doc,l),i(a.doc,e,l))}}}i(e,null,!0)}function gn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,s(e),r(e),e.options.lineWrapping||E(e),e.options.mode=t.modeOption,rr(e)}function vn(e,t){if(t-=e.first,0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var i=0;;++i){var n=r.children[i],o=n.chunkSize();if(o>t){r=n;break}t-=o}return r.lines[t]}function xn(e,t,r){var i=[],n=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;n==r.line&&(o=o.slice(0,r.ch)),n==t.line&&(o=o.slice(t.ch)),i.push(o),++n}),i}function Nn(e,t,r){var i=[];return e.iter(t,r,function(e){i.push(e.text)}),i}function Ln(e,t){var r=t-e.height;if(r)for(var i=e;i;i=i.parent)i.height+=r}function In(e){if(null==e.parent)return null;for(var t=e.parent,r=eo(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var n=0;i.children[n]!=t;++n)r+=i.children[n].chunkSize();return r+t.first}function Tn(e,t){var r=e.first;e:do{for(var i=0;i<e.children.length;++i){var n=e.children[i],o=n.height;if(o>t){e=n;continue e}t-=o,r+=n.chunkSize()}return r}while(!e.lines);for(var i=0;i<e.lines.length;++i){var s=e.lines[i],a=s.height;if(a>t)break;t-=a}return r+i}function yn(e){e=Ui(e);for(var t=0,r=e.parent,i=0;i<r.lines.length;++i){var n=r.lines[i];if(n==e)break;t+=n.height}for(var o=r.parent;o;r=o,o=r.parent)for(var i=0;i<o.children.length;++i){var s=o.children[i];if(s==r)break;t+=s.height}return t}function An(e){var t=e.order;return null==t&&(t=e.order=va(e.text)),t}function Sn(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Cn(e,t){var r={from:j(t.from),to:fs(t),text:xn(e,t.from,t.to)};return Mn(e,r,t.from.line,t.to.line+1),mn(e,function(e){Mn(e,r,t.from.line,t.to.line+1)},!0),r}function Rn(e){for(;e.length;){var t=Jn(e);if(!t.ranges)break;e.pop()}}function bn(e,t){return t?(Rn(e.done),Jn(e.done)):e.done.length&&!Jn(e.done).ranges?Jn(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Jn(e.done)):void 0}function On(e,t,r,i){var n=e.history;n.undone.length=0;var o,s=+new Date;if((n.lastOp==i||n.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&n.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=bn(n,n.lastOp==i))){var a=Jn(o.changes);0==is(t.from,t.to)&&0==is(t.from,a.to)?a.to=fs(t):o.changes.push(Cn(e,t))}else{var l=Jn(n.done);for(l&&l.ranges||_n(e.sel,n.done),o={changes:[Cn(e,t)],generation:n.generation},n.done.push(o);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(r),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=s,n.lastOp=i,n.lastOrigin=n.lastSelOrigin=t.origin,a||Ys(e,"historyAdded")}function Pn(e,t,r,i){var n=t.charAt(0);return"*"==n||"+"==n&&r.ranges.length==i.ranges.length&&r.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Dn(e,t,r,i){var n=e.history,o=i&&i.origin;r==n.lastOp||o&&n.lastSelOrigin==o&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==o||Pn(e,o,Jn(n.done),t))?n.done[n.done.length-1]=t:_n(t,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=o,n.lastOp=r,i&&i.clearRedo!==!1&&Rn(n.undone)}function _n(e,t){var r=Jn(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Mn(e,t,r,i){var n=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,i),function(r){r.markedSpans&&((n||(n=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function wn(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Gn(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var i=0,n=[];i<t.text.length;++i)n.push(wn(r[i]));return n}function kn(e,t,r){for(var i=0,n=[];i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?z.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];n.push({changes:a});for(var l=0;l<s.length;++l){var u,p=s[l];if(a.push({from:p.from,to:p.to,text:p.text}),t)for(var c in p)(u=c.match(/^spans_(\d+)$/))&&eo(t,Number(u[1]))>-1&&(Jn(a)[c]=p[c],delete p[c])}}}return n}function Bn(e,t,r,i){r<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function Un(e,t,r,i){for(var n=0;n<e.length;++n){var o=e[n],s=!0;if(o.ranges){o.copied||(o=e[n]=o.deepCopy(),o.copied=!0);for(var a=0;a<o.ranges.length;a++)Bn(o.ranges[a].anchor,t,r,i),Bn(o.ranges[a].head,t,r,i)}else{for(var a=0;a<o.changes.length;++a){var l=o.changes[a];if(r<l.from.line)l.from=rs(l.from.line+i,l.from.ch),l.to=rs(l.to.line+i,l.to.ch);else if(t<=l.to.line){s=!1;break}}s||(e.splice(0,n+1),n=0)}}}function Vn(e,t){var r=t.from.line,i=t.to.line,n=t.text.length-(i-r)-1;Un(e.done,r,i,n),Un(e.undone,r,i,n)}function Hn(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Fn(e){return e.target||e.srcElement}function jn(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Yo&&e.ctrlKey&&1==t&&(t=3),t}function Wn(e,t){function r(e){return function(){e.apply(null,n)}}var i=e._handlers&&e._handlers[t];if(i){var n=Array.prototype.slice.call(arguments,2);js||(++$s,js=[],setTimeout(qn,0));for(var o=0;o<i.length;++o)js.push(r(i[o]))}}function qn(){--$s;var e=js;js=null;for(var t=0;t<e.length;++t)e[t]()}function zn(e,t,r){return Ys(e,r||t.type,e,t),Hn(t)||t.codemirrorIgnore}function Xn(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)-1==eo(r,t[i])&&r.push(t[i])}function Kn(e,t){var r=e._handlers&&e._handlers[t];return r&&r.length>0}function Yn(e){e.prototype.on=function(e,t){Xs(this,e,t)},e.prototype.off=function(e,t){Ks(this,e,t)}}function $n(){this.id=null}function Qn(e,t,r){for(var i=0,n=0;;){var o=e.indexOf(" ",i);-1==o&&(o=e.length);var s=o-i;if(o==e.length||n+s>=t)return i+Math.min(s,t-n);if(n+=o-i,n+=r-n%r,i=o+1,n>=t)return i}}function Zn(e){for(;ia.length<=e;)ia.push(Jn(ia)+" "); return ia[e]}function Jn(e){return e[e.length-1]}function eo(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function to(e,t){for(var r=[],i=0;i<e.length;i++)r[i]=t(e[i],i);return r}function ro(e,t){var r;if(Object.create)r=Object.create(e);else{var i=function(){};i.prototype=e,r=new i}return t&&io(t,r),r}function io(e,t,r){t||(t={});for(var i in e)!e.hasOwnProperty(i)||r===!1&&t.hasOwnProperty(i)||(t[i]=e[i]);return t}function no(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function oo(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function so(e){return e.charCodeAt(0)>=768&&la.test(e)}function ao(e,t,r,i){var n=document.createElement(e);if(r&&(n.className=r),i&&(n.style.cssText=i),"string"==typeof t)n.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)n.appendChild(t[o]);return n}function lo(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function uo(e,t){return lo(e).appendChild(t)}function po(e,t){if(e.contains)return e.contains(t);for(;t=t.parentNode;)if(t==e)return!0}function co(){return document.activeElement}function Eo(e){return new RegExp("\\b"+e+"\\b\\s*")}function ho(e,t){var r=Eo(t);r.test(e.className)&&(e.className=e.className.replace(r,""))}function fo(e,t){Eo(t).test(e.className)||(e.className+=" "+t)}function mo(e,t){for(var r=e.split(" "),i=0;i<r.length;i++)r[i]&&!Eo(r[i]).test(t)&&(t+=" "+r[i]);return t}function go(e){if(null!=ua)return ua;var t=ao("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return uo(e,t),t.offsetWidth&&(ua=t.offsetHeight-t.clientHeight),ua||0}function vo(e){if(null==pa){var t=ao("span","​");uo(e,ao("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(pa=t.offsetWidth<=1&&t.offsetHeight>2&&!Mo)}return pa?ao("span","​"):ao("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function xo(e){if(null!=ca)return ca;var t=uo(e,document.createTextNode("AخA")),r=oa(t,0,1).getBoundingClientRect();if(r.left==r.right)return!1;var i=oa(t,1,2).getBoundingClientRect();return ca=i.right-r.right<3}function No(e,t,r,i){if(!e)return i(t,r,"ltr");for(var n=!1,o=0;o<e.length;++o){var s=e[o];(s.from<r&&s.to>t||t==r&&s.to==t)&&(i(Math.max(s.from,t),Math.min(s.to,r),1==s.level?"rtl":"ltr"),n=!0)}n||i(t,r,"ltr")}function Lo(e){return e.level%2?e.to:e.from}function Io(e){return e.level%2?e.from:e.to}function To(e){var t=An(e);return t?Lo(t[0]):0}function yo(e){var t=An(e);return t?Io(Jn(t)):e.text.length}function Ao(e,t){var r=vn(e.doc,t),i=Ui(r);i!=r&&(t=In(i));var n=An(i),o=n?n[0].level%2?yo(i):To(i):0;return rs(t,o)}function So(e,t){for(var r,i=vn(e.doc,t);r=ki(i);)i=r.find(1,!0).line,t=null;var n=An(i),o=n?n[0].level%2?To(i):yo(i):i.text.length;return rs(null==t?In(i):t,o)}function Co(e,t,r){var i=e[0].level;return t==i?!0:r==i?!1:r>t}function Ro(e,t){ga=null;for(var r,i=0;i<e.length;++i){var n=e[i];if(n.from<t&&n.to>t)return i;if(n.from==t||n.to==t){if(null!=r)return Co(e,n.level,e[r].level)?(n.from!=n.to&&(ga=r),i):(n.from!=n.to&&(ga=i),r);r=i}}return r}function bo(e,t,r,i){if(!i)return t+r;do t+=r;while(t>0&&so(e.text.charAt(t)));return t}function Oo(e,t,r,i){var n=An(e);if(!n)return Po(e,t,r,i);for(var o=Ro(n,t),s=n[o],a=bo(e,t,s.level%2?-r:r,i);;){if(a>s.from&&a<s.to)return a;if(a==s.from||a==s.to)return Ro(n,a)==o?a:(s=n[o+=r],r>0==s.level%2?s.to:s.from);if(s=n[o+=r],!s)return null;a=r>0==s.level%2?bo(e,s.to,-1,i):bo(e,s.from,1,i)}}function Po(e,t,r,i){var n=t+r;if(i)for(;n>0&&so(e.text.charAt(n));)n+=r;return 0>n||n>e.text.length?null:n}var Do=/gecko\/\d/i.test(navigator.userAgent),_o=/MSIE \d/.test(navigator.userAgent),Mo=_o&&(null==document.documentMode||document.documentMode<8),wo=_o&&(null==document.documentMode||document.documentMode<9),Go=_o&&(null==document.documentMode||document.documentMode<10),ko=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent),Bo=_o||ko,Uo=/WebKit\//.test(navigator.userAgent),Vo=Uo&&/Qt\/\d+\.\d+/.test(navigator.userAgent),Ho=/Chrome\//.test(navigator.userAgent),Fo=/Opera\//.test(navigator.userAgent),jo=/Apple Computer/.test(navigator.vendor),Wo=/KHTML\//.test(navigator.userAgent),qo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),zo=/PhantomJS/.test(navigator.userAgent),Xo=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),Ko=Xo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),Yo=Xo||/Mac/.test(navigator.platform),$o=/win/i.test(navigator.platform),Qo=Fo&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Qo&&(Qo=Number(Qo[1])),Qo&&Qo>=15&&(Fo=!1,Uo=!0);var Zo=Yo&&(Vo||Fo&&(null==Qo||12.11>Qo)),Jo=Do||Bo&&!wo,es=!1,ts=!1,rs=e.Pos=function(e,t){return this instanceof rs?(this.line=e,void(this.ch=t)):new rs(e,t)},is=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch};z.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],i=e.ranges[t];if(0!=is(r.anchor,i.anchor)||0!=is(r.head,i.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new X(j(this.ranges[t].anchor),j(this.ranges[t].head));return new z(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var i=this.ranges[r];if(is(t,i.from())>=0&&is(e,i.to())<=0)return r}return-1}},X.prototype={from:function(){return q(this.anchor,this.head)},to:function(){return W(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var ns,os,ss,as={left:0,right:0,top:0,bottom:0},ls=0,us=0,ps=0,cs=null;Bo?cs=-.53:Do?cs=15:Ho?cs=-.7:jo&&(cs=-1/3);var ds,Es,hs=null,fs=e.changeEnd=function(e){return e.text?rs(e.from.line+e.text.length-1,Jn(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),Er(this),pr(this)},setOption:function(e,t){var r=this.options,i=r[e];(r[e]!=t||"mode"==e)&&(r[e]=t,gs.hasOwnProperty(e)&&Qt(this,gs[e])(this,t,i))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](e)},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||"string"!=typeof t[r]&&t[r].name==e)return t.splice(r,1),!0},addOverlay:Zt(function(t,r){var i=t.token?t:e.getMode(this.options,t);if(i.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:i,modeSpec:t,opaque:r&&r.opaque}),this.state.modeGen++,rr(this)}),removeOverlay:Zt(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var i=t[r].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return t.splice(r,1),this.state.modeGen++,void rr(this)}}),indentLine:Zt(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),J(this.doc,e)&&ai(this,e,t,r)}),indentSelection:Zt(function(e){for(var t=this.doc.sel.ranges,r=-1,i=0;i<t.length;i++){var n=t[i];if(n.empty())n.head.line>r&&(ai(this,n.head.line,e,!0),r=n.head.line,i==this.doc.sel.primIndex&&oi(this));else{var o=Math.max(r,n.from().line),s=n.to();r=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var a=o;r>a;++a)ai(this,a,e)}}}),getTokenAt:function(e,t){var r=this.doc;e=Q(r,e);for(var i=Lt(this,e.line,t),n=this.doc.mode,o=vn(r,e.line),s=new Ps(o.text,this.options.tabSize);s.pos<e.ch&&!s.eol();){s.start=s.pos;var a=Zi(n,s,i)}return{start:s.start,end:s.pos,string:s.current(),type:a||null,state:i}},getTokenTypeAt:function(e){e=Q(this.doc,e);var t,r=tn(this,vn(this.doc,e.line)),i=0,n=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var s=i+n>>1;if((s?r[2*s-1]:0)>=o)n=s;else{if(!(r[2*s+1]<o)){t=r[2*s+2];break}i=s+1}}var a=t?t.indexOf("cm-overlay "):-1;return 0>a?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!Ts.hasOwnProperty(t))return Ts;var i=Ts[t],n=this.getModeAt(e);if("string"==typeof n[t])i[n[t]]&&r.push(i[n[t]]);else if(n[t])for(var o=0;o<n[t].length;o++){var s=i[n[t][o]];s&&r.push(s)}else n.helperType&&i[n.helperType]?r.push(i[n.helperType]):i[n.name]&&r.push(i[n.name]);for(var o=0;o<i._global.length;o++){var a=i._global[o];a.pred(n,this)&&-1==eo(r,a.val)&&r.push(a.val)}return r},getStateAfter:function(e,t){var r=this.doc;return e=$(r,null==e?r.first+r.size-1:e),Lt(this,e+1,t)},cursorCoords:function(e,t){var r,i=this.doc.sel.primary();return r=null==e?i.head:"object"==typeof e?Q(this.doc,e):e?i.from():i.to(),Ht(this,r,t||"page")},charCoords:function(e,t){return Vt(this,Q(this.doc,e),t||"page")},coordsChar:function(e,t){return e=Ut(this,e,t||"page"),Wt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=Ut(this,{top:e,left:0},t||"page").top,Tn(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var r=!1,i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0);var n=vn(this.doc,e);return Bt(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-yn(n):0)},defaultTextHeight:function(){return zt(this.display)},defaultCharWidth:function(){return Xt(this.display)},setGutterMarker:Zt(function(e,t,r){return li(this,e,"gutter",function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=r,!r&&oo(i)&&(e.gutterMarkers=null),!0})}),clearGutter:Zt(function(e){var t=this,r=t.doc,i=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,ir(t,i,"gutter"),oo(r.gutterMarkers)&&(r.gutterMarkers=null)),++i})}),addLineClass:Zt(function(e,t,r){return li(this,e,"class",function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"wrapClass";if(e[i]){if(new RegExp("(?:^|\\s)"+r+"(?:$|\\s)").test(e[i]))return!1;e[i]+=" "+r}else e[i]=r;return!0})}),removeLineClass:Zt(function(e,t,r){return li(this,e,"class",function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"wrapClass",n=e[i];if(!n)return!1;if(null==r)e[i]=null;else{var o=n.match(new RegExp("(?:^|\\s+)"+r+"(?:$|\\s+)"));if(!o)return!1;var s=o.index+o[0].length;e[i]=n.slice(0,o.index)+(o.index&&s!=n.length?" ":"")+n.slice(s)||null}return!0})}),addLineWidget:Zt(function(e,t,r){return Xi(this,e,t,r)}),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if("number"==typeof e){if(!J(this.doc,e))return null;var t=e;if(e=vn(this.doc,e),!e)return null}else{var t=In(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,i,n){var o=this.display;e=Ht(this,Q(this.doc,e));var s=e.bottom,a=e.left;if(t.style.position="absolute",o.sizer.appendChild(t),"over"==i)s=e.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==n?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==n?a=0:"middle"==n&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),r&&ri(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:Zt(Mr),triggerOnKeyPress:Zt(kr),triggerOnKeyUp:Zt(Gr),execCommand:function(e){return Ss.hasOwnProperty(e)?Ss[e](this):void 0},findPosH:function(e,t,r,i){var n=1;0>t&&(n=-1,t=-t);for(var o=0,s=Q(this.doc,e);t>o&&(s=pi(this.doc,s,n,r,i),!s.hitSide);++o);return s},moveH:Zt(function(e,t){var r=this;r.extendSelectionsBy(function(i){return r.display.shift||r.doc.extend||i.empty()?pi(r.doc,i.head,e,t,r.options.rtlMoveVisually):0>e?i.from():i.to()},ta)}),deleteH:Zt(function(e,t){var r=this.doc.sel,i=this.doc;r.somethingSelected()?i.replaceSelection("",null,"+delete"):ui(this,function(r){var n=pi(i,r.head,e,t,!1);return 0>e?{from:n,to:r.head}:{from:r.head,to:n}})}),findPosV:function(e,t,r,i){var n=1,o=i;0>t&&(n=-1,t=-t);for(var s=0,a=Q(this.doc,e);t>s;++s){var l=Ht(this,a,"div");if(null==o?o=l.left:l.left=o,a=ci(this,l,n,r),a.hitSide)break}return a},moveV:Zt(function(e,t){var r=this,i=this.doc,n=[],o=!r.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy(function(s){if(o)return 0>e?s.from():s.to();var a=Ht(r,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),n.push(a.left);var l=ci(r,a,e,t);return"page"==t&&s==i.sel.primary()&&ni(r,null,Vt(r,l,"div").top-a.top),l},ta),n.length)for(var s=0;s<i.sel.ranges.length;s++)i.sel.ranges[s].goalColumn=n[s]}),toggleOverwrite:function(e){(null==e||e!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?fo(this.display.cursorDiv,"CodeMirror-overwrite"):ho(this.display.cursorDiv,"CodeMirror-overwrite"),Ys(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return co()==this.display.input},scrollTo:Zt(function(e,t){(null!=e||null!=t)&&si(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller,t=Qs;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-t,width:e.scrollWidth-t,clientHeight:e.clientHeight-t,clientWidth:e.clientWidth-t}},scrollIntoView:Zt(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:rs(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)si(this),this.curOp.scrollToPos=e;else{var r=ii(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(r.scrollLeft,r.scrollTop)}}),setSize:Zt(function(e,t){function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Mt(this),this.curOp.forceUpdate=!0,Ys(this,"refresh",this)}),operation:function(e){return $t(this,e)},refresh:Zt(function(){var e=this.display.cachedTextHeight;rr(this),this.curOp.forceUpdate=!0,wt(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),c(this),(null==e||Math.abs(e-zt(this.display))>.5)&&s(this),Ys(this,"refresh",this)}),swapDoc:Zt(function(e){var t=this.doc;return t.cm=null,gn(this,e),wt(this),dr(this),this.scrollTo(e.scrollLeft,e.scrollTop),Wn(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Yn(e);var ms=e.defaults={},gs=e.optionHandlers={},vs=e.Init={toString:function(){return"CodeMirror.Init"}};Ei("value","",function(e,t){e.setValue(t)},!0),Ei("mode",null,function(e,t){e.doc.modeOption=t,r(e)},!0),Ei("indentUnit",2,r,!0),Ei("indentWithTabs",!1),Ei("smartIndent",!0),Ei("tabSize",4,function(e){i(e),wt(e),rr(e)},!0),Ei("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(e,t){e.options.specialChars=new RegExp(t.source+(t.test(" ")?"":"| "),"g"),e.refresh()},!0),Ei("specialCharPlaceholder",sn,function(e){e.refresh()},!0),Ei("electricChars",!0),Ei("rtlMoveVisually",!$o),Ei("wholeLineUpdateBefore",!0),Ei("theme","default",function(e){l(e),u(e)},!0),Ei("keyMap","default",a),Ei("extraKeys",null),Ei("lineWrapping",!1,n,!0),Ei("gutters",[],function(e){h(e.options),u(e)},!0),Ei("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?L(e.display)+"px":"0",e.refresh()},!0),Ei("coverGutterNextToScrollbar",!1,m,!0),Ei("lineNumbers",!1,function(e){h(e.options),u(e)},!0),Ei("firstLineNumber",1,u,!0),Ei("lineNumberFormatter",function(e){return e},u,!0),Ei("showCursorWhenSelecting",!1,ht,!0),Ei("resetSelectionOnContextMenu",!0),Ei("readOnly",!1,function(e,t){"nocursor"==t?(Ur(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||dr(e))}),Ei("disableInput",!1,function(e,t){t||dr(e)},!0),Ei("dragDrop",!0),Ei("cursorBlinkRate",530),Ei("cursorScrollMargin",0),Ei("cursorHeight",1),Ei("workTime",100),Ei("workDelay",100),Ei("flattenSpans",!0,i,!0),Ei("addModeClass",!1,i,!0),Ei("pollInterval",100),Ei("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Ei("historyEventDelay",1250),Ei("viewportMargin",10,function(e){e.refresh()},!0),Ei("maxHighlightLength",1e4,i,!0),Ei("moveInputWithCursor",!0,function(e,t){t||(e.display.inputDiv.style.top=e.display.inputDiv.style.left=0)}),Ei("tabindex",null,function(e,t){e.display.input.tabIndex=t||""}),Ei("autofocus",null);var xs=e.modes={},Ns=e.mimeModes={};e.defineMode=function(t,r){if(e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2){r.dependencies=[];for(var i=2;i<arguments.length;++i)r.dependencies.push(arguments[i])}xs[t]=r},e.defineMIME=function(e,t){Ns[e]=t},e.resolveMode=function(t){if("string"==typeof t&&Ns.hasOwnProperty(t))t=Ns[t];else if(t&&"string"==typeof t.name&&Ns.hasOwnProperty(t.name)){var r=Ns[t.name];"string"==typeof r&&(r={name:r}),t=ro(r,t),t.name=r.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,r){var r=e.resolveMode(r),i=xs[r.name];if(!i)return e.getMode(t,"text/plain");var n=i(t,r);if(Ls.hasOwnProperty(r.name)){var o=Ls[r.name];for(var s in o)o.hasOwnProperty(s)&&(n.hasOwnProperty(s)&&(n["_"+s]=n[s]),n[s]=o[s])}if(n.name=r.name,r.helperType&&(n.helperType=r.helperType),r.modeProps)for(var s in r.modeProps)n[s]=r.modeProps[s];return n},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var Ls=e.modeExtensions={};e.extendMode=function(e,t){var r=Ls.hasOwnProperty(e)?Ls[e]:Ls[e]={};io(t,r)},e.defineExtension=function(t,r){e.prototype[t]=r},e.defineDocExtension=function(e,t){Vs.prototype[e]=t},e.defineOption=Ei;var Is=[];e.defineInitHook=function(e){Is.push(e)};var Ts=e.helpers={};e.registerHelper=function(t,r,i){Ts.hasOwnProperty(t)||(Ts[t]=e[t]={_global:[]}),Ts[t][r]=i},e.registerGlobalHelper=function(t,r,i,n){e.registerHelper(t,r,n),Ts[t]._global.push({pred:i,val:n})};var ys=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var i in t){var n=t[i];n instanceof Array&&(n=n.concat([])),r[i]=n}return r},As=e.startState=function(e,t,r){return e.startState?e.startState(t,r):!0};e.innerMode=function(e,t){for(;e.innerMode;){var r=e.innerMode(t);if(!r||r.mode==e)break;t=r.state,e=r.mode}return r||{mode:e,state:t}};var Ss=e.commands={selectAll:function(e){e.setSelection(rs(e.firstLine(),0),rs(e.lastLine()),Js)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Js)},killLine:function(e){ui(e,function(t){if(t.empty()){var r=vn(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:rs(t.head.line+1,0)}:{from:t.head,to:rs(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){ui(e,function(t){return{from:rs(t.from().line,0),to:Q(e.doc,rs(t.to().line+1,0))}})},delLineLeft:function(e){ui(e,function(e){return{from:rs(e.from().line,0),to:e.from()}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(rs(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(rs(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return Ao(e,t.head.line)},ta)},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){var r=Ao(e,t.head.line),i=e.getLineHandle(r.line),n=An(i);if(!n||0==n[0].level){var o=Math.max(0,i.text.search(/\S/)),s=t.head.line==r.line&&t.head.ch<=o&&t.head.ch;return rs(r.line,s?0:o)}return r},ta)},goLineEnd:function(e){e.extendSelectionsBy(function(t){return So(e,t.head.line)},ta)},goLineRight:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},ta)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},ta)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),i=e.options.tabSize,n=0;n<r.length;n++){var o=r[n].from(),s=ra(e.getLine(o.line),o.ch,i);t.push(new Array(i-s%i+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){$t(e,function(){for(var t=e.listSelections(),r=0;r<t.length;r++){var i=t[r].head,n=vn(e.doc,i.line).text;i.ch>0&&i.ch<n.length-1&&e.replaceRange(n.charAt(i.ch)+n.charAt(i.ch-1),rs(i.line,i.ch-1),rs(i.line,i.ch+1))}})},newlineAndIndent:function(e){$t(e,function(){for(var t=e.listSelections().length,r=0;t>r;r++){var i=e.listSelections()[r];e.replaceRange("\n",i.anchor,i.head,"+input"),e.indentLine(i.from().line+1,null,!0),oi(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},Cs=e.keyMap={};Cs.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Cs.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Cs.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delLineLeft","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection",fallthrough:["basic","emacsy"]},Cs.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},Cs["default"]=Yo?Cs.macDefault:Cs.pcDefault;var Rs=e.lookupKey=function(e,t,r){function i(t){t=hi(t);var n=t[e];if(n===!1)return"stop";if(null!=n&&r(n))return!0;if(t.nofallthrough)return"stop";var o=t.fallthrough;if(null==o)return!1;if("[object Array]"!=Object.prototype.toString.call(o))return i(o);for(var s=0;s<o.length;++s){var a=i(o[s]);if(a)return a}return!1}for(var n=0;n<t.length;++n){var o=i(t[n]);if(o)return"stop"!=o}},bs=e.isModifierKey=function(e){var t=ma[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},Os=e.keyName=function(e,t){if(Fo&&34==e.keyCode&&e["char"])return!1;var r=ma[e.keyCode];return null==r||e.altGraphKey?!1:(e.altKey&&(r="Alt-"+r),(Zo?e.metaKey:e.ctrlKey)&&(r="Ctrl-"+r),(Zo?e.ctrlKey:e.metaKey)&&(r="Cmd-"+r),!t&&e.shiftKey&&(r="Shift-"+r),r)};e.fromTextArea=function(t,r){function i(){t.value=u.getValue()}if(r||(r={}),r.value=t.value,!r.tabindex&&t.tabindex&&(r.tabindex=t.tabindex),!r.placeholder&&t.placeholder&&(r.placeholder=t.placeholder),null==r.autofocus){var n=co();r.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}if(t.form&&(Xs(t.form,"submit",i),!r.leaveSubmitMethodAlone)){var o=t.form,s=o.submit;try{var a=o.submit=function(){i(),o.submit=s,o.submit(),o.submit=a}}catch(l){}}t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},r);return u.save=i,u.getTextArea=function(){return t},u.toTextArea=function(){i(),t.parentNode.removeChild(u.getWrapperElement()),t.style.display="",t.form&&(Ks(t.form,"submit",i),"function"==typeof t.form.submit&&(t.form.submit=s))},u};var Ps=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Ps.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var r=t==e;else var r=t&&(e.test?e.test(t):e(t));return r?(++this.pos,t):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ra(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ra(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return ra(this.string,null,this.tabSize)-(this.lineStart?ra(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,r){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}var n=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return n(o)==n(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var Ds=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e};Yn(Ds),Ds.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kt(e),Kn(this,"clear")){var r=this.find();r&&Wn(this,"clear",r.from,r.to)}for(var i=null,n=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Li(s.markedSpans,this);e&&!this.collapsed?ir(e,In(s),"text"):e&&(null!=a.to&&(n=In(s)),null!=a.from&&(i=In(s))),s.markedSpans=Ii(s.markedSpans,a),null==a.from&&this.collapsed&&!ji(this.doc,s)&&e&&Ln(s,zt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var l=Ui(this.lines[o]),u=d(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&rr(e,i,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ct(e.doc)),e&&Wn(e,"markerCleared",e,this),t&&Yt(e),this.parent&&this.parent.clear()}},Ds.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,i,n=0;n<this.lines.length;++n){var o=this.lines[n],s=Li(o.markedSpans,this);if(null!=s.from&&(r=rs(t?o:In(o),s.from),-1==e))return r;if(null!=s.to&&(i=rs(t?o:In(o),s.to),1==e))return i}return r&&{from:r,to:i}},Ds.prototype.changed=function(){var e=this.find(-1,!0),t=this,r=this.doc.cm;e&&r&&$t(r,function(){var i=e.line,n=In(e.line),o=bt(r,n);if(o&&(_t(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!ji(t.doc,i)&&null!=t.height){var s=t.height;t.height=null;var a=zi(t)-s;a&&Ln(i,i.height+a)}})},Ds.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=eo(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ds.prototype.detachLine=function(e){if(this.lines.splice(eo(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var _s=0,Ms=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};Yn(Ms),Ms.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Wn(this,"clear")}},Ms.prototype.find=function(e,t){return this.primary.find(e,t)};var ws=e.LineWidget=function(e,t,r){if(r)for(var i in r)r.hasOwnProperty(i)&&(this[i]=r[i]);this.cm=e,this.node=t};Yn(ws),ws.prototype.clear=function(){var e=this.cm,t=this.line.widgets,r=this.line,i=In(r);if(null!=i&&t){for(var n=0;n<t.length;++n)t[n]==this&&t.splice(n--,1);t.length||(r.widgets=null);var o=zi(this);$t(e,function(){qi(e,r,-o),ir(e,i,"widget"),Ln(r,Math.max(0,r.height-o))})}},ws.prototype.changed=function(){var e=this.height,t=this.cm,r=this.line;this.height=null;var i=zi(this)-e;i&&$t(t,function(){t.curOp.forceUpdate=!0,qi(t,r,i),Ln(r,r.height+i)})};var Gs=e.Line=function(e,t,r){this.text=e,Pi(this,t),this.height=r?r(this):1};Yn(Gs),Gs.prototype.lineNo=function(){return In(this)};var ks={},Bs={};hn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,i=e+t;i>r;++r){var n=this.lines[r];this.height-=n.height,Yi(n),Wn(n,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,r){for(var i=e+t;i>e;++e)if(r(this.lines[e]))return!0}},fn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var i=this.children[r],n=i.chunkSize();if(n>e){var o=Math.min(t,n-e),s=i.height;if(i.removeInner(e,o),this.height-=s-i.height,n==o&&(this.children.splice(r--,1),i.parent=null),0==(t-=o))break;e=0}else e-=n}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof hn))){var a=[];this.collapse(a),this.children=[new hn(a)],this.children[0].parent=this }},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var n=this.children[i],o=n.chunkSize();if(o>=e){if(n.insertInner(e,t,r),n.lines&&n.lines.length>50){for(;n.lines.length>50;){var s=n.lines.splice(n.lines.length-25,25),a=new hn(s);n.height-=a.height,this.children.splice(i+1,0,a),a.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new fn(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=eo(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new fn(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var i=0;i<this.children.length;++i){var n=this.children[i],o=n.chunkSize();if(o>e){var s=Math.min(t,o-e);if(n.iterN(e,s,r))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var Us=0,Vs=e.Doc=function(e,t,r){if(!(this instanceof Vs))return new Vs(e,t,r);null==r&&(r=0),fn.call(this,[new hn([new Gs("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=r;var i=rs(r,0);this.sel=Y(i),this.history=new Sn(null),this.id=++Us,this.modeOption=t,"string"==typeof e&&(e=Ea(e)),En(this,{from:i,to:i,text:e}),lt(this,Y(i),Js)};Vs.prototype=ro(fn.prototype,{constructor:Vs,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,i=0;i<t.length;++i)r+=t[i].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Nn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||"\n")},setValue:Jt(function(e){var t=rs(this.first,0),r=this.first+this.size-1;Xr(this,{from:t,to:rs(r,vn(this,r).text.length),text:Ea(e),origin:"setValue"},!0),lt(this,Y(t))}),replaceRange:function(e,t,r,i){t=Q(this,t),r=r?Q(this,r):t,Jr(this,e,t,r,i)},getRange:function(e,t,r){var i=xn(this,Q(this,e),Q(this,t));return r===!1?i:i.join(r||"\n")},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){return J(this,e)?vn(this,e):void 0},getLineNumber:function(e){return In(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=vn(this,e)),Ui(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Q(this,e)},getCursor:function(e){var t,r=this.sel.primary();return t=null==e||"head"==e?r.head:"anchor"==e?r.anchor:"end"==e||"to"==e||e===!1?r.to():r.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Jt(function(e,t,r){ot(this,Q(this,"number"==typeof e?rs(e,t||0):e),null,r)}),setSelection:Jt(function(e,t,r){ot(this,Q(this,e),Q(this,t||e),r)}),extendSelection:Jt(function(e,t,r){rt(this,Q(this,e),t&&Q(this,t),r)}),extendSelections:Jt(function(e,t){it(this,et(this,e,t))}),extendSelectionsBy:Jt(function(e,t){it(this,to(this.sel.ranges,e),t)}),setSelections:Jt(function(e,t,r){if(e.length){for(var i=0,n=[];i<e.length;i++)n[i]=new X(Q(this,e[i].anchor),Q(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),lt(this,K(n,t),r)}}),addSelection:Jt(function(e,t,r){var i=this.sel.ranges.slice(0);i.push(new X(Q(this,e),Q(this,t||e))),lt(this,K(i,i.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,i=0;i<r.length;i++){var n=xn(this,r[i].from(),r[i].to());t=t?t.concat(n):n}return e===!1?t:t.join(e||"\n")},getSelections:function(e){for(var t=[],r=this.sel.ranges,i=0;i<r.length;i++){var n=xn(this,r[i].from(),r[i].to());e!==!1&&(n=n.join(e||"\n")),t[i]=n}return t},replaceSelection:function(e,t,r){for(var i=[],n=0;n<this.sel.ranges.length;n++)i[n]=e;this.replaceSelections(i,t,r||"+input")},replaceSelections:Jt(function(e,t,r){for(var i=[],n=this.sel,o=0;o<n.ranges.length;o++){var s=n.ranges[o];i[o]={from:s.from(),to:s.to(),text:Ea(e[o]),origin:r}}for(var a=t&&"end"!=t&&qr(this,i,t),o=i.length-1;o>=0;o--)Xr(this,i[o]);a?at(this,a):this.cm&&oi(this.cm)}),undo:Jt(function(){Yr(this,"undo")}),redo:Jt(function(){Yr(this,"redo")}),undoSelection:Jt(function(){Yr(this,"undo",!0)}),redoSelection:Jt(function(){Yr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Sn(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:kn(this.history.done),undone:kn(this.history.undone)}},setHistory:function(e){var t=this.history=new Sn(this.history.maxGeneration);t.done=kn(e.done.slice(0),null,!0),t.undone=kn(e.undone.slice(0),null,!0)},markText:function(e,t,r){return fi(this,Q(this,e),Q(this,t),r,"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared};return e=Q(this,e),fi(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Q(this,e);var t=[],r=vn(this,e.line).markedSpans;if(r)for(var i=0;i<r.length;++i){var n=r[i];(null==n.from||n.from<=e.ch)&&(null==n.to||n.to>=e.ch)&&t.push(n.marker.parent||n.marker)}return t},findMarks:function(e,t,r){e=Q(this,e),t=Q(this,t);var i=[],n=e.line;return this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];n==e.line&&e.ch>l.to||null==l.from&&n!=e.line||n==t.line&&l.from>t.ch||r&&!r(l.marker)||i.push(l.marker.parent||l.marker)}++n}),i},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var i=0;i<r.length;++i)null!=r[i].from&&e.push(r[i].marker)}),e},posFromIndex:function(e){var t,r=this.first;return this.iter(function(i){var n=i.text.length+1;return n>e?(t=e,!0):(e-=n,void++r)}),Q(this,rs(r,t))},indexFromPos:function(e){e=Q(this,e);var t=e.ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,function(e){t+=e.text.length+1}),t)},copy:function(e){var t=new Vs(Nn(this,this.first,this.first+this.size),this.modeOption,this.first);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var i=new Vs(Nn(this,t,r),e.mode||this.modeOption,t);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],vi(i,gi(this)),i},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var r=0;r<this.linked.length;++r){var i=this.linked[r];if(i.doc==t){this.linked.splice(r,1),t.unlinkDoc(this),xi(gi(this));break}}if(t.history==this.history){var n=[t.id];mn(t,function(e){n.push(e.id)},!0),t.history=new Sn(null),t.history.done=kn(this.history.done,n),t.history.undone=kn(this.history.undone,n)}},iterLinkedDocs:function(e){mn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),Vs.prototype.eachLine=Vs.prototype.iter;var Hs="iter insert remove copy getEditor".split(" ");for(var Fs in Vs.prototype)Vs.prototype.hasOwnProperty(Fs)&&eo(Hs,Fs)<0&&(e.prototype[Fs]=function(e){return function(){return e.apply(this.doc,arguments)}}(Vs.prototype[Fs]));Yn(Vs);var js,Ws=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},qs=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},zs=e.e_stop=function(e){Ws(e),qs(e)},Xs=e.on=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var i=e._handlers||(e._handlers={}),n=i[t]||(i[t]=[]);n.push(r)}},Ks=e.off=function(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var i=e._handlers&&e._handlers[t];if(!i)return;for(var n=0;n<i.length;++n)if(i[n]==r){i.splice(n,1);break}}},Ys=e.signal=function(e,t){var r=e._handlers&&e._handlers[t];if(r)for(var i=Array.prototype.slice.call(arguments,2),n=0;n<r.length;++n)r[n].apply(null,i)},$s=0,Qs=30,Zs=e.Pass={toString:function(){return"CodeMirror.Pass"}},Js={scroll:!1},ea={origin:"*mouse"},ta={origin:"+move"};$n.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var ra=e.countColumn=function(e,t,r,i,n){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=i||0,s=n||0;;){var a=e.indexOf(" ",o);if(0>a||a>=t)return s+(t-o);s+=a-o,s+=r-s%r,o=a+1}},ia=[""],na=function(e){e.select()};Xo?na=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Bo&&(na=function(e){try{e.select()}catch(t){}}),[].indexOf&&(eo=function(e,t){return e.indexOf(t)}),[].map&&(to=function(e,t){return e.map(t)});var oa,sa=/[\u00df\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,aa=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||sa.test(e))},la=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;oa=document.createRange?function(e,t,r){var i=document.createRange();return i.setEnd(e,r),i.setStart(e,t),i}:function(e,t,r){var i=document.body.createTextRange();return i.moveToElementText(e.parentNode),i.collapse(!0),i.moveEnd("character",r),i.moveStart("character",t),i},_o&&(co=function(){try{return document.activeElement}catch(e){return document.body}});var ua,pa,ca,da=function(){if(wo)return!1;var e=ao("div");return"draggable"in e||"dragDrop"in e}(),Ea=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],i=e.length;i>=t;){var n=e.indexOf("\n",t);-1==n&&(n=e.length);var o=e.slice(t,"\r"==e.charAt(n-1)?n-1:n),s=o.indexOf("\r");-1!=s?(r.push(o.slice(0,s)),t+=s+1):(r.push(o),t=n+1)}return r}:function(e){return e.split(/\r\n?|\n/)},ha=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(r){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},fa=function(){var e=ao("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ma={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=ma,function(){for(var e=0;10>e;e++)ma[e+48]=ma[e+96]=String(e);for(var e=65;90>=e;e++)ma[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)ma[e+111]=ma[e+63235]="F"+e}();var ga,va=function(){function e(e){return 247>=e?r.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?i.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,u="L";return function(r){if(!n.test(r))return!1;for(var i,p=r.length,c=[],d=0;p>d;++d)c.push(i=e(r.charCodeAt(d)));for(var d=0,E=u;p>d;++d){var i=c[d];"m"==i?c[d]=E:E=i}for(var d=0,h=u;p>d;++d){var i=c[d];"1"==i&&"r"==h?c[d]="n":s.test(i)&&(h=i,"r"==i&&(c[d]="R"))}for(var d=1,E=c[0];p-1>d;++d){var i=c[d];"+"==i&&"1"==E&&"1"==c[d+1]?c[d]="1":","!=i||E!=c[d+1]||"1"!=E&&"n"!=E||(c[d]=E),E=i}for(var d=0;p>d;++d){var i=c[d];if(","==i)c[d]="N";else if("%"==i){for(var f=d+1;p>f&&"%"==c[f];++f);for(var m=d&&"!"==c[d-1]||p>f&&"1"==c[f]?"1":"N",g=d;f>g;++g)c[g]=m;d=f-1}}for(var d=0,h=u;p>d;++d){var i=c[d];"L"==h&&"1"==i?c[d]="L":s.test(i)&&(h=i)}for(var d=0;p>d;++d)if(o.test(c[d])){for(var f=d+1;p>f&&o.test(c[f]);++f);for(var v="L"==(d?c[d-1]:u),x="L"==(p>f?c[f]:u),m=v||x?"L":"R",g=d;f>g;++g)c[g]=m;d=f-1}for(var N,L=[],d=0;p>d;)if(a.test(c[d])){var I=d;for(++d;p>d&&a.test(c[d]);++d);L.push(new t(0,I,d))}else{var T=d,y=L.length;for(++d;p>d&&"L"!=c[d];++d);for(var g=T;d>g;)if(l.test(c[g])){g>T&&L.splice(y,0,new t(1,T,g));var A=g;for(++g;d>g&&l.test(c[g]);++g);L.splice(y,0,new t(2,A,g)),T=g}else++g;d>T&&L.splice(y,0,new t(1,T,d))}return 1==L[0].level&&(N=r.match(/^\s+/))&&(L[0].from=N[0].length,L.unshift(new t(0,0,N[0].length))),1==Jn(L).level&&(N=r.match(/\s+$/))&&(Jn(L).to-=N[0].length,L.push(new t(0,p-N[0].length,p))),L[0].level!=Jn(L).level&&L.push(new t(L[0].level,p,p)),L}}();return e.version="4.1.0",e})},{}],8:[function(t,r){!function(e,t){"object"==typeof r&&"object"==typeof r.exports?r.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(t,r){function i(e){var t=e.length,r=ot.type(e);return"function"===r||ot.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e}function n(e,t,r){if(ot.isFunction(t))return ot.grep(e,function(e,i){return!!t.call(e,i,e)!==r});if(t.nodeType)return ot.grep(e,function(e){return e===t!==r});if("string"==typeof t){if(Et.test(t))return ot.filter(t,e,r);t=ot.filter(t,e)}return ot.grep(e,function(e){return ot.inArray(e,t)>=0!==r})}function o(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function s(e){var t=Lt[e]={};return ot.each(e.match(Nt)||[],function(e,r){t[r]=!0}),t}function a(){ft.addEventListener?(ft.removeEventListener("DOMContentLoaded",l,!1),t.removeEventListener("load",l,!1)):(ft.detachEvent("onreadystatechange",l),t.detachEvent("onload",l))}function l(){(ft.addEventListener||"load"===event.type||"complete"===ft.readyState)&&(a(),ot.ready())}function u(e,t,r){if(void 0===r&&1===e.nodeType){var i="data-"+t.replace(St,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:At.test(r)?ot.parseJSON(r):r}catch(n){}ot.data(e,t,r)}else r=void 0}return r}function p(e){var t;for(t in e)if(("data"!==t||!ot.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,r,i){if(ot.acceptData(e)){var n,o,s=ot.expando,a=e.nodeType,l=a?ot.cache:e,u=a?e[s]:e[s]&&s;if(u&&l[u]&&(i||l[u].data)||void 0!==r||"string"!=typeof t)return u||(u=a?e[s]=Y.pop()||ot.guid++:s),l[u]||(l[u]=a?{}:{toJSON:ot.noop}),("object"==typeof t||"function"==typeof t)&&(i?l[u]=ot.extend(l[u],t):l[u].data=ot.extend(l[u].data,t)),o=l[u],i||(o.data||(o.data={}),o=o.data),void 0!==r&&(o[ot.camelCase(t)]=r),"string"==typeof t?(n=o[t],null==n&&(n=o[ot.camelCase(t)])):n=o,n}}function d(e,t,r){if(ot.acceptData(e)){var i,n,o=e.nodeType,s=o?ot.cache:e,a=o?e[ot.expando]:ot.expando;if(s[a]){if(t&&(i=r?s[a]:s[a].data)){ot.isArray(t)?t=t.concat(ot.map(t,ot.camelCase)):t in i?t=[t]:(t=ot.camelCase(t),t=t in i?[t]:t.split(" ")),n=t.length;for(;n--;)delete i[t[n]];if(r?!p(i):!ot.isEmptyObject(i))return}(r||(delete s[a].data,p(s[a])))&&(o?ot.cleanData([e],!0):it.deleteExpando||s!=s.window?delete s[a]:s[a]=null)}}}function E(){return!0}function h(){return!1}function f(){try{return ft.activeElement}catch(e){}}function m(e){var t=kt.split("|"),r=e.createDocumentFragment();if(r.createElement)for(;t.length;)r.createElement(t.pop());return r}function g(e,t){var r,i,n=0,o=typeof e.getElementsByTagName!==yt?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==yt?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],r=e.childNodes||e;null!=(i=r[n]);n++)!t||ot.nodeName(i,t)?o.push(i):ot.merge(o,g(i,t));return void 0===t||t&&ot.nodeName(e,t)?ot.merge([e],o):o}function v(e){Pt.test(e.type)&&(e.defaultChecked=e.checked)}function x(e,t){return ot.nodeName(e,"table")&&ot.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function N(e){return e.type=(null!==ot.find.attr(e,"type"))+"/"+e.type,e}function L(e){var t=Kt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function I(e,t){for(var r,i=0;null!=(r=e[i]);i++)ot._data(r,"globalEval",!t||ot._data(t[i],"globalEval"))}function T(e,t){if(1===t.nodeType&&ot.hasData(e)){var r,i,n,o=ot._data(e),s=ot._data(t,o),a=o.events;if(a){delete s.handle,s.events={};for(r in a)for(i=0,n=a[r].length;n>i;i++)ot.event.add(t,r,a[r][i])}s.data&&(s.data=ot.extend({},s.data))}}function y(e,t){var r,i,n;if(1===t.nodeType){if(r=t.nodeName.toLowerCase(),!it.noCloneEvent&&t[ot.expando]){n=ot._data(t);for(i in n.events)ot.removeEvent(t,i,n.handle);t.removeAttribute(ot.expando)}"script"===r&&t.text!==e.text?(N(t).text=e.text,L(t)):"object"===r?(t.parentNode&&(t.outerHTML=e.outerHTML),it.html5Clone&&e.innerHTML&&!ot.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===r&&Pt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===r?t.defaultSelected=t.selected=e.defaultSelected:("input"===r||"textarea"===r)&&(t.defaultValue=e.defaultValue)}}function A(e,r){var i,n=ot(r.createElement(e)).appendTo(r.body),o=t.getDefaultComputedStyle&&(i=t.getDefaultComputedStyle(n[0]))?i.display:ot.css(n[0],"display");return n.detach(),o}function S(e){var t=ft,r=er[e];return r||(r=A(e,t),"none"!==r&&r||(Jt=(Jt||ot("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(Jt[0].contentWindow||Jt[0].contentDocument).document,t.write(),t.close(),r=A(e,t),Jt.detach()),er[e]=r),r}function C(e,t){return{get:function(){var r=e();if(null!=r)return r?void delete this.get:(this.get=t).apply(this,arguments)}}}function R(e,t){if(t in e)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),i=t,n=Er.length;n--;)if(t=Er[n]+r,t in e)return t;return i}function b(e,t){for(var r,i,n,o=[],s=0,a=e.length;a>s;s++)i=e[s],i.style&&(o[s]=ot._data(i,"olddisplay"),r=i.style.display,t?(o[s]||"none"!==r||(i.style.display=""),""===i.style.display&&bt(i)&&(o[s]=ot._data(i,"olddisplay",S(i.nodeName)))):(n=bt(i),(r&&"none"!==r||!n)&&ot._data(i,"olddisplay",n?r:ot.css(i,"display"))));for(s=0;a>s;s++)i=e[s],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[s]||"":"none"));return e}function O(e,t,r){var i=ur.exec(t);return i?Math.max(0,i[1]-(r||0))+(i[2]||"px"):t}function P(e,t,r,i,n){for(var o=r===(i?"border":"content")?4:"width"===t?1:0,s=0;4>o;o+=2)"margin"===r&&(s+=ot.css(e,r+Rt[o],!0,n)),i?("content"===r&&(s-=ot.css(e,"padding"+Rt[o],!0,n)),"margin"!==r&&(s-=ot.css(e,"border"+Rt[o]+"Width",!0,n))):(s+=ot.css(e,"padding"+Rt[o],!0,n),"padding"!==r&&(s+=ot.css(e,"border"+Rt[o]+"Width",!0,n)));return s}function D(e,t,r){var i=!0,n="width"===t?e.offsetWidth:e.offsetHeight,o=tr(e),s=it.boxSizing&&"border-box"===ot.css(e,"boxSizing",!1,o);if(0>=n||null==n){if(n=rr(e,t,o),(0>n||null==n)&&(n=e.style[t]),nr.test(n))return n;i=s&&(it.boxSizingReliable()||n===e.style[t]),n=parseFloat(n)||0}return n+P(e,t,r||(s?"border":"content"),i,o)+"px"}function _(e,t,r,i,n){return new _.prototype.init(e,t,r,i,n)}function M(){return setTimeout(function(){hr=void 0}),hr=ot.now()}function w(e,t){var r,i={height:e},n=0;for(t=t?1:0;4>n;n+=2-t)r=Rt[n],i["margin"+r]=i["padding"+r]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,r){for(var i,n=(Nr[t]||[]).concat(Nr["*"]),o=0,s=n.length;s>o;o++)if(i=n[o].call(r,t,e))return i}function k(e,t,r){var i,n,o,s,a,l,u,p,c=this,d={},E=e.style,h=e.nodeType&&bt(e),f=ot._data(e,"fxshow");r.queue||(a=ot._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,ot.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(r.overflow=[E.overflow,E.overflowX,E.overflowY],u=ot.css(e,"display"),p="none"===u?ot._data(e,"olddisplay")||S(e.nodeName):u,"inline"===p&&"none"===ot.css(e,"float")&&(it.inlineBlockNeedsLayout&&"inline"!==S(e.nodeName)?E.zoom=1:E.display="inline-block")),r.overflow&&(E.overflow="hidden",it.shrinkWrapBlocks()||c.always(function(){E.overflow=r.overflow[0],E.overflowX=r.overflow[1],E.overflowY=r.overflow[2]}));for(i in t)if(n=t[i],mr.exec(n)){if(delete t[i],o=o||"toggle"===n,n===(h?"hide":"show")){if("show"!==n||!f||void 0===f[i])continue;h=!0}d[i]=f&&f[i]||ot.style(e,i)}else u=void 0;if(ot.isEmptyObject(d))"inline"===("none"===u?S(e.nodeName):u)&&(E.display=u);else{f?"hidden"in f&&(h=f.hidden):f=ot._data(e,"fxshow",{}),o&&(f.hidden=!h),h?ot(e).show():c.done(function(){ot(e).hide()}),c.done(function(){var t;ot._removeData(e,"fxshow");for(t in d)ot.style(e,t,d[t])});for(i in d)s=G(h?f[i]:0,i,c),i in f||(f[i]=s.start,h&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}}function B(e,t){var r,i,n,o,s;for(r in e)if(i=ot.camelCase(r),n=t[i],o=e[r],ot.isArray(o)&&(n=o[1],o=e[r]=o[0]),r!==i&&(e[i]=o,delete e[r]),s=ot.cssHooks[i],s&&"expand"in s){o=s.expand(o),delete e[i];for(r in o)r in e||(e[r]=o[r],t[r]=n)}else t[i]=n}function U(e,t,r){var i,n,o=0,s=xr.length,a=ot.Deferred().always(function(){delete l.elem}),l=function(){if(n)return!1;for(var t=hr||M(),r=Math.max(0,u.startTime+u.duration-t),i=r/u.duration||0,o=1-i,s=0,l=u.tweens.length;l>s;s++)u.tweens[s].run(o);return a.notifyWith(e,[u,o,r]),1>o&&l?r:(a.resolveWith(e,[u]),!1)},u=a.promise({elem:e,props:ot.extend({},t),opts:ot.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:hr||M(),duration:r.duration,tweens:[],createTween:function(t,r){var i=ot.Tween(e,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var r=0,i=t?u.tweens.length:0;if(n)return this;for(n=!0;i>r;r++)u.tweens[r].run(1);return t?a.resolveWith(e,[u,t]):a.rejectWith(e,[u,t]),this}}),p=u.props;for(B(p,u.opts.specialEasing);s>o;o++)if(i=xr[o].call(u,e,p,u.opts))return i;return ot.map(p,G,u),ot.isFunction(u.opts.start)&&u.opts.start.call(e,u),ot.fx.timer(ot.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 V(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var i,n=0,o=t.toLowerCase().match(Nt)||[];if(ot.isFunction(r))for(;i=o[n++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(r)):(e[i]=e[i]||[]).push(r)}}function H(e,t,r,i){function n(a){var l;return o[a]=!0,ot.each(e[a]||[],function(e,a){var u=a(t,r,i);return"string"!=typeof u||s||o[u]?s?!(l=u):void 0:(t.dataTypes.unshift(u),n(u),!1)}),l}var o={},s=e===Wr;return n(t.dataTypes[0])||!o["*"]&&n("*")}function F(e,t){var r,i,n=ot.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((n[i]?e:r||(r={}))[i]=t[i]);return r&&ot.extend(!0,e,r),e}function j(e,t,r){for(var i,n,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(s in a)if(a[s]&&a[s].test(n)){l.unshift(s);break}if(l[0]in r)o=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){o=s;break}i||(i=s)}o=o||i}return o?(o!==l[0]&&l.unshift(o),r[o]):void 0}function W(e,t,r,i){var n,o,s,a,l,u={},p=e.dataTypes.slice();if(p[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(o=p.shift();o;)if(e.responseFields[o]&&(r[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=p.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=u[l+" "+o]||u["* "+o],!s)for(n in u)if(a=n.split(" "),a[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){s===!0?s=u[n]:u[n]!==!0&&(o=a[0],p.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(c){return{state:"parsererror",error:s?c:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function q(e,t,r,i){var n;if(ot.isArray(t))ot.each(t,function(t,n){r||Kr.test(e)?i(e,n):q(e+"["+("object"==typeof n?t:"")+"]",n,r,i)});else if(r||"object"!==ot.type(t))i(e,t);else for(n in t)q(e+"["+n+"]",t[n],r,i)}function z(){try{return new t.XMLHttpRequest}catch(e){}}function X(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function K(e){return ot.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var Y=[],$=Y.slice,Q=Y.concat,Z=Y.push,J=Y.indexOf,et={},tt=et.toString,rt=et.hasOwnProperty,it={},nt="1.11.1",ot=function(e,t){return new ot.fn.init(e,t)},st=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,at=/^-ms-/,lt=/-([\da-z])/gi,ut=function(e,t){return t.toUpperCase()};ot.fn=ot.prototype={jquery:nt,constructor:ot,selector:"",length:0,toArray:function(){return $.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:$.call(this)},pushStack:function(e){var t=ot.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ot.each(this,e,t)},map:function(e){return this.pushStack(ot.map(this,function(t,r){return e.call(t,r,t)}))},slice:function(){return this.pushStack($.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,r=+e+(0>e?t:0);return this.pushStack(r>=0&&t>r?[this[r]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:Z,sort:Y.sort,splice:Y.splice},ot.extend=ot.fn.extend=function(){var e,t,r,i,n,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||ot.isFunction(s)||(s={}),a===l&&(s=this,a--);l>a;a++)if(null!=(n=arguments[a]))for(i in n)e=s[i],r=n[i],s!==r&&(u&&r&&(ot.isPlainObject(r)||(t=ot.isArray(r)))?(t?(t=!1,o=e&&ot.isArray(e)?e:[]):o=e&&ot.isPlainObject(e)?e:{},s[i]=ot.extend(u,o,r)):void 0!==r&&(s[i]=r));return s},ot.extend({expando:"jQuery"+(nt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===ot.type(e)},isArray:Array.isArray||function(e){return"array"===ot.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!ot.isArray(e)&&e-parseFloat(e)>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==ot.type(e)||e.nodeType||ot.isWindow(e))return!1;try{if(e.constructor&&!rt.call(e,"constructor")&&!rt.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(it.ownLast)for(t in e)return rt.call(e,t);for(t in e);return void 0===t||rt.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?et[tt.call(e)]||"object":typeof e},globalEval:function(e){e&&ot.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(e){return e.replace(at,"ms-").replace(lt,ut)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var n,o=0,s=e.length,a=i(e);if(r){if(a)for(;s>o&&(n=t.apply(e[o],r),n!==!1);o++);else for(o in e)if(n=t.apply(e[o],r),n===!1)break}else if(a)for(;s>o&&(n=t.call(e[o],o,e[o]),n!==!1);o++);else for(o in e)if(n=t.call(e[o],o,e[o]),n===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(st,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(i(Object(e))?ot.merge(r,"string"==typeof e?[e]:e):Z.call(r,e)),r},inArray:function(e,t,r){var i;if(t){if(J)return J.call(t,e,r);for(i=t.length,r=r?0>r?Math.max(0,i+r):r:0;i>r;r++)if(r in t&&t[r]===e)return r}return-1},merge:function(e,t){for(var r=+t.length,i=0,n=e.length;r>i;)e[n++]=t[i++];if(r!==r)for(;void 0!==t[i];)e[n++]=t[i++];return e.length=n,e},grep:function(e,t,r){for(var i,n=[],o=0,s=e.length,a=!r;s>o;o++)i=!t(e[o],o),i!==a&&n.push(e[o]);return n},map:function(e,t,r){var n,o=0,s=e.length,a=i(e),l=[];if(a)for(;s>o;o++)n=t(e[o],o,r),null!=n&&l.push(n);else for(o in e)n=t(e[o],o,r),null!=n&&l.push(n);return Q.apply([],l)},guid:1,proxy:function(e,t){var r,i,n;return"string"==typeof t&&(n=e[t],t=e,e=n),ot.isFunction(e)?(r=$.call(arguments,2),i=function(){return e.apply(t||this,r.concat($.call(arguments)))},i.guid=e.guid=e.guid||ot.guid++,i):void 0},now:function(){return+new Date},support:it}),ot.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){et["[object "+t+"]"]=t.toLowerCase()});var pt=function(e){function t(e,t,r,i){var n,o,s,a,l,u,c,E,h,f;if((t?t.ownerDocument||t:V)!==D&&P(t),t=t||D,r=r||[],!e||"string"!=typeof e)return r;if(1!==(a=t.nodeType)&&9!==a)return[];if(M&&!i){if(n=vt.exec(e))if(s=n[1]){if(9===a){if(o=t.getElementById(s),!o||!o.parentNode)return r;if(o.id===s)return r.push(o),r}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&B(t,o)&&o.id===s)return r.push(o),r}else{if(n[2])return J.apply(r,t.getElementsByTagName(e)),r;if((s=n[3])&&L.getElementsByClassName&&t.getElementsByClassName)return J.apply(r,t.getElementsByClassName(s)),r}if(L.qsa&&(!w||!w.test(e))){if(E=c=U,h=t,f=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(u=A(e),(c=t.getAttribute("id"))?E=c.replace(Nt,"\\$&"):t.setAttribute("id",E),E="[id='"+E+"'] ",l=u.length;l--;)u[l]=E+d(u[l]);h=xt.test(e)&&p(t.parentNode)||t,f=u.join(",")}if(f)try{return J.apply(r,h.querySelectorAll(f)),r}catch(m){}finally{c||t.removeAttribute("id") }}}return C(e.replace(lt,"$1"),t,r,i)}function r(){function e(r,i){return t.push(r+" ")>I.cacheLength&&delete e[t.shift()],e[r+" "]=i}var t=[];return e}function i(e){return e[U]=!0,e}function n(e){var t=D.createElement("div");try{return!!e(t)}catch(r){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var r=e.split("|"),i=e.length;i--;)I.attrHandle[r[i]]=t}function s(e,t){var r=t&&e,i=r&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||K)-(~e.sourceIndex||K);if(i)return i;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function a(e){return function(t){var r=t.nodeName.toLowerCase();return"input"===r&&t.type===e}}function l(e){return function(t){var r=t.nodeName.toLowerCase();return("input"===r||"button"===r)&&t.type===e}}function u(e){return i(function(t){return t=+t,i(function(r,i){for(var n,o=e([],r.length,t),s=o.length;s--;)r[n=o[s]]&&(r[n]=!(i[n]=r[n]))})})}function p(e){return e&&typeof e.getElementsByTagName!==X&&e}function c(){}function d(e){for(var t=0,r=e.length,i="";r>t;t++)i+=e[t].value;return i}function E(e,t,r){var i=t.dir,n=r&&"parentNode"===i,o=F++;return t.first?function(t,r,o){for(;t=t[i];)if(1===t.nodeType||n)return e(t,r,o)}:function(t,r,s){var a,l,u=[H,o];if(s){for(;t=t[i];)if((1===t.nodeType||n)&&e(t,r,s))return!0}else for(;t=t[i];)if(1===t.nodeType||n){if(l=t[U]||(t[U]={}),(a=l[i])&&a[0]===H&&a[1]===o)return u[2]=a[2];if(l[i]=u,u[2]=e(t,r,s))return!0}}}function h(e){return e.length>1?function(t,r,i){for(var n=e.length;n--;)if(!e[n](t,r,i))return!1;return!0}:e[0]}function f(e,r,i){for(var n=0,o=r.length;o>n;n++)t(e,r[n],i);return i}function m(e,t,r,i,n){for(var o,s=[],a=0,l=e.length,u=null!=t;l>a;a++)(o=e[a])&&(!r||r(o,i,n))&&(s.push(o),u&&t.push(a));return s}function g(e,t,r,n,o,s){return n&&!n[U]&&(n=g(n)),o&&!o[U]&&(o=g(o,s)),i(function(i,s,a,l){var u,p,c,d=[],E=[],h=s.length,g=i||f(t||"*",a.nodeType?[a]:a,[]),v=!e||!i&&t?g:m(g,d,e,a,l),x=r?o||(i?e:h||n)?[]:s:v;if(r&&r(v,x,a,l),n)for(u=m(x,E),n(u,[],a,l),p=u.length;p--;)(c=u[p])&&(x[E[p]]=!(v[E[p]]=c));if(i){if(o||e){if(o){for(u=[],p=x.length;p--;)(c=x[p])&&u.push(v[p]=c);o(null,x=[],u,l)}for(p=x.length;p--;)(c=x[p])&&(u=o?tt.call(i,c):d[p])>-1&&(i[u]=!(s[u]=c))}}else x=m(x===s?x.splice(h,x.length):x),o?o(null,s,x,l):J.apply(s,x)})}function v(e){for(var t,r,i,n=e.length,o=I.relative[e[0].type],s=o||I.relative[" "],a=o?1:0,l=E(function(e){return e===t},s,!0),u=E(function(e){return tt.call(t,e)>-1},s,!0),p=[function(e,r,i){return!o&&(i||r!==R)||((t=r).nodeType?l(e,r,i):u(e,r,i))}];n>a;a++)if(r=I.relative[e[a].type])p=[E(h(p),r)];else{if(r=I.filter[e[a].type].apply(null,e[a].matches),r[U]){for(i=++a;n>i&&!I.relative[e[i].type];i++);return g(a>1&&h(p),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(lt,"$1"),r,i>a&&v(e.slice(a,i)),n>i&&v(e=e.slice(i)),n>i&&d(e))}p.push(r)}return h(p)}function x(e,r){var n=r.length>0,o=e.length>0,s=function(i,s,a,l,u){var p,c,d,E=0,h="0",f=i&&[],g=[],v=R,x=i||o&&I.find.TAG("*",u),N=H+=null==v?1:Math.random()||.1,L=x.length;for(u&&(R=s!==D&&s);h!==L&&null!=(p=x[h]);h++){if(o&&p){for(c=0;d=e[c++];)if(d(p,s,a)){l.push(p);break}u&&(H=N)}n&&((p=!d&&p)&&E--,i&&f.push(p))}if(E+=h,n&&h!==E){for(c=0;d=r[c++];)d(f,g,s,a);if(i){if(E>0)for(;h--;)f[h]||g[h]||(g[h]=Q.call(l));g=m(g)}J.apply(l,g),u&&!i&&g.length>0&&E+r.length>1&&t.uniqueSort(l)}return u&&(H=N,R=v),f};return n?i(s):s}var N,L,I,T,y,A,S,C,R,b,O,P,D,_,M,w,G,k,B,U="sizzle"+-new Date,V=e.document,H=0,F=0,j=r(),W=r(),q=r(),z=function(e,t){return e===t&&(O=!0),0},X="undefined",K=1<<31,Y={}.hasOwnProperty,$=[],Q=$.pop,Z=$.push,J=$.push,et=$.slice,tt=$.indexOf||function(e){for(var t=0,r=this.length;r>t;t++)if(this[t]===e)return t;return-1},rt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",nt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot=nt.replace("w","w#"),st="\\["+it+"*("+nt+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ot+"))|)"+it+"*\\]",at=":("+nt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+st+")*)|.*)\\)|)",lt=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),ut=new RegExp("^"+it+"*,"+it+"*"),pt=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ct=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),dt=new RegExp(at),Et=new RegExp("^"+ot+"$"),ht={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt.replace("w","w*")+")"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+at),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+rt+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xt=/[+~]/,Nt=/'|\\/g,Lt=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),It=function(e,t,r){var i="0x"+t-65536;return i!==i||r?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{J.apply($=et.call(V.childNodes),V.childNodes),$[V.childNodes.length].nodeType}catch(Tt){J={apply:$.length?function(e,t){Z.apply(e,et.call(t))}:function(e,t){for(var r=e.length,i=0;e[r++]=t[i++];);e.length=r-1}}}L=t.support={},y=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},P=t.setDocument=function(e){var t,r=e?e.ownerDocument||e:V,i=r.defaultView;return r!==D&&9===r.nodeType&&r.documentElement?(D=r,_=r.documentElement,M=!y(r),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){P()},!1):i.attachEvent&&i.attachEvent("onunload",function(){P()})),L.attributes=n(function(e){return e.className="i",!e.getAttribute("className")}),L.getElementsByTagName=n(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),L.getElementsByClassName=gt.test(r.getElementsByClassName)&&n(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),L.getById=n(function(e){return _.appendChild(e).id=U,!r.getElementsByName||!r.getElementsByName(U).length}),L.getById?(I.find.ID=function(e,t){if(typeof t.getElementById!==X&&M){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}},I.filter.ID=function(e){var t=e.replace(Lt,It);return function(e){return e.getAttribute("id")===t}}):(delete I.find.ID,I.filter.ID=function(e){var t=e.replace(Lt,It);return function(e){var r=typeof e.getAttributeNode!==X&&e.getAttributeNode("id");return r&&r.value===t}}),I.find.TAG=L.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==X?t.getElementsByTagName(e):void 0}:function(e,t){var r,i=[],n=0,o=t.getElementsByTagName(e);if("*"===e){for(;r=o[n++];)1===r.nodeType&&i.push(r);return i}return o},I.find.CLASS=L.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==X&&M?t.getElementsByClassName(e):void 0},G=[],w=[],(L.qsa=gt.test(r.querySelectorAll))&&(n(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&w.push("[*^$]="+it+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||w.push("\\["+it+"*(?:value|"+rt+")"),e.querySelectorAll(":checked").length||w.push(":checked")}),n(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&w.push("name"+it+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||w.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),w.push(",.*:")})),(L.matchesSelector=gt.test(k=_.matches||_.webkitMatchesSelector||_.mozMatchesSelector||_.oMatchesSelector||_.msMatchesSelector))&&n(function(e){L.disconnectedMatch=k.call(e,"div"),k.call(e,"[s!='']:x"),G.push("!=",at)}),w=w.length&&new RegExp(w.join("|")),G=G.length&&new RegExp(G.join("|")),t=gt.test(_.compareDocumentPosition),B=t||gt.test(_.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}: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 O=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!L.sortDetached&&t.compareDocumentPosition(e)===i?e===r||e.ownerDocument===V&&B(V,e)?-1:t===r||t.ownerDocument===V&&B(V,t)?1:b?tt.call(b,e)-tt.call(b,t):0:4&i?-1:1)}:function(e,t){if(e===t)return O=!0,0;var i,n=0,o=e.parentNode,a=t.parentNode,l=[e],u=[t];if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:b?tt.call(b,e)-tt.call(b,t):0;if(o===a)return s(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)u.unshift(i);for(;l[n]===u[n];)n++;return n?s(l[n],u[n]):l[n]===V?-1:u[n]===V?1:0},r):D},t.matches=function(e,r){return t(e,null,null,r)},t.matchesSelector=function(e,r){if((e.ownerDocument||e)!==D&&P(e),r=r.replace(ct,"='$1']"),!(!L.matchesSelector||!M||G&&G.test(r)||w&&w.test(r)))try{var i=k.call(e,r);if(i||L.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(n){}return t(r,D,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==D&&P(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==D&&P(e);var r=I.attrHandle[t.toLowerCase()],i=r&&Y.call(I.attrHandle,t.toLowerCase())?r(e,t,!M):void 0;return void 0!==i?i:L.attributes||!M?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,r=[],i=0,n=0;if(O=!L.detectDuplicates,b=!L.sortStable&&e.slice(0),e.sort(z),O){for(;t=e[n++];)t===e[n]&&(i=r.push(n));for(;i--;)e.splice(r[i],1)}return b=null,e},T=t.getText=function(e){var t,r="",i=0,n=e.nodeType;if(n){if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=T(e)}else if(3===n||4===n)return e.nodeValue}else for(;t=e[i++];)r+=T(t);return r},I=t.selectors={cacheLength:50,createPseudo:i,match:ht,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(Lt,It),e[3]=(e[3]||e[4]||e[5]||"").replace(Lt,It),"~="===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,r=!e[6]&&e[2];return ht.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&dt.test(r)&&(t=A(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Lt,It).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=j[e+" "];return t||(t=new RegExp("(^|"+it+")"+e+"("+it+"|$)"))&&j(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==X&&e.getAttribute("class")||"")})},ATTR:function(e,r,i){return function(n){var o=t.attr(n,e);return null==o?"!="===r:r?(o+="","="===r?o===i:"!="===r?o!==i:"^="===r?i&&0===o.indexOf(i):"*="===r?i&&o.indexOf(i)>-1:"$="===r?i&&o.slice(-i.length)===i:"~="===r?(" "+o+" ").indexOf(i)>-1:"|="===r?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,r,i,n){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===n?function(e){return!!e.parentNode}:function(t,r,l){var u,p,c,d,E,h,f=o!==s?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),v=!l&&!a;if(m){if(o){for(;f;){for(c=t;c=c[f];)if(a?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;h=f="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?m.firstChild:m.lastChild],s&&v){for(p=m[U]||(m[U]={}),u=p[e]||[],E=u[0]===H&&u[1],d=u[0]===H&&u[2],c=E&&m.childNodes[E];c=++E&&c&&c[f]||(d=E=0)||h.pop();)if(1===c.nodeType&&++d&&c===t){p[e]=[H,E,d];break}}else if(v&&(u=(t[U]||(t[U]={}))[e])&&u[0]===H)d=u[1];else for(;(c=++E&&c&&c[f]||(d=E=0)||h.pop())&&((a?c.nodeName.toLowerCase()!==g:1!==c.nodeType)||!++d||(v&&((c[U]||(c[U]={}))[e]=[H,d]),c!==t)););return d-=n,d===i||d%i===0&&d/i>=0}}},PSEUDO:function(e,r){var n,o=I.pseudos[e]||I.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[U]?o(r):o.length>1?(n=[e,e,"",r],I.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,n=o(e,r),s=n.length;s--;)i=tt.call(e,n[s]),e[i]=!(t[i]=n[s])}):function(e){return o(e,0,n)}):o}},pseudos:{not:i(function(e){var t=[],r=[],n=S(e.replace(lt,"$1"));return n[U]?i(function(e,t,r,i){for(var o,s=n(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,n(t,null,o,r),!r.pop()}}),has:i(function(e){return function(r){return t(e,r).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:i(function(e){return Et.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(Lt,It).toLowerCase(),function(t){var r;do if(r=M?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return r=r.toLowerCase(),r===e||0===r.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===_},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.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!I.pseudos.empty(e)},header:function(e){return mt.test(e.nodeName)},input:function(e){return ft.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,r){return[0>r?r+t:r]}),even:u(function(e,t){for(var r=0;t>r;r+=2)e.push(r);return e}),odd:u(function(e,t){for(var r=1;t>r;r+=2)e.push(r);return e}),lt:u(function(e,t,r){for(var i=0>r?r+t:r;--i>=0;)e.push(i);return e}),gt:u(function(e,t,r){for(var i=0>r?r+t:r;++i<t;)e.push(i);return e})}},I.pseudos.nth=I.pseudos.eq;for(N in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})I.pseudos[N]=a(N);for(N in{submit:!0,reset:!0})I.pseudos[N]=l(N);return c.prototype=I.filters=I.pseudos,I.setFilters=new c,A=t.tokenize=function(e,r){var i,n,o,s,a,l,u,p=W[e+" "];if(p)return r?0:p.slice(0);for(a=e,l=[],u=I.preFilter;a;){(!i||(n=ut.exec(a)))&&(n&&(a=a.slice(n[0].length)||a),l.push(o=[])),i=!1,(n=pt.exec(a))&&(i=n.shift(),o.push({value:i,type:n[0].replace(lt," ")}),a=a.slice(i.length));for(s in I.filter)!(n=ht[s].exec(a))||u[s]&&!(n=u[s](n))||(i=n.shift(),o.push({value:i,type:s,matches:n}),a=a.slice(i.length));if(!i)break}return r?a.length:a?t.error(e):W(e,l).slice(0)},S=t.compile=function(e,t){var r,i=[],n=[],o=q[e+" "];if(!o){for(t||(t=A(e)),r=t.length;r--;)o=v(t[r]),o[U]?i.push(o):n.push(o);o=q(e,x(n,i)),o.selector=e}return o},C=t.select=function(e,t,r,i){var n,o,s,a,l,u="function"==typeof e&&e,c=!i&&A(e=u.selector||e);if(r=r||[],1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&L.getById&&9===t.nodeType&&M&&I.relative[o[1].type]){if(t=(I.find.ID(s.matches[0].replace(Lt,It),t)||[])[0],!t)return r;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(n=ht.needsContext.test(e)?0:o.length;n--&&(s=o[n],!I.relative[a=s.type]);)if((l=I.find[a])&&(i=l(s.matches[0].replace(Lt,It),xt.test(o[0].type)&&p(t.parentNode)||t))){if(o.splice(n,1),e=i.length&&d(o),!e)return J.apply(r,i),r;break}}return(u||S(e,c))(i,t,!M,r,xt.test(e)&&p(t.parentNode)||t),r},L.sortStable=U.split("").sort(z).join("")===U,L.detectDuplicates=!!O,P(),L.sortDetached=n(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),n(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,r){return r?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),L.attributes&&n(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,r){return r||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),n(function(e){return null==e.getAttribute("disabled")})||o(rt,function(e,t,r){var i;return r?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(t);ot.find=pt,ot.expr=pt.selectors,ot.expr[":"]=ot.expr.pseudos,ot.unique=pt.uniqueSort,ot.text=pt.getText,ot.isXMLDoc=pt.isXML,ot.contains=pt.contains;var ct=ot.expr.match.needsContext,dt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Et=/^.[^:#\[\.,]*$/;ot.filter=function(e,t,r){var i=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?ot.find.matchesSelector(i,e)?[i]:[]:ot.find.matches(e,ot.grep(t,function(e){return 1===e.nodeType}))},ot.fn.extend({find:function(e){var t,r=[],i=this,n=i.length;if("string"!=typeof e)return this.pushStack(ot(e).filter(function(){for(t=0;n>t;t++)if(ot.contains(i[t],this))return!0}));for(t=0;n>t;t++)ot.find(e,i[t],r);return r=this.pushStack(n>1?ot.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(n(this,e||[],!1))},not:function(e){return this.pushStack(n(this,e||[],!0))},is:function(e){return!!n(this,"string"==typeof e&&ct.test(e)?ot(e):e||[],!1).length}});var ht,ft=t.document,mt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,gt=ot.fn.init=function(e,t){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:mt.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||ht).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ot?t[0]:t,ot.merge(this,ot.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ft,!0)),dt.test(r[1])&&ot.isPlainObject(t))for(r in t)ot.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=ft.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return ht.find(e);this.length=1,this[0]=i}return this.context=ft,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ot.isFunction(e)?"undefined"!=typeof ht.ready?ht.ready(e):e(ot):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ot.makeArray(e,this))};gt.prototype=ot.fn,ht=ot(ft);var vt=/^(?:parents|prev(?:Until|All))/,xt={children:!0,contents:!0,next:!0,prev:!0};ot.extend({dir:function(e,t,r){for(var i=[],n=e[t];n&&9!==n.nodeType&&(void 0===r||1!==n.nodeType||!ot(n).is(r));)1===n.nodeType&&i.push(n),n=n[t];return i},sibling:function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r}}),ot.fn.extend({has:function(e){var t,r=ot(e,this),i=r.length;return this.filter(function(){for(t=0;i>t;t++)if(ot.contains(this,r[t]))return!0})},closest:function(e,t){for(var r,i=0,n=this.length,o=[],s=ct.test(e)||"string"!=typeof e?ot(e,t||this.context):0;n>i;i++)for(r=this[i];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(s?s.index(r)>-1:1===r.nodeType&&ot.find.matchesSelector(r,e))){o.push(r);break}return this.pushStack(o.length>1?ot.unique(o):o)},index:function(e){return e?"string"==typeof e?ot.inArray(this[0],ot(e)):ot.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ot.unique(ot.merge(this.get(),ot(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ot.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ot.dir(e,"parentNode")},parentsUntil:function(e,t,r){return ot.dir(e,"parentNode",r)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return ot.dir(e,"nextSibling")},prevAll:function(e){return ot.dir(e,"previousSibling")},nextUntil:function(e,t,r){return ot.dir(e,"nextSibling",r)},prevUntil:function(e,t,r){return ot.dir(e,"previousSibling",r)},siblings:function(e){return ot.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ot.sibling(e.firstChild)},contents:function(e){return ot.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ot.merge([],e.childNodes)}},function(e,t){ot.fn[e]=function(r,i){var n=ot.map(this,t,r);return"Until"!==e.slice(-5)&&(i=r),i&&"string"==typeof i&&(n=ot.filter(i,n)),this.length>1&&(xt[e]||(n=ot.unique(n)),vt.test(e)&&(n=n.reverse())),this.pushStack(n)}});var Nt=/\S+/g,Lt={};ot.Callbacks=function(e){e="string"==typeof e?Lt[e]||s(e):ot.extend({},e);var t,r,i,n,o,a,l=[],u=!e.once&&[],p=function(s){for(r=e.memory&&s,i=!0,o=a||0,a=0,n=l.length,t=!0;l&&n>o;o++)if(l[o].apply(s[0],s[1])===!1&&e.stopOnFalse){r=!1;break}t=!1,l&&(u?u.length&&p(u.shift()):r?l=[]:c.disable())},c={add:function(){if(l){var i=l.length;!function o(t){ot.each(t,function(t,r){var i=ot.type(r);"function"===i?e.unique&&c.has(r)||l.push(r):r&&r.length&&"string"!==i&&o(r)})}(arguments),t?n=l.length:r&&(a=i,p(r))}return this},remove:function(){return l&&ot.each(arguments,function(e,r){for(var i;(i=ot.inArray(r,l,i))>-1;)l.splice(i,1),t&&(n>=i&&n--,o>=i&&o--)}),this},has:function(e){return e?ot.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],n=0,this},disable:function(){return l=u=r=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,r||c.disable(),this},locked:function(){return!u},fireWith:function(e,r){return!l||i&&!u||(r=r||[],r=[e,r.slice?r.slice():r],t?u.push(r):p(r)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},ot.extend({Deferred:function(e){var t=[["resolve","done",ot.Callbacks("once memory"),"resolved"],["reject","fail",ot.Callbacks("once memory"),"rejected"],["notify","progress",ot.Callbacks("memory")]],r="pending",i={state:function(){return r},always:function(){return n.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ot.Deferred(function(r){ot.each(t,function(t,o){var s=ot.isFunction(e[t])&&e[t];n[o[1]](function(){var e=s&&s.apply(this,arguments);e&&ot.isFunction(e.promise)?e.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[o[0]+"With"](this===i?r.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ot.extend(e,i):i}},n={};return i.pipe=i.then,ot.each(t,function(e,o){var s=o[2],a=o[3];i[o[1]]=s.add,a&&s.add(function(){r=a},t[1^e][2].disable,t[2][2].lock),n[o[0]]=function(){return n[o[0]+"With"](this===n?i:this,arguments),this},n[o[0]+"With"]=s.fireWith}),i.promise(n),e&&e.call(n,n),n},when:function(e){var t,r,i,n=0,o=$.call(arguments),s=o.length,a=1!==s||e&&ot.isFunction(e.promise)?s:0,l=1===a?e:ot.Deferred(),u=function(e,r,i){return function(n){r[e]=this,i[e]=arguments.length>1?$.call(arguments):n,i===t?l.notifyWith(r,i):--a||l.resolveWith(r,i)}};if(s>1)for(t=new Array(s),r=new Array(s),i=new Array(s);s>n;n++)o[n]&&ot.isFunction(o[n].promise)?o[n].promise().done(u(n,i,o)).fail(l.reject).progress(u(n,r,t)):--a;return a||l.resolveWith(i,o),l.promise()}});var It;ot.fn.ready=function(e){return ot.ready.promise().done(e),this},ot.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ot.readyWait++:ot.ready(!0)},ready:function(e){if(e===!0?!--ot.readyWait:!ot.isReady){if(!ft.body)return setTimeout(ot.ready);ot.isReady=!0,e!==!0&&--ot.readyWait>0||(It.resolveWith(ft,[ot]),ot.fn.triggerHandler&&(ot(ft).triggerHandler("ready"),ot(ft).off("ready")))}}}),ot.ready.promise=function(e){if(!It)if(It=ot.Deferred(),"complete"===ft.readyState)setTimeout(ot.ready);else if(ft.addEventListener)ft.addEventListener("DOMContentLoaded",l,!1),t.addEventListener("load",l,!1);else{ft.attachEvent("onreadystatechange",l),t.attachEvent("onload",l);var r=!1;try{r=null==t.frameElement&&ft.documentElement}catch(i){}r&&r.doScroll&&!function n(){if(!ot.isReady){try{r.doScroll("left")}catch(e){return setTimeout(n,50)}a(),ot.ready()}}()}return It.promise(e)};var Tt,yt="undefined";for(Tt in ot(it))break;it.ownLast="0"!==Tt,it.inlineBlockNeedsLayout=!1,ot(function(){var e,t,r,i;r=ft.getElementsByTagName("body")[0],r&&r.style&&(t=ft.createElement("div"),i=ft.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(i).appendChild(t),typeof t.style.zoom!==yt&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",it.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(r.style.zoom=1)),r.removeChild(i))}),function(){var e=ft.createElement("div");if(null==it.deleteExpando){it.deleteExpando=!0;try{delete e.test}catch(t){it.deleteExpando=!1}}e=null}(),ot.acceptData=function(e){var t=ot.noData[(e.nodeName+" ").toLowerCase()],r=+e.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&e.getAttribute("classid")===t};var At=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,St=/([A-Z])/g;ot.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?ot.cache[e[ot.expando]]:e[ot.expando],!!e&&!p(e)},data:function(e,t,r){return c(e,t,r)},removeData:function(e,t){return d(e,t)},_data:function(e,t,r){return c(e,t,r,!0)},_removeData:function(e,t){return d(e,t,!0)}}),ot.fn.extend({data:function(e,t){var r,i,n,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(n=ot.data(o),1===o.nodeType&&!ot._data(o,"parsedAttrs"))){for(r=s.length;r--;)s[r]&&(i=s[r].name,0===i.indexOf("data-")&&(i=ot.camelCase(i.slice(5)),u(o,i,n[i])));ot._data(o,"parsedAttrs",!0)}return n}return"object"==typeof e?this.each(function(){ot.data(this,e)}):arguments.length>1?this.each(function(){ot.data(this,e,t)}):o?u(o,e,ot.data(o,e)):void 0},removeData:function(e){return this.each(function(){ot.removeData(this,e)})}}),ot.extend({queue:function(e,t,r){var i;return e?(t=(t||"fx")+"queue",i=ot._data(e,t),r&&(!i||ot.isArray(r)?i=ot._data(e,t,ot.makeArray(r)):i.push(r)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var r=ot.queue(e,t),i=r.length,n=r.shift(),o=ot._queueHooks(e,t),s=function(){ot.dequeue(e,t)};"inprogress"===n&&(n=r.shift(),i--),n&&("fx"===t&&r.unshift("inprogress"),delete o.stop,n.call(e,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return ot._data(e,r)||ot._data(e,r,{empty:ot.Callbacks("once memory").add(function(){ot._removeData(e,t+"queue"),ot._removeData(e,r)})})}}),ot.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length<r?ot.queue(this[0],e):void 0===t?this:this.each(function(){var r=ot.queue(this,e,t);ot._queueHooks(this,e),"fx"===e&&"inprogress"!==r[0]&&ot.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ot.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var r,i=1,n=ot.Deferred(),o=this,s=this.length,a=function(){--i||n.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)r=ot._data(o[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),n.promise(t)}});var Ct=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Rt=["Top","Right","Bottom","Left"],bt=function(e,t){return e=t||e,"none"===ot.css(e,"display")||!ot.contains(e.ownerDocument,e)},Ot=ot.access=function(e,t,r,i,n,o,s){var a=0,l=e.length,u=null==r;if("object"===ot.type(r)){n=!0;for(a in r)ot.access(e,t,a,r[a],!0,o,s)}else if(void 0!==i&&(n=!0,ot.isFunction(i)||(s=!0),u&&(s?(t.call(e,i),t=null):(u=t,t=function(e,t,r){return u.call(ot(e),r)})),t))for(;l>a;a++)t(e[a],r,s?i:i.call(e[a],a,t(e[a],r)));return n?e:u?t.call(e):l?t(e[0],r):o},Pt=/^(?:checkbox|radio)$/i;!function(){var e=ft.createElement("input"),t=ft.createElement("div"),r=ft.createDocumentFragment();if(t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",it.leadingWhitespace=3===t.firstChild.nodeType,it.tbody=!t.getElementsByTagName("tbody").length,it.htmlSerialize=!!t.getElementsByTagName("link").length,it.html5Clone="<:nav></:nav>"!==ft.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,r.appendChild(e),it.appendChecked=e.checked,t.innerHTML="<textarea>x</textarea>",it.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,r.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",it.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,it.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){it.noCloneEvent=!1}),t.cloneNode(!0).click()),null==it.deleteExpando){it.deleteExpando=!0;try{delete t.test}catch(i){it.deleteExpando=!1}}}(),function(){var e,r,i=ft.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})r="on"+e,(it[e+"Bubbles"]=r in t)||(i.setAttribute(r,"t"),it[e+"Bubbles"]=i.attributes[r].expando===!1);i=null}();var Dt=/^(?:input|select|textarea)$/i,_t=/^key/,Mt=/^(?:mouse|pointer|contextmenu)|click/,wt=/^(?:focusinfocus|focusoutblur)$/,Gt=/^([^.]*)(?:\.(.+)|)$/;ot.event={global:{},add:function(e,t,r,i,n){var o,s,a,l,u,p,c,d,E,h,f,m=ot._data(e);if(m){for(r.handler&&(l=r,r=l.handler,n=l.selector),r.guid||(r.guid=ot.guid++),(s=m.events)||(s=m.events={}),(p=m.handle)||(p=m.handle=function(e){return typeof ot===yt||e&&ot.event.triggered===e.type?void 0:ot.event.dispatch.apply(p.elem,arguments)},p.elem=e),t=(t||"").match(Nt)||[""],a=t.length;a--;)o=Gt.exec(t[a])||[],E=f=o[1],h=(o[2]||"").split(".").sort(),E&&(u=ot.event.special[E]||{},E=(n?u.delegateType:u.bindType)||E,u=ot.event.special[E]||{},c=ot.extend({type:E,origType:f,data:i,handler:r,guid:r.guid,selector:n,needsContext:n&&ot.expr.match.needsContext.test(n),namespace:h.join(".")},l),(d=s[E])||(d=s[E]=[],d.delegateCount=0,u.setup&&u.setup.call(e,i,h,p)!==!1||(e.addEventListener?e.addEventListener(E,p,!1):e.attachEvent&&e.attachEvent("on"+E,p))),u.add&&(u.add.call(e,c),c.handler.guid||(c.handler.guid=r.guid)),n?d.splice(d.delegateCount++,0,c):d.push(c),ot.event.global[E]=!0);e=null}},remove:function(e,t,r,i,n){var o,s,a,l,u,p,c,d,E,h,f,m=ot.hasData(e)&&ot._data(e);if(m&&(p=m.events)){for(t=(t||"").match(Nt)||[""],u=t.length;u--;)if(a=Gt.exec(t[u])||[],E=f=a[1],h=(a[2]||"").split(".").sort(),E){for(c=ot.event.special[E]||{},E=(i?c.delegateType:c.bindType)||E,d=p[E]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=d.length;o--;)s=d[o],!n&&f!==s.origType||r&&r.guid!==s.guid||a&&!a.test(s.namespace)||i&&i!==s.selector&&("**"!==i||!s.selector)||(d.splice(o,1),s.selector&&d.delegateCount--,c.remove&&c.remove.call(e,s));l&&!d.length&&(c.teardown&&c.teardown.call(e,h,m.handle)!==!1||ot.removeEvent(e,E,m.handle),delete p[E])}else for(E in p)ot.event.remove(e,E+t[u],r,i,!0);ot.isEmptyObject(p)&&(delete m.handle,ot._removeData(e,"events"))}},trigger:function(e,r,i,n){var o,s,a,l,u,p,c,d=[i||ft],E=rt.call(e,"type")?e.type:e,h=rt.call(e,"namespace")?e.namespace.split("."):[];if(a=p=i=i||ft,3!==i.nodeType&&8!==i.nodeType&&!wt.test(E+ot.event.triggered)&&(E.indexOf(".")>=0&&(h=E.split("."),E=h.shift(),h.sort()),s=E.indexOf(":")<0&&"on"+E,e=e[ot.expando]?e:new ot.Event(E,"object"==typeof e&&e),e.isTrigger=n?2:3,e.namespace=h.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),r=null==r?[e]:ot.makeArray(r,[e]),u=ot.event.special[E]||{},n||!u.trigger||u.trigger.apply(i,r)!==!1)){if(!n&&!u.noBubble&&!ot.isWindow(i)){for(l=u.delegateType||E,wt.test(l+E)||(a=a.parentNode);a;a=a.parentNode)d.push(a),p=a; p===(i.ownerDocument||ft)&&d.push(p.defaultView||p.parentWindow||t)}for(c=0;(a=d[c++])&&!e.isPropagationStopped();)e.type=c>1?l:u.bindType||E,o=(ot._data(a,"events")||{})[e.type]&&ot._data(a,"handle"),o&&o.apply(a,r),o=s&&a[s],o&&o.apply&&ot.acceptData(a)&&(e.result=o.apply(a,r),e.result===!1&&e.preventDefault());if(e.type=E,!n&&!e.isDefaultPrevented()&&(!u._default||u._default.apply(d.pop(),r)===!1)&&ot.acceptData(i)&&s&&i[E]&&!ot.isWindow(i)){p=i[s],p&&(i[s]=null),ot.event.triggered=E;try{i[E]()}catch(f){}ot.event.triggered=void 0,p&&(i[s]=p)}return e.result}},dispatch:function(e){e=ot.event.fix(e);var t,r,i,n,o,s=[],a=$.call(arguments),l=(ot._data(this,"events")||{})[e.type]||[],u=ot.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(s=ot.event.handlers.call(this,e,l),t=0;(n=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=n.elem,o=0;(i=n.handlers[o++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((ot.event.special[i.origType]||{}).handle||i.handler).apply(n.elem,a),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 r,i,n,o,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(n=[],o=0;a>o;o++)i=t[o],r=i.selector+" ",void 0===n[r]&&(n[r]=i.needsContext?ot(r,this).index(l)>=0:ot.find(r,this,null,[l]).length),n[r]&&n.push(i);n.length&&s.push({elem:l,handlers:n})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},fix:function(e){if(e[ot.expando])return e;var t,r,i,n=e.type,o=e,s=this.fixHooks[n];for(s||(this.fixHooks[n]=s=Mt.test(n)?this.mouseHooks:_t.test(n)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,e=new ot.Event(o),t=i.length;t--;)r=i[t],e[r]=o[r];return e.target||(e.target=o.srcElement||ft),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget 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 fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var r,i,n,o=t.button,s=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||ft,n=i.documentElement,r=i.body,e.pageX=t.clientX+(n&&n.scrollLeft||r&&r.scrollLeft||0)-(n&&n.clientLeft||r&&r.clientLeft||0),e.pageY=t.clientY+(n&&n.scrollTop||r&&r.scrollTop||0)-(n&&n.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?t.toElement:s),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==f()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return ot.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return ot.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,r,i){var n=ot.extend(new ot.Event,r,{type:e,isSimulated:!0,originalEvent:{}});i?ot.event.trigger(n,null,t):ot.event.dispatch.call(t,n),n.isDefaultPrevented()&&r.preventDefault()}},ot.removeEvent=ft.removeEventListener?function(e,t,r){e.removeEventListener&&e.removeEventListener(t,r,!1)}:function(e,t,r){var i="on"+t;e.detachEvent&&(typeof e[i]===yt&&(e[i]=null),e.detachEvent(i,r))},ot.Event=function(e,t){return this instanceof ot.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?E:h):this.type=e,t&&ot.extend(this,t),this.timeStamp=e&&e.timeStamp||ot.now(),void(this[ot.expando]=!0)):new ot.Event(e,t)},ot.Event.prototype={isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=E,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=E,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=E,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},ot.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ot.event.special[e]={delegateType:t,bindType:t,handle:function(e){var r,i=this,n=e.relatedTarget,o=e.handleObj;return(!n||n!==i&&!ot.contains(i,n))&&(e.type=o.origType,r=o.handler.apply(this,arguments),e.type=t),r}}}),it.submitBubbles||(ot.event.special.submit={setup:function(){return ot.nodeName(this,"form")?!1:void ot.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,r=ot.nodeName(t,"input")||ot.nodeName(t,"button")?t.form:void 0;r&&!ot._data(r,"submitBubbles")&&(ot.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),ot._data(r,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&ot.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return ot.nodeName(this,"form")?!1:void ot.event.remove(this,"._submit")}}),it.changeBubbles||(ot.event.special.change={setup:function(){return Dt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ot.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),ot.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),ot.event.simulate("change",this,e,!0)})),!1):void ot.event.add(this,"beforeactivate._change",function(e){var t=e.target;Dt.test(t.nodeName)&&!ot._data(t,"changeBubbles")&&(ot.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ot.event.simulate("change",this.parentNode,e,!0)}),ot._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return ot.event.remove(this,"._change"),!Dt.test(this.nodeName)}}),it.focusinBubbles||ot.each({focus:"focusin",blur:"focusout"},function(e,t){var r=function(e){ot.event.simulate(t,e.target,ot.event.fix(e),!0)};ot.event.special[t]={setup:function(){var i=this.ownerDocument||this,n=ot._data(i,t);n||i.addEventListener(e,r,!0),ot._data(i,t,(n||0)+1)},teardown:function(){var i=this.ownerDocument||this,n=ot._data(i,t)-1;n?ot._data(i,t,n):(i.removeEventListener(e,r,!0),ot._removeData(i,t))}}}),ot.fn.extend({on:function(e,t,r,i,n){var o,s;if("object"==typeof e){"string"!=typeof t&&(r=r||t,t=void 0);for(o in e)this.on(o,t,r,e[o],n);return this}if(null==r&&null==i?(i=t,r=t=void 0):null==i&&("string"==typeof t?(i=r,r=void 0):(i=r,r=t,t=void 0)),i===!1)i=h;else if(!i)return this;return 1===n&&(s=i,i=function(e){return ot().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=ot.guid++)),this.each(function(){ot.event.add(this,e,i,r,t)})},one:function(e,t,r,i){return this.on(e,t,r,i,1)},off:function(e,t,r){var i,n;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,ot(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(n in e)this.off(n,t,e[n]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=h),this.each(function(){ot.event.remove(this,e,r,t)})},trigger:function(e,t){return this.each(function(){ot.event.trigger(e,t,this)})},triggerHandler:function(e,t){var r=this[0];return r?ot.event.trigger(e,t,r,!0):void 0}});var kt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Bt=/ jQuery\d+="(?:null|\d+)"/g,Ut=new RegExp("<(?:"+kt+")[\\s/>]","i"),Vt=/^\s+/,Ht=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ft=/<([\w:]+)/,jt=/<tbody/i,Wt=/<|&#?\w+;/,qt=/<(?:script|style|link)/i,zt=/checked\s*(?:[^=]|=\s*.checked.)/i,Xt=/^$|\/(?:java|ecma)script/i,Kt=/^true\/(.*)/,Yt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,$t={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:it.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Qt=m(ft),Zt=Qt.appendChild(ft.createElement("div"));$t.optgroup=$t.option,$t.tbody=$t.tfoot=$t.colgroup=$t.caption=$t.thead,$t.th=$t.td,ot.extend({clone:function(e,t,r){var i,n,o,s,a,l=ot.contains(e.ownerDocument,e);if(it.html5Clone||ot.isXMLDoc(e)||!Ut.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Zt.innerHTML=e.outerHTML,Zt.removeChild(o=Zt.firstChild)),!(it.noCloneEvent&&it.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ot.isXMLDoc(e)))for(i=g(o),a=g(e),s=0;null!=(n=a[s]);++s)i[s]&&y(n,i[s]);if(t)if(r)for(a=a||g(e),i=i||g(o),s=0;null!=(n=a[s]);s++)T(n,i[s]);else T(e,o);return i=g(o,"script"),i.length>0&&I(i,!l&&g(e,"script")),i=a=n=null,o},buildFragment:function(e,t,r,i){for(var n,o,s,a,l,u,p,c=e.length,d=m(t),E=[],h=0;c>h;h++)if(o=e[h],o||0===o)if("object"===ot.type(o))ot.merge(E,o.nodeType?[o]:o);else if(Wt.test(o)){for(a=a||d.appendChild(t.createElement("div")),l=(Ft.exec(o)||["",""])[1].toLowerCase(),p=$t[l]||$t._default,a.innerHTML=p[1]+o.replace(Ht,"<$1></$2>")+p[2],n=p[0];n--;)a=a.lastChild;if(!it.leadingWhitespace&&Vt.test(o)&&E.push(t.createTextNode(Vt.exec(o)[0])),!it.tbody)for(o="table"!==l||jt.test(o)?"<table>"!==p[1]||jt.test(o)?0:a:a.firstChild,n=o&&o.childNodes.length;n--;)ot.nodeName(u=o.childNodes[n],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(ot.merge(E,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=d.lastChild}else E.push(t.createTextNode(o));for(a&&d.removeChild(a),it.appendChecked||ot.grep(g(E,"input"),v),h=0;o=E[h++];)if((!i||-1===ot.inArray(o,i))&&(s=ot.contains(o.ownerDocument,o),a=g(d.appendChild(o),"script"),s&&I(a),r))for(n=0;o=a[n++];)Xt.test(o.type||"")&&r.push(o);return a=null,d},cleanData:function(e,t){for(var r,i,n,o,s=0,a=ot.expando,l=ot.cache,u=it.deleteExpando,p=ot.event.special;null!=(r=e[s]);s++)if((t||ot.acceptData(r))&&(n=r[a],o=n&&l[n])){if(o.events)for(i in o.events)p[i]?ot.event.remove(r,i):ot.removeEvent(r,i,o.handle);l[n]&&(delete l[n],u?delete r[a]:typeof r.removeAttribute!==yt?r.removeAttribute(a):r[a]=null,Y.push(n))}}}),ot.fn.extend({text:function(e){return Ot(this,function(e){return void 0===e?ot.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ft).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(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 this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var r,i=e?ot.filter(e,this):this,n=0;null!=(r=i[n]);n++)t||1!==r.nodeType||ot.cleanData(g(r)),r.parentNode&&(t&&ot.contains(r.ownerDocument,r)&&I(g(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ot.cleanData(g(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ot.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ot.clone(this,e,t)})},html:function(e){return Ot(this,function(e){var t=this[0]||{},r=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Bt,""):void 0;if(!("string"!=typeof e||qt.test(e)||!it.htmlSerialize&&Ut.test(e)||!it.leadingWhitespace&&Vt.test(e)||$t[(Ft.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Ht,"<$1></$2>");try{for(;i>r;r++)t=this[r]||{},1===t.nodeType&&(ot.cleanData(g(t,!1)),t.innerHTML=e);t=0}catch(n){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,ot.cleanData(g(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=Q.apply([],e);var r,i,n,o,s,a,l=0,u=this.length,p=this,c=u-1,d=e[0],E=ot.isFunction(d);if(E||u>1&&"string"==typeof d&&!it.checkClone&&zt.test(d))return this.each(function(r){var i=p.eq(r);E&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t)});if(u&&(a=ot.buildFragment(e,this[0].ownerDocument,!1,this),r=a.firstChild,1===a.childNodes.length&&(a=r),r)){for(o=ot.map(g(a,"script"),N),n=o.length;u>l;l++)i=a,l!==c&&(i=ot.clone(i,!0,!0),n&&ot.merge(o,g(i,"script"))),t.call(this[l],i,l);if(n)for(s=o[o.length-1].ownerDocument,ot.map(o,L),l=0;n>l;l++)i=o[l],Xt.test(i.type||"")&&!ot._data(i,"globalEval")&&ot.contains(s,i)&&(i.src?ot._evalUrl&&ot._evalUrl(i.src):ot.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Yt,"")));a=r=null}return this}}),ot.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ot.fn[e]=function(e){for(var r,i=0,n=[],o=ot(e),s=o.length-1;s>=i;i++)r=i===s?this:this.clone(!0),ot(o[i])[t](r),Z.apply(n,r.get());return this.pushStack(n)}});var Jt,er={};!function(){var e;it.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,r,i;return r=ft.getElementsByTagName("body")[0],r&&r.style?(t=ft.createElement("div"),i=ft.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(i).appendChild(t),typeof t.style.zoom!==yt&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(ft.createElement("div")).style.width="5px",e=3!==t.offsetWidth),r.removeChild(i),e):void 0}}();var tr,rr,ir=/^margin/,nr=new RegExp("^("+Ct+")(?!px)[a-z%]+$","i"),or=/^(top|right|bottom|left)$/;t.getComputedStyle?(tr=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},rr=function(e,t,r){var i,n,o,s,a=e.style;return r=r||tr(e),s=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==s||ot.contains(e.ownerDocument,e)||(s=ot.style(e,t)),nr.test(s)&&ir.test(t)&&(i=a.width,n=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=r.width,a.width=i,a.minWidth=n,a.maxWidth=o)),void 0===s?s:s+""}):ft.documentElement.currentStyle&&(tr=function(e){return e.currentStyle},rr=function(e,t,r){var i,n,o,s,a=e.style;return r=r||tr(e),s=r?r[t]:void 0,null==s&&a&&a[t]&&(s=a[t]),nr.test(s)&&!or.test(t)&&(i=a.left,n=e.runtimeStyle,o=n&&n.left,o&&(n.left=e.currentStyle.left),a.left="fontSize"===t?"1em":s,s=a.pixelLeft+"px",a.left=i,o&&(n.left=o)),void 0===s?s:s+""||"auto"}),function(){function e(){var e,r,i,n;r=ft.getElementsByTagName("body")[0],r&&r.style&&(e=ft.createElement("div"),i=ft.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(i).appendChild(e),e.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,l=!0,t.getComputedStyle&&(o="1%"!==(t.getComputedStyle(e,null)||{}).top,s="4px"===(t.getComputedStyle(e,null)||{width:"4px"}).width,n=e.appendChild(ft.createElement("div")),n.style.cssText=e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",e.style.width="1px",l=!parseFloat((t.getComputedStyle(n,null)||{}).marginRight)),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",n=e.getElementsByTagName("td"),n[0].style.cssText="margin:0;border:0;padding:0;display:none",a=0===n[0].offsetHeight,a&&(n[0].style.display="",n[1].style.display="none",a=0===n[0].offsetHeight),r.removeChild(i))}var r,i,n,o,s,a,l;r=ft.createElement("div"),r.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=r.getElementsByTagName("a")[0],i=n&&n.style,i&&(i.cssText="float:left;opacity:.5",it.opacity="0.5"===i.opacity,it.cssFloat=!!i.cssFloat,r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",it.clearCloneStyle="content-box"===r.style.backgroundClip,it.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,ot.extend(it,{reliableHiddenOffsets:function(){return null==a&&e(),a},boxSizingReliable:function(){return null==s&&e(),s},pixelPosition:function(){return null==o&&e(),o},reliableMarginRight:function(){return null==l&&e(),l}}))}(),ot.swap=function(e,t,r,i){var n,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];n=r.apply(e,i||[]);for(o in t)e.style[o]=s[o];return n};var sr=/alpha\([^)]*\)/i,ar=/opacity\s*=\s*([^)]*)/,lr=/^(none|table(?!-c[ea]).+)/,ur=new RegExp("^("+Ct+")(.*)$","i"),pr=new RegExp("^([+-])=("+Ct+")","i"),cr={position:"absolute",visibility:"hidden",display:"block"},dr={letterSpacing:"0",fontWeight:"400"},Er=["Webkit","O","Moz","ms"];ot.extend({cssHooks:{opacity:{get:function(e,t){if(t){var r=rr(e,"opacity");return""===r?"1":r}}}},cssNumber:{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":it.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var n,o,s,a=ot.camelCase(t),l=e.style;if(t=ot.cssProps[a]||(ot.cssProps[a]=R(l,a)),s=ot.cssHooks[t]||ot.cssHooks[a],void 0===r)return s&&"get"in s&&void 0!==(n=s.get(e,!1,i))?n:l[t];if(o=typeof r,"string"===o&&(n=pr.exec(r))&&(r=(n[1]+1)*n[2]+parseFloat(ot.css(e,t)),o="number"),null!=r&&r===r&&("number"!==o||ot.cssNumber[a]||(r+="px"),it.clearCloneStyle||""!==r||0!==t.indexOf("background")||(l[t]="inherit"),!(s&&"set"in s&&void 0===(r=s.set(e,r,i)))))try{l[t]=r}catch(u){}}},css:function(e,t,r,i){var n,o,s,a=ot.camelCase(t);return t=ot.cssProps[a]||(ot.cssProps[a]=R(e.style,a)),s=ot.cssHooks[t]||ot.cssHooks[a],s&&"get"in s&&(o=s.get(e,!0,r)),void 0===o&&(o=rr(e,t,i)),"normal"===o&&t in dr&&(o=dr[t]),""===r||r?(n=parseFloat(o),r===!0||ot.isNumeric(n)?n||0:o):o}}),ot.each(["height","width"],function(e,t){ot.cssHooks[t]={get:function(e,r,i){return r?lr.test(ot.css(e,"display"))&&0===e.offsetWidth?ot.swap(e,cr,function(){return D(e,t,i)}):D(e,t,i):void 0},set:function(e,r,i){var n=i&&tr(e);return O(e,r,i?P(e,t,i,it.boxSizing&&"border-box"===ot.css(e,"boxSizing",!1,n),n):0)}}}),it.opacity||(ot.cssHooks.opacity={get:function(e,t){return ar.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var r=e.style,i=e.currentStyle,n=ot.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=i&&i.filter||r.filter||"";r.zoom=1,(t>=1||""===t)&&""===ot.trim(o.replace(sr,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||i&&!i.filter)||(r.filter=sr.test(o)?o.replace(sr,n):o+" "+n)}}),ot.cssHooks.marginRight=C(it.reliableMarginRight,function(e,t){return t?ot.swap(e,{display:"inline-block"},rr,[e,"marginRight"]):void 0}),ot.each({margin:"",padding:"",border:"Width"},function(e,t){ot.cssHooks[e+t]={expand:function(r){for(var i=0,n={},o="string"==typeof r?r.split(" "):[r];4>i;i++)n[e+Rt[i]+t]=o[i]||o[i-2]||o[0];return n}},ir.test(e)||(ot.cssHooks[e+t].set=O)}),ot.fn.extend({css:function(e,t){return Ot(this,function(e,t,r){var i,n,o={},s=0;if(ot.isArray(t)){for(i=tr(e),n=t.length;n>s;s++)o[t[s]]=ot.css(e,t[s],!1,i);return o}return void 0!==r?ot.style(e,t,r):ot.css(e,t)},e,t,arguments.length>1)},show:function(){return b(this,!0)},hide:function(){return b(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){bt(this)?ot(this).show():ot(this).hide()})}}),ot.Tween=_,_.prototype={constructor:_,init:function(e,t,r,i,n,o){this.elem=e,this.prop=r,this.easing=n||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(ot.cssNumber[r]?"":"px")},cur:function(){var e=_.propHooks[this.prop];return e&&e.get?e.get(this):_.propHooks._default.get(this)},run:function(e){var t,r=_.propHooks[this.prop];return this.pos=t=this.options.duration?ot.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):_.propHooks._default.set(this),this}},_.prototype.init.prototype=_.prototype,_.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ot.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ot.fx.step[e.prop]?ot.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ot.cssProps[e.prop]]||ot.cssHooks[e.prop])?ot.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},_.propHooks.scrollTop=_.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ot.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ot.fx=_.prototype.init,ot.fx.step={};var hr,fr,mr=/^(?:toggle|show|hide)$/,gr=new RegExp("^(?:([+-])=|)("+Ct+")([a-z%]*)$","i"),vr=/queueHooks$/,xr=[k],Nr={"*":[function(e,t){var r=this.createTween(e,t),i=r.cur(),n=gr.exec(t),o=n&&n[3]||(ot.cssNumber[e]?"":"px"),s=(ot.cssNumber[e]||"px"!==o&&+i)&&gr.exec(ot.css(r.elem,e)),a=1,l=20;if(s&&s[3]!==o){o=o||s[3],n=n||[],s=+i||1;do a=a||".5",s/=a,ot.style(r.elem,e,s+o);while(a!==(a=r.cur()/i)&&1!==a&&--l)}return n&&(s=r.start=+s||+i||0,r.unit=o,r.end=n[1]?s+(n[1]+1)*n[2]:+n[2]),r}]};ot.Animation=ot.extend(U,{tweener:function(e,t){ot.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var r,i=0,n=e.length;n>i;i++)r=e[i],Nr[r]=Nr[r]||[],Nr[r].unshift(t)},prefilter:function(e,t){t?xr.unshift(e):xr.push(e)}}),ot.speed=function(e,t,r){var i=e&&"object"==typeof e?ot.extend({},e):{complete:r||!r&&t||ot.isFunction(e)&&e,duration:e,easing:r&&t||t&&!ot.isFunction(t)&&t};return i.duration=ot.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in ot.fx.speeds?ot.fx.speeds[i.duration]:ot.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){ot.isFunction(i.old)&&i.old.call(this),i.queue&&ot.dequeue(this,i.queue)},i},ot.fn.extend({fadeTo:function(e,t,r,i){return this.filter(bt).css("opacity",0).show().end().animate({opacity:t},e,r,i)},animate:function(e,t,r,i){var n=ot.isEmptyObject(e),o=ot.speed(t,r,i),s=function(){var t=U(this,ot.extend({},e),o);(n||ot._data(this,"finish"))&&t.stop(!0)};return s.finish=s,n||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=ot.timers,s=ot._data(this);if(n)s[n]&&s[n].stop&&i(s[n]);else for(n in s)s[n]&&s[n].stop&&vr.test(n)&&i(s[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&ot.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,r=ot._data(this),i=r[e+"queue"],n=r[e+"queueHooks"],o=ot.timers,s=i?i.length:0;for(r.finish=!0,ot.queue(this,e,[]),n&&n.stop&&n.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;s>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete r.finish})}}),ot.each(["toggle","show","hide"],function(e,t){var r=ot.fn[t];ot.fn[t]=function(e,i,n){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(w(t,!0),e,i,n)}}),ot.each({slideDown:w("show"),slideUp:w("hide"),slideToggle:w("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ot.fn[e]=function(e,r,i){return this.animate(t,e,r,i)}}),ot.timers=[],ot.fx.tick=function(){var e,t=ot.timers,r=0;for(hr=ot.now();r<t.length;r++)e=t[r],e()||t[r]!==e||t.splice(r--,1);t.length||ot.fx.stop(),hr=void 0},ot.fx.timer=function(e){ot.timers.push(e),e()?ot.fx.start():ot.timers.pop()},ot.fx.interval=13,ot.fx.start=function(){fr||(fr=setInterval(ot.fx.tick,ot.fx.interval))},ot.fx.stop=function(){clearInterval(fr),fr=null},ot.fx.speeds={slow:600,fast:200,_default:400},ot.fn.delay=function(e,t){return e=ot.fx?ot.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,r){var i=setTimeout(t,e);r.stop=function(){clearTimeout(i)}})},function(){var e,t,r,i,n;t=ft.createElement("div"),t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=t.getElementsByTagName("a")[0],r=ft.createElement("select"),n=r.appendChild(ft.createElement("option")),e=t.getElementsByTagName("input")[0],i.style.cssText="top:1px",it.getSetAttribute="t"!==t.className,it.style=/top/.test(i.getAttribute("style")),it.hrefNormalized="/a"===i.getAttribute("href"),it.checkOn=!!e.value,it.optSelected=n.selected,it.enctype=!!ft.createElement("form").enctype,r.disabled=!0,it.optDisabled=!n.disabled,e=ft.createElement("input"),e.setAttribute("value",""),it.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),it.radioValue="t"===e.value}();var Lr=/\r/g;ot.fn.extend({val:function(e){var t,r,i,n=this[0];{if(arguments.length)return i=ot.isFunction(e),this.each(function(r){var n;1===this.nodeType&&(n=i?e.call(this,r,ot(this).val()):e,null==n?n="":"number"==typeof n?n+="":ot.isArray(n)&&(n=ot.map(n,function(e){return null==e?"":e+""})),t=ot.valHooks[this.type]||ot.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,n,"value")||(this.value=n))});if(n)return t=ot.valHooks[n.type]||ot.valHooks[n.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(n,"value"))?r:(r=n.value,"string"==typeof r?r.replace(Lr,""):null==r?"":r)}}}),ot.extend({valHooks:{option:{get:function(e){var t=ot.find.attr(e,"value");return null!=t?t:ot.trim(ot.text(e))}},select:{get:function(e){for(var t,r,i=e.options,n=e.selectedIndex,o="select-one"===e.type||0>n,s=o?null:[],a=o?n+1:i.length,l=0>n?a:o?n:0;a>l;l++)if(r=i[l],!(!r.selected&&l!==n||(it.optDisabled?r.disabled:null!==r.getAttribute("disabled"))||r.parentNode.disabled&&ot.nodeName(r.parentNode,"optgroup"))){if(t=ot(r).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var r,i,n=e.options,o=ot.makeArray(t),s=n.length;s--;)if(i=n[s],ot.inArray(ot.valHooks.option.get(i),o)>=0)try{i.selected=r=!0}catch(a){i.scrollHeight}else i.selected=!1;return r||(e.selectedIndex=-1),n}}}}),ot.each(["radio","checkbox"],function(){ot.valHooks[this]={set:function(e,t){return ot.isArray(t)?e.checked=ot.inArray(ot(e).val(),t)>=0:void 0}},it.checkOn||(ot.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Ir,Tr,yr=ot.expr.attrHandle,Ar=/^(?:checked|selected)$/i,Sr=it.getSetAttribute,Cr=it.input;ot.fn.extend({attr:function(e,t){return Ot(this,ot.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ot.removeAttr(this,e)})}}),ot.extend({attr:function(e,t,r){var i,n,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===yt?ot.prop(e,t,r):(1===o&&ot.isXMLDoc(e)||(t=t.toLowerCase(),i=ot.attrHooks[t]||(ot.expr.match.bool.test(t)?Tr:Ir)),void 0===r?i&&"get"in i&&null!==(n=i.get(e,t))?n:(n=ot.find.attr(e,t),null==n?void 0:n):null!==r?i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:(e.setAttribute(t,r+""),r):void ot.removeAttr(e,t))},removeAttr:function(e,t){var r,i,n=0,o=t&&t.match(Nt);if(o&&1===e.nodeType)for(;r=o[n++];)i=ot.propFix[r]||r,ot.expr.match.bool.test(r)?Cr&&Sr||!Ar.test(r)?e[i]=!1:e[ot.camelCase("default-"+r)]=e[i]=!1:ot.attr(e,r,""),e.removeAttribute(Sr?r:i)},attrHooks:{type:{set:function(e,t){if(!it.radioValue&&"radio"===t&&ot.nodeName(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}}}),Tr={set:function(e,t,r){return t===!1?ot.removeAttr(e,r):Cr&&Sr||!Ar.test(r)?e.setAttribute(!Sr&&ot.propFix[r]||r,r):e[ot.camelCase("default-"+r)]=e[r]=!0,r}},ot.each(ot.expr.match.bool.source.match(/\w+/g),function(e,t){var r=yr[t]||ot.find.attr;yr[t]=Cr&&Sr||!Ar.test(t)?function(e,t,i){var n,o;return i||(o=yr[t],yr[t]=n,n=null!=r(e,t,i)?t.toLowerCase():null,yr[t]=o),n}:function(e,t,r){return r?void 0:e[ot.camelCase("default-"+t)]?t.toLowerCase():null}}),Cr&&Sr||(ot.attrHooks.value={set:function(e,t,r){return ot.nodeName(e,"input")?void(e.defaultValue=t):Ir&&Ir.set(e,t,r)}}),Sr||(Ir={set:function(e,t,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=t+="","value"===r||t===e.getAttribute(r)?t:void 0}},yr.id=yr.name=yr.coords=function(e,t,r){var i;return r?void 0:(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},ot.valHooks.button={get:function(e,t){var r=e.getAttributeNode(t);return r&&r.specified?r.value:void 0},set:Ir.set},ot.attrHooks.contenteditable={set:function(e,t,r){Ir.set(e,""===t?!1:t,r)}},ot.each(["width","height"],function(e,t){ot.attrHooks[t]={set:function(e,r){return""===r?(e.setAttribute(t,"auto"),r):void 0}}})),it.style||(ot.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Rr=/^(?:input|select|textarea|button|object)$/i,br=/^(?:a|area)$/i;ot.fn.extend({prop:function(e,t){return Ot(this,ot.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ot.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),ot.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,r){var i,n,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!ot.isXMLDoc(e),o&&(t=ot.propFix[t]||t,n=ot.propHooks[t]),void 0!==r?n&&"set"in n&&void 0!==(i=n.set(e,r,t))?i:e[t]=r:n&&"get"in n&&null!==(i=n.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=ot.find.attr(e,"tabindex");return t?parseInt(t,10):Rr.test(e.nodeName)||br.test(e.nodeName)&&e.href?0:-1}}}}),it.hrefNormalized||ot.each(["href","src"],function(e,t){ot.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),it.optSelected||(ot.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this}),it.enctype||(ot.propFix.enctype="encoding");var Or=/[\t\r\n\f]/g;ot.fn.extend({addClass:function(e){var t,r,i,n,o,s,a=0,l=this.length,u="string"==typeof e&&e;if(ot.isFunction(e))return this.each(function(t){ot(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(Nt)||[];l>a;a++)if(r=this[a],i=1===r.nodeType&&(r.className?(" "+r.className+" ").replace(Or," "):" ")){for(o=0;n=t[o++];)i.indexOf(" "+n+" ")<0&&(i+=n+" ");s=ot.trim(i),r.className!==s&&(r.className=s)}return this},removeClass:function(e){var t,r,i,n,o,s,a=0,l=this.length,u=0===arguments.length||"string"==typeof e&&e; if(ot.isFunction(e))return this.each(function(t){ot(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(Nt)||[];l>a;a++)if(r=this[a],i=1===r.nodeType&&(r.className?(" "+r.className+" ").replace(Or," "):"")){for(o=0;n=t[o++];)for(;i.indexOf(" "+n+" ")>=0;)i=i.replace(" "+n+" "," ");s=e?ot.trim(i):"",r.className!==s&&(r.className=s)}return this},toggleClass:function(e,t){var r=typeof e;return"boolean"==typeof t&&"string"===r?t?this.addClass(e):this.removeClass(e):this.each(ot.isFunction(e)?function(r){ot(this).toggleClass(e.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,i=0,n=ot(this),o=e.match(Nt)||[];t=o[i++];)n.hasClass(t)?n.removeClass(t):n.addClass(t);else(r===yt||"boolean"===r)&&(this.className&&ot._data(this,"__className__",this.className),this.className=this.className||e===!1?"":ot._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",r=0,i=this.length;i>r;r++)if(1===this[r].nodeType&&(" "+this[r].className+" ").replace(Or," ").indexOf(t)>=0)return!0;return!1}}),ot.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){ot.fn[t]=function(e,r){return arguments.length>0?this.on(t,null,e,r):this.trigger(t)}}),ot.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,r){return this.on(e,null,t,r)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,r,i){return this.on(t,e,r,i)},undelegate:function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)}});var Pr=ot.now(),Dr=/\?/,_r=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ot.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var r,i=null,n=ot.trim(e+"");return n&&!ot.trim(n.replace(_r,function(e,t,n,o){return r&&t&&(i=0),0===i?e:(r=n||t,i+=!o-!n,"")}))?Function("return "+n)():ot.error("Invalid JSON: "+e)},ot.parseXML=function(e){var r,i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(i=new DOMParser,r=i.parseFromString(e,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(e))}catch(n){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||ot.error("Invalid XML: "+e),r};var Mr,wr,Gr=/#.*$/,kr=/([?&])_=[^&]*/,Br=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ur=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Vr=/^(?:GET|HEAD)$/,Hr=/^\/\//,Fr=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,jr={},Wr={},qr="*/".concat("*");try{wr=location.href}catch(zr){wr=ft.createElement("a"),wr.href="",wr=wr.href}Mr=Fr.exec(wr.toLowerCase())||[],ot.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wr,type:"GET",isLocal:Ur.test(Mr[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qr,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ot.parseJSON,"text xml":ot.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?F(F(e,ot.ajaxSettings),t):F(ot.ajaxSettings,e)},ajaxPrefilter:V(jr),ajaxTransport:V(Wr),ajax:function(e,t){function r(e,t,r,i){var n,p,g,v,N,I=t;2!==x&&(x=2,a&&clearTimeout(a),u=void 0,s=i||"",L.readyState=e>0?4:0,n=e>=200&&300>e||304===e,r&&(v=j(c,L,r)),v=W(c,v,L,n),n?(c.ifModified&&(N=L.getResponseHeader("Last-Modified"),N&&(ot.lastModified[o]=N),N=L.getResponseHeader("etag"),N&&(ot.etag[o]=N)),204===e||"HEAD"===c.type?I="nocontent":304===e?I="notmodified":(I=v.state,p=v.data,g=v.error,n=!g)):(g=I,(e||!I)&&(I="error",0>e&&(e=0))),L.status=e,L.statusText=(t||I)+"",n?h.resolveWith(d,[p,I,L]):h.rejectWith(d,[L,I,g]),L.statusCode(m),m=void 0,l&&E.trigger(n?"ajaxSuccess":"ajaxError",[L,c,n?p:g]),f.fireWith(d,[L,I]),l&&(E.trigger("ajaxComplete",[L,c]),--ot.active||ot.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,n,o,s,a,l,u,p,c=ot.ajaxSetup({},t),d=c.context||c,E=c.context&&(d.nodeType||d.jquery)?ot(d):ot.event,h=ot.Deferred(),f=ot.Callbacks("once memory"),m=c.statusCode||{},g={},v={},x=0,N="canceled",L={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!p)for(p={};t=Br.exec(s);)p[t[1].toLowerCase()]=t[2];t=p[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?s:null},setRequestHeader:function(e,t){var r=e.toLowerCase();return x||(e=v[r]=v[r]||e,g[e]=t),this},overrideMimeType:function(e){return x||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else L.always(e[L.status]);return this},abort:function(e){var t=e||N;return u&&u.abort(t),r(0,t),this}};if(h.promise(L).complete=f.add,L.success=L.done,L.error=L.fail,c.url=((e||c.url||wr)+"").replace(Gr,"").replace(Hr,Mr[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=ot.trim(c.dataType||"*").toLowerCase().match(Nt)||[""],null==c.crossDomain&&(i=Fr.exec(c.url.toLowerCase()),c.crossDomain=!(!i||i[1]===Mr[1]&&i[2]===Mr[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Mr[3]||("http:"===Mr[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=ot.param(c.data,c.traditional)),H(jr,c,t,L),2===x)return L;l=c.global,l&&0===ot.active++&&ot.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Vr.test(c.type),o=c.url,c.hasContent||(c.data&&(o=c.url+=(Dr.test(o)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=kr.test(o)?o.replace(kr,"$1_="+Pr++):o+(Dr.test(o)?"&":"?")+"_="+Pr++)),c.ifModified&&(ot.lastModified[o]&&L.setRequestHeader("If-Modified-Since",ot.lastModified[o]),ot.etag[o]&&L.setRequestHeader("If-None-Match",ot.etag[o])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&L.setRequestHeader("Content-Type",c.contentType),L.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+qr+"; q=0.01":""):c.accepts["*"]);for(n in c.headers)L.setRequestHeader(n,c.headers[n]);if(c.beforeSend&&(c.beforeSend.call(d,L,c)===!1||2===x))return L.abort();N="abort";for(n in{success:1,error:1,complete:1})L[n](c[n]);if(u=H(Wr,c,t,L)){L.readyState=1,l&&E.trigger("ajaxSend",[L,c]),c.async&&c.timeout>0&&(a=setTimeout(function(){L.abort("timeout")},c.timeout));try{x=1,u.send(g,r)}catch(I){if(!(2>x))throw I;r(-1,I)}}else r(-1,"No Transport");return L},getJSON:function(e,t,r){return ot.get(e,t,r,"json")},getScript:function(e,t){return ot.get(e,void 0,t,"script")}}),ot.each(["get","post"],function(e,t){ot[t]=function(e,r,i,n){return ot.isFunction(r)&&(n=n||i,i=r,r=void 0),ot.ajax({url:e,type:t,dataType:n,data:r,success:i})}}),ot.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ot.fn[t]=function(e){return this.on(t,e)}}),ot._evalUrl=function(e){return ot.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ot.fn.extend({wrapAll:function(e){if(ot.isFunction(e))return this.each(function(t){ot(this).wrapAll(e.call(this,t))});if(this[0]){var t=ot(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(ot.isFunction(e)?function(t){ot(this).wrapInner(e.call(this,t))}:function(){var t=ot(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)})},wrap:function(e){var t=ot.isFunction(e);return this.each(function(r){ot(this).wrapAll(t?e.call(this,r):e)})},unwrap:function(){return this.parent().each(function(){ot.nodeName(this,"body")||ot(this).replaceWith(this.childNodes)}).end()}}),ot.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!it.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||ot.css(e,"display"))},ot.expr.filters.visible=function(e){return!ot.expr.filters.hidden(e)};var Xr=/%20/g,Kr=/\[\]$/,Yr=/\r?\n/g,$r=/^(?:submit|button|image|reset|file)$/i,Qr=/^(?:input|select|textarea|keygen)/i;ot.param=function(e,t){var r,i=[],n=function(e,t){t=ot.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ot.ajaxSettings&&ot.ajaxSettings.traditional),ot.isArray(e)||e.jquery&&!ot.isPlainObject(e))ot.each(e,function(){n(this.name,this.value)});else for(r in e)q(r,e[r],t,n);return i.join("&").replace(Xr,"+")},ot.fn.extend({serialize:function(){return ot.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ot.prop(this,"elements");return e?ot.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ot(this).is(":disabled")&&Qr.test(this.nodeName)&&!$r.test(e)&&(this.checked||!Pt.test(e))}).map(function(e,t){var r=ot(this).val();return null==r?null:ot.isArray(r)?ot.map(r,function(e){return{name:t.name,value:e.replace(Yr,"\r\n")}}):{name:t.name,value:r.replace(Yr,"\r\n")}}).get()}}),ot.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&z()||X()}:z;var Zr=0,Jr={},ei=ot.ajaxSettings.xhr();t.ActiveXObject&&ot(t).on("unload",function(){for(var e in Jr)Jr[e](void 0,!0)}),it.cors=!!ei&&"withCredentials"in ei,ei=it.ajax=!!ei,ei&&ot.ajaxTransport(function(e){if(!e.crossDomain||it.cors){var t;return{send:function(r,i){var n,o=e.xhr(),s=++Zr;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(n in e.xhrFields)o[n]=e.xhrFields[n];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(n in r)void 0!==r[n]&&o.setRequestHeader(n,r[n]+"");o.send(e.hasContent&&e.data||null),t=function(r,n){var a,l,u;if(t&&(n||4===o.readyState))if(delete Jr[s],t=void 0,o.onreadystatechange=ot.noop,n)4!==o.readyState&&o.abort();else{u={},a=o.status,"string"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(p){l=""}a||!e.isLocal||e.crossDomain?1223===a&&(a=204):a=u.text?200:404}u&&i(a,l,u,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=Jr[s]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),ot.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ot.globalEval(e),e}}}),ot.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ot.ajaxTransport("script",function(e){if(e.crossDomain){var t,r=ft.head||ot("head")[0]||ft.documentElement;return{send:function(i,n){t=ft.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,r){(r||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,r||n(200,"success"))},r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ti=[],ri=/(=)\?(?=&|$)|\?\?/;ot.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=ti.pop()||ot.expando+"_"+Pr++;return this[e]=!0,e}}),ot.ajaxPrefilter("json jsonp",function(e,r,i){var n,o,s,a=e.jsonp!==!1&&(ri.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ri.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(n=e.jsonpCallback=ot.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(ri,"$1"+n):e.jsonp!==!1&&(e.url+=(Dr.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return s||ot.error(n+" was not called"),s[0]},e.dataTypes[0]="json",o=t[n],t[n]=function(){s=arguments},i.always(function(){t[n]=o,e[n]&&(e.jsonpCallback=r.jsonpCallback,ti.push(n)),s&&ot.isFunction(o)&&o(s[0]),s=o=void 0}),"script"):void 0}),ot.parseHTML=function(e,t,r){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(r=t,t=!1),t=t||ft;var i=dt.exec(e),n=!r&&[];return i?[t.createElement(i[1])]:(i=ot.buildFragment([e],t,n),n&&n.length&&ot(n).remove(),ot.merge([],i.childNodes))};var ii=ot.fn.load;ot.fn.load=function(e,t,r){if("string"!=typeof e&&ii)return ii.apply(this,arguments);var i,n,o,s=this,a=e.indexOf(" ");return a>=0&&(i=ot.trim(e.slice(a,e.length)),e=e.slice(0,a)),ot.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&ot.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){n=arguments,s.html(i?ot("<div>").append(ot.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,n||[e.responseText,t,e])}),this},ot.expr.filters.animated=function(e){return ot.grep(ot.timers,function(t){return e===t.elem}).length};var ni=t.document.documentElement;ot.offset={setOffset:function(e,t,r){var i,n,o,s,a,l,u,p=ot.css(e,"position"),c=ot(e),d={};"static"===p&&(e.style.position="relative"),a=c.offset(),o=ot.css(e,"top"),l=ot.css(e,"left"),u=("absolute"===p||"fixed"===p)&&ot.inArray("auto",[o,l])>-1,u?(i=c.position(),s=i.top,n=i.left):(s=parseFloat(o)||0,n=parseFloat(l)||0),ot.isFunction(t)&&(t=t.call(e,r,a)),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+n),"using"in t?t.using.call(e,d):c.css(d)}},ot.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ot.offset.setOffset(this,e,t)});var t,r,i={top:0,left:0},n=this[0],o=n&&n.ownerDocument;if(o)return t=o.documentElement,ot.contains(t,n)?(typeof n.getBoundingClientRect!==yt&&(i=n.getBoundingClientRect()),r=K(o),{top:i.top+(r.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(r.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i},position:function(){if(this[0]){var e,t,r={top:0,left:0},i=this[0];return"fixed"===ot.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ot.nodeName(e[0],"html")||(r=e.offset()),r.top+=ot.css(e[0],"borderTopWidth",!0),r.left+=ot.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-ot.css(i,"marginTop",!0),left:t.left-r.left-ot.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||ni;e&&!ot.nodeName(e,"html")&&"static"===ot.css(e,"position");)e=e.offsetParent;return e||ni})}}),ot.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var r=/Y/.test(t);ot.fn[e]=function(i){return Ot(this,function(e,i,n){var o=K(e);return void 0===n?o?t in o?o[t]:o.document.documentElement[i]:e[i]:void(o?o.scrollTo(r?ot(o).scrollLeft():n,r?n:ot(o).scrollTop()):e[i]=n)},e,i,arguments.length,null)}}),ot.each(["top","left"],function(e,t){ot.cssHooks[t]=C(it.pixelPosition,function(e,r){return r?(r=rr(e,t),nr.test(r)?ot(e).position()[t]+"px":r):void 0})}),ot.each({Height:"height",Width:"width"},function(e,t){ot.each({padding:"inner"+e,content:t,"":"outer"+e},function(r,i){ot.fn[i]=function(i,n){var o=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||n===!0?"margin":"border");return Ot(this,function(t,r,i){var n;return ot.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(n=t.documentElement,Math.max(t.body["scroll"+e],n["scroll"+e],t.body["offset"+e],n["offset"+e],n["client"+e])):void 0===i?ot.css(t,r,s):ot.style(t,r,i,s)},t,o?i:void 0,o,null)}})}),ot.fn.size=function(){return this.length},ot.fn.andSelf=ot.fn.addBack,"function"==typeof e&&e.amd&&e("jquery",[],function(){return ot});var oi=t.jQuery,si=t.$;return ot.noConflict=function(e){return t.$===ot&&(t.$=si),e&&t.jQuery===ot&&(t.jQuery=oi),ot},typeof r===yt&&(t.jQuery=t.$=ot),ot})},{}],9:[function(e,t){t.exports=e(8)},{}],10:[function(t,r){!function(t){function i(){try{return u in t&&t[u]}catch(e){return!1}}function n(e){return function(){var t=Array.prototype.slice.call(arguments,0);t.unshift(s),c.appendChild(s),s.addBehavior("#default#userData"),s.load(u);var r=e.apply(a,t);return c.removeChild(s),r}}function o(e){return e.replace(/^d/,"___$&").replace(h,"___")}var s,a={},l=t.document,u="localStorage",p="script";if(a.disabled=!1,a.set=function(){},a.get=function(){},a.remove=function(){},a.clear=function(){},a.transact=function(e,t,r){var i=a.get(e);null==r&&(r=t,t=null),"undefined"==typeof i&&(i=t||{}),r(i),a.set(e,i)},a.getAll=function(){},a.forEach=function(){},a.serialize=function(e){return JSON.stringify(e)},a.deserialize=function(e){if("string"!=typeof e)return void 0;try{return JSON.parse(e)}catch(t){return e||void 0}},i())s=t[u],a.set=function(e,t){return void 0===t?a.remove(e):(s.setItem(e,a.serialize(t)),t)},a.get=function(e){return a.deserialize(s.getItem(e))},a.remove=function(e){s.removeItem(e)},a.clear=function(){s.clear()},a.getAll=function(){var e={};return a.forEach(function(t,r){e[t]=r}),e},a.forEach=function(e){for(var t=0;t<s.length;t++){var r=s.key(t);e(r,a.get(r))}};else if(l.documentElement.addBehavior){var c,d;try{d=new ActiveXObject("htmlfile"),d.open(),d.write("<"+p+">document.w=window</"+p+'><iframe src="/favicon.ico"></iframe>'),d.close(),c=d.w.frames[0].document,s=c.createElement("div")}catch(E){s=l.createElement("div"),c=l.body}var h=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");a.set=n(function(e,t,r){return t=o(t),void 0===r?a.remove(t):(e.setAttribute(t,a.serialize(r)),e.save(u),r)}),a.get=n(function(e,t){return t=o(t),a.deserialize(e.getAttribute(t))}),a.remove=n(function(e,t){t=o(t),e.removeAttribute(t),e.save(u)}),a.clear=n(function(e){var t=e.XMLDocument.documentElement.attributes;e.load(u);for(var r,i=0;r=t[i];i++)e.removeAttribute(r.name);e.save(u)}),a.getAll=function(){var e={};return a.forEach(function(t,r){e[t]=r}),e},a.forEach=n(function(e,t){for(var r,i=e.XMLDocument.documentElement.attributes,n=0;r=i[n];++n)t(r.name,a.deserialize(e.getAttribute(r.name)))})}try{var f="__storejs__";a.set(f,f),a.get(f)!=f&&(a.disabled=!0),a.remove(f)}catch(E){a.disabled=!0}a.enabled=!a.disabled,"undefined"!=typeof r&&r.exports&&this.module!==r?r.exports=a:"function"==typeof e&&e.amd?e(a):t.store=a}(Function("return this")())},{}],11:[function(e,t){t.exports=function(t){return e("jquery")(t).closest("[id]").attr("id")}},{jquery:9}],12:[function(e,t){var r=e("jquery"),i=t.exports={cross:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g> <path d="M83.288,88.13c-2.114,2.112-5.575,2.112-7.689,0L53.659,66.188c-2.114-2.112-5.573-2.112-7.687,0L24.251,87.907 c-2.113,2.114-5.571,2.114-7.686,0l-4.693-4.691c-2.114-2.114-2.114-5.573,0-7.688l21.719-21.721c2.113-2.114,2.113-5.573,0-7.686 L11.872,24.4c-2.114-2.113-2.114-5.571,0-7.686l4.842-4.842c2.113-2.114,5.571-2.114,7.686,0L46.12,33.591 c2.114,2.114,5.572,2.114,7.688,0l21.721-21.719c2.114-2.114,5.573-2.114,7.687,0l4.695,4.695c2.111,2.113,2.111,5.571-0.003,7.686 L66.188,45.973c-2.112,2.114-2.112,5.573,0,7.686L88.13,75.602c2.112,2.111,2.112,5.572,0,7.687L83.288,88.13z"/></g></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><path fill="#000000" d="M14.301,49.982l22.606,17.047L84.361,4.903c2.614-3.733,7.76-4.64,11.493-2.026l0.627,0.462 c3.732,2.614,4.64,7.758,2.025,11.492l-51.783,79.77c-1.955,2.791-3.896,3.762-7.301,3.988c-3.405,0.225-5.464-1.039-7.508-3.084 L2.447,61.814c-3.263-3.262-3.263-8.553,0-11.814l0.041-0.019C5.75,46.718,11.039,46.718,14.301,49.982z"/></svg>',unsorted:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="54.552711" height="113.78478" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path7-9" d="m 8.8748339,52.571766 16.9382111,-0.222584 4.050851,-0.06665 15.719154,-0.222166 0.27778,-0.04246 0.43276,0.0017 0.41632,-0.06121 0.37532,-0.0611 0.47132,-0.119342 0.27767,-0.08206 0.55244,-0.198047 0.19707,-0.08043 0.61095,-0.259721 0.0988,-0.05825 0.019,-0.01914 0.59303,-0.356548 0.11787,-0.0788 0.49125,-0.337892 0.17994,-0.139779 0.37317,-0.336871 0.21862,-0.219786 0.31311,-0.31479 0.21993,-0.259387 c 0.92402,-1.126057 1.55249,-2.512251 1.78961,-4.016904 l 0.0573,-0.25754 0.0195,-0.374113 0.0179,-0.454719 0.0175,-0.05874 -0.0169,-0.258049 -0.0225,-0.493503 -0.0398,-0.355569 -0.0619,-0.414201 -0.098,-0.414812 -0.083,-0.353334 L 53.23955,41.1484 53.14185,40.850967 52.93977,40.377742 52.84157,40.161628 34.38021,4.2507375 C 33.211567,1.9401875 31.035446,0.48226552 28.639484,0.11316952 l -0.01843,-0.01834 -0.671963,-0.07882 -0.236871,0.0042 L 27.335984,-4.7826577e-7 27.220736,0.00379952 l -0.398804,0.0025 -0.313848,0.04043 -0.594474,0.07724 -0.09611,0.02147 C 23.424549,0.60716252 21.216017,2.1142355 20.013025,4.4296865 L 0.93967491,40.894479 c -2.08310801,3.997178 -0.588125,8.835482 3.35080799,10.819749 1.165535,0.613495 2.43199,0.88731 3.675026,0.864202 l 0.49845,-0.02325 0.410875,0.01658 z M 9.1502369,43.934401 9.0136999,43.910011 27.164145,9.2564625 44.70942,43.42818 l -14.765289,0.214677 -4.031106,0.0468 -16.7627881,0.244744 z" /></svg>',sortDesc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="54.552711" height="113.78478" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,0.12823506 0.09753,0.02006 c 2.39093,0.458209 4.599455,1.96811104 5.80244,4.28639004 L 52.785897,40.894525 c 2.088044,4.002139 0.590949,8.836902 -3.348692,10.821875 -1.329078,0.688721 -2.766603,0.943695 -4.133174,0.841768 l -0.454018,0.02 L 27.910392,52.354171 23.855313,52.281851 8.14393,52.061827 7.862608,52.021477 7.429856,52.021738 7.014241,51.959818 6.638216,51.900838 6.164776,51.779369 5.889216,51.699439 5.338907,51.500691 5.139719,51.419551 4.545064,51.145023 4.430618,51.105123 4.410168,51.084563 3.817138,50.730843 3.693615,50.647783 3.207314,50.310611 3.028071,50.174369 2.652795,49.833957 2.433471,49.613462 2.140099,49.318523 1.901127,49.041407 C 0.97781,47.916059 0.347935,46.528448 0.11153,45.021676 L 0.05352,44.766255 0.05172,44.371683 0.01894,43.936017 0,43.877277 0.01836,43.62206 0.03666,43.122889 0.0765,42.765905 0.13912,42.352413 0.23568,41.940425 0.32288,41.588517 0.481021,41.151945 0.579391,40.853806 0.77369,40.381268 0.876097,40.162336 19.338869,4.2542801 c 1.172169,-2.308419 3.34759,-3.76846504 5.740829,-4.17716604 l 0.01975,0.01985 0.69605,-0.09573 0.218437,0.0225 0.490791,-0.02132 0.39809,0.0046 0.315972,0.03973 0.594462,0.08149 z" /></svg>',sortAsc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="54.552711" height="113.78478" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,0.70898699,-0.70898699,-0.70522156,97.988199,58.704807)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,113.65778 0.09753,-0.0201 c 2.39093,-0.45821 4.599455,-1.96811 5.80244,-4.28639 L 52.785897,72.891487 c 2.088044,-4.002139 0.590949,-8.836902 -3.348692,-10.821875 -1.329078,-0.688721 -2.766603,-0.943695 -4.133174,-0.841768 l -0.454018,-0.02 -16.939621,0.223997 -4.055079,0.07232 -15.711383,0.220024 -0.281322,0.04035 -0.432752,-2.61e-4 -0.415615,0.06192 -0.376025,0.05898 -0.47344,0.121469 -0.27556,0.07993 -0.550309,0.198748 -0.199188,0.08114 -0.594655,0.274528 -0.114446,0.0399 -0.02045,0.02056 -0.59303,0.35372 -0.123523,0.08306 -0.486301,0.337172 -0.179243,0.136242 -0.375276,0.340412 -0.219324,0.220495 -0.293372,0.294939 -0.238972,0.277116 C 0.97781,65.869953 0.347935,67.257564 0.11153,68.764336 L 0.05352,69.019757 0.05172,69.414329 0.01894,69.849995 0,69.908735 l 0.01836,0.255217 0.0183,0.499171 0.03984,0.356984 0.06262,0.413492 0.09656,0.411988 0.0872,0.351908 0.158141,0.436572 0.09837,0.298139 0.194299,0.472538 0.102407,0.218932 18.462772,35.908054 c 1.172169,2.30842 3.34759,3.76847 5.740829,4.17717 l 0.01975,-0.0199 0.69605,0.0957 0.218437,-0.0225 0.490791,0.0213 0.39809,-0.005 0.315972,-0.0397 0.594462,-0.0815 z" /></svg>',loader:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="100%" height="100%" fill="black"> <circle cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(45 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.125s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(90 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.25s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(135 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.375s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(180 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(225 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.625s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(270 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.75s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(315 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.875s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(180 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle></svg>',query:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"><g id="Layer_1"></g><g id="Layer_2"> <path d="M64.622,2.411H14.995c-6.627,0-12,5.373-12,12v49.897c0,6.627,5.373,12,12,12h49.627c6.627,0,12-5.373,12-12V14.411 C76.622,7.783,71.249,2.411,64.622,2.411z M24.125,63.906V15.093L61,39.168L24.125,63.906z"/></g></svg>',queryInvalid:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 73.627 73.897" enable-background="new 0 0 80 80" xml:space="preserve" ><g id="Layer_1" transform="translate(-2.995,-2.411)" /><g id="Layer_2" transform="translate(-2.995,-2.411)"><path d="M 64.622,2.411 H 14.995 c -6.627,0 -12,5.373 -12,12 v 49.897 c 0,6.627 5.373,12 12,12 h 49.627 c 6.627,0 12,-5.373 12,-12 V 14.411 c 0,-6.628 -5.373,-12 -12,-12 z M 24.125,63.906 V 15.093 L 61,39.168 24.125,63.906 z" id="path6" inkscape:connector-curvature="0" /></g><g transform="matrix(0.76805408,0,0,0.76805408,-0.90231954,-2.0060895)" id="g3"><path style="fill:#c02608;fill-opacity:1" inkscape:connector-curvature="0" d="m 88.184,81.468 c 1.167,1.167 1.167,3.075 0,4.242 l -2.475,2.475 c -1.167,1.167 -3.076,1.167 -4.242,0 l -69.65,-69.65 c -1.167,-1.167 -1.167,-3.076 0,-4.242 l 2.476,-2.476 c 1.167,-1.167 3.076,-1.167 4.242,0 l 69.649,69.651 z" id="path5" /></g><g transform="matrix(0.76805408,0,0,0.76805408,-0.90231954,-2.0060895)" id="g7"><path style="fill:#c02608;fill-opacity:1" inkscape:connector-curvature="0" d="m 18.532,88.184 c -1.167,1.166 -3.076,1.166 -4.242,0 l -2.475,-2.475 c -1.167,-1.166 -1.167,-3.076 0,-4.242 l 69.65,-69.651 c 1.167,-1.167 3.075,-1.167 4.242,0 l 2.476,2.476 c 1.166,1.167 1.166,3.076 0,4.242 l -69.651,69.65 z" id="path9" /></g></svg>',draw:function(e,t){if(e){var n=i.getElement(t); n&&r(e).append(n)}},getElement:function(e){var t=e.id?i[e.id]:e.value;if(t&&0==t.indexOf("<svg")){var n=new DOMParser,o=n.parseFromString(t,"text/xml"),s=o.documentElement;if(e.width&&e.height){var a=r("<div class='svgContainer'></div>").width(e.width).height(e.height);return a.append(s)}return s}return!1}}},{jquery:9}],13:[function(e,t){t.exports={storage:e("./storage.js"),determineId:e("./determineId.js"),imgs:e("./imgs.js")}},{"./determineId.js":11,"./imgs.js":12,"./storage.js":14}],14:[function(e,t){{var r=e("store"),i={day:function(){return 864e5},month:function(){30*i.day()},year:function(){12*i.month()}};t.exports={set:function(e,t,n){"string"==typeof n&&(n=i[n]()),r.set(e,{val:t,exp:n,time:(new Date).getTime()})},get:function(e){var t=r.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}}}},{store:10}],15:[function(e,t){t.exports={name:"yasgui-yasqe",description:"Yet Another SPARQL Query Editor",version:"1.0.0",main:"src/main.js",licenses:[{type:"MIT",url:"https://github.com/LaurensRietveld/yasgui/blob/master/license.txt"}],devDependencies:{gulp:"~3.6.0","vinyl-source-stream":"~0.1.1",watchify:"^0.6.4","gulp-uglify":"^0.2.1","gulp-concat":"^2.2.0","gulp-minify-css":"^0.3.0","gulp-browserify":"^0.5.0","vinyl-buffer":"0.0.0",browserify:"^3.38.1",express:"^3.5.1","connect-livereload":"^0.3.2","gulp-livereload":"^1.3.1","gulp-util":"^2.2.14","gulp-connect":"^2.0.5","gulp-notify":"^1.2.5","gulp-embedlr":"^0.5.2","gulp-changed":"^0.3.0","gulp-imagemin":"^0.2.0","gulp-open":"^0.2.8",connect:"^2.14.4","gulp-debug":"^0.3.0",amplify:"0.0.11","twitter-bootstrap-3.0.0":"^3.0.0","gulp-yuidoc":"^0.1.2","gulp-jsvalidate":"^0.2.0"},bugs:"https://github.com/YASGUI/YASQE/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],homepage:"http://yasgui.github.io/YASQE",maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"todo"},readme:"TODO",dependencies:{jquery:"~ 1.11.0",codemirror:"~4.2.0",amplify:"0.0.11",store:"^1.3.14","twitter-bootstrap-3.0.0":"^3.0.0","browserify-shim":"~3.2.0","yasgui-utils":"~0.0.0"},"browserify-shim":{"twitter-bootstrap-3.0.0":"bootstrap"},browserify:{transform:["browserify-shim"]}}},{}],16:[function(e,t){"use strict";function r(e,t,i){var n=e.getTokenAt({line:t,ch:i.start});return null!=n&&"ws"==n.type&&(n=r(e,t,n)),n}var i=e("jquery"),n=e("codemirror");e("codemirror/addon/hint/show-hint.js"),e("codemirror/addon/search/searchcursor.js"),e("codemirror/addon/edit/matchbrackets.js"),e("codemirror/addon/runmode/runmode.js"),console=console||{log:function(){}},e("../lib/flint.js");var o=e("../lib/trie.js"),s=t.exports=function(e,t){t=a(t);var r=l(n(e,t));return u(r),r},a=function(e){var t=i.extend(!0,{},s.defaults,e);return t},l=function(t){return t.query=function(e){s.executeQuery(t,e)},t.storeBulkCompletions=function(r,i){p[r]=new o;for(var n=0;n<i.length;n++)p[r].insert(i[n]);var s=R(t,t.options.autocompletions[r].persistent);s&&e("yasgui-utils").storage.set(s,i,"month")},t},u=function(t){var r=R(t,t.options.persistent);if(r){var i=e("yasgui-utils").storage.get(r);i&&t.setValue(i)}if(t.options.showQueryButton&&s.drawQueryButton(t),t.on("blur",function(e){s.storeQuery(e)}),t.on("change",function(e){x(e),s.appendPrefixIfNeeded(e),s.updateQueryButton(e)}),t.on("cursorActivity",function(e){s.autoComplete(e,!0)}),t.prevQueryValid=!1,x(t,!0),t.options.autocompletions)for(var n in t.options.autocompletions)t.options.autocompletions[n].bulk&&E(t,n)},p={},c={"string-2":"prefixed",atom:"var"},d=function(e,t){var r=!1;try{void 0!==e[t]&&(r=!0)}catch(i){}return r},E=function(t,r){var i=null;if(d(t.options.autocompletions[r],"get")&&(i=t.options.autocompletions[r].get),i instanceof Array)t.storeBulkCompletions(r,i);else{var n=null;if(R(t,t.options.autocompletions[r].persistent)&&(n=e("yasgui-utils").storage.get(R(t,t.options.autocompletions[r].persistent))),n&&n instanceof Array&&n.length>0)t.storeBulkCompletions(r,n);else if(i instanceof Function){var o=i(t);o&&o instanceof Array&&o.length>0&&t.storeBulkCompletions(r,o)}}},h=function(e){for(var t={},r=e.lineCount(),i=0;r>i;i++){var n=g(e,i);if(null!=n&&"PREFIX"==n.string.toUpperCase()){var o=g(e,i,n.end+1);if(o){var s=g(e,i,o.end+1);if(null!=o&&o.string.length>0&&null!=s&&s.string.length>0){var a=s.string;0==a.indexOf("<")&&(a=a.substring(1)),">"==a.slice(-1)&&(a=a.substring(0,a.length-1)),t[o.string]=a}}}}return t},f=function(e,t){for(var r=null,i=0,n=e.lineCount(),o=0;n>o;o++){var s=g(e,o);null==s||"PREFIX"!=s.string&&"BASE"!=s.string||(r=s,i=o)}if(null==r)e.replaceRange("PREFIX "+t+"\n",{line:0,ch:0});else{var a=m(e,i);e.replaceRange("\n"+a+"PREFIX "+t,{line:i})}},m=function(e,t,r){void 0==r&&(r=1);var i=e.getTokenAt({line:t,ch:r});return null==i||void 0==i||"ws"!=i.type?"":i.string+m(e,t,i.end+1)},g=function(e,t,r){void 0==r&&(r=1);var i=e.getTokenAt({line:t,ch:r});return null==i||void 0==i||i.end<r?null:"ws"==i.type?g(e,t,i.end+1):i},v=null,x=function(e,t){e.queryValid=!0,v&&(v(),v=null),e.clearGutter("gutterErrorBar");for(var r=null,i=0;i<e.lineCount();++i){var n=!1;if(e.prevQueryValid||(n=!0),r=e.getTokenAt({line:i,ch:e.getLine(i).length},n).state,0==r.OK){var o=document.createElement("span");o.innerHTML="&rarr;",o.className="gutterError",e.setGutterMarker(i,"gutterErrorBar",o),v=function(){e.markText({line:i,ch:r.errorStartPos},{line:i,ch:r.errorEndPos},"sp-error")},e.queryValid=!1;break}}if(e.prevQueryValid=e.queryValid,t&&null!=r&&void 0!=r.stack){var s=r.stack,a=r.stack.length;a>1?e.queryValid=!1:1==a&&"solutionModifier"!=s[0]&&"?limitOffsetClauses"!=s[0]&&"?offsetClause"!=s[0]&&(e.queryValid=!1)}};i.extend(s,n),s.drawQueryButton=function(e){var t=40,r=40;i("<div class='yasqe_queryButton'></div>").click(function(){i(this).hasClass("query_busy")?(e.xhr&&e.xhr.abort(),s.updateQueryButton(e)):e.query()}).height(t).width(r).appendTo(i(e.getWrapperElement())),s.updateQueryButton(e)};var N={busy:"loader",valid:"query",error:"queryInvalid"};s.updateQueryButton=function(t,r){var n=i(t.getWrapperElement()).find(".yasqe_queryButton");0!=n.length&&(r||(r="valid",t.queryValid===!1&&(r="error")),r==t.queryStatus||"busy"!=r&&"valid"!=r&&"error"!=r||(n.empty().removeClass(function(e,t){return t.split(" ").filter(function(e){return 0==e.indexOf("query_")}).join(" ")}).addClass("query_"+r).append(e("yasgui-utils").imgs.getElement({id:N[r]})),t.queryStatus=r))},s.fromTextArea=function(e,t){t=a(t);var r=l(n.fromTextArea(e,t));return u(r),r},s.fetchFromPrefixCc=function(e){i.get("http://prefix.cc/popular/all.file.json",function(t){var r=[];for(var i in t)if("bif"!=i){var n=i+": <"+t[i]+">";r.push(n)}e.storeBulkCompletions("prefixes",r)})},s.determineId=function(e){return i(e.getWrapperElement()).closest("[id]").attr("id")},s.storeQuery=function(t){var r=R(t,t.options.persistent);r&&e("yasgui-utils").storage.set(r,t.getValue(),"month")},s.commentLines=function(e){for(var t=e.getCursor(!0).line,r=e.getCursor(!1).line,i=Math.min(t,r),n=Math.max(t,r),o=!0,s=i;n>=s;s++){var a=e.getLine(s);if(0==a.length||"#"!=a.substring(0,1)){o=!1;break}}for(var s=i;n>=s;s++)o?e.replaceRange("",{line:s,ch:0},{line:s,ch:1}):e.replaceRange("#",{line:s,ch:0})},s.copyLineUp=function(e){var t=e.getCursor(),r=e.lineCount();e.replaceRange("\n",{line:r-1,ch:e.getLine(r-1).length});for(var i=r;i>t.line;i--){var n=e.getLine(i-1);e.replaceRange(n,{line:i,ch:0},{line:i,ch:e.getLine(i).length})}},s.copyLineDown=function(e){s.copyLineUp(e);var t=e.getCursor();t.line++,e.setCursor(t)},s.doAutoFormat=function(e){if(e.somethingSelected()){var t={line:e.getCursor(!1).line,ch:e.getSelection().length};b(e,e.getCursor(!0),t)}else{var r=e.lineCount(),i=e.getTextArea().value.length;b(e,{line:0,ch:0},{line:r,ch:i})}},s.executeQuery=function(e,t){var r="function"==typeof t?t:null,n="object"==typeof t?t:{};if(e.options.query&&(n=i.extend({},e.options.query,n)),n.endpoint&&0!=n.endpoint.length){var o={url:n.endpoint,type:n.requestMethod,data:[{name:"query",value:e.getValue()}],headers:{Accept:n.acceptHeader}},a=!1;if(n.handlers)for(var l in n.handlers)n.handlers[l]&&(a=!0,o[l]=n.handlers[l]);if(a||r){if(r&&(o.complete=r),n.namedGraphs&&n.namedGraphs.length>0)for(var u=0;u<n.namedGraphs.length;u++)o.data.push({name:"named-graph-uri",value:n.namedGraphs[u]});if(n.defaultGraphs&&n.defaultGraphs.length>0)for(var u=0;u<n.defaultGraphs.length;u++)o.data.push({name:"default-graph-uri",value:n.defaultGraphs[u]});n.headers&&!i.isEmptyObject(n.headers)&&i.extend(o.headers,n.headers),n.args&&n.args.length>0&&i.merge(o.data,n.args),s.updateQueryButton(e,"busy"),e.xhr=i.ajax(o)}}};var L={};s.showCompletionNotification=function(e,t){e.options.autocompletions[t].autoshow||(L[t]||(L[t]=i("<div class='completionNotification'></div>")),L[t].show().text("Press "+(-1!=navigator.userAgent.indexOf("Mac OS X")?"CMD":"CTRL")+" - <spacebar> to autocomplete").appendTo(i(e.getWrapperElement())))},s.hideCompletionNotification=function(e,t){L[t]&&L[t].hide()};var I={properties:function(e){var t=T(e);if(0==t.string.indexOf("?"))return!1;if(i.inArray("a",t.state.possibleCurrent)>=0)return!0;var n=e.getCursor(),o=r(e,n.line,t);return"rdfs:subPropertyOf"==o.string?!0:!1},classes:function(e){var t=T(e);if(0==t.string.indexOf("?"))return!1;var i=e.getCursor(),n=r(e,i.line,t);return"a"==n.string?!0:"rdf:type"==n.string?!0:"rdfs:domain"==n.string?!0:"rdfs:range"==n.string?!0:!1},prefixes:function(e){var t=e.getCursor(),r=e.getTokenAt(t);if(e.getLine(t.line).length>t.ch)return!1;if("ws"!=r.type&&(r=T(e)),0==!r.string.indexOf("a")&&-1==i.inArray("PNAME_NS",r.state.possibleCurrent))return!1;var n=g(e,t.line);return null==n||"PREFIX"!=n.string.toUpperCase()?!1:!0}};s.autoComplete=function(e,t){if(!e.somethingSelected()&&e.options.autocompletions){var r=function(r){if(t&&(!e.options.autocompletions[r].autoShow||e.options.autocompletions[r].async))return!1;var i={closeCharacters:/(?=a)b/,type:r,completeSingle:!1};e.options.autocompletions[r].async&&(i.async=!0);s.showHint(e,C[r],i);return!0};for(var i in e.options.autocompletions)if(I[i](e)){if(!e.options.autocompletions[i].handlers||!e.options.autocompletions[i].handlers.validPosition||e.options.autocompletions[i].handlers.validPosition(e,i)!==!1){var n=r(i);if(n)break}}else e.options.autocompletions[i].handlers&&e.options.autocompletions[i].handlers.invalidPosition&&e.options.autocompletions[i].handlers.invalidPosition(e,i)}},s.appendPrefixIfNeeded=function(e){if(p.prefixes){var t=e.getCursor(),r=e.getTokenAt(t);if("prefixed"==c[r.type]){var i=r.string.indexOf(":");if(-1!==i){var n=g(e,t.line).string.toUpperCase(),o=e.getTokenAt({line:t.line,ch:r.start});if("PREFIX"!=n&&("ws"==o.type||null==o.type)){var s=r.string.substring(0,i+1),a=h(e);if(null==a[s]){var l=p.prefixes.autoComplete(s);l.length>0&&f(e,l[0])}}}}}};var T=function(e,t,r){r||(r=e.getCursor()),t||(t=e.getTokenAt(r));var i=e.getTokenAt({line:r.line,ch:t.start});return null!=i.type&&"ws"!=i.type?(t.start=i.start,t.string=i.string+t.string,T(e,t,{line:r.line,ch:i.start})):t},y=function(e,t){var r=null;if(t.string.indexOf(":")>-1||0==t.string.indexOf("<")){r={},t=T(e,t);var i=h(e);if(0==!t.string.indexOf("<")&&(r.tokenPrefix=t.string.substring(0,t.string.indexOf(":")+1),null!=i[r.tokenPrefix]&&(r.tokenPrefixUri=i[r.tokenPrefix])),r.uri=t.string,0==!t.string.indexOf("<")&&t.string.indexOf(":")>-1)for(var n in i)if(i.hasOwnProperty(n)&&0==t.string.indexOf(n)){r.uri=i[n],r.uri+=t.string.substring(n.length);break}0==r.uri.indexOf("<")&&(r.uri=r.uri.substring(1)),-1!==r.uri.indexOf(">",r.length-1)&&(r.uri=r.uri.substring(0,r.uri.length-1))}return r},A=function(e,t,r){var i=[];if(p[t])i=p[t].autoComplete(r);else if("function"==typeof e.options.autocompletions[t].get&&0==e.options.autocompletions[t].async)i=e.options.autocompletions[t].get(e,r,t);else if("object"==typeof e.options.autocompletions[t].get)for(var n=r.length,o=0;o<e.options.autocompletions[t].get.length;o++){var s=e.options.autocompletions[t].get[o];s.slice(0,n)==r&&i.push(s)}return i};s.fetchFromLov=function(t,r,n,o){var s=50,a={q:r,page:1};a.type="classes"==n?"class":"property";var l=[],u="",p=function(){u="http://lov.okfn.org/dataset/lov/api/v2/autocomplete/terms?"+i.param(a)};p();var c=function(){a.page++,p()},d=function(){i.get(u,function(e){for(var t=0;t<e.results.length;t++)l.push(e.results[t].uri);l.length<e.total_results&&l.length<s?(c(),d()):(L[n]&&(l.length>0?L[n].hide():L[n].text("0 matches found...")),o(l))}).fail(function(e,t,r){console.log(r)})};L[n]&&L[n].empty().append(i("<span>Fetchting autocompletions &nbsp;</span>")).append(e("yasgui-utils").imgs.getElement({id:"loader",width:"18px",height:"18px"}).css("vertical-align","middle")),d()};var S=function(e,t,r){r.text!=e.getTokenAt(e.getCursor()).string&&e.replaceRange(r.text,t.from,t.to)},C={};C.resourceHints=function(e,t,r){var i=function(r){for(var i=[],l=0;l<r.length;l++){var u=r[l];null!=a.tokenPrefix&&null!=a.uri?(u=u.substring(a.tokenPrefixUri.length),u=a.tokenPrefix+u):u="<"+u+">",i.push({text:u,displayText:u,hint:S,className:t+"Hint"})}var p={completionToken:a.uri,list:i,from:{line:o.line,ch:n.start},to:{line:o.line,ch:n.end}};if(e.options.autocompletions[t].handlers)for(var c in e.options.autocompletions[t].handlers)e.options.autocompletions[t].handlers[c]&&s.on(p,c,e.options.autocompletions[t].handlers[c]);return p},n=T(e),o=e.getCursor(),a=y(e,n);if(a){if(!e.options.autocompletions[t].async)return i(A(e,t,a.uri));var l=function(e){r(i(e))};e.options.autocompletions[t].get(e,a.uri,t,l)}},C.properties=function(e,t){return C.resourceHints(e,"properties",t)},C.classes=function(e,t){return C.resourceHints(e,"classes",t)},C.prefixes=function(e,t){var r="prefixes",i=T(e),n=e.getCursor(),o=function(){i=/\s*/.test(i.string)&&"PREFIX"==e.getTokenAt({line:n.line,ch:i.start}).string.toUpperCase()?{start:n.ch,end:n.ch,string:"",state:i.state}:T(e,i,n)},a=function(t){var o={completionToken:i.uri,list:t,from:{line:n.line,ch:i.start},to:{line:n.line,ch:i.end}};if(e.options.autocompletions[r].handlers)for(var a in e.options.autocompletions[r].handlers)e.options.autocompletions[r].handlers[a]&&s.on(o,a,e.options.autocompletions[r].handlers[a]);return o};if(o(),i){if(!e.options.autocompletions[r].async)return a(A(e,r,i.string));var l=function(e){t(a(e))};e.options.autocompletions[r].get(e,i.uri,r,l)}};var R=function(e,t){var r=null;return t&&(r="string"==typeof t?t:t(e)),r},b=function(e,t,r){var i=e.indexFromPos(t),n=e.indexFromPos(r),o=O(e.getValue(),i,n);e.operation(function(){e.replaceRange(o,t,r);for(var n=e.posFromIndex(i).line,s=e.posFromIndex(i+o.length).line,a=n;s>=a;a++)e.indentLine(a,"smart")})},O=function(e,t,r){e=e.substring(t,r);var o=[["keyword","ws","prefixed","ws","uri"],["keyword","ws","uri"]],s=["{",".",";"],a=["}"],l=function(e){for(var t=0;t<o.length;t++)if(c.valueOf().toString()==o[t].valueOf().toString())return 1;for(var t=0;t<s.length;t++)if(e==s[t])return 1;for(var t=0;t<a.length;t++)if(""!=i.trim(p)&&e==a[t])return-1;return 0},u="",p="",c=[];return n.runMode(e,"sparql11",function(e,t){c.push(t);var r=l(e,t);0!=r?(1==r?(u+=e+"\n",p=""):(u+="\n"+e,p=e),c=[]):(p+=e,u+=e),1==c.length&&"sp-ws"==c[0]&&(c=[])}),i.trim(u.replace(/\n\s*\n/g,"\n"))};s.defaults=i.extend(s.defaults,{mode:"sparql11",value:"SELECT * WHERE {\n ?sub ?pred ?obj .\n} \nLIMIT 10",highlightSelectionMatches:{showToken:/\w/},tabMode:"indent",lineNumbers:!0,gutters:["gutterErrorBar","CodeMirror-linenumbers"],matchBrackets:!0,fixedGutter:!0,extraKeys:{"Ctrl-Space":s.autoComplete,"Cmd-Space":s.autoComplete,"Ctrl-D":s.deleteLine,"Ctrl-K":s.deleteLine,"Cmd-D":s.deleteLine,"Cmd-K":s.deleteLine,"Ctrl-/":s.commentLines,"Cmd-/":s.commentLines,"Ctrl-Alt-Down":s.copyLineDown,"Ctrl-Alt-Up":s.copyLineUp,"Cmd-Alt-Down":s.copyLineDown,"Cmd-Alt-Up":s.copyLineUp,"Shift-Ctrl-F":s.doAutoFormat,"Shift-Cmd-F":s.doAutoFormat,"Ctrl-]":s.indentMore,"Cmd-]":s.indentMore,"Ctrl-[":s.indentLess,"Cmd-[":s.indentLess,"Ctrl-S":s.storeQuery,"Cmd-S":s.storeQuery,"Ctrl-Enter":s.executeQuery,"Cmd-Enter":s.executeQuery},cursorHeight:.9,showQueryButton:!0,persistent:function(e){return"queryVal_"+s.determineId(e)},autocompletions:{prefixes:{get:s.fetchFromPrefixCc,async:!1,bulk:!0,autoShow:!0,autoAddDeclaration:!0,persistent:"prefixes",handlers:{validPosition:null,invalidPosition:null,shown:null,select:null,pick:null,close:null}},properties:{get:s.fetchFromLov,async:!0,bulk:!1,autoShow:!1,persistent:"properties",handlers:{validPosition:s.showCompletionNotification,invalidPosition:s.hideCompletionNotification,shown:function(){console.log("shown")},select:null,pick:null,close:null}},classes:{get:s.fetchFromLov,async:!0,bulk:!1,autoShow:!1,persistent:"classes",handlers:{validPosition:s.showCompletionNotification,invalidPosition:s.hideCompletionNotification,shown:null,select:null,pick:null,close:null}}},query:{endpoint:"http://dbpedia.org/sparql",requestMethod:"GET",acceptHeader:"application/sparql-results+json",namedGraphs:[],defaultGraphs:[],args:[],headers:{},handlers:{beforeSend:null,complete:null,error:null,success:null}}}),s.version={CodeMirror:n.version,YASQE:e("../package.json").version}},{"../lib/flint.js":1,"../lib/trie.js":2,"../package.json":15,codemirror:7,"codemirror/addon/edit/matchbrackets.js":3,"codemirror/addon/hint/show-hint.js":4,"codemirror/addon/runmode/runmode.js":5,"codemirror/addon/search/searchcursor.js":6,jquery:8,"yasgui-utils":13}]},{},[16])(16)});
ajax/libs/zeroclipboard/2.1.5/ZeroClipboard.Core.js
KOLANICH/cdnjs
/*! * 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) 2014 Jon Rohan, James M. Greene * Licensed MIT * http://zeroclipboard.org/ * v2.1.5 */ (function(window, undefined) { "use strict"; /** * Store references to critically important global functions that may be * overridden on certain web pages. */ var _window = window, _document = _window.document, _navigator = _window.navigator, _setTimeout = _window.setTimeout, _encodeURIComponent = _window.encodeURIComponent, _ActiveXObject = _window.ActiveXObject, _Error = _window.Error, _parseInt = _window.Number.parseInt || _window.parseInt, _parseFloat = _window.Number.parseFloat || _window.parseFloat, _isNaN = _window.Number.isNaN || _window.isNaN, _round = _window.Math.round, _now = _window.Date.now, _keys = _window.Object.keys, _defineProperty = _window.Object.defineProperty, _hasOwn = _window.Object.prototype.hasOwnProperty, _slice = _window.Array.prototype.slice, _unwrap = function() { var unwrapper = function(el) { return el; }; if (typeof _window.wrap === "function" && typeof _window.unwrap === "function") { try { var div = _document.createElement("div"); var unwrappedDiv = _window.unwrap(div); if (div.nodeType === 1 && unwrappedDiv && unwrappedDiv.nodeType === 1) { unwrapper = _window.unwrap; } } catch (e) {} } return unwrapper; }(); /** * Convert an `arguments` object into an Array. * * @returns The arguments as an Array * @private */ var _args = function(argumentsObj) { return _slice.call(argumentsObj, 0); }; /** * Shallow-copy the owned, enumerable properties of one object over to another, similar to jQuery's `$.extend`. * * @returns The target object, augmented * @private */ var _extend = function() { var i, len, arg, prop, src, copy, args = _args(arguments), target = args[0] || {}; for (i = 1, len = args.length; i < len; i++) { if ((arg = args[i]) != null) { for (prop in arg) { if (_hasOwn.call(arg, prop)) { src = target[prop]; copy = arg[prop]; if (target !== copy && copy !== undefined) { target[prop] = copy; } } } } } return target; }; /** * Return a deep copy of the source object or array. * * @returns Object or Array * @private */ var _deepCopy = function(source) { var copy, i, len, prop; if (typeof source !== "object" || source == null) { copy = source; } else if (typeof source.length === "number") { copy = []; for (i = 0, len = source.length; i < len; i++) { if (_hasOwn.call(source, i)) { copy[i] = _deepCopy(source[i]); } } } else { copy = {}; for (prop in source) { if (_hasOwn.call(source, prop)) { copy[prop] = _deepCopy(source[prop]); } } } return copy; }; /** * Makes a shallow copy of `obj` (like `_extend`) but filters its properties based on a list of `keys` to keep. * The inverse of `_omit`, mostly. The big difference is that these properties do NOT need to be enumerable to * be kept. * * @returns A new filtered object. * @private */ var _pick = function(obj, keys) { var newObj = {}; for (var i = 0, len = keys.length; i < len; i++) { if (keys[i] in obj) { newObj[keys[i]] = obj[keys[i]]; } } return newObj; }; /** * Makes a shallow copy of `obj` (like `_extend`) but filters its properties based on a list of `keys` to omit. * The inverse of `_pick`. * * @returns A new filtered object. * @private */ var _omit = function(obj, keys) { var newObj = {}; for (var prop in obj) { if (keys.indexOf(prop) === -1) { newObj[prop] = obj[prop]; } } return newObj; }; /** * Remove all owned, enumerable properties from an object. * * @returns The original object without its owned, enumerable properties. * @private */ var _deleteOwnProperties = function(obj) { if (obj) { for (var prop in obj) { if (_hasOwn.call(obj, prop)) { delete obj[prop]; } } } return obj; }; /** * Determine if an element is contained within another element. * * @returns Boolean * @private */ var _containedBy = function(el, ancestorEl) { if (el && el.nodeType === 1 && el.ownerDocument && ancestorEl && (ancestorEl.nodeType === 1 && ancestorEl.ownerDocument && ancestorEl.ownerDocument === el.ownerDocument || ancestorEl.nodeType === 9 && !ancestorEl.ownerDocument && ancestorEl === el.ownerDocument)) { do { if (el === ancestorEl) { return true; } el = el.parentNode; } while (el); } return false; }; /** * Get the URL path's parent directory. * * @returns String or `undefined` * @private */ var _getDirPathOfUrl = function(url) { var dir; if (typeof url === "string" && url) { dir = url.split("#")[0].split("?")[0]; dir = url.slice(0, url.lastIndexOf("/") + 1); } return dir; }; /** * Get the current script's URL by throwing an `Error` and analyzing it. * * @returns String or `undefined` * @private */ var _getCurrentScriptUrlFromErrorStack = function(stack) { var url, matches; if (typeof stack === "string" && stack) { matches = stack.match(/^(?:|[^:@]*@|.+\)@(?=http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/); if (matches && matches[1]) { url = matches[1]; } else { matches = stack.match(/\)@((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/); if (matches && matches[1]) { url = matches[1]; } } } return url; }; /** * Get the current script's URL by throwing an `Error` and analyzing it. * * @returns String or `undefined` * @private */ var _getCurrentScriptUrlFromError = function() { var url, err; try { throw new _Error(); } catch (e) { err = e; } if (err) { url = err.sourceURL || err.fileName || _getCurrentScriptUrlFromErrorStack(err.stack); } return url; }; /** * Get the current script's URL. * * @returns String or `undefined` * @private */ var _getCurrentScriptUrl = function() { var jsPath, scripts, i; if (_document.currentScript && (jsPath = _document.currentScript.src)) { return jsPath; } scripts = _document.getElementsByTagName("script"); if (scripts.length === 1) { return scripts[0].src || undefined; } if ("readyState" in scripts[0]) { for (i = scripts.length; i--; ) { if (scripts[i].readyState === "interactive" && (jsPath = scripts[i].src)) { return jsPath; } } } if (_document.readyState === "loading" && (jsPath = scripts[scripts.length - 1].src)) { return jsPath; } if (jsPath = _getCurrentScriptUrlFromError()) { return jsPath; } return undefined; }; /** * Get the unanimous parent directory of ALL script tags. * If any script tags are either (a) inline or (b) from differing parent * directories, this method must return `undefined`. * * @returns String or `undefined` * @private */ var _getUnanimousScriptParentDir = function() { var i, jsDir, jsPath, scripts = _document.getElementsByTagName("script"); for (i = scripts.length; i--; ) { if (!(jsPath = scripts[i].src)) { jsDir = null; break; } jsPath = _getDirPathOfUrl(jsPath); if (jsDir == null) { jsDir = jsPath; } else if (jsDir !== jsPath) { jsDir = null; break; } } return jsDir || undefined; }; /** * Get the presumed location of the "ZeroClipboard.swf" file, based on the location * of the executing JavaScript file (e.g. "ZeroClipboard.js", etc.). * * @returns String * @private */ var _getDefaultSwfPath = function() { var jsDir = _getDirPathOfUrl(_getCurrentScriptUrl()) || _getUnanimousScriptParentDir() || ""; return jsDir + "ZeroClipboard.swf"; }; /** * Keep track of the state of the Flash object. * @private */ var _flashState = { bridge: null, version: "0.0.0", pluginType: "unknown", disabled: null, outdated: null, unavailable: null, deactivated: null, overdue: null, ready: null }; /** * The minimum Flash Player version required to use ZeroClipboard completely. * @readonly * @private */ var _minimumFlashVersion = "11.0.0"; /** * Keep track of all event listener registrations. * @private */ var _handlers = {}; /** * Keep track of the currently activated element. * @private */ var _currentElement; /** * Keep track of data for the pending clipboard transaction. * @private */ var _clipData = {}; /** * Keep track of data formats for the pending clipboard transaction. * @private */ var _clipDataFormatMap = null; /** * The `message` store for events * @private */ var _eventMessages = { ready: "Flash communication is established", error: { "flash-disabled": "Flash is disabled or not installed", "flash-outdated": "Flash is too outdated to support ZeroClipboard", "flash-unavailable": "Flash is unable to communicate bidirectionally with JavaScript", "flash-deactivated": "Flash is too outdated for your browser and/or is configured as click-to-activate", "flash-overdue": "Flash communication was established but NOT within the acceptable time limit" } }; /** * ZeroClipboard configuration defaults for the Core module. * @private */ var _globalConfig = { swfPath: _getDefaultSwfPath(), trustedDomains: window.location.host ? [ window.location.host ] : [], cacheBust: true, forceEnhancedClipboard: false, flashLoadTimeout: 3e4, autoActivate: true, bubbleEvents: true, containerId: "global-zeroclipboard-html-bridge", containerClass: "global-zeroclipboard-container", swfObjectId: "global-zeroclipboard-flash-bridge", hoverClass: "zeroclipboard-is-hover", activeClass: "zeroclipboard-is-active", forceHandCursor: false, title: null, zIndex: 999999999 }; /** * The underlying implementation of `ZeroClipboard.config`. * @private */ var _config = function(options) { if (typeof options === "object" && options !== null) { for (var prop in options) { if (_hasOwn.call(options, prop)) { if (/^(?:forceHandCursor|title|zIndex|bubbleEvents)$/.test(prop)) { _globalConfig[prop] = options[prop]; } else if (_flashState.bridge == null) { if (prop === "containerId" || prop === "swfObjectId") { if (_isValidHtml4Id(options[prop])) { _globalConfig[prop] = options[prop]; } else { throw new Error("The specified `" + prop + "` value is not valid as an HTML4 Element ID"); } } else { _globalConfig[prop] = options[prop]; } } } } } if (typeof options === "string" && options) { if (_hasOwn.call(_globalConfig, options)) { return _globalConfig[options]; } return; } return _deepCopy(_globalConfig); }; /** * The underlying implementation of `ZeroClipboard.state`. * @private */ var _state = function() { return { browser: _pick(_navigator, [ "userAgent", "platform", "appName" ]), flash: _omit(_flashState, [ "bridge" ]), zeroclipboard: { version: ZeroClipboard.version, config: ZeroClipboard.config() } }; }; /** * The underlying implementation of `ZeroClipboard.isFlashUnusable`. * @private */ var _isFlashUnusable = function() { return !!(_flashState.disabled || _flashState.outdated || _flashState.unavailable || _flashState.deactivated); }; /** * The underlying implementation of `ZeroClipboard.on`. * @private */ var _on = function(eventType, listener) { var i, len, events, added = {}; if (typeof eventType === "string" && eventType) { events = eventType.toLowerCase().split(/\s+/); } else if (typeof eventType === "object" && eventType && typeof listener === "undefined") { for (i in eventType) { if (_hasOwn.call(eventType, i) && typeof i === "string" && i && typeof eventType[i] === "function") { ZeroClipboard.on(i, eventType[i]); } } } if (events && events.length) { for (i = 0, len = events.length; i < len; i++) { eventType = events[i].replace(/^on/, ""); added[eventType] = true; if (!_handlers[eventType]) { _handlers[eventType] = []; } _handlers[eventType].push(listener); } if (added.ready && _flashState.ready) { ZeroClipboard.emit({ type: "ready" }); } if (added.error) { var errorTypes = [ "disabled", "outdated", "unavailable", "deactivated", "overdue" ]; for (i = 0, len = errorTypes.length; i < len; i++) { if (_flashState[errorTypes[i]] === true) { ZeroClipboard.emit({ type: "error", name: "flash-" + errorTypes[i] }); break; } } } } return ZeroClipboard; }; /** * The underlying implementation of `ZeroClipboard.off`. * @private */ var _off = function(eventType, listener) { var i, len, foundIndex, events, perEventHandlers; if (arguments.length === 0) { events = _keys(_handlers); } else if (typeof eventType === "string" && eventType) { events = eventType.split(/\s+/); } else if (typeof eventType === "object" && eventType && typeof listener === "undefined") { for (i in eventType) { if (_hasOwn.call(eventType, i) && typeof i === "string" && i && typeof eventType[i] === "function") { ZeroClipboard.off(i, eventType[i]); } } } if (events && events.length) { for (i = 0, len = events.length; i < len; i++) { eventType = events[i].toLowerCase().replace(/^on/, ""); perEventHandlers = _handlers[eventType]; if (perEventHandlers && perEventHandlers.length) { if (listener) { foundIndex = perEventHandlers.indexOf(listener); while (foundIndex !== -1) { perEventHandlers.splice(foundIndex, 1); foundIndex = perEventHandlers.indexOf(listener, foundIndex); } } else { perEventHandlers.length = 0; } } } } return ZeroClipboard; }; /** * The underlying implementation of `ZeroClipboard.handlers`. * @private */ var _listeners = function(eventType) { var copy; if (typeof eventType === "string" && eventType) { copy = _deepCopy(_handlers[eventType]) || null; } else { copy = _deepCopy(_handlers); } return copy; }; /** * The underlying implementation of `ZeroClipboard.emit`. * @private */ var _emit = function(event) { var eventCopy, returnVal, tmp; event = _createEvent(event); if (!event) { return; } if (_preprocessEvent(event)) { return; } if (event.type === "ready" && _flashState.overdue === true) { return ZeroClipboard.emit({ type: "error", name: "flash-overdue" }); } eventCopy = _extend({}, event); _dispatchCallbacks.call(this, eventCopy); if (event.type === "copy") { tmp = _mapClipDataToFlash(_clipData); returnVal = tmp.data; _clipDataFormatMap = tmp.formatMap; } return returnVal; }; /** * The underlying implementation of `ZeroClipboard.create`. * @private */ var _create = function() { if (typeof _flashState.ready !== "boolean") { _flashState.ready = false; } if (!ZeroClipboard.isFlashUnusable() && _flashState.bridge === null) { var maxWait = _globalConfig.flashLoadTimeout; if (typeof maxWait === "number" && maxWait >= 0) { _setTimeout(function() { if (typeof _flashState.deactivated !== "boolean") { _flashState.deactivated = true; } if (_flashState.deactivated === true) { ZeroClipboard.emit({ type: "error", name: "flash-deactivated" }); } }, maxWait); } _flashState.overdue = false; _embedSwf(); } }; /** * The underlying implementation of `ZeroClipboard.destroy`. * @private */ var _destroy = function() { ZeroClipboard.clearData(); ZeroClipboard.blur(); ZeroClipboard.emit("destroy"); _unembedSwf(); ZeroClipboard.off(); }; /** * The underlying implementation of `ZeroClipboard.setData`. * @private */ var _setData = function(format, data) { var dataObj; if (typeof format === "object" && format && typeof data === "undefined") { dataObj = format; ZeroClipboard.clearData(); } else if (typeof format === "string" && format) { dataObj = {}; dataObj[format] = data; } else { return; } for (var dataFormat in dataObj) { if (typeof dataFormat === "string" && dataFormat && _hasOwn.call(dataObj, dataFormat) && typeof dataObj[dataFormat] === "string" && dataObj[dataFormat]) { _clipData[dataFormat] = dataObj[dataFormat]; } } }; /** * The underlying implementation of `ZeroClipboard.clearData`. * @private */ var _clearData = function(format) { if (typeof format === "undefined") { _deleteOwnProperties(_clipData); _clipDataFormatMap = null; } else if (typeof format === "string" && _hasOwn.call(_clipData, format)) { delete _clipData[format]; } }; /** * The underlying implementation of `ZeroClipboard.getData`. * @private */ var _getData = function(format) { if (typeof format === "undefined") { return _deepCopy(_clipData); } else if (typeof format === "string" && _hasOwn.call(_clipData, format)) { return _clipData[format]; } }; /** * The underlying implementation of `ZeroClipboard.focus`/`ZeroClipboard.activate`. * @private */ var _focus = function(element) { if (!(element && element.nodeType === 1)) { return; } if (_currentElement) { _removeClass(_currentElement, _globalConfig.activeClass); if (_currentElement !== element) { _removeClass(_currentElement, _globalConfig.hoverClass); } } _currentElement = element; _addClass(element, _globalConfig.hoverClass); var newTitle = element.getAttribute("title") || _globalConfig.title; if (typeof newTitle === "string" && newTitle) { var htmlBridge = _getHtmlBridge(_flashState.bridge); if (htmlBridge) { htmlBridge.setAttribute("title", newTitle); } } var useHandCursor = _globalConfig.forceHandCursor === true || _getStyle(element, "cursor") === "pointer"; _setHandCursor(useHandCursor); _reposition(); }; /** * The underlying implementation of `ZeroClipboard.blur`/`ZeroClipboard.deactivate`. * @private */ var _blur = function() { var htmlBridge = _getHtmlBridge(_flashState.bridge); if (htmlBridge) { htmlBridge.removeAttribute("title"); htmlBridge.style.left = "0px"; htmlBridge.style.top = "-9999px"; htmlBridge.style.width = "1px"; htmlBridge.style.top = "1px"; } if (_currentElement) { _removeClass(_currentElement, _globalConfig.hoverClass); _removeClass(_currentElement, _globalConfig.activeClass); _currentElement = null; } }; /** * The underlying implementation of `ZeroClipboard.activeElement`. * @private */ var _activeElement = function() { return _currentElement || null; }; /** * Check if a value is a valid HTML4 `ID` or `Name` token. * @private */ var _isValidHtml4Id = function(id) { return typeof id === "string" && id && /^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(id); }; /** * Create or update an `event` object, based on the `eventType`. * @private */ var _createEvent = function(event) { var eventType; if (typeof event === "string" && event) { eventType = event; event = {}; } else if (typeof event === "object" && event && typeof event.type === "string" && event.type) { eventType = event.type; } if (!eventType) { return; } _extend(event, { type: eventType.toLowerCase(), target: event.target || _currentElement || null, relatedTarget: event.relatedTarget || null, currentTarget: _flashState && _flashState.bridge || null, timeStamp: event.timeStamp || _now() || null }); var msg = _eventMessages[event.type]; if (event.type === "error" && event.name && msg) { msg = msg[event.name]; } if (msg) { event.message = msg; } if (event.type === "ready") { _extend(event, { target: null, version: _flashState.version }); } if (event.type === "error") { if (/^flash-(disabled|outdated|unavailable|deactivated|overdue)$/.test(event.name)) { _extend(event, { target: null, minimumVersion: _minimumFlashVersion }); } if (/^flash-(outdated|unavailable|deactivated|overdue)$/.test(event.name)) { _extend(event, { version: _flashState.version }); } } if (event.type === "copy") { event.clipboardData = { setData: ZeroClipboard.setData, clearData: ZeroClipboard.clearData }; } if (event.type === "aftercopy") { event = _mapClipResultsFromFlash(event, _clipDataFormatMap); } if (event.target && !event.relatedTarget) { event.relatedTarget = _getRelatedTarget(event.target); } event = _addMouseData(event); return event; }; /** * Get a relatedTarget from the target's `data-clipboard-target` attribute * @private */ var _getRelatedTarget = function(targetEl) { var relatedTargetId = targetEl && targetEl.getAttribute && targetEl.getAttribute("data-clipboard-target"); return relatedTargetId ? _document.getElementById(relatedTargetId) : null; }; /** * Add element and position data to `MouseEvent` instances * @private */ var _addMouseData = function(event) { if (event && /^_(?:click|mouse(?:over|out|down|up|move))$/.test(event.type)) { var srcElement = event.target; var fromElement = event.type === "_mouseover" && event.relatedTarget ? event.relatedTarget : undefined; var toElement = event.type === "_mouseout" && event.relatedTarget ? event.relatedTarget : undefined; var pos = _getDOMObjectPosition(srcElement); var screenLeft = _window.screenLeft || _window.screenX || 0; var screenTop = _window.screenTop || _window.screenY || 0; var scrollLeft = _document.body.scrollLeft + _document.documentElement.scrollLeft; var scrollTop = _document.body.scrollTop + _document.documentElement.scrollTop; var pageX = pos.left + (typeof event._stageX === "number" ? event._stageX : 0); var pageY = pos.top + (typeof event._stageY === "number" ? event._stageY : 0); var clientX = pageX - scrollLeft; var clientY = pageY - scrollTop; var screenX = screenLeft + clientX; var screenY = screenTop + clientY; var moveX = typeof event.movementX === "number" ? event.movementX : 0; var moveY = typeof event.movementY === "number" ? event.movementY : 0; delete event._stageX; delete event._stageY; _extend(event, { srcElement: srcElement, fromElement: fromElement, toElement: toElement, screenX: screenX, screenY: screenY, pageX: pageX, pageY: pageY, clientX: clientX, clientY: clientY, x: clientX, y: clientY, movementX: moveX, movementY: moveY, offsetX: 0, offsetY: 0, layerX: 0, layerY: 0 }); } return event; }; /** * Determine if an event's registered handlers should be execute synchronously or asynchronously. * * @returns {boolean} * @private */ var _shouldPerformAsync = function(event) { var eventType = event && typeof event.type === "string" && event.type || ""; return !/^(?:(?:before)?copy|destroy)$/.test(eventType); }; /** * Control if a callback should be executed asynchronously or not. * * @returns `undefined` * @private */ var _dispatchCallback = function(func, context, args, async) { if (async) { _setTimeout(function() { func.apply(context, args); }, 0); } else { func.apply(context, args); } }; /** * Handle the actual dispatching of events to client instances. * * @returns `undefined` * @private */ var _dispatchCallbacks = function(event) { if (!(typeof event === "object" && event && event.type)) { return; } var async = _shouldPerformAsync(event); var wildcardTypeHandlers = _handlers["*"] || []; var specificTypeHandlers = _handlers[event.type] || []; var handlers = wildcardTypeHandlers.concat(specificTypeHandlers); if (handlers && handlers.length) { var i, len, func, context, eventCopy, originalContext = this; for (i = 0, len = handlers.length; i < len; i++) { func = handlers[i]; context = originalContext; if (typeof func === "string" && typeof _window[func] === "function") { func = _window[func]; } if (typeof func === "object" && func && typeof func.handleEvent === "function") { context = func; func = func.handleEvent; } if (typeof func === "function") { eventCopy = _extend({}, event); _dispatchCallback(func, context, [ eventCopy ], async); } } } return this; }; /** * Preprocess any special behaviors, reactions, or state changes after receiving this event. * Executes only once per event emitted, NOT once per client. * @private */ var _preprocessEvent = function(event) { var element = event.target || _currentElement || null; var sourceIsSwf = event._source === "swf"; delete event._source; var flashErrorNames = [ "flash-disabled", "flash-outdated", "flash-unavailable", "flash-deactivated", "flash-overdue" ]; switch (event.type) { case "error": if (flashErrorNames.indexOf(event.name) !== -1) { _extend(_flashState, { disabled: event.name === "flash-disabled", outdated: event.name === "flash-outdated", unavailable: event.name === "flash-unavailable", deactivated: event.name === "flash-deactivated", overdue: event.name === "flash-overdue", ready: false }); } break; case "ready": var wasDeactivated = _flashState.deactivated === true; _extend(_flashState, { disabled: false, outdated: false, unavailable: false, deactivated: false, overdue: wasDeactivated, ready: !wasDeactivated }); break; case "copy": var textContent, htmlContent, targetEl = event.relatedTarget; if (!(_clipData["text/html"] || _clipData["text/plain"]) && targetEl && (htmlContent = targetEl.value || targetEl.outerHTML || targetEl.innerHTML) && (textContent = targetEl.value || targetEl.textContent || targetEl.innerText)) { event.clipboardData.clearData(); event.clipboardData.setData("text/plain", textContent); if (htmlContent !== textContent) { event.clipboardData.setData("text/html", htmlContent); } } else if (!_clipData["text/plain"] && event.target && (textContent = event.target.getAttribute("data-clipboard-text"))) { event.clipboardData.clearData(); event.clipboardData.setData("text/plain", textContent); } break; case "aftercopy": ZeroClipboard.clearData(); if (element && element !== _safeActiveElement() && element.focus) { element.focus(); } break; case "_mouseover": ZeroClipboard.focus(element); if (_globalConfig.bubbleEvents === true && sourceIsSwf) { if (element && element !== event.relatedTarget && !_containedBy(event.relatedTarget, element)) { _fireMouseEvent(_extend({}, event, { type: "mouseenter", bubbles: false, cancelable: false })); } _fireMouseEvent(_extend({}, event, { type: "mouseover" })); } break; case "_mouseout": ZeroClipboard.blur(); if (_globalConfig.bubbleEvents === true && sourceIsSwf) { if (element && element !== event.relatedTarget && !_containedBy(event.relatedTarget, element)) { _fireMouseEvent(_extend({}, event, { type: "mouseleave", bubbles: false, cancelable: false })); } _fireMouseEvent(_extend({}, event, { type: "mouseout" })); } break; case "_mousedown": _addClass(element, _globalConfig.activeClass); if (_globalConfig.bubbleEvents === true && sourceIsSwf) { _fireMouseEvent(_extend({}, event, { type: event.type.slice(1) })); } break; case "_mouseup": _removeClass(element, _globalConfig.activeClass); if (_globalConfig.bubbleEvents === true && sourceIsSwf) { _fireMouseEvent(_extend({}, event, { type: event.type.slice(1) })); } break; case "_click": case "_mousemove": if (_globalConfig.bubbleEvents === true && sourceIsSwf) { _fireMouseEvent(_extend({}, event, { type: event.type.slice(1) })); } break; } if (/^_(?:click|mouse(?:over|out|down|up|move))$/.test(event.type)) { return true; } }; /** * Dispatch a synthetic MouseEvent. * * @returns `undefined` * @private */ var _fireMouseEvent = function(event) { if (!(event && typeof event.type === "string" && event)) { return; } var e, target = event.target || null, doc = target && target.ownerDocument || _document, defaults = { view: doc.defaultView || _window, canBubble: true, cancelable: true, detail: event.type === "click" ? 1 : 0, button: typeof event.which === "number" ? event.which - 1 : typeof event.button === "number" ? event.button : doc.createEvent ? 0 : 1 }, args = _extend(defaults, event); if (!target) { return; } if (doc.createEvent && target.dispatchEvent) { args = [ args.type, args.canBubble, args.cancelable, args.view, args.detail, args.screenX, args.screenY, args.clientX, args.clientY, args.ctrlKey, args.altKey, args.shiftKey, args.metaKey, args.button, args.relatedTarget ]; e = doc.createEvent("MouseEvents"); if (e.initMouseEvent) { e.initMouseEvent.apply(e, args); e._source = "js"; target.dispatchEvent(e); } } }; /** * Create the HTML bridge element to embed the Flash object into. * @private */ var _createHtmlBridge = function() { var container = _document.createElement("div"); container.id = _globalConfig.containerId; container.className = _globalConfig.containerClass; container.style.position = "absolute"; container.style.left = "0px"; container.style.top = "-9999px"; container.style.width = "1px"; container.style.height = "1px"; container.style.zIndex = "" + _getSafeZIndex(_globalConfig.zIndex); return container; }; /** * Get the HTML element container that wraps the Flash bridge object/element. * @private */ var _getHtmlBridge = function(flashBridge) { var htmlBridge = flashBridge && flashBridge.parentNode; while (htmlBridge && htmlBridge.nodeName === "OBJECT" && htmlBridge.parentNode) { htmlBridge = htmlBridge.parentNode; } return htmlBridge || null; }; /** * Create the SWF object. * * @returns The SWF object reference. * @private */ var _embedSwf = function() { var len, flashBridge = _flashState.bridge, container = _getHtmlBridge(flashBridge); if (!flashBridge) { var allowScriptAccess = _determineScriptAccess(_window.location.host, _globalConfig); var allowNetworking = allowScriptAccess === "never" ? "none" : "all"; var flashvars = _vars(_globalConfig); var swfUrl = _globalConfig.swfPath + _cacheBust(_globalConfig.swfPath, _globalConfig); container = _createHtmlBridge(); var divToBeReplaced = _document.createElement("div"); container.appendChild(divToBeReplaced); _document.body.appendChild(container); var tmpDiv = _document.createElement("div"); var oldIE = _flashState.pluginType === "activex"; tmpDiv.innerHTML = '<object id="' + _globalConfig.swfObjectId + '" name="' + _globalConfig.swfObjectId + '" ' + 'width="100%" height="100%" ' + (oldIE ? 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"' : 'type="application/x-shockwave-flash" data="' + swfUrl + '"') + ">" + (oldIE ? '<param name="movie" value="' + swfUrl + '"/>' : "") + '<param name="allowScriptAccess" value="' + allowScriptAccess + '"/>' + '<param name="allowNetworking" value="' + allowNetworking + '"/>' + '<param name="menu" value="false"/>' + '<param name="wmode" value="transparent"/>' + '<param name="flashvars" value="' + flashvars + '"/>' + "</object>"; flashBridge = tmpDiv.firstChild; tmpDiv = null; _unwrap(flashBridge).ZeroClipboard = ZeroClipboard; container.replaceChild(flashBridge, divToBeReplaced); } if (!flashBridge) { flashBridge = _document[_globalConfig.swfObjectId]; if (flashBridge && (len = flashBridge.length)) { flashBridge = flashBridge[len - 1]; } if (!flashBridge && container) { flashBridge = container.firstChild; } } _flashState.bridge = flashBridge || null; return flashBridge; }; /** * Destroy the SWF object. * @private */ var _unembedSwf = function() { var flashBridge = _flashState.bridge; if (flashBridge) { var htmlBridge = _getHtmlBridge(flashBridge); if (htmlBridge) { if (_flashState.pluginType === "activex" && "readyState" in flashBridge) { flashBridge.style.display = "none"; (function removeSwfFromIE() { if (flashBridge.readyState === 4) { for (var prop in flashBridge) { if (typeof flashBridge[prop] === "function") { flashBridge[prop] = null; } } if (flashBridge.parentNode) { flashBridge.parentNode.removeChild(flashBridge); } if (htmlBridge.parentNode) { htmlBridge.parentNode.removeChild(htmlBridge); } } else { _setTimeout(removeSwfFromIE, 10); } })(); } else { if (flashBridge.parentNode) { flashBridge.parentNode.removeChild(flashBridge); } if (htmlBridge.parentNode) { htmlBridge.parentNode.removeChild(htmlBridge); } } } _flashState.ready = null; _flashState.bridge = null; _flashState.deactivated = null; } }; /** * Map the data format names of the "clipData" to Flash-friendly names. * * @returns A new transformed object. * @private */ var _mapClipDataToFlash = function(clipData) { var newClipData = {}, formatMap = {}; if (!(typeof clipData === "object" && clipData)) { return; } for (var dataFormat in clipData) { if (dataFormat && _hasOwn.call(clipData, dataFormat) && typeof clipData[dataFormat] === "string" && clipData[dataFormat]) { switch (dataFormat.toLowerCase()) { case "text/plain": case "text": case "air:text": case "flash:text": newClipData.text = clipData[dataFormat]; formatMap.text = dataFormat; break; case "text/html": case "html": case "air:html": case "flash:html": newClipData.html = clipData[dataFormat]; formatMap.html = dataFormat; break; case "application/rtf": case "text/rtf": case "rtf": case "richtext": case "air:rtf": case "flash:rtf": newClipData.rtf = clipData[dataFormat]; formatMap.rtf = dataFormat; break; default: break; } } } return { data: newClipData, formatMap: formatMap }; }; /** * Map the data format names from Flash-friendly names back to their original "clipData" names (via a format mapping). * * @returns A new transformed object. * @private */ var _mapClipResultsFromFlash = function(clipResults, formatMap) { if (!(typeof clipResults === "object" && clipResults && typeof formatMap === "object" && formatMap)) { return clipResults; } var newResults = {}; for (var prop in clipResults) { if (_hasOwn.call(clipResults, prop)) { if (prop !== "success" && prop !== "data") { newResults[prop] = clipResults[prop]; continue; } newResults[prop] = {}; var tmpHash = clipResults[prop]; for (var dataFormat in tmpHash) { if (dataFormat && _hasOwn.call(tmpHash, dataFormat) && _hasOwn.call(formatMap, dataFormat)) { newResults[prop][formatMap[dataFormat]] = tmpHash[dataFormat]; } } } } return newResults; }; /** * Will look at a path, and will create a "?noCache={time}" or "&noCache={time}" * query param string to return. Does NOT append that string to the original path. * This is useful because ExternalInterface often breaks when a Flash SWF is cached. * * @returns The `noCache` query param with necessary "?"/"&" prefix. * @private */ var _cacheBust = function(path, options) { var cacheBust = options == null || options && options.cacheBust === true; if (cacheBust) { return (path.indexOf("?") === -1 ? "?" : "&") + "noCache=" + _now(); } else { return ""; } }; /** * Creates a query string for the FlashVars param. * Does NOT include the cache-busting query param. * * @returns FlashVars query string * @private */ var _vars = function(options) { var i, len, domain, domains, str = "", trustedOriginsExpanded = []; if (options.trustedDomains) { if (typeof options.trustedDomains === "string") { domains = [ options.trustedDomains ]; } else if (typeof options.trustedDomains === "object" && "length" in options.trustedDomains) { domains = options.trustedDomains; } } if (domains && domains.length) { for (i = 0, len = domains.length; i < len; i++) { if (_hasOwn.call(domains, i) && domains[i] && typeof domains[i] === "string") { domain = _extractDomain(domains[i]); if (!domain) { continue; } if (domain === "*") { trustedOriginsExpanded.length = 0; trustedOriginsExpanded.push(domain); break; } trustedOriginsExpanded.push.apply(trustedOriginsExpanded, [ domain, "//" + domain, _window.location.protocol + "//" + domain ]); } } } if (trustedOriginsExpanded.length) { str += "trustedOrigins=" + _encodeURIComponent(trustedOriginsExpanded.join(",")); } if (options.forceEnhancedClipboard === true) { str += (str ? "&" : "") + "forceEnhancedClipboard=true"; } if (typeof options.swfObjectId === "string" && options.swfObjectId) { str += (str ? "&" : "") + "swfObjectId=" + _encodeURIComponent(options.swfObjectId); } return str; }; /** * Extract the domain (e.g. "github.com") from an origin (e.g. "https://github.com") or * URL (e.g. "https://github.com/zeroclipboard/zeroclipboard/"). * * @returns the domain * @private */ var _extractDomain = function(originOrUrl) { if (originOrUrl == null || originOrUrl === "") { return null; } originOrUrl = originOrUrl.replace(/^\s+|\s+$/g, ""); if (originOrUrl === "") { return null; } var protocolIndex = originOrUrl.indexOf("//"); originOrUrl = protocolIndex === -1 ? originOrUrl : originOrUrl.slice(protocolIndex + 2); var pathIndex = originOrUrl.indexOf("/"); originOrUrl = pathIndex === -1 ? originOrUrl : protocolIndex === -1 || pathIndex === 0 ? null : originOrUrl.slice(0, pathIndex); if (originOrUrl && originOrUrl.slice(-4).toLowerCase() === ".swf") { return null; } return originOrUrl || null; }; /** * Set `allowScriptAccess` based on `trustedDomains` and `window.location.host` vs. `swfPath`. * * @returns The appropriate script access level. * @private */ var _determineScriptAccess = function() { var _extractAllDomains = function(origins) { var i, len, tmp, resultsArray = []; if (typeof origins === "string") { origins = [ origins ]; } if (!(typeof origins === "object" && origins && typeof origins.length === "number")) { return resultsArray; } for (i = 0, len = origins.length; i < len; i++) { if (_hasOwn.call(origins, i) && (tmp = _extractDomain(origins[i]))) { if (tmp === "*") { resultsArray.length = 0; resultsArray.push("*"); break; } if (resultsArray.indexOf(tmp) === -1) { resultsArray.push(tmp); } } } return resultsArray; }; return function(currentDomain, configOptions) { var swfDomain = _extractDomain(configOptions.swfPath); if (swfDomain === null) { swfDomain = currentDomain; } var trustedDomains = _extractAllDomains(configOptions.trustedDomains); var len = trustedDomains.length; if (len > 0) { if (len === 1 && trustedDomains[0] === "*") { return "always"; } if (trustedDomains.indexOf(currentDomain) !== -1) { if (len === 1 && currentDomain === swfDomain) { return "sameDomain"; } return "always"; } } return "never"; }; }(); /** * Get the currently active/focused DOM element. * * @returns the currently active/focused element, or `null` * @private */ var _safeActiveElement = function() { try { return _document.activeElement; } catch (err) { return null; } }; /** * Add a class to an element, if it doesn't already have it. * * @returns The element, with its new class added. * @private */ var _addClass = function(element, value) { if (!element || element.nodeType !== 1) { return element; } if (element.classList) { if (!element.classList.contains(value)) { element.classList.add(value); } return element; } if (value && typeof value === "string") { var classNames = (value || "").split(/\s+/); if (element.nodeType === 1) { if (!element.className) { element.className = value; } else { var className = " " + element.className + " ", setClass = element.className; for (var c = 0, cl = classNames.length; c < cl; c++) { if (className.indexOf(" " + classNames[c] + " ") < 0) { setClass += " " + classNames[c]; } } element.className = setClass.replace(/^\s+|\s+$/g, ""); } } } return element; }; /** * Remove a class from an element, if it has it. * * @returns The element, with its class removed. * @private */ var _removeClass = function(element, value) { if (!element || element.nodeType !== 1) { return element; } if (element.classList) { if (element.classList.contains(value)) { element.classList.remove(value); } return element; } if (typeof value === "string" && value) { var classNames = value.split(/\s+/); if (element.nodeType === 1 && element.className) { var className = (" " + element.className + " ").replace(/[\n\t]/g, " "); for (var c = 0, cl = classNames.length; c < cl; c++) { className = className.replace(" " + classNames[c] + " ", " "); } element.className = className.replace(/^\s+|\s+$/g, ""); } } return element; }; /** * Attempt to interpret the element's CSS styling. If `prop` is `"cursor"`, * then we assume that it should be a hand ("pointer") cursor if the element * is an anchor element ("a" tag). * * @returns The computed style property. * @private */ var _getStyle = function(el, prop) { var value = _window.getComputedStyle(el, null).getPropertyValue(prop); if (prop === "cursor") { if (!value || value === "auto") { if (el.nodeName === "A") { return "pointer"; } } } return value; }; /** * Get the zoom factor of the browser. Always returns `1.0`, except at * non-default zoom levels in IE<8 and some older versions of WebKit. * * @returns Floating unit percentage of the zoom factor (e.g. 150% = `1.5`). * @private */ var _getZoomFactor = function() { var rect, physicalWidth, logicalWidth, zoomFactor = 1; if (typeof _document.body.getBoundingClientRect === "function") { rect = _document.body.getBoundingClientRect(); physicalWidth = rect.right - rect.left; logicalWidth = _document.body.offsetWidth; zoomFactor = _round(physicalWidth / logicalWidth * 100) / 100; } return zoomFactor; }; /** * Get the DOM positioning info of an element. * * @returns Object containing the element's position, width, and height. * @private */ var _getDOMObjectPosition = function(obj) { var info = { left: 0, top: 0, width: 0, height: 0 }; if (obj.getBoundingClientRect) { var rect = obj.getBoundingClientRect(); var pageXOffset, pageYOffset, zoomFactor; if ("pageXOffset" in _window && "pageYOffset" in _window) { pageXOffset = _window.pageXOffset; pageYOffset = _window.pageYOffset; } else { zoomFactor = _getZoomFactor(); pageXOffset = _round(_document.documentElement.scrollLeft / zoomFactor); pageYOffset = _round(_document.documentElement.scrollTop / zoomFactor); } var leftBorderWidth = _document.documentElement.clientLeft || 0; var topBorderWidth = _document.documentElement.clientTop || 0; info.left = rect.left + pageXOffset - leftBorderWidth; info.top = rect.top + pageYOffset - topBorderWidth; info.width = "width" in rect ? rect.width : rect.right - rect.left; info.height = "height" in rect ? rect.height : rect.bottom - rect.top; } return info; }; /** * Reposition the Flash object to cover the currently activated element. * * @returns `undefined` * @private */ var _reposition = function() { var htmlBridge; if (_currentElement && (htmlBridge = _getHtmlBridge(_flashState.bridge))) { var pos = _getDOMObjectPosition(_currentElement); _extend(htmlBridge.style, { width: pos.width + "px", height: pos.height + "px", top: pos.top + "px", left: pos.left + "px", zIndex: "" + _getSafeZIndex(_globalConfig.zIndex) }); } }; /** * Sends a signal to the Flash object to display the hand cursor if `true`. * * @returns `undefined` * @private */ var _setHandCursor = function(enabled) { if (_flashState.ready === true) { if (_flashState.bridge && typeof _flashState.bridge.setHandCursor === "function") { _flashState.bridge.setHandCursor(enabled); } else { _flashState.ready = false; } } }; /** * Get a safe value for `zIndex` * * @returns an integer, or "auto" * @private */ var _getSafeZIndex = function(val) { if (/^(?:auto|inherit)$/.test(val)) { return val; } var zIndex; if (typeof val === "number" && !_isNaN(val)) { zIndex = val; } else if (typeof val === "string") { zIndex = _getSafeZIndex(_parseInt(val, 10)); } return typeof zIndex === "number" ? zIndex : "auto"; }; /** * Detect the Flash Player status, version, and plugin type. * * @see {@link https://code.google.com/p/doctype-mirror/wiki/ArticleDetectFlash#The_code} * @see {@link http://stackoverflow.com/questions/12866060/detecting-pepper-ppapi-flash-with-javascript} * * @returns `undefined` * @private */ var _detectFlashSupport = function(ActiveXObject) { var plugin, ax, mimeType, hasFlash = false, isActiveX = false, isPPAPI = false, flashVersion = ""; /** * Derived from Apple's suggested sniffer. * @param {String} desc e.g. "Shockwave Flash 7.0 r61" * @returns {String} "7.0.61" * @private */ function parseFlashVersion(desc) { var matches = desc.match(/[\d]+/g); matches.length = 3; return matches.join("."); } function isPepperFlash(flashPlayerFileName) { return !!flashPlayerFileName && (flashPlayerFileName = flashPlayerFileName.toLowerCase()) && (/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(flashPlayerFileName) || flashPlayerFileName.slice(-13) === "chrome.plugin"); } function inspectPlugin(plugin) { if (plugin) { hasFlash = true; if (plugin.version) { flashVersion = parseFlashVersion(plugin.version); } if (!flashVersion && plugin.description) { flashVersion = parseFlashVersion(plugin.description); } if (plugin.filename) { isPPAPI = isPepperFlash(plugin.filename); } } } if (_navigator.plugins && _navigator.plugins.length) { plugin = _navigator.plugins["Shockwave Flash"]; inspectPlugin(plugin); if (_navigator.plugins["Shockwave Flash 2.0"]) { hasFlash = true; flashVersion = "2.0.0.11"; } } else if (_navigator.mimeTypes && _navigator.mimeTypes.length) { mimeType = _navigator.mimeTypes["application/x-shockwave-flash"]; plugin = mimeType && mimeType.enabledPlugin; inspectPlugin(plugin); } else if (typeof ActiveXObject !== "undefined") { isActiveX = true; try { ax = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); hasFlash = true; flashVersion = parseFlashVersion(ax.GetVariable("$version")); } catch (e1) { try { ax = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); hasFlash = true; flashVersion = "6.0.21"; } catch (e2) { try { ax = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); hasFlash = true; flashVersion = parseFlashVersion(ax.GetVariable("$version")); } catch (e3) { isActiveX = false; } } } } _flashState.disabled = hasFlash !== true; _flashState.outdated = flashVersion && _parseFloat(flashVersion) < _parseFloat(_minimumFlashVersion); _flashState.version = flashVersion || "0.0.0"; _flashState.pluginType = isPPAPI ? "pepper" : isActiveX ? "activex" : hasFlash ? "netscape" : "unknown"; }; /** * Invoke the Flash detection algorithms immediately upon inclusion so we're not waiting later. */ _detectFlashSupport(_ActiveXObject); /** * A shell constructor for `ZeroClipboard` client instances. * * @constructor */ var ZeroClipboard = function() { if (!(this instanceof ZeroClipboard)) { return new ZeroClipboard(); } if (typeof ZeroClipboard._createClient === "function") { ZeroClipboard._createClient.apply(this, _args(arguments)); } }; /** * The ZeroClipboard library's version number. * * @static * @readonly * @property {string} */ _defineProperty(ZeroClipboard, "version", { value: "2.1.5", writable: false, configurable: true, enumerable: true }); /** * Update or get a copy of the ZeroClipboard global configuration. * Returns a copy of the current/updated configuration. * * @returns Object * @static */ ZeroClipboard.config = function() { return _config.apply(this, _args(arguments)); }; /** * Diagnostic method that describes the state of the browser, Flash Player, and ZeroClipboard. * * @returns Object * @static */ ZeroClipboard.state = function() { return _state.apply(this, _args(arguments)); }; /** * Check if Flash is unusable for any reason: disabled, outdated, deactivated, etc. * * @returns Boolean * @static */ ZeroClipboard.isFlashUnusable = function() { return _isFlashUnusable.apply(this, _args(arguments)); }; /** * Register an event listener. * * @returns `ZeroClipboard` * @static */ ZeroClipboard.on = function() { return _on.apply(this, _args(arguments)); }; /** * Unregister an event listener. * If no `listener` function/object is provided, it will unregister all listeners for the provided `eventType`. * If no `eventType` is provided, it will unregister all listeners for every event type. * * @returns `ZeroClipboard` * @static */ ZeroClipboard.off = function() { return _off.apply(this, _args(arguments)); }; /** * Retrieve event listeners for an `eventType`. * If no `eventType` is provided, it will retrieve all listeners for every event type. * * @returns array of listeners for the `eventType`; if no `eventType`, then a map/hash object of listeners for all event types; or `null` */ ZeroClipboard.handlers = function() { return _listeners.apply(this, _args(arguments)); }; /** * Event emission receiver from the Flash object, forwarding to any registered JavaScript event listeners. * * @returns For the "copy" event, returns the Flash-friendly "clipData" object; otherwise `undefined`. * @static */ ZeroClipboard.emit = function() { return _emit.apply(this, _args(arguments)); }; /** * Create and embed the Flash object. * * @returns The Flash object * @static */ ZeroClipboard.create = function() { return _create.apply(this, _args(arguments)); }; /** * Self-destruct and clean up everything, including the embedded Flash object. * * @returns `undefined` * @static */ ZeroClipboard.destroy = function() { return _destroy.apply(this, _args(arguments)); }; /** * Set the pending data for clipboard injection. * * @returns `undefined` * @static */ ZeroClipboard.setData = function() { return _setData.apply(this, _args(arguments)); }; /** * Clear the pending data for clipboard injection. * If no `format` is provided, all pending data formats will be cleared. * * @returns `undefined` * @static */ ZeroClipboard.clearData = function() { return _clearData.apply(this, _args(arguments)); }; /** * Get a copy of the pending data for clipboard injection. * If no `format` is provided, a copy of ALL pending data formats will be returned. * * @returns `String` or `Object` * @static */ ZeroClipboard.getData = function() { return _getData.apply(this, _args(arguments)); }; /** * Sets the current HTML object that the Flash object should overlay. This will put the global * Flash object on top of the current element; depending on the setup, this may also set the * pending clipboard text data as well as the Flash object's wrapping element's title attribute * based on the underlying HTML element and ZeroClipboard configuration. * * @returns `undefined` * @static */ ZeroClipboard.focus = ZeroClipboard.activate = function() { return _focus.apply(this, _args(arguments)); }; /** * Un-overlays the Flash object. This will put the global Flash object off-screen; depending on * the setup, this may also unset the Flash object's wrapping element's title attribute based on * the underlying HTML element and ZeroClipboard configuration. * * @returns `undefined` * @static */ ZeroClipboard.blur = ZeroClipboard.deactivate = function() { return _blur.apply(this, _args(arguments)); }; /** * Returns the currently focused/"activated" HTML element that the Flash object is wrapping. * * @returns `HTMLElement` or `null` * @static */ ZeroClipboard.activeElement = function() { return _activeElement.apply(this, _args(arguments)); }; if (typeof define === "function" && define.amd) { define(function() { return ZeroClipboard; }); } else if (typeof module === "object" && module && typeof module.exports === "object" && module.exports) { module.exports = ZeroClipboard; } else { window.ZeroClipboard = ZeroClipboard; } })(function() { return this || window; }());
ajax/libs/babel-core/5.8.31/browser.min.js
LeaYeh/cdnjs
 !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.babel=e()}}(function(){var e,t,r;return function n(e,t,r){function i(s,o){if(!t[s]){if(!e[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var p=new Error("Cannot find module '"+s+"'");throw p.code="MODULE_NOT_FOUND",p}var l=t[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return i(r?r:t)},l,l.exports,n,e,t,r)}return t[s].exports}for(var a="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,r){},{}],2:[function(e,t,r){function n(e,t){return d.isUndefined(t)?""+t:d.isNumber(t)&&!isFinite(t)?t.toString():d.isFunction(t)||d.isRegExp(t)?t.toString():t}function i(e,t){return d.isString(e)?e.length<t?e:e.slice(0,t):e}function a(e){return i(JSON.stringify(e.actual,n),128)+" "+e.operator+" "+i(JSON.stringify(e.expected,n),128)}function s(e,t,r,n,i){throw new y.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function o(e,t){e||s(e,!0,t,"==",y.ok)}function u(e,t){if(e===t)return!0;if(d.isBuffer(e)&&d.isBuffer(t)){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return d.isDate(e)&&d.isDate(t)?e.getTime()===t.getTime():d.isRegExp(e)&&d.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:d.isObject(e)||d.isObject(t)?l(e,t):e==t}function p(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function l(e,t){if(d.isNullOrUndefined(e)||d.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(d.isPrimitive(e)||d.isPrimitive(t))return e===t;var r=p(e),n=p(t);if(r&&!n||!r&&n)return!1;if(r)return e=h.call(e),t=h.call(t),u(e,t);var i,a,s=g(e),o=g(t);if(s.length!=o.length)return!1;for(s.sort(),o.sort(),a=s.length-1;a>=0;a--)if(s[a]!=o[a])return!1;for(a=s.length-1;a>=0;a--)if(i=s[a],!u(e[i],t[i]))return!1;return!0}function c(e,t){return e&&t?"[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t?!0:t.call({},e)===!0?!0:!1:!1}function f(e,t,r,n){var i;d.isString(r)&&(n=r,r=null);try{t()}catch(a){i=a}if(n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&s(i,r,"Missing expected exception"+n),!e&&c(i,r)&&s(i,r,"Got unwanted exception"+n),e&&i&&r&&!c(i,r)||!e&&i)throw i}var d=e(13),h=Array.prototype.slice,m=Object.prototype.hasOwnProperty,y=t.exports=o;y.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=a(this),this.generatedMessage=!0);var t=e.stackStartFunction||s;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=t.name,o=n.indexOf("\n"+i);if(o>=0){var u=n.indexOf("\n",o+1);n=n.substring(u+1)}this.stack=n}}},d.inherits(y.AssertionError,Error),y.fail=s,y.ok=o,y.equal=function(e,t,r){e!=t&&s(e,t,r,"==",y.equal)},y.notEqual=function(e,t,r){e==t&&s(e,t,r,"!=",y.notEqual)},y.deepEqual=function(e,t,r){u(e,t)||s(e,t,r,"deepEqual",y.deepEqual)},y.notDeepEqual=function(e,t,r){u(e,t)&&s(e,t,r,"notDeepEqual",y.notDeepEqual)},y.strictEqual=function(e,t,r){e!==t&&s(e,t,r,"===",y.strictEqual)},y.notStrictEqual=function(e,t,r){e===t&&s(e,t,r,"!==",y.notStrictEqual)},y["throws"]=function(e,t,r){f.apply(this,[!0].concat(h.call(arguments)))},y.doesNotThrow=function(e,t){f.apply(this,[!1].concat(h.call(arguments)))},y.ifError=function(e){if(e)throw e};var g=Object.keys||function(e){var t=[];for(var r in e)m.call(e,r)&&t.push(r);return t}},{13:13}],3:[function(e,t,r){(function(t){function n(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e){return this instanceof a?(this.length=0,this.parent=void 0,"number"==typeof e?s(this,e):"string"==typeof e?o(this,e,arguments.length>1?arguments[1]:"utf8"):u(this,e)):arguments.length>1?new a(e,arguments[1]):new a(e)}function s(e,t){if(e=m(e,0>t?0:0|y(t)),!a.TYPED_ARRAY_SUPPORT)for(var r=0;t>r;r++)e[r]=0;return e}function o(e,t,r){("string"!=typeof r||""===r)&&(r="utf8");var n=0|v(t,r);return e=m(e,n),e.write(t,r),e}function u(e,t){if(a.isBuffer(t))return p(e,t);if(K(t))return l(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return c(e,t);if(t instanceof ArrayBuffer)return f(e,t)}return t.length?d(e,t):h(e,t)}function p(e,t){var r=0|y(t.length);return e=m(e,r),t.copy(e,0,0,r),e}function l(e,t){var r=0|y(t.length);e=m(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function c(e,t){var r=0|y(t.length);e=m(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function f(e,t){return a.TYPED_ARRAY_SUPPORT?(t.byteLength,e=a._augment(new Uint8Array(t))):e=c(e,new Uint8Array(t)),e}function d(e,t){var r=0|y(t.length);e=m(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function h(e,t){var r,n=0;"Buffer"===t.type&&K(t.data)&&(r=t.data,n=0|y(r.length)),e=m(e,n);for(var i=0;n>i;i+=1)e[i]=255&r[i];return e}function m(e,t){a.TYPED_ARRAY_SUPPORT?(e=a._augment(new Uint8Array(t)),e.__proto__=a.prototype):(e.length=t,e._isBuffer=!0);var r=0!==t&&t<=a.poolSize>>>1;return r&&(e.parent=$),e}function y(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e,t){if(!(this instanceof g))return new g(e,t);var r=new a(e,t);return delete r.parent,r}function v(e,t){"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(e).length;default:if(n)return G(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if(t=0|t,r=void 0===r||r===1/0?this.length:0|r,e||(e="utf8"),0>t&&(t=0),r>this.length&&(r=this.length),t>=r)return"";for(;;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return F(this,t,r);case"binary":return k(this,t,r);case"base64":return w(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function E(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;n>s;s++){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))throw new Error("Invalid hex string");e[r+s]=o}return s}function x(e,t,r,n){return Y(G(t,e.length-r),e,r,n)}function S(e,t,r,n){return Y(H(t),e,r,n)}function A(e,t,r,n){return S(e,t,r,n)}function D(e,t,r,n){return Y(X(t),e,r,n)}function C(e,t,r,n){return Y(W(t,e.length-r),e,r,n)}function w(e,t,r){return 0===t&&r===e.length?J.fromByteArray(e):J.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;r>i;){var a=e[i],s=null,o=a>239?4:a>223?3:a>191?2:1;if(r>=i+o){var u,p,l,c;switch(o){case 1:128>a&&(s=a);break;case 2:u=e[i+1],128===(192&u)&&(c=(31&a)<<6|63&u,c>127&&(s=c));break;case 3:u=e[i+1],p=e[i+2],128===(192&u)&&128===(192&p)&&(c=(15&a)<<12|(63&u)<<6|63&p,c>2047&&(55296>c||c>57343)&&(s=c));break;case 4:u=e[i+1],p=e[i+2],l=e[i+3],128===(192&u)&&128===(192&p)&&128===(192&l)&&(c=(15&a)<<18|(63&u)<<12|(63&p)<<6|63&l,c>65535&&1114112>c&&(s=c))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}return _(n)}function _(e){var t=e.length;if(Q>=t)return String.fromCharCode.apply(String,e);for(var r="",n=0;t>n;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Q));return r}function F(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(127&e[i]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",a=t;r>a;a++)i+=q(e[a]);return i}function B(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function T(e,t,r){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,s){if(!a.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||s>t)throw new RangeError("value is out of bounds");if(r+n>e.length)throw new RangeError("index out of range")}function O(e,t,r,n){0>t&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);a>i;i++)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function j(e,t,r,n){0>t&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);a>i;i++)e[r+i]=t>>>8*(n?i:3-i)&255}function L(e,t,r,n,i,a){if(t>i||a>t)throw new RangeError("value is out of bounds");if(r+n>e.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function N(e,t,r,n,i){return i||L(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),z.write(e,t,r,n,23,4),r+4}function R(e,t,r,n,i){return i||L(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),z.write(e,t,r,n,52,8),r+8}function V(e){if(e=U(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function U(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function q(e){return 16>e?"0"+e.toString(16):e.toString(16)}function G(e,t){t=t||1/0;for(var r,n=e.length,i=null,a=[],s=0;n>s;s++){if(r=e.charCodeAt(s),r>55295&&57344>r){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(56320>r){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=i-55296<<10|r-56320|65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,128>r){if((t-=1)<0)break;a.push(r)}else if(2048>r){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(65536>r){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function H(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t}function W(e,t){for(var r,n,i,a=[],s=0;s<e.length&&!((t-=2)<0);s++)r=e.charCodeAt(s),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function X(e){return J.toByteArray(V(e))}function Y(e,t,r,n){for(var i=0;n>i&&!(i+r>=t.length||i>=e.length);i++)t[i+r]=e[i];return i}var J=e(4),z=e(5),K=e(6);r.Buffer=a,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,a.poolSize=8192;var $={};a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array),a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);s>i&&e[i]===t[i];)++i;return i!==s&&(r=e[i],n=t[i]),n>r?-1:r>n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!K(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new a(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;r++)t+=e[r].length;var n=new a(t),i=0;for(r=0;r<e.length;r++){var s=e[r];s.copy(n,i),i+=s.length}return n},a.byteLength=v,a.prototype.length=void 0,a.prototype.parent=void 0,a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):b.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:a.compare(this,e)},a.prototype.indexOf=function(e,t){function r(e,t,r){for(var n=-1,i=0;r+i<e.length;i++)if(e[r+i]===t[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===t.length)return r+n}else n=-1;return-1}if(t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(a.isBuffer(e))return r(this,e,t);if("number"==typeof e)return a.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):r(this,[e],t);throw new TypeError("val must be string, number or Buffer")},a.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},a.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=t,t=0|r,r=i}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(0>r||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return E(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":return S(this,e,t,r);case"binary":return A(this,e,t,r);case"base64":return D(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),e>t&&(t=e);var n;if(a.TYPED_ARRAY_SUPPORT)n=a._augment(this.subarray(e,t));else{var i=t-e;n=new a(i,void 0);for(var s=0;i>s;s++)n[s]=this[s+e]}return n.length&&(n.parent=this.parent||this),n},a.prototype.readUIntLE=function(e,t,r){e=0|e,t=0|t,r||T(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},a.prototype.readUIntBE=function(e,t,r){e=0|e,t=0|t,r||T(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return t||T(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||T(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||T(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e=0|e,t=0|t,r||T(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e=0|e,t=0|t,r||T(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||T(e,4,this.length),z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||T(e,4,this.length),z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||T(e,8,this.length),z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||T(e,8,this.length),z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){e=+e,t=0|t,r=0|r,n||M(this,e,t,r,Math.pow(2,8*r),0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){e=+e,t=0|t,r=0|r,n||M(this,e,t,r,Math.pow(2,8*r),0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var a=0,s=1,o=0>e?1:0;for(this[t]=255&e;++a<r&&(s*=256);)this[t+a]=(e/s>>0)-o&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var a=r-1,s=1,o=0>e?1:0;for(this[t+a]=255&e;--a>=0&&(s*=256);)this[t+a]=(e/s>>0)-o&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&r>n&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,s=n-r;if(this===e&&t>r&&n>t)for(i=s-1;i>=0;i--)e[i+t]=this[i+r];else if(1e3>s||!a.TYPED_ARRAY_SUPPORT)for(i=0;s>i;i++)e[i+t]=this[i+r];else e._set(this.subarray(r,r+s),t);return s},a.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),t>r)throw new RangeError("end < start");if(r!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof e)for(n=t;r>n;n++)this[n]=e;else{var i=G(e.toString()),a=i.length;for(n=t;r>n;n++)this[n]=i[n%a]}return this}},a.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(a.TYPED_ARRAY_SUPPORT)return new a(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=a.prototype;a._augment=function(e){return e.constructor=a,e._isBuffer=!0,e._set=e.set,e.get=Z.get,e.set=Z.set,e.write=Z.write,e.toString=Z.toString,e.toLocaleString=Z.toString,e.toJSON=Z.toJSON,e.equals=Z.equals,e.compare=Z.compare,e.indexOf=Z.indexOf,e.copy=Z.copy,e.slice=Z.slice,e.readUIntLE=Z.readUIntLE,e.readUIntBE=Z.readUIntBE,e.readUInt8=Z.readUInt8,e.readUInt16LE=Z.readUInt16LE,e.readUInt16BE=Z.readUInt16BE,e.readUInt32LE=Z.readUInt32LE,e.readUInt32BE=Z.readUInt32BE,e.readIntLE=Z.readIntLE,e.readIntBE=Z.readIntBE,e.readInt8=Z.readInt8,e.readInt16LE=Z.readInt16LE,e.readInt16BE=Z.readInt16BE,e.readInt32LE=Z.readInt32LE,e.readInt32BE=Z.readInt32BE,e.readFloatLE=Z.readFloatLE,e.readFloatBE=Z.readFloatBE,e.readDoubleLE=Z.readDoubleLE,e.readDoubleBE=Z.readDoubleBE,e.writeUInt8=Z.writeUInt8,e.writeUIntLE=Z.writeUIntLE,e.writeUIntBE=Z.writeUIntBE,e.writeUInt16LE=Z.writeUInt16LE,e.writeUInt16BE=Z.writeUInt16BE,e.writeUInt32LE=Z.writeUInt32LE,e.writeUInt32BE=Z.writeUInt32BE,e.writeIntLE=Z.writeIntLE,e.writeIntBE=Z.writeIntBE,e.writeInt8=Z.writeInt8,e.writeInt16LE=Z.writeInt16LE,e.writeInt16BE=Z.writeInt16BE,e.writeInt32LE=Z.writeInt32LE,e.writeInt32BE=Z.writeInt32BE,e.writeFloatLE=Z.writeFloatLE,e.writeFloatBE=Z.writeFloatBE,e.writeDoubleLE=Z.writeDoubleLE,e.writeDoubleBE=Z.writeDoubleBE,e.fill=Z.fill,e.inspect=Z.inspect,e.toArrayBuffer=Z.toArrayBuffer,e};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{4:4,5:5,6:6}],4:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===s||t===c?62:t===o||t===f?63:u>t?-1:u+10>t?t-u+26+26:l+26>t?t-l:p+26>t?t-p+26:void 0}function r(e){function r(e){p[c++]=e}var n,i,s,o,u,p;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=e.length;u="="===e.charAt(l-2)?2:"="===e.charAt(l-1)?1:0,p=new a(3*e.length/4-u),s=u>0?e.length-4:e.length;var c=0;for(n=0,i=0;s>n;n+=4,i+=3)o=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&o)>>16),r((65280&o)>>8),r(255&o);return 2===u?(o=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&o)):1===u&&(o=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(o>>8&255),r(255&o)),p}function i(e){function t(e){return n.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,a,s,o=e.length%3,u="";for(i=0,s=e.length-o;s>i;i+=3)a=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=r(a);switch(o){case 1:a=e[e.length-1],u+=t(a>>2),u+=t(a<<4&63),u+="==";break;case 2:a=(e[e.length-2]<<8)+e[e.length-1],u+=t(a>>10),u+=t(a>>4&63),u+=t(a<<2&63),u+="="}return u}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),o="/".charCodeAt(0),u="0".charCodeAt(0),p="a".charCodeAt(0),l="A".charCodeAt(0),c="-".charCodeAt(0),f="_".charCodeAt(0);e.toByteArray=r,e.fromByteArray=i}("undefined"==typeof r?this.base64js={}:r)},{}],5:[function(e,t,r){r.read=function(e,t,r,n,i){var a,s,o=8*i-n-1,u=(1<<o)-1,p=u>>1,l=-7,c=r?i-1:0,f=r?-1:1,d=e[t+c];for(c+=f,a=d&(1<<-l)-1,d>>=-l,l+=o;l>0;a=256*a+e[t+c],c+=f,l-=8);for(s=a&(1<<-l)-1,a>>=-l,l+=n;l>0;s=256*s+e[t+c],c+=f,l-=8);if(0===a)a=1-p;else{if(a===u)return s?NaN:(d?-1:1)*(1/0);s+=Math.pow(2,n),a-=p}return(d?-1:1)*s*Math.pow(2,a-n)},r.write=function(e,t,r,n,i,a){var s,o,u,p=8*a-i-1,l=(1<<p)-1,c=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,h=n?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+c>=1?f/u:f*Math.pow(2,1-c),t*u>=2&&(s++,u/=2),s+c>=l?(o=0,s=l):s+c>=1?(o=(t*u-1)*Math.pow(2,i),s+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&o,d+=h,o/=256,i-=8);for(s=s<<i|o,p+=i;p>0;e[r+d]=255&s,d+=h,s/=256,p-=8);e[r+d-h]|=128*m}},{}],6:[function(e,t,r){var n=Array.isArray,i=Object.prototype.toString;t.exports=n||function(e){return!!e&&"[object Array]"==i.call(e)}},{}],7:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],8:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n"},{}],9:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return i.exec(e).slice(1)};r.resolve=function(){for(var r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var s=a>=0?arguments[a]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,i="/"===s.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),a="/"===s(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),a=n(t.split("/")),s=Math.min(i.length,a.length),o=s,u=0;s>u;u++)if(i[u]!==a[u]){o=u;break}for(var p=[],u=o;u<i.length;u++)p.push("..");return p=p.concat(a.slice(o)),p.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=a(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(e,t){var r=a(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return a(e)[3]};var s="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return 0>t&&(t=e.length+t),e.substr(t,r)}}).call(this,e(10))},{10:10}],10:[function(e,t,r){function n(){l=!1,o.length?p=o.concat(p):c=-1,p.length&&i()}function i(){if(!l){var e=setTimeout(n);l=!0;for(var t=p.length;t;){for(o=p,p=[];++c<t;)o&&o[c].run();c=-1,t=p.length}o=null,l=!1,clearTimeout(e)}}function a(e,t){this.fun=e,this.array=t}function s(){}var o,u=t.exports={},p=[],l=!1,c=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];p.push(new a(e,t)),1!==p.length||l||setTimeout(i,0)},a.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],11:[function(e,t,r){function n(){throw new Error("tty.ReadStream is not implemented")}function i(){throw new Error("tty.ReadStream is not implemented")}r.isatty=function(){return!1},r.ReadStream=n,r.WriteStream=i},{}],12:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],13:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function o(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&w(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return b(i)||(i=u(e,i,n)),i}var a=p(e,t);if(a)return a;var s=Object.keys(t),m=o(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),C(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(t);if(0===s.length){if(w(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(S(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(D(t))return e.stylize(Date.prototype.toString.call(t),"date");if(C(t))return l(t)}var g="",v=!1,E=["{","}"];if(h(t)&&(v=!0,E=["[","]"]),w(t)){var x=t.name?": "+t.name:"";g=" [Function"+x+"]"}if(S(t)&&(g=" "+RegExp.prototype.toString.call(t)),D(t)&&(g=" "+Date.prototype.toUTCString.call(t)),C(t)&&(g=" "+l(t)),0===s.length&&(!v||0==t.length))return E[0]+g+E[1];if(0>n)return S(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var A;return A=v?c(e,t,n,m,s):s.map(function(r){return f(e,t,n,m,r,v)}),e.seen.pop(),d(A,g,E)}function p(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,r,n,i){for(var a=[],s=0,o=t.length;o>s;++s)P(t,String(s))?a.push(f(e,t,r,n,String(s),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(f(e,t,r,n,i,!0))}),a}function f(e,t,r,n,i,a){var s,o,p;if(p=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},p.get?o=p.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):p.set&&(o=e.stylize("[Setter]","special")),P(n,i)||(s="["+i+"]"),o||(e.seen.indexOf(p.value)<0?(o=y(r)?u(e,p.value,null):u(e,p.value,r-1),o.indexOf("\n")>-1&&(o=a?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n"))):o=e.stylize("[Circular]","special")),x(s)){if(a&&i.match(/^\d+$/))return o; s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+o}function d(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return null==e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function E(e){return"symbol"==typeof e}function x(e){return void 0===e}function S(e){return A(e)&&"[object RegExp]"===_(e)}function A(e){return"object"==typeof e&&null!==e}function D(e){return A(e)&&"[object Date]"===_(e)}function C(e){return A(e)&&("[object Error]"===_(e)||e instanceof Error)}function w(e){return"function"==typeof e}function I(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function _(e){return Object.prototype.toString.call(e)}function F(e){return 10>e?"0"+e.toString(10):e.toString(10)}function k(){var e=new Date,t=[F(e.getHours()),F(e.getMinutes()),F(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var B=/%[sdj%]/g;r.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,a=n.length,s=String(e).replace(B,function(e){if("%%"===e)return"%";if(r>=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}}),o=n[r];a>r;o=n[++r])s+=y(o)||!A(o)?" "+o:" "+i(o);return s},r.deprecate=function(e,i){function a(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(x(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return a};var T,M={};r.debuglog=function(e){if(x(T)&&(T=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!M[e])if(new RegExp("\\b"+e+"\\b","i").test(T)){var n=t.pid;M[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else M[e]=function(){};return M[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=m,r.isNull=y,r.isNullOrUndefined=g,r.isNumber=v,r.isString=b,r.isSymbol=E,r.isUndefined=x,r.isRegExp=S,r.isObject=A,r.isDate=D,r.isError=C,r.isFunction=w,r.isPrimitive=I,r.isBuffer=e(12);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",k(),r.format.apply(r,arguments))},r.inherits=e(7),r._extend=function(e,t){if(!t||!A(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e(10),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,12:12,7:7}],14:[function(e,t,r){(function(r){"use strict";e(15);var n=t.exports=e(66);n.options=e(49),n.version=e(603).version,n.transform=n,n.run=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.sourceMaps="inline",new Function(n(e,t).code)()},n.load=function(e,t,i,a){void 0===i&&(i={}),i.filename=i.filename||e;var s=r.ActiveXObject?new r.ActiveXObject("Microsoft.XMLHTTP"):new r.XMLHttpRequest;s.open("GET",e,!0),"overrideMimeType"in s&&s.overrideMimeType("text/plain"),s.onreadystatechange=function(){if(4===s.readyState){var r=s.status;if(0!==r&&200!==r)throw new Error("Could not load "+e);var o=[s.responseText,i];a||n.run.apply(n,o),t&&t(o)}},s.send(null)};var i=function(){for(var e=[],t=["text/ecmascript-6","text/6to5","text/babel","module"],i=0,a=function l(){var t=e[i];t instanceof Array&&(n.run.apply(n,t),i++,l())},s=function(t,r){var i={};t.src?n.load(t.src,function(t){e[r]=t,a()},i,!0):(i.filename="embedded",e[r]=[t.innerHTML,i])},o=r.document.getElementsByTagName("script"),u=0;u<o.length;++u){var p=o[u];t.indexOf(p.type)>=0&&e.push(p)}for(u in e)s(e[u],u);a()};r.addEventListener?r.addEventListener("DOMContentLoaded",i,!1):r.attachEvent&&r.attachEvent("onload",i)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{15:15,49:49,603:603,66:66}],15:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e["default"]:e}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function a(e){return e&&e.__esModule?e:{"default":e}}function s(t){var r=e(17);return null!=t&&r(t),r}function o(){e(44)}function u(e,t,r){f["default"](t)&&(r=t,t={}),t.filename=e,E["default"].readFile(e,function(e,n){if(e)return r(e);var i;try{i=h["default"](n,t)}catch(e){return r(e)}r(null,i)})}function p(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.filename=e,h["default"](E["default"].readFileSync(e,"utf8"),t)}function l(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.allowHashBang=!0,t.sourceType="module",t.ecmaVersion=1/0,t.plugins={jsx:!0,flow:!0},t.features={};for(var r in h["default"].pipeline.transformers)t.features[r]=!0;var n=y.parse(e,t);if(t.onToken){var i;(i=t.onToken).push.apply(i,n.tokens)}if(t.onComment){var a;(a=t.onComment).push.apply(a,n.comments)}return n.program}r.__esModule=!0,r.register=s,r.polyfill=o,r.transformFile=u,r.transformFileSync=p,r.parse=l;var c=e(500),f=a(c),d=e(66),h=a(d),m=e(605),y=i(m),g=e(182),v=i(g),b=e(1),E=a(b),x=e(179),S=i(x);r.util=v,r.acorn=y,r.transform=h["default"],r.pipeline=d.pipeline,r.canCompile=g.canCompile;var A=e(46);r.File=n(A);var D=e(48);r.options=n(D);var C=e(82);r.Plugin=n(C);var w=e(83);r.Transformer=n(w);var I=e(80);r.Pipeline=n(I);var _=e(148);r.traverse=n(_);var F=e(45);r.buildExternalHelpers=n(F);var k=e(603);r.version=k.version,r.types=S},{1:1,148:148,17:17,179:179,182:182,44:44,45:45,46:46,48:48,500:500,603:603,605:605,66:66,80:80,82:82,83:83}],16:[function(e,t,r){"use strict";r.__esModule=!0,e(44),r["default"]=function(){},t.exports=r["default"]},{44:44}],17:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e["default"]:e}r.__esModule=!0,e(44);var i=e(16);r["default"]=n(i),t.exports=r["default"]},{16:16,44:44}],18:[function(e,t,r){"use strict";function n(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")}r.__esModule=!0;var a=e(584),s=n(a),o=e(601),u=n(o),p=e(498),l=n(p),c=e(413),f=n(c),d=e(502),h=n(d),m=function(){function e(t,r){i(this,e),this.parenPushNewlineState=null,this.position=t,this._indent=r.indent.base,this.format=r,this.buf=""}return e.prototype.get=function(){return u["default"](this.buf)},e.prototype.getIndent=function(){return this.format.compact||this.format.concise?"":s["default"](this.format.indent.style,this._indent)},e.prototype.indentSize=function(){return this.getIndent().length},e.prototype.indent=function(){this._indent++},e.prototype.dedent=function(){this._indent--},e.prototype.semicolon=function(){this.push(";")},e.prototype.ensureSemicolon=function(){this.isLast(";")||this.semicolon()},e.prototype.rightBrace=function(){this.newline(!0),this.format.compact&&this._removeLast(";"),this.push("}")},e.prototype.keyword=function(e){this.push(e),this.space()},e.prototype.space=function(e){(e||!this.format.compact)&&(e||this.buf&&!this.isLast(" ")&&!this.isLast("\n"))&&this.push(" ")},e.prototype.removeLast=function(e){return this.format.compact?void 0:this._removeLast(e)},e.prototype._removeLast=function(e){this._isLast(e)&&(this.buf=this.buf.substr(0,this.buf.length-1),this.position.unshift(e))},e.prototype.startTerminatorless=function(){return this.parenPushNewlineState={printed:!1}},e.prototype.endTerminatorless=function(e){e.printed&&(this.dedent(),this.newline(),this.push(")"))},e.prototype.newline=function(e,t){if(!this.format.compact&&!this.format.retainLines){if(this.format.concise)return void this.space();if(t=t||!1,h["default"](e)){if(e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,0>=e)return;for(;e>0;)this._newline(t),e--}else l["default"](e)&&(t=e),this._newline(t)}},e.prototype._newline=function(e){this.endsWith("\n\n")||(e&&this.isLast("\n")&&this.removeLast("\n"),this.removeLast(" "),this._removeSpacesAfterLastNewline(),this._push("\n"))},e.prototype._removeSpacesAfterLastNewline=function(){var e=this.buf.lastIndexOf("\n");if(-1!==e){for(var t=this.buf.length-1;t>e&&" "===this.buf[t];)t--;t===e&&(this.buf=this.buf.substring(0,t+1))}},e.prototype.push=function(e,t){if(!this.format.compact&&this._indent&&!t&&"\n"!==e){var r=this.getIndent();e=e.replace(/\n/g,"\n"+r),this.isLast("\n")&&this._push(r)}this._push(e)},e.prototype._push=function(e){var t=this.parenPushNewlineState;if(t)for(var r=0;r<e.length;r++){var n=e[r];if(" "!==n){this.parenPushNewlineState=null,("\n"===n||"/"===n)&&(this._push("("),this.indent(),t.printed=!0);break}}this.position.push(e),this.buf+=e},e.prototype.endsWith=function(e){var t=arguments.length<=1||void 0===arguments[1]?this.buf:arguments[1];return 1===e.length?t[t.length-1]===e:t.slice(-e.length)===e},e.prototype.isLast=function(e){return this.format.compact?!1:this._isLast(e)},e.prototype._isLast=function(e){var t=this.buf,r=t[t.length-1];return Array.isArray(e)?f["default"](e,r):e===r},e}();r["default"]=m,t.exports=r["default"]},{413:413,498:498,502:502,584:584,601:601}],19:[function(e,t,r){"use strict";function n(e,t){t.plain(e.program)}function i(e,t){t.sequence(e.body)}function a(e,t){this.push("{"),e.body.length?(this.newline(),t.sequence(e.body,{indent:!0}),this.format.retainLines||this.removeLast("\n"),this.rightBrace()):(t.printInnerComments(),this.push("}"))}function s(){}r.__esModule=!0,r.File=n,r.Program=i,r.BlockStatement=a,r.Noop=s},{}],20:[function(e,t,r){"use strict";function n(e,t){t.list(e.decorators,{separator:""}),this.push("class"),e.id&&(this.push(" "),t.plain(e.id)),t.plain(e.typeParameters),e.superClass&&(this.push(" extends "),t.plain(e.superClass),t.plain(e.superTypeParameters)),e["implements"]&&(this.push(" implements "),t.join(e["implements"],{separator:", "})),this.space(),t.plain(e.body)}function i(e,t){this.push("{"),0===e.body.length?(t.printInnerComments(),this.push("}")):(this.newline(),this.indent(),t.sequence(e.body),this.dedent(),this.rightBrace())}function a(e,t){t.list(e.decorators,{separator:""}),e["static"]&&this.push("static "),t.plain(e.key),t.plain(e.typeAnnotation),e.value&&(this.space(),this.push("="),this.space(),t.plain(e.value)),this.semicolon()}function s(e,t){t.list(e.decorators,{separator:""}),e["static"]&&this.push("static "),this._method(e,t)}r.__esModule=!0,r.ClassDeclaration=n,r.ClassBody=i,r.ClassProperty=a,r.MethodDefinition=s,r.ClassExpression=n},{}],21:[function(e,t,r){"use strict";function n(e,t){this.keyword("for"),this.push("("),t.plain(e.left),this.push(" of "),t.plain(e.right),this.push(")")}function i(e,t){this.push(e.generator?"(":"["),t.join(e.blocks,{separator:" "}),this.space(),e.filter&&(this.keyword("if"),this.push("("),t.plain(e.filter),this.push(")"),this.space()),t.plain(e.body),this.push(e.generator?")":"]")}r.__esModule=!0,r.ComprehensionBlock=n,r.ComprehensionExpression=i},{}],22:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var r=/[a-z]$/.test(e.operator),n=e.argument;(k.isUpdateExpression(n)||k.isUnaryExpression(n))&&(r=!0),k.isUnaryExpression(n)&&"!"===n.operator&&(r=!1),this.push(e.operator),r&&this.push(" "),t.plain(e.argument)}function s(e,t){this.push("do"),this.space(),t.plain(e.body)}function o(e,t){this.push("("),t.plain(e.expression),this.push(")")}function u(e,t){e.prefix?(this.push(e.operator),t.plain(e.argument)):(t.plain(e.argument),this.push(e.operator))}function p(e,t){t.plain(e.test),this.space(),this.push("?"),this.space(),t.plain(e.consequent),this.space(),this.push(":"),this.space(),t.plain(e.alternate)}function l(e,t){this.push("new "),t.plain(e.callee),this.push("("),t.list(e.arguments),this.push(")")}function c(e,t){t.list(e.expressions)}function f(){this.push("this")}function d(){this.push("super")}function h(e,t){this.push("@"),t.plain(e.expression),this.newline()}function m(e,t){t.plain(e.callee),this.push("(");var r,n=e._prettyCall&&!this.format.retainLines&&!this.format.compact;n&&(r=",\n",this.newline(),this.indent()),t.list(e.arguments,{separator:r}),n&&(this.newline(),this.dedent()),this.push(")")}function y(){this.semicolon()}function g(e,t){t.plain(e.expression),this.semicolon()}function v(e,t){t.plain(e.left),this.push(" = "),t.plain(e.right)}function b(e,t,r){var n=this._inForStatementInit&&"in"===e.operator&&!_["default"].needsParens(e,r);n&&this.push("("),t.plain(e.left);var i="in"===e.operator||"instanceof"===e.operator;i=!0,this.space(i),this.push(e.operator),i||(i="<"===e.operator&&k.isUnaryExpression(e.right,{prefix:!0,operator:"!"})&&k.isUnaryExpression(e.right.argument,{prefix:!0,operator:"--"})),this.space(i),t.plain(e.right),n&&this.push(")")}function E(e,t){t.plain(e.object),this.push("::"),t.plain(e.callee)}function x(e,t){var r=e.object;if(t.plain(r),!e.computed&&k.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var n=e.computed;if(k.isLiteral(e.property)&&w["default"](e.property.value)&&(n=!0),n)this.push("["),t.plain(e.property),this.push("]");else{if(k.isLiteral(e.object)){var i=this._Literal(e.object);!D["default"](+i)||P.test(i)||this.endsWith(".")||B.test(i)||this.push(".")}this.push("."),t.plain(e.property)}}function S(e,t){t.plain(e.meta),this.push("."),t.plain(e.property)}r.__esModule=!0,r.UnaryExpression=a,r.DoExpression=s,r.ParenthesizedExpression=o,r.UpdateExpression=u,r.ConditionalExpression=p,r.NewExpression=l,r.SequenceExpression=c,r.ThisExpression=f,r.Super=d,r.Decorator=h,r.CallExpression=m,r.EmptyStatement=y,r.ExpressionStatement=g,r.AssignmentPattern=v,r.AssignmentExpression=b,r.BindExpression=E,r.MemberExpression=x,r.MetaProperty=S;var A=e(398),D=i(A),C=e(502),w=i(C),I=e(31),_=i(I),F=e(179),k=n(F),P=/e/i,B=/^0(b|o|x)/i,T=function(e){return function(t,r){if(this.push(e),(t.delegate||t.all)&&this.push("*"),t.argument){this.push(" ");var n=this.startTerminatorless();r.plain(t.argument),this.endTerminatorless(n)}}},M=T("yield");r.YieldExpression=M;var O=T("await");r.AwaitExpression=O,r.BinaryExpression=b,r.LogicalExpression=b},{179:179,31:31,398:398,502:502}],23:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(){this.push("any")}function a(e,t){t.plain(e.elementType),this.push("["),this.push("]")}function s(){this.push("bool")}function o(e){this.push(e.value?"true":"false")}function u(e,t){this.push("declare class "),this._interfaceish(e,t)}function p(e,t){this.push("declare function "),t.plain(e.id),t.plain(e.id.typeAnnotation.typeAnnotation),this.semicolon()}function l(e,t){this.push("declare module "),t.plain(e.id),this.space(),t.plain(e.body)}function c(e,t){this.push("declare var "),t.plain(e.id),t.plain(e.id.typeAnnotation),this.semicolon()}function f(e,t,r){t.plain(e.typeParameters),this.push("("),t.list(e.params),e.rest&&(e.params.length&&(this.push(","),this.space()),this.push("..."),t.plain(e.rest)),this.push(")"),"ObjectTypeProperty"===r.type||"ObjectTypeCallProperty"===r.type||"DeclareFunction"===r.type?this.push(":"):(this.space(),this.push("=>")),this.space(),t.plain(e.returnType)}function d(e,t){t.plain(e.name),e.optional&&this.push("?"),this.push(":"),this.space(),t.plain(e.typeAnnotation)}function h(e,t){t.plain(e.id),t.plain(e.typeParameters)}function m(e,t){t.plain(e.id),t.plain(e.typeParameters),e["extends"].length&&(this.push(" extends "),t.join(e["extends"],{separator:", "})),this.space(),t.plain(e.body)}function y(e,t){this.push("interface "),this._interfaceish(e,t)}function g(e,t){t.join(e.types,{separator:" & "})}function v(){this.push("mixed")}function b(e,t){this.push("?"),t.plain(e.typeAnnotation)}function E(){this.push("number")}function x(e){this.push(this._stringLiteral(e.value))}function S(){this.push("string")}function A(e,t){this.push("["),t.join(e.types,{separator:", "}),this.push("]")}function D(e,t){this.push("typeof "),t.plain(e.argument)}function C(e,t){this.push("type "),t.plain(e.id),t.plain(e.typeParameters),this.space(),this.push("="),this.space(),t.plain(e.right),this.semicolon()}function w(e,t){this.push(":"),this.space(),e.optional&&this.push("?"),t.plain(e.typeAnnotation)}function I(e,t){this.push("<"),t.join(e.params,{separator:", ",iterator:function(e){t.plain(e.typeAnnotation)}}),this.push(">")}function _(e,t){var r=this;this.push("{");var n=e.properties.concat(e.callProperties,e.indexers);n.length&&(this.space(),t.list(n,{separator:!1,indent:!0,iterator:function(){1!==n.length&&(r.semicolon(),r.space())}}),this.space()),this.push("}")}function F(e,t){e["static"]&&this.push("static "),t.plain(e.value)}function k(e,t){e["static"]&&this.push("static "),this.push("["),t.plain(e.id),this.push(":"),this.space(),t.plain(e.key),this.push("]"),this.push(":"),this.space(),t.plain(e.value)}function P(e,t){e["static"]&&this.push("static "),t.plain(e.key),e.optional&&this.push("?"),L.isFunctionTypeAnnotation(e.value)||(this.push(":"),this.space()),t.plain(e.value)}function B(e,t){t.plain(e.qualification),this.push("."),t.plain(e.id)}function T(e,t){t.join(e.types,{separator:" | "})}function M(e,t){this.push("("),t.plain(e.expression),t.plain(e.typeAnnotation),this.push(")")}function O(){this.push("void")}r.__esModule=!0,r.AnyTypeAnnotation=i,r.ArrayTypeAnnotation=a,r.BooleanTypeAnnotation=s,r.BooleanLiteralTypeAnnotation=o,r.DeclareClass=u,r.DeclareFunction=p,r.DeclareModule=l,r.DeclareVariable=c,r.FunctionTypeAnnotation=f,r.FunctionTypeParam=d,r.InterfaceExtends=h,r._interfaceish=m,r.InterfaceDeclaration=y,r.IntersectionTypeAnnotation=g,r.MixedTypeAnnotation=v,r.NullableTypeAnnotation=b,r.NumberTypeAnnotation=E,r.StringLiteralTypeAnnotation=x,r.StringTypeAnnotation=S,r.TupleTypeAnnotation=A,r.TypeofTypeAnnotation=D,r.TypeAlias=C,r.TypeAnnotation=w,r.TypeParameterInstantiation=I,r.ObjectTypeAnnotation=_,r.ObjectTypeCallProperty=F,r.ObjectTypeIndexer=k,r.ObjectTypeProperty=P,r.QualifiedTypeIdentifier=B,r.UnionTypeAnnotation=T,r.TypeCastExpression=M,r.VoidTypeAnnotation=O;var j=e(179),L=n(j);r.ClassImplements=h,r.GenericTypeAnnotation=h;var N=e(29);r.NumberLiteralTypeAnnotation=N.Literal,r.TypeParameterDeclaration=I},{179:179,29:29}],24:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){t.plain(e.name),e.value&&(this.push("="),t.plain(e.value))}function a(e){this.push(e.name)}function s(e,t){t.plain(e.namespace),this.push(":"),t.plain(e.name)}function o(e,t){t.plain(e.object),this.push("."),t.plain(e.property)}function u(e,t){this.push("{..."),t.plain(e.argument),this.push("}")}function p(e,t){this.push("{"),t.plain(e.expression),this.push("}")}function l(e,t){var r=e.openingElement;if(t.plain(r),!r.selfClosing){this.indent();for(var n=e.children,i=0;i<n.length;i++){var a=n[i];m.isLiteral(a)?this.push(a.value,!0):t.plain(a)}this.dedent(),t.plain(e.closingElement)}}function c(e,t){this.push("<"),t.plain(e.name),e.attributes.length>0&&(this.push(" "),t.join(e.attributes,{separator:" "})),this.push(e.selfClosing?" />":">")}function f(e,t){this.push("</"),t.plain(e.name),this.push(">")}function d(){}r.__esModule=!0,r.JSXAttribute=i,r.JSXIdentifier=a,r.JSXNamespacedName=s,r.JSXMemberExpression=o,r.JSXSpreadAttribute=u,r.JSXExpressionContainer=p,r.JSXElement=l,r.JSXOpeningElement=c,r.JSXClosingElement=f,r.JSXEmptyExpression=d;var h=e(179),m=n(h)},{179:179}],25:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){var r=this;t.plain(e.typeParameters),this.push("("),t.list(e.params,{iterator:function(e){e.optional&&r.push("?"),t.plain(e.typeAnnotation)}}),this.push(")"),e.returnType&&t.plain(e.returnType)}function a(e,t){var r=e.value,n=e.kind,i=e.key;("method"===n||"init"===n)&&r.generator&&this.push("*"),("get"===n||"set"===n)&&this.push(n+" "),r.async&&this.push("async "),e.computed?(this.push("["),t.plain(i),this.push("]")):t.plain(i),this._params(r,t),this.space(),t.plain(r.body)}function s(e,t){e.async&&this.push("async "),this.push("function"),e.generator&&this.push("*"),e.id?(this.push(" "),t.plain(e.id)):this.space(),this._params(e,t),this.space(),t.plain(e.body)}function o(e,t){e.async&&this.push("async "),1===e.params.length&&p.isIdentifier(e.params[0])?t.plain(e.params[0]):this._params(e,t),this.push(" => ");var r=p.isObjectExpression(e.body);r&&this.push("("),t.plain(e.body),r&&this.push(")")}r.__esModule=!0,r._params=i,r._method=a,r.FunctionExpression=s,r.ArrowFunctionExpression=o;var u=e(179),p=n(u);r.FunctionDeclaration=s},{179:179}],26:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){t.plain(e.imported),e.local&&e.local.name!==e.imported.name&&(this.push(" as "),t.plain(e.local))}function a(e,t){t.plain(e.local)}function s(e,t){t.plain(e.exported)}function o(e,t){t.plain(e.local),e.exported&&e.local.name!==e.exported.name&&(this.push(" as "),t.plain(e.exported))}function u(e,t){this.push("* as "),t.plain(e.exported)}function p(e,t){this.push("export *"),e.exported&&(this.push(" as "),t.plain(e.exported)),this.push(" from "),t.plain(e.source),this.semicolon()}function l(e,t){this.push("export "),f.call(this,e,t)}function c(e,t){this.push("export default "),f.call(this,e,t)}function f(e,t){var r=e.specifiers;if(e.declaration){var n=e.declaration;if(t.plain(n),y.isStatement(n)||y.isFunction(n)||y.isClass(n))return}else{"type"===e.exportKind&&this.push("type ");var i=r[0],a=!1;(y.isExportDefaultSpecifier(i)||y.isExportNamespaceSpecifier(i))&&(a=!0,t.plain(r.shift()),r.length&&this.push(", ")),(r.length||!r.length&&!a)&&(this.push("{"),r.length&&(this.space(),t.join(r,{separator:", "}),this.space()),this.push("}")),e.source&&(this.push(" from "),t.plain(e.source))}this.ensureSemicolon()}function d(e,t){this.push("import "),("type"===e.importKind||"typeof"===e.importKind)&&this.push(e.importKind+" ");var r=e.specifiers;if(r&&r.length){var n=e.specifiers[0];(y.isImportDefaultSpecifier(n)||y.isImportNamespaceSpecifier(n))&&(t.plain(e.specifiers.shift()),e.specifiers.length&&this.push(", ")),e.specifiers.length&&(this.push("{"),this.space(),t.join(e.specifiers,{separator:", "}),this.space(),this.push("}")),this.push(" from ")}t.plain(e.source),this.semicolon()}function h(e,t){this.push("* as "),t.plain(e.local)}r.__esModule=!0,r.ImportSpecifier=i,r.ImportDefaultSpecifier=a,r.ExportDefaultSpecifier=s,r.ExportSpecifier=o,r.ExportNamespaceSpecifier=u,r.ExportAllDeclaration=p,r.ExportNamedDeclaration=l,r.ExportDefaultDeclaration=c,r.ImportDeclaration=d,r.ImportNamespaceSpecifier=h;var m=e(179),y=n(m)},{179:179}],27:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){this.keyword("with"),this.push("("),t.plain(e.object),this.push(")"),t.block(e.body)}function s(e,t){this.keyword("if"),this.push("("),t.plain(e.test),this.push(")"),this.space(),t.indentOnComments(e.consequent),e.alternate&&(this.isLast("}")&&this.space(),this.push("else "),t.indentOnComments(e.alternate))}function o(e,t){this.keyword("for"),this.push("("),this._inForStatementInit=!0,t.plain(e.init),this._inForStatementInit=!1,this.push(";"),e.test&&(this.space(),t.plain(e.test)),this.push(";"),e.update&&(this.space(),t.plain(e.update)),this.push(")"),t.block(e.body)}function u(e,t){this.keyword("while"),this.push("("),t.plain(e.test),this.push(")"),t.block(e.body)}function p(e,t){this.push("do "),t.plain(e.body),this.space(),this.keyword("while"),this.push("("),t.plain(e.test),this.push(");")}function l(e,t){t.plain(e.label),this.push(": "),t.plain(e.body)}function c(e,t){this.keyword("try"),t.plain(e.block),this.space(),e.handlers?t.plain(e.handlers[0]):t.plain(e.handler),e.finalizer&&(this.space(),this.push("finally "),t.plain(e.finalizer))}function f(e,t){this.keyword("catch"),this.push("("),t.plain(e.param),this.push(") "),t.plain(e.body)}function d(e,t){this.keyword("switch"),this.push("("),t.plain(e.discriminant),this.push(")"),this.space(),this.push("{"),t.sequence(e.cases,{indent:!0,addNewlines:function(t,r){return t||e.cases[e.cases.length-1]!==r?void 0:-1}}),this.push("}")}function h(e,t){e.test?(this.push("case "),t.plain(e.test),this.push(":")):this.push("default:"),e.consequent.length&&(this.newline(),t.sequence(e.consequent,{indent:!0}))}function m(){this.push("debugger;")}function y(e,t,r){this.push(e.kind+" ");var n=!1;if(!x.isFor(r))for(var i=e.declarations,a=0;a<i.length;a++){var s=i[a];s.init&&(n=!0)}var o;this.format.compact||this.format.concise||!n||this.format.retainLines||(o=",\n"+b["default"](" ",e.kind.length+1)),t.list(e.declarations,{separator:o}),(!x.isFor(r)||r.left!==e&&r.init!==e)&&this.semicolon()}function g(e,t){t.plain(e.id),t.plain(e.id.typeAnnotation),e.init&&(this.space(),this.push("="),this.space(),t.plain(e.init))}r.__esModule=!0,r.WithStatement=a,r.IfStatement=s,r.ForStatement=o,r.WhileStatement=u,r.DoWhileStatement=p,r.LabeledStatement=l,r.TryStatement=c,r.CatchClause=f,r.SwitchStatement=d,r.SwitchCase=h,r.DebuggerStatement=m,r.VariableDeclaration=y,r.VariableDeclarator=g;var v=e(584),b=i(v),E=e(179),x=n(E),S=function(e){return function(t,r){this.keyword("for"),this.push("("),r.plain(t.left),this.push(" "+e+" "),r.plain(t.right),this.push(")"),r.block(t.body)}},A=S("in");r.ForInStatement=A;var D=S("of");r.ForOfStatement=D;var C=function(e){var t=arguments.length<=1||void 0===arguments[1]?"label":arguments[1];return function(r,n){this.push(e);var i=r[t];if(i){this.push(" ");var a=this.startTerminatorless();n.plain(i),this.endTerminatorless(a)}this.semicolon()}},w=C("continue");r.ContinueStatement=w;var I=C("return","argument");r.ReturnStatement=I;var _=C("break");r.BreakStatement=_;var F=C("throw","argument");r.ThrowStatement=F},{179:179,584:584}],28:[function(e,t,r){"use strict";function n(e,t){t.plain(e.tag),t.plain(e.quasi)}function i(e){this._push(e.value.raw)}function a(e,t){this.push("`");for(var r=e.quasis,n=r.length,i=0;n>i;i++)t.plain(r[i]),n>i+1&&(this.push("${ "),t.plain(e.expressions[i]),this.push(" }"));this._push("`")}r.__esModule=!0,r.TaggedTemplateExpression=n,r.TemplateElement=i,r.TemplateLiteral=a},{}],29:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){this.push(e.name)}function a(e,t){this.push("..."),t.plain(e.argument)}function s(e,t){var r=e.properties;this.push("{"),t.printInnerComments(),r.length&&(this.space(),t.list(r,{indent:!0}),this.space()),this.push("}")}function o(e,t){if(t.list(e.decorators,{separator:""}),e.method||"get"===e.kind||"set"===e.kind)this._method(e,t);else{if(e.computed)this.push("["),t.plain(e.key),this.push("]");else{if(d.isAssignmentPattern(e.value)&&d.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void t.plain(e.value);if(t.plain(e.key),e.shorthand&&d.isIdentifier(e.key)&&d.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.push(":"),this.space(),t.plain(e.value)}}function u(e,t){var r=e.elements,n=r.length;this.push("["),t.printInnerComments();for(var i=0;i<r.length;i++){var a=r[i];a?(i>0&&this.space(),t.plain(a),n-1>i&&this.push(",")):this.push(",")}this.push("]")}function p(e){this.push(""),this._push(this._Literal(e))}function l(e){var t=e.value;if(e.regex)return"/"+e.regex.pattern+"/"+e.regex.flags;if(null!=e.raw&&null!=e.rawValue&&t===e.rawValue)return e.raw;switch(typeof t){case"string":return this._stringLiteral(t);case"number":return t+"";case"boolean":return t?"true":"false";default:if(null===t)return"null";throw new Error("Invalid Literal type")}}function c(e){return e=JSON.stringify(e),e=e.replace(/[\u000A\u000D\u2028\u2029]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}),"single"===this.format.quotes&&(e=e.slice(1,-1),e=e.replace(/\\"/g,'"'),e=e.replace(/'/g,"\\'"),e="'"+e+"'"),e}r.__esModule=!0,r.Identifier=i,r.RestElement=a,r.ObjectExpression=s,r.Property=o,r.ArrayExpression=u,r.Literal=p,r._Literal=l,r._stringLiteral=c;var f=e(179),d=n(f);r.SpreadElement=a,r.SpreadProperty=a,r.ObjectPattern=s,r.ArrayPattern=u},{179:179}],30:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e(391),u=i(o),p=e(37),l=i(p),c=e(33),f=i(c),d=e(584),h=i(d),m=e(36),y=i(m),g=e(35),v=i(g),b=e(43),E=n(b),x=e(18),S=i(x),A=e(511),D=i(A),C=e(411),w=i(C),I=e(31),_=i(I),F=e(179),k=n(F),P=function(){function t(e,r,n){a(this,t),r=r||{},this.comments=e.comments||[],this.tokens=e.tokens||[],this.format=t.normalizeOptions(n,r,this.tokens),this.opts=r,this.ast=e,this.whitespace=new l["default"](this.tokens),this.position=new v["default"],this.map=new y["default"](this.position,r,n),this.buffer=new S["default"](this.position,this.format)}return t.normalizeOptions=function(e,r,n){var i=" ";if(e){var a=u["default"](e).indent;a&&" "!==a&&(i=a)}var s={shouldPrintComment:r.shouldPrintComment,retainLines:r.retainLines,comments:null==r.comments||r.comments,compact:r.compact,quotes:t.findCommonStringDelimiter(e,n),indent:{adjustMultilineComment:!0,style:i,base:0}};return"auto"===s.compact&&(s.compact=e.length>1e5,s.compact&&console.error("[BABEL] "+E.get("codeGeneratorDeopt",r.filename,"100KB"))),s.compact&&(s.indent.adjustMultilineComment=!1),s},t.findCommonStringDelimiter=function(e,t){for(var r={single:0,"double":0},n=0,i=0;i<t.length;i++){var a=t[i];if("string"===a.type.label){var s=e.slice(a.start,a.end);if("'"===s[0]?r.single++:r["double"]++,n++,n>=3)break}}return r.single>r["double"]?"single":"double"},t.prototype.generate=function(){var e=this.ast;if(this.print(e),e.comments){for(var t=[],r=e.comments,n=0;n<r.length;n++){var i=r[n];i._displayed||t.push(i)}this._printComments(t)}return{map:this.map.get(),code:this.buffer.get()}},t.prototype.buildPrint=function(e){return new f["default"](this,e)},t.prototype.catchUp=function(e){if(e.loc&&this.format.retainLines&&this.buffer.buf)for(;this.position.line<e.loc.start.line;)this._push("\n"); },t.prototype._printNewline=function(e,t,r,n){if(n.statement||_["default"].isUserWhitespacable(t,r)){var i=0;if(null==t.start||t._ignoreUserWhitespace){e||i++,n.addNewlines&&(i+=n.addNewlines(e,t)||0);var a=_["default"].needsWhitespaceAfter;e&&(a=_["default"].needsWhitespaceBefore),a(t,r)&&i++,this.buffer.buf||(i=0)}else i=e?this.whitespace.getNewlinesBefore(t):this.whitespace.getNewlinesAfter(t);this.newline(i)}},t.prototype.print=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(e){t&&t._compact&&(e._compact=!0);var n=this.format.concise;if(e._compact&&(this.format.concise=!0),!this[e.type])throw new ReferenceError("unknown node of type "+JSON.stringify(e.type)+" with constructor "+JSON.stringify(e&&e.constructor.name));var i=_["default"].needsParens(e,t);i&&this.push("("),this.printLeadingComments(e,t),this.catchUp(e),this._printNewline(!0,e,t,r),r.before&&r.before(),this.map.mark(e,"start"),this[e.type](e,this.buildPrint(e),t),i&&this.push(")"),this.map.mark(e,"end"),r.after&&r.after(),this.format.concise=n,this._printNewline(!1,e,t,r),this.printTrailingComments(e,t)}},t.prototype.printJoin=function(e,t){var r=this,n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(t&&t.length){var i=t.length;n.indent&&this.indent();for(var a={statement:n.statement,addNewlines:n.addNewlines,after:function(){n.iterator&&n.iterator(o,s),n.separator&&i-1>s&&r.push(n.separator)}},s=0;s<t.length;s++){var o=t[s];e.plain(o,a)}n.indent&&this.dedent()}},t.prototype.printAndIndentOnComments=function(e,t){var r=!!t.leadingComments;r&&this.indent(),e.plain(t),r&&this.dedent()},t.prototype.printBlock=function(e,t){k.isEmptyStatement(t)?this.semicolon():(this.push(" "),e.plain(t))},t.prototype.generateComment=function(e){var t=e.value;return t="CommentLine"===e.type?"//"+t:"/*"+t+"*/"},t.prototype.printTrailingComments=function(e,t){this._printComments(this.getComments("trailingComments",e,t))},t.prototype.printLeadingComments=function(e,t){this._printComments(this.getComments("leadingComments",e,t))},t.prototype.getComments=function(e,t,r){if(k.isExpressionStatement(r))return[];var n=[],i=[t];k.isExpressionStatement(t)&&i.push(t.argument);for(var a=i,s=0;s<a.length;s++){var o=a[s];n=n.concat(this._getComments(e,o))}return n},t.prototype._getComments=function(e,t){return t&&t[e]||[]},t.prototype.shouldPrintComment=function(e){return this.format.shouldPrintComment?this.format.shouldPrintComment(e.value):e.value.indexOf("@license")>=0||e.value.indexOf("@preserve")>=0?!0:this.format.comments},t.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=0;r<t.length;r++){var n=t[r];if(this.shouldPrintComment(n)&&!n._displayed){n._displayed=!0,this.catchUp(n),this.newline(this.whitespace.getNewlinesBefore(n));var i=this.position.column,a=this.generateComment(n);if(i&&!this.isLast(["\n"," ","[","{"])&&(this._push(" "),i++),"CommentBlock"===n.type&&this.format.indent.adjustMultilineComment){var s=n.loc&&n.loc.start.column;if(s){var o=new RegExp("\\n\\s{1,"+s+"}","g");a=a.replace(o,"\n")}var u=Math.max(this.indentSize(),i);a=a.replace(/\n/g,"\n"+h["default"](" ",u))}0===i&&(a=this.getIndent()+a),(this.format.compact||this.format.retainLines)&&"CommentLine"===n.type&&(a+="\n"),this._push(a),this.newline(this.whitespace.getNewlinesAfter(n))}}},s(t,null,[{key:"generators",value:{templateLiterals:e(28),comprehensions:e(21),expressions:e(22),statements:e(27),classes:e(20),methods:e(25),modules:e(26),types:e(29),flow:e(23),base:e(19),jsx:e(24)},enumerable:!0}]),t}();w["default"](S["default"].prototype,function(e,t){P.prototype[t]=function(){return e.apply(this.buffer,arguments)}}),w["default"](P.generators,function(e){D["default"](P.prototype,e)}),t.exports=function(e,t,r){var n=new P(e,t,r);return n.generate()},t.exports.CodeGenerator=P},{179:179,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,31:31,33:33,35:35,36:36,37:37,391:391,411:411,43:43,511:511,584:584}],31:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=e(34),o=i(s),u=e(32),p=n(u),l=e(411),c=i(l),f=e(416),d=i(f),h=e(179),m=n(h),y=function(e,t,r){if(e){for(var n,i=Object.keys(e),a=0;a<i.length;a++){var s=i[a];if(m.is(s,t)){var o=e[s];if(n=o(t,r),null!=n)break}}return n}},g=function(){function e(t,r){a(this,e),this.parent=r,this.node=t}return e.isUserWhitespacable=function(e){return m.isUserWhitespacable(e)},e.needsWhitespace=function(t,r,n){if(!t)return 0;m.isExpressionStatement(t)&&(t=t.expression);var i=y(o["default"].nodes,t,r);if(!i){var a=y(o["default"].list,t,r);if(a)for(var s=0;s<a.length&&!(i=e.needsWhitespace(a[s],t,n));s++);}return i&&i[n]||0},e.needsWhitespaceBefore=function(t,r){return e.needsWhitespace(t,r,"before")},e.needsWhitespaceAfter=function(t,r){return e.needsWhitespace(t,r,"after")},e.needsParens=function(e,t){if(!t)return!1;if(m.isNewExpression(t)&&t.callee===e){if(m.isCallExpression(e))return!0;var r=d["default"](e,function(e){return m.isCallExpression(e)});if(r)return!0}return y(p,e,t)},e}();r["default"]=g,c["default"](g,function(e,t){g.prototype[t]=function(){var e=new Array(arguments.length+2);e[0]=this.node,e[1]=this.parent;for(var r=0;r<e.length;r++)e[r+2]=arguments[r];return g[t].apply(null,e)}}),t.exports=r["default"]},{179:179,32:32,34:34,411:411,416:416}],32:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return E.isArrayTypeAnnotation(t)}function s(e,t){return E.isMemberExpression(t)&&t.object===e?!0:void 0}function o(e,t){return E.isExpressionStatement(t)?!0:E.isMemberExpression(t)&&t.object===e?!0:!1}function u(e,t){if((E.isCallExpression(t)||E.isNewExpression(t))&&t.callee===e)return!0;if(E.isUnaryLike(t))return!0;if(E.isMemberExpression(t)&&t.object===e)return!0;if(E.isBinary(t)){var r=t.operator,n=x[r],i=e.operator,a=x[i];if(n>a)return!0;if(n===a&&t.right===e&&!E.isLogicalExpression(t))return!0}}function p(e,t){if("in"===e.operator){if(E.isVariableDeclarator(t))return!0;if(E.isFor(t))return!0}}function l(e,t){return E.isForStatement(t)?!1:E.isExpressionStatement(t)&&t.expression===e?!1:E.isReturnStatement(t)?!1:!0}function c(e,t){return E.isBinary(t)||E.isUnaryLike(t)||E.isCallExpression(t)||E.isMemberExpression(t)||E.isNewExpression(t)||E.isConditionalExpression(t)||E.isYieldExpression(t)}function f(e,t){return E.isExpressionStatement(t)}function d(e,t){return E.isMemberExpression(t)&&t.object===e}function h(e,t){return E.isExpressionStatement(t)?!0:E.isMemberExpression(t)&&t.object===e?!0:E.isCallExpression(t)&&t.callee===e?!0:void 0}function m(e,t){return E.isUnaryLike(t)?!0:E.isBinary(t)?!0:(E.isCallExpression(t)||E.isNewExpression(t))&&t.callee===e?!0:E.isConditionalExpression(t)&&t.test===e?!0:E.isMemberExpression(t)&&t.object===e?!0:!1}function y(e){return E.isObjectPattern(e.left)?!0:m.apply(void 0,arguments)}r.__esModule=!0,r.NullableTypeAnnotation=a,r.UpdateExpression=s,r.ObjectExpression=o,r.Binary=u,r.BinaryExpression=p,r.SequenceExpression=l,r.YieldExpression=c,r.ClassExpression=f,r.UnaryLike=d,r.FunctionExpression=h,r.ConditionalExpression=m,r.AssignmentExpression=y;var g=e(411),v=i(g),b=e(179),E=n(b),x={};v["default"]([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(e,t){v["default"](e,function(e){x[e]=t})}),r.FunctionTypeAnnotation=a},{179:179,411:411}],33:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var i=function(){function e(t,r){n(this,e),this.generator=t,this.parent=r}return e.prototype.printInnerComments=function(){if(this.parent.innerComments){var e=this.generator;e.indent(),e._printComments(this.parent.innerComments),e.dedent()}},e.prototype.plain=function(e,t){return this.generator.print(e,this.parent,t)},e.prototype.sequence=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.statement=!0,this.generator.printJoin(this,e,t)},e.prototype.join=function(e,t){return this.generator.printJoin(this,e,t)},e.prototype.list=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return null==t.separator&&(t.separator=",",this.generator.format.compact||(t.separator+=" ")),this.join(e,t)},e.prototype.block=function(e){return this.generator.printBlock(this,e)},e.prototype.indentOnComments=function(e){return this.generator.printAndIndentOnComments(this,e)},e}();r["default"]=i,t.exports=r["default"]},{}],34:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return m.isMemberExpression(e)?(a(e.object,t),e.computed&&a(e.property,t)):m.isBinary(e)||m.isAssignmentExpression(e)?(a(e.left,t),a(e.right,t)):m.isCallExpression(e)?(t.hasCall=!0,a(e.callee,t)):m.isFunction(e)?t.hasFunction=!0:m.isIdentifier(e)&&(t.hasHelper=t.hasHelper||s(e.callee)),t}function s(e){return m.isMemberExpression(e)?s(e.object)||s(e.property):m.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:m.isCallExpression(e)?s(e.callee):m.isBinary(e)||m.isAssignmentExpression(e)?m.isIdentifier(e.left)&&s(e.left)||s(e.right):!1}function o(e){return m.isLiteral(e)||m.isObjectExpression(e)||m.isArrayExpression(e)||m.isIdentifier(e)||m.isMemberExpression(e)}var u=e(498),p=i(u),l=e(411),c=i(l),f=e(414),d=i(f),h=e(179),m=n(h);r.nodes={AssignmentExpression:function(e){var t=a(e.right);return t.hasCall&&t.hasHelper||t.hasFunction?{before:t.hasFunction,after:!0}:void 0},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){return m.isFunction(e.left)||m.isFunction(e.right)?{after:!0}:void 0},Literal:function(e){return"use strict"===e.value?{after:!0}:void 0},CallExpression:function(e){return m.isFunction(e.callee)||s(e)?{before:!0,after:!0}:void 0},VariableDeclaration:function(e){for(var t=0;t<e.declarations.length;t++){var r=e.declarations[t],n=s(r.id)&&!o(r.init);if(!n){var i=a(r.init);n=s(r.init)&&i.hasCall||i.hasFunction}if(n)return{before:!0,after:!0}}},IfStatement:function(e){return m.isBlockStatement(e.consequent)?{before:!0,after:!0}:void 0}},r.nodes.Property=r.nodes.SpreadProperty=function(e,t){return t.properties[0]===e?{before:!0}:void 0},r.list={VariableDeclaration:function(e){return d["default"](e.declarations,"init")},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties}},c["default"]({Function:!0,Class:!0,Loop:!0,LabeledStatement:!0,SwitchStatement:!0,TryStatement:!0},function(e,t){p["default"](e)&&(e={after:e,before:e}),c["default"]([t].concat(m.FLIPPED_ALIAS_KEYS[t]||[]),function(t){r.nodes[t]=function(){return e}})})},{179:179,411:411,414:414,498:498}],35:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var i=function(){function e(){n(this,e),this.line=1,this.column=0}return e.prototype.push=function(e){for(var t=0;t<e.length;t++)"\n"===e[t]?(this.line++,this.column=0):this.column++},e.prototype.unshift=function(e){for(var t=0;t<e.length;t++)"\n"===e[t]?this.line--:this.column--},e}();r["default"]=i,t.exports=r["default"]},{}],36:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=e(599),o=i(s),u=e(179),p=n(u),l=function(){function e(t,r,n){a(this,e),this.position=t,this.opts=r,r.sourceMaps?(this.map=new o["default"].SourceMapGenerator({file:r.sourceMapTarget,sourceRoot:r.sourceRoot}),this.map.setSourceContent(r.sourceFileName,n)):this.map=null}return e.prototype.get=function(){var e=this.map;return e?e.toJSON():e},e.prototype.mark=function(e,t){var r=e.loc;if(r){var n=this.map;if(n&&!p.isProgram(e)&&!p.isFile(e)){var i=this.position,a={line:i.line,column:i.column},s=r[t];n.addMapping({source:this.opts.sourceFileName,generated:a,original:s})}}},e}();r["default"]=l,t.exports=r["default"]},{179:179,599:599}],37:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r){return e+=t,e>=r&&(e-=r),e}r.__esModule=!0;var a=function(){function e(t){n(this,e),this.tokens=t,this.used={},this._lastFoundIndex=0}return e.prototype.getNewlinesBefore=function(e){for(var t,r,n=this.tokens,a=0;a<n.length;a++){var s=i(a,this._lastFoundIndex,this.tokens.length),o=n[s];if(e.start===o.start){t=n[s-1],r=o,this._lastFoundIndex=s;break}}return this.getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){for(var t,r,n=this.tokens,a=0;a<n.length;a++){var s=i(a,this._lastFoundIndex,this.tokens.length),o=n[s];if(e.end===o.end){t=o,r=n[s+1],","===r.type.label&&(r=n[s+2]),this._lastFoundIndex=s;break}}if(r&&"eof"===r.type.label)return 1;var u=this.getNewlinesBetween(t,r);return"CommentLine"!==e.type||u?u:1},e.prototype.getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,a=r;n>a;a++)"undefined"==typeof this.used[a]&&(this.used[a]=!0,i++);return i},e}();r["default"]=a,t.exports=r["default"]},{}],38:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=c["default"].matchToToken(e);if("name"===t.type&&d["default"].keyword.isReservedWordES6(t.value))return"keyword";if("punctuator"===t.type)switch(t.value){case"{":case"}":return"curly";case"(":case")":return"parens";case"[":case"]":return"square"}return t.type}function a(e){return e.replace(c["default"],function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];var n=i(t),a=y[n];return a?t[0].split(g).map(function(e){return a(e)}).join("\n"):t[0]})}r.__esModule=!0;var s=e(403),o=n(s),u=e(584),p=n(u),l=e(401),c=n(l),f=e(395),d=n(f),h=e(200),m=n(h),y={string:m["default"].red,punctuator:m["default"].bold,curly:m["default"].green,parens:m["default"].blue.bold,square:m["default"].yellow,keyword:m["default"].cyan,number:m["default"].magenta,regex:m["default"].magenta,comment:m["default"].grey,invalid:m["default"].inverse},g=/\r\n|[\n\r\u2028\u2029]/;r["default"]=function(e,t,r){var n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];r=Math.max(r,0);var i=n.highlightCode&&m["default"].supportsColor;i&&(e=a(e)),e=e.split(g);var s=Math.max(t-3,0),u=Math.min(e.length,t+3);t||r||(s=0,u=e.length);var l=o["default"](e.slice(s,u),{start:s+1,before:" ",after:" | ",transform:function(e){e.number===t&&(r&&(e.line+="\n"+e.before+p["default"](" ",e.width)+e.after+p["default"](" ",r-1)+"^"),e.before=e.before.replace(/^./,">"))}}).join("\n");return i?m["default"].reset(l):l},t.exports=r["default"]},{200:200,395:395,401:401,403:403,584:584}],39:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var i=e(515),a=n(i);r["default"]=function(e,t){return e&&t?a["default"](e,t,function(e,t){if(t&&Array.isArray(e)){for(var r=e.slice(0),n=t,i=Array.isArray(n),a=0,n=i?n:n[Symbol.iterator]();;){var s;if(i){if(a>=n.length)break;s=n[a++]}else{if(a=n.next(),a.done)break;s=a.value}var o=s;e.indexOf(o)<0&&r.push(o)}return r}}):void 0},t.exports=r["default"]},{515:515}],40:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i);r["default"]=function(e,t,r){if(e&&"Program"===e.type)return a.file(e,t||[],r||[]);throw new Error("Not a valid ast?")},t.exports=r["default"]},{179:179}],41:[function(e,t,r){"use strict";r.__esModule=!0,r["default"]=function(){return Object.create(null)},t.exports=r["default"]},{}],42:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(605),a=n(i);r["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r={allowImportExportEverywhere:t.looseModules,allowReturnOutsideFunction:t.looseModules,allowHashBang:!0,ecmaVersion:6,strictMode:t.strictMode,sourceType:t.sourceType,locations:!0,features:t.features||{},plugins:t.plugins||{}};return t.nonStandard&&(r.plugins.jsx=!0,r.plugins.flow=!0),a.parse(e,r)},t.exports=r["default"]},{605:605}],43:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];var i=u[e];if(!i)throw new ReferenceError("Unknown message "+JSON.stringify(e));return r=a(r),i.replace(/\$(\d+)/g,function(e,t){return r[--t]})}function a(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return JSON.stringify(e)||e+""}catch(t){return o.inspect(e)}})}r.__esModule=!0,r.get=i,r.parseArgs=a;var s=e(13),o=n(s),u={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File got a $1 node",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginIllegalKind:"Illegal kind $1 for plugin $2",pluginIllegalPosition:"Illegal position $1 for plugin $2",pluginKeyCollision:"The plugin $1 collides with another of the same name",pluginNotTransformer:"The plugin $1 didn't export a Plugin instance",pluginUnknown:"Unknown plugin $1",pluginNotFile:"Plugin $1 is resolving to a different Babel version than what is performing the transformation.",pluginInvalidProperty:"Plugin $1 provided an invalid property of $2.",pluginInvalidPropertyVisitor:'Define your visitor methods inside a `visitor` property like so:\n\n new Plugin("foobar", {\n visitor: {\n // define your visitor methods here!\n }\n });\n'};r.MESSAGES=u},{13:13}],44:[function(e,t,r){(function(t){"use strict";if(e(387),e(577),t._babelPolyfill)throw new Error("only one instance of babel/polyfill is allowed");t._babelPolyfill=!0}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{387:387,577:577}],45:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var r=[],n=E.functionExpression(null,[E.identifier("global")],E.blockStatement(r)),i=E.program([E.expressionStatement(E.callExpression(n,[h.template("helper-self-global")]))]);return r.push(E.variableDeclaration("var",[E.variableDeclarator(e,E.assignmentExpression("=",E.memberExpression(E.identifier("global"),e),E.objectExpression([])))])),t(r),i}function s(e,t){var r=[];r.push(E.variableDeclaration("var",[E.variableDeclarator(e,E.identifier("global"))])),t(r);var n=h.template("umd-commonjs-strict",{FACTORY_PARAMETERS:E.identifier("global"),BROWSER_ARGUMENTS:E.assignmentExpression("=",E.memberExpression(E.identifier("root"),e),E.objectExpression({})),COMMON_ARGUMENTS:E.identifier("exports"),AMD_ARGUMENTS:E.arrayExpression([E.literal("exports")]),FACTORY_BODY:r,UMD_ROOT:E.identifier("this")});return E.program([n])}function o(e,t){var r=[];return r.push(E.variableDeclaration("var",[E.variableDeclarator(e,E.objectExpression({}))])),t(r),E.program(r)}function u(e,t,r){v["default"](y["default"].helpers,function(n){if(!r||-1!==r.indexOf(n)){var i=E.identifier(E.toIdentifier(n));e.push(E.expressionStatement(E.assignmentExpression("=",E.memberExpression(t,i),h.template("helper-"+n))))}})}r.__esModule=!0;var p=e(30),l=i(p),c=e(43),f=n(c),d=e(182),h=n(d),m=e(46),y=i(m),g=e(411),v=i(g),b=e(179),E=n(b);r["default"]=function(e){var t,r=arguments.length<=1||void 0===arguments[1]?"global":arguments[1],n=E.identifier("babelHelpers"),i=function(t){return u(t,n,e)},p={global:a,umd:s,"var":o}[r];if(!p)throw new Error(f.get("unsupportedOutputType",r));return t=p(n,i),l["default"](t).code},t.exports=r["default"]},{179:179,182:182,30:30,411:411,43:43,46:46}],46:[function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function a(e){return e&&e.__esModule?e:{"default":e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=e(208),p=a(u),l=e(74),c=a(l),f=e(50),d=a(f),h=e(52),m=a(h),y=e(587),g=a(y),v=e(155),b=a(v),E=e(500),x=a(E),S=e(599),A=a(S),D=e(30),C=a(D),w=e(38),I=a(w),_=e(510),F=a(_),k=e(413),P=a(k),B=e(148),T=a(B),M=e(602),O=a(M),j=e(47),L=a(j),N=e(82),R=a(N),V=e(42),U=a(V),q=e(147),G=a(q),H=e(182),W=i(H),X=e(9),Y=a(X),J=e(179),z=i(J),K=function(){function t(e,r){void 0===e&&(e={}),s(this,t),this.transformerDependencies={},this.dynamicImportTypes={},this.dynamicImportIds={},this.dynamicImports=[],this.declarations={},this.usedHelpers={},this.dynamicData={},this.data={},this.ast={},this.metadata={modules:{imports:[],exports:{exported:[],specifiers:[]}}},this.hub=new G["default"](this),this.pipeline=r,this.log=new L["default"](this,e.filename||"unknown"),this.opts=this.initOptions(e),this.buildTransformers()}return t.prototype.initOptions=function(e){return e=new d["default"](this.log,this.pipeline).init(e),e.inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=Y["default"].basename(e.filename,Y["default"].extname(e.filename)),e.ignore=W.arrayify(e.ignore,W.regexify),e.only&&(e.only=W.arrayify(e.only,W.regexify)),F["default"](e,{moduleRoot:e.sourceRoot}),F["default"](e,{sourceRoot:e.moduleRoot}),F["default"](e,{filenameRelative:e.filename}),F["default"](e,{sourceFileName:e.filenameRelative,sourceMapTarget:e.filenameRelative}),e.externalHelpers&&this.set("helpersNamespace",z.identifier("babelHelpers")),e},t.prototype.isLoose=function(e){return P["default"](this.opts.loose,e)},t.prototype.buildTransformers=function(){var e=this,t=this.transformers={},r=[],n=[];for(var i in this.pipeline.transformers){var a=this.pipeline.transformers[i],s=t[i]=a.buildPass(e);s.canTransform()&&(n.push(s),a.metadata.secondPass&&r.push(s),a.manipulateOptions&&a.manipulateOptions(e.opts,e))}for(var o=[],u=[],p=new m["default"]({file:this,transformers:this.transformers,before:o,after:u}),l=0;l<e.opts.plugins.length;l++)p.add(e.opts.plugins[l]);n=o.concat(n,u),this.uncollapsedTransformerStack=n=n.concat(r);for(var c=n,f=0;f<c.length;f++)for(var s=c[f],d=s.plugin.dependencies,h=0;h<d.length;h++){var y=d[h];this.transformerDependencies[y]=s.key}this.transformerStack=this.collapseStack(n)},t.prototype.collapseStack=function(e){for(var t=[],r=[],n=e,i=0;i<n.length;i++){var a=n[i];if(!(r.indexOf(a)>=0)){var s=a.plugin.metadata.group;if(a.canTransform()&&s){for(var o=[],u=e,p=0;p<u.length;p++){var l=u[p];l.plugin.metadata.group===s&&(o.push(l),r.push(l))}for(var c=[],f=o,d=0;d<f.length;d++){var h=f[d];c.push(h.plugin.visitor)}var m=T["default"].visitors.merge(c),y=new R["default"](s,{visitor:m});t.push(y.buildPass(this))}else t.push(a)}}return t},t.prototype.set=function(e,t){return this.data[e]=t},t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(e){var t=this.data[e];if(t)return t;var r=this.dynamicData[e];return r?this.set(e,r()):void 0},t.prototype.resolveModuleSource=function r(e){var r=this.opts.resolveModuleSource;return r&&(e=r(e,this.opts.filename)),e},t.prototype.addImport=function(e,t,r){t=t||e;var n=this.dynamicImportIds[t];if(!n){e=this.resolveModuleSource(e),n=this.dynamicImportIds[t]=this.scope.generateUidIdentifier(t);var i=[z.importDefaultSpecifier(n)],a=z.importDeclaration(i,z.literal(e));if(a._blockHoist=3,r){var s=this.dynamicImportTypes[r]=this.dynamicImportTypes[r]||[];s.push(a)}this.transformers["es6.modules"].canTransform()?(this.moduleFormatter.importSpecifier(i[0],a,this.dynamicImports,this.scope),this.moduleFormatter.hasLocalImports=!0):this.dynamicImports.push(a)}return n},t.prototype.attachAuxiliaryComment=function(e){var t=this.opts.auxiliaryCommentBefore;t&&(e.leadingComments=e.leadingComments||[],e.leadingComments.push({type:"CommentLine",value:" "+t}));var r=this.opts.auxiliaryCommentAfter;return r&&(e.trailingComments=e.trailingComments||[],e.trailingComments.push({type:"CommentLine",value:" "+r})),e},t.prototype.addHelper=function(e){var r=P["default"](t.soloHelpers,e);if(!r&&!P["default"](t.helpers,e))throw new ReferenceError("Unknown helper "+e);var n=this.declarations[e];if(n)return n;if(this.usedHelpers[e]=!0,!r){var i=this.get("helperGenerator"),a=this.get("helpersNamespace");if(i)return i(e);if(a){var s=z.identifier(z.toIdentifier(e));return z.memberExpression(a,s)}}var o=W.template("helper-"+e),u=this.declarations[e]=this.scope.generateUidIdentifier(e);return z.isFunctionExpression(o)&&!o.id?(o.body._compact=!0,o._generated=!0,o.id=u,o.type="FunctionDeclaration",this.attachAuxiliaryComment(o),this.path.unshiftContainer("body",o)):(o._compact=!0,this.scope.push({id:u,init:o,unique:!0})),u},t.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),a=this.declarations[i];if(a)return a;var s=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=z.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:s,init:u,_blockHoist:1.9}),s},t.prototype.errorWithNode=function(e,t){var r,n=arguments.length<=2||void 0===arguments[2]?SyntaxError:arguments[2],i=e&&(e.loc||e._loc);return i?(r=new n("Line "+i.start.line+": "+t),r.loc=i.start):r=new n("There's been an error on a dynamic node. This is almost certainly an internal error. Please report it."),r},t.prototype.mergeSourceMap=function(e){var t=this.opts,r=t.inputSourceMap;if(r){e.sources[0]=r.file;var n=new A["default"].SourceMapConsumer(r),i=new A["default"].SourceMapConsumer(e),a=A["default"].SourceMapGenerator.fromSourceMap(i);a.applySourceMap(n);var s=a.toJSON();return s.sources=r.sources,s.file=r.file,s}return e},t.prototype.getModuleFormatter=function(t){(x["default"](t)||!c["default"][t])&&this.log.deprecate("Custom module formatters are deprecated and will be removed in the next major. Please use Babel plugins instead.");var r=x["default"](t)?t:c["default"][t];if(!r){var n=O["default"].relative(t);n&&(r=e(n))}if(!r)throw new ReferenceError("Unknown module formatter type "+JSON.stringify(t));return new r(this)},t.prototype.parse=function(e){var t=this.opts,r={highlightCode:t.highlightCode,nonStandard:t.nonStandard,sourceType:t.sourceType,filename:t.filename,plugins:{}},n=r.features={};for(var i in this.transformers){var a=this.transformers[i];n[i]=a.canTransform()}r.looseModules=this.isLoose("es6.modules"),r.strictMode=n.strict,this.log.debug("Parse start");var s=U["default"](e,r);return this.log.debug("Parse stop"),s},t.prototype._addAst=function(e){this.path=b["default"].get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e},t.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST"),this.log.debug("Start module formatter init");var t=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);t.init&&this.transformers["es6.modules"].canTransform()&&t.init(),this.log.debug("End module formatter init")},t.prototype.transform=function(){this.call("pre");for(var e=this.transformerStack,t=0;t<e.length;t++){var r=e[t];r.transform()}return this.call("post"),this.generate()},t.prototype.wrap=function(e,t){e+="";try{return this.shouldIgnore()?this.makeResult({code:e,ignored:!0}):t()}catch(r){if(r._babel)throw r;r._babel=!0;var i=r.message=this.opts.filename+": "+r.message,a=r.loc;if(a&&(r.codeFrame=I["default"](e,a.line,a.column+1,this.opts),i+="\n"+r.codeFrame),n.browser&&(r.message=i),r.stack){var s=r.stack.replace(r.message,i);try{r.stack=s}catch(o){}}throw r}},t.prototype.addCode=function(e){e=(e||"")+"",e=this.parseInputSourceMap(e),this.code=e},t.prototype.parseCode=function(){this.parseShebang();var e=this.parse(this.code);this.addAst(e)},t.prototype.shouldIgnore=function(){var e=this.opts;return W.shouldIgnore(e.filename,e.ignore,e.only)},t.prototype.call=function(e){for(var t=this.uncollapsedTransformerStack,r=0;r<t.length;r++){var n=t[r],i=n.plugin[e];i&&i(this)}},t.prototype.parseInputSourceMap=function(e){var t=this.opts;if(t.inputSourceMap!==!1){var r=p["default"].fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=p["default"].removeComments(e))}return e},t.prototype.parseShebang=function(){var e=g["default"].exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(g["default"],""))},t.prototype.makeResult=function(e){var t=e.code,r=e.map,n=void 0===r?null:r,i=e.ast,a=e.ignored,s={metadata:null,ignored:!!a,code:null,ast:null,map:n};return this.opts.code&&(s.code=t), this.opts.ast&&(s.ast=i),this.opts.metadata&&(s.metadata=this.metadata,s.metadata.usedHelpers=Object.keys(this.usedHelpers)),s},t.prototype.generate=function(){var e=this.opts,t=this.ast,r={ast:t};if(!e.code)return this.makeResult(r);this.log.debug("Generation start");var n=C["default"](t,e,this.code);return r.code=n.code,r.map=n.map,this.log.debug("Generation end"),this.shebang&&(r.code=this.shebang+"\n"+r.code),r.map&&(r.map=this.mergeSourceMap(r.map)),("inline"===e.sourceMaps||"both"===e.sourceMaps)&&(r.code+="\n"+p["default"].fromObject(r.map).toComment()),"inline"===e.sourceMaps&&(r.map=null),this.makeResult(r)},o(t,null,[{key:"helpers",value:["inherits","defaults","create-class","create-decorated-class","create-decorated-object","define-decorated-property-descriptor","tagged-template-literal","tagged-template-literal-loose","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-export-wildcard","interop-require-wildcard","interop-require-default","typeof","extends","get","set","new-arrow-check","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","typeof-react-element","default-props","instanceof","interop-require"],enumerable:!0},{key:"soloHelpers",value:[],enumerable:!0}]),t}();r["default"]=K,t.exports=r["default"]}).call(this,e(10))},{10:10,147:147,148:148,155:155,179:179,182:182,208:208,30:30,38:38,413:413,42:42,47:47,50:50,500:500,510:510,52:52,587:587,599:599,602:602,74:74,82:82,9:9}],47:[function(e,t,r){"use strict";function n(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")}r.__esModule=!0;var a=e(389),s=n(a),o=s["default"]("babel:verbose"),u=s["default"]("babel"),p=[],l=function(){function e(t,r){i(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){var t=arguments.length<=1||void 0===arguments[1]?Error:arguments[1];throw new t(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),p.indexOf(e)>=0||(p.push(e),console.error(e)))},e.prototype.verbose=function(e){o.enabled&&o(this._buildMessage(e))},e.prototype.debug=function(e){u.enabled&&u(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();r["default"]=l,t.exports=r["default"]},{389:389}],48:[function(e,t,r){t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},extra:{hidden:!0,"default":{}},env:{hidden:!0,"default":{}},moduleId:{description:"specify a custom name for module ids",type:"string"},getModuleId:{hidden:!0},retainLines:{type:"boolean","default":!1,description:"retain line numbers - will result in really ugly code"},nonStandard:{type:"boolean","default":!0,description:"enable/disable support for JSX and Flow (on by default)"},experimental:{type:"boolean",description:"allow use of experimental transformers","default":!1},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean","default":!0},suppressDeprecationMessages:{type:"boolean","default":!1,hidden:!0},resolveModuleSource:{hidden:!0},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b","default":[]},whitelist:{type:"transformerList",optional:!0,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable","default":[]},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":!1,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)","default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:"","default":[]},ignore:{type:"list",description:"list of glob paths to **not** compile","default":[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,"default":!0,type:"boolean"},metadata:{hidden:!0,"default":!0,type:"boolean"},ast:{hidden:!0,"default":!0,type:"boolean"},comments:{type:"boolean","default":!0,description:"strip/output comments in generated output (on by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":!1,shorthand:"k"},auxiliaryComment:{deprecated:"renamed to auxiliaryCommentBefore",shorthand:"a",alias:"auxiliaryCommentBefore"},auxiliaryCommentBefore:{type:"string","default":"",description:"attach a comment before all helper declarations and auxiliary code"},auxiliaryCommentAfter:{type:"string","default":"",description:"attach a comment after all helper declarations and auxiliary code"},externalHelpers:{type:"boolean","default":!1,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{deprecated:"Not required anymore as this is enabled by default",type:"boolean","default":!1,hidden:!0},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":!1,shorthand:"s"},sourceMapName:{alias:"sourceMapTarget",description:"DEPRECATED - Please use sourceMapTarget"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":!1,hidden:!0,description:"stop trying to load .babelrc files"},babelrc:{description:"Specify a custom list of babelrc files to use",type:"list"},sourceType:{description:"","default":"module"}}},{}],49:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function a(e,t,r){var n=l["default"][e],i=n&&u[n.type];return i&&i.validate?i.validate(e,t,r):t}function s(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];for(var t in e){var r=e[t];if(null!=r){var n=l["default"][t];if(n){var i=u[n.type];i&&(r=i(r)),e[t]=r}}}return e}r.__esModule=!0,r.validateOption=a,r.normaliseOptions=s;var o=e(51),u=i(o),p=e(48),l=n(p);r.config=l["default"]},{48:48,51:51}],50:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){var t=D[e];return null!=t?t:D[e]=d["default"].sync(e)}r.__esModule=!0;var o=e(49),u=e(402),p=i(u),l=e(527),c=i(l),f=e(526),d=i(f),h=e(494),m=i(h),y=e(39),g=i(y),v=e(48),b=i(v),E=e(9),x=i(E),S=e(1),A=i(S),D={},C={},w=".babelignore",I=".babelrc",_="package.json",F=function(){function e(t,r){a(this,e),this.resolvedConfigs=[],this.options=e.createBareOptions(),this.pipeline=r,this.log=t}return e.createBareOptions=function(){var e={};for(var t in b["default"]){var r=b["default"][t];e[t]=m["default"](r["default"])}return e},e.prototype.addConfig=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?p["default"]:arguments[2];if(!(this.resolvedConfigs.indexOf(e)>=0)){var n,i=A["default"].readFileSync(e,"utf8");try{n=C[i]=C[i]||r.parse(i),t&&(n=n[t])}catch(a){throw a.message=e+": Error while parsing JSON - "+a.message,a}this.mergeOptions(n,e),this.resolvedConfigs.push(e)}},e.prototype.mergeOptions=function(e){var t=arguments.length<=1||void 0===arguments[1]?"foreign":arguments[1];if(e){for(var r in e)if("_"!==r[0]){var n=b["default"][r];n||this.log.error("Unknown option: "+t+"."+r,ReferenceError)}o.normaliseOptions(e),g["default"](this.options,e)}},e.prototype.addIgnoreConfig=function(e){var t=A["default"].readFileSync(e,"utf8"),r=t.split("\n");r=r.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e}),this.mergeOptions({ignore:r},e)},e.prototype.findConfigs=function(e){if(e)for(c["default"](e)||(e=x["default"].join(n.cwd(),e));e!==(e=x["default"].dirname(e));){if(this.options.breakConfig)return;var t=x["default"].join(e,I);s(t)&&this.addConfig(t);var r=x["default"].join(e,_);s(r)&&this.addConfig(r,"babel",JSON);var i=x["default"].join(e,w);s(i)&&this.addIgnoreConfig(i)}},e.prototype.normaliseOptions=function(){var e=this.options;for(var t in b["default"]){var r=b["default"][t],n=e[t];(n||!r.optional)&&(this.log&&n&&r.deprecated&&this.log.deprecate("Deprecated option "+t+": "+r.deprecated),this.pipeline&&n&&(n=o.validateOption(t,n,this.pipeline)),r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},e.prototype.init=function(e){if(this.mergeOptions(e,"direct"),e.babelrc)for(var t=e.babelrc,r=0;r<t.length;r++){var i=t[r];this.addConfig(i)}e.babelrc!==!1&&this.findConfigs(e.filename);var a=n.env.BABEL_ENV||n.env.NODE_ENV||"development";return this.options.env&&this.mergeOptions(this.options.env[a],"direct.env."+a),this.normaliseOptions(e),this.options},e}();r["default"]=F,t.exports=r["default"]}).call(this,e(10))},{1:1,10:10,39:39,402:402,48:48,49:49,494:494,526:526,527:527,9:9}],51:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e){return d.arrayify(e)}function s(e){return+e}function o(e){return!!e}function u(e){return d.booleanify(e)}function p(e){return d.list(e)}r.__esModule=!0,r.transformerList=a,r.number=s,r["boolean"]=o,r.booleanString=u,r.list=p;var l=e(588),c=i(l),f=e(182),d=n(f);a.validate=function(e,t,r){return(t.indexOf("all")>=0||t.indexOf(!0)>=0)&&(t=Object.keys(r.transformers)),r._ensureTransformerNames(e,t)};var h=c["default"];r.filename=h},{182:182,588:588}],52:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e(83),u=i(o),p=e(82),l=i(p),c=e(179),f=n(c),d=e(43),h=n(d),m=e(602),y=i(m),g=e(148),v=i(g),b=e(42),E=i(b),x={messages:h,Transformer:u["default"],Plugin:l["default"],types:f,parse:E["default"],traverse:v["default"]},S=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{transformers:{},before:[],after:[]}:arguments[0],r=e.file,n=e.transformers,i=e.before,s=e.after;a(this,t),this.transformers=n,this.file=r,this.before=i,this.after=s}return t.memoisePluginContainer=function(e){for(var r=0;r<t.memoisedPlugins.length;r++){var n=t.memoisedPlugins[r];if(n.container===e)return n.transformer}var i=e(x);return t.memoisedPlugins.push({container:e,transformer:i}),i},s(t,null,[{key:"memoisedPlugins",value:[],enumerable:!0},{key:"positions",value:["before","after"],enumerable:!0}]),t.prototype.subnormaliseString=function(t,r){var n=t.match(/^(.*?):(after|before)$/);n&&(t=n[1],r=n[2]);var i=y["default"].relative("babel-plugin-"+t)||y["default"].relative(t);if(i){var a=e(i);return{position:r,plugin:a["default"]||a}}throw new ReferenceError(h.get("pluginUnknown",t))},t.prototype.validate=function(e,t){var r=t.key;if(this.transformers[r])throw new ReferenceError(h.get("pluginKeyCollision",r));if(!t.buildPass||"Plugin"!==t.constructor.name)throw new TypeError(h.get("pluginNotTransformer",e));t.metadata.plugin=!0},t.prototype.add=function(e){var r,n;if(!e)throw new TypeError(h.get("pluginIllegalKind",typeof e,e));if("object"==typeof e&&e.transformer?(n=e.transformer,r=e.position):"string"!=typeof e&&(n=e),"string"==typeof e){var i=this.subnormaliseString(e,r);n=i.plugin,r=i.position}if(r=r||"before",t.positions.indexOf(r)<0)throw new TypeError(h.get("pluginIllegalPosition",r,e));"function"==typeof n&&(n=t.memoisePluginContainer(n)),this.validate(e,n);var a=this.transformers[n.key]=n.buildPass(this.file);if(a.canTransform()){var s="before"===r?this.before:this.after;s.push(a)}},t}();r["default"]=S,t.exports=r["default"]},{148:148,179:179,42:42,43:43,602:602,82:82,83:83}],53:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var a=e(58),s=i(a),o=e(179),u=n(o);r["default"]=function(e){var t={},r=function(t){return t.operator===e.operator+"="},n=function(e,t){return u.assignmentExpression("=",e,t)};return t.ExpressionStatement=function(t,i,a,o){if(!this.isCompletionRecord()){var p=t.expression;if(r(p)){var l=[],c=s["default"](p.left,l,o,a,!0);return l.push(u.expressionStatement(n(c.ref,e.build(c.uid,p.right)))),l}}},t.AssignmentExpression=function(t,i,a,o){if(r(t)){var u=[],p=s["default"](t.left,u,o,a);return u.push(n(p.ref,e.build(p.uid,t.right))),u}},t.BinaryExpression=function(t){return t.operator===e.operator?e.build(t.left,t.right):void 0},t},t.exports=r["default"]},{179:179,58:58}],54:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){var r=e.blocks.shift();if(r){var n=i(e,t);return n||(n=t(),e.filter&&(n=s.ifStatement(e.filter,s.blockStatement([n])))),s.forOfStatement(s.variableDeclaration("let",[s.variableDeclarator(r.left)]),r.right,s.blockStatement([n]))}}r.__esModule=!0,r["default"]=i;var a=e(179),s=n(a);t.exports=r["default"]},{179:179}],55:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var a=e(506),s=i(a),o=e(43),u=n(o),p=e(395),l=i(p),c=e(62),f=n(c),d=e(179),h=n(d);r["default"]=function(e){var t={};t.JSXIdentifier=function(e){return"this"===e.name&&this.isReferenced()?h.thisExpression():l["default"].keyword.isIdentifierNameES6(e.name)?void(e.type="Identifier"):h.literal(e.name)},t.JSXNamespacedName=function(){throw this.errorWithNode(u.get("JSXNamespacedTags"))},t.JSXMemberExpression={exit:function(e){e.computed=h.isLiteral(e.property),e.type="MemberExpression"}},t.JSXExpressionContainer=function(e){return e.expression},t.JSXAttribute={enter:function(e){var t=e.value;h.isLiteral(t)&&s["default"](t.value)&&(t.value=t.value.replace(/\n\s+/g," "))},exit:function(e){var t=e.value||h.literal(!0);return h.inherits(h.property("init",e.name,t),e)}},t.JSXOpeningElement={exit:function(t,n,i,a){n.children=f.buildChildren(n);var s,o=t.name,u=[];h.isIdentifier(o)?s=o.name:h.isLiteral(o)&&(s=o.value);var p={tagExpr:o,tagName:s,args:u};e.pre&&e.pre(p,a);var l=t.attributes;return l=l.length?r(l,a):h.literal(null),u.push(l),e.post&&e.post(p,a),p.call||h.callExpression(p.callee,u)}};var r=function(e,t){for(var r=[],n=[],i=function(){r.length&&(n.push(h.objectExpression(r)),r=[])};e.length;){var a=e.shift();h.isJSXSpreadAttribute(a)?(i(),n.push(a.argument)):r.push(a)}return i(),1===n.length?e=n[0]:(h.isObjectExpression(n[0])||n.unshift(h.objectExpression([])),e=h.callExpression(t.addHelper("extends"),n)),e};return t.JSXElement={exit:function(e){var t=e.openingElement;return t.arguments=t.arguments.concat(e.children),t.arguments.length>=3&&(t._prettyCall=!0),h.inherits(t,e)}},t},t.exports=r["default"]},{179:179,395:395,43:43,506:506,62:62}],56:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={enter:function(e,t,r,n){(this.isThisExpression()||this.isReferencedIdentifier({name:"arguments"}))&&(n.found=!0,this.stop())},Function:function(){this.skip()}};r["default"]=function(e,t){var r=a.functionExpression(null,[],e.body,e.generator,e.async),n=r,i=[],o={found:!1};t.traverse(e,s,o),o.found&&(n=a.memberExpression(r,a.identifier("apply")),i=[a.thisExpression(),a.identifier("arguments")]);var u=a.callExpression(n,i);return e.generator&&(u=a.yieldExpression(u,!0)),a.returnStatement(u)},t.exports=r["default"]},{179:179}],57:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,r,n){var i=m.toKeyAlias(t),a={};if(d["default"](e,i)&&(a=e[i]),e[i]=a,a._inherits=a._inherits||[],a._inherits.push(t),a._key=t.key,t.computed&&(a._computed=!0),t.decorators){var s=a.decorators=a.decorators||m.arrayExpression([]);s.elements=s.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(a.value||a.initializer)throw n.errorWithNode(t,"Key conflict with sibling node");return t.value&&("init"===t.kind&&(r="value"),"get"===t.kind&&(r="get"),"set"===t.kind&&(r="set"),m.inheritsComments(t.value,t),a[r]=t.value),a}function s(e){for(var t in e)if(e[t]._computed)return!0;return!1}function o(e){for(var t=m.arrayExpression([]),r=0;r<e.properties.length;r++){var n=e.properties[r],i=n.value;i.properties.unshift(m.property("init",m.identifier("key"),m.toComputedKey(n))),t.elements.push(i)}return t}function u(e){var t=m.objectExpression([]);return c["default"](e,function(e){var r=m.objectExpression([]),n=m.property("init",e._key,r,e._computed);c["default"](e,function(e,t){if("_"!==t[0]){var n=e;(m.isMethodDefinition(e)||m.isClassProperty(e))&&(e=e.value);var i=m.property("init",m.identifier(t),e);m.inheritsComments(i,n),m.removeComments(n),r.properties.push(i)}}),t.properties.push(n)}),t}function p(e){return c["default"](e,function(e){e.value&&(e.writable=m.literal(!0)),e.configurable=m.literal(!0),e.enumerable=m.literal(!0)}),u(e)}r.__esModule=!0,r.push=a,r.hasComputed=s,r.toComputedObjectFromClass=o,r.toClassObject=u,r.toDefineObject=p;var l=e(411),c=i(l),f=e(512),d=i(f),h=e(179),m=n(h)},{179:179,411:411,512:512}],58:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s=function(e,t,r,n){var i;if(a.isIdentifier(e)){if(n.hasBinding(e.name))return e;i=e}else{if(!a.isMemberExpression(e))throw new Error("We can't explode this node type "+e.type);if(i=e.object,a.isIdentifier(i)&&n.hasGlobal(i.name))return i}var s=n.generateUidIdentifierBasedOnNode(i);return t.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),s},o=function(e,t,r,n){var i=e.property,s=a.toComputedKey(e,i);if(a.isLiteral(s))return s;var o=n.generateUidIdentifierBasedOnNode(i);return t.push(a.variableDeclaration("var",[a.variableDeclarator(o,i)])),o};r["default"]=function(e,t,r,n,i){var u;u=a.isIdentifier(e)&&i?e:s(e,t,r,n);var p,l;if(a.isIdentifier(e))p=e,l=u;else{var c=o(e,t,r,n),f=e.computed||a.isLiteral(c);l=p=a.memberExpression(u,c,f)}return{uid:l,ref:p}},t.exports=r["default"]},{179:179}],59:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i);r["default"]=function(e){for(var t=0,r=0;r<e.params.length;r++){var n=e.params[r];a.isAssignmentPattern(n)||a.isRestElement(n)||(t=r+1)}return t},t.exports=r["default"]},{179:179}],60:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i);r["default"]=function(e,t){for(var r=0;r<e.length;r++){var n=e[r],i=n.expression;if(a.isMemberExpression(i)){var s,o=t.maybeGenerateMemoised(i.object),u=[];o?(s=o,u.push(a.assignmentExpression("=",o,i.object))):s=i.object,u.push(a.callExpression(a.memberExpression(a.memberExpression(s,i.property,i.computed),a.identifier("bind")),[s])),1===u.length?n.expression=u[0]:n.expression=a.sequenceExpression(u)}}return e},t.exports=r["default"]},{179:179}],61:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,r,n){if(t.name===n.name){var i=r.getBindingIdentifier(n.name);i===n.outerDeclar&&(n.selfReference=!0,e.stop())}}function s(e,t,r){var n=g(e,t.name,r);return y(n,e,t,r)}function o(e,t,r){var n=h.toComputedKey(e,e.key);if(h.isLiteral(n)){var i=h.toBindingIdentifierName(n.value),a=h.identifier(i),s=e.value,o=g(s,i,r);e.value=y(o,s,a,r)||s}}function u(e,t,r){if(!e.id){var n;if(!h.isProperty(t)||"init"!==t.kind||t.computed&&!h.isLiteral(t.key)){if(!h.isVariableDeclarator(t))return;if(n=t.id,h.isIdentifier(n)){var i=r.parent.getBinding(n.name);if(i&&i.constant&&r.getBinding(n.name)===i)return void(e.id=n)}}else n=t.key;var a;if(h.isLiteral(n))a=n.value;else{if(!h.isIdentifier(n))return;a=n.name}a=h.toBindingIdentifierName(a),n=h.identifier(a);var s=g(e,a,r);return y(s,e,n,r)}}r.__esModule=!0,r.custom=s,r.property=o,r.bare=u;var p=e(59),l=i(p),c=e(182),f=n(c),d=e(179),h=n(d),m={ReferencedIdentifier:function(e,t,r,n){a(this,e,r,n)},BindingIdentifier:function(e,t,r,n){a(this,e,r,n)}},y=function(e,t,r,n){if(e.selfReference){if(!n.hasBinding(r.name)||n.hasGlobal(r.name)){var i="property-method-assignment-wrapper";t.generator&&(i+="-generator");var a=f.template(i,{FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:n.generateUidIdentifier(r.name)});a.callee._skipModulesRemap=!0;for(var s=a.callee.body.body[0].params,o=0,u=l["default"](t);u>o;o++)s.push(n.generateUidIdentifier("x"));return a}n.rename(r.name)}t.id=r,n.getProgramParent().references[r.name]=!0},g=function(e,t,r){var n={selfAssignment:!1,selfReference:!1,outerDeclar:r.getBindingIdentifier(t),references:[],name:t},i=r.getOwnBinding(t);return i?"param"===i.kind&&(n.selfReference=!0):(n.outerDeclar||r.hasGlobal(t))&&r.traverse(e,m,n),n}},{179:179,182:182,59:59}],62:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&/^[a-z]|\-/.test(e)}function a(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,i=0;i<r.length;i++)r[i].match(/[^ \t]/)&&(n=i);for(var a="",i=0;i<r.length;i++){var s=r[i],o=0===i,p=i===r.length-1,l=i===n,c=s.replace(/\t/g," ");o||(c=c.replace(/^[ ]+/,"")),p||(c=c.replace(/[ ]+$/,"")),c&&(l||(c+=" "),a+=c)}a&&t.push(u.literal(a))}function s(e){for(var t=[],r=0;r<e.children.length;r++){var n=e.children[r];u.isLiteral(n)&&"string"==typeof n.value?a(n,t):(u.isJSXExpressionContainer(n)&&(n=n.expression),u.isJSXEmptyExpression(n)||t.push(n))}return t}r.__esModule=!0,r.isCompatTag=i,r.buildChildren=s;var o=e(179),u=n(o),p=u.buildMatchMemberExpression("React.Component");r.isReactComponent=p},{179:179}],63:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return l.isLiteral(e)&&e.regex&&e.regex.flags.indexOf(t)>=0}function s(e,t){var r=e.regex.flags.split("");e.regex.flags.indexOf(t)<0||(u["default"](r,t),e.regex.flags=r.join(""))}r.__esModule=!0,r.is=a,r.pullFlag=s;var o=e(408),u=i(o),p=e(179),l=n(p)},{179:179,408:408}],64:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={Function:function(){this.skip()},AwaitExpression:function(e){e.type="YieldExpression",e.all&&(e.all=!1,e.argument=a.callExpression(a.memberExpression(a.identifier("Promise"),a.identifier("all")),[e.argument]))}},o={ReferencedIdentifier:function(e,t,r,n){var i=n.id.name;return e.name===i&&r.bindingIdentifierEquals(i,n.id)?n.ref=n.ref||r.generateUidIdentifier(i):void 0}};r["default"]=function(e,t){var r=e.node;r.async=!1,r.generator=!0,e.traverse(s,p);var n=a.callExpression(t,[r]),i=r.id;if(r.id=null,a.isFunctionDeclaration(r)){var u=a.variableDeclaration("let",[a.variableDeclarator(i,n)]);return u._blockHoist=!0,u}if(i){var p={id:i};if(e.traverse(o,p),p.ref)return e.scope.parent.push({id:p.ref}),a.assignmentExpression("=",p.ref,n)}return n},t.exports=r["default"]},{179:179}],65:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return l.isSuper(e)?l.isMemberExpression(t,{computed:!1})?!1:l.isCallExpression(t,{callee:e})?!1:!0:!1}function s(e){return l.isMemberExpression(e)&&l.isSuper(e.object)}r.__esModule=!0;var o=e(43),u=n(o),p=e(179),l=n(p),c={enter:function(e,t,r,n){var i=n.topLevel,a=n.self;if(l.isFunction(e)&&!l.isArrowFunctionExpression(e))return a.traverseLevel(this,!1),this.skip();if(l.isProperty(e,{method:!0})||l.isMethodDefinition(e))return this.skip();var s=i?l.thisExpression:a.getThisReference.bind(a),o=a.specHandle;a.isLoose&&(o=a.looseHandle);var u=o.call(a,this,s);return u&&(this.hasSuper=!0),u!==!0?u:void 0}},f=function(){function e(t){var r=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];i(this,e),this.topLevelThisReference=t.topLevelThisReference,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=t.scope,this.file=t.file,this.opts=t}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r,n){return l.callExpression(this.file.addHelper("set"),[l.callExpression(l.memberExpression(l.identifier("Object"),l.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():l.memberExpression(this.getObjectRef(),l.identifier("prototype"))]),r?e:l.literal(e.name),t,n])},e.prototype.getSuperProperty=function(e,t,r){return l.callExpression(this.file.addHelper("get"),[l.callExpression(l.memberExpression(l.identifier("Object"),l.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():l.memberExpression(this.getObjectRef(),l.identifier("prototype"))]),t?e:l.literal(e.name),r])},e.prototype.replace=function(){this.traverseLevel(this.methodPath.get("value"),!0)},e.prototype.traverseLevel=function(e,t){var r={self:this,topLevel:t};e.traverse(c,r)},e.prototype.getThisReference=function(){if(this.topLevelThisReference)return this.topLevelThisReference;var e=this.topLevelThisReference=this.scope.generateUidIdentifier("this");return this.methodNode.value.body.body.unshift(l.variableDeclaration("var",[l.variableDeclarator(this.topLevelThisReference,l.thisExpression())])),e},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=r.key,i=this.superRef||l.identifier("Function");return t.property===e?void 0:l.isCallExpression(t,{callee:e})?(t.arguments.unshift(l.thisExpression()),"constructor"===n.name?2===t.arguments.length&&l.isSpreadElement(t.arguments[1])&&l.isIdentifier(t.arguments[1].argument,{name:"arguments"})?(t.arguments[1]=t.arguments[1].argument,l.memberExpression(i,l.identifier("apply"))):l.memberExpression(i,l.identifier("call")):(e=i,r["static"]||(e=l.memberExpression(e,l.identifier("prototype"))),e=l.memberExpression(e,n,r.computed),l.memberExpression(e,l.identifier("call")))):l.isMemberExpression(t)&&!r["static"]?l.memberExpression(i,l.identifier("prototype")):i},e.prototype.looseHandle=function(e,t){var r=e.node;if(e.isSuper())return this.getLooseSuperProperty(r,e.parent);if(e.isCallExpression()){var n=r.callee;if(!l.isMemberExpression(n))return;if(!l.isSuper(n.object))return;return l.appendToMemberExpression(n,l.identifier("call")),r.arguments.unshift(t()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r,n){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed,n()):(e=e||t.scope.generateUidIdentifier("ref"),[l.variableDeclaration("var",[l.variableDeclarator(e,r.left)]),l.expressionStatement(l.assignmentExpression("=",r.left,l.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e,t){var r,n,i,o,p=this.methodNode,c=e.parent,f=e.node;if(a(f,c))throw e.errorWithNode(u.get("classesIllegalBareSuper"));if(l.isCallExpression(f)){var d=f.callee;if(l.isSuper(d)){if(r=p.key,n=p.computed,i=f.arguments,"constructor"!==p.key.name||!this.inClass){var h=p.key.name||"METHOD_NAME";throw this.file.errorWithNode(f,u.get("classesIllegalSuperCall",h))}}else s(d)&&(r=d.property,n=d.computed,i=f.arguments)}else if(l.isMemberExpression(f)&&l.isSuper(f.object))r=f.property,n=f.computed;else{if(l.isUpdateExpression(f)&&s(f.argument)){var m=l.binaryExpression(f.operator[0],f.argument,l.literal(1));if(f.prefix)return this.specHandleAssignmentExpression(null,e,m,t);var y=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(y,e,m,t).concat(l.expressionStatement(y))}if(l.isAssignmentExpression(f)&&s(f.left))return this.specHandleAssignmentExpression(null,e,f,t)}if(r){o=t();var g=this.getSuperProperty(r,n,o);return i?1===i.length&&l.isSpreadElement(i[0])?l.callExpression(l.memberExpression(g,l.identifier("apply")),[o,i[0].argument]):l.callExpression(l.memberExpression(g,l.identifier("call")),[o].concat(i)):g}},e}();r["default"]=f,t.exports=r["default"]},{179:179,43:43}],66:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var a=e(80),s=i(a),o=e(126),u=i(o),p=e(85),l=i(p),c=e(84),f=i(c),d=e(125),h=n(d),m=new s["default"];for(var y in u["default"]){var g=u["default"][y];if("object"==typeof g){var v=g.metadata=g.metadata||{};v.group=v.group||"builtin-basic"}}m.addTransformers(u["default"]),m.addDeprecated(l["default"]),m.addAliases(f["default"]),m.addFilter(h.internal),m.addFilter(h.blacklist),m.addFilter(h.whitelist),m.addFilter(h.stage), m.addFilter(h.optional);var b=m.transform.bind(m);b.fromAst=m.transformFromAst.bind(m),b.pipeline=m,r["default"]=b,t.exports=r["default"]},{125:125,126:126,80:80,84:84,85:85}],67:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=e(75),o=i(s),u=e(43),p=i(u),l=e(76),c=n(l),f=e(41),d=n(f),h=e(182),m=i(h),y=e(179),g=i(y),v=function(){function e(t){a(this,e),this.sourceScopes=d["default"](),this.defaultIds=d["default"](),this.ids=d["default"](),this.remaps=new c["default"](t,this),this.scope=t.scope,this.file=t,this.hasNonDefaultExports=!1,this.hasLocalExports=!1,this.hasLocalImports=!1,this.localExports=d["default"](),this.localImports=d["default"](),this.metadata=t.metadata.modules,this.getMetadata()}return e.prototype.addScope=function(e){var t=e.node.source&&e.node.source.value;if(t){var r=this.sourceScopes[t];if(r&&r!==e.scope)throw e.errorWithNode(p.get("modulesDuplicateDeclarations"));this.sourceScopes[t]=e.scope}},e.prototype.isModuleType=function(e,t){var r=this.file.dynamicImportTypes[t];return r&&r.indexOf(e)>=0},e.prototype.transform=function(){this.remapAssignments()},e.prototype.doDefaultExportInterop=function(e){return(g.isExportDefaultDeclaration(e)||g.isSpecifierDefault(e))&&!this.noInteropRequireExport&&!this.hasNonDefaultExports},e.prototype.getMetadata=function(){for(var e=!1,t=this.file.ast.program.body,r=0;r<t.length;r++){var n=t[r];if(g.isModuleDeclaration(n)){e=!0;break}}(e||this.isLoose())&&this.file.path.traverse(o,this)},e.prototype.remapAssignments=function(){(this.hasLocalExports||this.hasLocalImports)&&this.remaps.run()},e.prototype.remapExportAssignment=function(e,t){for(var r=e,n=0;n<t.length;n++)r=g.assignmentExpression("=",g.memberExpression(g.identifier("exports"),t[n]),r);return r},e.prototype._addExport=function(e,t){var r=this.localExports[e]=this.localExports[e]||{binding:this.scope.getBindingIdentifier(e),exported:[]};r.exported.push(t)},e.prototype.getExport=function(e,t){if(g.isIdentifier(e)){var r=this.localExports[e.name];return r&&r.binding===t.getBindingIdentifier(e.name)?r.exported:void 0}},e.prototype.getModuleName=function(){var e=this.file.opts;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return e.keepModuleIdExtensions||(t=t.replace(/\.(\w*?)$/,"")),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},e.prototype._pushStatement=function(e,t){return(g.isClass(e)||g.isFunction(e))&&e.id&&(t.push(g.toStatement(e)),e=e.id),e},e.prototype._hoistExport=function(e,t,r){return g.isFunctionDeclaration(e)&&(t._blockHoist=r||2),t},e.prototype.getExternalReference=function(e,t){var r=this.ids,n=e.source.value;return r[n]?r[n]:this.ids[n]=this._getExternalReference(e,t)},e.prototype.checkExportIdentifier=function(e){if(g.isIdentifier(e,{name:"__esModule"}))throw this.file.errorWithNode(e,p.get("modulesIllegalExportName",e.name))},e.prototype.exportAllDeclaration=function(e,t){var r=this.getExternalReference(e,t);t.push(this.buildExportsWildcard(r,e))},e.prototype.isLoose=function(){return this.file.isLoose("es6.modules")},e.prototype.exportSpecifier=function(e,t,r){if(t.source){var n=this.getExternalReference(t,r);if("default"!==e.local.name||this.noInteropRequireExport){if(n=g.memberExpression(n,e.local),!this.isLoose())return void r.push(this.buildExportsFromAssignment(e.exported,n,t))}else n=g.callExpression(this.file.addHelper("interop-require"),[n]);r.push(this.buildExportsAssignment(e.exported,n,t))}else r.push(this.buildExportsAssignment(e.exported,e.local,t))},e.prototype.buildExportsWildcard=function(e){return g.expressionStatement(g.callExpression(this.file.addHelper("defaults"),[g.identifier("exports"),g.callExpression(this.file.addHelper("interop-export-wildcard"),[e,this.file.addHelper("defaults")])]))},e.prototype.buildExportsFromAssignment=function(e,t){return this.checkExportIdentifier(e),m.template("exports-from-assign",{INIT:t,ID:g.literal(e.name)},!0)},e.prototype.buildExportsAssignment=function(e,t){return this.checkExportIdentifier(e),m.template("exports-assign",{VALUE:t,KEY:e},!0)},e.prototype.exportDeclaration=function(e,t){var r=e.declaration,n=r.id;g.isExportDefaultDeclaration(e)&&(n=g.identifier("default"));var i;if(g.isVariableDeclaration(r))for(var a=0;a<r.declarations.length;a++){var s=r.declarations[a];s.init=this.buildExportsAssignment(s.id,s.init,e).expression;var o=g.variableDeclaration(r.kind,[s]);0===a&&g.inherits(o,r),t.push(o)}else{var u=r;(g.isFunctionDeclaration(r)||g.isClassDeclaration(r))&&(u=r.id,t.push(r)),i=this.buildExportsAssignment(n,u,e),t.push(i),this._hoistExport(r,i)}},e}();r["default"]=v,t.exports=r["default"]},{179:179,182:182,41:41,43:43,75:75,76:76}],68:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(182),a=n(i);r["default"]=function(e){var t=function(){this.noInteropRequireImport=!0,this.noInteropRequireExport=!0,e.apply(this,arguments)};return a.inherits(t,e),t},t.exports=r["default"]},{182:182}],69:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var i=e(70),a=n(i),s=e(68),o=n(s);r["default"]=o["default"](a["default"]),t.exports=r["default"]},{68:68,70:70}],70:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}r.__esModule=!0;var o=e(67),u=i(o),p=e(72),l=i(p),c=e(413),f=i(c),d=e(517),h=i(d),m=e(182),y=n(m),g=e(179),v=n(g),b=function(e){function t(){a(this,t),e.apply(this,arguments)}return s(t,e),t.prototype.setup=function(){l["default"].prototype._setup.call(this,this.hasNonDefaultExports)},t.prototype.buildDependencyLiterals=function(){var e=[];for(var t in this.ids)e.push(v.literal(t));return e},t.prototype.transform=function(e){l["default"].prototype.transform.apply(this,arguments);var t=e.body,r=[v.literal("exports")];this.passModuleArg&&r.push(v.literal("module")),r=r.concat(this.buildDependencyLiterals()),r=v.arrayExpression(r);var n=h["default"](this.ids);this.passModuleArg&&n.unshift(v.identifier("module")),n.unshift(v.identifier("exports"));var i=v.functionExpression(null,n,v.blockStatement(t)),a=[r,i],s=this.getModuleName();s&&a.unshift(v.literal(s));var o=v.callExpression(v.identifier("define"),a);e.body=[v.expressionStatement(o)]},t.prototype.getModuleName=function(){return this.file.opts.moduleIds?u["default"].prototype.getModuleName.apply(this,arguments):null},t.prototype._getExternalReference=function(e){return this.scope.generateUidIdentifier(e.source.value)},t.prototype.importDeclaration=function(e){this.getExternalReference(e)},t.prototype.importSpecifier=function(e,t,r,n){var i=t.source.value,a=this.getExternalReference(t);if((v.isImportNamespaceSpecifier(e)||v.isImportDefaultSpecifier(e))&&(this.defaultIds[i]=e.local),this.isModuleType(t,"absolute"));else if(this.isModuleType(t,"absoluteDefault"))this.ids[t.source.value]=a,a=v.memberExpression(a,v.identifier("default"));else if(v.isImportNamespaceSpecifier(e));else if(f["default"](this.file.dynamicImported,t)||!v.isSpecifierDefault(e)||this.noInteropRequireImport){var s=e.imported;v.isSpecifierDefault(e)&&(s=v.identifier("default")),a=v.memberExpression(a,s)}else{var o=n.generateUidIdentifier(e.local.name);r.push(v.variableDeclaration("var",[v.variableDeclarator(o,v.callExpression(this.file.addHelper("interop-require-default"),[a]))])),a=v.memberExpression(o,v.identifier("default"))}this.remaps.add(n,e.local.name,a)},t.prototype.exportSpecifier=function(e,t,r){return this.doDefaultExportInterop(e)&&(this.passModuleArg=!0,e.exported!==e.local&&!t.source)?void r.push(y.template("exports-default-assign",{VALUE:e.local},!0)):void l["default"].prototype.exportSpecifier.apply(this,arguments)},t.prototype.exportDeclaration=function(e,t){if(this.doDefaultExportInterop(e)){this.passModuleArg=!0;var r=e.declaration,n=y.template("exports-default-assign",{VALUE:this._pushStatement(r,t)},!0);return v.isFunctionDeclaration(r)&&(n._blockHoist=3),void t.push(n)}u["default"].prototype.exportDeclaration.apply(this,arguments)},t}(u["default"]);r["default"]=b,t.exports=r["default"]},{179:179,182:182,413:413,517:517,67:67,72:72}],71:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var i=e(72),a=n(i),s=e(68),o=n(s);r["default"]=o["default"](a["default"]),t.exports=r["default"]},{68:68,72:72}],72:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}r.__esModule=!0;var o=e(67),u=i(o),p=e(182),l=n(p),c=e(179),f=n(c),d=function(e){function t(){a(this,t),e.apply(this,arguments)}return s(t,e),t.prototype.setup=function(){this._setup(this.hasLocalExports)},t.prototype._setup=function(e){var t=this.file,r=t.scope;if(r.rename("module"),r.rename("exports"),!this.noInteropRequireImport&&e){var n="exports-module-declaration";this.file.isLoose("es6.modules")&&(n+="-loose");var i=l.template(n,!0);i._blockHoist=3,t.path.unshiftContainer("body",[i])}},t.prototype.transform=function(e){u["default"].prototype.transform.apply(this,arguments),this.hasDefaultOnlyExport&&e.body.push(f.expressionStatement(f.assignmentExpression("=",f.memberExpression(f.identifier("module"),f.identifier("exports")),f.memberExpression(f.identifier("exports"),f.identifier("default")))))},t.prototype.importSpecifier=function(e,t,r,n){var i=e.local,a=this.getExternalReference(t,r);if(f.isSpecifierDefault(e))if(this.isModuleType(t,"absolute"));else if(this.isModuleType(t,"absoluteDefault"))this.remaps.add(n,i.name,a);else if(this.noInteropRequireImport)this.remaps.add(n,i.name,f.memberExpression(a,f.identifier("default")));else{var s=this.scope.generateUidIdentifierBasedOnNode(t,"import");r.push(f.variableDeclaration("var",[f.variableDeclarator(s,f.callExpression(this.file.addHelper("interop-require-default"),[a]))])),this.remaps.add(n,i.name,f.memberExpression(s,f.identifier("default")))}else f.isImportNamespaceSpecifier(e)?(this.noInteropRequireImport||(a=f.callExpression(this.file.addHelper("interop-require-wildcard"),[a])),r.push(f.variableDeclaration("var",[f.variableDeclarator(i,a)]))):this.remaps.add(n,i.name,f.memberExpression(a,f.identifier(e.imported.name)))},t.prototype.importDeclaration=function(e,t){t.push(l.template("require",{MODULE_NAME:e.source},!0))},t.prototype.exportSpecifier=function(e){this.doDefaultExportInterop(e)&&(this.hasDefaultOnlyExport=!0),u["default"].prototype.exportSpecifier.apply(this,arguments)},t.prototype.exportDeclaration=function(e){this.doDefaultExportInterop(e)&&(this.hasDefaultOnlyExport=!0),u["default"].prototype.exportDeclaration.apply(this,arguments)},t.prototype._getExternalReference=function(e,t){var r,n=f.callExpression(f.identifier("require"),[e.source]);this.isModuleType(e,"absolute")||(this.isModuleType(e,"absoluteDefault")?n=f.memberExpression(n,f.identifier("default")):r=this.scope.generateUidIdentifierBasedOnNode(e,"import")),r=r||e.specifiers[0].local;var i=f.variableDeclaration("var",[f.variableDeclarator(r,n)]);return t.push(i),r},t}(u["default"]);r["default"]=d,t.exports=r["default"]},{179:179,182:182,67:67}],73:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}r.__esModule=!0;var o=e(67),u=i(o),p=e(179),l=n(p),c=function(e){function t(){a(this,t),e.apply(this,arguments)}return s(t,e),t.prototype.exportDeclaration=function(e,t){var r=l.toStatement(e.declaration,!0);r&&t.push(l.inherits(r,e))},t.prototype.exportAllDeclaration=function(){},t.prototype.importDeclaration=function(){},t.prototype.importSpecifier=function(){},t.prototype.exportSpecifier=function(){},t.prototype.transform=function(){},t}(u["default"]);r["default"]=c,t.exports=r["default"]},{179:179,67:67}],74:[function(e,t,r){"use strict";r.__esModule=!0,r["default"]={commonStrict:e(71),amdStrict:e(69),umdStrict:e(78),common:e(72),system:e(77),ignore:e(73),amd:e(70),umd:e(79)},t.exports=r["default"]},{69:69,70:70,71:71,72:72,73:73,77:77,78:78,79:79}],75:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,r,n){n.hasLocalExports=!0;var i=e.source?e.source.value:null,a=n.metadata.exports,s=this.get("declaration");if(s.isStatement()){var o=s.getBindingIdentifiers();for(var u in o){var p=o[u];n._addExport(u,p),a.exported.push(u),a.specifiers.push({kind:"local",local:u,exported:this.isExportDefaultDeclaration()?"default":u})}}if(this.isExportNamedDeclaration()&&e.specifiers)for(var c=e.specifiers,f=0;f<c.length;f++){var d=c[f],h=d.exported.name;a.exported.push(h),l.isExportDefaultSpecifier(d)&&a.specifiers.push({kind:"external",local:h,exported:h,source:i}),l.isExportNamespaceSpecifier(d)&&a.specifiers.push({kind:"external-namespace",exported:h,source:i});var m=d.local;m&&(n._addExport(m.name,d.exported),i&&a.specifiers.push({kind:"external",local:m.name,exported:h,source:i}),i||a.specifiers.push({kind:"local",local:m.name,exported:h}))}if(this.isExportAllDeclaration()&&a.specifiers.push({kind:"external-all",source:i}),!l.isExportDefaultDeclaration(e)&&!s.isTypeAlias()){var y=e.specifiers&&1===e.specifiers.length&&l.isSpecifierDefault(e.specifiers[0]);y||(n.hasNonDefaultExports=!0)}}function s(e,t,r,n){n.isLoose()||this.skip()}r.__esModule=!0,r.ExportDeclaration=a,r.Scope=s;var o=e(511),u=i(o),p=e(179),l=n(p),c={enter:function(e,t,r,n){e.source&&(e.source.value=n.file.resolveModuleSource(e.source.value),n.addScope(this))}};r.ModuleDeclaration=c;var f={exit:function(e,t,r,n){n.hasLocalImports=!0;var i=[],a=[];n.metadata.imports.push({source:e.source.value,imported:a,specifiers:i});for(var s=this.get("specifiers"),o=0;o<s.length;o++){var p=s[o],l=p.getBindingIdentifiers();u["default"](n.localImports,l);var c=p.node.local.name;if(p.isImportDefaultSpecifier()&&(a.push("default"),i.push({kind:"named",imported:"default",local:c})),p.isImportSpecifier()){var f=p.node.imported.name;a.push(f),i.push({kind:"named",imported:f,local:c})}p.isImportNamespaceSpecifier()&&(a.push("*"),i.push({kind:"namespace",local:c}))}}};r.ImportDeclaration=f},{179:179,511:511}],76:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var a=e(179),s=n(a),o={enter:function(e){return e._skipModulesRemap?this.skip():void 0},ReferencedIdentifier:function(e,t,r,n){var i=n.formatter,a=n.get(r,e.name);return a&&e!==a&&(!r.hasBinding(e.name)||r.bindingIdentifierEquals(e.name,i.localImports[e.name]))?!i.isLoose()&&"callee"===this.key&&this.parentPath.isCallExpression()?s.sequenceExpression([s.literal(0),a]):a:void 0},AssignmentExpression:{exit:function(e,t,r,n){var i=n.formatter;if(!e._ignoreModulesRemap){var a=i.getExport(e.left,r);if(a)return i.remapExportAssignment(e,a)}}},UpdateExpression:function(e,t,r,n){var i=n.formatter,a=i.getExport(e.argument,r);if(a){this.skip();var o=s.assignmentExpression(e.operator[0]+"=",e.argument,s.literal(1)),u=i.remapExportAssignment(o,a);if(s.isExpressionStatement(t)||e.prefix)return u;var p=[];p.push(u);var l;return l="--"===e.operator?"+":"-",p.push(s.binaryExpression(l,e.argument,s.literal(1))),s.sequenceExpression(p)}}},u=function(){function e(t,r){i(this,e),this.formatter=r,this.file=t}return e.prototype.run=function(){this.file.path.traverse(o,this)},e.prototype._getKey=function(e){return e+":moduleRemap"},e.prototype.get=function(e,t){return e.getData(this._getKey(t))},e.prototype.add=function(e,t,r){return this.all&&this.all.push({name:t,scope:e,node:r}),e.setData(this._getKey(t),r)},e.prototype.remove=function(e,t){return e.removeData(this._getKey(t))},e.prototype.getAll=function(){return this.all},e.prototype.clearAll=function(){if(this.all)for(var e=this.all,t=0;t<e.length;t++){var r=e[t];r.scope.removeData(this._getKey(r.name))}this.all=[]},e}();r["default"]=u,t.exports=r["default"]},{179:179}],77:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}r.__esModule=!0;var o=e(67),u=i(o),p=e(70),l=i(p),c=e(182),f=n(c),d=e(407),h=i(d),m=e(414),y=i(m),g=e(179),v=n(g),b={Function:function(){this.skip()},VariableDeclaration:function(e,t,r,n){if(("var"===e.kind||v.isProgram(t))&&!n.formatter._canHoist(e)){for(var i=[],a=0;a<e.declarations.length;a++){var s=e.declarations[a];if(n.hoistDeclarators.push(v.variableDeclarator(s.id)),s.init){var o=v.expressionStatement(v.assignmentExpression("=",s.id,s.init));i.push(o)}}return v.isFor(t)&&t.left===e?e.declarations[0].id:i}}},E={Function:function(){this.skip()},enter:function(e,t,r,n){(v.isFunctionDeclaration(e)||n.formatter._canHoist(e))&&(n.handlerBody.push(e),this.dangerouslyRemove())}},x={enter:function(e,t,r,n){if(e._importSource===n.source){if(v.isVariableDeclaration(e))for(var i=e.declarations,a=0;a<i.length;a++){var s=i[a];n.hoistDeclarators.push(v.variableDeclarator(s.id)),n.nodes.push(v.expressionStatement(v.assignmentExpression("=",s.id,s.init)))}else n.nodes.push(e);this.dangerouslyRemove()}}},S=function(e){function t(r){a(this,t),e.call(this,r),this._setters=null,this.exportIdentifier=r.scope.generateUidIdentifier("export"),this.noInteropRequireExport=!0,this.noInteropRequireImport=!0,this.remaps.clearAll()}return s(t,e),t.prototype._addImportSource=function(e,t){return e&&(e._importSource=t.source&&t.source.value),e},t.prototype.buildExportsWildcard=function(e,t){var r=this.scope.generateUidIdentifier("key"),n=v.memberExpression(e,r,!0),i=v.variableDeclaration("var",[v.variableDeclarator(r)]),a=e,s=v.blockStatement([v.ifStatement(v.binaryExpression("!==",r,v.literal("default")),v.expressionStatement(this._buildExportCall(r,n)))]);return this._addImportSource(v.forInStatement(i,a,s),t)},t.prototype.buildExportsAssignment=function(e,t,r){var n=this._buildExportCall(v.literal(e.name),t,!0);return this._addImportSource(n,r)},t.prototype.buildExportsFromAssignment=function(){return this.buildExportsAssignment.apply(this,arguments)},t.prototype.remapExportAssignment=function(e,t){for(var r=e,n=0;n<t.length;n++)r=this._buildExportCall(v.literal(t[n].name),r);return r},t.prototype._buildExportCall=function(e,t,r){var n=v.callExpression(this.exportIdentifier,[e,t]);return r?v.expressionStatement(n):n},t.prototype.importSpecifier=function(e,t,r){l["default"].prototype.importSpecifier.apply(this,arguments);for(var n=this.remaps.getAll(),i=0;i<n.length;i++){var a=n[i];r.push(v.variableDeclaration("var",[v.variableDeclarator(v.identifier(a.name),a.node)]))}this.remaps.clearAll(),this._addImportSource(h["default"](r),t)},t.prototype._buildRunnerSetters=function(e,t){var r=this.file.scope;return v.arrayExpression(y["default"](this.ids,function(n,i){var a={hoistDeclarators:t,source:i,nodes:[]};return r.traverse(e,x,a),v.functionExpression(null,[n],v.blockStatement(a.nodes))}))},t.prototype._canHoist=function(e){return e._blockHoist&&!this.file.dynamicImports.length},t.prototype.transform=function(e){u["default"].prototype.transform.apply(this,arguments);var t=[],r=this.getModuleName(),n=v.literal(r),i=v.blockStatement(e.body),a=this._buildRunnerSetters(i,t);this._setters=a;var s=f.template("system",{MODULE_DEPENDENCIES:v.arrayExpression(this.buildDependencyLiterals()),EXPORT_IDENTIFIER:this.exportIdentifier,MODULE_NAME:n,SETTERS:a,EXECUTE:v.functionExpression(null,[],i)},!0),o=s.expression.arguments[2].body.body;r||s.expression.arguments.shift();var p=o.pop();if(this.file.scope.traverse(i,b,{formatter:this,hoistDeclarators:t}),t.length){var l=v.variableDeclaration("var",t);l._blockHoist=!0,o.unshift(l)}this.file.scope.traverse(i,E,{formatter:this,handlerBody:o}),o.push(p),e.body=[s]},t}(l["default"]);r["default"]=S,t.exports=r["default"]},{179:179,182:182,407:407,414:414,67:67,70:70}],78:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var i=e(79),a=n(i),s=e(68),o=n(s);r["default"]=o["default"](a["default"]),t.exports=r["default"]},{68:68,79:79}],79:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}r.__esModule=!0;var o=e(67),u=i(o),p=e(70),l=i(p),c=e(517),f=i(c),d=e(9),h=i(d),m=e(182),y=n(m),g=e(179),v=n(g),b=function(e){function t(){a(this,t),e.apply(this,arguments)}return s(t,e),t.prototype.transform=function(e){u["default"].prototype.transform.apply(this,arguments);var t=e.body,r=[];for(var n in this.ids)r.push(v.literal(n));var i=f["default"](this.ids),a=[v.identifier("exports")];this.passModuleArg&&a.push(v.identifier("module")),a=a.concat(i);var s=v.functionExpression(null,a,v.blockStatement(t)),o=[v.literal("exports")];this.passModuleArg&&o.push(v.literal("module")),o=o.concat(r),o=[v.arrayExpression(o)];var p=y.template("test-exports"),l=y.template("test-module"),c=this.passModuleArg?v.logicalExpression("&&",p,l):p,d=[v.identifier("exports")];this.passModuleArg&&d.push(v.identifier("module")),d=d.concat(r.map(function(e){return v.callExpression(v.identifier("require"),[e])}));var m=[];this.passModuleArg&&m.push(v.identifier("mod"));for(var g in this.ids){var b=this.defaultIds[g]||v.identifier(v.toIdentifier(h["default"].basename(g,h["default"].extname(g))));m.push(v.memberExpression(v.identifier("global"),b))}var E=this.getModuleName();E&&o.unshift(v.literal(E));var x=this.file.opts.basename;E&&(x=E),x=v.identifier(v.toIdentifier(x));var S=y.template("umd-runner-body",{AMD_ARGUMENTS:o,COMMON_TEST:c,COMMON_ARGUMENTS:d,BROWSER_ARGUMENTS:m,GLOBAL_ARG:x});e.body=[v.expressionStatement(v.callExpression(S,[v.thisExpression(),s]))]},t}(l["default"]);r["default"]=b,t.exports=r["default"]},{179:179,182:182,517:517,67:67,70:70,9:9}],80:[function(e,t,r){"use strict";function n(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")}r.__esModule=!0;var a=e(52),s=n(a),o=e(40),u=n(o),p=e(82),l=n(p),c=e(509),f=n(c),d=e(41),h=n(d),m=e(46),y=n(m),g=function(){function e(){i(this,e),this.transformers=h["default"](),this.namespaces=h["default"](),this.deprecated=h["default"](),this.aliases=h["default"](),this.filters=[]}return e.prototype.addTransformers=function(e){for(var t in e)this.addTransformer(t,e[t]);return this},e.prototype.addTransformer=function(e,t){if(this.transformers[e])throw new Error;var r=e.split(".")[0];this.namespaces[r]=this.namespaces[r]||[],this.namespaces[r].push(e),this.namespaces[e]=r,"function"==typeof t?(t=s["default"].memoisePluginContainer(t),t.key=e,t.metadata.optional=!0,"react.displayName"===e&&(t.metadata.optional=!1)):t=new l["default"](e,t),this.transformers[e]=t},e.prototype.addAliases=function(e){return f["default"](this.aliases,e),this},e.prototype.addDeprecated=function(e){return f["default"](this.deprecated,e),this},e.prototype.addFilter=function(e){return this.filters.push(e),this},e.prototype.canTransform=function(e,t){if(e.metadata.plugin)return!0;for(var r=this.filters,n=0;n<r.length;n++){var i=r[n],a=i(e,t);if(null!=a)return a}return!0},e.prototype.analyze=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.code=!1,this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new y["default"](t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new y["default"](t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.transformFromAst=function(e,t,r){e=u["default"](e);var n=new y["default"](r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e.prototype._ensureTransformerNames=function(e,t){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=this.deprecated[i],s=this.aliases[i];if(s)r.push(s);else if(a)console.error("[BABEL] The transformer "+i+" has been renamed to "+a),t.push(a);else if(this.transformers[i])r.push(i);else{if(!this.namespaces[i])throw new ReferenceError("Unknown transformer "+i+" specified in "+e);r=r.concat(this.namespaces[i])}}return r},e}();r["default"]=g,t.exports=r["default"]},{40:40,41:41,46:46,509:509,52:52,82:82}],81:[function(e,t,r){"use strict";function n(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")}r.__esModule=!0;var a=e(148),s=n(a),o=function(){function e(t,r){i(this,e),this.plugin=r,this.file=t,this.key=r.key,this.canTransform()&&r.metadata.experimental&&!t.opts.experimental&&t.log.warn("THE TRANSFORMER "+this.key+" HAS BEEN MARKED AS EXPERIMENTAL AND IS WIP. USE AT YOUR OWN RISK. THIS WILL HIGHLY LIKELY BREAK YOUR CODE SO USE WITH **EXTREME** CAUTION. ENABLE THE `experimental` OPTION TO IGNORE THIS WARNING.")}return e.prototype.canTransform=function(){return this.file.transformerDependencies[this.key]||this.file.pipeline.canTransform(this.plugin,this.file.opts)},e.prototype.transform=function(){var e=this.file;e.log.debug("Start transformer "+this.key),s["default"](e.ast,this.plugin.visitor,e.scope,e),e.log.debug("Finish transformer "+this.key)},e}();r["default"]=o,t.exports=r["default"]},{148:148}],82:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=e(81),o=i(s),u=e(43),p=n(u),l=e(148),c=i(l),f=e(509),d=i(f),h=e(494),m=i(h),y=e(46),g=i(y),v=e(179),b=n(v),E=["visitor","metadata","manipulateOptions","post","pre"],x=["dependencies","optional","stage","group","experimental","secondPass"],S=function(){function e(t,r){a(this,e),e.validate(t,r),r=d["default"]({},r);var n=function(e){var t=r[e];return delete r[e],t};this.manipulateOptions=n("manipulateOptions"),this.metadata=n("metadata")||{},this.dependencies=this.metadata.dependencies||[],this.post=n("post"),this.pre=n("pre"),null!=this.metadata.stage&&(this.metadata.optional=!0),this.visitor=this.normalize(m["default"](n("visitor"))||{}),this.key=t}return e.validate=function(e,t){for(var r in t)if("_"!==r[0]&&!(E.indexOf(r)>=0)){var n="pluginInvalidProperty";throw b.TYPES.indexOf(r)>=0&&(n="pluginInvalidPropertyVisitor"),new Error(p.get(n,e,r))}for(var r in t.metadata)if(!(x.indexOf(r)>=0))throw new Error(p.get("pluginInvalidProperty",e,"metadata."+r))},e.prototype.normalize=function(e){return c["default"].explode(e),e},e.prototype.buildPass=function(e){if(!(e instanceof g["default"]))throw new TypeError(p.get("pluginNotFile",this.key));return new o["default"](e,this)},e}();r["default"]=S,t.exports=r["default"]},{148:148,179:179,43:43,46:46,494:494,509:509,81:81}],83:[function(e,t,r){"use strict";function n(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")}r.__esModule=!0;var a=e(82),s=n(a),o=function u(e,t){i(this,u);var r={};return r.metadata=t.metadata,delete t.metadata,r.visitor=t,new s["default"](e,r)};r["default"]=o,t.exports=r["default"]},{82:82}],84:[function(e,t,r){t.exports={useStrict:"strict","es5.runtime":"runtime","es6.runtime":"runtime","minification.inlineExpressions":"minification.constantFolding"}},{}],85:[function(e,t,r){t.exports={selfContained:"runtime","unicode-regex":"regex.unicode","spec.typeofSymbol":"es6.spec.symbols","es6.symbols":"es6.spec.symbols","es6.blockScopingTDZ":"es6.spec.blockScoping","utility.inlineExpressions":"minification.constantFolding","utility.deadCodeElimination":"minification.deadCodeElimination","utility.removeConsoleCalls":"minification.removeConsole","utility.removeDebugger":"minification.removeDebugger","es6.parameters.rest":"es6.parameters","es6.parameters.default":"es6.parameters"}},{}],86:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={group:"builtin-trailing"};r.metadata=s;var o={MemberExpression:{exit:function(e){var t=e.property;e.computed||!a.isIdentifier(t)||a.isValidIdentifier(t.name)||(e.property=a.literal(t.name),e.computed=!0)}}};r.visitor=o},{179:179}],87:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={ group:"builtin-trailing"};r.metadata=s;var o={Property:{exit:function(e){var t=e.key;e.computed||!a.isIdentifier(t)||a.isValidIdentifier(t.name)||(e.key=a.literal(t.name))}}};r.visitor=o},{179:179}],88:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(57),a=n(i),s=e(179),o=n(s),u={ObjectExpression:function(e,t,r,n){for(var i=!1,s=e.properties,u=0;u<s.length;u++){var p=s[u];if("get"===p.kind||"set"===p.kind){i=!0;break}}if(i){var l={};return e.properties=e.properties.filter(function(e){return"get"===e.kind||"set"===e.kind?(a.push(l,e,e.kind,n),!1):!0}),o.callExpression(o.memberExpression(o.identifier("Object"),o.identifier("defineProperties")),[e,a.toDefineObject(l)])}}};r.visitor=u},{179:179,57:57}],89:[function(e,t,r){"use strict";r.__esModule=!0;var n={ArrowFunctionExpression:function(e){this.ensureBlock(),e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}};r.visitor=n},{}],90:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!b.isVariableDeclaration(e))return!1;if(e._let)return!0;if("let"!==e.kind)return!1;if(o(e,t))for(var r=0;r<e.declarations.length;r++){var n=e.declarations[r];n.init=n.init||b.identifier("undefined")}return e._let=!0,e.kind="var",!0}function o(e,t){return!b.isFor(t)||!b.isFor(t,{left:e})}function u(e,t){return b.isVariableDeclaration(e,{kind:"var"})&&!s(e,t)}function p(e){for(var t=e,r=0;r<t.length;r++){var n=t[r];delete n._let}}function l(e,t,r,n){var i=n[e.name];if(i){var a=r.getBindingIdentifier(e.name);a===i.binding?e.name=i.uid:this&&this.skip()}}function c(e,t,r,n){if(b.isIdentifier(e)&&l(e,t,r,n),b.isAssignmentExpression(e)){var i=b.getBindingIdentifiers(e);for(var a in i)l(i[a],t,r,n)}r.traverse(e,w,n)}r.__esModule=!0;var f=e(148),d=i(f),h=e(41),m=i(h),y=e(182),g=n(y),v=e(179),b=n(v),E=e(517),x=i(E),S=e(511),A=i(S),D={group:"builtin-advanced"};r.metadata=D;var C={VariableDeclaration:function(e,t,r,n){if(s(e,t)&&o(e)&&n.transformers["es6.spec.blockScoping"].canTransform()){for(var i=[e],a=0;a<e.declarations.length;a++){var u=e.declarations[a];if(u.init){var p=b.assignmentExpression("=",u.id,u.init);p._ignoreBlockScopingTDZ=!0,i.push(b.expressionStatement(p))}u.init=n.addHelper("temporal-undefined")}return e._blockHoist=2,i}},Loop:function(e,t,r,n){var i=e.left||e.init;s(i,e)&&(b.ensureBlock(e),e.body._letDeclarators=[i]);var a=new M(this,this.get("body"),t,r,n);return a.run()},"BlockStatement|Program":function(e,t,r,n){if(!b.isLoop(t)){var i=new M(null,this,t,r,n);i.run()}}};r.visitor=C;var w={ReferencedIdentifier:l,AssignmentExpression:function(e,t,r,n){var i=this.getBindingIdentifiers();for(var a in i)l(i[a],e,r,n)}},I={Function:function(e,t,r,n){return this.traverse(_,n),this.skip()}},_={ReferencedIdentifier:function(e,t,r,n){var i=n.letReferences[e.name];if(i){var a=r.getBindingIdentifier(e.name);a&&a!==i||(n.closurify=!0)}}},F={enter:function(e,t,r,n){if(this.isForStatement()){if(u(e.init,e)){var i=n.pushDeclar(e.init);1===i.length?e.init=i[0]:e.init=b.sequenceExpression(i)}}else if(this.isFor())u(e.left,e)&&(n.pushDeclar(e.left),e.left=e.left.declarations[0].id);else{if(u(e,t))return n.pushDeclar(e).map(b.expressionStatement);if(this.isFunction())return this.skip()}}},k={LabeledStatement:function(e,t,r,n){n.innerLabels.push(e.label.name)}},P={enter:function(e,t,r,n){if(this.isAssignmentExpression()||this.isUpdateExpression()){var i=this.getBindingIdentifiers();for(var a in i)n.outsideReferences[a]===r.getBindingIdentifier(a)&&(n.reassignments[a]=!0)}}},B=function(e){return b.isBreakStatement(e)?"break":b.isContinueStatement(e)?"continue":void 0},T={Loop:function(e,t,r,n){var i=n.ignoreLabeless;n.ignoreLabeless=!0,this.traverse(T,n),n.ignoreLabeless=i,this.skip()},Function:function(){this.skip()},SwitchCase:function(e,t,r,n){var i=n.inSwitchCase;n.inSwitchCase=!0,this.traverse(T,n),n.inSwitchCase=i,this.skip()},enter:function(e,t,r,n){var i,a=B(e);if(a){if(e.label){if(n.innerLabels.indexOf(e.label.name)>=0)return;a=a+"|"+e.label.name}else{if(n.ignoreLabeless)return;if(n.inSwitchCase)return;if(b.isBreakStatement(e)&&b.isSwitchCase(t))return}n.hasBreakContinue=!0,n.map[a]=e,i=b.literal(a)}return this.isReturnStatement()&&(n.hasReturn=!0,i=b.objectExpression([b.property("init",b.identifier("v"),e.argument||b.identifier("undefined"))])),i?(i=b.returnStatement(i),this.skip(),b.inherits(i,e)):void 0}},M=function(){function e(t,r,n,i,s){a(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=m["default"](),this.hasLetReferences=!1,this.letReferences=this.block._letReferences=m["default"](),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=b.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(!b.isFunction(this.parent)&&!b.isProgram(this.block)&&this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.loopLabel&&!b.isLabeledStatement(this.loopParent)?b.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.remap=function(){var e=!1,t=this.letReferences,r=this.scope,n=m["default"]();for(var i in t){var a=t[i];if(r.parentHasBinding(i)||r.hasGlobal(i)){var s=r.generateUidIdentifier(a.name).name;a.name=s,e=!0,n[i]=n[s]={binding:a,uid:s}}}if(e){var o=this.loop;o&&(c(o.right,o,r,n),c(o.test,o,r,n),c(o.update,o,r,n)),this.blockPath.traverse(w,n)}},e.prototype.wrapClosure=function(){var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=x["default"](t),a=x["default"](t),s=b.functionExpression(null,i,b.blockStatement(e.body));s.shadow=!0,this.addContinuations(s),e.body=this.body;var o=s;this.loop&&(o=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(b.variableDeclaration("var",[b.variableDeclarator(o,s)])));var u=b.callExpression(o,a),p=this.scope.generateUidIdentifier("ret"),l=d["default"].hasType(s.body,this.scope,"YieldExpression",b.FUNCTION_TYPES);l&&(s.generator=!0,u=b.yieldExpression(u,!0));var c=d["default"].hasType(s.body,this.scope,"AwaitExpression",b.FUNCTION_TYPES);c&&(s.async=!0,u=b.awaitExpression(u)),this.buildClosure(p,u)},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(b.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,P,t);for(var r=0;r<e.params.length;r++){var n=e.params[r];if(t.reassignments[n.name]){var i=this.scope.generateUidIdentifier(n.name);e.params[r]=i,this.scope.rename(n.name,i.name,e),e.body.body.push(b.expressionStatement(b.assignmentExpression("=",n,i)))}}},e.prototype.getLetReferences=function(){for(var e=this.block,t=e._letDeclarators||[],r=0;r<t.length;r++){var n=t[r];A["default"](this.outsideLetReferences,b.getBindingIdentifiers(n))}if(e.body)for(var r=0;r<e.body.length;r++){var n=e.body[r];s(n,e)&&(t=t.concat(n.declarations))}for(var r=0;r<t.length;r++){var n=t[r],i=b.getBindingIdentifiers(n);A["default"](this.letReferences,i),this.hasLetReferences=!0}if(this.hasLetReferences){p(t);var a={letReferences:this.letReferences,closurify:!1};return this.blockPath.traverse(I,a),a.closurify}},e.prototype.checkLoop=function(){var e={hasBreakContinue:!1,ignoreLabeless:!1,inSwitchCase:!1,innerLabels:[],hasReturn:!1,isLoop:!!this.loop,map:{}};return this.blockPath.traverse(k,e),this.blockPath.traverse(T,e),e},e.prototype.hoistVarDeclarations=function(){this.blockPath.traverse(F,this)},e.prototype.pushDeclar=function(e){var t=[],r=b.getBindingIdentifiers(e);for(var n in r)t.push(b.variableDeclarator(r[n]));this.body.push(b.variableDeclaration(e.kind,t));for(var i=[],a=0;a<e.declarations.length;a++){var s=e.declarations[a];if(s.init){var o=b.assignmentExpression("=",s.id,s.init);i.push(b.inherits(o,s))}}return i},e.prototype.buildHas=function(e,t){var r=this.body;r.push(b.variableDeclaration("var",[b.variableDeclarator(e,t)]));var n,i=this.has,a=[];if(i.hasReturn&&(n=g.template("let-scoping-return",{RETURN:e})),i.hasBreakContinue){for(var s in i.map)a.push(b.switchCase(b.literal(s),[i.map[s]]));if(i.hasReturn&&a.push(b.switchCase(null,[n])),1===a.length){var o=a[0];r.push(this.file.attachAuxiliaryComment(b.ifStatement(b.binaryExpression("===",e,o.test),o.consequent[0])))}else{for(var u=0;u<a.length;u++){var p=a[u].consequent[0];b.isBreakStatement(p)&&!p.label&&(p.label=this.loopLabel=this.loopLabel||this.file.scope.generateUidIdentifier("loop"))}r.push(this.file.attachAuxiliaryComment(b.switchStatement(e,a)))}}else i.hasReturn&&r.push(this.file.attachAuxiliaryComment(n))},e}()},{148:148,179:179,182:182,41:41,511:511,517:517}],91:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var a=e(92),s=i(a),o=e(93),u=i(o),p=e(179),l=n(p),c=e(61),f={ClassDeclaration:function(e){return l.variableDeclaration("let",[l.variableDeclarator(e.id,l.toExpression(e))])},ClassExpression:function(e,t,r,n){var i=c.bare(e,t,r);return i?i:n.isLoose("es6.classes")?new s["default"](this,n).run():new u["default"](this,n).run()}};r.visitor=f},{179:179,61:61,92:92,93:93}],92:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}r.__esModule=!0;var o=e(93),u=i(o),p=e(179),l=n(p),c=function(e){function t(){a(this,t),e.apply(this,arguments),this.isLoose=!0}return s(t,e),t.prototype._processMethod=function(e){if(!e.decorators){var t=this.classRef;e["static"]||(t=l.memberExpression(t,l.identifier("prototype")));var r=l.memberExpression(t,e.key,e.computed||l.isLiteral(e.key)),n=l.expressionStatement(l.assignmentExpression("=",r,e.value));return l.inheritsComments(n,e),this.body.push(n),!0}},t}(u["default"]);r["default"]=c,t.exports=r["default"]},{179:179,93:93}],93:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=e(60),o=i(s),u=e(65),p=i(u),l=e(61),c=n(l),f=e(57),d=n(f),h=e(43),m=n(h),y=e(182),g=n(y),v=e(179),b=n(v),E="__initializeProperties",x={Identifier:{enter:function(e,t,r,n){this.parentPath.isClassProperty({key:e})||this.isReferenced()&&r.getBinding(e.name)===n.scope.getBinding(e.name)&&(n.references[e.name]=!0)}}},S={MethodDefinition:function(){this.skip()},Property:function(e){e.method&&this.skip()},CallExpression:{exit:function(e,t,r,n){if(this.get("callee").isSuper()&&(n.hasBareSuper=!0,n.bareSuper=this,!n.isDerived))throw this.errorWithNode("super call is only allowed in derived constructor")}},"FunctionDeclaration|FunctionExpression":function(){this.skip()},ThisExpression:function(e,t,r,n){if(n.isDerived&&!n.hasBareSuper){if(this.inShadow()){var i=n.constructorPath.getData("this");return i||(i=n.constructorPath.setData("this",n.constructorPath.scope.generateUidIdentifier("this"))),i}throw this.errorWithNode("'this' is not allowed before super()")}},Super:function(e,t,r,n){if(n.isDerived&&!n.hasBareSuper&&!this.parentPath.isCallExpression({callee:e}))throw this.errorWithNode("'super.*' is not allowed before super()")}},A=function(){function e(t,r){a(this,e),this.parent=t.parent,this.scope=t.scope,this.node=t.node,this.path=t,this.file=r,this.clearDescriptors(),this.instancePropBody=[],this.instancePropRefs={},this.staticPropBody=[],this.body=[],this.pushedConstructor=!1,this.pushedInherits=!1,this.hasDecorators=!1,this.isLoose=!1,this.classId=this.node.id,this.classRef=this.node.id||this.scope.generateUidIdentifier("class"),this.directRef=null,this.superName=this.node.superClass||b.identifier("Function"),this.isDerived=!!this.node.superClass}return e.prototype.run=function(){var e=this.superName,t=this.file,r=this.body,n=this.constructorBody=b.blockStatement([]);this.constructor=this.buildConstructor();var i=[],a=[];this.isDerived&&(a.push(e),e=this.scope.generateUidIdentifierBasedOnNode(e),i.push(e),this.superName=e);var s=this.node.decorators;if(s?this.directRef=this.scope.generateUidIdentifier(this.classRef):this.directRef=this.classRef,this.buildBody(),n.body.unshift(b.expressionStatement(b.callExpression(t.addHelper("class-call-check"),[b.thisExpression(),this.directRef]))),this.pushDecorators(),r=r.concat(this.staticPropBody),this.classId&&1===r.length)return b.toExpression(r[0]);r.push(b.returnStatement(this.classRef));var o=b.functionExpression(null,i,b.blockStatement(r));return o.shadow=!0,b.callExpression(o,a)},e.prototype.buildConstructor=function(){var e=b.functionDeclaration(this.classRef,[],this.constructorBody);return b.inherits(e,this.node),e},e.prototype.pushToMap=function(e,t){var r,n=arguments.length<=2||void 0===arguments[2]?"value":arguments[2];e["static"]?(this.hasStaticDescriptors=!0,r=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,r=this.instanceMutatorMap);var i=d.push(r,e,n,this.file);t&&(i.enumerable=b.literal(!0)),i.decorators&&(this.hasDecorators=!0)},e.prototype.constructorMeMaybe=function(){for(var e=!1,t=this.path.get("body.body"),r=t,n=0;n<r.length;n++){var i=r[n];if(e=i.equals("kind","constructor"))break}if(!e){var a;a=this.isDerived?g.template("class-derived-default-constructor"):b.functionExpression(null,[],b.blockStatement([])),this.path.get("body").unshiftContainer("body",b.methodDefinition(b.identifier("constructor"),a,"constructor"))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.placePropertyInitializers(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),b.inherits(this.constructor,this.userConstructor),b.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){for(var e=this.path.get("body.body"),t=e,r=0;r<t.length;r++){var n=t[r],i=n.node;if(i.decorators&&o["default"](i.decorators,this.scope),b.isMethodDefinition(i)){var a="constructor"===i.kind;a&&this.verifyConstructor(n);var s=new p["default"]({methodPath:n,methodNode:i,objectRef:this.directRef,superRef:this.superName,isStatic:i["static"],isLoose:this.isLoose,scope:this.scope,file:this.file},!0);s.replace(),a?this.pushConstructor(i,n):this.pushMethod(i,n)}else b.isClassProperty(i)&&this.pushProperty(i,n)}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e,t,r=this.body,n="create-class";if(this.hasDecorators&&(n="create-decorated-class"),this.hasInstanceDescriptors&&(e=d.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(t=d.toClassObject(this.staticMutatorMap)),e||t){e&&(e=d.toComputedObjectFromClass(e)),t&&(t=d.toComputedObjectFromClass(t));var i=b.literal(null),a=[this.classRef,i,i,i,i];e&&(a[1]=e),t&&(a[2]=t),this.instanceInitializersId&&(a[3]=this.instanceInitializersId,r.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(a[4]=this.staticInitializersId,r.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,o=0;o<a.length;o++)a[o]!==i&&(s=o);a=a.slice(0,s+1),r.push(b.expressionStatement(b.callExpression(this.file.addHelper(n),a)))}this.clearDescriptors()},e.prototype.buildObjectAssignment=function(e){return b.variableDeclaration("var",[b.variableDeclarator(e,b.objectExpression([]))])},e.prototype.placePropertyInitializers=function(){var e=this.instancePropBody;if(e.length)if(this.hasPropertyCollision()){var t=b.expressionStatement(b.callExpression(b.memberExpression(b.thisExpression(),b.identifier(E)),[]));this.pushMethod(b.methodDefinition(b.identifier(E),b.functionExpression(null,[],b.blockStatement(e))),null,!0),this.isDerived?this.bareSuper.insertAfter(t):this.constructorBody.body.unshift(t)}else this.isDerived?this.bareSuper.insertAfter(e):this.constructorBody.body=e.concat(this.constructorBody.body)},e.prototype.hasPropertyCollision=function(){if(this.userConstructorPath)for(var e in this.instancePropRefs)if(this.userConstructorPath.scope.hasOwnBinding(e))return!0;return!1},e.prototype.verifyConstructor=function(e){var t={constructorPath:e.get("value"),hasBareSuper:!1,bareSuper:null,isDerived:this.isDerived,file:this.file};t.constructorPath.traverse(S,t);var r=t.constructorPath.getData("this");if(r&&t.bareSuper&&t.bareSuper.insertAfter(b.variableDeclaration("var",[b.variableDeclarator(r,b.thisExpression())])),this.bareSuper=t.bareSuper,!t.hasBareSuper&&this.isDerived)throw e.errorWithNode("Derived constructor must call super()")},e.prototype.pushMethod=function(e,t,r){if(!r&&b.isLiteral(b.toComputedKey(e),{value:E}))throw this.file.errorWithNode(e,m.get("illegalMethodName",E));"method"===e.kind&&(c.property(e,this.file,t?t.get("value").scope:this.scope),this._processMethod(e))||this.pushToMap(e)},e.prototype._processMethod=function(){return!1},e.prototype.pushProperty=function(e,t){if(t.traverse(x,{references:this.instancePropRefs,scope:this.scope}),e.decorators){var r=[];e.value?(r.push(b.returnStatement(e.value)),e.value=b.functionExpression(null,[],b.blockStatement(r))):e.value=b.literal(null),this.pushToMap(e,!0,"initializer");var n,i;e["static"]?(n=this.staticInitializersId=this.staticInitializersId||this.scope.generateUidIdentifier("staticInitializers"),r=this.staticPropBody,i=this.classRef):(n=this.instanceInitializersId=this.instanceInitializersId||this.scope.generateUidIdentifier("instanceInitializers"),r=this.instancePropBody,i=b.thisExpression()),r.push(b.expressionStatement(b.callExpression(this.file.addHelper("define-decorated-property-descriptor"),[i,b.literal(e.key.name),n])))}else{if(!e.value&&!e.decorators)return;e["static"]?this.pushToMap(e,!0):e.value&&this.instancePropBody.push(b.expressionStatement(b.assignmentExpression("=",b.memberExpression(b.thisExpression(),e.key),e.value)))}},e.prototype.pushConstructor=function(e,t){var r=t.get("value");r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor,i=e.value;this.userConstructorPath=r,this.userConstructor=i,this.hasConstructor=!0,b.inheritsComments(n,e),n._ignoreUserWhitespace=!0,n.params=i.params,b.inherits(n.body,i.body),this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(b.expressionStatement(b.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e.prototype.pushDecorators=function(){var e=this.node.decorators;if(e){this.body.push(b.variableDeclaration("var",[b.variableDeclarator(this.directRef,this.classRef)])),e=e.reverse();for(var t=e,r=0;r<t.length;r++){var n=t[r],i=g.template("class-decorator",{DECORATOR:n.expression,CLASS_REF:this.classRef},!0);i.expression._ignoreModulesRemap=!0,this.body.push(i)}}},e}();r["default"]=A,t.exports=r["default"]},{179:179,182:182,43:43,57:57,60:60,61:61,65:65}],94:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(43),a=n(i),s={Scope:function(e,t,r){for(var n in r.bindings){var i=r.bindings[n];if("const"===i.kind||"module"===i.kind)for(var s=i.constantViolations,o=0;o<s.length;o++){var u=s[o];throw u.errorWithNode(a.get("readOnly",n))}}},VariableDeclaration:function(e){"const"===e.kind&&(e.kind="let")}};r.visitor=s},{43:43}],95:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){for(var t=0;t<e.declarations.length;t++)if(l.isPattern(e.declarations[t].id))return!0;return!1}function s(e){for(var t=0;t<e.elements.length;t++)if(l.isRestElement(e.elements[t]))return!0;return!1}r.__esModule=!0;var o=e(43),u=n(o),p=e(179),l=n(p),c={group:"builtin-advanced"};r.metadata=c;var f={ForXStatement:function(e,t,r,n){var i=e.left;if(l.isPattern(i)){var a=r.generateUidIdentifier("ref");return e.left=l.variableDeclaration("var",[l.variableDeclarator(a)]),this.ensureBlock(),void e.body.body.unshift(l.variableDeclaration("var",[l.variableDeclarator(i,a)]))}if(l.isVariableDeclaration(i)){var s=i.declarations[0].id;if(l.isPattern(s)){var o=r.generateUidIdentifier("ref");e.left=l.variableDeclaration(i.kind,[l.variableDeclarator(o,null)]);var u=[],p=new h({kind:i.kind,file:n,scope:r,nodes:u});p.init(s,o),this.ensureBlock();var c=e.body;c.body=u.concat(c.body)}}},Function:function(e,t,r,n){for(var i=!1,a=e.params,s=0;s<a.length;s++){var o=a[s];if(l.isPattern(o)){i=!0;break}}if(i){for(var u=[],p=0;p<e.params.length;p++){var o=e.params[p];if(l.isPattern(o)){var c=r.generateUidIdentifier("ref");if(l.isAssignmentPattern(o)){var f=o;o=o.left,f.left=c}else e.params[p]=c;l.inherits(c,o);var d=new h({blockHoist:e.params.length-p,nodes:u,scope:r,file:n,kind:"let"});d.init(o,c)}}this.ensureBlock();var m=e.body;m.body=u.concat(m.body)}},CatchClause:function(e,t,r,n){var i=e.param;if(l.isPattern(i)){var a=r.generateUidIdentifier("ref");e.param=a;var s=[],o=new h({kind:"let",file:n,scope:r,nodes:s});o.init(i,a),e.body.body=s.concat(e.body.body)}},AssignmentExpression:function(e,t,r,n){if(l.isPattern(e.left)){var i,a=[],s=new h({operator:e.operator,file:n,scope:r,nodes:a});return(this.isCompletionRecord()||!this.parentPath.isExpressionStatement())&&(i=r.generateUidIdentifierBasedOnNode(e.right,"ref"),a.push(l.variableDeclaration("var",[l.variableDeclarator(i,e.right)])),l.isArrayExpression(e.right)&&(s.arrays[i.name]=!0)),s.init(e.left,i||e.right),i&&a.push(l.expressionStatement(i)),a}},VariableDeclaration:function(e,t,r,n){if(!l.isForXStatement(t)&&a(e)){for(var i,s=[],o=0;o<e.declarations.length;o++){i=e.declarations[o];var p=i.init,c=i.id,f=new h({nodes:s,scope:r,kind:e.kind,file:n});l.isPattern(c)?(f.init(c,p),+o!==e.declarations.length-1&&l.inherits(s[s.length-1],i)):s.push(l.inherits(f.buildVariableAssignment(i.id,i.init),i))}if(!l.isProgram(t)&&!l.isBlockStatement(t)){for(i=null,o=0;o<s.length;o++){if(e=s[o],i=i||l.variableDeclaration(e.kind,[]),!l.isVariableDeclaration(e)&&i.kind!==e.kind)throw n.errorWithNode(e,u.get("invalidParentForThisNode"));i.declarations=i.declarations.concat(e.declarations)}return i}return s}}};r.visitor=f;var d={ReferencedIdentifier:function(e,t,r,n){n.bindings[e.name]&&(n.deopt=!0,this.stop())}},h=function(){function e(t){i(this,e),this.blockHoist=t.blockHoist,this.operator=t.operator,this.arrays={},this.nodes=t.nodes||[],this.scope=t.scope,this.file=t.file,this.kind=t.kind}return e.prototype.buildVariableAssignment=function(e,t){var r=this.operator;l.isMemberExpression(e)&&(r="=");var n;return n=r?l.expressionStatement(l.assignmentExpression(r,e,t)):l.variableDeclaration(this.kind,[l.variableDeclarator(e,t)]),n._blockHoist=this.blockHoist,n},e.prototype.buildVariableDeclaration=function(e,t){var r=l.variableDeclaration("var",[l.variableDeclarator(e,t)]);return r._blockHoist=this.blockHoist,r},e.prototype.push=function(e,t){l.isObjectPattern(e)?this.pushObjectPattern(e,t):l.isArrayPattern(e)?this.pushArrayPattern(e,t):l.isAssignmentPattern(e)?this.pushAssignmentPattern(e,t):this.nodes.push(this.buildVariableAssignment(e,t))},e.prototype.toArray=function(e,t){return this.file.isLoose("es6.destructuring")||l.isIdentifier(e)&&this.arrays[e.name]?e:this.scope.toArray(e,t)},e.prototype.pushAssignmentPattern=function(e,t){var r=this.scope.generateUidIdentifierBasedOnNode(t),n=l.variableDeclaration("var",[l.variableDeclarator(r,t)]);n._blockHoist=this.blockHoist,this.nodes.push(n);var i=l.conditionalExpression(l.binaryExpression("===",r,l.identifier("undefined")),e.right,r),a=e.left;if(l.isPattern(a)){var s=l.expressionStatement(l.assignmentExpression("=",r,i));s._blockHoist=this.blockHoist,this.nodes.push(s),this.push(a,r)}else this.nodes.push(this.buildVariableAssignment(a,i))},e.prototype.pushObjectSpread=function(e,t,r,n){for(var i=[],a=0;a<e.properties.length;a++){var s=e.properties[a];if(a>=n)break;if(!l.isSpreadProperty(s)){var o=s.key;l.isIdentifier(o)&&!s.computed&&(o=l.literal(s.key.name)),i.push(o)}}i=l.arrayExpression(i);var u=l.callExpression(this.file.addHelper("object-without-properties"),[t,i]);this.nodes.push(this.buildVariableAssignment(r.argument,u))},e.prototype.pushObjectProperty=function(e,t){l.isLiteral(e.key)&&(e.computed=!0);var r=e.value,n=l.memberExpression(t,e.key,e.computed);l.isPattern(r)?this.push(r,n):this.nodes.push(this.buildVariableAssignment(r,n))},e.prototype.pushObjectPattern=function(e,t){if(e.properties.length||this.nodes.push(l.expressionStatement(l.callExpression(this.file.addHelper("object-destructuring-empty"),[t]))),e.properties.length>1&&!this.scope.isStatic(t)){var r=this.scope.generateUidIdentifierBasedOnNode(t);this.nodes.push(this.buildVariableDeclaration(r,t)),t=r}for(var n=0;n<e.properties.length;n++){var i=e.properties[n];l.isSpreadProperty(i)?this.pushObjectSpread(e,t,i,n):this.pushObjectProperty(i,t)}},e.prototype.canUnpackArrayPattern=function(e,t){if(!l.isArrayExpression(t))return!1;if(!(e.elements.length>t.elements.length)){if(e.elements.length<t.elements.length&&!s(e))return!1;for(var r=e.elements,n=0;n<r.length;n++){var i=r[n];if(!i)return!1;if(l.isMemberExpression(i))return!1}for(var a=t.elements,o=0;o<a.length;o++){var i=a[o];if(l.isSpreadElement(i))return!1}var u=l.getBindingIdentifiers(e),p={deopt:!1,bindings:u};return this.scope.traverse(t,d,p),!p.deopt}},e.prototype.pushUnpackedArrayPattern=function(e,t){for(var r=0;r<e.elements.length;r++){var n=e.elements[r];l.isRestElement(n)?this.push(n.argument,l.arrayExpression(t.elements.slice(r))):this.push(n,t.elements[r])}},e.prototype.pushArrayPattern=function(e,t){if(e.elements){if(this.canUnpackArrayPattern(e,t))return this.pushUnpackedArrayPattern(e,t);var r=!s(e)&&e.elements.length,n=this.toArray(t,r);l.isIdentifier(n)?t=n:(t=this.scope.generateUidIdentifierBasedOnNode(t),this.arrays[t.name]=!0,this.nodes.push(this.buildVariableDeclaration(t,n)));for(var i=0;i<e.elements.length;i++){var a=e.elements[i];if(a){var o;l.isRestElement(a)?(o=this.toArray(t),i>0&&(o=l.callExpression(l.memberExpression(o,l.identifier("slice")),[l.literal(i)])),a=a.argument):o=l.memberExpression(t,l.literal(i),!0),this.push(a,o)}}}},e.prototype.init=function(e,t){if(!l.isArrayExpression(t)&&!l.isMemberExpression(t)){var r=this.scope.maybeGenerateMemoised(t,!0);r&&(this.nodes.push(this.buildVariableDeclaration(r,t)),t=r)}return this.push(e,t),this.nodes},e}()},{179:179,43:43}],96:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){var r=[],n=e.right;if(!l.isIdentifier(n)||!t.hasBinding(n.name)){var i=t.generateUidIdentifier("arr");r.push(l.variableDeclaration("var",[l.variableDeclarator(i,n)])),n=i}var a=t.generateUidIdentifier("i"),s=u.template("for-of-array",{BODY:e.body,KEY:a,ARR:n});l.inherits(s,e),l.ensureBlock(s);var o=l.memberExpression(n,a,!0),p=e.left;return l.isVariableDeclaration(p)?(p.declarations[0].init=o,s.body.body.unshift(p)):s.body.body.unshift(l.expressionStatement(l.assignmentExpression("=",p,o))),this.parentPath.isLabeledStatement()&&(s=l.labeledStatement(this.parentPath.node.label,s)),r.push(s),r}r.__esModule=!0,r._ForOfStatementArray=i;var a=e(43),s=n(a),o=e(182),u=n(o),p=e(179),l=n(p),c={ForOfStatement:function(e,t,r,n){if(this.get("right").isArrayExpression())return i.call(this,e,r,n);var a=d;n.isLoose("es6.forOf")&&(a=f);var s=a(e,t,r,n),o=s.declar,u=s.loop,p=u.body;return this.ensureBlock(),o&&p.body.push(o),p.body=p.body.concat(e.body.body),l.inherits(u,e),l.inherits(u.body,e.body),s.replaceParent?(this.parentPath.replaceWithMultiple(s.node),void this.dangerouslyRemove()):s.node}};r.visitor=c;var f=function(e,t,r,n){var i,a,o=e.left;if(l.isIdentifier(o)||l.isPattern(o)||l.isMemberExpression(o))a=o;else{if(!l.isVariableDeclaration(o))throw n.errorWithNode(o,s.get("unknownForHead",o.type));a=r.generateUidIdentifier("ref"),i=l.variableDeclaration(o.kind,[l.variableDeclarator(o.declarations[0].id,a)])}var p=r.generateUidIdentifier("iterator"),c=r.generateUidIdentifier("isArray"),f=u.template("for-of-loose",{LOOP_OBJECT:p,IS_ARRAY:c,OBJECT:e.right,INDEX:r.generateUidIdentifier("i"),ID:a});return i||f.body.body.shift(),{declar:i,node:f,loop:f}},d=function(e,t,r,n){var i,a=e.left,o=r.generateUidIdentifier("step"),p=l.memberExpression(o,l.identifier("value"));if(l.isIdentifier(a)||l.isPattern(a)||l.isMemberExpression(a))i=l.expressionStatement(l.assignmentExpression("=",a,p));else{if(!l.isVariableDeclaration(a))throw n.errorWithNode(a,s.get("unknownForHead",a.type));i=l.variableDeclaration(a.kind,[l.variableDeclarator(a.declarations[0].id,p)])}var c=r.generateUidIdentifier("iterator"),f=u.template("for-of",{ITERATOR_HAD_ERROR_KEY:r.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:r.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:r.generateUidIdentifier("iteratorError"),ITERATOR_KEY:c,STEP_KEY:o,OBJECT:e.right,BODY:null}),d=l.isLabeledStatement(t),h=f[3].block.body,m=h[0];return d&&(h[0]=l.labeledStatement(t.label,m)),{replaceParent:d,declar:i,loop:m,node:f}}},{179:179,182:182,43:43}],97:[function(e,t,r){"use strict";r.__esModule=!0;var n={group:"builtin-pre"};r.metadata=n;var i={Literal:function(e){"number"==typeof e.value&&/^0[ob]/i.test(e.raw)&&(e.raw=void 0),"string"==typeof e.value&&/\\[u]/gi.test(e.raw)&&(e.raw=void 0)}};r.visitor=i},{}],98:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){if(e._blockHoist)for(var r=0;r<t.length;r++)t[r]._blockHoist=e._blockHoist}r.__esModule=!0;var a=e(179),s=n(a),o={group:"builtin-modules"};r.metadata=o;var u={ImportDeclaration:function(e,t,r,n){if("type"!==e.importKind&&"typeof"!==e.importKind){var i=[];if(e.specifiers.length)for(var a=e.specifiers,s=0;s<a.length;s++){var o=a[s];n.moduleFormatter.importSpecifier(o,e,i,r); }else n.moduleFormatter.importDeclaration(e,i,r);return 1===i.length&&(i[0]._blockHoist=e._blockHoist),i}},ExportAllDeclaration:function(e,t,r,n){var a=[];return n.moduleFormatter.exportAllDeclaration(e,a,r),i(e,a),a},ExportDefaultDeclaration:function(e,t,r,n){var a=[];return n.moduleFormatter.exportDeclaration(e,a,r),i(e,a),a},ExportNamedDeclaration:function(e,t,r,n){if(!this.get("declaration").isTypeAlias()){var a=[];if(e.declaration){if(s.isVariableDeclaration(e.declaration)){var o=e.declaration.declarations[0];o.init=o.init||s.identifier("undefined")}n.moduleFormatter.exportDeclaration(e,a,r)}else if(e.specifiers)for(var u=0;u<e.specifiers.length;u++)n.moduleFormatter.exportSpecifier(e.specifiers[u],e,a,r);return i(e,a),a}}};r.visitor=u},{179:179}],99:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,r,n,i){if((t.method||"init"!==t.kind)&&p.isFunction(t.value)){var a=new o["default"]({getObjectRef:n,methodNode:t,methodPath:e,isStatic:!0,scope:r,file:i});a.replace()}}r.__esModule=!0;var s=e(65),o=i(s),u=e(179),p=n(u),l={ObjectExpression:function(e,t,r,n){for(var i,s=function(){return i=i||r.generateUidIdentifier("obj")},o=this.get("properties"),u=0;u<e.properties.length;u++)a(o[u],e.properties[u],r,s,n);return i?(r.push({id:i}),p.assignmentExpression("=",i,e)):void 0}};r.visitor=l},{179:179,65:65}],100:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var a=e(56),s=i(a),o=e(59),u=i(o),p=e(182),l=n(p),c=e(179),f=n(c),d=function(e){for(var t=0;t<e.params.length;t++)if(!f.isIdentifier(e.params[t]))return!0;return!1},h={ReferencedIdentifier:function(e,t,r,n){if("eval"!==e.name){if(!n.scope.hasOwnBinding(e.name))return;if(n.scope.bindingIdentifierEquals(e.name,e))return}n.iife=!0,this.stop()}},m={Function:function(e,t,r,n){function i(t,r,i){var s;s=a(i)||f.isPattern(t)||n.transformers["es6.spec.blockScoping"].canTransform()?l.template("default-parameter",{VARIABLE_NAME:t,DEFAULT_VALUE:r,ARGUMENT_KEY:f.literal(i),ARGUMENTS:c},!0):l.template("default-parameter-assign",{VARIABLE_NAME:t,DEFAULT_VALUE:r},!0),s._blockHoist=e.params.length-i,p.push(s)}function a(e){return e+1>m}if(d(e)){this.ensureBlock();var o={iife:!1,scope:r},p=[],c=f.identifier("arguments");c._shadowedFunctionLiteral=this;for(var m=u["default"](e),y=this.get("params"),g=0;g<y.length;g++){var v=y[g];if(v.isAssignmentPattern()){var b=v.get("left"),E=v.get("right");if(a(g)||b.isPattern()){var x=r.generateUidIdentifier("x");x._isDefaultPlaceholder=!0,e.params[g]=x}else e.params[g]=b.node;o.iife||(E.isIdentifier()&&r.hasOwnBinding(E.node.name)?o.iife=!0:E.traverse(h,o)),i(b.node,E.node,g)}else v.isIdentifier()||v.traverse(h,o),n.transformers["es6.spec.blockScoping"].canTransform()&&v.isIdentifier()&&i(v.node,f.identifier("undefined"),g)}e.params=e.params.slice(0,m),o.iife?(p.push(s["default"](e,r)),e.body=f.blockStatement(p)):e.body.body=p.concat(e.body.body)}}};r.visitor=m},{179:179,182:182,56:56,59:59}],101:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(168),a=n(i),s=e(100),o=n(s),u=e(102),p=n(u),l={group:"builtin-advanced"};r.metadata=l;var c=a.merge([p.visitor,o.visitor]);r.visitor=c},{100:100,102:102,168:168}],102:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){if(0!==t){var r,n=e.property;p.isLiteral(n)?(n.value+=t,n.raw=String(n.value)):(r=p.binaryExpression("+",n,p.literal(t)),e.property=r)}}function a(e){return p.isRestElement(e.params[e.params.length-1])}r.__esModule=!0;var s=e(182),o=n(s),u=e(179),p=n(u),l={Scope:function(e,t,r,n){r.bindingIdentifierEquals(n.name,n.outerBinding)||this.skip()},Flow:function(){this.skip()},Function:function(e,t,r,n){var i=n.noOptimise;n.noOptimise=!0,this.traverse(l,n),n.noOptimise=i,this.skip()},ReferencedIdentifier:function(e,t,r,n){if("arguments"===e.name&&(n.deopted=!0),e.name===n.name)if(n.noOptimise)n.deopted=!0;else{if(this.parentPath.isMemberExpression({computed:!0,object:e})){var i=this.parentPath.get("property");if(i.isBaseType("number"))return void n.candidates.push(this)}if(this.parentPath.isSpreadElement()&&0===n.offset){var a=this.parentPath.parentPath;if(a.isCallExpression()&&1===a.node.arguments.length)return void n.candidates.push(this)}n.references.push(this)}},BindingIdentifier:function(e,t,r,n){e.name===n.name&&(n.deopted=!0)}},c={Function:function(e,t,r){if(a(e)){var n=e.params.pop(),s=n.argument,u=p.identifier("arguments");if(u._shadowedFunctionLiteral=this,p.isPattern(s)){var c=s;s=r.generateUidIdentifier("ref");var f=p.variableDeclaration("let",c.elements.map(function(e,t){var r=p.memberExpression(s,p.literal(t),!0);return p.variableDeclarator(e,r)}));e.body.body.unshift(f)}var d={references:[],offset:e.params.length,argumentsNode:u,outerBinding:r.getBindingIdentifier(s.name),candidates:[],name:s.name,deopted:!1};if(this.traverse(l,d),d.deopted||d.references.length){d.references=d.references.concat(d.candidates),d.deopted=d.deopted||!!e.shadow;var h=p.literal(e.params.length),m=r.generateUidIdentifier("key"),y=r.generateUidIdentifier("len"),g=m,v=y;e.params.length&&(g=p.binaryExpression("-",m,h),v=p.conditionalExpression(p.binaryExpression(">",y,h),p.binaryExpression("-",y,h),p.literal(0)));var b=o.template("rest",{ARRAY_TYPE:n.typeAnnotation,ARGUMENTS:u,ARRAY_KEY:g,ARRAY_LEN:v,START:h,ARRAY:s,KEY:m,LEN:y});if(d.deopted)b._blockHoist=e.params.length+1,e.body.body.unshift(b);else{b._blockHoist=1;var E,x=this.getEarliestCommonAncestorFrom(d.references).getStatementParent();x.findParent(function(e){if(e.isLoop())E=e;else if(e.isFunction())return!0}),E&&(x=E),x.insertBefore(b)}}else if(d.candidates.length)for(var S=d.candidates,A=0;A<S.length;A++){var D=S[A];D.replaceWith(u),D.parentPath.isMemberExpression()&&i(D.parent,d.offset)}}}};r.visitor=c},{179:179,182:182}],103:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t,r){for(var n=e.properties,i=0;i<n.length;i++){var a=n[i];t.push(o.expressionStatement(o.assignmentExpression("=",o.memberExpression(r,a.key,a.computed||o.isLiteral(a.key)),a.value)))}}function a(e,t,r,n,i){for(var a=e.properties,s=0;s<a.length;s++){var u=a[s];if(o.isLiteral(o.toComputedKey(u),{value:"__proto__"}))n.push(u);else{var p=u.key;o.isIdentifier(p)&&!u.computed&&(p=o.literal(p.name));var l=o.callExpression(i.addHelper("define-property"),[r,p,u.value]);t.push(o.expressionStatement(l))}}if(1===t.length){var c=t[0].expression;if(o.isCallExpression(c))return c.arguments[0]=o.objectExpression(n),c}}r.__esModule=!0;var s=e(179),o=n(s),u={ObjectExpression:{exit:function(e,t,r,n){for(var s=!1,u=e.properties,p=0;p<u.length;p++){var l=u[p];if(s=o.isProperty(l,{computed:!0,kind:"init"}))break}if(s){var c=[],f=!1;e.properties=e.properties.filter(function(e){return e.computed&&(f=!0),"init"===e.kind&&f?!0:(c.push(e),!1)});var d=r.generateUidIdentifierBasedOnNode(t),h=[],m=a;n.isLoose("es6.properties.computed")&&(m=i);var y=m(e,h,d,c,n);return y?y:(h.unshift(o.variableDeclaration("var",[o.variableDeclarator(d,o.objectExpression(c))])),h.push(o.expressionStatement(d)),h)}}}};r.visitor=u},{179:179}],104:[function(e,t,r){"use strict";r.__esModule=!0;var n={Property:function(e){e.method&&(e.method=!1),e.shorthand&&(e.shorthand=!1)}};r.visitor=n},{}],105:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(63),a=n(i),s=e(179),o=n(s),u={Literal:function(e){return a.is(e,"y")?o.newExpression(o.identifier("RegExp"),[o.literal(e.regex.pattern),o.literal(e.regex.flags)]):void 0}};r.visitor=u},{179:179,63:63}],106:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var a=e(583),s=i(a),o=e(63),u=n(o),p={Literal:function(e){u.is(e,"u")&&(e.regex.pattern=s["default"](e.regex.pattern,e.regex.flags),u.pullFlag(e,"u"))}};r.visitor=p},{583:583,63:63}],107:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={group:"builtin-pre",optional:!0};r.metadata=s;var o={ArrowFunctionExpression:function(e,t,r,n){if(!e.shadow){e.shadow={"this":!1};var i=a.thisExpression();return i._forceShadow=this,a.ensureBlock(e),this.get("body").unshiftContainer("body",a.expressionStatement(a.callExpression(n.addHelper("new-arrow-check"),[a.thisExpression(),i]))),a.callExpression(a.memberExpression(e,a.identifier("bind")),[a.thisExpression()])}}};r.visitor=o},{179:179}],108:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){return o.callExpression(t.addHelper("temporal-assert-defined"),[e,o.literal(e.name),t.addHelper("temporal-undefined")])}function a(e,t,r){var n=r.letRefs[e.name];return n?t.getBindingIdentifier(e.name)===n:!1}r.__esModule=!0;var s=e(179),o=n(s),u={ReferencedIdentifier:function(e,t,r,n){if((!o.isFor(t)||t.left!==e)&&a(e,r,n)){var s=i(e,n.file);return this.skip(),o.isUpdateExpression(t)?void(t._ignoreBlockScopingTDZ||this.parentPath.replaceWith(o.sequenceExpression([s,t]))):o.logicalExpression("&&",s,e)}},AssignmentExpression:{exit:function(e,t,r,n){if(!e._ignoreBlockScopingTDZ){var s=[],u=this.getBindingIdentifiers();for(var p in u){var l=u[p];a(l,r,n)&&s.push(i(l,n.file))}return s.length?(e._ignoreBlockScopingTDZ=!0,s.push(e),s.map(o.expressionStatement)):void 0}}}},p={optional:!0,group:"builtin-advanced"};r.metadata=p;var l={"Program|Loop|BlockStatement":{exit:function(e,t,r,n){var i=e._letReferences;i&&this.traverse(u,{letRefs:i,file:n})}}};r.visitor=l},{179:179}],109:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={group:"builtin-pre",optional:!0};r.metadata=s;var o={Program:function(){var e=this.scope.generateUidIdentifier("null");this.unshiftContainer("body",[a.variableDeclaration("var",[a.variableDeclarator(e,a.literal(null))]),a.exportNamedDeclaration(null,[a.exportSpecifier(e,a.identifier("__proto__"))])])}};r.visitor=o},{179:179}],110:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={optional:!0};r.metadata=s;var o={UnaryExpression:function(e,t,r,n){if(!e._ignoreSpecSymbols){if(this.parentPath.isBinaryExpression()&&a.EQUALITY_BINARY_OPERATORS.indexOf(t.operator)>=0){var i=this.getOpposite();if(i.isLiteral()&&"symbol"!==i.node.value&&"object"!==i.node.value)return}if("typeof"===e.operator){var s=a.callExpression(n.addHelper("typeof"),[e.argument]);if(this.get("argument").isIdentifier()){var o=a.literal("undefined"),u=a.unaryExpression("typeof",e.argument);return u._ignoreSpecSymbols=!0,a.conditionalExpression(a.binaryExpression("===",u,o),o,s)}return s}}},BinaryExpression:function(e,t,r,n){return"instanceof"===e.operator?a.callExpression(n.addHelper("instanceof"),[e.left,e.right]):void 0},"VariableDeclaration|FunctionDeclaration":function(e){e._generated&&this.skip()}};r.visitor=o},{179:179}],111:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={optional:!0,group:"builtin-pre"};r.metadata=s;var o={TemplateLiteral:function(e,t){if(!a.isTaggedTemplateExpression(t))for(var r=0;r<e.expressions.length;r++)e.expressions[r]=a.callExpression(a.identifier("String"),[e.expressions[r]])}};r.visitor=o},{179:179}],112:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){return t.hub.file.isLoose("es6.spread")&&!u.isIdentifier(e.argument,{name:"arguments"})?e.argument:t.toArray(e.argument,!0)}function a(e){for(var t=0;t<e.length;t++)if(u.isSpreadElement(e[t]))return!0;return!1}function s(e,t){for(var r=[],n=[],a=function(){n.length&&(r.push(u.arrayExpression(n)),n=[])},s=0;s<e.length;s++){var o=e[s];u.isSpreadElement(o)?(a(),r.push(i(o,t))):n.push(o)}return a(),r}r.__esModule=!0;var o=e(179),u=n(o),p={group:"builtin-advanced"};r.metadata=p;var l={ArrayExpression:function(e,t,r){var n=e.elements;if(a(n)){var i=s(n,r),o=i.shift();return u.isArrayExpression(o)||(i.unshift(o),o=u.arrayExpression([])),u.callExpression(u.memberExpression(o,u.identifier("concat")),i)}},CallExpression:function(e,t,r){var n=e.arguments;if(a(n)){var i=u.identifier("undefined");e.arguments=[];var o;o=1===n.length&&"arguments"===n[0].argument.name?[n[0].argument]:s(n,r);var p=o.shift();o.length?e.arguments.push(u.callExpression(u.memberExpression(p,u.identifier("concat")),o)):e.arguments.push(p);var l=e.callee;if(this.get("callee").isMemberExpression()){var c=r.maybeGenerateMemoised(l.object);c?(l.object=u.assignmentExpression("=",c,l.object),i=c):i=l.object,u.appendToMemberExpression(l,u.identifier("apply"))}else e.callee=u.memberExpression(e.callee,u.identifier("apply"));e.arguments.unshift(i)}},NewExpression:function(e,t,r,n){var i=e.arguments;if(a(i)){var o=s(i,r),p=u.arrayExpression([u.literal(null)]);return i=u.callExpression(u.memberExpression(p,u.identifier("concat")),o),u.newExpression(u.callExpression(u.memberExpression(n.addHelper("bind"),u.identifier("apply")),[e.callee,i]),[])}}};r.visitor=l},{179:179}],113:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){return v.blockStatement([v.returnStatement(e)])}r.__esModule=!0;var o=e(415),u=i(o),p=e(43),l=n(p),c=e(406),f=i(c),d=e(182),h=n(d),m=e(414),y=i(m),g=e(179),v=n(g),b={group:"builtin-trailing"};r.metadata=b;var E={Function:function(e,t,r,n){if(!e.generator&&!e.async){var i=new x(this,r,n);i.run()}}};r.visitor=E;var E={enter:function(e,t){v.isTryStatement(t)&&(e===t.block?this.skip():t.finalizer&&e!==t.finalizer&&this.skip())},ReturnStatement:function(e,t,r,n){return n.subTransform(e.argument)},Function:function(){this.skip()},VariableDeclaration:function(e,t,r,n){n.vars.push(e)},ThisExpression:function(e,t,r,n){n.isShadowed||(n.needsThis=!0,n.thisPaths.push(this))},ReferencedIdentifier:function(e,t,r,n){"arguments"!==e.name||n.isShadowed&&!e._shadowedFunctionLiteral||(n.needsArguments=!0,n.argumentsPaths.push(this))}},x=function(){function e(t,r,n){a(this,e),this.hasTailRecursion=!1,this.needsArguments=!1,this.argumentsPaths=[],this.setsArguments=!1,this.needsThis=!1,this.thisPaths=[],this.isShadowed=t.isArrowFunctionExpression()||t.is("shadow"),this.ownerId=t.node.id,this.vars=[],this.scope=r,this.path=t,this.file=n,this.node=t.node}return e.prototype.getArgumentsId=function(){return this.argumentsId=this.argumentsId||this.scope.generateUidIdentifier("arguments")},e.prototype.getThisId=function(){return this.thisId=this.thisId||this.scope.generateUidIdentifier("this")},e.prototype.getLeftId=function(){return this.leftId=this.leftId||this.scope.generateUidIdentifier("left")},e.prototype.getFunctionId=function(){return this.functionId=this.functionId||this.scope.generateUidIdentifier("function")},e.prototype.getAgainId=function(){return this.againId=this.againId||this.scope.generateUidIdentifier("again")},e.prototype.getParams=function(){var e=this.params;if(!e){e=this.node.params,this.paramDecls=[];for(var t=0;t<e.length;t++){var r=e[t];r._isDefaultPlaceholder||this.paramDecls.push(v.variableDeclarator(r,e[t]=this.scope.generateUidIdentifier("x")))}}return this.params=e},e.prototype.hasDeopt=function(){var e=this.scope.getBinding(this.ownerId.name);return e&&!e.constant},e.prototype.run=function(){var e=this.node,t=this.ownerId;if(t&&(this.path.traverse(E,this),this.hasTailRecursion)){if(this.hasDeopt())return void this.file.log.deopt(e,l.get("tailCallReassignmentDeopt"));for(var r=this.path.ensureBlock().body,n=0;n<r.length;n++){var i=r[n];v.isFunctionDeclaration(i)&&(i=r[n]=v.variableDeclaration("var",[v.variableDeclarator(i.id,v.toExpression(i))]),i._blockHoist=2)}var a=this.paramDecls;if(a.length>0){var s=v.variableDeclaration("var",a);s._blockHoist=1/0,r.unshift(s)}r.unshift(v.expressionStatement(v.assignmentExpression("=",this.getAgainId(),v.literal(!1)))),e.body=h.template("tail-call-body",{FUNCTION_ID:this.getFunctionId(),AGAIN_ID:this.getAgainId(),BLOCK:e.body});var o=[];if(this.needsThis){for(var u=this.thisPaths,p=0;p<u.length;p++){var c=u[p];c.replaceWith(this.getThisId())}o.push(v.variableDeclarator(this.getThisId(),v.thisExpression()))}if(this.needsArguments||this.setsArguments){for(var f=this.argumentsPaths,d=0;d<f.length;d++){var m=f[d];m.replaceWith(this.argumentsId)}var y=v.variableDeclarator(this.argumentsId);this.argumentsId&&(y.init=v.identifier("arguments"),y.init._shadowedFunctionLiteral=this.path),o.push(y)}var g=this.leftId;g&&o.push(v.variableDeclarator(g)),o.length>0&&e.body.body.unshift(v.variableDeclaration("var",o))}},e.prototype.subTransform=function(e){if(e){var t=this["subTransform"+e.type];return t?t.call(this,e):void 0}},e.prototype.subTransformConditionalExpression=function(e){var t=this.subTransform(e.consequent),r=this.subTransform(e.alternate);return t||r?(e.type="IfStatement",e.consequent=t?v.toBlock(t):s(e.consequent),r?e.alternate=v.isIfStatement(r)?r:v.toBlock(r):e.alternate=s(e.alternate),[e]):void 0},e.prototype.subTransformLogicalExpression=function(e){var t=this.subTransform(e.right);if(t){var r=this.getLeftId(),n=v.assignmentExpression("=",r,e.left);return"&&"===e.operator&&(n=v.unaryExpression("!",n)),[v.ifStatement(n,s(r))].concat(t)}},e.prototype.subTransformSequenceExpression=function(e){var t=e.expressions,r=this.subTransform(t[t.length-1]);return r?(1===--t.length&&(e=t[0]),[v.expressionStatement(e)].concat(r)):void 0},e.prototype.subTransformCallExpression=function(e){var t,r,n=e.callee;if(v.isMemberExpression(n,{computed:!1})&&v.isIdentifier(n.property)){switch(n.property.name){case"call":r=v.arrayExpression(e.arguments.slice(1));break;case"apply":r=e.arguments[1]||v.identifier("undefined"),this.needsArguments=!0;break;default:return}t=e.arguments[0],n=n.object}if(v.isIdentifier(n)&&this.scope.bindingIdentifierEquals(n.name,this.ownerId)&&(this.hasTailRecursion=!0,!this.hasDeopt())){var i=[];this.needsThis&&!v.isThisExpression(t)&&i.push(v.expressionStatement(v.assignmentExpression("=",this.getThisId(),t||v.identifier("undefined")))),r||(r=v.arrayExpression(e.arguments));var a=this.getArgumentsId(),s=this.getParams();if(this.needsArguments&&i.push(v.expressionStatement(v.assignmentExpression("=",a,r))),v.isArrayExpression(r)){for(var o=r.elements;o.length<s.length;)o.push(v.identifier("undefined"));for(var p=0;p<o.length;p++){var l=s[p],c=o[p];l&&!l._isDefaultPlaceholder&&(o[p]=v.assignmentExpression("=",l,c))}if(!this.needsArguments)for(var d=o,h=0;h<d.length;h++){var c=d[h];this.scope.isPure(c)||i.push(v.expressionStatement(c))}}else{this.setsArguments=!0;for(var p=0;p<s.length;p++){var l=s[p];l._isDefaultPlaceholder||i.push(v.expressionStatement(v.assignmentExpression("=",l,v.memberExpression(a,v.literal(p),!0))))}}if(i.push(v.expressionStatement(v.assignmentExpression("=",this.getAgainId(),v.literal(!0)))),this.vars.length>0){var m=f["default"](y["default"](this.vars,function(e){return e.declarations})),g=u["default"](m,function(e,t){return v.assignmentExpression("=",t.id,e)},v.identifier("undefined")),b=v.expressionStatement(g);i.push(b)}return i.push(v.continueStatement(this.getFunctionId())),i}},e}()},{179:179,182:182,406:406,414:414,415:415,43:43}],114:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return o.isLiteral(e)&&"string"==typeof e.value}function a(e,t){var r=o.binaryExpression("+",e,t);return r._templateLiteralProduced=!0,r}r.__esModule=!0;var s=e(179),o=n(s),u={group:"builtin-pre"};r.metadata=u;var p={TaggedTemplateExpression:function(e,t,r,n){for(var i=e.quasi,a=[],s=[],u=[],p=i.quasis,l=0;l<p.length;l++){var c=p[l];s.push(o.literal(c.value.cooked)),u.push(o.literal(c.value.raw))}s=o.arrayExpression(s),u=o.arrayExpression(u);var f="tagged-template-literal";n.isLoose("es6.templateLiterals")&&(f+="-loose");var d=n.addTemplateObject(f,s,u);return a.push(d),a=a.concat(i.expressions),o.callExpression(e.tag,a)},TemplateLiteral:function(e,t,r,n){for(var s=[],u=e.quasis,p=0;p<u.length;p++){var l=u[p];s.push(o.literal(l.value.cooked));var c=e.expressions.shift();c&&s.push(c)}if(s=s.filter(function(e){return!o.isLiteral(e,{value:""})}),i(s[0])||i(s[1])||s.unshift(o.literal("")),!(s.length>1))return s[0];for(var f=a(s.shift(),s.shift()),d=s,h=0;h<d.length;h++){var m=d[h];f=a(f,m)}this.replaceWith(f)}};r.visitor=p},{179:179}],115:[function(e,t,r){"use strict";r.__esModule=!0;var n={stage:3};r.metadata=n},{}],116:[function(e,t,r){"use strict";r.__esModule=!0;var n={stage:1,dependencies:["es6.classes"]};r.metadata=n},{}],117:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=[],r=h.functionExpression(null,[],h.blockStatement(t),!0);return r.shadow=!0,t.push(u["default"](e,function(){return h.expressionStatement(h.yieldExpression(e.body))})),h.callExpression(r,[])}function s(e,t,r){var n=r.generateUidIdentifierBasedOnNode(t),i=f.template("array-comprehension-container",{KEY:n});i.callee.shadow=!0;var a=i.callee.body,s=a.body;l["default"].hasType(e,r,"YieldExpression",h.FUNCTION_TYPES)&&(i.callee.generator=!0,i=h.yieldExpression(i,!0));var o=s.pop();return s.push(u["default"](e,function(){return f.template("array-push",{STATEMENT:e.body,KEY:n},!0)})),s.push(o),i}r.__esModule=!0;var o=e(54),u=i(o),p=e(148),l=i(p),c=e(182),f=n(c),d=e(179),h=n(d),m={stage:0};r.metadata=m;var y={ComprehensionExpression:function(e,t,r){var n=s;return e.generator&&(n=a),n(e,t,r)}};r.visitor=y},{148:148,179:179,182:182,54:54}],118:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var a=e(60),s=i(a),o=e(57),u=n(o),p=e(179),l=n(p),c={dependencies:["es6.classes"],optional:!0,stage:1};r.metadata=c;var f={ObjectExpression:function(e,t,r,n){for(var i=!1,a=0;a<e.properties.length;a++){var o=e.properties[a];if(o.decorators){i=!0;break}}if(i){for(var p={},a=0;a<e.properties.length;a++){var o=e.properties[a];o.decorators&&s["default"](o.decorators,r),"init"!==o.kind||o.method||(o.kind="",o.value=l.functionExpression(null,[],l.blockStatement([l.returnStatement(o.value)]))),u.push(p,o,"initializer",n)}var c=u.toClassObject(p);return c=u.toComputedObjectFromClass(c),l.callExpression(n.addHelper("create-decorated-object"),[c])}}};r.visitor=f},{179:179,57:57,60:60}],119:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={optional:!0,stage:0};r.metadata=s;var o={DoExpression:function(e){var t=e.body.body;return t.length?t:a.identifier("undefined")}};r.visitor=o},{179:179}],120:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var a=e(53),s=i(a),o=e(179),u=n(o),p={stage:3};r.metadata=p;var l=u.memberExpression(u.identifier("Math"),u.identifier("pow")),c=s["default"]({operator:"**",build:function(e,t){return u.callExpression(l,[e,t])}});r.visitor=c},{179:179,53:53}],121:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t,r){var n=e.specifiers[0];if(s.isExportNamespaceSpecifier(n)||s.isExportDefaultSpecifier(n)){var a,o=e.specifiers.shift(),u=r.generateUidIdentifier(o.exported.name);a=s.isExportNamespaceSpecifier(o)?s.importNamespaceSpecifier(u):s.importDefaultSpecifier(u),t.push(s.importDeclaration([a],e.source)),t.push(s.exportNamedDeclaration(null,[s.exportSpecifier(u,o.exported)])),i(e,t,r)}}r.__esModule=!0;var a=e(179),s=n(a),o={stage:1};r.metadata=o;var u={ExportNamedDeclaration:function(e,t,r){var n=[];return i(e,n,r),n.length?(e.specifiers.length>=1&&n.push(e),n):void 0}};r.visitor=u},{179:179}],122:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){var t=e.path.getData("functionBind");return t?t:(t=e.generateDeclaredUidIdentifier("context"),e.path.setData("functionBind",t))}function a(e,t){var r=e.object||e.callee.object;return t.isStatic(r)&&r}function s(e,t){var r=a(e,t);if(r)return r;var n=i(t);return e.object?e.callee=u.sequenceExpression([u.assignmentExpression("=",n,e.object),e.callee]):e.callee.object=u.assignmentExpression("=",n,e.callee.object),n}r.__esModule=!0;var o=e(179),u=n(o),p={optional:!0,stage:0};r.metadata=p;var l={CallExpression:function(e,t,r){var n=e.callee;if(u.isBindExpression(n)){var i=s(n,r);e.callee=u.memberExpression(n.callee,u.identifier("call")),e.arguments.unshift(i)}},BindExpression:function(e,t,r){var n=s(e,r);return u.callExpression(u.memberExpression(e.callee,u.identifier("bind")),[n])}};r.visitor=l},{179:179}],123:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={stage:2,dependencies:["es6.destructuring"]};r.metadata=s;var o=function(e){for(var t=0;t<e.properties.length;t++)if(a.isSpreadProperty(e.properties[t]))return!0;return!1},u={ObjectExpression:function(e,t,r,n){if(o(e)){for(var i=[],s=[],u=function(){s.length&&(i.push(a.objectExpression(s)),s=[])},p=0;p<e.properties.length;p++){var l=e.properties[p];a.isSpreadProperty(l)?(u(),i.push(l.argument)):s.push(l)}return u(),a.isObjectExpression(i[0])||i.unshift(a.objectExpression([])),a.callExpression(n.addHelper("extends"),i)}}};r.visitor=u},{179:179}],124:[function(e,t,r){"use strict";r.__esModule=!0;var n={stage:2};r.metadata=n},{}],125:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){return"_"===e.key[0]?!0:void 0}function a(e,t){var r=t.blacklist;return r.length&&l["default"](r,e.key)?!1:void 0}function s(e,t){var r=t.whitelist;return r?l["default"](r,e.key):void 0}function o(e,t){var r=e.metadata.stage;return null!=r&&r>=t.stage?!0:void 0}function u(e,t){return e.metadata.optional&&!l["default"](t.optional,e.key)?!1:void 0}r.__esModule=!0,r.internal=i,r.blacklist=a,r.whitelist=s,r.stage=o,r.optional=u;var p=e(413),l=n(p)},{413:413}],126:[function(e,t,r){"use strict";r.__esModule=!0,r["default"]={"minification.constantFolding":e(183),strict:e(142),eval:e(185),_validation:e(132),_hoistDirectives:e(128),"minification.removeDebugger":e(194),"minification.removeConsole":e(193),"utility.inlineEnvironmentVariables":e(186),"minification.deadCodeElimination":e(184),_modules:e(130),"react.displayName":e(192),"es6.spec.modules":e(109),"es6.spec.arrowFunctions":e(107),"es6.spec.templateLiterals":e(111),"es6.templateLiterals":e(114),"es6.literals":e(97),"validation.undeclaredVariableCheck":e(197),"spec.functionName":e(144),"es7.classProperties":e(116),"es7.trailingFunctionCommas":e(124),"es7.asyncFunctions":e(115),"es7.decorators":e(118),"validation.react":e(145),"es6.arrowFunctions":e(89),"spec.blockScopedFunctions":e(143),"optimisation.react.constantElements":e(191),"optimisation.react.inlineElements":e(135),"es7.comprehensions":e(117),"es6.classes":e(91),asyncToGenerator:e(136),bluebirdCoroutines:e(137),"es6.objectSuper":e(99),"es7.objectRestSpread":e(123),"es7.exponentiationOperator":e(120),"es5.properties.mutators":e(88),"es6.properties.shorthand":e(104),"es6.properties.computed":e(103),"optimisation.flow.forOf":e(133),"es6.forOf":e(96),"es6.regex.sticky":e(105),"es6.regex.unicode":e(106),"es6.constants":e(94),"es7.exportExtensions":e(121),"spec.protoToAssign":e(190),"es7.doExpressions":e(119),"es6.spec.symbols":e(110),"es7.functionBind":e(122),"spec.undefinedToVoid":e(199),"es6.spread":e(112),"es6.parameters":e(101),"es6.destructuring":e(95),"es6.blockScoping":e(90),"es6.spec.blockScoping":e(108),reactCompat:e(139),react:e(140),regenerator:e(141),runtime:e(196),"es6.modules":e(98),_moduleFormatter:e(129),"es6.tailCall":e(113),_shadowFunctions:e(131),"es3.propertyLiterals":e(87),"es3.memberExpressionLiterals":e(86),"minification.memberExpressionLiterals":e(188),"minification.propertyLiterals":e(189),_blockHoist:e(127),jscript:e(187),flow:e(138),"optimisation.modules.system":e(134)},t.exports=r["default"]},{101:101,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,127:127,128:128,129:129,130:130,131:131,132:132,133:133,134:134,135:135,136:136,137:137,138:138,139:139,140:140,141:141,142:142,143:143,144:144,145:145,183:183,184:184,185:185,186:186,187:187,188:188,189:189,190:190,191:191,192:192,193:193,194:194,196:196,197:197,199:199,86:86,87:87,88:88,89:89,90:90,91:91,94:94,95:95,96:96,97:97,98:98,99:99}],127:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var i=e(417),a=n(i),s={group:"builtin-trailing"};r.metadata=s;var o={Block:{exit:function(e){for(var t=!1,r=0;r<e.body.length;r++){var n=e.body[r];if(n&&null!=n._blockHoist){t=!0;break}}t&&(e.body=a["default"](e.body,function(e){var t=e&&e._blockHoist;return null==t&&(t=1),t===!0&&(t=2),-1*t}))}}};r.visitor=o},{417:417}],128:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={group:"builtin-pre"};r.metadata=s;var o={Block:{exit:function(e){for(var t=0;t<e.body.length;t++){var r=e.body[t];if(!a.isExpressionStatement(r)||!a.isLiteral(r.expression))return; r._blockHoist=1/0}}}};r.visitor=o},{179:179}],129:[function(e,t,r){"use strict";r.__esModule=!0;var n={group:"builtin-modules"};r.metadata=n;var i={Program:{exit:function(e,t,r,n){for(var i=n.dynamicImports,a=0;a<i.length;a++){var s=i[a];s._blockHoist=3}e.body=n.dynamicImports.concat(e.body),n.transformers["es6.modules"].canTransform()&&n.moduleFormatter.transform&&n.moduleFormatter.transform(e)}}};r.visitor=i},{}],130:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){var t=e.declaration;return u.inheritsComments(t,e),u.removeComments(e),t._ignoreUserWhitespace=!0,t}function a(e){return u.exportSpecifier(s(e),s(e))}function s(e){var t=e.name,r=e.loc,n=u.identifier(t);return n._loc=r,n}r.__esModule=!0;var o=e(179),u=n(o),p={group:"builtin-pre"};r.metadata=p;var l={ExportDefaultDeclaration:function(e,t,r){var n=e.declaration;if(u.isClassDeclaration(n)){var a=[i(e),e];return e.declaration=n.id,a}if(u.isClassExpression(n)){var s=r.generateUidIdentifier("default");e.declaration=u.variableDeclaration("var",[u.variableDeclarator(s,n)]);var a=[i(e),e];return e.declaration=s,a}if(u.isFunctionDeclaration(n)){e._blockHoist=2;var a=[i(e),e];return e.declaration=n.id,a}},ExportNamedDeclaration:function(e){var t=e.declaration;if(u.isClassDeclaration(t)){e.specifiers=[a(t.id)];var r=[i(e),e];return e.declaration=null,r}if(u.isFunctionDeclaration(t)){var n=u.exportNamedDeclaration(null,[a(t.id)]);return n._blockHoist=2,[i(e),n]}if(u.isVariableDeclaration(t)){var s=[],o=this.get("declaration").getBindingIdentifiers();for(var p in o)s.push(a(o[p]));return[t,u.exportNamedDeclaration(null,s)]}},Program:{enter:function(e){for(var t=[],r=[],n=0;n<e.body.length;n++){var i=e.body[n];u.isImportDeclaration(i)?t.push(i):r.push(i)}e.body=t.concat(r)},exit:function(e,t,r,n){n.transformers["es6.modules"].canTransform()&&n.moduleFormatter.setup&&n.moduleFormatter.setup()}}};r.visitor=l},{179:179}],131:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){return e.is("_forceShadow")?!0:t&&!t.isArrowFunctionExpression()}function a(e,t,r){var n=e.inShadow(t);if(i(e,n)){var a,s=e.node._shadowedFunctionLiteral,o=e.findParent(function(e){return(e.isProgram()||e.isFunction())&&(a=a||e),e.isProgram()?!0:e.isFunction()?s?e===s||e.node===s.node:!e.is("shadow"):!1});if(o!==a){var u=o.getData(t);if(u)return u;var p=r(),l=e.scope.generateUidIdentifier(t);return o.setData(t,l),o.scope.push({id:l,init:p}),l}}}r.__esModule=!0;var s=e(179),o=n(s),u={group:"builtin-trailing"};r.metadata=u;var p={ThisExpression:function(){return a(this,"this",function(){return o.thisExpression()})},ReferencedIdentifier:function(e){return"arguments"===e.name?a(this,"arguments",function(){return o.identifier("arguments")}):void 0}};r.visitor=p},{179:179}],132:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(43),a=n(i),s=e(179),o=n(s),u={group:"builtin-pre"};r.metadata=u;var p={ForXStatement:function(e,t,r,n){var i=e.left;if(o.isVariableDeclaration(i)){var s=i.declarations[0];if(s.init)throw n.errorWithNode(s,a.get("noAssignmentsInForHead"))}},Property:function(e,t,r,n){if("set"===e.kind){var i=e.value.params[0];if(o.isRestElement(i))throw n.errorWithNode(i,a.get("settersNoRest"))}}};r.visitor=p},{179:179,43:43}],133:[function(e,t,r){"use strict";r.__esModule=!0;var n=e(96),i={optional:!0};r.metadata=i;var a={ForOfStatement:function(e,t,r,i){return this.get("right").isGenericType("Array")?n._ForOfStatementArray.call(this,e,r,i):void 0}};r.visitor=a},{96:96}],134:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={optional:!0,group:"builtin-trailing"};r.metadata=s;var o={Program:function(e,t,r,n){n.moduleFormatter._setters&&r.traverse(n.moduleFormatter._setters,u,{exportFunctionIdentifier:n.moduleFormatter.exportIdentifier})}};r.visitor=o;var u={FunctionExpression:{enter:function(e,t,r,n){n.hasExports=!1,n.exportObjectIdentifier=r.generateUidIdentifier("exportObj")},exit:function(e,t,r,n){n.hasExports&&(e.body.body.unshift(a.variableDeclaration("var",[a.variableDeclarator(a.cloneDeep(n.exportObjectIdentifier),a.objectExpression([]))])),e.body.body.push(a.expressionStatement(a.callExpression(a.cloneDeep(n.exportFunctionIdentifier),[a.cloneDeep(n.exportObjectIdentifier)]))))}},CallExpression:function(e,t,r,n){if(a.isIdentifier(e.callee,{name:n.exportFunctionIdentifier.name})){n.hasExports=!0;var i=a.memberExpression(a.cloneDeep(n.exportObjectIdentifier),e.arguments[0],!0);return a.assignmentExpression("=",i,e.arguments[1])}}}},{179:179}],135:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){for(var t=0;t<e.length;t++){var r=e[t];if(p.isJSXSpreadAttribute(r))return!0;if(a(r,"ref"))return!0}return!1}function a(e,t){return p.isJSXAttribute(e)&&p.isJSXIdentifier(e.name,{name:t})}r.__esModule=!0;var s=e(62),o=n(s),u=e(179),p=n(u),l={optional:!0};r.metadata=l;var c={JSXElement:function(e,t,r,n){function s(e,t){u(d.properties,p.identifier(e),t)}function u(e,t,r){e.push(p.property("init",t,r))}var l=e.openingElement;if(!i(l.attributes)){var c=!0,f=p.objectExpression([]),d=p.objectExpression([]),h=p.literal(null),m=l.name;if(p.isJSXIdentifier(m)&&o.isCompatTag(m.name)&&(m=p.literal(m.name),c=!1),e.children.length){var y=o.buildChildren(e);y=1===y.length?y[0]:p.arrayExpression(y),u(f.properties,p.identifier("children"),y)}for(var g=0;g<l.attributes.length;g++){var v=l.attributes[g];a(v,"key")?h=v.value:u(f.properties,v.name,v.value||p.identifier("true"))}return c&&(f=p.callExpression(n.addHelper("default-props"),[p.memberExpression(m,p.identifier("defaultProps")),f])),s("$$typeof",n.addHelper("typeof-react-element")),s("type",m),s("key",h),s("ref",p.literal(null)),s("props",f),s("_owner",p.literal(null)),d}}};r.visitor=c},{179:179,62:62}],136:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var i=e(64),a=n(i),s=e(137);r.manipulateOptions=s.manipulateOptions;var o={optional:!0,dependencies:["es7.asyncFunctions","es6.classes"]};r.metadata=o;var u={Function:function(e,t,r,n){return e.async&&!e.generator?a["default"](this,n.addHelper("async-to-generator")):void 0}};r.visitor=u},{137:137,64:64}],137:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e){e.blacklist.push("regenerator")}r.__esModule=!0,r.manipulateOptions=a;var s=e(64),o=i(s),u=e(179),p=n(u),l={optional:!0,dependencies:["es7.asyncFunctions","es6.classes"]};r.metadata=l;var c={Function:function(e,t,r,n){return e.async&&!e.generator?o["default"](this,p.memberExpression(n.addImport("bluebird",null,"absolute"),p.identifier("coroutine"))):void 0}};r.visitor=c},{179:179,64:64}],138:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s={group:"builtin-trailing"};r.metadata=s;var o="@flow",u={Program:function(e,t,r,n){for(var i=n.ast.comments,a=0;a<i.length;a++){var s=i[a];s.value.indexOf(o)>=0&&(s.value=s.value.replace(o,""),s.value.replace(/\*/g,"").trim()||(s._displayed=!0))}},Flow:function(){this.dangerouslyRemove()},ClassProperty:function(e){e.typeAnnotation=null,e.value||this.dangerouslyRemove()},Class:function(e){e["implements"]=null},Function:function(e){for(var t=0;t<e.params.length;t++){var r=e.params[t];r.optional=!1}},TypeCastExpression:function(e){do e=e.expression;while(a.isTypeCastExpression(e));return e}};r.visitor=u},{179:179}],139:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){e.blacklist.push("react")}r.__esModule=!0,r.manipulateOptions=i;var a=e(62),s=n(a),o=e(179),u=n(o),p={optional:!0,group:"builtin-advanced"};r.metadata=p;var l=e(55)({pre:function(e){e.callee=e.tagExpr},post:function(e){s.isCompatTag(e.tagName)&&(e.call=u.callExpression(u.memberExpression(u.memberExpression(u.identifier("React"),u.identifier("DOM")),e.tagExpr,u.isLiteral(e.tagExpr)),e.args))}});r.visitor=l},{179:179,55:55,62:62}],140:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(62),a=n(i),s=e(179),o=n(s),u=/^\*\s*@jsx\s+([^\s]+)/,p={group:"builtin-advanced"};r.metadata=p;var l=e(55)({pre:function(e){var t=e.tagName,r=e.args;a.isCompatTag(t)?r.push(o.literal(t)):r.push(e.tagExpr)},post:function(e,t){e.callee=t.get("jsxIdentifier")}});r.visitor=l,l.Program=function(e,t,r,n){for(var i=n.opts.jsxPragma,a=0;a<n.ast.comments.length;a++){var s=n.ast.comments[a],p=u.exec(s.value);if(p){if(i=p[1],"React.DOM"===i)throw n.errorWithNode(s,"The @jsx React.DOM pragma has been deprecated as of React 0.12");break}}n.set("jsxIdentifier",i.split(".").map(o.identifier).reduce(function(e,t){return o.memberExpression(e,t)}))}},{179:179,55:55,62:62}],141:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e){for(var t,r=[];e;){var n=e.parentPath,i=n&&n.node;if(i){if(r.push(e.key),i!==e.container){var a=Object.keys(i).some(function(t){return i[t]===e.container?(r.push(t),!0):void 0});if(!a)throw new Error("Failed to find container object in parent node")}if(p.isProgram(i)){t=i;break}}e=n}if(!t)throw new Error("Failed to find root Program node");for(var s=new l(t);r.length>0;)s=s.get(r.pop());return s}r.__esModule=!0;var s=e(535),o=i(s),u=e(179),p=n(u),l=o["default"].types.NodePath,c={group:"builtin-advanced"};r.metadata=c;var f={Function:{exit:function(e){(e.async||e.generator)&&o["default"].transform(a(this))}}};r.visitor=f},{179:179,535:535}],142:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return s.isLiteral(e)?e.raw&&e.rawValue===e.value?"use strict"===e.rawValue:"use strict"===e.value:!1}r.__esModule=!0;var a=e(179),s=n(a),o={group:"builtin-pre"};r.metadata=o;var u=["FunctionExpression","FunctionDeclaration","ClassProperty"],p={Program:{enter:function(e){var t,r=e.body[0];s.isExpressionStatement(r)&&i(r.expression)?t=r:(t=s.expressionStatement(s.literal("use strict")),this.unshiftContainer("body",t),r&&(t.leadingComments=r.leadingComments,r.leadingComments=[])),t._blockHoist=1/0}},ThisExpression:function(){return this.findParent(function(e){return!e.is("shadow")&&u.indexOf(e.type)>=0})?void 0:s.identifier("undefined")}};r.visitor=p},{179:179}],143:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){for(var r=t.get(e),n=0;n<r.length;n++){var i=r[n],a=i.node;if(s.isFunctionDeclaration(a)){var o=s.variableDeclaration("let",[s.variableDeclarator(a.id,s.toExpression(a))]);o._blockHoist=2,a.id=null,i.replaceWith(o)}}}r.__esModule=!0;var a=e(179),s=n(a),o={BlockStatement:function(e,t){s.isFunction(t)&&t.body===e||s.isExportDeclaration(t)||i("body",this)},SwitchCase:function(){i("consequent",this)}};r.visitor=o},{179:179}],144:[function(e,t,r){"use strict";r.__esModule=!0;var n=e(61),i={group:"builtin-basic"};r.metadata=i;var a={"ArrowFunctionExpression|FunctionExpression":{exit:function(){return this.parentPath.isProperty()?void 0:n.bare.apply(this,arguments)}},ObjectExpression:function(){for(var e=this.get("properties"),t=e,r=0;r<t.length;r++){var i=t[r],a=i.get("value");if(a.isFunction()){var s=n.bare(a.node,i.node,a.scope);s&&a.replaceWith(s)}}}};r.visitor=a},{61:61}],145:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){if(u.isLiteral(e)){var r=e.value,n=r.toLowerCase();if("react"===n&&r!==n)throw t.errorWithNode(e,s.get("didYouMean","react"))}}r.__esModule=!0;var a=e(43),s=n(a),o=e(179),u=n(o),p={CallExpression:function(e,t,r,n){this.get("callee").isIdentifier({name:"require"})&&1===e.arguments.length&&i(e.arguments[0],n)},ModuleDeclaration:function(e,t,r,n){i(e.source,n)}};r.visitor=p},{179:179,43:43}],146:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=e(155),o=i(s),u=e(179),p=n(u),l=function(){function e(t,r,n,i){a(this,e),this.queue=null,this.parentPath=i,this.scope=t,this.state=n,this.opts=r}return e.prototype.shouldVisit=function(e){var t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;var r=p.VISITOR_KEYS[e.type];if(!r||!r.length)return!1;for(var n=r,i=0;i<n.length;i++){var a=n[i];if(e[a])return!0}return!1},e.prototype.create=function(e,t,r,n){var i=o["default"].get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n});return i.unshiftContext(this),i},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=this.queue=[],a=!1,s=0;s<e.length;s++){var o=e[s];o&&this.shouldVisit(o)&&i.push(this.create(t,e,s,r))}for(var u=i,p=0;p<u.length;p++){var l=u[p];if(l.resync(),!(n.indexOf(l.node)>=0)&&(n.push(l.node),l.visit())){a=!0;break}}for(var c=i,f=0;f<c.length;f++){var l=c[f];l.shiftContext()}return this.queue=null,a},e.prototype.visitSingle=function(e,t){if(this.shouldVisit(e[t])){var r=this.create(e,e,t);r.visit(),r.shiftContext()}},e.prototype.visit=function(e,t){var r=e[t];if(r)return Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t)},e}();r["default"]=l,t.exports=r["default"]},{155:155,179:179}],147:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var i=function a(e){n(this,a),this.file=e};r["default"]=i,t.exports=r["default"]},{}],148:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(f.get("traverseNeedsParent",e.type));if(l.explode(t),Array.isArray(e))for(var s=0;s<e.length;s++)a.node(e[s],t,r,n,i);else a.node(e,t,r,n,i)}}function s(e,t,r,n){e.type===n.type&&(n.has=!0,this.skip())}r.__esModule=!0,r["default"]=a;var o=e(146),u=i(o),p=e(168),l=n(p),c=e(43),f=n(c),d=e(413),h=i(d),m=e(179),y=n(m);a.visitors=l,a.verify=l.verify,a.explode=l.explode,a.node=function(e,t,r,n,i,a){var s=y.VISITOR_KEYS[e.type];if(s)for(var o=new u["default"](r,t,n,i),p=s,l=0;l<p.length;l++){var c=p[l];if((!a||!a[c])&&o.visit(e,c))return}};var g=y.COMMENT_KEYS.concat(["_scopeInfo","_paths","tokens","comments","start","end","loc","raw","rawValue"]);a.clearNode=function(e){for(var t=0;t<g.length;t++){var r=g[t];null!=e[r]&&(e[r]=void 0)}};var v={noScope:!0,exit:a.clearNode};a.removeProperties=function(e){return a(e,v),a.clearNode(e),e},a.hasType=function(e,t,r,n){if(h["default"](n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return a(e,{blacklist:n,enter:s},t,i),i.has},t.exports=r["default"]},{146:146,168:168,179:179,413:413,43:43}],149:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function a(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function s(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function o(){var e=this;do if(Array.isArray(e.container))return e;while(e=e.parentPath)}function u(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var n,i=h.VISITOR_KEYS[e.type],a=r,s=0;s<a.length;s++){var o=a[s],u=o[t+1];if(n)if(u.listKey&&n.listKey===u.listKey&&u.key<n.key)n=u;else{var p=i.indexOf(n.parentKey),l=i.indexOf(u.parentKey);p>l&&(n=u)}else n=u}return n})}function p(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n,i,a=1/0,s=e.map(function(e){var t=[];do t.unshift(e);while((e=e.parentPath)&&e!==r);return t.length<a&&(a=t.length),t}),o=s[0];e:for(var u=0;a>u;u++){for(var p=o[u],l=s,c=0;c<l.length;c++){var f=l[c];if(f[u]!==p)break e}n=u,i=p}if(i)return t?t(i,n,s):i;throw new Error("Couldn't find intersection")}function l(){var e=this,t=[];do t.push(e);while(e=e.parentPath);return t}function c(){for(var e=this;e;){for(var t=arguments,r=0;r<t.length;r++){var n=t[r];if(e.node.type===n)return!0}e=e.parentPath}return!1}function f(e){var t=this;do if(t.isFunction()){var r=t.node.shadow;if(r){if(!e||r[e]!==!1)return t}else if(t.isArrowFunctionExpression())return t;return null}while(t=t.parentPath);return null}r.__esModule=!0,r.findParent=a,r.getFunctionParent=s,r.getStatementParent=o,r.getEarliestCommonAncestorFrom=u,r.getDeepestCommonAncestorFrom=p,r.getAncestry=l,r.inType=c,r.inShadow=f;var d=e(179),h=i(d),m=e(155);n(m)},{155:155,179:179}],150:[function(e,t,r){"use strict";function n(){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}function i(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])}function a(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}r.__esModule=!0,r.shareCommentsWithSiblings=n,r.addComment=i,r.addComments=a},{}],151:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=this.node;if(t)for(var r=this.opts,n=[r[e],r[t.type]&&r[t.type][e]],i=0;i<n.length;i++){var a=n[i];if(a)for(var s=a,o=0;o<s.length;o++){var u=s[o];if(u){var p=this.node;if(!p)return;var l=this.type,c=u.call(this,p,this.parent,this.scope,this.state);if(c&&this.replaceWith(c,!0),this.shouldStop||this.shouldSkip||this.removed)return;if(l!==this.type)return void this.queueNode(this)}}}}function a(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1}function s(){if(this.isBlacklisted())return!1;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return!1;if(this.call("enter"),this.shouldSkip)return this.shouldStop;var e=this.node,t=this.opts;if(e)if(Array.isArray(e))for(var r=0;r<e.length;r++)A["default"].node(e[r],t,this.scope,this.state,this,this.skipKeys);else A["default"].node(e,t,this.scope,this.state,this,this.skipKeys),this.call("exit");return this.shouldStop}function o(){this.shouldSkip=!0}function u(e){this.skipKeys[e]=!0}function p(){this.shouldStop=!0,this.shouldSkip=!0}function l(){if(!this.opts||!this.opts.noScope){var e=this.context||this.parentPath;this.scope=this.getScope(e&&e.scope),this.scope&&this.scope.init()}}function c(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this}function f(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())}function d(){this.parentPath&&(this.parent=this.parentPath.node)}function h(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(var t in this.container)if(this.container[t]===this.node)return this.setKey(t);this.key=null}}function m(){var e=this.listKey,t=this.parentPath;if(e&&t){var r=t.node[e];this.container!==r&&(r?this.container=r:this.container=null)}}function y(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()}function g(){this.contexts.shift(),this.setContext(this.contexts[0])}function v(e){this.contexts.unshift(e),this.setContext(e)}function b(e,t,r,n){this.inList=!!r,this.listKey=r,this.parentKey=r||n,this.container=t,this.parentPath=e||this.parentPath,this.setKey(n)}function E(e){this.key=e,this.node=this.container[this.key],this.type=this.node&&this.node.type}function x(e){for(var t=this.contexts,r=0;r<t.length;r++){var n=t[r];n.queue&&n.queue.push(e)}}r.__esModule=!0,r.call=i,r.isBlacklisted=a,r.visit=s,r.skip=o,r.skipKey=u,r.stop=p,r.setScope=l,r.setContext=c,r.resync=f,r._resyncParent=d,r._resyncKey=h,r._resyncList=m,r._resyncRemoved=y,r.shiftContext=g,r.unshiftContext=v,r.setup=b,r.setKey=E,r.queueNode=x;var S=e(148),A=n(S)},{148:148}],152:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(){var e,t=this.node;if(this.isMemberExpression())e=t.property;else{if(!this.isProperty())throw new ReferenceError("todo");e=t.key}return t.computed||o.isIdentifier(e)&&(e=o.literal(e.name)),e}function a(){return o.ensureBlock(this.node)}r.__esModule=!0,r.toComputedKey=i,r.ensureBlock=a;var s=e(179),o=n(s)},{179:179}],153:[function(e,t,r){(function(e){"use strict";function t(){var e=this.evaluate();return e.confident?!!e.value:void 0}function n(){function t(n){if(r){var a=n.node;if(n.isSequenceExpression()){var s=n.get("expressions");return t(s[s.length-1])}if(n.isLiteral()&&!a.regex)return a.value;if(n.isConditionalExpression())return t(t(n.get("test"))?n.get("consequent"):n.get("alternate"));if(n.isTypeCastExpression())return t(n.get("expression"));if(n.isIdentifier()&&!n.scope.hasBinding(a.name,!0)){if("undefined"===a.name)return void 0;if("Infinity"===a.name)return 1/0;if("NaN"===a.name)return NaN}if(n.isMemberExpression()&&!n.parentPath.isCallExpression({callee:a})){var o=n.get("property"),u=n.get("object");if(u.isLiteral()&&o.isIdentifier()){var p=u.node.value,l=typeof p;if("number"===l||"string"===l)return p[o.node.name]}}if(n.isReferencedIdentifier()){var c=n.scope.getBinding(a.name);if(c&&c.hasValue)return c.value;var f=n.resolve();return f===n?r=!1:t(f)}if(n.isUnaryExpression({prefix:!0})){var d=n.get("argument"),h=t(d);switch(a.operator){case"void":return void 0;case"!":return!h;case"+":return+h;case"-":return-h;case"~":return~h;case"typeof":return d.isFunction()?"function":typeof h}}if(n.isArrayExpression()||n.isObjectExpression(),n.isLogicalExpression()){var m=r,y=t(n.get("left")),g=r;r=m;var v=t(n.get("right")),b=r,E=g!==b;switch(r=g&&b,a.operator){case"||":return(y||v)&&E&&(r=!0),y||v;case"&&":return(!y&&g||!v&&b)&&(r=!0),y&&v}}if(n.isBinaryExpression()){var y=t(n.get("left")),v=t(n.get("right"));switch(a.operator){case"-":return y-v;case"+":return y+v;case"/":return y/v;case"*":return y*v;case"%":return y%v;case"**":return Math.pow(y,v);case"<":return v>y;case">":return y>v;case"<=":return v>=y;case">=":return y>=v;case"==":return y==v;case"!=":return y!=v;case"===":return y===v;case"!==":return y!==v;case"|":return y|v;case"&":return y&v;case"^":return y^v;case"<<":return y<<v;case">>":return y>>v;case">>>":return y>>>v}}if(n.isCallExpression()){var x,S,A=n.get("callee");if(A.isIdentifier()&&!n.scope.getBinding(A.node.name,!0)&&i.indexOf(A.node.name)>=0&&(S=e[a.callee.name]),A.isMemberExpression()){var u=A.get("object"),D=A.get("property");if(u.isIdentifier()&&D.isIdentifier()&&i.indexOf(u.node.name)>=0&&(x=e[u.node.name],S=x[D.node.name]),u.isLiteral()&&D.isIdentifier()){var l=typeof u.node.value;("string"===l||"number"===l)&&(x=u.node.value,S=x[D.node.name])}}if(S){var C=n.get("arguments").map(t);if(!r)return;return S.apply(x,C)}}r=!1}}var r=!0,n=t(this);return r||(n=void 0),{confident:r,value:n}}r.__esModule=!0,r.evaluateTruthy=t,r.evaluate=n;var i=["String","Number","Math"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],154:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function s(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function o(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function u(e){return h["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function p(e,t){t===!0&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function l(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(a,s){return h["default"].get({listKey:e,parentPath:r,parent:n,container:i,key:s}).setContext(t)}):h["default"].get({parentPath:this,parent:n,container:n,key:e}).setContext(t)}function c(e,t){for(var r=this,n=e,i=0;i<n.length;i++){var a=n[i];r="."===a?r.parentPath:Array.isArray(r)?r[a]:r.get(a,t)}return r}function f(e){return y.getBindingIdentifiers(this.node,e)}r.__esModule=!0,r.getStatementParent=a,r.getOpposite=s,r.getCompletionRecords=o,r.getSibling=u,r.get=p,r._getKey=l,r._getPattern=c,r.getBindingIdentifiers=f;var d=e(155),h=i(d),m=e(179),y=n(m)},{155:155,179:179}],155:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=e(162),o=i(s),u=e(148),p=n(u),l=e(509),c=n(l),f=e(167),d=n(f),h=e(179),m=i(h),y=function(){function e(t,r){a(this,e),this.contexts=[],this.parent=r,this.data={},this.hub=t,this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,n=t.parentPath,i=t.parent,a=t.container,s=t.listKey,o=t.key;!r&&n&&(r=n.hub);for(var u,p=a[o],l=i._paths=i._paths||[],c=0;c<l.length;c++){var f=l[c];if(f.node===p){u=f;break}}return u||(u=new e(r,i),l.push(u)),u.setup(n,a,s,o),u},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new d["default"](this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.errorWithNode=function(e){var t=arguments.length<=1||void 0===arguments[1]?SyntaxError:arguments[1];return this.hub.file.errorWithNode(this.node,e,t)},e.prototype.traverse=function(e,t){p["default"](this.node,e,this.scope,t,this)},e}();r["default"]=y,c["default"](y.prototype,e(149)),c["default"](y.prototype,e(156)),c["default"](y.prototype,e(165)),c["default"](y.prototype,e(153)),c["default"](y.prototype,e(152)),c["default"](y.prototype,e(159)),c["default"](y.prototype,e(151)),c["default"](y.prototype,e(164)),c["default"](y.prototype,e(163)),c["default"](y.prototype,e(154)),c["default"](y.prototype,e(150));for(var g=m.TYPES,v=function(){var e=g[b],t="is"+e;y.prototype[t]=function(e){return m[t](this.node,e)}},b=0;b<g.length;b++)v();var E=function(e){return"_"===e[0]?"continue":(m.TYPES.indexOf(e)<0&&m.TYPES.push(e),void(y.prototype["is"+e]=function(t){return o[e].checkPath(this,t)}))};for(var x in o){E(x)}t.exports=r["default"]},{148:148,149:149,150:150,151:151,152:152,153:153,154:154,156:156,159:159,162:162,163:163,164:164,165:165,167:167,179:179,509:509}],156:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||h.anyTypeAnnotation();return h.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e}function a(){var e=this.node;{if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=f[e.type];return t?t.call(this,e):(t=f[this.parentPath.type],t&&t.validParent?this.parentPath.getTypeAnnotation():void 0)}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?h.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?h.anyTypeAnnotation():h.voidTypeAnnotation()}}}function s(e,t){return o(e,this.getTypeAnnotation(),t)}function o(e,t,r){if("string"===e)return h.isStringTypeAnnotation(t);if("number"===e)return h.isNumberTypeAnnotation(t);if("boolean"===e)return h.isBooleanTypeAnnotation(t);if("any"===e)return h.isAnyTypeAnnotation(t);if("mixed"===e)return h.isMixedTypeAnnotation(t);if("void"===e)return h.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}function u(e){var t=this.getTypeAnnotation();if(h.isAnyTypeAnnotation(t))return!0;if(h.isUnionTypeAnnotation(t)){for(var r=t.types,n=0;n<r.length;n++){var i=r[n];if(h.isAnyTypeAnnotation(i)||o(e,i,!0))return!0}return!1}return o(e,t,!0)}function p(e){var t=this.getTypeAnnotation();return e=e.getTypeAnnotation(),!h.isAnyTypeAnnotation()&&h.isFlowBaseAnnotation(t)?e.type===t.type:void 0}function l(e){var t=this.getTypeAnnotation();return h.isGenericTypeAnnotation(t)&&h.isIdentifier(t.id,{name:e})}r.__esModule=!0,r.getTypeAnnotation=i,r._getTypeAnnotation=a,r.isBaseType=s,r.couldBeBaseType=u,r.baseTypeStrictlyMatches=p,r.isGenericType=l;var c=e(158),f=n(c),d=e(179),h=n(d)},{158:158,179:179}],157:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){var r=e.scope.getBinding(t),n=[];e.typeAnnotation=l.unionTypeAnnotation(n);var i=[],s=a(r,e,i),o=u(e,t);if(o){var p=a(r,o.ifStatement);s=s.filter(function(e){return p.indexOf(e)<0}),n.push(o.typeAnnotation)}if(s.length){var c=s.reverse(),f=[];s=[];for(var d=c,h=0;h<d.length;h++){var m=d[h],y=m.scope;if(!(f.indexOf(y)>=0)&&(f.push(y), s.push(m),y===e.scope)){s=[m];break}}s=s.concat(i);for(var g=s,v=0;v<g.length;v++){var m=g[v];n.push(m.getTypeAnnotation())}}return n.length?l.createUnionTypeAnnotation(n):void 0}function a(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){e=e.resolve();var n=e._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function s(e,t){var r,n=t.node.operator,i=t.get("right").resolve(),a=t.get("left").resolve();if(a.isIdentifier({name:e})?r=i:i.isIdentifier({name:e})&&(r=a),r)return"==="===n?r.getTypeAnnotation():l.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(n)>=0?l.numberTypeAnnotation():void 0;if("==="===n){var s,o;if(a.isUnaryExpression({operator:"typeof"})?(s=a,o=i):i.isUnaryExpression({operator:"typeof"})&&(s=i,o=a),(o||s)&&(o=o.resolve(),o.isLiteral())){var u=o.node.value;if("string"==typeof u&&s.get("argument").isIdentifier({name:e}))return l.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function o(e){for(var t;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function u(e,t){var r=o(e);if(r){var n=r.get("test"),i=[n],a=[];do{var p=i.shift().resolve();if(p.isLogicalExpression()&&(i.push(p.get("left")),i.push(p.get("right"))),p.isBinaryExpression()){var c=s(t,p);c&&a.push(c)}}while(i.length);return a.length?{typeAnnotation:l.createUnionTypeAnnotation(a),ifStatement:r}:u(r,t)}}r.__esModule=!0;var p=e(179),l=n(p);r["default"]=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:i(this,e.name):"undefined"===e.name?l.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?l.numberTypeAnnotation():void("arguments"===e.name)}},t.exports=r["default"]},{179:179}],158:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e["default"]:e}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function a(){var e=this.get("id");return e.isIdentifier()?this.get("init").getTypeAnnotation():void 0}function s(e){return e.typeAnnotation}function o(e){return this.get("callee").isIdentifier()?C.genericTypeAnnotation(e.callee):void 0}function u(){return C.stringTypeAnnotation()}function p(e){var t=e.operator;return"void"===t?C.voidTypeAnnotation():C.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?C.numberTypeAnnotation():C.STRING_UNARY_OPERATORS.indexOf(t)>=0?C.stringTypeAnnotation():C.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?C.booleanTypeAnnotation():void 0}function l(e){var t=e.operator;if(C.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return C.numberTypeAnnotation();if(C.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return C.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?C.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?C.stringTypeAnnotation():C.unionTypeAnnotation([C.stringTypeAnnotation(),C.numberTypeAnnotation()])}}function c(){return C.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function f(){return C.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function d(){return this.get("expressions").pop().getTypeAnnotation()}function h(){return this.get("right").getTypeAnnotation()}function m(e){var t=e.operator;return"++"===t||"--"===t?C.numberTypeAnnotation():void 0}function y(e){var t=e.value;return"string"==typeof t?C.stringTypeAnnotation():"number"==typeof t?C.numberTypeAnnotation():"boolean"==typeof t?C.booleanTypeAnnotation():null===t?C.voidTypeAnnotation():e.regex?C.genericTypeAnnotation(C.identifier("RegExp")):void 0}function g(){return C.genericTypeAnnotation(C.identifier("Object"))}function v(){return C.genericTypeAnnotation(C.identifier("Array"))}function b(){return v()}function E(){return C.genericTypeAnnotation(C.identifier("Function"))}function x(){return A(this.get("callee"))}function S(){return A(this.get("tag"))}function A(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?C.genericTypeAnnotation(C.identifier("AsyncIterator")):C.genericTypeAnnotation(C.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}r.__esModule=!0,r.VariableDeclarator=a,r.TypeCastExpression=s,r.NewExpression=o,r.TemplateLiteral=u,r.UnaryExpression=p,r.BinaryExpression=l,r.LogicalExpression=c,r.ConditionalExpression=f,r.SequenceExpression=d,r.AssignmentExpression=h,r.UpdateExpression=m,r.Literal=y,r.ObjectExpression=g,r.ArrayExpression=v,r.RestElement=b,r.CallExpression=x,r.TaggedTemplateExpression=S;var D=e(179),C=i(D),w=e(157);r.Identifier=n(w),s.validParent=!0,b.validParent=!0,r.Function=E,r.Class=E},{157:157,179:179}],159:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){function r(e){var t=n[a];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],a=0;i.length;){var s=i.shift();if(t&&a===n.length)return!0;if(A.isIdentifier(s)){if(!r(s.name))return!1}else if(A.isLiteral(s)){if(!r(s.value))return!1}else{if(A.isMemberExpression(s)){if(s.computed&&!A.isLiteral(s.property))return!1;i.unshift(s.property),i.unshift(s.object);continue}if(!A.isThisExpression(s))return!1;if(!r("this"))return!1}if(++a>n.length)return!1}return a===n.length}function s(e){var t=this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function o(e){return!this.has(e)}function u(e,t){return this.node[e]===t}function p(e){return A.isType(this.type,e)}function l(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function c(e){return"body"===this.key&&this.parentPath.isArrowFunctionExpression()?this.isExpression()?A.isBlockStatement(e):this.isBlockStatement()?A.isExpression(e):!1:!1}function f(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function d(){return this.parentPath.isLabeledStatement()||A.isBlockStatement(this.container)?!1:x["default"](A.STATEMENT_OR_BLOCK_KEYS,this.key)}function h(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return i.isImportDeclaration()?i.node.source.value!==e?!1:t?n.isImportDefaultSpecifier()&&"default"===t?!0:n.isImportNamespaceSpecifier()&&"*"===t?!0:n.isImportSpecifier()&&n.node.imported.name===t?!0:!1:!0:!1}function m(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function y(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t!==r)return"function";var n,i,a,s=e.getAncestry(),o=this.getAncestry();for(a=0;a<o.length;a++){var u=o[a];if(i=s.indexOf(u),i>=0){n=u;break}}if(!n)return"before";var p=s[i-1],l=o[a-1];if(!p||!l)return"before";if(p.listKey&&p.container===l.container)return p.key>l.key?"before":"after";var c=A.VISITOR_KEYS[p.type].indexOf(p.key),f=A.VISITOR_KEYS[l.type].indexOf(l.key);return c>f?"before":"after"}function v(e,t){return this._resolve(e,t)||this}function b(e,t){if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if("module"===r.kind)return;if(r.path!==this)return r.path.resolve(e,t)}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var n=this.toComputedKey();if(!A.isLiteral(n))return;var i=n.value,a=this.get("object").resolve(e,t);if(a.isObjectExpression())for(var s=a.get("properties"),o=s,u=0;u<o.length;u++){var p=o[u];if(p.isProperty()){var l=p.get("key"),c=p.isnt("computed")&&l.isIdentifier({name:i});if(c=c||l.isLiteral({value:i}))return p.get("value").resolve(e,t)}}else if(a.isArrayExpression()&&!isNaN(+i)){var f=a.get("elements"),d=f[i];if(d)return d.resolve(e,t)}}}}r.__esModule=!0,r.matchesPattern=a,r.has=s,r.isnt=o,r.equals=u,r.isNodeType=p,r.canHaveVariableDeclarationOrExpression=l,r.canSwapBetweenExpressionAndStatement=c,r.isCompletionRecord=f,r.isStatementOrBlock=d,r.referencesImport=h,r.getSource=m,r.willIMaybeExecuteBefore=y,r._guessExecutionStatusRelativeTo=g,r.resolve=v,r._resolve=b;var E=e(413),x=i(E),S=e(179),A=n(S),D=s;r.is=D},{179:179,413:413}],160:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var a=e(62),s=n(a),o=e(179),u=n(o),p={ReferencedIdentifier:function(e,t,r,n){if(!this.isJSXIdentifier()||!s.isCompatTag(e.name)){var i=r.getBinding(e.name);if(i&&i===n.scope.getBinding(e.name))if(i.constant)n.bindings[e.name]=i;else for(var a=i.constantViolations,o=0;o<a.length;o++){var u=a[o];n.breakOnScopePaths=n.breakOnScopePaths.concat(u.getAncestry())}}}},l=function(){function e(t,r){i(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeStatementParent()}return t.path.isProgram()?this.getNextScopeStatementParent():void 0}},e.prototype.getNextScopeStatementParent=function(){var e=this.scopes.pop();return e?e.path.getStatementParent():void 0},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(p,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref");t.insertBefore([u.variableDeclaration("var",[u.variableDeclarator(r,this.path.node)])]);var n=this.path.parentPath;n.isJSXElement()&&this.path.container===n.node.children&&(r=u.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();r["default"]=l,t.exports=r["default"]},{179:179,62:62}],161:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(179),a=n(i),s=[function(e){return"body"===e.key&&(e.isBlockStatement()||e.isClassBody())?(e.node.body=[],!0):void 0},function(e,t){var r=!1;return r=r||"body"===e.key&&t.isArrowFunctionExpression(),r=r||"argument"===e.key&&t.isThrowStatement(),r?(e.replaceWith(a.identifier("undefined")),!0):void 0}];r.pre=s;var o=[function(e,t){var r=!1;return r=r||"test"===e.key&&(t.isWhile()||t.isSwitchCase()),r=r||"declaration"===e.key&&t.isExportDeclaration(),r=r||"body"===e.key&&t.isLabeledStatement(),r=r||"declarations"===e.listKey&&t.isVariableDeclaration()&&0===t.node.declarations.length,r=r||"expression"===e.key&&t.isExpressionStatement(),r=r||"test"===e.key&&t.isIfStatement(),r?(t.dangerouslyRemove(),!0):void 0},function(e,t){return t.isSequenceExpression()&&1===t.node.expressions.length?(t.replaceWith(t.node.expressions[0]),!0):void 0},function(e,t){return t.isBinary()?("left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0):void 0}];r.post=o},{179:179}],162:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}r.__esModule=!0;var i=e(62),a=n(i),s=e(179),o=n(s),u={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,n=e.parent;if(!o.isIdentifier(r,t)){if(!o.isJSXIdentifier(r,t))return!1;if(a.isCompatTag(r.name))return!1}return o.isReferenced(r,n)}};r.ReferencedIdentifier=u;var p={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return o.isBinding(t,r)}};r.BindingIdentifier=p;var l={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(o.isStatement(t)){if(o.isVariableDeclaration(t)){if(o.isForXStatement(r,{left:t}))return!1;if(o.isForStatement(r,{init:t}))return!1}return!0}return!1}};r.Statement=l;var c={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():o.isExpression(e.node)}};r.Expression=c;var f={types:["Scopable"],checkPath:function(e){return o.isScope(e.node,e.parent)}};r.Scope=f;var d={checkPath:function(e){return o.isReferenced(e.node,e.parent)}};r.Referenced=d;var h={checkPath:function(e){return o.isBlockScoped(e.node)}};r.BlockScoped=h;var m={types:["VariableDeclaration"],checkPath:function(e){return o.isVar(e.node)}};r.Var=m;var y={types:["Literal"],checkPath:function(e){return e.isLiteral()&&e.parentPath.isExpressionStatement()}};r.DirectiveLiteral=y;var g={types:["ExpressionStatement"],checkPath:function(e){return e.get("expression").isLiteral()}};r.Directive=g;var v={checkPath:function(e){return e.node&&!!e.node.loc}};r.User=v;var b={checkPath:function(e){return!e.isUser()}};r.Generated=b;var E={types:["Flow","ImportDeclaration","ExportDeclaration"],checkPath:function(e){var t=e.node;return o.isFlow(t)?!0:o.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:o.isExportDeclaration(t)?"type"===t.exportKind:!1}};r.Flow=E},{179:179,62:62}],163:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this.node=this.container[this.key]=x.blockStatement(e)}return[this]}function s(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n<t.length;n++){var i=e+n,a=t[n];if(this.container.splice(i,0,a),this.context){var s=this.context.create(this.parent,this.container,i,this.listKey);r.push(s),this.queueNode(s)}else r.push(b["default"].get({parentPath:this,parent:a,container:this.container,listKey:this.listKey,key:i}))}return r}function o(e){return this._containerInsert(this.key,e)}function u(e){return this._containerInsert(this.key+1,e)}function p(e){var t=e[e.length-1];x.isExpressionStatement(t)&&x.isIdentifier(t.expression)&&!this.isCompletionRecord()&&e.pop()}function l(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(x.expressionStatement(x.assignmentExpression("=",t,this.node))),e.push(x.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this.node=this.container[this.key]=x.blockStatement(e)}return[this]}function c(e,t){for(var r=this.parent._paths,n=0;n<r.length;n++){var i=r[n];i.key>=e&&(i.key+=t)}}function f(e){e.constructor!==Array&&(e=[e]);for(var t=0;t<e.length;t++){var r=e[t];if(!r)throw new Error("Node list has falsy node with the index of "+t);if("object"!=typeof r)throw new Error("Node list contains a non-object node with the index of "+t);if(!r.type)throw new Error("Node list contains a node without a type with the index of "+t);r instanceof b["default"]&&(e[t]=r.node)}return e}function d(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);var r=this.node[e],n=b["default"].get({parentPath:this,parent:this.node,container:r,listKey:e,key:0});return n.insertBefore(t)}function h(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);var r=this.node[e],n=r.length,i=b["default"].get({parentPath:this,parent:this.node,container:r,listKey:e,key:n});return i.replaceWith(t,!0)}function m(){var e=arguments.length<=0||void 0===arguments[0]?this.scope:arguments[0],t=new g["default"](this,e);return t.run()}r.__esModule=!0,r.insertBefore=a,r._containerInsert=s,r._containerInsertBefore=o,r._containerInsertAfter=u,r._maybePopFromStatements=p,r.insertAfter=l,r.updateSiblingKeys=c,r._verifyNodeList=f,r.unshiftContainer=d,r.pushContainer=h,r.hoist=m;var y=e(160),g=i(y),v=e(155),b=i(v),E=e(179),x=n(E)},{155:155,160:160,179:179}],164:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(){return console.trace("Path#remove has been renamed to Path#dangerouslyRemove, removing a node is extremely dangerous so please refrain using it."),this.dangerouslyRemove()}function a(){return this._assertUnremoved(),this.resync(),this._callRemovalHooks("pre")?void this._markRemoved():(this.shareCommentsWithSiblings(),this._remove(),this._markRemoved(),void this._callRemovalHooks("post"))}function s(e){for(var t=c[e],r=0;r<t.length;r++){var n=t[r];if(n(this,this.parentPath))return!0}}function o(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this.container[this.key]=null}function u(){this.shouldSkip=!0,this.removed=!0,this.node=null}function p(){if(this.removed)throw this.errorWithNode("NodePath has been removed so is read-only.")}r.__esModule=!0,r.remove=i,r.dangerouslyRemove=a,r._callRemovalHooks=s,r._remove=o,r._markRemoved=u,r._assertUnremoved=p;var l=e(161),c=n(l)},{161:161}],165:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e){this.resync(),e=this._verifyNodeList(e),b.inheritLeadingComments(e[0],this.node),b.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node||this.dangerouslyRemove()}function s(e){this.resync();try{e="("+e+")",e=g["default"](e)}catch(t){var r=t.loc;throw r&&(t.message+=" - make sure this is an expression.",t.message+="\n"+c["default"](e,r.line,r.column+1)),t}return e=e.program.body[0].expression,d["default"].removeProperties(e),this.replaceWith(e)}function o(e,t){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof m["default"]&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.dangerouslyRemove()` instead");if(this.node!==e){if(this.isProgram()&&!b.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(b.isProgram(e)&&!this.isProgram()&&(e=e.body,t=!0),Array.isArray(e)){if(t)return this.replaceWithMultiple(e);throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`")}if("string"==typeof e)return this.replaceWithSourceString();if(this.isNodeType("Statement")&&b.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||(e=b.expressionStatement(e))),this.isNodeType("Expression")&&b.isStatement(e)&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var r=this.node;r&&b.inheritsComments(e,r),this.node=this.container[this.key]=e,this.type=e.type,this.setScope()}}function u(e){this.resync();var t=b.toSequenceExpression(e,this.scope);if(t)return this.replaceWith(t);var r=b.functionExpression(null,[],b.blockStatement(e));r.shadow=!0,this.replaceWith(b.callExpression(r,[])),this.traverse(E);for(var n=this.get("callee").getCompletionRecords(),i=n,a=0;a<i.length;a++){var s=i[a];if(s.isExpressionStatement()){var o=s.findParent(function(e){return e.isLoop()});if(o){var u=this.get("callee").scope.generateDeclaredUidIdentifier("ret");this.get("callee.body").pushContainer("body",b.returnStatement(u)),s.get("expression").replaceWith(b.assignmentExpression("=",u,s.node.expression))}else s.replaceWith(b.returnStatement(s.node.expression))}}return this.node}function p(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.dangerouslyRemove()):this.replaceWithMultiple(e):this.replaceWith(e)}r.__esModule=!0,r.replaceWithMultiple=a,r.replaceWithSourceString=s,r.replaceWith=o,r.replaceExpressionWithStatements=u,r.replaceInline=p;var l=e(38),c=i(l),f=e(148),d=i(f),h=e(155),m=i(h),y=e(42),g=i(y),v=e(179),b=n(v),E={Function:function(){this.skip()},VariableDeclaration:function(e,t,r){if("var"===e.kind){var n=this.getBindingIdentifiers();for(var i in n)r.push({id:n[i]});for(var a=[],s=e.declarations,o=0;o<s.length;o++){var u=s[o];u.init&&a.push(b.expressionStatement(b.assignmentExpression("=",u.id,u.init)))}return a}}}},{148:148,155:155,179:179,38:38,42:42}],166:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var i=function(){function e(t){var r=t.existing,i=t.identifier,a=t.scope,s=t.path,o=t.kind;n(this,e),this.constantViolations=[],this.constant=!0,this.identifier=i,this.references=0,this.referenced=!1,this.scope=a,this.path=s,this.kind=o,this.hasValue=!1,this.hasDeoptedValue=!1,this.value=null,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,this.constantViolations.push(e)},e.prototype.reference=function(){this.referenced=!0,this.references++},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();r["default"]=i,t.exports=r["default"]},{}],167:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e(413),u=i(o),p=e(584),l=i(p),c=e(148),f=i(c),d=e(510),h=i(d),m=e(43),y=n(m),g=e(166),v=i(g),b=e(397),E=i(b),x=e(406),S=i(x),A=e(511),D=i(A),C=e(41),w=i(C),I=e(179),_=n(I),F={For:function(){for(var e=_.FOR_INIT_KEYS,t=0;t<e.length;t++){var r=e[t],n=this.get(r);n.isVar()&&this.scope.getFunctionParent().registerBinding("var",n)}},Declaration:function(){this.isBlockScoped()||this.isExportDeclaration()&&this.get("declaration").isDeclaration()||this.scope.getFunctionParent().registerDeclaration(this)},ReferencedIdentifier:function(e,t,r,n){n.references.push(this)},ForXStatement:function(e,t,r,n){var i=this.get("left");(i.isPattern()||i.isIdentifier())&&n.constantViolations.push(i)},ExportDeclaration:{exit:function(e,t,r){var n=e.declaration;if(_.isClassDeclaration(n)||_.isFunctionDeclaration(n)){var i=r.getBinding(n.id.name);i&&i.reference()}else if(_.isVariableDeclaration(n))for(var a=n.declarations,s=0;s<a.length;s++){var o=a[s],u=_.getBindingIdentifiers(o);for(var p in u){var i=r.getBinding(p);i&&i.reference()}}}},LabeledStatement:function(){this.scope.getProgramParent().addGlobal(this.node),this.scope.getBlockParent().registerDeclaration(this)},AssignmentExpression:function(e,t,r,n){n.assignments.push(this)},UpdateExpression:function(e,t,r,n){n.constantViolations.push(this.get("argument"))},UnaryExpression:function(e,t,r,n){"delete"===this.node.operator&&n.constantViolations.push(this.get("argument"))},BlockScoped:function(){var e=this.scope;e.path===this&&(e=e.parent),e.getBlockParent().registerDeclaration(this)},ClassDeclaration:function(){var e=this.node.id.name;this.scope.bindings[e]=this.scope.getBinding(e)},Block:function(){for(var e=this.get("body"),t=e,r=0;r<t.length;r++){var n=t[r];n.isFunctionDeclaration()&&this.scope.getBlockParent().registerDeclaration(n)}}},k={ReferencedIdentifier:function(e,t,r,n){e.name===n.oldName&&(e.name=n.newName)},Scope:function(e,t,r,n){r.bindingIdentifierEquals(n.oldName,n.binding)||this.skip()},"AssignmentExpression|Declaration":function(e,t,r,n){var i=this.getBindingIdentifiers();for(var a in i)a===n.oldName&&(i[a].name=n.newName)}},P=function(){function e(t,r){if(a(this,e),r&&r.block===t.node)return r;var n=t.getData("scope");return n&&n.parent===r&&n.block===t.node?n:(t.setData("scope",this),this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,void(this.path=t))}return e.prototype.traverse=function(e,t,r){f["default"](e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length<=0||void 0===arguments[0]?"temp":arguments[0],t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(e){return _.identifier(this.generateUid(e))},e.prototype.generateUid=function(e){e=_.toIdentifier(e).replace(/^_+/,"");var t,r=0;do t=this._generateUid(e,r),r++;while(this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;_.isAssignmentExpression(e)?r=e.left:_.isVariableDeclarator(e)?r=e.id:_.isProperty(r)&&(r=r.key);var n=[],i=function s(e){if(_.isModuleDeclaration(e))if(e.source)s(e.source);else if(e.specifiers&&e.specifiers.length)for(var t=e.specifiers,r=0;r<t.length;r++){var i=t[r];s(i)}else e.declaration&&s(e.declaration);else if(_.isModuleSpecifier(e))s(e.local);else if(_.isMemberExpression(e))s(e.object),s(e.property);else if(_.isIdentifier(e))n.push(e.name);else if(_.isLiteral(e))n.push(e.value);else if(_.isCallExpression(e))s(e.callee);else if(_.isObjectExpression(e)||_.isObjectPattern(e))for(var a=e.properties,o=0;o<a.length;o++){var u=a[o];s(u.key||u.argument)}};i(r);var a=n.join("$");return a=a.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(a)},e.prototype.isStatic=function(e){if(_.isThisExpression(e)||_.isSuper(e))return!0;if(_.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){var i=!1;if(i||(i="let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind),i||(i="param"===e.kind&&("let"===t||"const"===t)),i)throw this.hub.file.errorWithNode(n,y.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){t=t||this.generateUidIdentifier(e).name;var n=this.getBinding(e);if(n){var i={newName:t,oldName:e,binding:n.identifier,info:n},a=n.scope;a.traverse(r||a.block,k,i),r||(a.removeOwnBinding(e),a.bindings[t]=n,i.binding.name=t);var s=this.hub.file;s&&this._renameFromMap(s.moduleFormatter.localImports,e,t,i.binding)}},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=l["default"]("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(_.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(_.isArrayExpression(e))return e;if(_.isIdentifier(e,{name:"arguments"}))return _.callExpression(_.memberExpression(r.addHelper("slice"),_.identifier("call")),[e]);var i="to-array",a=[e];return t===!0?i="to-consumable-array":t&&(a.push(_.literal(t)),i="sliced-to-array",this.hub.file.isLoose("es6.forOf")&&(i+="-loose")),_.callExpression(r.addHelper(i),a)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerBinding("label",e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"));else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,n=0;n<r.length;n++){var i=r[n];this.registerBinding(e.node.kind,i)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var a=e.get("specifiers"),s=a,o=0;o<s.length;o++){var u=s[o];this.registerBinding("module",u)}else if(e.isExportDeclaration()){var i=e.get("declaration");(i.isClassDeclaration()||i.isFunctionDeclaration()||i.isVariableDeclaration())&&this.registerDeclaration(i)}else this.registerBinding("unknown",e)},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r);n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration())for(var r=t.get("declarations"),n=r,i=0;i<n.length;i++){var a=n[i];this.registerBinding(e,a)}else{var s=this.getProgramParent(),o=t.getBindingIdentifiers(!0);for(var u in o)for(var p=o[u],l=0;l<p.length;l++){var c=p[l],f=this.getOwnBinding(u);if(f){if(f.identifier===c)continue;this.checkBlockScopedCollisions(f,e,u,c)}s.references[u]=!0,this.bindings[u]=new v["default"]({identifier:c,existing:f,scope:this,path:t,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do if(t.uids[e])return!0;while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do if(t.globals[e])return!0;while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do if(t.references[e])return!0;while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(_.isIdentifier(e)){var r=this.getBinding(e.name);return r?t?r.constant:!0:!1}if(_.isClass(e))return!e.superClass||this.isPure(e.superClass,t);if(_.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(_.isArrayExpression(e)){for(var n=e.elements,i=0;i<n.length;i++){ var a=n[i];if(!this.isPure(a,t))return!1}return!0}if(_.isObjectExpression(e)){for(var s=e.properties,o=0;o<s.length;o++){var u=s[o];if(!this.isPure(u,t))return!1}return!0}return _.isProperty(e)?e.computed&&!this.isPure(e.key,t)?!1:this.isPure(e.value,t):_.isPure(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{var r=t.data[e];null!=r&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){var e=this.path,t=this.block._scopeInfo;if(t)return D["default"](this,t);if(t=this.block._scopeInfo={references:w["default"](),bindings:w["default"](),globals:w["default"](),uids:w["default"](),data:w["default"]()},D["default"](this,t),e.isLoop())for(var r=_.FOR_INIT_KEYS,n=0;n<r.length;n++){var i=r[n],a=e.get(i);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&this.registerBinding("local",e.get("id")),e.isClassExpression()&&e.has("id")&&this.registerBinding("local",e),e.isFunction())for(var s=e.get("params"),o=s,u=0;u<o.length;u++){var p=o[u];this.registerBinding("param",p)}e.isCatchClause()&&this.registerBinding("let",e),e.isComprehensionExpression()&&this.registerBinding("let",e);var l=this.getProgramParent();if(!l.crawling){var c={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(F,c),this.crawling=!1;for(var f=c.assignments,d=Array.isArray(f),h=0,f=d?f:f[Symbol.iterator]();;){var m;if(d){if(h>=f.length)break;m=f[h++]}else{if(h=f.next(),h.done)break;m=h.value}var y=m,g=y.getBindingIdentifiers(),v=void 0;for(var b in g)y.scope.getBinding(b)||(v=v||y.scope.getProgramParent(),v.addGlobal(g[b]));y.scope.registerConstantViolation(y)}for(var E=c.references,x=Array.isArray(E),S=0,E=x?E:E[Symbol.iterator]();;){var A;if(x){if(S>=E.length)break;A=E[S++]}else{if(S=E.next(),S.done)break;A=S.value}var C=A,I=C.scope.getBinding(C.node.name);I?I.reference(C):C.scope.getProgramParent().addGlobal(C.node)}for(var k=c.constantViolations,P=Array.isArray(k),B=0,k=P?k:k[Symbol.iterator]();;){var T;if(P){if(B>=k.length)break;T=k[B++]}else{if(B=k.next(),B.done)break;T=B.value}var M=T;M.scope.registerConstantViolation(M)}}},e.prototype.push=function(e){var t=this.path;t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(_.ensureBlock(t.node),t=t.get("body")),t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path);var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,a="declaration:"+n+":"+i,s=!r&&t.getData(a);if(!s){var o=_.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i,this.hub.file.attachAuxiliaryComment(o);var u=t.unshiftContainer("body",[o]);s=u[0],r||t.setData(a,s)}var p=_.variableDeclarator(e.id,e.init);s.node.declarations.push(p),this.registerBinding(n,s.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do if(e.path.isProgram())return e;while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do if(e.path.isFunctionParent())return e;while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do if(e.path.isBlockParent())return e;while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=w["default"](),t=this;do h["default"](e,t.bindings),t=t.parent;while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=w["default"](),t=arguments,r=0;r<t.length;r++){var n=t[r],i=this;do{for(var a in i.bindings){var s=i.bindings[a];s.kind===n&&(e[a]=s)}i=i.parent}while(i)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return r}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.bindings[e]},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return t?this.hasOwnBinding(t)?!0:this.parentHasBinding(t,r)?!0:this.hasUid(t)?!0:!r&&u["default"](e.globals,t)?!0:!r&&u["default"](e.contextVariables,t)?!0:!1:!1},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do r.uids[e]&&(r.uids[e]=!1);while(r=r.parent)},s(e,null,[{key:"globals",value:S["default"]([E["default"].builtin,E["default"].browser,E["default"].node].map(Object.keys)),enumerable:!0},{key:"contextVariables",value:["arguments","undefined","Infinity","NaN"],enumerable:!0}]),e}();r["default"]=P,t.exports=r["default"]},{148:148,166:166,179:179,397:397,406:406,41:41,413:413,43:43,510:510,511:511,584:584}],168:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function a(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!c(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];for(var i=r,a=0;a<i.length;a++){var o=i[a];e[o]=n}}}s(e),delete e.__esModule,u(e),p(e);for(var d=Object.keys(e),m=0;m<d.length;m++){var t=d[m];if(!c(t)){var y=h[t];if(y){var n=e[t];for(var g in n)n[g]=l(y,n[g]);if(delete e[t],y.types)for(var b=y.types,x=0;x<b.length;x++){var g=b[x];e[g]?f(e[g],n):e[g]=n}else f(e,n)}}}for(var t in e)if(!c(t)){var n=e[t],S=v.FLIPPED_ALIAS_KEYS[t];if(S){delete e[t];for(var A=S,D=0;D<A.length;D++){var C=A[D],w=e[C];w?f(w,n):e[C]=E["default"](n)}}}for(var t in e)c(t)||p(e[t]);return e}function s(e){if(!e._verified){if("function"==typeof e)throw new Error(y.get("traverseVerifyRootFunction"));for(var t in e)if(!c(t)){if(v.TYPES.indexOf(t)<0)throw new Error(y.get("traverseVerifyNodeType",t));var r=e[t];if("object"==typeof r)for(var n in r)if("enter"!==n&&"exit"!==n)throw new Error(y.get("traverseVerifyVisitorProperty",t,n))}e._verified=!0}}function o(e){for(var t={},r=e,n=0;n<r.length;n++){var i=r[n];a(i);for(var s in i){var o=t[s]=t[s]||{};f(o,i[s])}}return t}function u(e){for(var t in e)if(!c(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}function p(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function l(e,t){return function(){return e.checkPath(this)?t.apply(this,arguments):void 0}}function c(e){return"_"===e[0]?!0:"enter"===e||"exit"===e||"shouldSkip"===e?!0:"blacklist"===e||"noScope"===e||"skipKeys"===e?!0:!1}function f(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}r.__esModule=!0,r.explode=a,r.verify=s,r.merge=o;var d=e(162),h=i(d),m=e(43),y=i(m),g=e(179),v=i(g),b=e(494),E=n(b)},{162:162,179:179,43:43,494:494}],169:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=arguments.length<=1||void 0===arguments[1]?e.key||e.property:arguments[1];return function(){return e.computed||C.isIdentifier(t)&&(t=C.literal(t.name)),t}()}function s(e,t){function r(e){for(var t=!1,a=[],s=e,o=0;o<s.length;o++){var u=s[o];if(C.isExpression(u))a.push(u);else if(C.isExpressionStatement(u))a.push(u.expression);else{if(C.isVariableDeclaration(u)){if("var"!==u.kind)return i=!0;for(var p=u.declarations,l=0;l<p.length;l++){var c=p[l],f=C.getBindingIdentifiers(c);for(var d in f)n.push({kind:u.kind,id:f[d]});c.init&&a.push(C.assignmentExpression("=",c.id,c.init))}t=!0;continue}if(C.isIfStatement(u)){var h=u.consequent?r([u.consequent]):C.identifier("undefined"),m=u.alternate?r([u.alternate]):C.identifier("undefined");if(!h||!m)return i=!0;a.push(C.conditionalExpression(u.test,h,m))}else{if(!C.isBlockStatement(u)){if(C.isEmptyStatement(u)){t=!0;continue}return i=!0}a.push(r(u.body))}}t=!1}return t&&a.push(C.identifier("undefined")),1===a.length?a[0]:C.sequenceExpression(a)}var n=[],i=!1,a=r(e);if(!i){for(var s=0;s<n.length;s++)t.push(n[s]);return a}}function o(e){var t=arguments.length<=1||void 0===arguments[1]?e.key:arguments[1];return function(){var r;return"method"===e.kind?o.uid++:(r=C.isIdentifier(t)?t.name:C.isLiteral(t)?JSON.stringify(t.value):JSON.stringify(A["default"].removeProperties(C.cloneDeep(t))),e.computed&&(r="["+r+"]"),r)}()}function u(e){return C.isIdentifier(e)?e.name:(e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),C.isValidIdentifier(e)||(e="_"+e),e||"_")}function p(e){return e=u(e),("eval"===e||"arguments"===e)&&(e="_"+e),e}function l(e,t){if(C.isStatement(e))return e;var r,n=!1;if(C.isClass(e))n=!0,r="ClassDeclaration";else if(C.isFunction(e))n=!0,r="FunctionDeclaration";else if(C.isAssignmentExpression(e))return C.expressionStatement(e);if(n&&!e.id&&(r=!1),!r){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=r,e}function c(e){if(C.isExpressionStatement(e)&&(e=e.expression),C.isClass(e)?e.type="ClassExpression":C.isFunction(e)&&(e.type="FunctionExpression"),C.isExpression(e))return e;throw new Error("cannot turn "+e.type+" to an expression")}function f(e,t){return C.isBlockStatement(e)?e:(C.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(C.isStatement(e)||(e=C.isFunction(t)?C.returnStatement(e):C.expressionStatement(e)),e=[e]),C.blockStatement(e))}function d(e){if(void 0===e)return C.identifier("undefined");if(e===!0||e===!1||null===e||x["default"](e)||g["default"](e)||b["default"](e))return C.literal(e);if(Array.isArray(e))return C.arrayExpression(e.map(C.valueToNode));if(m["default"](e)){var t=[];for(var r in e){var n;n=C.isValidIdentifier(r)?C.identifier(r):C.literal(r),t.push(C.property("init",n,C.valueToNode(e[r])))}return C.objectExpression(t)}throw new Error("don't know how to turn this value into a node")}r.__esModule=!0,r.toComputedKey=a,r.toSequenceExpression=s,r.toKeyAlias=o,r.toIdentifier=u,r.toBindingIdentifierName=p,r.toStatement=l,r.toExpression=c,r.toBlock=f,r.valueToNode=d;var h=e(504),m=i(h),y=e(502),g=i(y),v=e(505),b=i(v),E=e(506),x=i(E),S=e(148),A=i(S),D=e(179),C=n(D);o.uid=0},{148:148,179:179,502:502,504:504,505:505,506:506}],170:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(174),a=n(i);a["default"]("ArrayExpression",{visitor:["elements"],aliases:["Expression"]}),a["default"]("AssignmentExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),a["default"]("BinaryExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"]}),a["default"]("BlockStatement",{visitor:["body"],aliases:["Scopable","BlockParent","Block","Statement"]}),a["default"]("BreakStatement",{visitor:["label"],aliases:["Statement","Terminatorless","CompletionStatement"]}),a["default"]("CallExpression",{visitor:["callee","arguments"],aliases:["Expression"]}),a["default"]("CatchClause",{visitor:["param","body"],aliases:["Scopable"]}),a["default"]("ConditionalExpression",{visitor:["test","consequent","alternate"],aliases:["Expression"]}),a["default"]("ContinueStatement",{visitor:["label"],aliases:["Statement","Terminatorless","CompletionStatement"]}),a["default"]("DebuggerStatement",{aliases:["Statement"]}),a["default"]("DoWhileStatement",{visitor:["body","test"],aliases:["Statement","BlockParent","Loop","While","Scopable"]}),a["default"]("EmptyStatement",{aliases:["Statement"]}),a["default"]("ExpressionStatement",{visitor:["expression"],aliases:["Statement"]}),a["default"]("File",{builder:["program","comments","tokens"],visitor:["program"]}),a["default"]("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"]}),a["default"]("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"]}),a["default"]("FunctionDeclaration",{builder:{id:null,params:null,body:null,generator:!1,async:!1},visitor:["id","params","body","returnType","typeParameters"],aliases:["Scopable","Function","Func","BlockParent","FunctionParent","Statement","Pure","Declaration"]}),a["default"]("FunctionExpression",{builder:{id:null,params:null,body:null,generator:!1,async:!1},visitor:["id","params","body","returnType","typeParameters"],aliases:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"]}),a["default"]("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression"]}),a["default"]("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement"]}),a["default"]("LabeledStatement",{visitor:["label","body"],aliases:["Statement"]}),a["default"]("Literal",{builder:["value"],aliases:["Expression","Pure"]}),a["default"]("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"]}),a["default"]("MemberExpression",{builder:{object:null,property:null,computed:!1},visitor:["object","property"],aliases:["Expression"]}),a["default"]("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"]}),a["default"]("ObjectExpression",{visitor:["properties"],aliases:["Expression"]}),a["default"]("Program",{visitor:["body"],aliases:["Scopable","BlockParent","Block","FunctionParent"]}),a["default"]("Property",{builder:{kind:"init",key:null,value:null,computed:!1},visitor:["key","value","decorators"],aliases:["UserWhitespacable"]}),a["default"]("RestElement",{visitor:["argument","typeAnnotation"]}),a["default"]("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"]}),a["default"]("SequenceExpression",{visitor:["expressions"],aliases:["Expression"]}),a["default"]("SwitchCase",{visitor:["test","consequent"]}),a["default"]("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"]}),a["default"]("ThisExpression",{aliases:["Expression"]}),a["default"]("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"]}),a["default"]("TryStatement",{builder:["block","handler","finalizer"],visitor:["block","handlers","handler","guardedHandlers","finalizer"],aliases:["Statement"]}),a["default"]("UnaryExpression",{builder:{operator:null,argument:null,prefix:!1},visitor:["argument"],aliases:["UnaryLike","Expression"]}),a["default"]("UpdateExpression",{builder:{operator:null,argument:null,prefix:!1},visitor:["argument"],aliases:["Expression"]}),a["default"]("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"]}),a["default"]("VariableDeclarator",{visitor:["id","init"]}),a["default"]("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"]}),a["default"]("WithStatement",{visitor:["object","body"],aliases:["Statement"]})},{174:174}],171:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(174),a=n(i);a["default"]("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern"]}),a["default"]("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern"]}),a["default"]("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType"],aliases:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"]}),a["default"]("ClassBody",{visitor:["body"]}),a["default"]("ClassDeclaration",{visitor:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration"]}),a["default"]("ClassExpression",{visitor:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"]}),a["default"]("ExportAllDeclaration",{visitor:["source","exported"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"]}),a["default"]("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"]}),a["default"]("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"]}),a["default"]("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"]}),a["default"]("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"]}),a["default"]("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"]}),a["default"]("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"]}),a["default"]("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"]}),a["default"]("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"]}),a["default"]("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"]}),a["default"]("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"]}),a["default"]("MetaProperty",{visitor:["meta","property"],aliases:["Expression"]}),a["default"]("MethodDefinition",{builder:{key:null,value:null,kind:"method",computed:!1,"static":!1},visitor:["key","value","decorators"]}),a["default"]("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern"]}),a["default"]("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"]}),a["default"]("Super",{aliases:["Expression"]}),a["default"]("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"]}),a["default"]("TemplateElement"),a["default"]("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression"]}),a["default"]("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"]})},{174:174}],172:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(174),a=n(i);a["default"]("AwaitExpression",{builder:["argument","all"],visitor:["argument"],aliases:["Expression","Terminatorless"]}),a["default"]("BindExpression",{visitor:["object","callee"]}),a["default"]("ComprehensionBlock",{visitor:["left","right"]}),a["default"]("ComprehensionExpression",{visitor:["filter","blocks","body"],aliases:["Expression","Scopable"]}),a["default"]("Decorator",{visitor:["expression"]}),a["default"]("DoExpression",{visitor:["body"],aliases:["Expression"]}),a["default"]("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"]})},{174:174}],173:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(174),a=n(i);a["default"]("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),a["default"]("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"]}),a["default"]("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),a["default"]("BooleanLiteralTypeAnnotation",{aliases:["Flow"]}),a["default"]("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"]}),a["default"]("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],aliases:["Flow"]}),a["default"]("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"]}),a["default"]("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"]}),a["default"]("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"]}),a["default"]("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"]}),a["default"]("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"]}),a["default"]("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"]}),a["default"]("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"]}),a["default"]("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"]}),a["default"]("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"]}),a["default"]("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"]}),a["default"]("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),a["default"]("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"]}),a["default"]("NumberLiteralTypeAnnotation",{aliases:["Flow"]}),a["default"]("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),a["default"]("StringLiteralTypeAnnotation",{aliases:["Flow"]}),a["default"]("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),a["default"]("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"]}),a["default"]("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"]}),a["default"]("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"]}),a["default"]("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"]}),a["default"]("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow"]}),a["default"]("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"]}),a["default"]("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"]}),a["default"]("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"]}),a["default"]("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"]}),a["default"]("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"]}),a["default"]("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"]}),a["default"]("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"]}),a["default"]("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"]}),a["default"]("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]})},{174:174}],174:[function(e,t,r){"use strict";function n(e){for(var t={},r=e,n=0;n<r.length;n++){var i=r[n];t[i]=null}return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.visitor=t.visitor||[],t.aliases=t.aliases||[],t.builder||(t.builder=n(t.visitor)),Array.isArray(t.builder)&&(t.builder=n(t.builder)),a[e]=t.visitor,s[e]=t.aliases,o[e]=t.builder}r.__esModule=!0,r["default"]=i;var a={};r.VISITOR_KEYS=a;var s={};r.ALIAS_KEYS=s;var o={};r.BUILDER_KEYS=o},{}],175:[function(e,t,r){"use strict";e(174),e(170),e(171),e(173),e(176),e(177),e(172)},{170:170,171:171,172:172,173:173,174:174,176:176,177:177}],176:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(174),a=n(i);a["default"]("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"]}),a["default"]("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"]}),a["default"]("JSXElement",{visitor:["openingElement","closingElement","children"],aliases:["JSX","Immutable","Expression"]}),a["default"]("JSXEmptyExpression",{aliases:["JSX","Expression"]}),a["default"]("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"]}),a["default"]("JSXIdentifier",{aliases:["JSX","Expression"]}),a["default"]("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"]}),a["default"]("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"]}),a["default"]("JSXOpeningElement",{visitor:["name","attributes"],aliases:["JSX","Immutable"]}),a["default"]("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"]})},{174:174}],177:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(174),a=n(i);a["default"]("Noop",{visitor:[]}),a["default"]("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression"]})},{174:174}],178:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){var t=a(e);return 1===t.length?t[0]:u.unionTypeAnnotation(t)}function a(e){for(var t={},r={},n=[],i=[],s=0;s<e.length;s++){var o=e[s];if(o&&!(i.indexOf(o)>=0)){if(u.isAnyTypeAnnotation(o))return[o];if(u.isFlowBaseAnnotation(o))r[o.type]=o;else if(u.isUnionTypeAnnotation(o))n.indexOf(o.types)<0&&(e=e.concat(o.types),n.push(o.types));else if(u.isGenericTypeAnnotation(o)){var p=o.id.name;if(t[p]){var l=t[p];l.typeParameters?o.typeParameters&&(l.typeParameters.params=a(l.typeParameters.params.concat(o.typeParameters.params))):l=o.typeParameters}else t[p]=o}else i.push(o)}}for(var c in r)i.push(r[c]);for(var f in t)i.push(t[f]);return i}function s(e){if("string"===e)return u.stringTypeAnnotation();if("number"===e)return u.numberTypeAnnotation();if("undefined"===e)return u.voidTypeAnnotation();if("boolean"===e)return u.booleanTypeAnnotation();if("function"===e)return u.genericTypeAnnotation(u.identifier("Function"));if("object"===e)return u.genericTypeAnnotation(u.identifier("Object"));if("symbol"===e)return u.genericTypeAnnotation(u.identifier("Symbol"));throw new Error("Invalid typeof value")}r.__esModule=!0,r.createUnionTypeAnnotation=i,r.removeTypeDuplicates=a,r.createTypeAnnotationBasedOnTypeof=s;var o=e(179),u=n(o)},{179:179}],179:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var r=B["is"+e]=function(r,n){return B.is(e,r,n,t)};B["assert"+e]=function(t,n){if(n=n||{},!r(t,n))throw new Error("Expected type "+JSON.stringify(e)+" with option "+JSON.stringify(n))}}function a(e,t,r,n){if(!t)return!1;var i=s(t.type,e);return i?"undefined"==typeof r?!0:B.shallowEqual(t,r):!1}function s(e,t){if(e===t)return!0;var r=B.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;for(var n=r,i=0;i<n.length;i++){var a=n[i];if(e===a)return!0}}return!1}function o(e,t){for(var r=Object.keys(t),n=r,i=0;i<n.length;i++){var a=n[i];if(e[a]!==t[a])return!1}return!0}function u(e,t,r){return e.object=B.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}function p(e,t){return e.object=B.memberExpression(t,e.object),e}function l(e){var t=arguments.length<=1||void 0===arguments[1]?"body":arguments[1];return e[t]=B.toBlock(e[t],e)}function c(e){var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function f(e){var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=B.cloneDeep(n):Array.isArray(n)&&(n=n.map(B.cloneDeep))),t[r]=n}return t}function d(e,t){var r=e.split(".");return function(e){if(!B.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var a=n.shift();if(t&&i===r.length)return!0;if(B.isIdentifier(a)){if(r[i]!==a.name)return!1}else{if(!B.isLiteral(a)){if(B.isMemberExpression(a)){if(a.computed&&!B.isLiteral(a.property))return!1;n.push(a.object),n.push(a.property);continue}return!1}if(r[i]!==a.value)return!1}if(++i>r.length)return!1}return!0}}function h(e){for(var t=j,r=0;r<t.length;r++){var n=t[r];delete e[n]}return e}function m(e,t){return y(e,t),g(e,t),v(e,t),e}function y(e,t){b("trailingComments",e,t)}function g(e,t){b("leadingComments",e,t)}function v(e,t){b("innerComments",e,t)}function b(e,t,r){t&&r&&(t[e]=k["default"](D["default"]([].concat(t[e],r[e]))))}function E(e,t){if(!e||!t)return e;for(var r=B.INHERIT_KEYS.optional,n=0;n<r.length;n++){var i=r[n];null==e[i]&&(e[i]=t[i])}for(var a=B.INHERIT_KEYS.force,s=0;s<a.length;s++){var i=a[s];e[i]=t[i]}return B.inheritsComments(e,t),e}r.__esModule=!0,r.is=a,r.isType=s,r.shallowEqual=o,r.appendToMemberExpression=u,r.prependToMemberExpression=p,r.ensureBlock=l,r.clone=c,r.cloneDeep=f,r.buildMatchMemberExpression=d,r.removeComments=h,r.inheritsComments=m,r.inheritTrailingComments=y,r.inheritLeadingComments=g,r.inheritInnerComments=v,r.inherits=E;var x=e(600),S=n(x),A=e(405),D=n(A),C=e(509),w=n(C),I=e(411),_=n(I),F=e(409),k=n(F);e(175);var P=e(174),B=r,T=["consequent","body","alternate"];r.STATEMENT_OR_BLOCK_KEYS=T;var M=["body","expressions"];r.FLATTENABLE_KEYS=M;var O=["left","init"];r.FOR_INIT_KEYS=O;var j=["leadingComments","trailingComments","innerComments"];r.COMMENT_KEYS=j;var L={optional:["typeAnnotation","typeParameters","returnType"],force:["_scopeInfo","_paths","start","loc","end"]};r.INHERIT_KEYS=L;var N=[">","<",">=","<="];r.BOOLEAN_NUMBER_BINARY_OPERATORS=N;var R=["==","===","!=","!=="];r.EQUALITY_BINARY_OPERATORS=R;var V=R.concat(["in","instanceof"]);r.COMPARISON_BINARY_OPERATORS=V;var U=[].concat(V,N);r.BOOLEAN_BINARY_OPERATORS=U;var q=["-","/","*","**","&","|",">>",">>>","<<","^"];r.NUMBER_BINARY_OPERATORS=q;var G=["delete","!"];r.BOOLEAN_UNARY_OPERATORS=G;var H=["+","-","++","--","~"];r.NUMBER_UNARY_OPERATORS=H;var W=["typeof"];r.STRING_UNARY_OPERATORS=W,r.VISITOR_KEYS=P.VISITOR_KEYS,r.BUILDER_KEYS=P.BUILDER_KEYS,r.ALIAS_KEYS=P.ALIAS_KEYS,_["default"](B.VISITOR_KEYS,function(e,t){i(t,!0)}),B.FLIPPED_ALIAS_KEYS={},_["default"](B.ALIAS_KEYS,function(e,t){_["default"](e,function(e){var r=B.FLIPPED_ALIAS_KEYS[e]=B.FLIPPED_ALIAS_KEYS[e]||[];r.push(t)})}),_["default"](B.FLIPPED_ALIAS_KEYS,function(e,t){B[t.toUpperCase()+"_TYPES"]=e,i(t,!1)});var X=Object.keys(B.VISITOR_KEYS).concat(Object.keys(B.FLIPPED_ALIAS_KEYS));r.TYPES=X,_["default"](B.VISITOR_KEYS,function(e,t){if(!B.BUILDER_KEYS[t]){var r={};_["default"](e,function(e){r[e]=null}),B.BUILDER_KEYS[t]=r}}),_["default"](B.BUILDER_KEYS,function(e,t){var r=function(){var r={};r.type=t;var n=0;for(var i in e){var a=arguments[n++];void 0===a&&(a=e[i]),r[i]=a}return r};B[t]=r,B[t[0].toLowerCase()+t.slice(1)]=r}),S["default"](B),S["default"](B.VISITOR_KEYS),w["default"](B,e(180)),w["default"](B,e(181)),w["default"](B,e(169)),w["default"](B,e(178))},{169:169,174:174,175:175,178:178,180:180,181:181,405:405,409:409,411:411,509:509,600:600}],180:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t){for(var r=[].concat(e),n=Object.create(null);r.length;){var i=r.shift();if(i){var a=s.getBindingIdentifiers.keys[i.type];if(s.isIdentifier(i))if(t){var o=n[i.name]=n[i.name]||[];o.push(i)}else n[i.name]=i;else if(s.isExportDeclaration(i))s.isDeclaration(e.declaration)&&r.push(e.declaration);else if(a)for(var u=0;u<a.length;u++){var p=a[u];i[p]&&(r=r.concat(i[p]))}}}return n}r.__esModule=!0,r.getBindingIdentifiers=i;var a=e(179),s=n(a);i.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],ComprehensionExpression:["blocks"],ComprehensionBlock:["left"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],SpreadProperty:["argument"],Property:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},{179:179}],181:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]); return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var r=h.getBindingIdentifiers.keys[t.type];if(r)for(var n=0;n<r.length;n++){var i=r[n],a=t[i];if(Array.isArray(a)){if(a.indexOf(e)>=0)return!0}else if(a===e)return!0}return!1}function s(e,t){switch(t.type){case"MemberExpression":case"JSXMemberExpression":return t.property===e&&t.computed?!0:t.object===e?!0:!1;case"MetaProperty":return!1;case"Property":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var r=t.params,n=0;n<r.length;n++){var i=r[n];if(i===e)return!1}return t.id!==e;case"ExportSpecifier":return t.source?!1:t.local===e;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"MethodDefinition":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":return t.right===e;case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0}function o(e){return"string"!=typeof e||y["default"].keyword.isReservedWordES6(e,!0)?!1:y["default"].keyword.isIdentifierNameES6(e)}function u(e){return v.isVariableDeclaration(e)&&("var"!==e.kind||e._let)}function p(e){return v.isFunctionDeclaration(e)||v.isClassDeclaration(e)||v.isLet(e)}function l(e){return v.isVariableDeclaration(e,{kind:"var"})&&!e._let}function c(e){return v.isImportDefaultSpecifier(e)||v.isIdentifier(e.imported||e.exported,{name:"default"})}function f(e,t){return v.isBlockStatement(e)&&v.isFunction(t,{body:e})?!1:v.isScopable(e)}function d(e){return v.isType(e.type,"Immutable")?!0:v.isLiteral(e)?e.regex?!1:!0:v.isIdentifier(e)&&"undefined"===e.name?!0:!1}r.__esModule=!0,r.isBinding=a,r.isReferenced=s,r.isValidIdentifier=o,r.isLet=u,r.isBlockScoped=p,r.isVar=l,r.isSpecifierDefault=c,r.isScope=f,r.isImmutable=d;var h=e(180),m=e(395),y=i(m),g=e(179),v=n(g)},{179:179,180:180,395:395}],182:[function(e,t,r){(function(t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var r=t||a.EXTENSIONS,n=V["default"].extname(e);return _["default"](r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function o(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(y["default"]).join("|"),"i")),B["default"](e)){e=J["default"](e),(v["default"](e,"./")||v["default"](e,"*/"))&&(e=e.slice(2)),v["default"](e,"**/")&&(e=e.slice(3));var t=w["default"].makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if(M["default"](e))return e;throw new TypeError("illegal type for regexify")}function u(e,t){return e?S["default"](e)?u([e],t):B["default"](e)?u(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function p(e){return"true"===e?!0:"false"===e?!1:e}function l(e,t,r){if(e=J["default"](e),r){for(var n=r,i=0;i<n.length;i++){var a=n[i];if(c(a,e))return!1}return!0}if(t.length)for(var s=t,o=0;o<s.length;o++){var a=s[o];if(c(a,e))return!0}return!1}function c(e,t){return"function"==typeof e?e(t):e.test(t)}function f(e,t,n){var i=r.templates[e];if(!i)throw new ReferenceError("unknown template "+e);if(t===!0&&(n=!0,t=null),i=E["default"](i),j["default"](t)||k["default"](i,Q,null,t),i.body.length>1)return i.body;var a=i.body[0];return!n&&X.isExpressionStatement(a)?a.expression:a}function d(e,t){var r=N["default"](t,{filename:e,looseModules:!0}).program;return r=k["default"].removeProperties(r)}function h(){var e={},r=V["default"].join(t,"transformation/templates");if(!K["default"].sync(r))throw new ReferenceError(D.get("missingTemplatesDirectory"));for(var n=H["default"].readdirSync(r),i=0;i<n.length;i++){var a=n[i];if("."===a[0])return;var s=V["default"].basename(a,V["default"].extname(a)),o=V["default"].join(r,a),u=H["default"].readFileSync(o,"utf8");e[s]=d(o,u)}return e}r.__esModule=!0,r.canCompile=a,r.list=s,r.regexify=o,r.arrayify=u,r.booleanify=p,r.shouldIgnore=l,r.template=f,r.parseTemplate=d;var m=e(518),y=i(m),g=e(519),v=i(g),b=e(495),E=i(b),x=e(498),S=i(x),A=e(43),D=n(A),C=e(522),w=i(C),I=e(410),_=i(I),F=e(148),k=i(F),P=e(506),B=i(P),T=e(505),M=i(T),O=e(499),j=i(O),L=e(42),N=i(L),R=e(9),V=i(R),U=e(512),q=i(U),G=e(1),H=i(G),W=e(179),X=n(W),Y=e(588),J=i(Y),z=e(526),K=i(z),$=e(13);r.inherits=$.inherits,r.inspect=$.inspect,a.EXTENSIONS=[".js",".jsx",".es6",".es"];var Q={noScope:!0,enter:function(e,t,r,n){X.isExpressionStatement(e)&&(e=e.expression),X.isIdentifier(e)&&q["default"](n,e.name)&&(this.skip(),this.replaceInline(n[e.name]))},exit:function(e){k["default"].clearNode(e)}};try{r.templates=e(604)}catch(Z){if("MODULE_NOT_FOUND"!==Z.code)throw Z;r.templates=h()}}).call(this,"/lib")},{1:1,13:13,148:148,179:179,410:410,42:42,43:43,495:495,498:498,499:499,505:505,506:506,512:512,518:518,519:519,522:522,526:526,588:588,604:604,9:9}],183:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){var t=e.Plugin,r=e.types;return new t("constant-folding",{metadata:{group:"builtin-prepass",experimental:!0},visitor:{AssignmentExpression:function(){var e=this.get("left");if(e.isIdentifier()){var t=this.scope.getBinding(e.node.name);if(t&&!t.hasDeoptValue){var r=this.get("right").evaluate();r.confident?t.setValue(r.value):t.deoptValue()}}},IfStatement:function(){var e=this.get("test").evaluate();return e.confident?void(e.value?this.skipKey("alternate"):this.skipKey("consequent")):this.skip()},Scopable:{enter:function(){var e=this.scope.getFunctionParent();for(var t in this.scope.bindings){var r=this.scope.bindings[t],n=!1,i=!0,a=!1,s=void 0;try{for(var o,u=r.constantViolations[Symbol.iterator]();!(i=(o=u.next()).done);i=!0){var p=o.value,l=p.scope.getFunctionParent();if(l!==e){n=!0;break}}}catch(c){a=!0,s=c}finally{try{!i&&u["return"]&&u["return"]()}finally{if(a)throw s}}n&&r.deoptValue()}},exit:function(){for(var e in this.scope.bindings){var t=this.scope.bindings[e];t.clearValue()}}},Expression:{exit:function(){var e=this.evaluate();return e.confident?r.valueToNode(e.value):void 0}}}})},t.exports=r["default"]},{}],184:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){function t(e){if(n.isBlockStatement(e)){for(var t=!1,r=0;r<e.body.length;r++){var i=e.body[r];n.isBlockScoped(i)&&(t=!0)}if(!t)return e.body}return e}var r=e.Plugin,n=e.types,i={ReferencedIdentifier:function(e,t,r){var i=r.getBinding(e.name);if(i&&!(i.references>1)&&i.constant&&"param"!==i.kind&&"module"!==i.kind){var a=i.path.node;if(n.isVariableDeclarator(a)&&(a=a.init),a&&r.isPure(a,!0)&&(!n.isClass(a)&&!n.isFunction(a)||i.path.scope.parent===r)&&!this.findParent(function(e){return e.node===a}))return n.toExpression(a),r.removeBinding(e.name),i.path.dangerouslyRemove(),a}},"ClassDeclaration|FunctionDeclaration":function(e,t,r){var n=r.getBinding(e.id.name);n&&!n.referenced&&this.dangerouslyRemove()},VariableDeclarator:function(e,t,r){n.isIdentifier(e.id)&&r.isPure(e.init,!0)&&i["ClassDeclaration|FunctionDeclaration"].apply(this,arguments)},ConditionalExpression:function(e){var t=this.get("test").evaluateTruthy();return t===!0?e.consequent:t===!1?e.alternate:void 0},BlockStatement:function(){for(var e=this.get("body"),t=!1,r=0;r<e.length;r++){var n=e[r];t||!n.isCompletionStatement()?t&&!n.isFunctionDeclaration()&&n.dangerouslyRemove():t=!0}},IfStatement:{exit:function(e){var r=e.consequent,i=e.alternate,a=e.test,s=this.get("test").evaluateTruthy();return s===!0?t(r):s===!1?i?t(i):this.dangerouslyRemove():(n.isBlockStatement(i)&&!i.body.length&&(i=e.alternate=null),void(n.isBlockStatement(r)&&!r.body.length&&n.isBlockStatement(i)&&i.body.length&&(e.consequent=e.alternate,e.alternate=null,e.test=n.unaryExpression("!",a,!0))))}}};return new r("dead-code-elimination",{metadata:{group:"builtin-pre",experimental:!0},visitor:i})},t.exports=r["default"]},{}],185:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){var t=e.Plugin,r=e.parse,n=e.traverse;return new t("eval",{metadata:{group:"builtin-pre"},visitor:{CallExpression:function(e){if(this.get("callee").isIdentifier({name:"eval"})&&1===e.arguments.length){var t=this.get("arguments")[0].evaluate();if(!t.confident)return;var i=t.value;if("string"!=typeof i)return;var a=r(i);return n.removeProperties(a),a.program}}}})},t.exports=r["default"]},{}],186:[function(e,t,r){(function(e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(t){var r=t.Plugin,n=t.types;return new r("inline-environment-variables",{metadata:{group:"builtin-pre"},visitor:{MemberExpression:function(t){if(this.get("object").matchesPattern("process.env")){var r=this.toComputedKey();if(n.isLiteral(r))return n.valueToNode(e.env[r.value])}}}})},t.exports=r["default"]}).call(this,e(10))},{10:10}],187:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){var t=e.Plugin,r=e.types;return new t("jscript",{metadata:{group:"builtin-trailing"},visitor:{FunctionExpression:{exit:function(e){return e.id?(e._ignoreUserWhitespace=!0,r.callExpression(r.functionExpression(null,[],r.blockStatement([r.toStatement(e),r.returnStatement(e.id)])),[])):void 0}}}})},t.exports=r["default"]},{}],188:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){var t=e.Plugin,r=e.types;return new t("member-expression-literals",{metadata:{group:"builtin-trailing"},visitor:{MemberExpression:{exit:function(e){var t=e.property;e.computed&&r.isLiteral(t)&&r.isValidIdentifier(t.value)&&(e.property=r.identifier(t.value),e.computed=!1)}}}})},t.exports=r["default"]},{}],189:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){var t=e.Plugin,r=e.types;return new t("property-literals",{metadata:{group:"builtin-trailing"},visitor:{Property:{exit:function(e){var t=e.key;r.isLiteral(t)&&r.isValidIdentifier(t.value)&&(e.key=r.identifier(t.value),e.computed=!1)}}}})},t.exports=r["default"]},{}],190:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var i=e(408),a=n(i);r["default"]=function(e){function t(e){return s.isLiteral(s.toComputedKey(e,e.key),{value:"__proto__"})}function r(e){var t=e.left;return s.isMemberExpression(t)&&s.isLiteral(s.toComputedKey(t,t.property),{value:"__proto__"})}function n(e,t,r){return s.expressionStatement(s.callExpression(r.addHelper("defaults"),[t,e.right]))}var i=e.Plugin,s=e.types;return new i("proto-to-assign",{metadata:{secondPass:!0},visitor:{AssignmentExpression:function(e,t,i,a){if(r(e)){var o=[],u=e.left.object,p=i.maybeGenerateMemoised(u);return p&&o.push(s.expressionStatement(s.assignmentExpression("=",p,u))),o.push(n(e,p||u,a)),p&&o.push(p),o}},ExpressionStatement:function(e,t,i,a){var o=e.expression;if(s.isAssignmentExpression(o,{operator:"="}))return r(o)?n(o,o.left.object,a):void 0},ObjectExpression:function(e,r,n,i){for(var o,u=0;u<e.properties.length;u++){var p=e.properties[u];t(p)&&(o=p.value,a["default"](e.properties,p))}if(o){var l=[s.objectExpression([]),o];return e.properties.length&&l.push(e),s.callExpression(i.addHelper("extends"),l)}}}})},t.exports=r["default"]},{408:408}],191:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){var t=e.Plugin,r={enter:function(e,t,r,n){var i=this,a=function(){n.isImmutable=!1,i.stop()};return this.isJSXClosingElement()?void this.skip():this.isJSXIdentifier({name:"ref"})&&this.parentPath.isJSXAttribute({name:e})?a():void(this.isJSXIdentifier()||this.isIdentifier()||this.isJSXMemberExpression()||this.isImmutable()||a())}};return new t("react-constant-elements",{metadata:{group:"builtin-basic"},visitor:{JSXElement:function(e){if(!e._hoisted){var t={isImmutable:!0};this.traverse(r,t),t.isImmutable?this.hoist():e._hoisted=!0}}}})},t.exports=r["default"]},{}],192:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){function t(e,t){for(var r=t.arguments[0].properties,n=!0,a=0;a<r.length;a++){var s=r[a],o=i.toComputedKey(s);if(i.isLiteral(o,{value:"displayName"})){n=!1;break}}n&&r.unshift(i.property("init",i.identifier("displayName"),i.literal(e)))}function r(e){if(!e||!i.isCallExpression(e))return!1;if(!a(e.callee))return!1;var t=e.arguments;if(1!==t.length)return!1;var r=t[0];return i.isObjectExpression(r)?!0:!1}var n=e.Plugin,i=e.types,a=i.buildMatchMemberExpression("React.createClass");return new n("react-display-name",{metadata:{group:"builtin-pre"},visitor:{ExportDefaultDeclaration:function(e,n,i,a){r(e.declaration)&&t(a.opts.basename,e.declaration)},"AssignmentExpression|Property|VariableDeclarator":function(e){var n,a;i.isAssignmentExpression(e)?(n=e.left,a=e.right):i.isProperty(e)?(n=e.key,a=e.value):i.isVariableDeclarator(e)&&(n=e.id,a=e.init),i.isMemberExpression(n)&&(n=n.property),i.isIdentifier(n)&&r(a)&&t(n.name,a)}}})},t.exports=r["default"]},{}],193:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){var t=e.Plugin;e.types;return new t("remove-console",{metadata:{group:"builtin-pre"},visitor:{CallExpression:function(){this.get("callee").matchesPattern("console",!0)&&this.dangerouslyRemove()}}})},t.exports=r["default"]},{}],194:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){var t=e.Plugin;e.types;return new t("remove-debugger",{metadata:{group:"builtin-pre"},visitor:{DebuggerStatement:function(){this.dangerouslyRemove()}}})},t.exports=r["default"]},{}],195:[function(e,t,r){t.exports={builtins:{Symbol:"symbol",Promise:"promise",Map:"map",WeakMap:"weak-map",Set:"set",WeakSet:"weak-set"},methods:{Array:{concat:"array/concat",copyWithin:"array/copy-within",entries:"array/entries",every:"array/every",fill:"array/fill",filter:"array/filter",findIndex:"array/find-index",find:"array/find",forEach:"array/for-each",from:"array/from",includes:"array/includes",indexOf:"array/index-of",join:"array/join",keys:"array/keys",lastIndexOf:"array/last-index-of",map:"array/map",of:"array/of",pop:"array/pop",push:"array/push",reduceRight:"array/reduce-right",reduce:"array/reduce",reverse:"array/reverse",shift:"array/shift",slice:"array/slice",some:"array/some",sort:"array/sort",splice:"array/splice",turn:"array/turn",unshift:"array/unshift",values:"array/values"},Object:{assign:"object/assign",classof:"object/classof",create:"object/create",define:"object/define",defineProperties:"object/define-properties",defineProperty:"object/define-property",entries:"object/entries",freeze:"object/freeze",getOwnPropertyDescriptor:"object/get-own-property-descriptor",getOwnPropertyDescriptors:"object/get-own-property-descriptors",getOwnPropertyNames:"object/get-own-property-names",getOwnPropertySymbols:"object/get-own-property-symbols",getPrototypePf:"object/get-prototype-of",index:"object/index",isExtensible:"object/is-extensible",isFrozen:"object/is-frozen",isObject:"object/is-object",isSealed:"object/is-sealed",is:"object/is",keys:"object/keys",make:"object/make",preventExtensions:"object/prevent-extensions",seal:"object/seal",setPrototypeOf:"object/set-prototype-of",values:"object/values"},RegExp:{escape:"regexp/escape"},Function:{only:"function/only",part:"function/part"},Math:{acosh:"math/acosh",asinh:"math/asinh",atanh:"math/atanh",cbrt:"math/cbrt",clz32:"math/clz32",cosh:"math/cosh",expm1:"math/expm1",fround:"math/fround",hypot:"math/hypot",pot:"math/pot",imul:"math/imul",log10:"math/log10",log1p:"math/log1p",log2:"math/log2",sign:"math/sign",sinh:"math/sinh",tanh:"math/tanh",trunc:"math/trunc"},Date:{addLocale:"date/add-locale",formatUTC:"date/format-utc",format:"date/format"},Symbol:{"for":"symbol/for",hasInstance:"symbol/has-instance","is-concat-spreadable":"symbol/is-concat-spreadable",iterator:"symbol/iterator",keyFor:"symbol/key-for",match:"symbol/match",replace:"symbol/replace",search:"symbol/search",species:"symbol/species",split:"symbol/split",toPrimitive:"symbol/to-primitive",toStringTag:"symbol/to-string-tag",unscopables:"symbol/unscopables"},String:{at:"string/at",codePointAt:"string/code-point-at",endsWith:"string/ends-with",escapeHTML:"string/escape-html",fromCodePoint:"string/from-code-point",includes:"string/includes",raw:"string/raw",repeat:"string/repeat",startsWith:"string/starts-with",unescapeHTML:"string/unescape-html"},Number:{EPSILON:"number/epsilon",isFinite:"number/is-finite",isInteger:"number/is-integer",isNaN:"number/is-nan",isSafeInteger:"number/is-safe-integer",MAX_SAFE_INTEGER:"number/max-safe-integer",MIN_SAFE_INTEGER:"number/min-safe-integer",parseFloat:"number/parse-float",parseInt:"number/parse-int",random:"number/random"},Reflect:{apply:"reflect/apply",construct:"reflect/construct",defineProperty:"reflect/define-property",deleteProperty:"reflect/delete-property",enumerate:"reflect/enumerate",getOwnPropertyDescriptor:"reflect/get-own-property-descriptor",getPrototypeOf:"reflect/get-prototype-of",get:"reflect/get",has:"reflect/has",isExtensible:"reflect/is-extensible",ownKeys:"reflect/own-keys",preventExtensions:"reflect/prevent-extensions",setPrototypeOf:"reflect/set-prototype-of",set:"reflect/set"}}}},{}],196:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var i=e(195),a=n(i);r["default"]=function(e){function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var r=e.Plugin,n=e.types,i="babel-runtime";return new r("runtime",{metadata:{group:"builtin-post-modules"},pre:function(e){e.set("helperGenerator",function(t){return e.addImport(i+"/helpers/"+t,t,"absoluteDefault")}),e.setDynamic("regeneratorIdentifier",function(){return e.addImport(i+"/regenerator","regeneratorRuntime","absoluteDefault")})},visitor:{ReferencedIdentifier:function(e,r,s,o){if("regeneratorRuntime"===e.name)return o.get("regeneratorIdentifier");if(!n.isMemberExpression(r)&&t(a["default"].builtins,e.name)&&!s.getBindingIdentifier(e.name)){var u=a["default"].builtins[e.name];return o.addImport(i+"/core-js/"+u,e.name,"absoluteDefault")}},CallExpression:function(e,t,r,a){if(!e.arguments.length){var s=e.callee;if(n.isMemberExpression(s)&&s.computed&&this.get("callee.property").matchesPattern("Symbol.iterator"))return n.callExpression(a.addImport(i+"/core-js/get-iterator","getIterator","absoluteDefault"),[s.object])}},BinaryExpression:function(e,t,r,a){return"in"===e.operator&&this.get("left").matchesPattern("Symbol.iterator")?n.callExpression(a.addImport(i+"/core-js/is-iterable","isIterable","absoluteDefault"),[e.right]):void 0},MemberExpression:{enter:function(e,r,s,o){if(this.isReferenced()){var u=e.object,p=e.property;if(n.isReferenced(u,e)&&!e.computed&&t(a["default"].methods,u.name)){var l=a["default"].methods[u.name];if(t(l,p.name)&&!s.getBindingIdentifier(u.name)){if("Object"===u.name&&"defineProperty"===p.name&&this.parentPath.isCallExpression()){var c=this.parentPath.node;if(3===c.arguments.length&&n.isLiteral(c.arguments[1]))return}var f=l[p.name];return o.addImport(i+"/core-js/"+f,u.name+"$"+p.name,"absoluteDefault")}}}},exit:function(e,r,s,o){if(this.isReferenced()){var u=e.property,p=e.object;if(t(a["default"].builtins,p.name)&&!s.getBindingIdentifier(p.name)){var l=a["default"].builtins[p.name];return n.memberExpression(o.addImport(i+"/core-js/"+l,""+p.name,"absoluteDefault"),u,e.computed)}}}}}})},t.exports=r["default"]},{195:195}],197:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var i=e(198),a=n(i);r["default"]=function(e){var t=e.Plugin,r=(e.types,e.messages);return new t("undeclared-variables-check",{metadata:{group:"builtin-pre"},visitor:{ReferencedIdentifier:function(e,t,n){var i=n.getBinding(e.name);if(i&&"type"===i.kind&&!this.parentPath.isFlow())throw this.errorWithNode(r.get("undeclaredVariableType",e.name),ReferenceError);if(!n.hasBinding(e.name)){var s,o=n.getAllBindings(),u=-1;for(var p in o){var l=a["default"](e.name,p);0>=l||l>3||u>=l||(s=p,u=l)}var c;throw c=s?r.get("undeclaredVariableSuggestion",e.name,s):r.get("undeclaredVariable",e.name),this.errorWithNode(c,ReferenceError)}}}})},t.exports=r["default"]},{198:198}],198:[function(e,t,r){"use strict";var n=[],i=[];t.exports=function(e,t){if(e===t)return 0;var r=e.length,a=t.length;if(0===r)return a;if(0===a)return r;for(var s,o,u,p,l=0,c=0;r>l;)i[l]=e.charCodeAt(l),n[l]=++l;for(;a>c;)for(s=t.charCodeAt(c),u=c++,o=c,l=0;r>l;l++)p=s===i[l]?u:u+1,u=n[l],o=n[l]=u>o?p>o?o+1:p:p>u?u+1:p;return o}},{}],199:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=function(e){var t=e.Plugin,r=e.types;return new t("undefined-to-void",{metadata:{group:"builtin-basic"},visitor:{ReferencedIdentifier:function(e,t){return"undefined"===e.name?r.unaryExpression("void",r.literal(0),!0):void 0}}})},t.exports=r["default"]},{}],200:[function(e,t,r){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:c}function i(e){var t=function(){return a.apply(t,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=m,t}function a(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;t>n;n++)r+=" "+e[n];if(!this.enabled||!r)return r;var i=this._styles,a=i.length,s=u.dim.open;for(!d||-1===i.indexOf("gray")&&-1===i.indexOf("grey")||(u.dim.open="");a--;){var o=u[i[a]];r=o.open+r.replace(o.closeRe,o.open)+o.close}return u.dim.open=s,r}function s(){var e={};return Object.keys(h).forEach(function(t){e[t]={get:function(){return i.call(this,[t])}}}),e}var o=e(202),u=e(201),p=e(205),l=e(203),c=e(207),f=Object.defineProperties,d="win32"===r.platform&&!/^xterm/i.test(r.env.TERM);d&&(u.blue.open="");var h=function(){var e={};return Object.keys(u).forEach(function(t){u[t].closeRe=new RegExp(o(u[t].close),"g"),e[t]={get:function(){return i.call(this,this._styles.concat(t))}}}),e}(),m=f(function(){},h);f(n.prototype,s()),t.exports=new n,t.exports.styles=u,t.exports.hasColor=l,t.exports.stripColor=p,t.exports.supportsColor=c}).call(this,e(10))},{10:10,201:201,202:202,203:203,205:205,207:207}],201:[function(e,t,r){"use strict";function n(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{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]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}Object.defineProperty(t,"exports",{enumerable:!0,get:n})},{}],202:[function(e,t,r){"use strict";var n=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},{}],203:[function(e,t,r){"use strict";var n=e(204),i=new RegExp(n().source);t.exports=i.test.bind(i)},{204:204}],204:[function(e,t,r){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},{}],205:[function(e,t,r){"use strict";var n=e(206)();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{206:206}],206:[function(e,t,r){arguments[4][204][0].apply(r,arguments)},{204:204}],207:[function(e,t,r){(function(e){"use strict";var r=e.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return-1!==t&&(-1!==n?n>t:!0)};t.exports=function(){return"FORCE_COLOR"in e.env?!0:i("no-color")||i("no-colors")||i("color=false")?!1:i("color")||i("colors")||i("color=true")||i("color=always")?!0:e.stdout&&!e.stdout.isTTY?!1:"win32"===e.platform?!0:"COLORTERM"in e.env?!0:"dumb"===e.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM)?!0:!1}()}).call(this,e(10))},{10:10}],208:[function(e,t,r){(function(t){"use strict";function n(e){return new t(e,"base64").toString()}function i(e){return e.split(",").pop()}function a(e,t){var r=c.exec(e);c.lastIndex=0;var n=r[1]||r[2],i=p.join(t,n);try{return u.readFileSync(i,"utf8")}catch(a){throw new Error("An error occurred while trying to read the map file at "+i+"\n"+a)}}function s(e,t){t=t||{},t.isFileComment&&(e=a(e,t.commentFileDir)),t.hasComment&&(e=i(e)),t.isEncoded&&(e=n(e)),(t.isJSON||t.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}function o(e){for(var t,n=e.split("\n"),i=n.length-1;i>0;i--)if(t=n[i],~t.indexOf("sourceMappingURL=data:"))return r.fromComment(t)}var u=e(1),p=e(9),l=/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/gm,c=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm;s.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},s.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},s.prototype.toComment=function(e){var t=this.toBase64(),r="sourceMappingURL=data:application/json;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r},s.prototype.toObject=function(){return JSON.parse(this.toJSON())},s.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)},s.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},s.prototype.getProperty=function(e){return this.sourcemap[e]},r.fromObject=function(e){return new s(e)},r.fromJSON=function(e){return new s(e,{isJSON:!0})},r.fromBase64=function(e){return new s(e,{isEncoded:!0})},r.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new s(e,{isEncoded:!0,hasComment:!0})},r.fromMapFileComment=function(e,t){return new s(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},r.fromSource=function(e,t){if(t)return o(e);var n=e.match(l);return l.lastIndex=0,n?r.fromComment(n.pop()):null},r.fromMapFileSource=function(e,t){var n=e.match(c);return c.lastIndex=0,n?r.fromMapFileComment(n.pop(),t):null},r.removeComments=function(e){return l.lastIndex=0,e.replace(l,"")},r.removeMapFileComments=function(e){return c.lastIndex=0,e.replace(c,"")},Object.defineProperty(r,"commentRegex",{get:function(){return l.lastIndex=0,l}}),Object.defineProperty(r,"mapFileCommentRegex",{get:function(){return c.lastIndex=0,c}})}).call(this,e(3).Buffer)},{1:1,3:3,9:9}],209:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],210:[function(e,t,r){var n=e(240);t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{240:240}],211:[function(e,t,r){var n=e(277),i=e(278),a=e(275);t.exports=function(e){return function(t,r,s){var o,u=n(t),p=i(u.length),l=a(s,p);if(e&&r!=r){for(;p>l;)if(o=u[l++],o!=o)return!0}else for(;p>l;l++)if((e||l in u)&&u[l]===r)return e||l;return!e&&-1}}},{275:275,277:277,278:278}],212:[function(e,t,r){var n=e(221),i=e(237),a=e(279),s=e(278);t.exports=function(e){var t=1==e,r=2==e,o=3==e,u=4==e,p=6==e,l=5==e||p;return function(c,f,d){for(var h,m,y=a(c),g=i(y),v=n(f,d,3),b=s(g.length),E=0,x=t?Array(b):r?[]:void 0;b>E;E++)if((l||E in g)&&(h=g[E],m=v(h,E,y),e))if(t)x[E]=m;else if(m)switch(e){case 3:return!0;case 5:return h;case 6:return E;case 2:x.push(h)}else if(u)return!1;return p?-1:o||u?u:x}}},{221:221,237:237,278:278,279:279}],213:[function(e,t,r){var n=e(279),i=e(237),a=e(225);t.exports=e(227)(function(){return Symbol()in Object.assign({})})?function(e,t){for(var r=n(e),s=arguments.length,o=1;s>o;)for(var u,p=i(arguments[o++]),l=a(p),c=l.length,f=0;c>f;)r[u=l[f++]]=p[u];return r}:Object.assign},{225:225,227:227,237:237,279:279}],214:[function(e,t,r){var n=e(215),i=e(282)("toStringTag"),a="Arguments"==n(function(){return arguments}());t.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=(t=Object(e))[i])?r:a?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},{215:215,282:282}],215:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],216:[function(e,t,r){"use strict";var n=e(247),i=e(234),a=e(221),s=e(265),o=e(266),u=e(223),p=e(230),l=e(245),c=e(280)("id"),f=e(233),d=e(240),h=Object.isExtensible||d,m=e(272),y=m?"_s":"size",g=0,v=function(e,t){if(!d(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!f(e,c)){if(!h(e))return"F";if(!t)return"E";i(e,c,++g)}return"O"+e[c]},b=function(e,t){var r,n=v(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(t,r,i,s){var l=t(function(e,t){o(e,l,r),e._i=n.create(null),e._f=void 0,e._l=void 0,e[y]=0,void 0!=t&&p(t,i,e[s],e)});return e(252)(l.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[y]=0},"delete":function(e){var t=this,r=b(t,e);if(r){var n=r.n,i=r.p;delete t._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),t._f==r&&(t._f=n),t._l==r&&(t._l=i),t[y]--}return!!r},forEach:function(e){for(var t,r=a(e,arguments[1],3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!b(this,e)}}),m&&n.setDesc(l.prototype,"size",{get:function(){return u(this[y])}}),l},def:function(e,t,r){var n,i,a=b(e,t);return a?a.v=r:(e._l=a={i:i=v(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=a),n&&(n.n=a),e[y]++,"F"!==i&&(e._i[i]=a)),e},getEntry:b,setStrong:function(t,r,n){e(243)(t,r,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?l(0,r.k):"values"==t?l(0,r.v):l(0,[r.k,r.v]):(e._t=void 0,l(1))},n?"entries":"values",!n,!0),s(t),s(e(220)[r])}}},{220:220,221:221,223:223,230:230,233:233,234:234,240:240,243:243,245:245,247:247,252:252,265:265,266:266,272:272,280:280}],217:[function(e,t,r){var n=e(230),i=e(214);t.exports=function(e){return function(){if(i(this)!=e)throw TypeError(e+"#toJSON isn't generic");var t=[];return n(this,!1,t.push,t),t}}},{214:214,230:230}],218:[function(e,t,r){"use strict";var n=e(234),i=e(210),a=e(266),s=e(230),o=e(212),u=e(280)("weak"),p=e(240),l=e(233),c=Object.isExtensible||p,f=o(5),d=o(6),h=0,m=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return f(e.a,function(e){return e[0]===t})};y.prototype={get:function(e){var t=g(this,e);return t?t[1]:void 0},has:function(e){return!!g(this,e)},set:function(e,t){var r=g(this,e);r?r[1]=t:this.a.push([e,t])},"delete":function(e){var t=d(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(t,r,n,i){var o=t(function(e,t){a(e,o,r),e._i=h++,e._l=void 0,void 0!=t&&s(t,n,e[i],e)});return e(252)(o.prototype,{"delete":function(e){return p(e)?c(e)?l(e,u)&&l(e[u],this._i)&&delete e[u][this._i]:m(this)["delete"](e):!1},has:function(e){return p(e)?c(e)?l(e,u)&&l(e[u],this._i):m(this).has(e):!1}}),o},def:function(e,t,r){return c(i(t))?(l(t,u)||n(t,u,{}),t[u][e._i]=r):m(e).set(t,r),e},frozenStore:m,WEAK:u}},{210:210,212:212,230:230,233:233,234:234,240:240,252:252,266:266,280:280}],219:[function(e,t,r){"use strict";var n=e(232),i=e(222),a=e(230),s=e(266);t.exports=function(t,r,o,u,p,l){var c=n[t],f=c,d=p?"set":"add",h=f&&f.prototype,m={},y=function(t){var r=h[t];e(259)(h,t,"delete"==t?function(e){ return r.call(this,0===e?0:e)}:"has"==t?function(e){return r.call(this,0===e?0:e)}:"get"==t?function(e){return r.call(this,0===e?0:e)}:"add"==t?function(e){return r.call(this,0===e?0:e),this}:function(e,t){return r.call(this,0===e?0:e,t),this})};if("function"==typeof f&&(l||h.forEach&&!e(227)(function(){(new f).entries().next()}))){var g,v=new f,b=v[d](l?{}:-0,1);e(244)(function(e){new f(e)})||(f=r(function(e,r){s(e,f,t);var n=new c;return void 0!=r&&a(r,p,n[d],n),n}),f.prototype=h,h.constructor=f),l||v.forEach(function(e,t){g=1/t===-(1/0)}),g&&(y("delete"),y("has"),p&&y("get")),(g||b!==v)&&y(d),l&&h.clear&&delete h.clear}else f=u.getConstructor(r,t,p,d),e(252)(f.prototype,o);return e(273)(f,t),m[t]=f,i(i.G+i.W+i.F*(f!=c),m),l||u.setStrong(f,t,p),f}},{222:222,227:227,230:230,232:232,244:244,252:252,259:259,266:266,273:273}],220:[function(e,t,r){var n=t.exports={};"number"==typeof __e&&(__e=n)},{}],221:[function(e,t,r){var n=e(209);t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{209:209}],222:[function(e,t,r){var n=e(232),i=e(220),a=e(234),s=e(259),o="prototype",u=function(e,t){return function(){return e.apply(t,arguments)}},p=function(e,t,r){var l,c,f,d,h=e&p.G,m=e&p.P,y=h?n:e&p.S?n[t]||(n[t]={}):(n[t]||{})[o],g=h?i:i[t]||(i[t]={});h&&(r=t);for(l in r)c=!(e&p.F)&&y&&l in y,f=(c?y:r)[l],d=e&p.B&&c?u(f,n):m&&"function"==typeof f?u(Function.call,f):f,y&&!c&&s(y,l,f),g[l]!=f&&a(g,l,d),m&&((g[o]||(g[o]={}))[l]=f)};n.core=i,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,t.exports=p},{220:220,232:232,234:234,259:259}],223:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],224:[function(e,t,r){var n=e(240),i=e(232).document,a=n(i)&&n(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}},{232:232,240:240}],225:[function(e,t,r){var n=e(247);t.exports=function(e){var t=n.getKeys(e),r=n.getSymbols;if(r)for(var i,a=r(e),s=n.isEnum,o=0;a.length>o;)s.call(e,i=a[o++])&&t.push(i);return t}},{247:247}],226:[function(e,t,r){t.exports=Math.expm1||function(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:Math.exp(e)-1}},{}],227:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(t){return!0}}},{}],228:[function(e,t,r){"use strict";t.exports=function(t,r,n){var i=e(223),a=e(282)(t),s=""[t];e(227)(function(){var e={};return e[a]=function(){return 7},7!=""[t](e)})&&(e(259)(String.prototype,t,n(i,a,s)),e(234)(RegExp.prototype,a,2==r?function(e,t){return s.call(e,this,t)}:function(e){return s.call(e,this)}))}},{223:223,227:227,234:234,259:259,282:282}],229:[function(e,t,r){"use strict";var n=e(210);t.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},{210:210}],230:[function(e,t,r){var n=e(221),i=e(241),a=e(238),s=e(210),o=e(278),u=e(283);t.exports=function(e,t,r,p){var l,c,f,d=u(e),h=n(r,p,t?2:1),m=0;if("function"!=typeof d)throw TypeError(e+" is not iterable!");if(a(d))for(l=o(e.length);l>m;m++)t?h(s(c=e[m])[0],c[1]):h(e[m]);else for(f=d.call(e);!(c=f.next()).done;)i(f,h,c.value,t)}},{210:210,221:221,238:238,241:241,278:278,283:283}],231:[function(e,t,r){var n={}.toString,i=e(277),a=e(247).getNames,s="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return a(e)}catch(t){return s.slice()}};t.exports.get=function(e){return s&&"[object Window]"==n.call(e)?o(e):a(i(e))}},{247:247,277:277}],232:[function(e,t,r){var n="undefined",i=t.exports=typeof window!=n&&window.Math==Math?window:typeof self!=n&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},{}],233:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],234:[function(e,t,r){var n=e(247),i=e(258);t.exports=e(272)?function(e,t,r){return n.setDesc(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{247:247,258:258,272:272}],235:[function(e,t,r){t.exports=e(232).document&&document.documentElement},{232:232}],236:[function(e,t,r){t.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},{}],237:[function(e,t,r){var n=e(215);t.exports=0 in Object("z")?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{215:215}],238:[function(e,t,r){var n=e(246),i=e(282)("iterator");t.exports=function(e){return(n.Array||Array.prototype[i])===e}},{246:246,282:282}],239:[function(e,t,r){var n=e(240),i=Math.floor;t.exports=function(e){return!n(e)&&isFinite(e)&&i(e)===e}},{240:240}],240:[function(e,t,r){t.exports=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}},{}],241:[function(e,t,r){var n=e(210);t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(a){var s=e["return"];throw void 0!==s&&n(s.call(e)),a}}},{210:210}],242:[function(e,t,r){"use strict";var n=e(247),i={};e(234)(i,e(282)("iterator"),function(){return this}),t.exports=function(t,r,a){t.prototype=n.create(i,{next:e(258)(1,a)}),e(273)(t,r+" Iterator")}},{234:234,247:247,258:258,273:273,282:282}],243:[function(e,t,r){"use strict";var n=e(249),i=e(222),a=e(259),s=e(234),o=e(233),u=e(282)("iterator"),p=e(246),l=!([].keys&&"next"in[].keys()),c="@@iterator",f="keys",d="values",h=function(){return this};t.exports=function(t,r,m,y,g,v,b){e(242)(m,r,y);var E,x,S=function(e){switch(e){case f:return function(){return new m(this,e)};case d:return function(){return new m(this,e)}}return function(){return new m(this,e)}},A=r+" Iterator",D=t.prototype,C=D[u]||D[c]||g&&D[g],w=C||S(g);if(C){var I=e(247).getProto(w.call(new t));e(273)(I,A,!0),!n&&o(D,c)&&s(I,u,h)}if((!n||b)&&s(D,u,w),p[r]=w,p[A]=h,g)if(E={keys:v?w:S(f),values:g==d?w:S(d),entries:g!=d?w:S("entries")},b)for(x in E)x in D||a(D,x,E[x]);else i(i.P+i.F*l,r,E)}},{222:222,233:233,234:234,242:242,246:246,247:247,249:249,259:259,273:273,282:282}],244:[function(e,t,r){var n=e(282)("iterator"),i=!1;try{var a=[7][n]();a["return"]=function(){i=!0},Array.from(a,function(){throw 2})}catch(s){}t.exports=function(e){if(!i)return!1;var t=!1;try{var r=[7],a=r[n]();a.next=function(){t=!0},r[n]=function(){return a},e(r)}catch(s){}return t}},{282:282}],245:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],246:[function(e,t,r){t.exports={}},{}],247:[function(e,t,r){var n=Object;t.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}},{}],248:[function(e,t,r){var n=e(247),i=e(277);t.exports=function(e,t){for(var r,a=i(e),s=n.getKeys(a),o=s.length,u=0;o>u;)if(a[r=s[u++]]===t)return r}},{247:247,277:277}],249:[function(e,t,r){t.exports=!1},{}],250:[function(e,t,r){t.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:Math.log(1+e)}},{}],251:[function(e,t,r){var n,i,a,s=e(232),o=e(274).set,u=s.MutationObserver||s.WebKitMutationObserver,p=s.process,l="process"==e(215)(p),c=function(){var e,t;for(l&&(e=p.domain)&&(p.domain=null,e.exit());n;)t=n.domain,t&&t.enter(),n.fn.call(),t&&t.exit(),n=n.next;i=void 0,e&&e.enter()};if(l)a=function(){p.nextTick(c)};else if(u){var f=1,d=document.createTextNode("");new u(c).observe(d,{characterData:!0}),a=function(){d.data=f=-f}}else a=function(){o.call(s,c)};t.exports=function(e){var t={fn:e,next:void 0,domain:l&&p.domain};i&&(i.next=t),n||(n=t,a()),i=t}},{215:215,232:232,274:274}],252:[function(e,t,r){var n=e(259);t.exports=function(e,t){for(var r in t)n(e,r,t[r]);return e}},{259:259}],253:[function(e,t,r){t.exports=function(t,r){var n=e(222),i=(e(220).Object||{})[t]||Object[t],a={};a[t]=r(i),n(n.S+n.F*e(227)(function(){i(1)}),"Object",a)}},{220:220,222:222,227:227}],254:[function(e,t,r){var n=e(247),i=e(277);t.exports=function(e){return function(t){var r,a=i(t),s=n.getKeys(a),o=s.length,u=0,p=Array(o);if(e)for(;o>u;)p[u]=[r=s[u++],a[r]];else for(;o>u;)p[u]=a[s[u++]];return p}}},{247:247,277:277}],255:[function(e,t,r){var n=e(247),i=e(210),a=e(232).Reflect;t.exports=a&&a.ownKeys||function(e){var t=n.getNames(i(e)),r=n.getSymbols;return r?t.concat(r(e)):t}},{210:210,232:232,247:247}],256:[function(e,t,r){"use strict";var n=e(257),i=e(236),a=e(209);t.exports=function(){for(var e=a(this),t=arguments.length,r=Array(t),s=0,o=n._,u=!1;t>s;)(r[s]=arguments[s++])===o&&(u=!0);return function(){var n,a=this,s=arguments.length,p=0,l=0;if(!u&&!s)return i(e,r,a);if(n=r.slice(),u)for(;t>p;p++)n[p]===o&&(n[p]=arguments[l++]);for(;s>l;)n.push(arguments[l++]);return i(e,n,a)}}},{209:209,236:236,257:257}],257:[function(e,t,r){t.exports=e(232)},{232:232}],258:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],259:[function(e,t,r){var n=e(232),i=e(234),a=e(280)("src"),s="toString",o=Function[s],u=(""+o).split(s);e(220).inspectSource=function(e){return o.call(e)},(t.exports=function(e,t,r,s){"function"==typeof r&&(i(r,a,e[t]?""+e[t]:u.join(String(t))),"name"in r||(r.name=t)),e===n?e[t]=r:(s||delete e[t],i(e,t,r))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||o.call(this)})},{220:220,232:232,234:234,280:280}],260:[function(e,t,r){t.exports=function(e,t){var r=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,r)}}},{}],261:[function(e,t,r){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},{}],262:[function(e,t,r){var n=e(247).getDesc,i=e(240),a=e(210),s=function(e,t){if(a(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r){try{r=e(221)(Function.call,n(Object.prototype,"__proto__").set,2),r({},[])}catch(i){t=!0}return function(e,n){return s(e,n),t?e.__proto__=n:r(e,n),e}}():void 0),check:s}},{210:210,221:221,240:240,247:247}],263:[function(e,t,r){var n=e(232),i="__core-js_shared__",a=n[i]||(n[i]={});t.exports=function(e){return a[e]||(a[e]={})}},{232:232}],264:[function(e,t,r){t.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1}},{}],265:[function(e,t,r){"use strict";var n=e(247),i=e(282)("species");t.exports=function(t){!e(272)||i in t||n.setDesc(t,i,{configurable:!0,get:function(){return this}})}},{247:247,272:272,282:282}],266:[function(e,t,r){t.exports=function(e,t,r){if(!(e instanceof t))throw TypeError(r+": use the 'new' operator!");return e}},{}],267:[function(e,t,r){var n=e(276),i=e(223);t.exports=function(e){return function(t,r){var a,s,o=String(i(t)),u=n(r),p=o.length;return 0>u||u>=p?e?"":void 0:(a=o.charCodeAt(u),55296>a||a>56319||u+1===p||(s=o.charCodeAt(u+1))<56320||s>57343?e?o.charAt(u):a:e?o.slice(u,u+2):(a-55296<<10)+(s-56320)+65536)}}},{223:223,276:276}],268:[function(e,t,r){var n=e(223),i=e(215);t.exports=function(e,t,r){if("RegExp"==i(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(n(e))}},{215:215,223:223}],269:[function(e,t,r){var n=e(278),i=e(270),a=e(223);t.exports=function(e,t,r,s){var o=String(a(e)),u=o.length,p=void 0===r?" ":String(r),l=n(t);if(u>=l)return o;""==p&&(p=" ");var c=l-u,f=i.call(p,Math.ceil(c/p.length));return f.length>c&&(f=s?f.slice(f.length-c):f.slice(0,c)),s?f+o:o+f}},{223:223,270:270,278:278}],270:[function(e,t,r){"use strict";var n=e(276),i=e(223);t.exports=function(e){var t=String(i(this)),r="",a=n(e);if(0>a||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(r+=t);return r}},{223:223,276:276}],271:[function(e,t,r){var n=function(e,t){return e=String(a(e)),1&t&&(e=e.replace(p,"")),2&t&&(e=e.replace(l,"")),e},i=e(222),a=e(223),s=" \n \f\r   ᠎              \u2028\u2029\ufeff",o="["+s+"]",u="​…",p=RegExp("^"+o+o+"*"),l=RegExp(o+o+"*$");t.exports=function(t,r){var a={};a[t]=r(n),i(i.P+i.F*e(227)(function(){return!!s[t]()||u[t]()!=u}),"String",a)}},{222:222,223:223,227:227}],272:[function(e,t,r){t.exports=!e(227)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{227:227}],273:[function(e,t,r){var n=e(233),i=e(234),a=e(282)("toStringTag");t.exports=function(e,t,r){e&&!n(e=r?e:e.prototype,a)&&i(e,a,t)}},{233:233,234:234,282:282}],274:[function(e,t,r){"use strict";var n,i,a,s=e(221),o=e(236),u=e(235),p=e(224),l=e(232),c=l.process,f=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,m=0,y={},g="onreadystatechange",v=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},b=function(e){v.call(e.data)};f&&d||(f=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return y[++m]=function(){o("function"==typeof e?e:Function(e),t)},n(m),m},d=function(e){delete y[e]},"process"==e(215)(c)?n=function(e){c.nextTick(s(v,e,1))}:h?(i=new h,a=i.port2,i.port1.onmessage=b,n=s(a.postMessage,a,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScript?(n=function(e){l.postMessage(e+"","*")},l.addEventListener("message",b,!1)):n=g in p("script")?function(e){u.appendChild(p("script"))[g]=function(){u.removeChild(this),v.call(e)}}:function(e){setTimeout(s(v,e,1),0)}),t.exports={set:f,clear:d}},{215:215,221:221,224:224,232:232,235:235,236:236}],275:[function(e,t,r){var n=e(276),i=Math.max,a=Math.min;t.exports=function(e,t){return e=n(e),0>e?i(e+t,0):a(e,t)}},{276:276}],276:[function(e,t,r){var n=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},{}],277:[function(e,t,r){var n=e(237),i=e(223);t.exports=function(e){return n(i(e))}},{223:223,237:237}],278:[function(e,t,r){var n=e(276),i=Math.min;t.exports=function(e){return e>0?i(n(e),9007199254740991):0}},{276:276}],279:[function(e,t,r){var n=e(223);t.exports=function(e){return Object(n(e))}},{223:223}],280:[function(e,t,r){var n=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},{}],281:[function(e,t,r){var n=e(282)("unscopables");n in[]||e(234)(Array.prototype,n,{}),t.exports=function(e){[][n][e]=!0}},{234:234,282:282}],282:[function(e,t,r){var n=e(263)("wks"),i=e(232).Symbol;t.exports=function(t){return n[t]||(n[t]=i&&i[t]||(i||e(280))("Symbol."+t))}},{232:232,263:263,280:280}],283:[function(e,t,r){var n=e(214),i=e(282)("iterator"),a=e(246);t.exports=e(220).getIteratorMethod=function(e){return void 0!=e?e[i]||e["@@iterator"]||a[n(e)]:void 0}},{214:214,220:220,246:246,282:282}],284:[function(e,t,r){"use strict";var n,i=e(247),a=e(272),s=e(258),o=e(235),u=e(224),p=e(233),l=e(215),c=e(222),f=e(236),d=e(212),h=e(280)("__proto__"),m=e(240),y=e(210),g=e(209),v=e(279),b=e(277),E=e(276),x=e(275),S=e(278),A=e(237),D=e(227),C=Object.prototype,w=[],I=w.slice,_=w.join,F=i.setDesc,k=i.getDesc,P=i.setDescs,B=e(211)(!1),T={};a||(n=!D(function(){return 7!=F(u("div"),"a",{get:function(){return 7}}).a}),i.setDesc=function(e,t,r){if(n)try{return F(e,t,r)}catch(i){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(y(e)[t]=r.value),e},i.getDesc=function(e,t){if(n)try{return k(e,t)}catch(r){}return p(e,t)?s(!C.propertyIsEnumerable.call(e,t),e[t]):void 0},i.setDescs=P=function(e,t){y(e);for(var r,n=i.getKeys(t),a=n.length,s=0;a>s;)i.setDesc(e,r=n[s++],t[r]);return e}),c(c.S+c.F*!a,"Object",{getOwnPropertyDescriptor:i.getDesc,defineProperty:i.setDesc,defineProperties:P});var M="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),O=M.concat("length","prototype"),j=M.length,L=function(){var e,t=u("iframe"),r=j,n=">";for(t.style.display="none",o.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object</script"+n),e.close(),L=e.F;r--;)delete L.prototype[M[r]];return L()},N=function(e,t){return function(r){var n,i=b(r),a=0,s=[];for(n in i)n!=h&&p(i,n)&&s.push(n);for(;t>a;)p(i,n=e[a++])&&(~B(s,n)||s.push(n));return s}},R=function(){};c(c.S,"Object",{getPrototypeOf:i.getProto=i.getProto||function(e){return e=v(e),p(e,h)?e[h]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?C:null},getOwnPropertyNames:i.getNames=i.getNames||N(O,O.length,!0),create:i.create=i.create||function(e,t){var r;return null!==e?(R.prototype=y(e),r=new R,R.prototype=null,r[h]=e):r=L(),void 0===t?r:P(r,t)},keys:i.getKeys=i.getKeys||N(M,j,!1)});var V=function(e,t,r){if(!(t in T)){for(var n=[],i=0;t>i;i++)n[i]="a["+i+"]";T[t]=Function("F,a","return new F("+n.join(",")+")")}return T[t](e,r)};c(c.P,"Function",{bind:function(e){var t=g(this),r=I.call(arguments,1),n=function(){var i=r.concat(I.call(arguments));return this instanceof n?V(t,i.length,i):f(t,i,e)};return m(t.prototype)&&(n.prototype=t.prototype),n}});var U=D(function(){o&&I.call(o)});c(c.P+c.F*U,"Array",{slice:function(e,t){var r=S(this.length),n=l(this);if(t=void 0===t?r:t,"Array"==n)return I.call(this,e,t);for(var i=x(e,r),a=x(t,r),s=S(a-i),o=Array(s),u=0;s>u;u++)o[u]="String"==n?this.charAt(i+u):this[i+u];return o}}),c(c.P+c.F*(A!=Object),"Array",{join:function(){return _.apply(A(this),arguments)}}),c(c.S,"Array",{isArray:function(e){return"Array"==l(e)}});var q=function(e){return function(t,r){g(t);var n=A(this),i=S(n.length),a=e?i-1:0,s=e?-1:1;if(arguments.length<2)for(;;){if(a in n){r=n[a],a+=s;break}if(a+=s,e?0>a:a>=i)throw TypeError("Reduce of empty array with no initial value")}for(;e?a>=0:i>a;a+=s)a in n&&(r=t(r,n[a],a,this));return r}},G=function(e){return function(t){return e(this,t,arguments[1])}};c(c.P,"Array",{forEach:i.each=i.each||G(d(0)),map:G(d(1)),filter:G(d(2)),some:G(d(3)),every:G(d(4)),reduce:q(!1),reduceRight:q(!0),indexOf:G(B),lastIndexOf:function(e,t){var r=b(this),n=S(r.length),i=n-1;for(arguments.length>1&&(i=Math.min(i,E(t))),0>i&&(i=S(n+i));i>=0;i--)if(i in r&&r[i]===e)return i;return-1}}),c(c.S,"Date",{now:function(){return+new Date}});var H=function(e){return e>9?e:"0"+e},W=new Date(-5e13-1),X=!(W.toISOString&&"0385-07-25T07:06:39.999Z"==W.toISOString()&&D(function(){new Date(NaN).toISOString()}));c(c.P+c.F*X,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),r=e.getUTCMilliseconds(),n=0>t?"-":t>9999?"+":"";return n+("00000"+Math.abs(t)).slice(n?-6:-4)+"-"+H(e.getUTCMonth()+1)+"-"+H(e.getUTCDate())+"T"+H(e.getUTCHours())+":"+H(e.getUTCMinutes())+":"+H(e.getUTCSeconds())+"."+(r>99?r:"0"+H(r))+"Z"}})},{209:209,210:210,211:211,212:212,215:215,222:222,224:224,227:227,233:233,235:235,236:236,237:237,240:240,247:247,258:258,272:272,275:275,276:276,277:277,278:278,279:279,280:280}],285:[function(e,t,r){"use strict";var n=e(222),i=e(279),a=e(275),s=e(278);n(n.P,"Array",{copyWithin:function(e,t){var r=i(this),n=s(r.length),o=a(e,n),u=a(t,n),p=arguments[2],l=void 0===p?n:a(p,n),c=Math.min(l-u,n-o),f=1;for(o>u&&u+c>o&&(f=-1,u=u+c-1,o=o+c-1);c-->0;)u in r?r[o]=r[u]:delete r[o],o+=f,u+=f;return r}}),e(281)("copyWithin")},{222:222,275:275,278:278,279:279,281:281}],286:[function(e,t,r){"use strict";var n=e(222),i=e(279),a=e(275),s=e(278);n(n.P,"Array",{fill:function(e){for(var t=i(this,!0),r=s(t.length),n=a(arguments[1],r),o=arguments[2],u=void 0===o?r:a(o,r);u>n;)t[n++]=e;return t}}),e(281)("fill")},{222:222,275:275,278:278,279:279,281:281}],287:[function(e,t,r){"use strict";var n="findIndex",i=e(222),a=!0,s=e(212)(6);n in[]&&Array(1)[n](function(){a=!1}),i(i.P+i.F*a,"Array",{findIndex:function(e){return s(this,e,arguments[1])}}),e(281)(n)},{212:212,222:222,281:281}],288:[function(e,t,r){"use strict";var n="find",i=e(222),a=!0,s=e(212)(5);n in[]&&Array(1)[n](function(){a=!1}),i(i.P+i.F*a,"Array",{find:function(e){return s(this,e,arguments[1])}}),e(281)(n)},{212:212,222:222,281:281}],289:[function(e,t,r){"use strict";var n=e(221),i=e(222),a=e(279),s=e(241),o=e(238),u=e(278),p=e(283);i(i.S+i.F*!e(244)(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,i,l,c=a(e),f="function"==typeof this?this:Array,d=arguments[1],h=void 0!==d,m=0,y=p(c);if(h&&(d=n(d,arguments[2],2)),void 0==y||f==Array&&o(y))for(r=new f(t=u(c.length));t>m;m++)r[m]=h?d(c[m],m):c[m];else for(l=y.call(c),r=new f;!(i=l.next()).done;m++)r[m]=h?s(l,d,[i.value,m],!0):i.value;return r.length=m,r}})},{221:221,222:222,238:238,241:241,244:244,278:278,279:279,283:283}],290:[function(e,t,r){"use strict";var n=e(281),i=e(245),a=e(246),s=e(277);e(243)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},{243:243,245:245,246:246,277:277,281:281}],291:[function(e,t,r){"use strict";var n=e(222);n(n.S+n.F*e(227)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,r=new("function"==typeof this?this:Array)(t);t>e;)r[e]=arguments[e++];return r.length=t,r}})},{222:222,227:227}],292:[function(e,t,r){e(265)(Array)},{265:265}],293:[function(e,t,r){"use strict";var n=e(247),i=e(240),a=e(282)("hasInstance"),s=Function.prototype;a in s||n.setDesc(s,a,{value:function(e){if("function"!=typeof this||!i(e))return!1;if(!i(this.prototype))return e instanceof this;for(;e=n.getProto(e);)if(this.prototype===e)return!0;return!1}})},{240:240,247:247,282:282}],294:[function(e,t,r){var n=e(247).setDesc,i=e(258),a=e(233),s=Function.prototype,o=/^\s*function ([^ (]*)/,u="name";u in s||e(272)&&n(s,u,{configurable:!0,get:function(){var e=(""+this).match(o),t=e?e[1]:"";return a(this,u)||n(this,u,i(5,t)),t}})},{233:233,247:247,258:258,272:272}],295:[function(e,t,r){"use strict";var n=e(216);e(219)("Map",function(e){return function(){return e(this,arguments[0])}},{get:function(e){var t=n.getEntry(this,e);return t&&t.v},set:function(e,t){return n.def(this,0===e?0:e,t)}},n,!0)},{216:216,219:219}],296:[function(e,t,r){var n=e(222),i=e(250),a=Math.sqrt,s=Math.acosh;n(n.S+n.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+a(e-1)*a(e+1))}})},{222:222,250:250}],297:[function(e,t,r){function n(e){return isFinite(e=+e)&&0!=e?0>e?-n(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=e(222);i(i.S,"Math",{asinh:n})},{222:222}],298:[function(e,t,r){var n=e(222);n(n.S,"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},{222:222}],299:[function(e,t,r){var n=e(222),i=e(264);n(n.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},{222:222,264:264}],300:[function(e,t,r){var n=e(222);n(n.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},{222:222}],301:[function(e,t,r){var n=e(222),i=Math.exp;n(n.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},{222:222}],302:[function(e,t,r){var n=e(222);n(n.S,"Math",{expm1:e(226)})},{222:222,226:226}],303:[function(e,t,r){var n=e(222),i=e(264),a=Math.pow,s=a(2,-52),o=a(2,-23),u=a(2,127)*(2-o),p=a(2,-126),l=function(e){return e+1/s-1/s};n(n.S,"Math",{fround:function(e){var t,r,n=Math.abs(e),a=i(e);return p>n?a*l(n/p/o)*p*o:(t=(1+o/s)*n,r=t-(t-n),r>u||r!=r?a*(1/0):a*r)}})},{222:222,264:264}],304:[function(e,t,r){var n=e(222),i=Math.abs;n(n.S,"Math",{hypot:function(e,t){for(var r,n,a=0,s=0,o=arguments.length,u=0;o>s;)r=i(arguments[s++]),r>u?(n=u/r,a=a*n*n+1,u=r):r>0?(n=r/u,a+=n*n):a+=r;return u===1/0?1/0:u*Math.sqrt(a)}})},{222:222}],305:[function(e,t,r){var n=e(222);n(n.S+n.F*e(227)(function(){return-5!=Math.imul(4294967295,5)}),"Math",{imul:function(e,t){var r=65535,n=+e,i=+t,a=r&n,s=r&i;return 0|a*s+((r&n>>>16)*s+a*(r&i>>>16)<<16>>>0)}})},{222:222,227:227}],306:[function(e,t,r){var n=e(222);n(n.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},{222:222}],307:[function(e,t,r){var n=e(222);n(n.S,"Math",{log1p:e(250)})},{222:222,250:250}],308:[function(e,t,r){var n=e(222);n(n.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},{222:222}],309:[function(e,t,r){var n=e(222);n(n.S,"Math",{sign:e(264)})},{222:222,264:264}],310:[function(e,t,r){var n=e(222),i=e(226),a=Math.exp;n(n.S,"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(a(e-1)-a(-e-1))*(Math.E/2)}})},{222:222,226:226}],311:[function(e,t,r){var n=e(222),i=e(226),a=Math.exp;n(n.S,"Math",{tanh:function(e){var t=i(e=+e),r=i(-e);return t==1/0?1:r==1/0?-1:(t-r)/(a(e)+a(-e))}})},{222:222,226:226}],312:[function(e,t,r){var n=e(222);n(n.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},{222:222}],313:[function(e,t,r){"use strict";var n=e(247),i=e(232),a=e(233),s=e(215),o=e(240),u=e(227),p="Number",l=i[p],c=l,f=l.prototype,d=s(n.create(f))==p,h=function(e){var t,r;if("function"==typeof(t=e.valueOf)&&!o(r=t.call(e)))return r;if("function"==typeof(t=e.toString)&&!o(r=t.call(e)))return r;throw TypeError("Can't convert object to number")},m=function(e){if(o(e)&&(e=h(e)),"string"==typeof e&&e.length>2&&48==e.charCodeAt(0)){var t=!1;switch(e.charCodeAt(1)){case 66:case 98:t=!0;case 79:case 111:return parseInt(e.slice(2),t?2:8)}}return+e};l("0o1")&&l("0b1")||(l=function(e){var t=this;return t instanceof l&&(d?u(function(){f.valueOf.call(t)}):s(t)!=p)?new c(m(e)):m(e)},n.each.call(e(272)?n.getNames(c):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),function(e){a(c,e)&&!a(l,e)&&n.setDesc(l,e,n.getDesc(c,e))}),l.prototype=f,f.constructor=l,e(259)(i,p,l))},{215:215,227:227,232:232,233:233,240:240,247:247,259:259,272:272}],314:[function(e,t,r){var n=e(222);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},{222:222}],315:[function(e,t,r){var n=e(222),i=e(232).isFinite;n(n.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},{222:222,232:232}],316:[function(e,t,r){var n=e(222);n(n.S,"Number",{isInteger:e(239)})},{222:222,239:239}],317:[function(e,t,r){var n=e(222);n(n.S,"Number",{isNaN:function(e){return e!=e}})},{222:222}],318:[function(e,t,r){var n=e(222),i=e(239),a=Math.abs;n(n.S,"Number",{isSafeInteger:function(e){return i(e)&&a(e)<=9007199254740991}})},{222:222,239:239}],319:[function(e,t,r){var n=e(222);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{222:222}],320:[function(e,t,r){var n=e(222);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{222:222}],321:[function(e,t,r){var n=e(222);n(n.S,"Number",{parseFloat:parseFloat})},{222:222}],322:[function(e,t,r){var n=e(222);n(n.S,"Number",{parseInt:parseInt})},{222:222}],323:[function(e,t,r){var n=e(222);n(n.S+n.F,"Object",{assign:e(213)})},{213:213,222:222}],324:[function(e,t,r){var n=e(240);e(253)("freeze",function(e){return function(t){return e&&n(t)?e(t):t}})},{240:240,253:253}],325:[function(e,t,r){var n=e(277);e(253)("getOwnPropertyDescriptor",function(e){return function(t,r){return e(n(t),r)}})},{253:253,277:277}],326:[function(e,t,r){e(253)("getOwnPropertyNames",function(){return e(231).get})},{231:231,253:253}],327:[function(e,t,r){var n=e(279);e(253)("getPrototypeOf",function(e){return function(t){return e(n(t))}})},{253:253,279:279}],328:[function(e,t,r){var n=e(240);e(253)("isExtensible",function(e){return function(t){return n(t)?e?e(t):!0:!1}})},{240:240,253:253}],329:[function(e,t,r){var n=e(240);e(253)("isFrozen",function(e){return function(t){return n(t)?e?e(t):!1:!0}})},{240:240,253:253}],330:[function(e,t,r){var n=e(240);e(253)("isSealed",function(e){return function(t){return n(t)?e?e(t):!1:!0}})},{240:240,253:253}],331:[function(e,t,r){var n=e(222);n(n.S,"Object",{is:e(261)})},{222:222,261:261}],332:[function(e,t,r){var n=e(279);e(253)("keys",function(e){return function(t){return e(n(t))}})},{253:253,279:279}],333:[function(e,t,r){var n=e(240);e(253)("preventExtensions",function(e){return function(t){return e&&n(t)?e(t):t}})},{240:240,253:253}],334:[function(e,t,r){var n=e(240);e(253)("seal",function(e){return function(t){return e&&n(t)?e(t):t}})},{240:240,253:253}],335:[function(e,t,r){var n=e(222);n(n.S,"Object",{setPrototypeOf:e(262).set})},{222:222,262:262}],336:[function(e,t,r){"use strict";var n=e(214),i={};i[e(282)("toStringTag")]="z",i+""!="[object z]"&&e(259)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},{214:214,259:259,282:282}],337:[function(e,t,r){"use strict";var n,i=e(247),a=e(249),s=e(232),o=e(221),u=e(214),p=e(222),l=e(240),c=e(210),f=e(209),d=e(266),h=e(230),m=e(262).set,y=e(261),g=e(265),v=e(282)("species"),b=e(280)("record"),E=e(251),x="Promise",S=s.process,A="process"==u(S),D=s[x],C=function(e){var t=new D(function(){});return e&&(t.constructor=Object),D.resolve(t)===t},w=function(){function t(e){var r=new D(e);return m(r,t.prototype),r}var r=!1;try{if(r=D&&D.resolve&&C(),m(t,D),t.prototype=i.create(D.prototype,{constructor:{value:t}}),t.resolve(5).then(function(){})instanceof t||(r=!1),r&&e(272)){var n=!1;D.resolve(i.setDesc({},"then",{get:function(){n=!0}})),r=n}}catch(a){r=!1}return r}(),I=function(e){return l(e)&&(w?"Promise"==u(e):b in e)},_=function(e,t){return a&&e===D&&t===n?!0:y(e,t)},F=function(e){var t=c(e)[v];return void 0!=t?t:e},k=function(e){var t;return l(e)&&"function"==typeof(t=e.then)?t:!1},P=function(e,t){if(!e.n){e.n=!0;var r=e.c;E(function(){for(var n=e.v,i=1==e.s,a=0,o=function(t){var r,a,s=i?t.ok:t.fail;try{s?(i||(e.h=!0),r=s===!0?n:s(n),r===t.P?t.rej(TypeError("Promise-chain cycle")):(a=k(r))?a.call(r,t.res,t.rej):t.res(r)):t.rej(n)}catch(o){t.rej(o)}};r.length>a;)o(r[a++]);r.length=0,e.n=!1,t&&setTimeout(function(){B(e.p)&&(A?S.emit("unhandledRejection",n,e.p):s.console&&console.error&&console.error("Unhandled promise rejection",n)),e.a=void 0},1)})}},B=function(e){var t,r=e[b],n=r.a||r.c,i=0;if(r.h)return!1;for(;n.length>i;)if(t=n[i++],t.fail||!B(t.P))return!1;return!0},T=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),P(t,!0))},M=function(e){var t,r=this;if(!r.d){r.d=!0,r=r.r||r;try{(t=k(e))?E(function(){var n={r:r,d:!1};try{t.call(e,o(M,n,1),o(T,n,1))}catch(i){T.call(n,i)}}):(r.v=e,r.s=1,P(r,!1))}catch(n){T.call({r:r,d:!1},n)}}};w||(D=function(e){f(e);var t={p:d(this,D,x),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};this[b]=t;try{e(o(M,t,1),o(T,t,1))}catch(r){T.call(t,r)}},e(252)(D.prototype,{then:function(e,t){var r=c(c(this).constructor)[v],n={ok:"function"==typeof e?e:!0,fail:"function"==typeof t?t:!1},i=n.P=new(void 0!=r?r:D)(function(e,t){n.res=f(e),n.rej=f(t)}),a=this[b];return a.c.push(n),a.a&&a.a.push(n),a.s&&P(a,!1),i},"catch":function(e){return this.then(void 0,e)}})),p(p.G+p.W+p.F*!w,{Promise:D}),e(273)(D,x),g(D),g(n=e(220)[x]),p(p.S+p.F*!w,x,{reject:function(e){return new this(function(t,r){r(e)})}}),p(p.S+p.F*(!w||C(!0)),x,{resolve:function(e){return I(e)&&_(e.constructor,this)?e:new this(function(t){t(e)})}}),p(p.S+p.F*!(w&&e(244)(function(e){D.all(e)["catch"](function(){})})),x,{all:function(e){var t=F(this),r=[];return new t(function(n,a){h(e,!1,r.push,r);var s=r.length,o=Array(s);s?i.each.call(r,function(e,r){t.resolve(e).then(function(e){o[r]=e,--s||n(o)},a)}):n(o)})},race:function(e){var t=F(this);return new t(function(r,n){h(e,!1,function(e){t.resolve(e).then(r,n)})})}})},{209:209,210:210,214:214,220:220,221:221,222:222,230:230,232:232,240:240,244:244,247:247,249:249,251:251,252:252,261:261,262:262,265:265,266:266,272:272,273:273,280:280,282:282}],338:[function(e,t,r){var n=e(222),i=Function.apply;n(n.S,"Reflect",{apply:function(e,t,r){return i.call(e,t,r)}})},{222:222}],339:[function(e,t,r){var n=e(247),i=e(222),a=e(209),s=e(210),o=e(240),u=Function.bind||e(220).Function.prototype.bind;i(i.S+i.F*e(227)(function(){function e(){}return!(Reflect.construct(function(){},[],e)instanceof e)}),"Reflect",{ construct:function(e,t){a(e);var r=arguments.length<3?e:a(arguments[2]);if(e==r){if(void 0!=t)switch(s(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])}var i=[null];return i.push.apply(i,t),new(u.apply(e,i))}var p=r.prototype,l=n.create(o(p)?p:Object.prototype),c=Function.apply.call(e,l,t);return o(c)?c:l}})},{209:209,210:210,220:220,222:222,227:227,240:240,247:247}],340:[function(e,t,r){var n=e(247),i=e(222),a=e(210);i(i.S+i.F*e(227)(function(){Reflect.defineProperty(n.setDesc({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,r){a(e);try{return n.setDesc(e,t,r),!0}catch(i){return!1}}})},{210:210,222:222,227:227,247:247}],341:[function(e,t,r){var n=e(222),i=e(247).getDesc,a=e(210);n(n.S,"Reflect",{deleteProperty:function(e,t){var r=i(a(e),t);return r&&!r.configurable?!1:delete e[t]}})},{210:210,222:222,247:247}],342:[function(e,t,r){"use strict";var n=e(222),i=e(210),a=function(e){this._t=i(e),this._i=0;var t,r=this._k=[];for(t in e)r.push(t)};e(242)(a,"Object",function(){var e,t=this,r=t._k;do if(t._i>=r.length)return{value:void 0,done:!0};while(!((e=r[t._i++])in t._t));return{value:e,done:!1}}),n(n.S,"Reflect",{enumerate:function(e){return new a(e)}})},{210:210,222:222,242:242}],343:[function(e,t,r){var n=e(247),i=e(222),a=e(210);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return n.getDesc(a(e),t)}})},{210:210,222:222,247:247}],344:[function(e,t,r){var n=e(222),i=e(247).getProto,a=e(210);n(n.S,"Reflect",{getPrototypeOf:function(e){return i(a(e))}})},{210:210,222:222,247:247}],345:[function(e,t,r){function n(e,t){var r,s,p=arguments.length<3?e:arguments[2];return u(e)===p?e[t]:(r=i.getDesc(e,t))?a(r,"value")?r.value:void 0!==r.get?r.get.call(p):void 0:o(s=i.getProto(e))?n(s,t,p):void 0}var i=e(247),a=e(233),s=e(222),o=e(240),u=e(210);s(s.S,"Reflect",{get:n})},{210:210,222:222,233:233,240:240,247:247}],346:[function(e,t,r){var n=e(222);n(n.S,"Reflect",{has:function(e,t){return t in e}})},{222:222}],347:[function(e,t,r){var n=e(222),i=e(210),a=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(e){return i(e),a?a(e):!0}})},{210:210,222:222}],348:[function(e,t,r){var n=e(222);n(n.S,"Reflect",{ownKeys:e(255)})},{222:222,255:255}],349:[function(e,t,r){var n=e(222),i=e(210),a=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function(e){i(e);try{return a&&a(e),!0}catch(t){return!1}}})},{210:210,222:222}],350:[function(e,t,r){var n=e(222),i=e(262);i&&n(n.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(r){return!1}}})},{222:222,262:262}],351:[function(e,t,r){function n(e,t,r){var s,l,c=arguments.length<4?e:arguments[3],f=i.getDesc(u(e),t);if(!f){if(p(l=i.getProto(e)))return n(l,t,r,c);f=o(0)}return a(f,"value")?f.writable!==!1&&p(c)?(s=i.getDesc(c,t)||o(0),s.value=r,i.setDesc(c,t,s),!0):!1:void 0===f.set?!1:(f.set.call(c,r),!0)}var i=e(247),a=e(233),s=e(222),o=e(258),u=e(210),p=e(240);s(s.S,"Reflect",{set:n})},{210:210,222:222,233:233,240:240,247:247,258:258}],352:[function(e,t,r){var n=e(247),i=e(232),a=e(215),s=e(229),o=i.RegExp,u=o,p=o.prototype,l=/a/g,c=new o(l)!==l,f=function(){try{return"/a/i"==o(l,"i")}catch(e){}}();e(272)&&(c&&f||(o=function(e,t){var r="RegExp"==a(e),n=void 0===t;return this instanceof o||!r||!n?c?new u(r&&!n?e.source:e,t):new u(r?e.source:e,r&&n?s.call(e):t):e},n.each.call(n.getNames(u),function(e){e in o||n.setDesc(o,e,{configurable:!0,get:function(){return u[e]},set:function(t){u[e]=t}})}),p.constructor=o,o.prototype=p,e(259)(i,"RegExp",o))),e(265)(o)},{215:215,229:229,232:232,247:247,259:259,265:265,272:272}],353:[function(e,t,r){var n=e(247);e(272)&&"g"!=/./g.flags&&n.setDesc(RegExp.prototype,"flags",{configurable:!0,get:e(229)})},{229:229,247:247,272:272}],354:[function(e,t,r){e(228)("match",1,function(e,t){return function(r){"use strict";var n=e(this),i=void 0==r?void 0:r[t];return void 0!==i?i.call(r,n):new RegExp(r)[t](String(n))}})},{228:228}],355:[function(e,t,r){e(228)("replace",2,function(e,t,r){return function(n,i){"use strict";var a=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,a,i):r.call(String(a),n,i)}})},{228:228}],356:[function(e,t,r){e(228)("search",1,function(e,t){return function(r){"use strict";var n=e(this),i=void 0==r?void 0:r[t];return void 0!==i?i.call(r,n):new RegExp(r)[t](String(n))}})},{228:228}],357:[function(e,t,r){e(228)("split",2,function(e,t,r){return function(n,i){"use strict";var a=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,a,i):r.call(String(a),n,i)}})},{228:228}],358:[function(e,t,r){"use strict";var n=e(216);e(219)("Set",function(e){return function(){return e(this,arguments[0])}},{add:function(e){return n.def(this,e=0===e?0:e,e)}},n)},{216:216,219:219}],359:[function(e,t,r){"use strict";var n=e(222),i=e(267)(!1);n(n.P,"String",{codePointAt:function(e){return i(this,e)}})},{222:222,267:267}],360:[function(e,t,r){"use strict";var n=e(222),i=e(278),a=e(268);n(n.P+n.F*!e(227)(function(){"q".endsWith(/./)}),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),r=arguments[1],n=i(t.length),s=void 0===r?n:Math.min(i(r),n),o=String(e);return t.slice(s-o.length,s)===o}})},{222:222,227:227,268:268,278:278}],361:[function(e,t,r){var n=e(222),i=e(275),a=String.fromCharCode,s=String.fromCodePoint;n(n.S+n.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,s=0;n>s;){if(t=+arguments[s++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(65536>t?a(t):a(((t-=65536)>>10)+55296,t%1024+56320))}return r.join("")}})},{222:222,275:275}],362:[function(e,t,r){"use strict";var n=e(222),i=e(268);n(n.P,"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments[1])}})},{222:222,268:268}],363:[function(e,t,r){"use strict";var n=e(267)(!0);e(243)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{243:243,267:267}],364:[function(e,t,r){var n=e(222),i=e(277),a=e(278);n(n.S,"String",{raw:function(e){for(var t=i(e.raw),r=a(t.length),n=arguments.length,s=[],o=0;r>o;)s.push(String(t[o++])),n>o&&s.push(String(arguments[o]));return s.join("")}})},{222:222,277:277,278:278}],365:[function(e,t,r){var n=e(222);n(n.P,"String",{repeat:e(270)})},{222:222,270:270}],366:[function(e,t,r){"use strict";var n=e(222),i=e(278),a=e(268);n(n.P+n.F*!e(227)(function(){"q".startsWith(/./)}),"String",{startsWith:function(e){var t=a(this,e,"startsWith"),r=i(Math.min(arguments[1],t.length)),n=String(e);return t.slice(r,r+n.length)===n}})},{222:222,227:227,268:268,278:278}],367:[function(e,t,r){"use strict";e(271)("trim",function(e){return function(){return e(this,3)}})},{271:271}],368:[function(e,t,r){"use strict";var n=e(247),i=e(232),a=e(233),s=e(272),o=e(222),u=e(259),p=e(263),l=e(273),c=e(280),f=e(282),d=e(248),h=e(231),m=e(225),y=e(240),g=e(210),v=e(277),b=e(258),E=n.getDesc,x=n.setDesc,S=n.create,A=h.get,D=i.Symbol,C=!1,w=f("_hidden"),I=n.isEnum,_=p("symbol-registry"),F=p("symbols"),k="function"==typeof D,P=Object.prototype,B=s?function(){try{return S(x({},w,{get:function(){return x(this,w,{value:!1})[w]}}))[w]||x}catch(e){return function(e,t,r){var n=E(P,t);n&&delete P[t],x(e,t,r),n&&e!==P&&x(P,t,n)}}}():x,T=function(e){var t=F[e]=S(D.prototype);return t._k=e,s&&C&&B(P,e,{configurable:!0,set:function(t){a(this,w)&&a(this[w],e)&&(this[w][e]=!1),B(this,e,b(1,t))}}),t},M=function(e,t,r){return r&&a(F,t)?(r.enumerable?(a(e,w)&&e[w][t]&&(e[w][t]=!1),r=S(r,{enumerable:b(0,!1)})):(a(e,w)||x(e,w,b(1,{})),e[w][t]=!0),B(e,t,r)):x(e,t,r)},O=function(e,t){g(e);for(var r,n=m(t=v(t)),i=0,a=n.length;a>i;)M(e,r=n[i++],t[r]);return e},j=function(e,t){return void 0===t?S(e):O(S(e),t)},L=function(e){var t=I.call(this,e);return t||!a(this,e)||!a(F,e)||a(this,w)&&this[w][e]?t:!0},N=function(e,t){var r=E(e=v(e),t);return!r||!a(F,t)||a(e,w)&&e[w][t]||(r.enumerable=!0),r},R=function(e){for(var t,r=A(v(e)),n=[],i=0;r.length>i;)a(F,t=r[i++])||t==w||n.push(t);return n},V=function(e){for(var t,r=A(v(e)),n=[],i=0;r.length>i;)a(F,t=r[i++])&&n.push(F[t]);return n};k||(D=function(){if(this instanceof D)throw TypeError("Symbol is not a constructor");return T(c(arguments[0]))},u(D.prototype,"toString",function(){return this._k}),n.create=j,n.isEnum=L,n.getDesc=N,n.setDesc=M,n.setDescs=O,n.getNames=h.get=R,n.getSymbols=V,s&&!e(249)&&u(P,"propertyIsEnumerable",L,!0)),(!k||e(227)(function(){return"[{},[null]]"!=JSON.stringify([{a:D()},[D()]])}))&&u(D.prototype,"toJSON",function(){return k&&y(this)?this:void 0});var U={"for":function(e){return a(_,e+="")?_[e]:_[e]=D(e)},keyFor:function(e){return d(_,e)},useSetter:function(){C=!0},useSimple:function(){C=!1}};n.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(e){var t=f(e);U[e]=k?t:T(t)}),C=!0,o(o.G+o.W,{Symbol:D}),o(o.S,"Symbol",U),o(o.S+o.F*!k,"Object",{create:j,defineProperty:M,defineProperties:O,getOwnPropertyDescriptor:N,getOwnPropertyNames:R,getOwnPropertySymbols:V}),l(D,"Symbol"),l(Math,"Math",!0),l(i.JSON,"JSON",!0)},{210:210,222:222,225:225,227:227,231:231,232:232,233:233,240:240,247:247,248:248,249:249,258:258,259:259,263:263,272:272,273:273,277:277,280:280,282:282}],369:[function(e,t,r){"use strict";var n=e(247),i=e(218),a=e(240),s=e(233),o=i.frozenStore,u=i.WEAK,p=Object.isExtensible||a,l={},c=e(219)("WeakMap",function(e){return function(){return e(this,arguments[0])}},{get:function(e){if(a(e)){if(!p(e))return o(this).get(e);if(s(e,u))return e[u][this._i]}},set:function(e,t){return i.def(this,e,t)}},i,!0,!0);7!=(new c).set((Object.freeze||Object)(l),7).get(l)&&n.each.call(["delete","has","get","set"],function(t){var r=c.prototype,n=r[t];e(259)(r,t,function(e,r){if(a(e)&&!p(e)){var i=o(this)[t](e,r);return"set"==t?this:i}return n.call(this,e,r)})})},{218:218,219:219,233:233,240:240,247:247,259:259}],370:[function(e,t,r){"use strict";var n=e(218);e(219)("WeakSet",function(e){return function(){return e(this,arguments[0])}},{add:function(e){return n.def(this,e,!0)}},n,!1,!0)},{218:218,219:219}],371:[function(e,t,r){"use strict";var n=e(222),i=e(211)(!0);n(n.P,"Array",{includes:function(e){return i(this,e,arguments[1])}}),e(281)("includes")},{211:211,222:222,281:281}],372:[function(e,t,r){var n=e(222);n(n.P,"Map",{toJSON:e(217)("Map")})},{217:217,222:222}],373:[function(e,t,r){var n=e(222),i=e(254)(!0);n(n.S,"Object",{entries:function(e){return i(e)}})},{222:222,254:254}],374:[function(e,t,r){var n=e(247),i=e(222),a=e(255),s=e(277),o=e(258);i(i.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,r,i=s(e),u=n.setDesc,p=n.getDesc,l=a(i),c={},f=0;l.length>f;)r=p(i,t=l[f++]),t in c?u(c,t,o(0,r)):c[t]=r;return c}})},{222:222,247:247,255:255,258:258,277:277}],375:[function(e,t,r){var n=e(222),i=e(254)(!1);n(n.S,"Object",{values:function(e){return i(e)}})},{222:222,254:254}],376:[function(e,t,r){var n=e(222),i=e(260)(/[\\^$*+?.()|[\]{}]/g,"\\$&");n(n.S,"RegExp",{escape:function(e){return i(e)}})},{222:222,260:260}],377:[function(e,t,r){var n=e(222);n(n.P,"Set",{toJSON:e(217)("Set")})},{217:217,222:222}],378:[function(e,t,r){"use strict";var n=e(222),i=e(267)(!0);n(n.P,"String",{at:function(e){return i(this,e)}})},{222:222,267:267}],379:[function(e,t,r){"use strict";var n=e(222),i=e(269);n(n.P,"String",{padLeft:function(e){return i(this,e,arguments[1],!0)}})},{222:222,269:269}],380:[function(e,t,r){"use strict";var n=e(222),i=e(269);n(n.P,"String",{padRight:function(e){return i(this,e,arguments[1],!1)}})},{222:222,269:269}],381:[function(e,t,r){"use strict";e(271)("trimLeft",function(e){return function(){return e(this,1)}})},{271:271}],382:[function(e,t,r){"use strict";e(271)("trimRight",function(e){return function(){return e(this,2)}})},{271:271}],383:[function(e,t,r){var n=e(247),i=e(222),a=e(220).Array||Array,s={},o=function(t,r){n.each.call(t.split(","),function(t){void 0==r&&t in a?s[t]=a[t]:t in[]&&(s[t]=e(221)(Function.call,[][t],r))})};o("pop,reverse,shift,keys,values,entries",1),o("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),o("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),i(i.S,"Array",s)},{220:220,221:221,222:222,247:247}],384:[function(e,t,r){e(290);var n=e(232),i=e(234),a=e(246),s=e(282)("iterator"),o=n.NodeList,u=n.HTMLCollection,p=o&&o.prototype,l=u&&u.prototype,c=a.NodeList=a.HTMLCollection=a.Array;!o||s in p||i(p,s,c),!u||s in l||i(l,s,c)},{232:232,234:234,246:246,282:282,290:290}],385:[function(e,t,r){var n=e(222),i=e(274);n(n.G+n.B,{setImmediate:i.set,clearImmediate:i.clear})},{222:222,274:274}],386:[function(e,t,r){var n=e(232),i=e(222),a=e(236),s=e(256),o=n.navigator,u=!!o&&/MSIE .\./.test(o.userAgent),p=function(e){return u?function(t,r){return e(a(s,[].slice.call(arguments,2),"function"==typeof t?t:Function(t)),r)}:e};i(i.G+i.B+i.F*u,{setTimeout:p(n.setTimeout),setInterval:p(n.setInterval)})},{222:222,232:232,236:236,256:256}],387:[function(e,t,r){e(284),e(368),e(323),e(331),e(335),e(336),e(324),e(334),e(333),e(329),e(330),e(328),e(325),e(327),e(332),e(326),e(294),e(293),e(313),e(314),e(315),e(316),e(317),e(318),e(319),e(320),e(321),e(322),e(296),e(297),e(298),e(299),e(300),e(301),e(302),e(303),e(304),e(305),e(306),e(307),e(308),e(309),e(310),e(311),e(312),e(361),e(364),e(367),e(363),e(359),e(360),e(362),e(365),e(366),e(289),e(291),e(290),e(292),e(285),e(286),e(288),e(287),e(352),e(353),e(354),e(355),e(356),e(357),e(337),e(295),e(358),e(369),e(370),e(338),e(339),e(340),e(341),e(342),e(345),e(343),e(344),e(346),e(347),e(348),e(349),e(351),e(350),e(371),e(378),e(379),e(380),e(381),e(382),e(376),e(374),e(375),e(373),e(372),e(377),e(383),e(386),e(385),e(384),t.exports=e(220)},{220:220,284:284,285:285,286:286,287:287,288:288,289:289,290:290,291:291,292:292,293:293,294:294,295:295,296:296,297:297,298:298,299:299,300:300,301:301,302:302,303:303,304:304,305:305,306:306,307:307,308:308,309:309,310:310,311:311,312:312,313:313,314:314,315:315,316:316,317:317,318:318,319:319,320:320,321:321,322:322,323:323,324:324,325:325,326:326,327:327,328:328,329:329,330:330,331:331,332:332,333:333,334:334,335:335,336:336,337:337,338:338,339:339,340:340,341:341,342:342,343:343,344:344,345:345,346:346,347:347,348:348,349:349,350:350,351:351,352:352,353:353,354:354,355:355,356:356,357:357,358:358,359:359,360:360,361:361,362:362,363:363,364:364,365:365,366:366,367:367,368:368,369:369,370:370,371:371,372:372,373:373,374:374,375:375,376:376,377:377,378:378,379:379,380:380,381:381,382:382,383:383,384:384,385:385,386:386}],388:[function(e,t,r){function n(){return r.colors[l++%r.colors.length]}function i(e){function t(){}function i(){var e=i,t=+new Date,a=t-(p||t);e.diff=a,e.prev=p,e.curr=t,p=t,null==e.useColors&&(e.useColors=r.useColors()),null==e.color&&e.useColors&&(e.color=n());var s=Array.prototype.slice.call(arguments);s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var o=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,n){if("%%"===t)return t;o++;var i=r.formatters[n];if("function"==typeof i){var a=s[o];t=i.call(e,a),s.splice(o,1),o--}return t}),"function"==typeof r.formatArgs&&(s=r.formatArgs.apply(e,s));var u=i.log||r.log||console.log.bind(console);u.apply(e,s)}t.enabled=!1,i.enabled=!0;var a=r.enabled(e)?i:t;return a.namespace=e,a}function a(e){r.save(e);for(var t=(e||"").split(/[\s,]+/),n=t.length,i=0;n>i;i++)t[i]&&(e=t[i].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function s(){r.enable("")}function o(e){var t,n;for(t=0,n=r.skips.length;n>t;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;n>t;t++)if(r.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=i,r.coerce=u,r.disable=s,r.enable=a,r.enabled=o,r.humanize=e(390),r.names=[],r.skips=[],r.formatters={};var p,l=0},{390:390}],389:[function(e,t,r){(function(n){function i(){var e=(n.env.DEBUG_COLORS||"").trim().toLowerCase();return 0===e.length?l.isatty(f):"0"!==e&&"no"!==e&&"false"!==e&&"disabled"!==e}function a(){var e=arguments,t=this.useColors,n=this.namespace;if(t){var i=this.color;e[0]=" [3"+i+";1m"+n+" "+e[0]+"[3"+i+"m +"+r.humanize(this.diff)+""}else e[0]=(new Date).toUTCString()+" "+n+" "+e[0];return e}function s(){return d.write(c.format.apply(this,arguments)+"\n")}function o(e){null==e?delete n.env.DEBUG:n.env.DEBUG=e}function u(){return n.env.DEBUG}function p(t){var r,i=n.binding("tty_wrap");switch(i.guessHandleType(t)){case"TTY":r=new l.WriteStream(t),r._type="tty",r._handle&&r._handle.unref&&r._handle.unref();break;case"FILE":var a=e(1);r=new a.SyncWriteStream(t,{autoClose:!1}),r._type="fs";break;case"PIPE":case"TCP":var s=e(1);r=new s.Socket({fd:t,readable:!1,writable:!0}),r.readable=!1,r.read=null,r._type="pipe",r._handle&&r._handle.unref&&r._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return r.fd=t,r._isStdio=!0,r}var l=e(11),c=e(13);r=t.exports=e(388),r.log=s,r.formatArgs=a,r.save=o,r.load=u,r.useColors=i,r.colors=[6,2,3,4,5,1];var f=parseInt(n.env.DEBUG_FD,10)||2,d=1===f?n.stdout:2===f?n.stderr:p(f),h=4===c.inspect.length?function(e,t){return c.inspect(e,void 0,void 0,t)}:function(e,t){return c.inspect(e,{colors:t})};r.formatters.o=function(e){return h(e,this.useColors).replace(/\s*\n\s*/g," ")},r.enable(u())}).call(this,e(10))},{1:1,10:10,11:11,13:13,388:388}],390:[function(e,t,r){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 r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*c;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*p;case"minutes":case"minute":case"mins":case"min":case"m":return r*u;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function i(e){return e>=l?Math.round(e/l)+"d":e>=p?Math.round(e/p)+"h":e>=u?Math.round(e/u)+"m":e>=o?Math.round(e/o)+"s":e+"ms"}function a(e){return s(e,l,"day")||s(e,p,"hour")||s(e,u,"minute")||s(e,o,"second")||e+" ms"}function s(e,t,r){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var o=1e3,u=60*o,p=60*u,l=24*p,c=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?a(e):i(e)}},{}],391:[function(e,t,r){"use strict";function n(e){var t=0,r=0,n=0;for(var i in e){var a=e[i],s=a[0],o=a[1];(s>r||s===r&&o>n)&&(r=s,n=o,t=+i)}return t}var i=e(584),a=/^(?:( )+|\t+)/;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t,r,s=0,o=0,u=0,p={};e.split(/\n/g).forEach(function(e){if(e){var n,i=e.match(a);i?(n=i[0].length,i[1]?o++:s++):n=0;var l=n-u;u=n,l?(r=l>0,t=p[r?l:-l],t?t[0]++:t=p[l]=[1,0]):t&&(t[1]+=+r)}});var l,c,f=n(p);return f?o>=s?(l="space",c=i(" ",f)):(l="tab",c=i(" ",f)):(l=null,c=""),{amount:f,type:l,indent:c}}},{584:584}],392:[function(e,t,r){!function(){"use strict";function e(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return n(e)||null!=e&&"FunctionDeclaration"===e.type}function a(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function s(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=a(t)}while(t);return!1}t.exports={isExpression:e,isStatement:n,isIterationStatement:r,isSourceElement:i,isProblematicIfStatement:s,trailingStatement:a}}()},{}],393:[function(e,t,r){!function(){"use strict";function e(e){return e>=48&&57>=e}function r(e){return e>=48&&57>=e||e>=97&&102>=e||e>=65&&70>=e}function n(e){return e>=48&&55>=e}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&d.indexOf(e)>=0}function a(e){return 10===e||13===e||8232===e||8233===e}function s(e){if(65535>=e)return String.fromCharCode(e);var t=String.fromCharCode(Math.floor((e-65536)/1024)+55296),r=String.fromCharCode((e-65536)%1024+56320);return t+r}function o(e){return 128>e?h[e]:f.NonAsciiIdentifierStart.test(s(e))}function u(e){return 128>e?m[e]:f.NonAsciiIdentifierPart.test(s(e))}function p(e){return 128>e?h[e]:c.NonAsciiIdentifierStart.test(s(e))}function l(e){return 128>e?m[e]:c.NonAsciiIdentifierPart.test(s(e))}var c,f,d,h,m,y;for(f={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},c={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/, NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},d=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],h=new Array(128),y=0;128>y;++y)h[y]=y>=97&&122>=y||y>=65&&90>=y||36===y||95===y;for(m=new Array(128),y=0;128>y;++y)m[y]=y>=97&&122>=y||y>=65&&90>=y||y>=48&&57>=y||36===y||95===y;t.exports={isDecimalDigit:e,isHexDigit:r,isOctalDigit:n,isWhiteSpace:i,isLineTerminator:a,isIdentifierStartES5:o,isIdentifierPartES5:u,isIdentifierStartES6:p,isIdentifierPartES6:l}}()},{}],394:[function(e,t,r){!function(){"use strict";function r(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function n(e,t){return t||"yield"!==e?i(e,t):!1}function i(e,t){if(t&&r(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function a(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function s(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function o(e){return"eval"===e||"arguments"===e}function u(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!d.isIdentifierStartES5(n))return!1;for(t=1,r=e.length;r>t;++t)if(n=e.charCodeAt(t),!d.isIdentifierPartES5(n))return!1;return!0}function p(e,t){return 1024*(e-55296)+(t-56320)+65536}function l(e){var t,r,n,i,a;if(0===e.length)return!1;for(a=d.isIdentifierStartES6,t=0,r=e.length;r>t;++t){if(n=e.charCodeAt(t),n>=55296&&56319>=n){if(++t,t>=r)return!1;if(i=e.charCodeAt(t),!(i>=56320&&57343>=i))return!1;n=p(n,i)}if(!a(n))return!1;a=d.isIdentifierPartES6}return!0}function c(e,t){return u(e)&&!a(e,t)}function f(e,t){return l(e)&&!s(e,t)}var d=e(393);t.exports={isKeywordES5:n,isKeywordES6:i,isReservedWordES5:a,isReservedWordES6:s,isRestrictedWord:o,isIdentifierNameES5:u,isIdentifierNameES6:l,isIdentifierES5:c,isIdentifierES6:f}}()},{393:393}],395:[function(e,t,r){!function(){"use strict";r.ast=e(392),r.code=e(393),r.keyword=e(394)}()},{392:392,393:393,394:394}],396:[function(e,t,r){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},nonstandard:{escape:!1,unescape:!1},browser:{addEventListener:!1,alert:!1,applicationCache:!1,atob:!1,Audio:!1,AudioProcessingEvent:!1,BeforeUnloadEvent:!1,Blob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,crypto:!1,CSS:!1,CustomEvent:!1,DataView:!1,Debug:!1,defaultStatus:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DOMParser:!1,DragEvent:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,FileReader:!1,fetch:!1,find:!1,focus:!1,FocusEvent:!1,FormData:!1,frameElement:!1,frames:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLElement:!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,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,Intl:!1,KeyboardEvent:!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,navigator:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProgressEvent:!1,prompt:!1,Range:!1,Request:!1,Response:!1,removeEventListener:!1,requestAnimationFrame:!1,resizeBy:!1,resizeTo:!1,screen:!1,screenX:!1,screenY:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,self:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,showModalDialog:!1,status:!1,stop:!1,StorageEvent:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!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,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!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,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!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,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,TouchEvent:!1,UIEvent:!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,WheelEvent:!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},worker:{importScripts:!0,postMessage:!0,self:!0},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,DataView:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},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},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},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},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,target:!1,tempdir:!1,test:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,ObjectId:!1,PlanCache:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1}}},{}],397:[function(e,t,r){t.exports=e(396)},{396:396}],398:[function(e,t,r){var n=e(399);t.exports=Number.isInteger||function(e){return"number"==typeof e&&n(e)&&Math.floor(e)===e}},{399:399}],399:[function(e,t,r){"use strict";var n=e(400);t.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-(1/0))}},{400:400}],400:[function(e,t,r){"use strict";t.exports=Number.isNaN||function(e){return e!==e}},{}],401:[function(e,t,r){t.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g,t.exports.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},{}],402:[function(e,t,r){var n="object"==typeof r?r:{};n.parse=function(){"use strict";var e,t,r,n,i={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},a=[" "," ","\r","\n"," ","\f"," ","\ufeff"],s=function(t){var n=new SyntaxError;throw n.message=t,n.at=e,n.text=r,n},o=function(n){return n&&n!==t&&s("Expected '"+n+"' instead of '"+t+"'"),t=r.charAt(e),e+=1,t},u=function(){return r.charAt(e)},p=function(){var e=t;for("_"!==t&&"$"!==t&&("a">t||t>"z")&&("A">t||t>"Z")&&s("Bad identifier");o()&&("_"===t||"$"===t||t>="a"&&"z">=t||t>="A"&&"Z">=t||t>="0"&&"9">=t);)e+=t;return e},l=function(){var e,r="",n="",i=10;if(("-"===t||"+"===t)&&(r=t,o(t)),"I"===t)return e=y(),("number"!=typeof e||isNaN(e))&&s("Unexpected word for number"),"-"===r?-e:e;if("N"===t)return e=y(),isNaN(e)||s("expected word to be NaN"),e;switch("0"===t&&(n+=t,o(),"x"===t||"X"===t?(n+=t,o(),i=16):t>="0"&&"9">=t&&s("Octal literal")),i){case 10:for(;t>="0"&&"9">=t;)n+=t,o();if("."===t)for(n+=".";o()&&t>="0"&&"9">=t;)n+=t;if("e"===t||"E"===t)for(n+=t,o(),("-"===t||"+"===t)&&(n+=t,o());t>="0"&&"9">=t;)n+=t,o();break;case 16:for(;t>="0"&&"9">=t||t>="A"&&"F">=t||t>="a"&&"f">=t;)n+=t,o()}return e="-"===r?-n:+n,isFinite(e)?e:void s("Bad number")},c=function(){var e,r,n,a,p="";if('"'===t||"'"===t)for(n=t;o();){if(t===n)return o(),p;if("\\"===t)if(o(),"u"===t){for(a=0,r=0;4>r&&(e=parseInt(o(),16),isFinite(e));r+=1)a=16*a+e;p+=String.fromCharCode(a)}else if("\r"===t)"\n"===u()&&o();else{if("string"!=typeof i[t])break;p+=i[t]}else{if("\n"===t)break;p+=t}}s("Bad string")},f=function(){"/"!==t&&s("Not an inline comment");do if(o(),"\n"===t||"\r"===t)return void o();while(t)},d=function(){"*"!==t&&s("Not a block comment");do for(o();"*"===t;)if(o("*"),"/"===t)return void o("/");while(t);s("Unterminated block comment")},h=function(){"/"!==t&&s("Not a comment"),o("/"),"/"===t?f():"*"===t?d():s("Unrecognized comment")},m=function(){for(;t;)if("/"===t)h();else{if(!(a.indexOf(t)>=0))return;o()}},y=function(){switch(t){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null;case"I":return o("I"),o("n"),o("f"),o("i"),o("n"),o("i"),o("t"),o("y"),1/0;case"N":return o("N"),o("a"),o("N"),NaN}s("Unexpected '"+t+"'")},g=function(){var e=[];if("["===t)for(o("["),m();t;){if("]"===t)return o("]"),e;if(","===t?s("Missing array element"):e.push(n()),m(),","!==t)return o("]"),e;o(","),m()}s("Bad array")},v=function(){var e,r={};if("{"===t)for(o("{"),m();t;){if("}"===t)return o("}"),r;if(e='"'===t||"'"===t?c():p(),m(),o(":"),r[e]=n(),m(),","!==t)return o("}"),r;o(","),m()}s("Bad object")};return n=function(){switch(m(),t){case"{":return v();case"[":return g();case'"':case"'":return c();case"-":case"+":case".":return l();default:return t>="0"&&"9">=t?l():y()}},function(i,a){var o;return r=String(i),e=0,t=" ",o=n(),m(),t&&s("Syntax error"),"function"==typeof a?function u(e,t){var r,n,i=e[t];if(i&&"object"==typeof i)for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n=u(i,r),void 0!==n?i[r]=n:delete i[r]);return a.call(e,t,i)}({"":o},""):o}}(),n.stringify=function(e,t,r){function i(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e||"_"===e||"$"===e}function a(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e}function s(e){if("string"!=typeof e)return!1;if(!a(e[0]))return!1;for(var t=1,r=e.length;r>t;){if(!i(e[t]))return!1;t++}return!0}function o(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function u(e){return"[object Date]"===Object.prototype.toString.call(e)}function p(e){for(var t=0;t<m.length;t++)if(m[t]===e)throw new TypeError("Converting circular structure to JSON")}function l(e,t,r){if(!e)return"";e.length>10&&(e=e.substring(0,10));for(var n=r?"":"\n",i=0;t>i;i++)n+=e;return n}function c(e){return y.lastIndex=0,y.test(e)?'"'+e.replace(y,function(e){var t=g[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function f(e,t,r){var n,i,a=d(e,t,r);switch(a&&!u(a)&&(a=a.valueOf()),typeof a){case"boolean":return a.toString();case"number":return isNaN(a)||!isFinite(a)?"null":a.toString();case"string":return c(a.toString());case"object":if(null===a)return"null";if(o(a)){p(a),n="[",m.push(a);for(var y=0;y<a.length;y++)i=f(a,y,!1),n+=l(h,m.length),n+=null===i||"undefined"==typeof i?"null":i,y<a.length-1?n+=",":h&&(n+="\n");m.pop(),n+=l(h,m.length,!0)+"]"}else{p(a),n="{";var g=!1;m.push(a);for(var v in a)if(a.hasOwnProperty(v)){var b=f(a,v,!1);if(r=!1,"undefined"!=typeof b&&null!==b){n+=l(h,m.length),g=!0;var t=s(v)?v:c(v);n+=t+":"+(h?" ":"")+b+","}}m.pop(),n=g?n.substring(0,n.length-1)+l(h,m.length)+"}":"{}"}return n;default:return void 0}}if(t&&"function"!=typeof t&&!o(t))throw new Error("Replacer must be a function or an array");var d=function(e,r,n){var i=e[r];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof t?t.call(e,r,i):t?n||o(e)||t.indexOf(r)>=0?i:void 0:i};n.isWord=s,isNaN=isNaN||function(e){return"number"==typeof e&&e!==e};var h,m=[];r&&("string"==typeof r?h=r:"number"==typeof r&&r>=0&&(h=l(" ",r,!0)));var y=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},v={"":e};return void 0===e?d(v,"",!0):f(v,"",!0)}},{}],403:[function(e,t,r){function n(e,t,r){return t in e?e[t]:r}function i(e,t){var r=n.bind(null,t||{}),i=r("transform",Function.prototype),s=r("padding"," "),o=r("before"," "),u=r("after"," | "),p=r("start",1),l=Array.isArray(e),c=l?e:e.split("\n"),f=p+c.length-1,d=String(f).length,h=c.map(function(e,t){var r=p+t,n={before:o,number:r,width:d,after:u,line:e};return i(n),n.before+a(n.number,d,s)+n.after+n.line});return l?h:h.join("\n")}var a=e(404);t.exports=i},{404:404}],404:[function(e,t,r){function n(e,t,r){e=String(e);var n=-1;for(r||(r=" "),t-=e.length;++n<t;)e=r+e;return e}t.exports=n},{}],405:[function(e,t,r){function n(e){for(var t=-1,r=e?e.length:0,n=-1,i=[];++t<r;){var a=e[t];a&&(i[++n]=a)}return i}t.exports=n},{}],406:[function(e,t,r){function n(e,t,r){var n=e?e.length:0;return r&&a(e,t,r)&&(t=!1),n?i(e,t):[]}var i=e(435),a=e(485);t.exports=n},{435:435,485:485}],407:[function(e,t,r){function n(e){var t=e?e.length:0;return t?e[t-1]:void 0}t.exports=n},{}],408:[function(e,t,r){function n(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var r=0,n=i,a=e.length;++r<a;)for(var o=0,u=e[r];(o=n(t,u,o))>-1;)s.call(t,o,1);return t}var i=e(442),a=Array.prototype,s=a.splice;t.exports=n},{442:442}],409:[function(e,t,r){function n(e,t,r,n){var u=e?e.length:0;return u?(null!=t&&"boolean"!=typeof t&&(n=r,r=s(e,t,n)?void 0:t,t=!1),r=null==r?r:i(r,n,3),t?o(e,r):a(e,r)):[]}var i=e(429),a=e(458),s=e(485),o=e(491);t.exports=n},{429:429,458:458,485:485,491:491}],410:[function(e,t,r){t.exports=e(413)},{413:413}],411:[function(e,t,r){t.exports=e(412)},{412:412}],412:[function(e,t,r){var n=e(421),i=e(433),a=e(470),s=a(n,i);t.exports=s},{421:421,433:433,470:470}],413:[function(e,t,r){function n(e,t,r,n){var f=e?a(e):0;return u(f)||(e=l(e),f=e.length),r="number"!=typeof r||n&&o(t,r,n)?0:0>r?c(f+r,0):r||0,"string"==typeof e||!s(e)&&p(e)?f>=r&&e.indexOf(t,r)>-1:!!f&&i(e,t,r)>-1}var i=e(442),a=e(476),s=e(497),o=e(485),u=e(487),p=e(506),l=e(517),c=Math.max;t.exports=n},{442:442,476:476,485:485,487:487,497:497,506:506,517:517}],414:[function(e,t,r){function n(e,t,r){var n=o(e)?i:s;return t=a(t,r,3),n(e,t)}var i=e(422),a=e(429),s=e(446),o=e(497);t.exports=n},{422:422,429:429,446:446,497:497}],415:[function(e,t,r){var n=e(424),i=e(434),a=e(471),s=a(n,i);t.exports=s},{424:424,434:434,471:471}],416:[function(e,t,r){function n(e,t,r){var n=o(e)?i:s;return r&&u(e,t,r)&&(t=void 0),("function"!=typeof t||void 0!==r)&&(t=a(t,r,3)),n(e,t)}var i=e(425),a=e(429),s=e(455),o=e(497),u=e(485);t.exports=n},{425:425,429:429,455:455,485:485,497:497}],417:[function(e,t,r){function n(e,t,r){if(null==e)return[];r&&u(e,t,r)&&(t=void 0);var n=-1;t=i(t,r,3);var p=a(e,function(e,r,i){return{criteria:t(e,r,i),index:++n,value:e}});return s(p,o)}var i=e(429),a=e(446),s=e(456),o=e(464),u=e(485);t.exports=n},{429:429,446:446,456:456,464:464,485:485}],418:[function(e,t,r){function n(e,t){if("function"!=typeof e)throw new TypeError(i);return t=a(void 0===t?e.length-1:+t||0,0),function(){for(var r=arguments,n=-1,i=a(r.length-t,0),s=Array(i);++n<i;)s[n]=r[t+n];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,r[0],s);case 2:return e.call(this,r[0],r[1],s)}var o=Array(t+1);for(n=-1;++n<t;)o[n]=r[n];return o[t]=s,e.apply(this,o)}}var i="Expected a function",a=Math.max;t.exports=n},{}],419:[function(e,t,r){(function(r){function n(e){var t=e?e.length:0;for(this.data={hash:o(null),set:new s};t--;)this.push(e[t])}var i=e(463),a=e(478),s=a(r,"Set"),o=a(Object,"create");n.prototype.push=i,t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{463:463,478:478}],420:[function(e,t,r){function n(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}t.exports=n},{}],421:[function(e,t,r){function n(e,t){for(var r=-1,n=e.length;++r<n&&t(e[r],r,e)!==!1;);return e}t.exports=n},{}],422:[function(e,t,r){function n(e,t){for(var r=-1,n=e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}t.exports=n},{}],423:[function(e,t,r){function n(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}t.exports=n},{}],424:[function(e,t,r){function n(e,t,r,n){ var i=e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}t.exports=n},{}],425:[function(e,t,r){function n(e,t){for(var r=-1,n=e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}t.exports=n},{}],426:[function(e,t,r){function n(e,t){return void 0===e?t:e}t.exports=n},{}],427:[function(e,t,r){function n(e,t,r){for(var n=-1,a=i(t),s=a.length;++n<s;){var o=a[n],u=e[o],p=r(u,t[o],o,e,t);(p===p?p===u:u!==u)&&(void 0!==u||o in e)||(e[o]=p)}return e}var i=e(513);t.exports=n},{513:513}],428:[function(e,t,r){function n(e,t){return null==t?e:i(t,a(t),e)}var i=e(432),a=e(513);t.exports=n},{432:432,513:513}],429:[function(e,t,r){function n(e,t,r){var n=typeof e;return"function"==n?void 0===t?e:s(e,t,r):null==e?o:"object"==n?i(e):void 0===t?u(e):a(e,t)}var i=e(447),a=e(448),s=e(460),o=e(520),u=e(521);t.exports=n},{447:447,448:448,460:460,520:520,521:521}],430:[function(e,t,r){function n(e,t,r,h,m,y,g){var b;if(r&&(b=m?r(e,h,m):r(e)),void 0!==b)return b;if(!f(e))return e;var E=c(e);if(E){if(b=u(e),!t)return i(e,b)}else{var S=N.call(e),A=S==v;if(S!=x&&S!=d&&(!A||m))return j[S]?p(e,S,t):m?e:{};if(b=l(A?{}:e),!t)return s(b,e)}y||(y=[]),g||(g=[]);for(var D=y.length;D--;)if(y[D]==e)return g[D];return y.push(e),g.push(b),(E?a:o)(e,function(i,a){b[a]=n(i,t,r,a,e,y,g)}),b}var i=e(420),a=e(421),s=e(428),o=e(438),u=e(480),p=e(481),l=e(482),c=e(497),f=e(503),d="[object Arguments]",h="[object Array]",m="[object Boolean]",y="[object Date]",g="[object Error]",v="[object Function]",b="[object Map]",E="[object Number]",x="[object Object]",S="[object RegExp]",A="[object Set]",D="[object String]",C="[object WeakMap]",w="[object ArrayBuffer]",I="[object Float32Array]",_="[object Float64Array]",F="[object Int8Array]",k="[object Int16Array]",P="[object Int32Array]",B="[object Uint8Array]",T="[object Uint8ClampedArray]",M="[object Uint16Array]",O="[object Uint32Array]",j={};j[d]=j[h]=j[w]=j[m]=j[y]=j[I]=j[_]=j[F]=j[k]=j[P]=j[E]=j[x]=j[S]=j[D]=j[B]=j[T]=j[M]=j[O]=!0,j[g]=j[v]=j[b]=j[A]=j[C]=!1;var L=Object.prototype,N=L.toString;t.exports=n},{420:420,421:421,428:428,438:438,480:480,481:481,482:482,497:497,503:503}],431:[function(e,t,r){function n(e,t){if(e!==t){var r=null===e,n=void 0===e,i=e===e,a=null===t,s=void 0===t,o=t===t;if(e>t&&!a||!i||r&&!s&&o||n&&o)return 1;if(t>e&&!r||!o||a&&!n&&i||s&&i)return-1}return 0}t.exports=n},{}],432:[function(e,t,r){function n(e,t,r){r||(r={});for(var n=-1,i=t.length;++n<i;){var a=t[n];r[a]=e[a]}return r}t.exports=n},{}],433:[function(e,t,r){var n=e(438),i=e(466),a=i(n);t.exports=a},{438:438,466:466}],434:[function(e,t,r){var n=e(439),i=e(466),a=i(n,!0);t.exports=a},{439:439,466:466}],435:[function(e,t,r){function n(e,t,r,p){p||(p=[]);for(var l=-1,c=e.length;++l<c;){var f=e[l];u(f)&&o(f)&&(r||s(f)||a(f))?t?n(f,t,r,p):i(p,f):r||(p[p.length]=f)}return p}var i=e(423),a=e(496),s=e(497),o=e(483),u=e(488);t.exports=n},{423:423,483:483,488:488,496:496,497:497}],436:[function(e,t,r){var n=e(467),i=n();t.exports=i},{467:467}],437:[function(e,t,r){function n(e,t){return i(e,t,a)}var i=e(436),a=e(514);t.exports=n},{436:436,514:514}],438:[function(e,t,r){function n(e,t){return i(e,t,a)}var i=e(436),a=e(513);t.exports=n},{436:436,513:513}],439:[function(e,t,r){function n(e,t){return i(e,t,a)}var i=e(440),a=e(513);t.exports=n},{440:440,513:513}],440:[function(e,t,r){var n=e(467),i=n(!0);t.exports=i},{467:467}],441:[function(e,t,r){function n(e,t,r){if(null!=e){void 0!==r&&r in i(e)&&(t=[r]);for(var n=0,a=t.length;null!=e&&a>n;)e=e[t[n++]];return n&&n==a?e:void 0}}var i=e(492);t.exports=n},{492:492}],442:[function(e,t,r){function n(e,t,r){if(t!==t)return i(e,r);for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var i=e(479);t.exports=n},{479:479}],443:[function(e,t,r){function n(e,t,r,o,u,p){return e===t?!0:null==e||null==t||!a(e)&&!s(t)?e!==e&&t!==t:i(e,t,n,r,o,u,p)}var i=e(444),a=e(503),s=e(488);t.exports=n},{444:444,488:488,503:503}],444:[function(e,t,r){function n(e,t,r,n,f,m,y){var g=o(e),v=o(t),b=l,E=l;g||(b=h.call(e),b==p?b=c:b!=c&&(g=u(e))),v||(E=h.call(t),E==p?E=c:E!=c&&(v=u(t)));var x=b==c,S=E==c,A=b==E;if(A&&!g&&!x)return a(e,t,b);if(!f){var D=x&&d.call(e,"__wrapped__"),C=S&&d.call(t,"__wrapped__");if(D||C)return r(D?e.value():e,C?t.value():t,n,f,m,y)}if(!A)return!1;m||(m=[]),y||(y=[]);for(var w=m.length;w--;)if(m[w]==e)return y[w]==t;m.push(e),y.push(t);var I=(g?i:s)(e,t,r,n,f,m,y);return m.pop(),y.pop(),I}var i=e(472),a=e(473),s=e(474),o=e(497),u=e(507),p="[object Arguments]",l="[object Array]",c="[object Object]",f=Object.prototype,d=f.hasOwnProperty,h=f.toString;t.exports=n},{472:472,473:473,474:474,497:497,507:507}],445:[function(e,t,r){function n(e,t,r){var n=t.length,s=n,o=!r;if(null==e)return!s;for(e=a(e);n--;){var u=t[n];if(o&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++n<s;){u=t[n];var p=u[0],l=e[p],c=u[1];if(o&&u[2]){if(void 0===l&&!(p in e))return!1}else{var f=r?r(l,c,p):void 0;if(!(void 0===f?i(c,l,r,!0):f))return!1}}return!0}var i=e(443),a=e(492);t.exports=n},{443:443,492:492}],446:[function(e,t,r){function n(e,t){var r=-1,n=a(e)?Array(e.length):[];return i(e,function(e,i,a){n[++r]=t(e,i,a)}),n}var i=e(433),a=e(483);t.exports=n},{433:433,483:483}],447:[function(e,t,r){function n(e){var t=a(e);if(1==t.length&&t[0][2]){var r=t[0][0],n=t[0][1];return function(e){return null==e?!1:e[r]===n&&(void 0!==n||r in s(e))}}return function(e){return i(e,t)}}var i=e(445),a=e(477),s=e(492);t.exports=n},{445:445,477:477,492:492}],448:[function(e,t,r){function n(e,t){var r=o(e),n=u(e)&&p(t),d=e+"";return e=f(e),function(o){if(null==o)return!1;var u=d;if(o=c(o),(r||!n)&&!(u in o)){if(o=1==e.length?o:i(o,s(e,0,-1)),null==o)return!1;u=l(e),o=c(o)}return o[u]===t?void 0!==t||u in o:a(t,o[u],void 0,!0)}}var i=e(441),a=e(443),s=e(454),o=e(497),u=e(486),p=e(489),l=e(407),c=e(492),f=e(493);t.exports=n},{407:407,441:441,443:443,454:454,486:486,489:489,492:492,493:493,497:497}],449:[function(e,t,r){function n(e,t,r,f,d){if(!u(e))return e;var h=o(t)&&(s(t)||l(t)),m=h?void 0:c(t);return i(m||t,function(i,s){if(m&&(s=i,i=t[s]),p(i))f||(f=[]),d||(d=[]),a(e,t,s,n,r,f,d);else{var o=e[s],u=r?r(o,i,s,e,t):void 0,l=void 0===u;l&&(u=i),void 0===u&&(!h||s in e)||!l&&(u===u?u===o:o!==o)||(e[s]=u)}}),e}var i=e(421),a=e(450),s=e(497),o=e(483),u=e(503),p=e(488),l=e(507),c=e(513);t.exports=n},{421:421,450:450,483:483,488:488,497:497,503:503,507:507,513:513}],450:[function(e,t,r){function n(e,t,r,n,c,f,d){for(var h=f.length,m=t[r];h--;)if(f[h]==m)return void(e[r]=d[h]);var y=e[r],g=c?c(y,m,r,e,t):void 0,v=void 0===g;v&&(g=m,o(m)&&(s(m)||p(m))?g=s(y)?y:o(y)?i(y):[]:u(m)||a(m)?g=a(y)?l(y):u(y)?y:{}:v=!1),f.push(m),d.push(g),v?e[r]=n(g,m,c,f,d):(g===g?g!==y:y===y)&&(e[r]=g)}var i=e(420),a=e(496),s=e(497),o=e(483),u=e(504),p=e(507),l=e(508);t.exports=n},{420:420,483:483,496:496,497:497,504:504,507:507,508:508}],451:[function(e,t,r){function n(e){return function(t){return null==t?void 0:t[e]}}t.exports=n},{}],452:[function(e,t,r){function n(e){var t=e+"";return e=a(e),function(r){return i(r,e,t)}}var i=e(441),a=e(493);t.exports=n},{441:441,493:493}],453:[function(e,t,r){function n(e,t,r,n,i){return i(e,function(e,i,a){r=n?(n=!1,e):t(r,e,i,a)}),r}t.exports=n},{}],454:[function(e,t,r){function n(e,t,r){var n=-1,i=e.length;t=null==t?0:+t||0,0>t&&(t=-t>i?0:i+t),r=void 0===r||r>i?i:+r||0,0>r&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}t.exports=n},{}],455:[function(e,t,r){function n(e,t){var r;return i(e,function(e,n,i){return r=t(e,n,i),!r}),!!r}var i=e(433);t.exports=n},{433:433}],456:[function(e,t,r){function n(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}t.exports=n},{}],457:[function(e,t,r){function n(e){return null==e?"":e+""}t.exports=n},{}],458:[function(e,t,r){function n(e,t){var r=-1,n=i,u=e.length,p=!0,l=p&&u>=o,c=l?s():null,f=[];c?(n=a,p=!1):(l=!1,c=t?[]:f);e:for(;++r<u;){var d=e[r],h=t?t(d,r,e):d;if(p&&d===d){for(var m=c.length;m--;)if(c[m]===h)continue e;t&&c.push(h),f.push(d)}else n(c,h,0)<0&&((t||l)&&c.push(h),f.push(d))}return f}var i=e(442),a=e(462),s=e(468),o=200;t.exports=n},{442:442,462:462,468:468}],459:[function(e,t,r){function n(e,t){for(var r=-1,n=t.length,i=Array(n);++r<n;)i[r]=e[t[r]];return i}t.exports=n},{}],460:[function(e,t,r){function n(e,t,r){if("function"!=typeof e)return i;if(void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,n,i){return e.call(t,r,n,i)};case 4:return function(r,n,i,a){return e.call(t,r,n,i,a)};case 5:return function(r,n,i,a,s){return e.call(t,r,n,i,a,s)}}return function(){return e.apply(t,arguments)}}var i=e(520);t.exports=n},{520:520}],461:[function(e,t,r){(function(e){function r(e){var t=new n(e.byteLength),r=new i(t);return r.set(new i(e)),t}var n=e.ArrayBuffer,i=e.Uint8Array;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],462:[function(e,t,r){function n(e,t){var r=e.data,n="string"==typeof t||i(t)?r.set.has(t):r.hash[t];return n?0:-1}var i=e(503);t.exports=n},{503:503}],463:[function(e,t,r){function n(e){var t=this.data;"string"==typeof e||i(e)?t.set.add(e):t.hash[e]=!0}var i=e(503);t.exports=n},{503:503}],464:[function(e,t,r){function n(e,t){return i(e.criteria,t.criteria)||e.index-t.index}var i=e(431);t.exports=n},{431:431}],465:[function(e,t,r){function n(e){return s(function(t,r){var n=-1,s=null==t?0:r.length,o=s>2?r[s-2]:void 0,u=s>2?r[2]:void 0,p=s>1?r[s-1]:void 0;for("function"==typeof o?(o=i(o,p,5),s-=2):(o="function"==typeof p?p:void 0,s-=o?1:0),u&&a(r[0],r[1],u)&&(o=3>s?void 0:o,s=1);++n<s;){var l=r[n];l&&e(t,l,o)}return t})}var i=e(460),a=e(485),s=e(418);t.exports=n},{418:418,460:460,485:485}],466:[function(e,t,r){function n(e,t){return function(r,n){var o=r?i(r):0;if(!a(o))return e(r,n);for(var u=t?o:-1,p=s(r);(t?u--:++u<o)&&n(p[u],u,p)!==!1;);return r}}var i=e(476),a=e(487),s=e(492);t.exports=n},{476:476,487:487,492:492}],467:[function(e,t,r){function n(e){return function(t,r,n){for(var a=i(t),s=n(t),o=s.length,u=e?o:-1;e?u--:++u<o;){var p=s[u];if(r(a[p],p,a)===!1)break}return t}}var i=e(492);t.exports=n},{492:492}],468:[function(e,t,r){(function(r){function n(e){return o&&s?new i(e):null}var i=e(419),a=e(478),s=a(r,"Set"),o=a(Object,"create");t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{419:419,478:478}],469:[function(e,t,r){function n(e,t){return i(function(r){var n=r[0];return null==n?n:(r.push(t),e.apply(void 0,r))})}var i=e(418);t.exports=n},{418:418}],470:[function(e,t,r){function n(e,t){return function(r,n,s){return"function"==typeof n&&void 0===s&&a(r)?e(r,n):t(r,i(n,s,3))}}var i=e(460),a=e(497);t.exports=n},{460:460,497:497}],471:[function(e,t,r){function n(e,t){return function(r,n,o,u){var p=arguments.length<3;return"function"==typeof n&&void 0===u&&s(r)?e(r,n,o,p):a(r,i(n,u,4),o,p,t)}}var i=e(429),a=e(453),s=e(497);t.exports=n},{429:429,453:453,497:497}],472:[function(e,t,r){function n(e,t,r,n,a,s,o){var u=-1,p=e.length,l=t.length;if(p!=l&&!(a&&l>p))return!1;for(;++u<p;){var c=e[u],f=t[u],d=n?n(a?f:c,a?c:f,u):void 0;if(void 0!==d){if(d)continue;return!1}if(a){if(!i(t,function(e){return c===e||r(c,e,n,a,s,o)}))return!1}else if(c!==f&&!r(c,f,n,a,s,o))return!1}return!0}var i=e(425);t.exports=n},{425:425}],473:[function(e,t,r){function n(e,t,r){switch(r){case i:case a:return+e==+t;case s:return e.name==t.name&&e.message==t.message;case o:return e!=+e?t!=+t:e==+t;case u:case p:return e==t+""}return!1}var i="[object Boolean]",a="[object Date]",s="[object Error]",o="[object Number]",u="[object RegExp]",p="[object String]";t.exports=n},{}],474:[function(e,t,r){function n(e,t,r,n,a,o,u){var p=i(e),l=p.length,c=i(t),f=c.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var h=p[d];if(!(a?h in t:s.call(t,h)))return!1}for(var m=a;++d<l;){h=p[d];var y=e[h],g=t[h],v=n?n(a?g:y,a?y:g,h):void 0;if(!(void 0===v?r(y,g,n,a,o,u):v))return!1;m||(m="constructor"==h)}if(!m){var b=e.constructor,E=t.constructor;if(b!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof E&&E instanceof E))return!1}return!0}var i=e(513),a=Object.prototype,s=a.hasOwnProperty;t.exports=n},{513:513}],475:[function(e,t,r){function n(e,t,r){return t?e=i[e]:r&&(e=a[e]),"\\"+e}var i={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"},a={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=n},{}],476:[function(e,t,r){var n=e(451),i=n("length");t.exports=i},{451:451}],477:[function(e,t,r){function n(e){for(var t=a(e),r=t.length;r--;)t[r][2]=i(t[r][1]);return t}var i=e(489),a=e(516);t.exports=n},{489:489,516:516}],478:[function(e,t,r){function n(e,t){var r=null==e?void 0:e[t];return i(r)?r:void 0}var i=e(501);t.exports=n},{501:501}],479:[function(e,t,r){function n(e,t,r){for(var n=e.length,i=t+(r?0:-1);r?i--:++i<n;){var a=e[i];if(a!==a)return i}return-1}t.exports=n},{}],480:[function(e,t,r){function n(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&a.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var i=Object.prototype,a=i.hasOwnProperty;t.exports=n},{}],481:[function(e,t,r){function n(e,t,r){var n=e.constructor;switch(t){case l:return i(e);case a:case s:return new n(+e);case c:case f:case d:case h:case m:case y:case g:case v:case b:var x=e.buffer;return new n(r?i(x):x,e.byteOffset,e.length);case o:case p:return new n(e);case u:var S=new n(e.source,E.exec(e));S.lastIndex=e.lastIndex}return S}var i=e(461),a="[object Boolean]",s="[object Date]",o="[object Number]",u="[object RegExp]",p="[object String]",l="[object ArrayBuffer]",c="[object Float32Array]",f="[object Float64Array]",d="[object Int8Array]",h="[object Int16Array]",m="[object Int32Array]",y="[object Uint8Array]",g="[object Uint8ClampedArray]",v="[object Uint16Array]",b="[object Uint32Array]",E=/\w*$/;t.exports=n},{461:461}],482:[function(e,t,r){function n(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=n},{}],483:[function(e,t,r){function n(e){return null!=e&&a(i(e))}var i=e(476),a=e(487);t.exports=n},{476:476,487:487}],484:[function(e,t,r){function n(e,t){return e="number"==typeof e||i.test(e)?+e:-1,t=null==t?a:t,e>-1&&e%1==0&&t>e}var i=/^\d+$/,a=9007199254740991;t.exports=n},{}],485:[function(e,t,r){function n(e,t,r){if(!s(r))return!1;var n=typeof t;if("number"==n?i(r)&&a(t,r.length):"string"==n&&t in r){var o=r[t];return e===e?e===o:o!==o}return!1}var i=e(483),a=e(484),s=e(503);t.exports=n},{483:483,484:484,503:503}],486:[function(e,t,r){function n(e,t){var r=typeof e;if("string"==r&&o.test(e)||"number"==r)return!0;if(i(e))return!1;var n=!s.test(e);return n||null!=t&&e in a(t)}var i=e(497),a=e(492),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=n},{492:492,497:497}],487:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&i>=e}var i=9007199254740991;t.exports=n},{}],488:[function(e,t,r){function n(e){return!!e&&"object"==typeof e}t.exports=n},{}],489:[function(e,t,r){function n(e){return e===e&&!i(e)}var i=e(503);t.exports=n},{503:503}],490:[function(e,t,r){function n(e){for(var t=u(e),r=t.length,n=r&&e.length,p=!!n&&o(n)&&(a(e)||i(e)),c=-1,f=[];++c<r;){var d=t[c];(p&&s(d,n)||l.call(e,d))&&f.push(d)}return f}var i=e(496),a=e(497),s=e(484),o=e(487),u=e(514),p=Object.prototype,l=p.hasOwnProperty;t.exports=n},{484:484,487:487,496:496,497:497,514:514}],491:[function(e,t,r){function n(e,t){for(var r,n=-1,i=e.length,a=-1,s=[];++n<i;){var o=e[n],u=t?t(o,n,e):o;n&&r===u||(r=u,s[++a]=o)}return s}t.exports=n},{}],492:[function(e,t,r){function n(e){return i(e)?e:Object(e)}var i=e(503);t.exports=n},{503:503}],493:[function(e,t,r){function n(e){if(a(e))return e;var t=[];return i(e).replace(s,function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)}),t}var i=e(457),a=e(497),s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,o=/\\(\\)?/g;t.exports=n},{457:457,497:497}],494:[function(e,t,r){function n(e,t,r,n){return t&&"boolean"!=typeof t&&s(e,t,r)?t=!1:"function"==typeof t&&(n=r,r=t,t=!1),"function"==typeof r?i(e,t,a(r,n,3)):i(e,t)}var i=e(430),a=e(460),s=e(485);t.exports=n},{430:430,460:460,485:485}],495:[function(e,t,r){function n(e,t,r){return"function"==typeof t?i(e,!0,a(t,r,3)):i(e,!0)}var i=e(430),a=e(460);t.exports=n},{430:430,460:460}],496:[function(e,t,r){function n(e){return a(e)&&i(e)&&o.call(e,"callee")&&!u.call(e,"callee")}var i=e(483),a=e(488),s=Object.prototype,o=s.hasOwnProperty,u=s.propertyIsEnumerable;t.exports=n},{483:483,488:488}],497:[function(e,t,r){var n=e(478),i=e(487),a=e(488),s="[object Array]",o=Object.prototype,u=o.toString,p=n(Array,"isArray"),l=p||function(e){return a(e)&&i(e.length)&&u.call(e)==s};t.exports=l},{478:478,487:487,488:488}],498:[function(e,t,r){function n(e){return e===!0||e===!1||i(e)&&o.call(e)==a}var i=e(488),a="[object Boolean]",s=Object.prototype,o=s.toString;t.exports=n},{488:488}],499:[function(e,t,r){function n(e){return null==e?!0:s(e)&&(a(e)||p(e)||i(e)||u(e)&&o(e.splice))?!e.length:!l(e).length}var i=e(496),a=e(497),s=e(483),o=e(500),u=e(488),p=e(506),l=e(513);t.exports=n},{483:483,488:488,496:496,497:497,500:500,506:506,513:513}],500:[function(e,t,r){function n(e){return i(e)&&o.call(e)==a}var i=e(503),a="[object Function]",s=Object.prototype,o=s.toString;t.exports=n},{503:503}],501:[function(e,t,r){function n(e){return null==e?!1:i(e)?l.test(u.call(e)):a(e)&&s.test(e)}var i=e(500),a=e(488),s=/^\[object .+?Constructor\]$/,o=Object.prototype,u=Function.prototype.toString,p=o.hasOwnProperty,l=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},{488:488,500:500}],502:[function(e,t,r){function n(e){return"number"==typeof e||i(e)&&o.call(e)==a}var i=e(488),a="[object Number]",s=Object.prototype,o=s.toString;t.exports=n},{488:488}],503:[function(e,t,r){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=n},{}],504:[function(e,t,r){function n(e){var t;if(!s(e)||l.call(e)!=o||a(e)||!p.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var r;return i(e,function(e,t){r=t}),void 0===r||p.call(e,r)}var i=e(437),a=e(496),s=e(488),o="[object Object]",u=Object.prototype,p=u.hasOwnProperty,l=u.toString;t.exports=n},{437:437,488:488,496:496}],505:[function(e,t,r){function n(e){return i(e)&&o.call(e)==a}var i=e(503),a="[object RegExp]",s=Object.prototype,o=s.toString;t.exports=n},{503:503}],506:[function(e,t,r){function n(e){return"string"==typeof e||i(e)&&o.call(e)==a}var i=e(488),a="[object String]",s=Object.prototype,o=s.toString;t.exports=n},{488:488}],507:[function(e,t,r){function n(e){return a(e)&&i(e.length)&&!!F[P.call(e)]}var i=e(487),a=e(488),s="[object Arguments]",o="[object Array]",u="[object Boolean]",p="[object Date]",l="[object Error]",c="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object RegExp]",y="[object Set]",g="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",E="[object Float32Array]",x="[object Float64Array]",S="[object Int8Array]",A="[object Int16Array]",D="[object Int32Array]",C="[object Uint8Array]",w="[object Uint8ClampedArray]",I="[object Uint16Array]",_="[object Uint32Array]",F={};F[E]=F[x]=F[S]=F[A]=F[D]=F[C]=F[w]=F[I]=F[_]=!0,F[s]=F[o]=F[b]=F[u]=F[p]=F[l]=F[c]=F[f]=F[d]=F[h]=F[m]=F[y]=F[g]=F[v]=!1;var k=Object.prototype,P=k.toString;t.exports=n},{487:487,488:488}],508:[function(e,t,r){function n(e){return i(e,a(e))}var i=e(432),a=e(514);t.exports=n},{432:432,514:514}],509:[function(e,t,r){var n=e(427),i=e(428),a=e(465),s=a(function(e,t,r){return r?n(e,t,r):i(e,t)});t.exports=s},{427:427,428:428,465:465}],510:[function(e,t,r){var n=e(509),i=e(426),a=e(469),s=a(n,i);t.exports=s},{426:426,469:469,509:509}],511:[function(e,t,r){t.exports=e(509)},{509:509}],512:[function(e,t,r){function n(e,t){if(null==e)return!1;var r=h.call(e,t);if(!r&&!p(t)){if(t=f(t),e=1==t.length?e:i(e,a(t,0,-1)),null==e)return!1;t=c(t),r=h.call(e,t)}return r||l(e.length)&&u(t,e.length)&&(o(e)||s(e))}var i=e(441),a=e(454),s=e(496),o=e(497),u=e(484),p=e(486),l=e(487),c=e(407),f=e(493),d=Object.prototype,h=d.hasOwnProperty;t.exports=n},{407:407,441:441,454:454,484:484,486:486,487:487,493:493,496:496,497:497}],513:[function(e,t,r){var n=e(478),i=e(483),a=e(503),s=e(490),o=n(Object,"keys"),u=o?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&i(e)?s(e):a(e)?o(e):[]}:s;t.exports=u},{478:478,483:483,490:490,503:503}],514:[function(e,t,r){function n(e){if(null==e)return[];u(e)||(e=Object(e));var t=e.length;t=t&&o(t)&&(a(e)||i(e))&&t||0;for(var r=e.constructor,n=-1,p="function"==typeof r&&r.prototype===e,c=Array(t),f=t>0;++n<t;)c[n]=n+"";for(var d in e)f&&s(d,t)||"constructor"==d&&(p||!l.call(e,d))||c.push(d);return c}var i=e(496),a=e(497),s=e(484),o=e(487),u=e(503),p=Object.prototype,l=p.hasOwnProperty;t.exports=n},{484:484,487:487,496:496,497:497,503:503}],515:[function(e,t,r){var n=e(449),i=e(465),a=i(n);t.exports=a},{449:449,465:465}],516:[function(e,t,r){function n(e){e=a(e);for(var t=-1,r=i(e),n=r.length,s=Array(n);++t<n;){var o=r[t];s[t]=[o,e[o]]}return s}var i=e(513),a=e(492);t.exports=n},{492:492,513:513}],517:[function(e,t,r){function n(e){return i(e,a(e))}var i=e(459),a=e(513);t.exports=n},{459:459,513:513}],518:[function(e,t,r){function n(e){return e=i(e),e&&o.test(e)?e.replace(s,a):e||"(?:)"}var i=e(457),a=e(475),s=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,o=RegExp(s.source);t.exports=n},{457:457,475:475}],519:[function(e,t,r){function n(e,t,r){return e=i(e),r=null==r?0:a(0>r?0:+r||0,e.length),e.lastIndexOf(t,r)==r}var i=e(457),a=Math.min;t.exports=n},{457:457}],520:[function(e,t,r){function n(e){return e}t.exports=n},{}],521:[function(e,t,r){function n(e){return s(e)?i(e):a(e)}var i=e(451),a=e(452),s=e(486);t.exports=n},{451:451,452:452,486:486}],522:[function(e,t,r){function n(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function i(e,t){return t=t||{},function(r,n,i){return s(r,e,t)}}function a(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function s(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),r.nocomment||"#"!==t.charAt(0)?""===t.trim()?""===e:new o(t,r).match(e):!1}function o(e,t){if(!(this instanceof o))return new o(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==y.sep&&(e=e.split(y.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function u(){if(!this._made){var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(C)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r}}function p(){var e=this.pattern,t=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,a=e.length;a>i&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}}function l(e,t){if(t||(t=this instanceof o?this.options:{}),e="undefined"==typeof e?this.pattern:e,"undefined"==typeof e)throw new Error("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:b(e)}function c(e,t){function r(){if(a){switch(a){case"*":o+=x,u=!0;break;case"?":o+=E,u=!0;break;default:o+="\\"+a}g.debug("clearStateChar %j %j",a,o),a=!1}}var n=this.options;if(!n.noglobstar&&"**"===e)return v;if(""===e)return"";for(var i,a,s,o="",u=!!n.nocase,p=!1,l=[],c=[],f=!1,d=-1,m=-1,y="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this,b=0,S=e.length;S>b&&(s=e.charAt(b));b++)if(this.debug("%s %s %s %j",e,b,o,s),p&&D[s])o+="\\"+s,p=!1;else switch(s){case"/":return!1;case"\\":r(),p=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,b,o,s),f){this.debug(" in class"),"!"===s&&b===m+1&&(s="^"),o+=s;continue}g.debug("call clearStateChar %j",a),r(),a=s,n.noext&&r();continue;case"(":if(f){o+="(";continue}if(!a){o+="\\(";continue}i=a,l.push({type:i,start:b-1,reStart:o.length}),o+="!"===a?"(?:(?!(?:":"(?:",this.debug("plType %j %j",a,o),a=!1;continue;case")":if(f||!l.length){o+="\\)";continue}r(),u=!0,o+=")";var A=l.pop();switch(i=A.type){case"!":c.push(A),o+=")[^/]*?)",A.reEnd=o.length;break;case"?":case"+":case"*":o+=i;break;case"@":}continue;case"|":if(f||!l.length||p){o+="\\|",p=!1;continue}r(),o+="|";continue;case"[":if(r(),f){o+="\\"+s;continue}f=!0,m=b,d=o.length,o+=s;continue;case"]":if(b===m+1||!f){o+="\\"+s,p=!1;continue}if(f){var C=e.substring(m+1,b);try{RegExp("["+C+"]")}catch(I){var _=this.parse(C,w);o=o.substr(0,d)+"\\["+_[0]+"\\]",u=u||_[1],f=!1;continue}}u=!0,f=!1,o+=s;continue;default:r(),p?p=!1:!D[s]||"^"===s&&f||(o+="\\"),o+=s}for(f&&(C=e.substr(m+1),_=this.parse(C,w),o=o.substr(0,d)+"\\["+_[0],u=u||_[1]),A=l.pop();A;A=l.pop()){var F=o.slice(A.reStart+3);F=F.replace(/((?:\\{2})*)(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",F,F);var k="*"===A.type?x:"?"===A.type?E:"\\"+A.type;u=!0,o=o.slice(0,A.reStart)+k+"\\("+F}r(),p&&(o+="\\\\");var P=!1;switch(o.charAt(0)){case".":case"[":case"(":P=!0}for(var B=c.length-1;B>-1;B--){var T=c[B],M=o.slice(0,T.reStart),O=o.slice(T.reStart,T.reEnd-8),j=o.slice(T.reEnd-8,T.reEnd),L=o.slice(T.reEnd);j+=L;var N=M.split("(").length-1,R=L;for(b=0;N>b;b++)R=R.replace(/\)[+*?]?/,"");L=R;var V="";""===L&&t!==w&&(V="$");var U=M+O+L+V+j;o=U}if(""!==o&&u&&(o="(?=.)"+o),P&&(o=y+o),t===w)return[o,u];if(!u)return h(e);var q=n.nocase?"i":"",G=new RegExp("^"+o+"$",q);return G._glob=e,G._src=o,G}function f(){if(this.regexp||this.regexp===!1)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?x:t.dot?S:A,n=t.nocase?"i":"",i=e.map(function(e){return e.map(function(e){return e===v?r:"string"==typeof e?m(e):e._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(a){this.regexp=!1}return this.regexp}function d(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==y.sep&&(e=e.split(y.sep).join("/")),e=e.split(C),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,a;for(a=e.length-1;a>=0&&!(i=e[a]);a--);for(a=0;a<n.length;a++){var s=n[a],o=e;r.matchBase&&1===s.length&&(o=[i]);var u=this.matchOne(o,s,t);if(u)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}function h(e){return e.replace(/\\(.)/g,"$1")}function m(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}t.exports=s,s.Minimatch=o;var y={sep:"/"};try{y=e(9)}catch(g){}var v=s.GLOBSTAR=o.GLOBSTAR={},b=e(523),E="[^/]",x=E+"*?",S="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",A="(?:(?!(?:\\/|^)\\.).)*?",D=n("().*{}+?[]^$\\!"),C=/\/+/;s.filter=i,s.defaults=function(e){if(!e||!Object.keys(e).length)return s;var t=s,r=function(r,n,i){return t.minimatch(r,n,a(e,i))};return r.Minimatch=function(r,n){return new t.Minimatch(r,a(e,n))},r},o.defaults=function(e){return e&&Object.keys(e).length?s.defaults(e).Minimatch:o},o.prototype.debug=function(){},o.prototype.make=u,o.prototype.parseNegate=p,s.braceExpand=function(e,t){return l(e,t)},o.prototype.braceExpand=l,o.prototype.parse=c;var w={};s.makeRe=function(e,t){return new o(e,t||{}).makeRe()},o.prototype.makeRe=f,s.match=function(e,t,r){r=r||{};var n=new o(t,r);return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},o.prototype.match=d,o.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{"this":this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,a=0,s=e.length,o=t.length;s>i&&o>a;i++,a++){this.debug("matchOne loop");var u=t[a],p=e[i];if(this.debug(t,u,p),u===!1)return!1;if(u===v){this.debug("GLOBSTAR",[t,u,p]);var l=i,c=a+1;if(c===o){for(this.debug("** at the end");s>i;i++)if("."===e[i]||".."===e[i]||!n.dot&&"."===e[i].charAt(0))return!1;return!0}for(;s>l;){var f=e[l];if(this.debug("\nglobstar while",e,l,t,c,f),this.matchOne(e.slice(l),t.slice(c),r))return this.debug("globstar found match!",l,s,f),!0;if("."===f||".."===f||!n.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,l,t,c);break}this.debug("globstar swallow a segment, and continue"),l++}return r&&(this.debug("\n>>> no match, partial?",e,l,t,c),l===s)?!0:!1}var d;if("string"==typeof u?(d=n.nocase?p.toLowerCase()===u.toLowerCase():p===u,this.debug("string match",u,p,d)):(d=p.match(u),this.debug("pattern match",u,p,d)),!d)return!1}if(i===s&&a===o)return!0;if(i===s)return r;if(a===o){var h=i===s-1&&""===e[i];return h}throw new Error("wtf?")}},{523:523,9:9}],523:[function(e,t,r){function n(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function i(e){return e.split("\\\\").join(m).split("\\{").join(y).split("\\}").join(g).split("\\,").join(v).split("\\.").join(b)}function a(e){return e.split(m).join("\\").split(y).join("{").split(g).join("}").split(v).join(",").split(b).join(".")}function s(e){if(!e)return[""];var t=[],r=h("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,a=r.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var u=s(a);return a.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),t.push.apply(t,o),t}function o(e){return e?f(i(e),!0).map(a):[]}function u(e){return"{"+e+"}"}function p(e){return/^-?0\d/.test(e)}function l(e,t){return t>=e}function c(e,t){return e>=t}function f(e,t){var r=[],i=h("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=a||o,y=/^(.*,)+(.+)?$/.test(i.body);if(!m&&!y)return i.post.match(/,.*}/)?(e=i.pre+"{"+i.body+g+i.post,f(e)):[e];var v;if(m)v=i.body.split(/\.\./);else if(v=s(i.body),1===v.length&&(v=f(v[0],!1).map(u),1===v.length)){var b=i.post.length?f(i.post,!1):[""];return b.map(function(e){return i.pre+v[0]+e})}var E,x=i.pre,b=i.post.length?f(i.post,!1):[""];if(m){var S=n(v[0]),A=n(v[1]),D=Math.max(v[0].length,v[1].length),C=3==v.length?Math.abs(n(v[2])):1,w=l,I=S>A;I&&(C*=-1,w=c);var _=v.some(p);E=[];for(var F=S;w(F,A);F+=C){var k;if(o)k=String.fromCharCode(F),"\\"===k&&(k="");else if(k=String(F),_){var P=D-k.length;if(P>0){var B=new Array(P+1).join("0");k=0>F?"-"+B+k.slice(1):B+k}}E.push(k)}}else E=d(v,function(e){return f(e,!1)});for(var T=0;T<E.length;T++)for(var M=0;M<b.length;M++){var O=x+E[T]+b[M];(!t||m||O)&&r.push(O)}return r}var d=e(525),h=e(524);t.exports=o;var m="\x00SLASH"+Math.random()+"\x00",y="\x00OPEN"+Math.random()+"\x00",g="\x00CLOSE"+Math.random()+"\x00",v="\x00COMMA"+Math.random()+"\x00",b="\x00PERIOD"+Math.random()+"\x00"},{524:524,525:525}],524:[function(e,t,r){function n(e,t,r){for(var i=0,a={},s=!1,o=0;o<r.length;o++)if(e==r.substr(o,e.length))"start"in a||(a.start=o),i++;else if(t==r.substr(o,t.length)&&"start"in a&&(s=!0,i--,!i))return a.end=o,a.pre=r.substr(0,a.start),a.body=a.end-a.start>1?r.substring(a.start+e.length,a.end):"",a.post=r.slice(a.end+t.length),a;if(i&&s){var u=a.start+e.length;return a=n(e,t,r.substr(u)),a&&(a.start+=u,a.end+=u,a.pre=r.slice(0,u)+a.pre),a}}t.exports=n},{}],525:[function(e,t,r){t.exports=function(e,t){for(var r=[],i=0;i<e.length;i++){var a=t(e[i],i);n(a)?r.push.apply(r,a):r.push(a); }return r};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],526:[function(e,t,r){"use strict";var n=e(1);t.exports=function(e,t){var r="function"==typeof n.access?n.access:n.stat;r(e,function(e){t(null,!e)})},t.exports.sync=function(e){var t="function"==typeof n.accessSync?n.accessSync:n.statSync;try{return t(e),!0}catch(r){return!1}}},{1:1}],527:[function(e,t,r){(function(e){"use strict";function r(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=t.exec(e),n=r[1]||"",i=!!n&&":"!==n.charAt(1);return!!r[2]||i}t.exports="win32"===e.platform?n:r,t.exports.posix=r,t.exports.win32=n}).call(this,e(10))},{10:10}],528:[function(e,t,r){"use strict";function n(e,t,r){if(c)try{c.call(l,e,t,{value:r})}catch(n){e[t]=r}else e[t]=r}function i(e){return e&&(n(e,"call",e.call),n(e,"apply",e.apply)),e}function a(e){return f?f.call(l,e):(y.prototype=e||null,new y)}function s(){do var e=o(m.call(h.call(g(),36),2));while(d.call(v,e));return v[e]=e}function o(e){var t={};return t[e]=!0,Object.keys(t)[0]}function u(e){return a(null)}function p(e){function t(t){function r(r,n){return r===o?n?a=null:a||(a=e(t)):void 0}var a;n(t,i,r)}function r(e){return d.call(e,i)||t(e),e[i](o)}var i=s(),o=a(null);return e=e||u,r.forget=function(e){d.call(e,i)&&e[i](o,!0)},r}var l=Object,c=Object.defineProperty,f=Object.create;i(c),i(f);var d=i(Object.prototype.hasOwnProperty),h=i(Number.prototype.toString),m=i(String.prototype.slice),y=function(){},g=Math.random,v=a(null);n(r,"makeUniqueKey",s);var b=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var t=b(e),r=0,n=0,i=t.length;i>r;++r)d.call(v,t[r])||(r>n&&(t[n]=t[r]),++n);return t.length=n,t},n(r,"makeAccessor",p)},{}],529:[function(e,t,r){function n(e){u.ok(this instanceof n),c.Identifier.assert(e),this.nextTempId=0,Object.defineProperties(this,{contextId:{value:e},listing:{value:[]},marked:{value:[!0]},finalLoc:{value:i()},tryEntries:{value:[]}}),Object.defineProperties(this,{leapManager:{value:new f.LeapManager(this)}})}function i(){return l.literal(-1)}function a(e){return c.BreakStatement.check(e)||c.ContinueStatement.check(e)||c.ReturnStatement.check(e)||c.ThrowStatement.check(e)}function s(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+JSON.stringify(e))}function o(e){var t=e.type;return"normal"===t?!y.call(e,"target"):"break"===t||"continue"===t?!y.call(e,"value")&&c.Literal.check(e.target):"return"===t||"throw"===t?y.call(e,"value")&&!y.call(e,"target"):!1}var u=e(2),p=e(560).types,l=(p.builtInTypes.array,p.builders),c=p.namedTypes,f=e(531),d=e(532),h=e(533),m=h.runtimeProperty,y=Object.prototype.hasOwnProperty,g=n.prototype;r.Emitter=n,g.mark=function(e){c.Literal.assert(e);var t=this.listing.length;return-1===e.value?e.value=t:u.strictEqual(e.value,t),this.marked[t]=!0,e},g.emit=function(e){c.Expression.check(e)&&(e=l.expressionStatement(e)),c.Statement.assert(e),this.listing.push(e)},g.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},g.assign=function(e,t){return l.expressionStatement(l.assignmentExpression("=",e,t))},g.contextProperty=function(e,t){return l.memberExpression(this.contextId,t?l.literal(e):l.identifier(e),!!t)},g.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},g.setReturnValue=function(e){c.Expression.assert(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},g.clearPendingException=function(e,t){c.Literal.assert(e);var r=l.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,r):this.emit(r)},g.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(l.breakStatement())},g.jumpIf=function(e,t){c.Expression.assert(e),c.Literal.assert(t),this.emit(l.ifStatement(e,l.blockStatement([this.assign(this.contextProperty("next"),t),l.breakStatement()])))},g.jumpIfNot=function(e,t){c.Expression.assert(e),c.Literal.assert(t);var r;r=c.UnaryExpression.check(e)&&"!"===e.operator?e.argument:l.unaryExpression("!",e),this.emit(l.ifStatement(r,l.blockStatement([this.assign(this.contextProperty("next"),t),l.breakStatement()])))},g.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)},g.getContextFunction=function(e){return l.functionExpression(e||null,[this.contextId],l.blockStatement([this.getDispatchLoop()]),!1,!1)},g.getDispatchLoop=function(){var e,t=this,r=[],n=!1;return t.listing.forEach(function(i,s){t.marked.hasOwnProperty(s)&&(r.push(l.switchCase(l.literal(s),e=[])),n=!1),n||(e.push(i),a(i)&&(n=!0))}),this.finalLoc.value=this.listing.length,r.push(l.switchCase(this.finalLoc,[]),l.switchCase(l.literal("end"),[l.returnStatement(l.callExpression(this.contextProperty("stop"),[]))])),l.whileStatement(l.literal(1),l.switchStatement(l.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),r))},g.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return l.arrayExpression(this.tryEntries.map(function(t){var r=t.firstLoc.value;u.ok(r>=e,"try entries out of order"),e=r;var n=t.catchEntry,i=t.finallyEntry,a=[t.firstLoc,n?n.firstLoc:null];return i&&(a[2]=i.firstLoc,a[3]=i.afterLoc),l.arrayExpression(a)}))},g.explode=function(e,t){u.ok(e instanceof p.NodePath);var r=e.value,n=this;if(c.Node.assert(r),c.Statement.check(r))return n.explodeStatement(e);if(c.Expression.check(r))return n.explodeExpression(e,t);if(c.Declaration.check(r))throw s(r);switch(r.type){case"Program":return e.get("body").map(n.explodeStatement,n);case"VariableDeclarator":throw s(r);case"Property":case"SwitchCase":case"CatchClause":throw new Error(r.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(r.type))}},g.explodeStatement=function(e,t){u.ok(e instanceof p.NodePath);var r=e.value,n=this;if(c.Statement.assert(r),t?c.Identifier.assert(t):t=null,c.BlockStatement.check(r))return e.get("body").each(n.explodeStatement,n);if(!d.containsLeap(r))return void n.emit(r);switch(r.type){case"ExpressionStatement":n.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":var a=i();n.leapManager.withEntry(new f.LabeledEntry(a,r.label),function(){n.explodeStatement(e.get("body"),r.label)}),n.mark(a);break;case"WhileStatement":var s=i(),a=i();n.mark(s),n.jumpIfNot(n.explodeExpression(e.get("test")),a),n.leapManager.withEntry(new f.LoopEntry(a,s,t),function(){n.explodeStatement(e.get("body"))}),n.jump(s),n.mark(a);break;case"DoWhileStatement":var o=i(),y=i(),a=i();n.mark(o),n.leapManager.withEntry(new f.LoopEntry(a,y,t),function(){n.explode(e.get("body"))}),n.mark(y),n.jumpIf(n.explodeExpression(e.get("test")),o),n.mark(a);break;case"ForStatement":var g=i(),v=i(),a=i();r.init&&n.explode(e.get("init"),!0),n.mark(g),r.test&&n.jumpIfNot(n.explodeExpression(e.get("test")),a),n.leapManager.withEntry(new f.LoopEntry(a,v,t),function(){n.explodeStatement(e.get("body"))}),n.mark(v),r.update&&n.explode(e.get("update"),!0),n.jump(g),n.mark(a);break;case"ForInStatement":var g=i(),a=i(),b=n.makeTempVar();n.emitAssign(b,l.callExpression(m("keys"),[n.explodeExpression(e.get("right"))])),n.mark(g);var E=n.makeTempVar();n.jumpIf(l.memberExpression(l.assignmentExpression("=",E,l.callExpression(b,[])),l.identifier("done"),!1),a),n.emitAssign(r.left,l.memberExpression(E,l.identifier("value"),!1)),n.leapManager.withEntry(new f.LoopEntry(a,g,t),function(){n.explodeStatement(e.get("body"))}),n.jump(g),n.mark(a);break;case"BreakStatement":n.emitAbruptCompletion({type:"break",target:n.leapManager.getBreakLoc(r.label)});break;case"ContinueStatement":n.emitAbruptCompletion({type:"continue",target:n.leapManager.getContinueLoc(r.label)});break;case"SwitchStatement":for(var x=n.emitAssign(n.makeTempVar(),n.explodeExpression(e.get("discriminant"))),a=i(),S=i(),A=S,D=[],C=r.cases||[],w=C.length-1;w>=0;--w){var I=C[w];c.SwitchCase.assert(I),I.test?A=l.conditionalExpression(l.binaryExpression("===",x,I.test),D[w]=i(),A):D[w]=S}n.jump(n.explodeExpression(new p.NodePath(A,e,"discriminant"))),n.leapManager.withEntry(new f.SwitchEntry(a),function(){e.get("cases").each(function(e){var t=(e.value,e.name);n.mark(D[t]),e.get("consequent").each(n.explodeStatement,n)})}),n.mark(a),-1===S.value&&(n.mark(S),u.strictEqual(a.value,S.value));break;case"IfStatement":var _=r.alternate&&i(),a=i();n.jumpIfNot(n.explodeExpression(e.get("test")),_||a),n.explodeStatement(e.get("consequent")),_&&(n.jump(a),n.mark(_),n.explodeStatement(e.get("alternate"))),n.mark(a);break;case"ReturnStatement":n.emitAbruptCompletion({type:"return",value:n.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var a=i(),F=r.handler;!F&&r.handlers&&(F=r.handlers[0]||null);var k=F&&i(),P=k&&new f.CatchEntry(k,F.param),B=r.finalizer&&i(),T=B&&new f.FinallyEntry(B,a),M=new f.TryEntry(n.getUnmarkedCurrentLoc(),P,T);n.tryEntries.push(M),n.updateContextPrevLoc(M.firstLoc),n.leapManager.withEntry(M,function(){if(n.explodeStatement(e.get("block")),k){B?n.jump(B):n.jump(a),n.updateContextPrevLoc(n.mark(k));var t=e.get("handler","body"),r=n.makeTempVar();n.clearPendingException(M.firstLoc,r);var i=t.scope,s=F.param.name;c.CatchClause.assert(i.node),u.strictEqual(i.lookup(s),i),p.visit(t,{visitIdentifier:function(e){return h.isReference(e,s)&&e.scope.lookup(s)===i?r:void this.traverse(e)},visitFunction:function(e){return e.scope.declares(s)?!1:void this.traverse(e)}}),n.leapManager.withEntry(P,function(){n.explodeStatement(t)})}B&&(n.updateContextPrevLoc(n.mark(B)),n.leapManager.withEntry(T,function(){n.explodeStatement(e.get("finalizer"))}),n.emit(l.returnStatement(l.callExpression(n.contextProperty("finish"),[T.firstLoc]))))}),n.mark(a);break;case"ThrowStatement":n.emit(l.throwStatement(n.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(r.type))}},g.emitAbruptCompletion=function(e){o(e)||u.ok(!1,"invalid completion record: "+JSON.stringify(e)),u.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=[l.literal(e.type)];"break"===e.type||"continue"===e.type?(c.Literal.assert(e.target),t[1]=e.target):("return"===e.type||"throw"===e.type)&&e.value&&(c.Expression.assert(e.value),t[1]=e.value),this.emit(l.returnStatement(l.callExpression(this.contextProperty("abrupt"),t)))},g.getUnmarkedCurrentLoc=function(){return l.literal(this.listing.length)},g.updateContextPrevLoc=function(e){e?(c.Literal.assert(e),-1===e.value?e.value=this.listing.length:u.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},g.explodeExpression=function(e,t){function r(e){return c.Expression.assert(e),t?void o.emit(e):e}function n(e,t,r){u.ok(t instanceof p.NodePath),u.ok(!r||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var n=o.explodeExpression(t,r);return r||(e||f&&!c.Literal.check(n))&&(n=o.emitAssign(e||o.makeTempVar(),n)),n}u.ok(e instanceof p.NodePath);var a=e.value;if(!a)return a;c.Expression.assert(a);var s,o=this;if(!d.containsLeap(a))return r(a);var f=d.containsLeap.onlyChildren(a);switch(a.type){case"MemberExpression":return r(l.memberExpression(o.explodeExpression(e.get("object")),a.computed?n(null,e.get("property")):a.property,a.computed));case"CallExpression":var h,m=e.get("callee"),y=e.get("arguments"),g=[],v=!1;if(y.each(function(e){v=v||d.containsLeap(e.value)}),c.MemberExpression.check(m.value))if(v){var b=n(o.makeTempVar(),m.get("object")),E=m.value.computed?n(null,m.get("property")):m.value.property;g.unshift(b),h=l.memberExpression(l.memberExpression(b,E,m.value.computed),l.identifier("call"),!1)}else h=o.explodeExpression(m);else h=o.explodeExpression(m),c.MemberExpression.check(h)&&(h=l.sequenceExpression([l.literal(0),h]));return y.each(function(e){g.push(n(null,e))}),r(l.callExpression(h,g));case"NewExpression":return r(l.newExpression(n(null,e.get("callee")),e.get("arguments").map(function(e){return n(null,e)})));case"ObjectExpression":return r(l.objectExpression(e.get("properties").map(function(e){return l.property(e.value.kind,e.value.key,n(null,e.get("value")))})));case"ArrayExpression":return r(l.arrayExpression(e.get("elements").map(function(e){return n(null,e)})));case"SequenceExpression":var x=a.expressions.length-1;return e.get("expressions").each(function(e){e.name===x?s=o.explodeExpression(e,t):o.explodeExpression(e,!0)}),s;case"LogicalExpression":var S=i();t||(s=o.makeTempVar());var A=n(s,e.get("left"));return"&&"===a.operator?o.jumpIfNot(A,S):(u.strictEqual(a.operator,"||"),o.jumpIf(A,S)),n(s,e.get("right"),t),o.mark(S),s;case"ConditionalExpression":var D=i(),S=i(),C=o.explodeExpression(e.get("test"));return o.jumpIfNot(C,D),t||(s=o.makeTempVar()),n(s,e.get("consequent"),t),o.jump(S),o.mark(D),n(s,e.get("alternate"),t),o.mark(S),s;case"UnaryExpression":return r(l.unaryExpression(a.operator,o.explodeExpression(e.get("argument")),!!a.prefix));case"BinaryExpression":return r(l.binaryExpression(a.operator,n(null,e.get("left")),n(null,e.get("right"))));case"AssignmentExpression":return r(l.assignmentExpression(a.operator,o.explodeExpression(e.get("left")),o.explodeExpression(e.get("right"))));case"UpdateExpression":return r(l.updateExpression(a.operator,o.explodeExpression(e.get("argument")),a.prefix));case"YieldExpression":var S=i(),w=a.argument&&o.explodeExpression(e.get("argument"));if(w&&a.delegate){var s=o.makeTempVar();return o.emit(l.returnStatement(l.callExpression(o.contextProperty("delegateYield"),[w,l.literal(s.property.name),S]))),o.mark(S),s}return o.emitAssign(o.contextProperty("next"),S),o.emit(l.returnStatement(w||null)),o.mark(S),o.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(a.type))}}},{2:2,531:531,532:532,533:533,560:560}],530:[function(e,t,r){var n=e(2),i=e(560).types,a=i.namedTypes,s=i.builders,o=Object.prototype.hasOwnProperty;r.hoist=function(e){function t(e,t){a.VariableDeclaration.assert(e);var n=[];return e.declarations.forEach(function(e){r[e.id.name]=e.id,e.init?n.push(s.assignmentExpression("=",e.id,e.init)):t&&n.push(e.id)}),0===n.length?null:1===n.length?n[0]:s.sequenceExpression(n)}n.ok(e instanceof i.NodePath),a.Function.assert(e.value);var r={};i.visit(e.get("body"),{visitVariableDeclaration:function(e){var r=t(e.value,!1);return null!==r?s.expressionStatement(r):(e.replace(),!1)},visitForStatement:function(e){var r=e.value.init;a.VariableDeclaration.check(r)&&e.get("init").replace(t(r,!1)),this.traverse(e)},visitForInStatement:function(e){var r=e.value.left;a.VariableDeclaration.check(r)&&e.get("left").replace(t(r,!0)),this.traverse(e)},visitFunctionDeclaration:function(e){var t=e.value;r[t.id.name]=t.id;var n=(e.parent.node,s.expressionStatement(s.assignmentExpression("=",t.id,s.functionExpression(t.id,t.params,t.body,t.generator,t.expression))));return a.BlockStatement.check(e.parent.node)?(e.parent.get("body").unshift(n),e.replace()):e.replace(n),!1},visitFunctionExpression:function(e){return!1}});var u={};e.get("params").each(function(e){var t=e.value;a.Identifier.check(t)&&(u[t.name]=t)});var p=[];return Object.keys(r).forEach(function(e){o.call(u,e)||p.push(s.variableDeclarator(r[e],null))}),0===p.length?null:s.variableDeclaration("var",p)}},{2:2,560:560}],531:[function(e,t,r){function n(){f.ok(this instanceof n)}function i(e){n.call(this),h.Literal.assert(e),this.returnLoc=e}function a(e,t,r){n.call(this),h.Literal.assert(e),h.Literal.assert(t),r?h.Identifier.assert(r):r=null,this.breakLoc=e,this.continueLoc=t,this.label=r}function s(e){n.call(this),h.Literal.assert(e),this.breakLoc=e}function o(e,t,r){n.call(this),h.Literal.assert(e),t?f.ok(t instanceof u):t=null,r?f.ok(r instanceof p):r=null,f.ok(t||r),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=r}function u(e,t){n.call(this),h.Literal.assert(e),h.Identifier.assert(t),this.firstLoc=e,this.paramId=t}function p(e,t){n.call(this),h.Literal.assert(e),h.Literal.assert(t),this.firstLoc=e,this.afterLoc=t}function l(e,t){n.call(this),h.Literal.assert(e),h.Identifier.assert(t),this.breakLoc=e,this.label=t}function c(t){f.ok(this instanceof c);var r=e(529).Emitter;f.ok(t instanceof r),this.emitter=t,this.entryStack=[new i(t.finalLoc)]}var f=e(2),d=e(560).types,h=d.namedTypes,m=(d.builders,e(13).inherits);Object.prototype.hasOwnProperty;m(i,n),r.FunctionEntry=i,m(a,n),r.LoopEntry=a,m(s,n),r.SwitchEntry=s,m(o,n),r.TryEntry=o,m(u,n),r.CatchEntry=u,m(p,n),r.FinallyEntry=p,m(l,n),r.LabeledEntry=l;var y=c.prototype;r.LeapManager=c,y.withEntry=function(e,t){f.ok(e instanceof n),this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();f.strictEqual(r,e)}},y._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var n=this.entryStack[r],i=n[e];if(i)if(t){if(n.label&&n.label.name===t.name)return i}else if(!(n instanceof l))return i}return null},y.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},y.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},{13:13,2:2,529:529,560:560}],532:[function(e,t,r){function n(e,t){function r(e){function t(e){return r||(o.check(e)?e.some(t):u.Node.check(e)&&(i.strictEqual(r,!1),r=n(e))),r}u.Node.assert(e);var r=!1;return s.eachField(e,function(e,r){t(r)}),r}function n(n){u.Node.assert(n);var i=a(n);return p.call(i,e)?i[e]:p.call(l,n.type)?i[e]=!1:p.call(t,n.type)?i[e]=!0:i[e]=r(n)}return n.onlyChildren=r,n}var i=e(2),a=e(528).makeAccessor(),s=e(560).types,o=s.builtInTypes.array,u=s.namedTypes,p=Object.prototype.hasOwnProperty,l={FunctionExpression:!0},c={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},f={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var d in f)p.call(f,d)&&(c[d]=f[d]);r.hasSideEffects=n("hasSideEffects",c),r.containsLeap=n("containsLeap",f)},{2:2,528:528,560:560}],533:[function(e,t,r){var n=(e(2),e(560).types),i=n.namedTypes,a=n.builders,s=Object.prototype.hasOwnProperty;r.defaults=function(e){for(var t,r=arguments.length,n=1;r>n;++n)if(t=arguments[n])for(var i in t)s.call(t,i)&&!s.call(e,i)&&(e[i]=t[i]);return e},r.runtimeProperty=function(e){return a.memberExpression(a.identifier("regeneratorRuntime"),a.identifier(e),!1)},r.isReference=function(e,t){var r=e.value;if(!i.Identifier.check(r))return!1;if(t&&r.name!==t)return!1;var n=e.parent.value;switch(n.type){case"VariableDeclarator":return"init"===e.name;case"MemberExpression":return"object"===e.name||n.computed&&"property"===e.name;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return"id"===e.name?!1:"params"===e.parentPath.name&&n.params===e.parentPath.value&&n.params[e.name]===r?!1:!0;case"ClassDeclaration":case"ClassExpression":return"id"!==e.name;case"CatchClause":return"param"!==e.name;case"Property":case"MethodDefinition":return"key"!==e.name;case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"LabeledStatement":return!1;default:return!0}}},{2:2,560:560}],534:[function(e,t,r){function n(t){f.Program.assert(t);var r=e(535).runtime.path,n=p.readFileSync(r,"utf8"),i=l.parse(n,{sourceFileName:r}).program.body,a=t.body;a.unshift.apply(a,i)}function i(e){var t=e.value;if(f.Function.assert(t),t.generator&&f.FunctionDeclaration.check(t)){for(var r=e.parent;r&&!f.BlockStatement.check(r.value)&&!f.Program.check(r.value);)r=r.parent;if(!r)return t.id;var n=a(r),i=n.declarations[0].id,s=n.declarations[0].init.callee.object;f.ArrayExpression.assert(s);var o=s.elements.length;return s.elements.push(t.id),d.memberExpression(i,d.literal(o),!0)}return t.id||(t.id=e.scope.parent.declareTemporary("callee$"))}function a(e){u.ok(e instanceof m);var t=e.node;h.assert(t.body);var r=E(t);if(r.decl)return r.decl;r.decl=d.variableDeclaration("var",[d.variableDeclarator(e.scope.declareTemporary("marked"),d.callExpression(d.memberExpression(d.arrayExpression([]),d.identifier("map"),!1),[b("mark")]))]);for(var n=0;n<t.body.length&&s(e.get("body",n));++n);return e.get("body").insertAt(n,r.decl),r.decl}function s(e){var t=e.value;return f.Statement.assert(t),f.ExpressionStatement.check(t)&&f.Literal.check(t.expression)&&"use strict"===t.expression.value}function o(e,t){u.ok(e instanceof c.NodePath);var r=e.value,n=!1;return l.visit(e,{visitFunction:function(e){return e.value!==r?!1:void this.traverse(e)},visitIdentifier:function(e){return"arguments"===e.value.name&&v.isReference(e)?(e.replace(t),n=!0,!1):void this.traverse(e)}}),n}var u=e(2),p=e(1),l=e(560),c=l.types,f=c.namedTypes,d=c.builders,h=c.builtInTypes.array,m=(c.builtInTypes.object,c.NodePath),y=e(530).hoist,g=e(529).Emitter,v=e(533),b=v.runtimeProperty,E=e(528).makeAccessor();r.transform=function(e,t){t=t||{};var r=e instanceof m?e:new m(e);return x.visit(r,t),e=r.value,(t.includeRuntime===!0||"if used"===t.includeRuntime&&x.wasChangeReported())&&n(f.File.check(e)?e.program:e),t.madeChanges=x.wasChangeReported(),e};var x=c.PathVisitor.fromMethodsObject({reset:function(e,t){this.options=t},visitFunction:function(e){this.traverse(e);var t=e.value,r=t.async&&!this.options.disableAsync;if(t.generator||r){this.reportChanged(),t.expression&&(t.expression=!1,t.body=d.blockStatement([d.returnStatement(t.body)])),r&&S.visit(e.get("body"));var n=[],a=[],s=e.get("body","body");s.each(function(e){var t=e.value;t&&null!=t._blockHoist?n.push(t):a.push(t)}),n.length>0&&s.replace(a);var u=i(e);f.Identifier.assert(t.id);var p=d.identifier(t.id.name+"$"),l=e.scope.declareTemporary("context$"),c=e.scope.declareTemporary("args$"),h=y(e),m=o(e,c);m&&(h=h||d.variableDeclaration("var",[]),h.declarations.push(d.variableDeclarator(c,d.identifier("arguments"))));var v=new g(l);v.explode(e.get("body")),h&&h.declarations.length>0&&n.push(h);var E=[v.getContextFunction(p),t.generator?u:d.literal(null),d.thisExpression()],x=v.getTryLocsList();x&&E.push(x);var A=d.callExpression(b(r?"async":"wrap"),E);n.push(d.returnStatement(A)),t.body=d.blockStatement(n);var D=t.generator;return D&&(t.generator=!1),r&&(t.async=!1),D&&f.Expression.check(t)?d.callExpression(b("mark"),[t]):void 0}},visitForOfStatement:function(e){this.traverse(e);var t,r=e.value,n=e.scope.declareTemporary("t$"),i=d.variableDeclarator(n,d.callExpression(b("values"),[r.right])),a=e.scope.declareTemporary("t$"),s=d.variableDeclarator(a,null),o=r.left;f.VariableDeclaration.check(o)?(t=o.declarations[0].id,o.declarations.push(i,s)):(t=o,o=d.variableDeclaration("var",[i,s])),f.Identifier.assert(t);var u=d.expressionStatement(d.assignmentExpression("=",t,d.memberExpression(a,d.identifier("value"),!1)));return f.BlockStatement.check(r.body)?r.body.body.unshift(u):r.body=d.blockStatement([u,r.body]),d.forStatement(o,d.unaryExpression("!",d.memberExpression(d.assignmentExpression("=",a,d.callExpression(d.memberExpression(n,d.identifier("next"),!1),[])),d.identifier("done"),!1)),null,r.body)}}),S=c.PathVisitor.fromMethodsObject({visitFunction:function(e){return!1},visitAwaitExpression:function(e){var t=e.value.argument;return e.value.all&&(t=d.callExpression(d.memberExpression(d.identifier("Promise"),d.identifier("all"),!1),[t])),d.yieldExpression(d.callExpression(b("awrap"),[t]),!1)}})},{1:1,2:2,528:528,529:529,530:530,533:533,535:535,560:560}],535:[function(e,t,r){(function(r){function n(e,t){function r(e){i.push(e)}function n(){this.queue(a(i.join(""),t).code),this.queue(null)}var i=[];return h(r,n)}function i(){e(577)}function a(e,t){if(t=s(t),!b.test(e))return{code:(t.includeRuntime===!0?d.readFileSync(f.join(r,"runtime.js"),"utf-8")+"\n":"")+e};var n=o(t),i=g.parse(e,n),a=new v.NodePath(i),p=a.get("program");return u(e,t)&&l(p.node),m(p,t),g.print(a,n)}function s(t){return t=y.defaults(t||{},{includeRuntime:!1,supportBlockBinding:!0}),t.esprima||(t.esprima=e(1)),c.ok(/harmony/.test(t.esprima.version),"Bad esprima version: "+t.esprima.version),t}function o(e){function t(t){t in e&&(r[t]=e[t])}var r={range:!0};return t("esprima"),t("sourceFileName"),t("sourceMapName"),t("inputSourceMap"),t("sourceRoot"),r}function u(e,t){var r=!!t.supportBlockBinding;return r&&(E.test(e)||(r=!1)),r}function p(e,t){var r=o(s(t)),n=g.parse(e,r);return l(n.program),g.print(n,r).code}function l(t){v.namedTypes.Program.assert(t);var r=e(536)(t,{ast:!0,disallowUnknownReferences:!1,disallowDuplicated:!1,disallowVars:!1,loopClosures:"iife"});if(r.errors)throw new Error(r.errors.join("\n"));return t}var c=e(2),f=e(9),d=e(1),h=e(1),m=e(534).transform,y=e(533),g=e(560),v=g.types,b=/\bfunction\s*\*|\basync\b/,E=/\b(let|const)\s+/;t.exports=n,n.runtime=i,i.path=f.join(r,"runtime.js"),n.varify=p,n.types=v,n.compile=a,n.transform=m}).call(this,"/node_modules/regenerator")},{1:1,2:2,533:533,534:534,536:536,560:560,577:577,9:9}],536:[function(e,t,r){"use strict";function n(e){return D.someof(e,["const","let"])}function i(e){return D.someof(e,["var","const","let"])}function a(e){return"BlockStatement"===e.type&&D.noneof(e.$parent.type,["FunctionDeclaration","FunctionExpression"])}function s(e){return"ForStatement"===e.type&&e.init&&"VariableDeclaration"===e.init.type&&n(e.init.kind)}function o(e){return u(e)&&"VariableDeclaration"===e.left.type&&n(e.left.kind)}function u(e){return D.someof(e.type,["ForInStatement","ForOfStatement"])}function p(e){return D.someof(e.type,["FunctionDeclaration","FunctionExpression"])}function l(e){return D.someof(e.type,["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement"])}function c(e){var t=e.$parent;return e.$refToScope||"Identifier"===e.type&&!("VariableDeclarator"===t.type&&t.id===e)&&!("MemberExpression"===t.type&&t.computed===!1&&t.property===e)&&!("Property"===t.type&&t.key===e)&&!("LabeledStatement"===t.type&&t.label===e)&&!("CatchClause"===t.type&&t.param===e)&&!(p(t)&&t.id===e)&&!(p(t)&&D.someof(e,t.params))&&!0}function f(e){return c(e)&&("AssignmentExpression"===e.$parent.type&&e.$parent.left===e||"UpdateExpression"===e.$parent.type&&e.$parent.argument===e)}function d(e,t){if(A(!e.$scope),e.$parent=t,e.$scope=e.$parent?e.$parent.$scope:null,"Program"===e.type)e.$scope=new P({kind:"hoist",node:e,parent:null});else if(p(e))e.$scope=new P({kind:"hoist",node:e,parent:e.$parent.$scope}),e.id&&(A("Identifier"===e.id.type),"FunctionDeclaration"===e.type?e.$parent.$scope.add(e.id.name,"fun",e.id,null):"FunctionExpression"===e.type?e.$scope.add(e.id.name,"fun",e.id,null):A(!1)),e.params.forEach(function(t){e.$scope.add(t.name,"param",t,null)});else if("VariableDeclaration"===e.type)A(i(e.kind)),e.declarations.forEach(function(t){A("VariableDeclarator"===t.type);var r=t.id.name;M.disallowVars&&"var"===e.kind&&B(T(t),"var {0} is not allowed (use let or const)",r),e.$scope.add(r,e.kind,t.id,t.range[1])});else if(s(e)||o(e))e.$scope=new P({kind:"block",node:e,parent:e.$parent.$scope});else if(a(e))e.$scope=new P({kind:"block",node:e,parent:e.$parent.$scope});else if("CatchClause"===e.type){var r=e.param;e.$scope=new P({kind:"catch-block",node:e,parent:e.$parent.$scope}),e.$scope.add(r.name,"caught",r,null),e.$scope.closestHoistScope().markPropagates(r.name)}}function h(e,t,r){function n(e){for(var t in e){var r=e[t],n=r?"var":"const";i.hasOwn(t)&&i.remove(t),i.add(t,n,{loc:{start:{line:-1}}},-1)}}var i=new P({kind:"hoist",node:{},parent:null}),a={undefined:!1,Infinity:!1,console:!1};return n(a),n(j.reservedVars),n(j.ecmaIdentifiers),t&&t.forEach(function(e){j[e]?n(j[e]):B(-1,'environment "{0}" not found',e)}),r&&n(r),e.parent=i,i.children.push(e),i}function m(e,t,r){function n(e){if(c(e)){t.add(e.name);var r=e.$scope.lookup(e.name);if(i&&!r&&M.disallowUnknownReferences&&B(T(e),"reference to unknown global variable {0}",e.name),i&&r&&D.someof(r.getKind(e.name),["const","let"])){var n=r.getFromPos(e.name),a=e.range[0];A(D.finitenumber(n)),A(D.finitenumber(a)),n>a&&(e.$scope.hasFunctionScopeBetween(r)||B(T(e),"{0} is referenced before its declaration",e.name))}e.$refToScope=r}}var i=D.own(r,"analyze")?r.analyze:!0;F(e,{pre:n})}function y(e,t,r,i){function a(e){A(r.has(e));for(var t=0;;t++){var n=e+"$"+String(t);if(!r.has(n))return n}}function s(e){if("VariableDeclaration"===e.type&&n(e.kind)){var s=e.$scope.closestHoistScope(),o=e.$scope;i.push({start:e.range[0],end:e.range[0]+e.kind.length,str:"var"}),e.declarations.forEach(function(n){A("VariableDeclarator"===n.type);var u=n.id.name;t.declarator(e.kind);var p=o!==s&&(s.hasOwn(u)||s.doesPropagate(u)),l=p?a(u):u;o.remove(u),s.add(l,"var",n.id,n.range[1]),o.moves=o.moves||w(),o.moves.set(u,{name:l,scope:s}),r.add(l),l!==u&&(t.rename(u,l,T(n)),n.id.originalName=u,n.id.name=l,i.push({start:n.id.range[0],end:n.id.range[1],str:l}))}),e.kind="var"}}function o(e){if(e.$refToScope){var t=e.$refToScope.moves&&e.$refToScope.moves.get(e.name);if(t&&(e.$refToScope=t.scope,e.name!==t.name))if(e.originalName=e.name,e.name=t.name,e.alterop){for(var r=null,n=0;n<i.length;n++){var a=i[n];if(a.node===e){r=a;break}}A(r),r.str=t.name}else i.push({start:e.range[0],end:e.range[1],str:t.name})}}F(e,{pre:s}),F(e,{pre:o}),e.$scope.traverse({pre:function(e){delete e.moves}})}function g(e){function t(e,t){return k(function(r){return F(e,{pre:function(e){if(p(e))return!1;var n=!0,i="loop-variable {0} is captured by a loop-closure that can't be transformed due to use of {1} at line {2}";"BreakStatement"===e.type?B(T(t),i,t.name,"break",T(e)):"ContinueStatement"===e.type?B(T(t),i,t.name,"continue",T(e)):"ReturnStatement"===e.type?B(T(t),i,t.name,"return",T(e)):"YieldExpression"===e.type?B(T(t),i,t.name,"yield",T(e)):"Identifier"===e.type&&"arguments"===e.name?B(T(t),i,t.name,"arguments",T(e)):"VariableDeclaration"===e.type&&"var"===e.kind?B(T(t),i,t.name,"var",T(e)):n=!1,n&&r(!0)}}),!1})}function r(e){var r=null;if(c(e)&&e.$refToScope&&n(e.$refToScope.getKind(e.name))){for(var i=e.$refToScope.node;;){if(p(i))return;if(l(i)){r=i;break}if(i=i.$parent,!i)return}A(l(r));for(var a=e.$refToScope,s="iife"===M.loopClosures,o=e.$scope;o;o=o.parent){if(o===a)return;if(p(o.node)){if(!s){var u='loop-variable {0} is captured by a loop-closure. Tried "loopClosures": "iife" in defs-config.json?';return B(T(e),u,e.name)}if("ForStatement"===r.type&&a.node===r){var f=a.getNode(e.name);return B(T(f),"Not yet specced ES6 feature. {0} is declared in for-loop header and then captured in loop closure",f.name)}if(t(r.body,e))return;r.$iify=!0}}}}F(e,{pre:r})}function v(e,t,r){function n(e,r,n){var i={start:e,end:e,str:r};n&&(i.node=n),t.push(i)}F(e,{pre:function(e){if(e.$iify){var t="BlockStatement"===e.body.type,i=t?e.body.range[0]+1:e.body.range[0],a=t?e.body.range[1]-1:e.body.range[1],s=u(e)&&e.left.declarations[0].id.name,o=C("(function({0}){",s?s:""),p=C("}).call(this{0});",s?", "+s:""),l=r.parse(o+p),c=l.body[0],f=c.expression.callee.object.body;if(t){var d=e.body,h=d.body;d.body=[c],f.body=h}else{var m=e.body;e.body=c,f.body[0]=m}if(n(i,o),s){n(a,"}).call(this, ");var y=c.expression.arguments,g=y[1];g.alterop=!0,n(a,s,g),n(a,");")}else n(a,p)}}})}function b(e){F(e,{pre:function(e){if(f(e)){var t=e.$scope.lookup(e.name);t&&"const"===t.getKind(e.name)&&B(T(e),"can't assign to const variable {0}",e.name)}}})}function E(e,t){F(e,{pre:d});var r=h(e.$scope,M.environments,M.globals),n=I();return r.traverse({pre:function(e){n.addMany(e.decls.keys())}}),m(e,n,t),n}function x(e){F(e,{pre:function(e){for(var t in e)"$"===t[0]&&delete e[t]}})}function S(e,t){for(var r in t)M[r]=t[r];var n;if(D.object(e)){if(!M.ast)return{errors:["Can't produce string output when input is an AST. Did you forget to set options.ast = true?"]};n=e}else{if(!D.string(e))return{errors:["Input was neither an AST object nor a string."]};try{n=M.parse(e,{loc:!0,range:!0})}catch(i){return{errors:[C("line {0} column {1}: Error during input file parsing\n{2}\n{3}",i.lineNumber,i.column,e.split("\n")[i.lineNumber-1],C.repeat(" ",i.column-1)+"^")] }}}var a=n;B.reset();var s=E(a,{});g(a),b(a);var o=[];if(v(a,o,M),B.errors.length>=1)return{errors:B.errors};o.length>0&&(x(a),s=E(a,{analyze:!1})),A(0===B.errors.length);var u=new O;if(y(a,u,s,o),M.ast)return x(a),{stats:u,ast:a};var p=_(e,o);return{stats:u,src:p}}var A=e(2),D=e(547),C=e(546),w=e(548),I=e(549),_=e(542),F=e(544),k=e(545),P=e(540),B=e(537),T=B.getline,M=e(539),O=e(541),j=e(538);t.exports=S},{2:2,537:537,538:538,539:539,540:540,541:541,542:542,544:544,545:545,546:546,547:547,548:548,549:549}],537:[function(e,t,r){"use strict";function n(e,t){a(arguments.length>=2);var r=2===arguments.length?String(t):i.apply(i,Array.prototype.slice.call(arguments,1));n.errors.push(-1===e?r:i("line {0}: {1}",e,r))}var i=e(546),a=e(2);n.reset=function(){n.errors=[]},n.getline=function(e){return e&&e.loc&&e.loc.start?e.loc.start.line:-1},n.reset(),t.exports=n},{2:2,546:546}],538:[function(e,t,r){"use strict";r.reservedVars={arguments:!1,NaN:!1},r.ecmaIdentifiers={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,JSON:!1,Math:!1,Map:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,Set:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1,WeakMap:!1},r.browser={ArrayBuffer:!1,ArrayBufferView:!1,Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,DataView:!1,DOMParser:!1,defaultStatus:!1,document:!1,Element:!1,event:!1,FileReader:!1,Float32Array:!1,Float64Array:!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,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,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Image:!1,length:!1,localStorage:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!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,print:!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,top:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,WebSocket:!1,window:!1,Worker:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},r.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},r.worker={importScripts:!0,postMessage:!0,self:!0},r.nonstandard={escape:!1,unescape:!1},r.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},r.node={__filename:!1,__dirname:!1,Buffer:!1,DataView:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,setTimeout:!1,clearTimeout:!1,setInterval:!1,clearInterval:!1},r.phantom={phantom:!0,require:!0,WebPage:!0},r.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},r.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},r.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},r.jquery={$:!1,jQuery:!1},r.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},r.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},r.yui={YUI:!1,Y:!1,YUI_config:!1}},{}],539:[function(e,t,r){t.exports={disallowVars:!1,disallowDuplicated:!0,disallowUnknownReferences:!0,parse:e(1).parse}},{1:1}],540:[function(e,t,r){"use strict";function n(e){i(o.someof(e.kind,["hoist","block","catch-block"])),i(o.object(e.node)),i(null===e.parent||o.object(e.parent)),this.kind=e.kind,this.node=e.node,this.parent=e.parent,this.children=[],this.decls=a(),this.written=s(),this.propagates="hoist"===this.kind?s():null,this.parent&&this.parent.children.push(this)}var i=e(2),a=e(548),s=e(549),o=e(547),u=e(546),p=e(537),l=p.getline,c=e(539);n.prototype.print=function(e){e=e||0;var t=this,r=this.decls.keys().map(function(e){return u("{0} [{1}]",e,t.decls.get(e).kind)}).join(", "),n=this.propagates?this.propagates.items().join(", "):"";console.log(u("{0}{1}: {2}. propagates: {3}",u.repeat(" ",e),this.node.type,r,n)),this.children.forEach(function(t){t.print(e+2)})},n.prototype.add=function(e,t,r,n){function a(e){return o.someof(e,["const","let"])}i(o.someof(t,["fun","param","var","caught","const","let"]));var s=this;if(o.someof(t,["fun","param","var"]))for(;"hoist"!==s.kind;){if(s.decls.has(e)&&a(s.decls.get(e).kind))return p(l(r),"{0} is already declared",e);s=s.parent}if(s.decls.has(e)&&(c.disallowDuplicated||a(s.decls.get(e).kind)||a(t)))return p(l(r),"{0} is already declared",e);var u={kind:t,node:r};n&&(i(o.someof(t,["var","const","let"])),u.from=n),s.decls.set(e,u)},n.prototype.getKind=function(e){i(o.string(e));var t=this.decls.get(e);return t?t.kind:null},n.prototype.getNode=function(e){i(o.string(e));var t=this.decls.get(e);return t?t.node:null},n.prototype.getFromPos=function(e){i(o.string(e));var t=this.decls.get(e);return t?t.from:null},n.prototype.hasOwn=function(e){return this.decls.has(e)},n.prototype.remove=function(e){return this.decls.remove(e)},n.prototype.doesPropagate=function(e){return this.propagates.has(e)},n.prototype.markPropagates=function(e){this.propagates.add(e)},n.prototype.closestHoistScope=function(){for(var e=this;"hoist"!==e.kind;)e=e.parent;return e},n.prototype.hasFunctionScopeBetween=function(e){function t(e){return o.someof(e.type,["FunctionDeclaration","FunctionExpression"])}for(var r=this;r;r=r.parent){if(r===e)return!1;if(t(r.node))return!0}throw new Error("wasn't inner scope of outer")},n.prototype.lookup=function(e){for(var t=this;t;t=t.parent){if(t.decls.has(e))return t;"hoist"===t.kind&&t.propagates.add(e)}return null},n.prototype.markWrite=function(e){i(o.string(e)),this.written.add(e)},n.prototype.detectUnmodifiedLets=function(){function e(r){r!==t&&r.decls.keys().forEach(function(e){return"let"!==r.getKind(e)||r.written.has(e)?void 0:p(l(r.getNode(e)),"{0} is declared as let but never modified so could be const",e)}),r.children.forEach(function(t){e(t)})}var t=this;e(this)},n.prototype.traverse=function(e){function t(e){r&&r(e),e.children.forEach(function(e){t(e)}),n&&n(e)}e=e||{};var r=e.pre,n=e.post;t(this)},t.exports=n},{2:2,537:537,539:539,546:546,547:547,548:548,549:549}],541:[function(e,t,r){function n(){this.lets=0,this.consts=0,this.renames=[]}var i=e(546),a=e(547),s=e(2);n.prototype.declarator=function(e){s(a.someof(e,["const","let"])),"const"===e?this.consts++:this.lets++},n.prototype.rename=function(e,t,r){this.renames.push({oldName:e,newName:t,line:r})},n.prototype.toString=function(){var e=this.renames.map(function(e){return e}).sort(function(e,t){return e.line-t.line}),t=e.map(function(e){return i("\nline {0}: {1} => {2}",e.line,e.oldName,e.newName)}).join(""),r=this.consts+this.lets,n=0===r?"can't calculate const coverage (0 consts, 0 lets)":i("{0}% const coverage ({1} consts, {2} lets)",Math.floor(100*this.consts/r),this.consts,this.lets);return n+t+"\n"},t.exports=n},{2:2,546:546,547:547}],542:[function(e,t,r){function n(e,t){"use strict";var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};i("string"==typeof e),i(r(t));for(var n=a(t,function(e,t){return e.start-t.start}),s=[],o=0,u=0;u<n.length;u++){var p=n[u];i(o<=p.start),i(p.start<=p.end),s.push(e.slice(o,p.start)),s.push(p.str),o=p.end}return o<e.length&&s.push(e.slice(o)),s.join("")}var i=e(2),a=e(543);"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=n)},{2:2,543:543}],543:[function(e,t,r){!function(){function e(e,t){"function"!=typeof t&&(t=function(e,t){return String(e).localeCompare(t)});var r=e.length;if(1>=r)return e;for(var i=new Array(r),a=1;r>a;a*=2){n(e,t,a,i);var s=e;e=i,i=s}return e}var r=function(t,r){return e(t.slice(),r)};r.inplace=function(t,r){var i=e(t,r);return i!==t&&n(i,null,t.length,t),t};var n=function(e,t,r,n){var i,a,s,o,u,p=e.length,l=0,c=2*r;for(i=0;p>i;i+=c)for(a=i+r,s=a+r,a>p&&(a=p),s>p&&(s=p),o=i,u=a;;)if(a>o&&s>u)t(e[o],e[u])<=0?n[l++]=e[o++]:n[l++]=e[u++];else if(a>o)n[l++]=e[o++];else{if(!(s>u))break;n[l++]=e[u++]}};"undefined"!=typeof t?t.exports=r:window.stable=r}()},{}],544:[function(e,t,r){function n(e,t){"use strict";function r(e,t,s,o){if(e&&"string"==typeof e.type){var u=void 0;if(n&&(u=n(e,t,s,o)),u!==!1)for(var s in e)if(a?!a(s,e):"$"!==s[0]){var p=e[s];if(Array.isArray(p))for(var l=0;l<p.length;l++)r(p[l],e,s,l);else r(p,e,s)}i&&i(e,t,s,o)}}t=t||{};var n=t.pre,i=t.post,a=t.skipProperty;r(e,null)}"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=n)},{}],545:[function(e,t,r){var n=function(){"use strict";function e(e,t){this.val=e,this.brk=t}function t(){return function t(r){throw new e(r,t)}}function r(r){var n=t();try{return r(n)}catch(i){if(i instanceof e&&i.brk===n)return i.val;throw i}}return r}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=n)},{}],546:[function(e,t,r){var n=function(){"use strict";function e(e,t){var r=Array.prototype.slice.call(arguments,1);return e.replace(/\{(\d+)\}/g,function(e,t){return t in r?r[t]:e})}function t(e,t){return e.replace(/\{([_$a-zA-Z0-9][_$a-zA-Z0-9]*)\}/g,function(e,r){return r in t?t[r]:e})}function r(e,t){return new Array(t+1).join(e)}return e.fmt=e,e.obj=t,e.repeat=r,e}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=n)},{}],547:[function(e,t,r){var n=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=void 0;return{nan:function(e){return e!==e},"boolean":function(e){return"boolean"==typeof e},number:function(e){return"number"==typeof e},string:function(e){return"string"==typeof e},fn:function(e){return"function"==typeof e},object:function(e){return null!==e&&"object"==typeof e},primitive:function(e){var t=typeof e;return null===e||e===r||"boolean"===t||"number"===t||"string"===t},array:Array.isArray||function(e){return"[object Array]"===t.call(e)},finitenumber:function(e){return"number"==typeof e&&isFinite(e)},someof:function(e,t){return t.indexOf(e)>=0},noneof:function(e,t){return-1===t.indexOf(e)},own:function(t,r){return e.call(t,r)}}}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=n)},{}],548:[function(e,t,r){var n=function(){"use strict";function e(t){return this instanceof e?(this.obj=r(),this.hasProto=!1,this.proto=void 0,void(t&&this.setMany(t))):new e(t)}var t=Object.prototype.hasOwnProperty,r=function(){function e(e){for(var r in e)if(t.call(e,r))return!0;return!1}function r(e){return t.call(e,"__count__")||t.call(e,"__parent__")}var n=!1;if("function"==typeof Object.create&&(e(Object.create(null))||(n=!0)),n===!1&&e({}))throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues");var i=n?Object.create(null):{},a=!1;if(r(i)){if(i.__proto__=null,e(i)||r(i))throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues");a=!0}return function(){var e=n?Object.create(null):{};return a&&(e.__proto__=null),e}}();return e.prototype.has=function(e){if("string"!=typeof e)throw new Error("StringMap expected string key");return"__proto__"===e?this.hasProto:t.call(this.obj,e)},e.prototype.get=function(e){if("string"!=typeof e)throw new Error("StringMap expected string key");return"__proto__"===e?this.proto:t.call(this.obj,e)?this.obj[e]:void 0},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("StringMap expected string key");"__proto__"===e?(this.hasProto=!0,this.proto=t):this.obj[e]=t},e.prototype.remove=function(e){if("string"!=typeof e)throw new Error("StringMap expected string key");var t=this.has(e);return"__proto__"===e?(this.hasProto=!1,this.proto=void 0):delete this.obj[e],t},e.prototype["delete"]=e.prototype.remove,e.prototype.isEmpty=function(){for(var e in this.obj)if(t.call(this.obj,e))return!1;return!this.hasProto},e.prototype.size=function(){var e=0;for(var r in this.obj)t.call(this.obj,r)&&++e;return this.hasProto?e+1:e},e.prototype.keys=function(){var e=[];for(var r in this.obj)t.call(this.obj,r)&&e.push(r);return this.hasProto&&e.push("__proto__"),e},e.prototype.values=function(){var e=[];for(var r in this.obj)t.call(this.obj,r)&&e.push(this.obj[r]);return this.hasProto&&e.push(this.proto),e},e.prototype.items=function(){var e=[];for(var r in this.obj)t.call(this.obj,r)&&e.push([r,this.obj[r]]);return this.hasProto&&e.push(["__proto__",this.proto]),e},e.prototype.setMany=function(e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new Error("StringMap expected Object");for(var r in e)t.call(e,r)&&this.set(r,e[r]);return this},e.prototype.merge=function(e){for(var t=e.keys(),r=0;r<t.length;r++){var n=t[r];this.set(n,e.get(n))}return this},e.prototype.map=function(e){for(var t=this.keys(),r=0;r<t.length;r++){var n=t[r];t[r]=e(this.get(n),n)}return t},e.prototype.forEach=function(e){for(var t=this.keys(),r=0;r<t.length;r++){var n=t[r];e(this.get(n),n)}},e.prototype.clone=function(){var t=e();return t.merge(this)},e.prototype.toString=function(){var e=this;return"{"+this.keys().map(function(t){return JSON.stringify(t)+":"+JSON.stringify(e.get(t))}).join(",")+"}"},e}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=n)},{}],549:[function(e,t,r){var n=function(){"use strict";function e(t){return this instanceof e?(this.obj=r(),this.hasProto=!1,void(t&&this.addMany(t))):new e(t)}var t=Object.prototype.hasOwnProperty,r=function(){function e(e){for(var r in e)if(t.call(e,r))return!0;return!1}function r(e){return t.call(e,"__count__")||t.call(e,"__parent__")}var n=!1;if("function"==typeof Object.create&&(e(Object.create(null))||(n=!0)),n===!1&&e({}))throw new Error("StringSet environment error 0, please file a bug at https://github.com/olov/stringset/issues");var i=n?Object.create(null):{},a=!1;if(r(i)){if(i.__proto__=null,e(i)||r(i))throw new Error("StringSet environment error 1, please file a bug at https://github.com/olov/stringset/issues");a=!0}return function(){var e=n?Object.create(null):{};return a&&(e.__proto__=null),e}}();return e.prototype.has=function(e){if("string"!=typeof e)throw new Error("StringSet expected string item");return"__proto__"===e?this.hasProto:t.call(this.obj,e)},e.prototype.add=function(e){if("string"!=typeof e)throw new Error("StringSet expected string item");"__proto__"===e?this.hasProto=!0:this.obj[e]=!0},e.prototype.remove=function(e){if("string"!=typeof e)throw new Error("StringSet expected string item");var t=this.has(e);return"__proto__"===e?this.hasProto=!1:delete this.obj[e],t},e.prototype["delete"]=e.prototype.remove,e.prototype.isEmpty=function(){for(var e in this.obj)if(t.call(this.obj,e))return!1;return!this.hasProto},e.prototype.size=function(){var e=0;for(var r in this.obj)t.call(this.obj,r)&&++e;return this.hasProto?e+1:e},e.prototype.items=function(){var e=[];for(var r in this.obj)t.call(this.obj,r)&&e.push(r);return this.hasProto&&e.push("__proto__"),e},e.prototype.addMany=function(e){if(!Array.isArray(e))throw new Error("StringSet expected array");for(var t=0;t<e.length;t++)this.add(e[t]);return this},e.prototype.merge=function(e){return this.addMany(e.items()),this},e.prototype.clone=function(){var t=e();return t.merge(this)},e.prototype.toString=function(){return"{"+this.items().map(JSON.stringify).join(",")+"}"},e}();"undefined"!=typeof t&&"undefined"!=typeof t.exports&&(t.exports=n)},{}],550:[function(e,t,r){function n(e,t){if(e){if(E.fixFaultyLocations(e),t){if(h.Node.check(e)&&h.SourceLocation.check(e.loc)){for(var r=t.length-1;r>=0&&!(x(t[r].loc.end,e.loc.start)<=0);--r);return void t.splice(r+1,0,e)}}else if(e[S])return e[S];var i;if(m.check(e))i=Object.keys(e);else{if(!y.check(e))return;i=d.getFieldNames(e)}t||Object.defineProperty(e,S,{value:t=[],enumerable:!1});for(var r=0,a=i.length;a>r;++r)n(e[i[r]],t);return t}}function i(e,t){for(var r=n(e),a=0,s=r.length;s>a;){var o=a+s>>1,u=r[o];if(x(u.loc.start,t.loc.start)<=0&&x(t.loc.end,u.loc.end)<=0)return void i(t.enclosingNode=u,t);if(x(u.loc.end,t.loc.start)<=0){var p=u;a=o+1}else{if(!(x(t.loc.end,u.loc.start)<=0))throw new Error("Comment location overlaps with node location");var l=u;s=o}}p&&(t.precedingNode=p),l&&(t.followingNode=l)}function a(e,t){var r=e.length;if(0!==r){for(var n=e[0].precedingNode,i=e[0].followingNode,a=i.loc.start,s=r;s>0;--s){var u=e[s-1];f.strictEqual(u.precedingNode,n),f.strictEqual(u.followingNode,i);var l=t.sliceString(u.loc.end,a);if(/\S/.test(l))break;a=u.loc.start}for(;r>=s&&(u=e[s])&&"Line"===u.type&&u.loc.start.column>i.loc.start.column;)++s;e.forEach(function(e,t){s>t?p(n,e):o(i,e)}),e.length=0}}function s(e,t){var r=e.comments||(e.comments=[]);r.push(t)}function o(e,t){t.leading=!0,t.trailing=!1,s(e,t)}function u(e,t){t.leading=!1,t.trailing=!1,s(e,t)}function p(e,t){t.leading=!1,t.trailing=!0,s(e,t)}function l(e,t){var r=e.getValue();h.Comment.assert(r);var n=r.loc,i=n&&n.lines,a=[t(e)];if(r.trailing)a.push("\n");else if(i instanceof v){var s=i.slice(n.end,i.skipSpaces(n.end));1===s.length?a.push(s):a.push(new Array(s.length).join("\n"))}else a.push("\n");return b(a)}function c(e,t){var r=e.getValue(e);h.Comment.assert(r);var n=r.loc,i=n&&n.lines,a=[];if(i instanceof v){var s=i.skipSpaces(n.start,!0)||i.firstPos(),o=i.slice(s,n.start);1===o.length?a.push(o):a.push(new Array(o.length).join("\n"))}return a.push(t(e)),b(a)}var f=e(2),d=e(558),h=d.namedTypes,m=d.builtInTypes.array,y=d.builtInTypes.object,g=e(552),v=(g.fromString,g.Lines),b=g.concat,E=e(559),x=E.comparePos,S=e(528).makeUniqueKey();r.attach=function(e,t,r){if(m.check(e)){var n=[];e.forEach(function(e){e.loc.lines=r,i(t,e);var s=e.precedingNode,l=e.enclosingNode,c=e.followingNode;if(s&&c){var d=n.length;if(d>0){var h=n[d-1];f.strictEqual(h.precedingNode===e.precedingNode,h.followingNode===e.followingNode),h.followingNode!==e.followingNode&&a(n,r)}n.push(e)}else if(s)a(n,r),p(s,e);else if(c)a(n,r),o(c,e);else{if(!l)throw new Error("AST contains no nodes at all?");a(n,r),u(l,e)}}),a(n,r),e.forEach(function(e){delete e.precedingNode,delete e.enclosingNode,delete e.followingNode})}},r.printComments=function(e,t){var r=e.getValue(),n=t(e),i=h.Node.check(r)&&d.getFieldValue(r,"comments");if(!i||0===i.length)return n;var a=[],s=[n];return e.each(function(e){var r=e.getValue(),n=d.getFieldValue(r,"leading"),i=d.getFieldValue(r,"trailing");n||i&&"Block"!==r.type?a.push(l(e,t)):i&&(f.strictEqual(r.type,"Block"),s.push(c(e,t)))},"comments"),a.push.apply(a,s),b(a)}},{2:2,528:528,552:552,558:558,559:559}],551:[function(e,t,r){function n(e){o.ok(this instanceof n),this.stack=[e]}function i(e,t){for(var r=e.stack,n=r.length-1;n>=0;n-=2){var i=r[n];if(p.Node.check(i)&&--t<0)return i}return null}function a(e){return p.BinaryExpression.check(e)||p.LogicalExpression.check(e)}function s(e){return p.CallExpression.check(e)?!0:l.check(e)?e.some(s):p.Node.check(e)?u.someField(e,function(e,t){return s(t)}):!1}var o=e(2),u=e(558),p=u.namedTypes,l=(p.Node,u.builtInTypes.array),c=u.builtInTypes.number,f=n.prototype;t.exports=n,n.from=function(e){if(e instanceof n)return e.copy();if(e instanceof u.NodePath){for(var t,r=Object.create(n.prototype),i=[e.value];t=e.parentPath;e=t)i.push(e.name,t.value);return r.stack=i.reverse(),r}return new n(e)},f.copy=function h(){var h=Object.create(n.prototype);return h.stack=this.stack.slice(0),h},f.getName=function(){var e=this.stack,t=e.length;return t>1?e[t-2]:null},f.getValue=function(){var e=this.stack;return e[e.length-1]},f.getNode=function(e){return i(this,~~e)},f.getParentNode=function(e){return i(this,~~e+1)},f.getRootValue=function(){var e=this.stack;return e.length%2===0?e[1]:e[0]},f.call=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,a=1;i>a;++a){var s=arguments[a];n=n[s],t.push(s,n)}var o=e(this);return t.length=r,o},f.each=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,a=1;i>a;++a){var s=arguments[a];n=n[s],t.push(s,n)}for(var a=0;a<n.length;++a)a in n&&(t.push(a,n[a]),e(this),t.length-=2);t.length=r},f.map=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,a=1;i>a;++a){var s=arguments[a];n=n[s],t.push(s,n)}for(var o=new Array(n.length),a=0;a<n.length;++a)a in n&&(t.push(a,n[a]),o[a]=e(this,a),t.length-=2);return t.length=r,o},f.needsParens=function(e){var t=this.getParentNode();if(!t)return!1;var r=this.getName(),n=this.getNode();if(this.getValue()!==n)return!1;if(!p.Expression.check(n))return!1;if("Identifier"===n.type)return!1;if("ParenthesizedExpression"===t.type)return!1;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===t.type&&"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":switch(t.type){case"CallExpression":return"callee"===r&&t.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===r&&t.object===n;case"BinaryExpression":case"LogicalExpression":var i=t.operator,u=d[i],l=n.operator,f=d[l];if(u>f)return!0;if(u===f&&"right"===r)return o.strictEqual(t.right,n),!0;default:return!1}case"SequenceExpression":switch(t.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==r;default:return!0}case"YieldExpression":switch(t.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===t.type&&c.check(n.value)&&"object"===r&&t.object===n;case"AssignmentExpression":case"ConditionalExpression":switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===r&&t.callee===n;case"ConditionalExpression":return"test"===r&&t.test===n;case"MemberExpression":return"object"===r&&t.object===n;default:return!1}case"ArrowFunctionExpression":return a(t);case"ObjectExpression":if("ArrowFunctionExpression"===t.type&&"body"===r)return!0;default:if("NewExpression"===t.type&&"callee"===r&&t.callee===n)return s(n)}return e!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement()?!0:!1};var d={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){d[e]=t})}),f.canBeFirstInStatement=function(){var e=this.getNode();return!p.FunctionExpression.check(e)&&!p.ObjectExpression.check(e)},f.firstInStatement=function(){for(var e,t,r,n,i=this.stack,s=i.length-1;s>=0;s-=2)if(p.Node.check(i[s])&&(r=e,n=t,e=i[s-1],t=i[s]),t&&n){if(p.BlockStatement.check(t)&&"body"===e&&0===r)return o.strictEqual(t.body[0],n),!0;if(p.ExpressionStatement.check(t)&&"expression"===r)return o.strictEqual(t.expression,n),!0;if(p.SequenceExpression.check(t)&&"expressions"===e&&0===r)o.strictEqual(t.expressions[0],n);else if(p.CallExpression.check(t)&&"callee"===r)o.strictEqual(t.callee,n);else if(p.MemberExpression.check(t)&&"object"===r)o.strictEqual(t.object,n);else if(p.ConditionalExpression.check(t)&&"test"===r)o.strictEqual(t.test,n);else if(a(t)&&"left"===r)o.strictEqual(t.left,n);else{if(!p.UnaryExpression.check(t)||t.prefix||"argument"!==r)return!1;o.strictEqual(t.argument,n)}}return!0}},{2:2,558:558}],552:[function(e,t,r){function n(e){return e[d]}function i(e,t){l.ok(this instanceof i),l.ok(e.length>0),t?m.assert(t):t=null,Object.defineProperty(this,d,{value:{infos:e,mappings:[],name:t,cachedSourceMap:null}}),t&&n(this).mappings.push(new g(this,{start:this.firstPos(),end:this.lastPos()}))}function a(e){return{line:e.line,indent:e.indent,sliceStart:e.sliceStart,sliceEnd:e.sliceEnd}}function s(e,t){for(var r=0,n=e.length,i=0;n>i;++i)switch(e.charCodeAt(i)){case 9:l.strictEqual(typeof t,"number"),l.ok(t>0);var a=Math.ceil(r/t)*t;a===r?r+=t:r=a;break;case 11:case 12:case 13:case 65279:break;case 32:default:r+=1}return r}function o(e,t){if(e instanceof i)return e;e+="";var r=t&&t.tabWidth,n=e.indexOf(" ")<0,a=!t&&n&&e.length<=x;if(l.ok(r||n,"No tab width specified but encountered tabs in string\n"+e),a&&E.call(b,e))return b[e];var o=new i(e.split(A).map(function(e){var t=S.exec(e)[0];return{line:e,indent:s(t,r),sliceStart:t.length,sliceEnd:e.length}}),f(t).sourceFileName);return a&&(b[e]=o),o}function u(e){return!/\S/.test(e)}function p(e,t,r){var n=e.sliceStart,i=e.sliceEnd,a=Math.max(e.indent,0),s=a+i-n;return"undefined"==typeof r&&(r=s),t=Math.max(t,0),r=Math.min(r,s),r=Math.max(r,t),a>r?(a=r,i=n):i-=s-r,s=r,s-=t,a>t?a-=t:(t-=a,a=0,n+=t),l.ok(a>=0),l.ok(i>=n),l.strictEqual(s,a+i-n),e.indent===a&&e.sliceStart===n&&e.sliceEnd===i?e:{line:e.line,indent:a,sliceStart:n,sliceEnd:i}}var l=e(2),c=e(599),f=e(554).normalize,d=e(528).makeUniqueKey(),h=e(558),m=h.builtInTypes.string,y=e(559).comparePos,g=e(553);r.Lines=i;var v=i.prototype;Object.defineProperties(v,{length:{get:function(){return n(this).infos.length}},name:{get:function(){return n(this).name}}});var b={},E=b.hasOwnProperty,x=10;r.countSpaces=s;var S=/^\s*/,A=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;r.fromString=o,v.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)},v.getSourceMap=function(e,t){function r(r){return r=r||{},m.assert(e),r.file=e,t&&(m.assert(t),r.sourceRoot=t),r}if(!e)return null;var i=this,a=n(i);if(a.cachedSourceMap)return r(a.cachedSourceMap.toJSON());var s=new c.SourceMapGenerator(r()),o={};return a.mappings.forEach(function(e){for(var t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos(),r=i.skipSpaces(e.targetLoc.start)||i.lastPos();y(t,e.sourceLoc.end)<0&&y(r,e.targetLoc.end)<0;){var n=e.sourceLines.charAt(t),a=i.charAt(r);l.strictEqual(n,a);var u=e.sourceLines.name;if(s.addMapping({source:u,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column}}),!E.call(o,u)){var p=e.sourceLines.toString();s.setSourceContent(u,p),o[u]=p}i.nextPos(r,!0),e.sourceLines.nextPos(t,!0)}}),a.cachedSourceMap=s,s.toJSON()},v.bootstrapCharAt=function(e){l.strictEqual(typeof e,"object"),l.strictEqual(typeof e.line,"number"),l.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,n=this.toString().split(A),i=n[t-1];return"undefined"==typeof i?"":r===i.length&&t<n.length?"\n":r>=i.length?"":i.charAt(r)},v.charAt=function(e){l.strictEqual(typeof e,"object"),l.strictEqual(typeof e.line,"number"),l.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=n(this),a=i.infos,s=a[t-1],o=r;if("undefined"==typeof s||0>o)return"";var u=this.getIndentAt(t);return u>o?" ":(o+=s.sliceStart-u,o===s.sliceEnd&&t<this.length?"\n":o>=s.sliceEnd?"":s.line.charAt(o))},v.stripMargin=function(e,t){if(0===e)return this;if(l.ok(e>0,"negative margin: "+e),t&&1===this.length)return this;var r=n(this),s=new i(r.infos.map(function(r,n){return r.line&&(n>0||!t)&&(r=a(r),r.indent=Math.max(0,r.indent-e)),r}));if(r.mappings.length>0){var o=n(s).mappings;l.strictEqual(o.length,0),r.mappings.forEach(function(r){o.push(r.indent(e,t,!0))})}return s},v.indent=function(e){if(0===e)return this;var t=n(this),r=new i(t.infos.map(function(t){return t.line&&(t=a(t),t.indent+=e),t}));if(t.mappings.length>0){var s=n(r).mappings;l.strictEqual(s.length,0),t.mappings.forEach(function(t){s.push(t.indent(e))})}return r},v.indentTail=function(e){if(0===e)return this;if(this.length<2)return this;var t=n(this),r=new i(t.infos.map(function(t,r){return r>0&&t.line&&(t=a(t),t.indent+=e),t}));if(t.mappings.length>0){var s=n(r).mappings;l.strictEqual(s.length,0),t.mappings.forEach(function(t){s.push(t.indent(e,!0))})}return r},v.getIndentAt=function(e){l.ok(e>=1,"no line "+e+" (line numbers start from 1)");var t=n(this),r=t.infos[e-1];return Math.max(r.indent,0)},v.guessTabWidth=function(){var e=n(this);if(E.call(e,"cachedTabWidth"))return e.cachedTabWidth;for(var t=[],r=0,i=1,a=this.length;a>=i;++i){var s=e.infos[i-1],o=s.line.slice(s.sliceStart,s.sliceEnd);if(!u(o)){var p=Math.abs(s.indent-r);t[p]=~~t[p]+1,r=s.indent}}for(var l=-1,c=2,f=1;f<t.length;f+=1)E.call(t,f)&&t[f]>l&&(l=t[f],c=f);return e.cachedTabWidth=c},v.isOnlyWhitespace=function(){return u(this.toString())},v.isPrecededOnlyByWhitespace=function(e){var t=n(this),r=t.infos[e.line-1],i=Math.max(r.indent,0),a=e.column-i;if(0>=a)return!0;var s=r.sliceStart,o=Math.min(s+a,r.sliceEnd),p=r.line.slice(s,o);return u(p)},v.getLineLength=function(e){var t=n(this),r=t.infos[e-1];return this.getIndentAt(e)+r.sliceEnd-r.sliceStart},v.nextPos=function(e,t){var r=Math.max(e.line,0),n=Math.max(e.column,0);return n<this.getLineLength(r)?(e.column+=1,t?!!this.skipSpaces(e,!1,!0):!0):r<this.length?(e.line+=1,e.column=0,t?!!this.skipSpaces(e,!1,!0):!0):!1},v.prevPos=function(e,t){var r=e.line,n=e.column;if(1>n){if(r-=1,1>r)return!1;n=this.getLineLength(r)}else n=Math.min(n-1,this.getLineLength(r));return e.line=r,e.column=n,t?!!this.skipSpaces(e,!0,!0):!0},v.firstPos=function(){return{line:1,column:0}},v.lastPos=function(){return{line:this.length,column:this.getLineLength(this.length)}},v.skipSpaces=function(e,t,r){if(e=e?r?e:{line:e.line,column:e.column}:t?this.lastPos():this.firstPos(),t){for(;this.prevPos(e);)if(!u(this.charAt(e))&&this.nextPos(e))return e;return null}for(;u(this.charAt(e));)if(!this.nextPos(e))return null;return e},v.trimLeft=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):D},v.trimRight=function(){var e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):D},v.trim=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);if(null===e)return D;var t=this.skipSpaces(this.lastPos(),!0,!0);return l.notStrictEqual(t,null),this.slice(e,t)},v.eachPos=function(e,t,r){ var n=this.firstPos();if(t&&(n.line=t.line,n.column=t.column),!r||this.skipSpaces(n,!1,!0))do e.call(this,n);while(this.nextPos(n,r))},v.bootstrapSlice=function(e,t){var r=this.toString().split(A).slice(e.line-1,t.line);return r.push(r.pop().slice(0,t.column)),r[0]=r[0].slice(e.column),o(r.join("\n"))},v.slice=function(e,t){if(!t){if(!e)return this;t=this.lastPos()}var r=n(this),a=r.infos.slice(e.line-1,t.line);e.line===t.line?a[0]=p(a[0],e.column,t.column):(l.ok(e.line<t.line),a[0]=p(a[0],e.column),a.push(p(a.pop(),0,t.column)));var s=new i(a);if(r.mappings.length>0){var o=n(s).mappings;l.strictEqual(o.length,0),r.mappings.forEach(function(r){var n=r.slice(this,e,t);n&&o.push(n)},this)}return s},v.bootstrapSliceString=function(e,t,r){return this.slice(e,t).toString(r)},v.sliceString=function(e,t,r){if(!t){if(!e)return this;t=this.lastPos()}r=f(r);for(var i=n(this).infos,a=[],o=r.tabWidth,l=e.line;l<=t.line;++l){var c=i[l-1];l===e.line?c=l===t.line?p(c,e.column,t.column):p(c,e.column):l===t.line&&(c=p(c,0,t.column));var d=Math.max(c.indent,0),h=c.line.slice(0,c.sliceStart);if(r.reuseWhitespace&&u(h)&&s(h,r.tabWidth)===d)a.push(c.line.slice(0,c.sliceEnd));else{var m=0,y=d;r.useTabs&&(m=Math.floor(d/o),y-=m*o);var g="";m>0&&(g+=new Array(m+1).join(" ")),y>0&&(g+=new Array(y+1).join(" ")),g+=c.line.slice(c.sliceStart,c.sliceEnd),a.push(g)}}return a.join(r.lineTerminator)},v.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1},v.join=function(e){function t(e){if(null!==e){if(s){var t=e.infos[0],r=new Array(t.indent+1).join(" "),n=l.length,i=Math.max(s.indent,0)+s.sliceEnd-s.sliceStart;s.line=s.line.slice(0,s.sliceEnd)+r+t.line.slice(t.sliceStart,t.sliceEnd),s.sliceEnd=s.line.length,e.mappings.length>0&&e.mappings.forEach(function(e){c.push(e.add(n,i))})}else e.mappings.length>0&&c.push.apply(c,e.mappings);e.infos.forEach(function(e,t){(!s||t>0)&&(s=a(e),l.push(s))})}}function r(e,r){r>0&&t(p),t(e)}var s,u=this,p=n(u),l=[],c=[];if(e.map(function(e){var t=o(e);return t.isEmpty()?null:n(t)}).forEach(u.isEmpty()?t:r),l.length<1)return D;var f=new i(l);return n(f).mappings=c,f},r.concat=function(e){return D.join(e)},v.concat=function(e){var t=arguments,r=[this];return r.push.apply(r,t),l.strictEqual(r.length,t.length+1),D.join(r)};var D=o("")},{2:2,528:528,553:553,554:554,558:558,559:559,599:599}],553:[function(e,t,r){function n(e,t,r){o.ok(this instanceof n),o.ok(e instanceof f.Lines),l.assert(t),r?o.ok(p.check(r.start.line)&&p.check(r.start.column)&&p.check(r.end.line)&&p.check(r.end.column)):r=t,Object.defineProperties(this,{sourceLines:{value:e},sourceLoc:{value:t},targetLoc:{value:r}})}function i(e,t,r){return{line:e.line+t-1,column:1===e.line?e.column+r:e.column}}function a(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}function s(e,t,r,n,i){o.ok(e instanceof f.Lines),o.ok(r instanceof f.Lines),c.assert(t),c.assert(n),c.assert(i);var a=d(n,i);if(0===a)return t;if(0>a){var s=e.skipSpaces(t),u=r.skipSpaces(n),p=i.line-u.line;for(s.line+=p,u.line+=p,p>0?(s.column=0,u.column=0):o.strictEqual(p,0);d(u,i)<0&&r.nextPos(u,!0);)o.ok(e.nextPos(s,!0)),o.strictEqual(e.charAt(s),r.charAt(u))}else{var s=e.skipSpaces(t,!0),u=r.skipSpaces(n,!0),p=i.line-u.line;for(s.line+=p,u.line+=p,0>p?(s.column=e.getLineLength(s.line),u.column=r.getLineLength(u.line)):o.strictEqual(p,0);d(i,u)<0&&r.prevPos(u,!0);)o.ok(e.prevPos(s,!0)),o.strictEqual(e.charAt(s),r.charAt(u))}return s}var o=e(2),u=e(558),p=(u.builtInTypes.string,u.builtInTypes.number),l=u.namedTypes.SourceLocation,c=u.namedTypes.Position,f=e(552),d=e(559).comparePos,h=n.prototype;t.exports=n,h.slice=function(e,t,r){function i(n){var i=p[n],a=l[n],c=t;return"end"===n?c=r:o.strictEqual(n,"start"),s(u,i,e,a,c)}o.ok(e instanceof f.Lines),c.assert(t),r?c.assert(r):r=e.lastPos();var u=this.sourceLines,p=this.sourceLoc,l=this.targetLoc;if(d(t,l.start)<=0)if(d(l.end,r)<=0)l={start:a(l.start,t.line,t.column),end:a(l.end,t.line,t.column)};else{if(d(r,l.start)<=0)return null;p={start:p.start,end:i("end")},l={start:a(l.start,t.line,t.column),end:a(r,t.line,t.column)}}else{if(d(l.end,t)<=0)return null;d(l.end,r)<=0?(p={start:i("start"),end:p.end},l={start:{line:1,column:0},end:a(l.end,t.line,t.column)}):(p={start:i("start"),end:i("end")},l={start:{line:1,column:0},end:a(r,t.line,t.column)})}return new n(this.sourceLines,p,l)},h.add=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:i(this.targetLoc.start,e,t),end:i(this.targetLoc.end,e,t)})},h.subtract=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:a(this.targetLoc.start,e,t),end:a(this.targetLoc.end,e,t)})},h.indent=function(e,t,r){if(0===e)return this;var i=this.targetLoc,a=i.start.line,s=i.end.line;if(t&&1===a&&1===s)return this;if(i={start:i.start,end:i.end},!t||a>1){var o=i.start.column+e;i.start={line:a,column:r?Math.max(0,o):o}}if(!t||s>1){var u=i.end.column+e;i.end={line:s,column:r?Math.max(0,u):u}}return new n(this.sourceLines,this.sourceLoc,i)}},{2:2,552:552,558:558,559:559}],554:[function(e,t,r){var n={esprima:e(1),tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:e(8).EOL,wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1},i=n.hasOwnProperty;r.normalize=function(e){function t(t){return i.call(e,t)?e[t]:n[t]}return e=e||n,{tabWidth:+t("tabWidth"),useTabs:!!t("useTabs"),reuseWhitespace:!!t("reuseWhitespace"),lineTerminator:t("lineTerminator"),wrapColumn:Math.max(t("wrapColumn"),0),sourceFileName:t("sourceFileName"),sourceMapName:t("sourceMapName"),sourceRoot:t("sourceRoot"),inputSourceMap:t("inputSourceMap"),esprima:t("esprima"),range:t("range"),tolerant:t("tolerant"),quote:t("quote"),trailingComma:t("trailingComma")}}},{1:1,8:8}],555:[function(e,t,r){function n(e){i.ok(this instanceof n),this.lines=e,this.indent=0}var i=e(2),a=e(558),s=(a.namedTypes,a.builders),o=a.builtInTypes.object,u=a.builtInTypes.array,p=(a.builtInTypes["function"],e(556).Patcher,e(554).normalize),l=e(552).fromString,c=e(550).attach,f=e(559);r.parse=function(e,t){t=p(t);var r=l(e,t),i=r.toString({tabWidth:t.tabWidth,reuseWhitespace:!1,useTabs:!1}),a=[],o=t.esprima.parse(i,{loc:!0,locations:!0,range:t.range,comment:!0,onComment:a,tolerant:t.tolerant,ecmaVersion:6,sourceType:"module"});o.loc=o.loc||{start:r.firstPos(),end:r.lastPos()},o.loc.lines=r,o.loc.indent=0;var u=f.getTrueLoc(o,r);o.loc.start=u.start,o.loc.end=u.end,o.comments&&(a=o.comments,delete o.comments);var d=s.file(o);return d.loc={lines:r,indent:0,start:r.firstPos(),end:r.lastPos()},c(a,o.body.length?d.program:d,r),new n(r).copy(d)};var d=n.prototype;d.copy=function(e){if(u.check(e))return e.map(this.copy,this);if(!o.check(e))return e;f.fixFaultyLocations(e);var t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:!1,enumerable:!1,writable:!0}}),r=e.loc,n=this.indent,i=n;r&&(("Block"===e.type||"Line"===e.type||this.lines.isPrecededOnlyByWhitespace(r.start))&&(i=this.indent=r.start.column),r.lines=this.lines,r.indent=i);for(var a=Object.keys(e),s=a.length,p=0;s>p;++p){var l=a[p];"loc"===l?t[l]=e[l]:t[l]=this.copy(e[l])}return this.indent=n,t}},{2:2,550:550,552:552,554:554,556:556,558:558,559:559}],556:[function(e,t,r){function n(e){d.ok(this instanceof n),d.ok(e instanceof h.Lines);var t=this,r=[];t.replace=function(e,t){D.check(t)&&(t=h.fromString(t)),r.push({lines:t,start:e.start,end:e.end})},t.get=function(t){function n(t,r){d.ok(E(t,r)<=0),a.push(e.slice(t,r))}t=t||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}};var i=t.start,a=[];return r.sort(function(e,t){return E(e.start,t.start)}).forEach(function(e){E(i,e.start)>0||(n(i,e.start),a.push(e.lines),i=e.end)}),n(i,t.end),h.concat(a)}}function i(e){var t=[];return e.comments&&e.comments.length>0&&e.comments.forEach(function(e){(e.leading||e.trailing)&&t.push(e)}),t}function a(e,t){var r=e.getValue();y.assert(r);var n=r.original;if(y.assert(n),d.deepEqual(t,[]),r.type!==n.type)return!1;var i=new x(n),a=f(e,i,t);return a||(t.length=0),a}function s(e,t,r){var n=e.getValue(),i=t.getValue();return n===i?!0:A.check(n)?o(e,t,r):S.check(n)?u(e,t,r):!1}function o(e,t,r){var n=e.getValue(),i=t.getValue();A.assert(n);var a=n.length;if(!A.check(i)||i.length!==a)return!1;for(var o=0;a>o;++o){e.stack.push(o,n[o]),t.stack.push(o,i[o]);var u=s(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!u)return!1}return!0}function u(e,t,r){var n=e.getValue();if(S.assert(n),null===n.original)return!1;var i=t.getValue();if(!S.check(i))return!1;if(y.check(n)){if(!y.check(i))return!1;if(n.type===i.type){var a=[];if(f(e,t,a))r.push.apply(r,a);else{if(!i.loc)return!1;r.push({oldPath:t.copy(),newPath:e.copy()})}return!0}return g.check(n)&&g.check(i)&&i.loc?(r.push({oldPath:t.copy(),newPath:e.copy()}),!0):!1}return f(e,t,r)}function p(e){var t=e.getValue(),r=t.loc,n=r&&r.lines;if(n){var i=I;for(i.line=r.start.line,i.column=r.start.column;n.prevPos(i);){var a=n.charAt(i);if("("===a)return E(e.getRootValue().loc.start,i)<=0;if(_.test(a))return!1}}return!1}function l(e){var t=e.getValue(),r=t.loc,n=r&&r.lines;if(n){var i=I;i.line=r.end.line,i.column=r.end.column;do{var a=n.charAt(i);if(")"===a)return E(i,e.getRootValue().loc.end)<=0;if(_.test(a))return!1}while(n.nextPos(i))}return!1}function c(e){return p(e)&&l(e)}function f(e,t,r){var n=e.getValue(),i=t.getValue();if(S.assert(n),S.assert(i),null===n.original)return!1;if(!e.canBeFirstInStatement()&&e.firstInStatement()&&!p(t))return!1;if(e.needsParens(!0)&&!c(t))return!1;for(var a in b.getUnionOfKeys(n,i))if("loc"!==a){e.stack.push(a,m.getFieldValue(n,a)),t.stack.push(a,m.getFieldValue(i,a));var o=s(e,t,r);if(e.stack.length-=2,t.stack.length-=2,!o)return!1}return!0}var d=e(2),h=e(552),m=e(558),y=(m.getFieldValue,m.namedTypes.Printable),g=m.namedTypes.Expression,v=m.namedTypes.SourceLocation,b=e(559),E=b.comparePos,x=e(551),S=m.builtInTypes.object,A=m.builtInTypes.array,D=m.builtInTypes.string,C=/[0-9a-z_$]/i;r.Patcher=n;var w=n.prototype;w.tryToReprintComments=function(e,t,r){var n=this;if(!e.comments&&!t.comments)return!0;var a=x.from(e),s=x.from(t);a.stack.push("comments",i(e)),s.stack.push("comments",i(t));var u=[],p=o(a,s,u);return p&&u.length>0&&u.forEach(function(e){var t=e.oldPath.getValue();d.ok(t.leading||t.trailing),n.replace(t.loc,r(e.newPath).indentTail(t.loc.indent))}),p},w.deleteComments=function(e){if(e.comments){var t=this;e.comments.forEach(function(r){r.leading?t.replace({start:r.loc.start,end:e.loc.lines.skipSpaces(r.loc.end,!1,!1)},""):r.trailing&&t.replace({start:e.loc.lines.skipSpaces(r.loc.start,!0,!1),end:r.loc.end},"")})}},r.getReprinter=function(e){d.ok(e instanceof x);var t=e.getValue();if(y.check(t)){var r=t.original,i=r&&r.loc,s=i&&i.lines,o=[];if(s&&a(e,o))return function(e){var t=new n(s);return o.forEach(function(r){var n=r.newPath.getValue(),i=r.oldPath.getValue();v.assert(i.loc,!0);var a=!t.tryToReprintComments(n,i,e);a&&t.deleteComments(i);var o=b.copyPos(i.loc.start),u=s.prevPos(o)&&C.test(s.charAt(o)),p=e(r.newPath,a).indentTail(i.loc.indent),l=C.test(s.charAt(i.loc.end));if(u||l){var c=[];u&&c.push(" "),c.push(p),l&&c.push(" "),p=h.concat(c)}t.replace(i.loc,p)}),t.get(i).indentTail(-r.loc.indent)}}};var I={line:1,column:0},_=/\S/},{2:2,551:551,552:552,558:558,559:559}],557:[function(e,t,r){function n(e,t){E.ok(this instanceof n),F.assert(e),this.code=e,t&&(k.assert(t),this.map=t)}function i(e){function t(e){return E.ok(e instanceof P),x(e,r)}function r(e,r){if(r)return t(e);if(E.ok(e instanceof P),!l){var n=c.tabWidth,i=e.getNode().loc;if(i&&i.lines&&i.lines.guessTabWidth){c.tabWidth=i.lines.guessTabWidth();var a=o(e);return c.tabWidth=n,a}}return o(e)}function o(e){var t=w(e);return t?a(e,t(r)):u(e)}function u(e){return s(e,c,t)}function p(e){return s(e,c,p)}E.ok(this instanceof i);var l=e&&e.tabWidth,c=C(e);E.notStrictEqual(c,e),c.sourceFileName=null,this.print=function(e){if(!e)return O;var t=r(P.from(e),!0);return new n(t.toString(c),B.composeSourceMaps(c.inputSourceMap,t.getSourceMap(c.sourceMapName,c.sourceRoot)))},this.printGenerically=function(e){if(!e)return O;var t=P.from(e),r=c.reuseWhitespace;c.reuseWhitespace=!1;var i=new n(p(t).toString(c));return c.reuseWhitespace=r,i}}function a(e,t){return e.needsParens()?D(["(",t,")"]):t}function s(e,t,r){return E.ok(e instanceof P),a(e,o(e,t,r))}function o(e,t,r){var n=e.getValue();if(!n)return A("");if("string"==typeof n)return A(n,t);switch(_.Printable.assert(n),n.type){case"File":return e.call(r,"program");case"Program":return e.call(function(e){return u(e,t,r)},"body");case"Noop":case"EmptyStatement":return A("");case"ExpressionStatement":return D([e.call(r,"expression"),";"]);case"ParenthesizedExpression":return D(["(",e.call(r,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return A(" ").join([e.call(r,"left"),n.operator,e.call(r,"right")]);case"AssignmentPattern":return D([e.call(r,"left"),"=",e.call(r,"right")]);case"MemberExpression":var i=[e.call(r,"object")],a=e.call(r,"property");return n.computed?i.push("[",a,"]"):i.push(".",a),D(i);case"MetaProperty":return D([e.call(r,"meta"),".",e.call(r,"property")]);case"BindExpression":var i=[];return n.object&&i.push(e.call(r,"object")),i.push("::",e.call(r,"callee")),D(i);case"Path":return A(".").join(n.body);case"Identifier":return D([A(n.name,t),e.call(r,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":return D(["...",e.call(r,"argument")]);case"FunctionDeclaration":case"FunctionExpression":var i=[];return n.async&&i.push("async "),i.push("function"),n.generator&&i.push("*"),n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),i.push("(",d(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),D(i);case"ArrowFunctionExpression":var i=[];return n.async&&i.push("async "),1!==n.params.length||n.rest||"SpreadElementPattern"===n.params[0].type||"RestElement"===n.params[0].type?i.push("(",d(e,t,r),")"):i.push(e.call(r,"params",0)),i.push(" => ",e.call(r,"body")),D(i);case"MethodDefinition":var i=[];return n["static"]&&i.push("static "),i.push(c(e,t,r)),D(i);case"YieldExpression":var i=["yield"];return n.delegate&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),D(i);case"AwaitExpression":var i=["await"];return n.all&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),D(i);case"ModuleDeclaration":var i=["module",e.call(r,"id")];return n.source?(E.ok(!n.body),i.push("from",e.call(r,"source"))):i.push(e.call(r,"body")),A(" ").join(i);case"ImportSpecifier":var i=[];return n.imported?(i.push(e.call(r,"imported")),n.local&&n.local.name!==n.imported.name&&i.push(" as ",e.call(r,"local"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),D(i);case"ExportSpecifier":var i=[];return n.local?(i.push(e.call(r,"local")),n.exported&&n.exported.name!==n.local.name&&i.push(" as ",e.call(r,"exported"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),D(i);case"ExportBatchSpecifier":return A("*");case"ImportNamespaceSpecifier":var i=["* as "];return n.local?i.push(e.call(r,"local")):n.id&&i.push(e.call(r,"id")),D(i);case"ImportDefaultSpecifier":return n.local?e.call(r,"local"):e.call(r,"id");case"ExportDeclaration":var i=["export"];if(n["default"])i.push(" default");else if(n.specifiers&&n.specifiers.length>0)return 1===n.specifiers.length&&"ExportBatchSpecifier"===n.specifiers[0].type?i.push(" *"):i.push(" { ",A(", ").join(e.map(r,"specifiers"))," }"),n.source&&i.push(" from ",e.call(r,"source")),i.push(";"),D(i);if(n.declaration){var s=e.call(r,"declaration");i.push(" ",s),";"!==m(s)&&i.push(";")}return D(i);case"ExportDefaultDeclaration":return D(["export default ",e.call(r,"declaration")]);case"ExportNamedDeclaration":var i=["export "];return n.declaration&&i.push(e.call(r,"declaration")),n.specifiers&&n.specifiers.length>0&&i.push(n.declaration?", {":"{",A(", ").join(e.map(r,"specifiers")),"}"),n.source&&i.push(" from ",e.call(r,"source")),D(i);case"ExportAllDeclaration":var i=["export *"];return n.exported&&i.push(" as ",e.call(r,"exported")),D([" from ",e.call(r,"source")]);case"ExportNamespaceSpecifier":return D(["* as ",e.call(r,"exported")]);case"ExportDefaultSpecifier":return e.call(r,"exported");case"ImportDeclaration":var i=["import "];if(n.importKind&&"value"!==n.importKind&&i.push(n.importKind+" "),n.specifiers&&n.specifiers.length>0){var o=!1;e.each(function(e){var t=e.getName();t>0&&i.push(", ");var n=e.getValue();_.ImportDefaultSpecifier.check(n)||_.ImportNamespaceSpecifier.check(n)?E.strictEqual(o,!1):(_.ImportSpecifier.assert(n),o||(o=!0,i.push("{"))),i.push(r(e))},"specifiers"),o&&i.push("}"),i.push(" from ")}return i.push(e.call(r,"source"),";"),D(i);case"BlockStatement":var l=e.call(function(e){return u(e,t,r)},"body");return l.isEmpty()?A("{}"):D(["{\n",l.indent(t.tabWidth),"\n}"]);case"ReturnStatement":var i=["return"];if(n.argument){var g=e.call(r,"argument");g.length>1&&(_.XJSElement&&_.XJSElement.check(n.argument)||_.JSXElement&&_.JSXElement.check(n.argument))?i.push(" (\n",g.indent(t.tabWidth),"\n)"):i.push(" ",g)}return i.push(";"),D(i);case"CallExpression":return D([e.call(r,"callee"),f(e,t,r)]);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var b=!1,x="ObjectTypeAnnotation"===n.type,S=x?";":",",C=[];x&&C.push("indexers","callProperties"),C.push("properties");var w=0;C.forEach(function(e){w+=n[e].length});var I=x&&1===w||0===w,i=[I?"{":"{\n"],F=0;return C.forEach(function(n){e.each(function(e){var n=r(e);I||(n=n.indent(t.tabWidth));var a=!x&&n.length>1;a&&b&&i.push("\n"),i.push(n),w-1>F?(i.push(S+(a?"\n\n":"\n")),b=!a):1!==w&&x?i.push(S):t.trailingComma&&i.push(S),F++},n)}),i.push(I?"}":"\n}"),D(i);case"PropertyPattern":return D([e.call(r,"key"),": ",e.call(r,"pattern")]);case"Property":if(n.method||"get"===n.kind||"set"===n.kind)return c(e,t,r);var i=[];n.decorators&&e.each(function(e){i.push(r(e),"\n")},"decorators");var k=e.call(r,"key");return n.computed?i.push("[",k,"]"):i.push(k),n.shorthand||i.push(": ",e.call(r,"value")),D(i);case"Decorator":return D(["@",e.call(r,"expression")]);case"ArrayExpression":case"ArrayPattern":var P=n.elements,w=P.length,B=e.map(r,"elements"),T=A(", ").join(B),I=T.getLineLength(1)<=t.wrapColumn,i=[I?"[":"[\n"];return e.each(function(e){var r=e.getName(),n=e.getValue();if(n){var a=B[r];I?r>0&&i.push(" "):a=a.indent(t.tabWidth),i.push(a),(w-1>r||!I&&t.trailingComma)&&i.push(","),I||i.push("\n")}else i.push(",")},"elements"),i.push("]"),D(i);case"SequenceExpression":return A(", ").join(e.map(r,"expressions"));case"ThisExpression":return A("this");case"Super":return A("super");case"Literal":return"string"!=typeof n.value?A(n.value,t):A(v(n.value,t),t);case"ModuleSpecifier":if(n.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return A(v(n.value,t),t);case"UnaryExpression":var i=[n.operator];return/[a-z]$/.test(n.operator)&&i.push(" "),i.push(e.call(r,"argument")),D(i);case"UpdateExpression":var i=[e.call(r,"argument"),n.operator];return n.prefix&&i.reverse(),D(i);case"ConditionalExpression":return D(["(",e.call(r,"test")," ? ",e.call(r,"consequent")," : ",e.call(r,"alternate"),")"]);case"NewExpression":var i=["new ",e.call(r,"callee")],M=n.arguments;return M&&i.push(f(e,t,r)),D(i);case"VariableDeclaration":var i=[n.kind," "],O=0,B=e.map(function(e){var t=r(e);return O=Math.max(t.length,O),t},"declarations");1===O?i.push(A(", ").join(B)):B.length>1?i.push(A(",\n").join(B).indentTail(n.kind.length+1)):i.push(B[0]);var j=e.getParentNode();return _.ForStatement.check(j)||_.ForInStatement.check(j)||_.ForOfStatement&&_.ForOfStatement.check(j)||i.push(";"),D(i);case"VariableDeclarator":return n.init?A(" = ").join([e.call(r,"id"),e.call(r,"init")]):e.call(r,"id");case"WithStatement":return D(["with (",e.call(r,"object"),") ",e.call(r,"body")]);case"IfStatement":var L=h(e.call(r,"consequent"),t),i=["if (",e.call(r,"test"),")",L];return n.alternate&&i.push(y(L)?" else":"\nelse",h(e.call(r,"alternate"),t)),D(i);case"ForStatement":var N=e.call(r,"init"),R=N.length>1?";\n":"; ",V="for (",U=A(R).join([N,e.call(r,"test"),e.call(r,"update")]).indentTail(V.length),q=D([V,U,")"]),G=h(e.call(r,"body"),t),i=[q];return q.length>1&&(i.push("\n"),G=G.trimLeft()),i.push(G),D(i);case"WhileStatement":return D(["while (",e.call(r,"test"),")",h(e.call(r,"body"),t)]);case"ForInStatement":return D([n.each?"for each (":"for (",e.call(r,"left")," in ",e.call(r,"right"),")",h(e.call(r,"body"),t)]);case"ForOfStatement":return D(["for (",e.call(r,"left")," of ",e.call(r,"right"),")",h(e.call(r,"body"),t)]);case"DoWhileStatement":var H=D(["do",h(e.call(r,"body"),t)]),i=[H];return y(H)?i.push(" while"):i.push("\nwhile"),i.push(" (",e.call(r,"test"),");"),D(i);case"DoExpression":var W=e.call(function(e){return u(e,t,r)},"body");return D(["do {\n",W.indent(t.tabWidth),"\n}"]);case"BreakStatement":var i=["break"];return n.label&&i.push(" ",e.call(r,"label")),i.push(";"),D(i);case"ContinueStatement":var i=["continue"];return n.label&&i.push(" ",e.call(r,"label")),i.push(";"),D(i);case"LabeledStatement":return D([e.call(r,"label"),":\n",e.call(r,"body")]);case"TryStatement":var i=["try ",e.call(r,"block")];return n.handler?i.push(" ",e.call(r,"handler")):n.handlers&&e.each(function(e){i.push(" ",r(e))},"handlers"),n.finalizer&&i.push(" finally ",e.call(r,"finalizer")),D(i);case"CatchClause":var i=["catch (",e.call(r,"param")];return n.guard&&i.push(" if ",e.call(r,"guard")),i.push(") ",e.call(r,"body")),D(i);case"ThrowStatement":return D(["throw ",e.call(r,"argument"),";"]);case"SwitchStatement":return D(["switch (",e.call(r,"discriminant"),") {\n",A("\n").join(e.map(r,"cases")),"\n}"]);case"SwitchCase":var i=[];return n.test?i.push("case ",e.call(r,"test"),":"):i.push("default:"),n.consequent.length>0&&i.push("\n",e.call(function(e){return u(e,t,r)},"consequent").indent(t.tabWidth)),D(i);case"DebuggerStatement":return A("debugger;");case"XJSAttribute":case"JSXAttribute":var i=[e.call(r,"name")];return n.value&&i.push("=",e.call(r,"value")),D(i);case"XJSIdentifier":case"JSXIdentifier":return A(n.name,t);case"XJSNamespacedName":case"JSXNamespacedName":return A(":").join([e.call(r,"namespace"),e.call(r,"name")]);case"XJSMemberExpression":case"JSXMemberExpression":return A(".").join([e.call(r,"object"),e.call(r,"property")]);case"XJSSpreadAttribute":case"JSXSpreadAttribute":return D(["{...",e.call(r,"argument"),"}"]);case"XJSExpressionContainer":case"JSXExpressionContainer":return D(["{",e.call(r,"expression"),"}"]);case"XJSElement":case"JSXElement":var X=e.call(r,"openingElement");if(n.openingElement.selfClosing)return E.ok(!n.closingElement),X;var Y=D(e.map(function(e){var t=e.getValue();if(_.Literal.check(t)&&"string"==typeof t.value){if(/\S/.test(t.value))return t.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(t.value))return"\n"}return r(e)},"children")).indentTail(t.tabWidth),J=e.call(r,"closingElement");return D([X,Y,J]);case"XJSOpeningElement":case"JSXOpeningElement":var i=["<",e.call(r,"name")],z=[];e.each(function(e){z.push(" ",r(e))},"attributes");var K=D(z),$=K.length>1||K.getLineLength(1)>t.wrapColumn;return $&&(z.forEach(function(e,t){" "===e&&(E.strictEqual(t%2,0),z[t]="\n")}),K=D(z).indentTail(t.tabWidth)),i.push(K,n.selfClosing?" />":">"),D(i);case"XJSClosingElement":case"JSXClosingElement":return D(["</",e.call(r,"name"),">"]);case"XJSText":case"JSXText":return A(n.value,t);case"XJSEmptyExpression":case"JSXEmptyExpression":return A("");case"TypeAnnotatedIdentifier":return D([e.call(r,"annotation")," ",e.call(r,"identifier")]);case"ClassBody":return 0===n.body.length?A("{}"):D(["{\n",e.call(function(e){return u(e,t,r)},"body").indent(t.tabWidth),"\n}"]);case"ClassPropertyDefinition":var i=["static ",e.call(r,"definition")];return _.MethodDefinition.check(n.definition)||i.push(";"),D(i);case"ClassProperty":var i=[];return n["static"]&&i.push("static "),i.push(e.call(r,"key")),n.typeAnnotation&&i.push(e.call(r,"typeAnnotation")),n.value&&i.push(" = ",e.call(r,"value")),i.push(";"),D(i);case"ClassDeclaration":case"ClassExpression":var i=["class"];return n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),n.superClass&&i.push(" extends ",e.call(r,"superClass"),e.call(r,"superTypeParameters")),n["implements"]&&i.push(" implements ",A(", ").join(e.map(r,"implements"))),i.push(" ",e.call(r,"body")),D(i);case"TemplateElement":return A(n.value.raw,t);case"TemplateLiteral":var Q=e.map(r,"expressions"),i=["`"];return e.each(function(e){var t=e.getName();i.push(r(e)),t<Q.length&&i.push("${",Q[t],"}")},"quasis"),i.push("`"),D(i);case"TaggedTemplateExpression":return D([e.call(r,"tag"),e.call(r,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"MemberTypeAnnotation":case"TupleTypeAnnotation":case"Type":throw new Error("unprintable type: "+JSON.stringify(n.type));case"CommentBlock":case"Block":return D(["/*",A(n.value,t),"*/"]);case"CommentLine":case"Line":return D(["//",A(n.value,t)]);case"TypeAnnotation":var i=[];return n.typeAnnotation?("FunctionTypeAnnotation"!==n.typeAnnotation.type&&i.push(": "),i.push(e.call(r,"typeAnnotation")),D(i)):A("");case"AnyTypeAnnotation":return A("any",t);case"MixedTypeAnnotation":return A("mixed",t);case"ArrayTypeAnnotation":return D([e.call(r,"elementType"),"[]"]);case"BooleanTypeAnnotation":return A("boolean",t);case"BooleanLiteralTypeAnnotation":return E.strictEqual(typeof n.value,"boolean"),A(""+n.value,t);case"DeclareClass":return D([A("declare class ",t),e.call(r,"id")," ",e.call(r,"body")]);case"DeclareFunction":return D([A("declare function ",t),e.call(r,"id"),";"]);case"DeclareModule":return D([A("declare module ",t),e.call(r,"id")," ",e.call(r,"body")]);case"DeclareVariable":return D([A("declare var ",t),e.call(r,"id"),";"]);case"FunctionTypeAnnotation":var i=[],Z=e.getParentNode(0),ee=!(_.ObjectTypeCallProperty.check(Z)||_.DeclareFunction.check(e.getParentNode(2))),te=ee&&!_.FunctionTypeParam.check(Z);return te&&i.push(": "),i.push("(",A(", ").join(e.map(r,"params")),")"),n.returnType&&i.push(ee?" => ":": ",e.call(r,"returnType")),D(i);case"FunctionTypeParam":return D([e.call(r,"name"),": ",e.call(r,"typeAnnotation")]);case"GenericTypeAnnotation":return D([e.call(r,"id"),e.call(r,"typeParameters")]);case"InterfaceDeclaration":var i=[A("interface ",t),e.call(r,"id"),e.call(r,"typeParameters")," "];return n["extends"]&&i.push("extends ",A(", ").join(e.map(r,"extends"))),i.push(" ",e.call(r,"body")),D(i);case"ClassImplements":case"InterfaceExtends":return D([e.call(r,"id"),e.call(r,"typeParameters")]);case"IntersectionTypeAnnotation":return A(" & ").join(e.map(r,"types"));case"NullableTypeAnnotation":return D(["?",e.call(r,"typeAnnotation")]);case"NumberTypeAnnotation":return A("number",t);case"ObjectTypeCallProperty":return e.call(r,"value");case"ObjectTypeIndexer":return D(["[",e.call(r,"id"),": ",e.call(r,"key"),"]: ",e.call(r,"value")]);case"ObjectTypeProperty":return D([e.call(r,"key"),": ",e.call(r,"value")]);case"QualifiedTypeIdentifier":return D([e.call(r,"qualification"),".",e.call(r,"id")]);case"StringLiteralTypeAnnotation":return A(v(n.value,t),t);case"NumberLiteralTypeAnnotation":return E.strictEqual(typeof n.value,"number"),A(""+n.value,t);case"StringTypeAnnotation":return A("string",t);case"TypeAlias":return D(["type ",e.call(r,"id")," = ",e.call(r,"right"),";"]);case"TypeCastExpression":return D(["(",e.call(r,"expression"),e.call(r,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return D(["<",A(", ").join(e.map(r,"params")),">"]);case"TypeofTypeAnnotation":return D([A("typeof ",t),e.call(r,"argument")]);case"UnionTypeAnnotation":return A(" | ").join(e.map(r,"types"));case"VoidTypeAnnotation":return A("void",t);case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:throw new Error("unknown type: "+JSON.stringify(n.type))}return p}function u(e,t,r){var n=_.ClassBody&&_.ClassBody.check(e.getParentNode()),i=[],a=!1,s=!1;e.each(function(e){var t=(e.getName(),e.getValue());t&&"EmptyStatement"!==t.type&&(_.Comment.check(t)?a=!0:n||(_.Statement.assert(t),s=!0),i.push({node:t,printed:r(e)}))}),a&&E.strictEqual(s,!1,"Comments may appear as statements in otherwise empty statement lists, but may not coexist with non-Comment nodes.");var o=null,u=i.length,p=[];return i.forEach(function(e,r){var n,i,a=e.printed,s=e.node,c=a.length>1,f=r>0,d=u-1>r,h=s&&s.loc&&s.loc.lines,m=h&&t.reuseWhitespace&&B.getTrueLoc(s,h);if(f)if(m){var y=h.skipSpaces(m.start,!0),g=y?y.line:1,v=m.start.line-g;n=Array(v+1).join("\n")}else n=c?"\n\n":"\n";else n="";if(d)if(m){var b=h.skipSpaces(m.end),E=b?b.line:h.length,x=E-m.end.line;i=Array(x+1).join("\n")}else i=c?"\n\n":"\n";else i="";p.push(l(o,n),a),d?o=i:i&&p.push(i)}),D(p)}function l(e,t){if(!e&&!t)return A("");if(!e)return A(t);if(!t)return A(e);var r=A(e),n=A(t);return n.length>r.length?n:r}function c(e,t,r){var n=e.getNode(),i=n.kind,a=[];_.FunctionExpression.assert(n.value),n.decorators&&e.each(function(e){a.push(r(e),"\n")},"decorators"),n.value.async&&a.push("async "),i&&"init"!==i&&"method"!==i&&"constructor"!==i?(E.ok("get"===i||"set"===i),a.push(i," ")):n.value.generator&&a.push("*");var s=e.call(r,"key");return n.computed&&(s=D(["[",s,"]"])),a.push(s,e.call(r,"value","typeParameters"),"(",e.call(function(e){return d(e,t,r)},"value"),")",e.call(r,"value","returnType")," ",e.call(r,"value","body")),D(a)}function f(e,t,r){var n=e.map(r,"arguments"),i=A(", ").join(n);return i.getLineLength(1)>t.wrapColumn?(i=A(",\n").join(n),D(["(\n",i.indent(t.tabWidth),t.trailingComma?",\n)":"\n)"])):D(["(",i,")"])}function d(e,t,r){var n=e.getValue();_.Function.assert(n);var i=e.map(r,"params");n.defaults&&e.each(function(e){var t=e.getName(),n=i[t];n&&e.getValue()&&(i[t]=D([n,"=",r(e)]))},"defaults"),n.rest&&i.push(D(["...",e.call(r,"rest")]));var a=A(", ").join(i);return a.length>1||a.getLineLength(1)>t.wrapColumn?(a=A(",\n").join(i),t.trailingComma&&!n.rest&&(a=D([a,",\n"])),D(["\n",a.indent(t.tabWidth)])):a}function h(e,t){return D(e.length>1?[" ",e]:["\n",b(e).indent(t.tabWidth)])}function m(e){var t=e.lastPos();do{var r=e.charAt(t);if(/\S/.test(r))return r}while(e.prevPos(t))}function y(e){return"}"===m(e)}function g(e){return e.replace(/['"]/g,function(e){return'"'===e?"'":'"'})}function v(e,t){switch(F.assert(e),t.quote){case"auto":var r=JSON.stringify(e),n=g(JSON.stringify(g(e)));return r.length>n.length?n:r;case"single":return g(JSON.stringify(g(e)));case"double":default:return JSON.stringify(e)}}function b(e){var t=m(e);return!t||"\n};".indexOf(t)<0?D([e,";"]):e}var E=e(2),x=(e(599),e(550).printComments),S=e(552),A=S.fromString,D=S.concat,C=e(554).normalize,w=e(556).getReprinter,I=e(558),_=I.namedTypes,F=I.builtInTypes.string,k=I.builtInTypes.object,P=e(551),B=e(559),T=n.prototype,M=!1;T.toString=function(){return M||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),M=!0),this.code};var O=new n("");r.Printer=i},{2:2,550:550,551:551,552:552,554:554,556:556,558:558,559:559,599:599}],558:[function(e,t,r){t.exports=e(576)},{576:576}],559:[function(e,t,r){function n(){ for(var e={},t=arguments.length,r=0;t>r;++r)for(var n=Object.keys(arguments[r]),i=n.length,a=0;i>a;++a)e[n[a]]=!0;return e}function i(e,t){return e.line-t.line||e.column-t.column}function a(e){return{line:e.line,column:e.column}}var s=(e(2),e(558)),o=(s.getFieldValue,s.namedTypes),u=e(599),p=u.SourceMapConsumer,l=u.SourceMapGenerator,c=Object.prototype.hasOwnProperty;r.getUnionOfKeys=n,r.comparePos=i,r.copyPos=a,r.composeSourceMaps=function(e,t){if(!e)return t||null;if(!t)return e;var r=new p(e),n=new p(t),i=new l({file:t.file,sourceRoot:t.sourceRoot}),s={};return n.eachMapping(function(e){var t=r.originalPositionFor({line:e.originalLine,column:e.originalColumn}),n=t.source;if(null!==n){i.addMapping({source:n,original:a(t),generated:{line:e.generatedLine,column:e.generatedColumn},name:e.name});var o=r.sourceContentFor(n);o&&!c.call(s,n)&&(s[n]=o,i.setSourceContent(n,o))}}),i.toJSON()},r.getTrueLoc=function(e,t){if(!e.loc)return null;var r=e.loc.start,n=e.loc.end;return e.comments&&e.comments.forEach(function(e){e.loc&&(i(e.loc.start,r)<0&&(r=e.loc.start),i(n,e.loc.end)<0&&(n=e.loc.end))}),{start:t.skipSpaces(r,!1,!1),end:t.skipSpaces(n,!0,!1)}},r.fixFaultyLocations=function(e){(o.MethodDefinition&&o.MethodDefinition.check(e)||o.Property.check(e)&&(e.method||e.shorthand))&&(e.value.loc=null,o.FunctionExpression.check(e.value)&&(e.value.id=null));var t=e.loc;t&&(t.start.line<1&&(t.start.line=1),t.end.line<1&&(t.end.line=1))}},{2:2,558:558,599:599}],560:[function(e,t,r){(function(t){function n(e,t){return new c(t).print(e)}function i(e,t){return new c(t).printGenerically(e)}function a(e,r){return s(t.argv[2],e,r)}function s(t,r,n){e(1).readFile(t,"utf-8",function(e,t){return e?void console.error(e):void u(t,r,n)})}function o(e){t.stdout.write(e)}function u(e,t,r){var i=r&&r.writeback||o;t(l(e,r),function(e){i(n(e,r).code)})}var p=e(558),l=e(555).parse,c=e(557).Printer;Object.defineProperties(r,{parse:{enumerable:!0,value:l},visit:{enumerable:!0,value:p.visit},print:{enumerable:!0,value:n},prettyPrint:{enumerable:!1,value:i},types:{enumerable:!1,value:p},run:{enumerable:!1,value:a}})}).call(this,e(10))},{1:1,10:10,555:555,557:557,558:558}],561:[function(e,t,r){e(565);var n=e(575),i=e(574).defaults,a=n.Type.def,s=n.Type.or;a("Noop").bases("Node").build(),a("DoExpression").bases("Expression").build("body").field("body",[a("Statement")]),a("Super").bases("Expression").build(),a("BindExpression").bases("Expression").build("object","callee").field("object",s(a("Expression"),null)).field("callee",a("Expression")),a("Decorator").bases("Node").build("expression").field("expression",a("Expression")),a("Property").field("decorators",s([a("Decorator")],null),i["null"]),a("MethodDefinition").field("decorators",s([a("Decorator")],null),i["null"]),a("MetaProperty").bases("Expression").build("meta","property").field("meta",a("Identifier")).field("property",a("Identifier")),a("ParenthesizedExpression").bases("Expression").build("expression").field("expression",a("Expression")),a("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",a("Identifier")),a("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),a("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),a("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(a("Declaration"),a("Expression"))),a("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(a("Declaration"),null)).field("specifiers",[a("ExportSpecifier")],i.emptyArray).field("source",s(a("Literal"),null),i["null"]),a("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",a("Identifier")),a("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",a("Identifier")),a("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",a("Identifier")),a("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",s(a("Identifier"),null)).field("source",a("Literal")),a("CommentBlock").bases("Comment").build("value","leading","trailing"),a("CommentLine").bases("Comment").build("value","leading","trailing")},{565:565,574:574,575:575}],562:[function(e,t,r){var n=e(575),i=n.Type,a=i.def,s=i.or,o=e(574),u=o.defaults,p=o.geq;a("Printable").field("loc",s(a("SourceLocation"),null),u["null"],!0),a("Node").bases("Printable").field("type",String).field("comments",s([a("Comment")],null),u["null"],!0),a("SourceLocation").build("start","end","source").field("start",a("Position")).field("end",a("Position")).field("source",s(String,null),u["null"]),a("Position").build("line","column").field("line",p(1)).field("column",p(0)),a("File").bases("Node").build("program").field("program",a("Program")),a("Program").bases("Node").build("body").field("body",[a("Statement")]),a("Function").bases("Node").field("id",s(a("Identifier"),null),u["null"]).field("params",[a("Pattern")]).field("body",a("BlockStatement")),a("Statement").bases("Node"),a("EmptyStatement").bases("Statement").build(),a("BlockStatement").bases("Statement").build("body").field("body",[a("Statement")]),a("ExpressionStatement").bases("Statement").build("expression").field("expression",a("Expression")),a("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",a("Expression")).field("consequent",a("Statement")).field("alternate",s(a("Statement"),null),u["null"]),a("LabeledStatement").bases("Statement").build("label","body").field("label",a("Identifier")).field("body",a("Statement")),a("BreakStatement").bases("Statement").build("label").field("label",s(a("Identifier"),null),u["null"]),a("ContinueStatement").bases("Statement").build("label").field("label",s(a("Identifier"),null),u["null"]),a("WithStatement").bases("Statement").build("object","body").field("object",a("Expression")).field("body",a("Statement")),a("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",a("Expression")).field("cases",[a("SwitchCase")]).field("lexical",Boolean,u["false"]),a("ReturnStatement").bases("Statement").build("argument").field("argument",s(a("Expression"),null)),a("ThrowStatement").bases("Statement").build("argument").field("argument",a("Expression")),a("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",a("BlockStatement")).field("handler",s(a("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[a("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[a("CatchClause")],u.emptyArray).field("finalizer",s(a("BlockStatement"),null),u["null"]),a("CatchClause").bases("Node").build("param","guard","body").field("param",a("Pattern")).field("guard",s(a("Expression"),null),u["null"]).field("body",a("BlockStatement")),a("WhileStatement").bases("Statement").build("test","body").field("test",a("Expression")).field("body",a("Statement")),a("DoWhileStatement").bases("Statement").build("body","test").field("body",a("Statement")).field("test",a("Expression")),a("ForStatement").bases("Statement").build("init","test","update","body").field("init",s(a("VariableDeclaration"),a("Expression"),null)).field("test",s(a("Expression"),null)).field("update",s(a("Expression"),null)).field("body",a("Statement")),a("ForInStatement").bases("Statement").build("left","right","body").field("left",s(a("VariableDeclaration"),a("Expression"))).field("right",a("Expression")).field("body",a("Statement")),a("DebuggerStatement").bases("Statement").build(),a("Declaration").bases("Statement"),a("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",a("Identifier")),a("FunctionExpression").bases("Function","Expression").build("id","params","body"),a("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",s("var","let","const")).field("declarations",[a("VariableDeclarator")]),a("VariableDeclarator").bases("Node").build("id","init").field("id",a("Pattern")).field("init",s(a("Expression"),null)),a("Expression").bases("Node","Pattern"),a("ThisExpression").bases("Expression").build(),a("ArrayExpression").bases("Expression").build("elements").field("elements",[s(a("Expression"),null)]),a("ObjectExpression").bases("Expression").build("properties").field("properties",[a("Property")]),a("Property").bases("Node").build("kind","key","value").field("kind",s("init","get","set")).field("key",s(a("Literal"),a("Identifier"))).field("value",a("Expression")),a("SequenceExpression").bases("Expression").build("expressions").field("expressions",[a("Expression")]);var l=s("-","+","!","~","typeof","void","delete");a("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",l).field("argument",a("Expression")).field("prefix",Boolean,u["true"]);var c=s("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");a("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",c).field("left",a("Expression")).field("right",a("Expression"));var f=s("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");a("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",a("Pattern")).field("right",a("Expression"));var d=s("++","--");a("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",d).field("argument",a("Expression")).field("prefix",Boolean);var h=s("||","&&");a("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",a("Expression")).field("right",a("Expression")),a("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",a("Expression")).field("consequent",a("Expression")).field("alternate",a("Expression")),a("NewExpression").bases("Expression").build("callee","arguments").field("callee",a("Expression")).field("arguments",[a("Expression")]),a("CallExpression").bases("Expression").build("callee","arguments").field("callee",a("Expression")).field("arguments",[a("Expression")]),a("MemberExpression").bases("Expression").build("object","property","computed").field("object",a("Expression")).field("property",s(a("Identifier"),a("Expression"))).field("computed",Boolean,u["false"]),a("Pattern").bases("Node"),a("SwitchCase").bases("Node").build("test","consequent").field("test",s(a("Expression"),null)).field("consequent",[a("Statement")]),a("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),a("Literal").bases("Node","Expression").build("value").field("value",s(String,Boolean,null,Number,RegExp)).field("regex",s({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";return this.value.ignoreCase&&(e+="i"),this.value.multiline&&(e+="m"),this.value.global&&(e+="g"),{pattern:this.value.source,flags:e}}return null}),a("Comment").bases("Printable").field("value",String).field("leading",Boolean,u["true"]).field("trailing",Boolean,u["false"])},{574:574,575:575}],563:[function(e,t,r){e(562);var n=e(575),i=n.Type.def,a=n.Type.or;i("XMLDefaultDeclaration").bases("Declaration").field("namespace",i("Expression")),i("XMLAnyName").bases("Expression"),i("XMLQualifiedIdentifier").bases("Expression").field("left",a(i("Identifier"),i("XMLAnyName"))).field("right",a(i("Identifier"),i("Expression"))).field("computed",Boolean),i("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",a(i("Identifier"),i("Expression"))).field("computed",Boolean),i("XMLAttributeSelector").bases("Expression").field("attribute",i("Expression")),i("XMLFilterExpression").bases("Expression").field("left",i("Expression")).field("right",i("Expression")),i("XMLElement").bases("XML","Expression").field("contents",[i("XML")]),i("XMLList").bases("XML","Expression").field("contents",[i("XML")]),i("XML").bases("Node"),i("XMLEscape").bases("XML").field("expression",i("Expression")),i("XMLText").bases("XML").field("text",String),i("XMLStartTag").bases("XML").field("contents",[i("XML")]),i("XMLEndTag").bases("XML").field("contents",[i("XML")]),i("XMLPointTag").bases("XML").field("contents",[i("XML")]),i("XMLName").bases("XML").field("contents",a(String,[i("XML")])),i("XMLAttribute").bases("XML").field("value",String),i("XMLCdata").bases("XML").field("contents",String),i("XMLComment").bases("XML").field("contents",String),i("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",a(String,null))},{562:562,575:575}],564:[function(e,t,r){e(562);var n=e(575),i=n.Type.def,a=n.Type.or,s=e(574).defaults;i("Function").field("generator",Boolean,s["false"]).field("expression",Boolean,s["false"]).field("defaults",[a(i("Expression"),null)],s.emptyArray).field("rest",a(i("Identifier"),null),s["null"]),i("RestElement").bases("Pattern").build("argument").field("argument",i("Pattern")),i("SpreadElementPattern").bases("Pattern").build("argument").field("argument",i("Pattern")),i("FunctionDeclaration").build("id","params","body","generator","expression"),i("FunctionExpression").build("id","params","body","generator","expression"),i("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s["null"]).field("body",a(i("BlockStatement"),i("Expression"))).field("generator",!1,s["false"]),i("YieldExpression").bases("Expression").build("argument","delegate").field("argument",a(i("Expression"),null)).field("delegate",Boolean,s["false"]),i("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",i("Expression")).field("blocks",[i("ComprehensionBlock")]).field("filter",a(i("Expression"),null)),i("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",i("Expression")).field("blocks",[i("ComprehensionBlock")]).field("filter",a(i("Expression"),null)),i("ComprehensionBlock").bases("Node").build("left","right","each").field("left",i("Pattern")).field("right",i("Expression")).field("each",Boolean),i("Property").field("key",a(i("Literal"),i("Identifier"),i("Expression"))).field("value",a(i("Expression"),i("Pattern"))).field("method",Boolean,s["false"]).field("shorthand",Boolean,s["false"]).field("computed",Boolean,s["false"]),i("PropertyPattern").bases("Pattern").build("key","pattern").field("key",a(i("Literal"),i("Identifier"),i("Expression"))).field("pattern",i("Pattern")).field("computed",Boolean,s["false"]),i("ObjectPattern").bases("Pattern").build("properties").field("properties",[a(i("PropertyPattern"),i("Property"))]),i("ArrayPattern").bases("Pattern").build("elements").field("elements",[a(i("Pattern"),null)]),i("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",a("constructor","method","get","set")).field("key",a(i("Literal"),i("Identifier"),i("Expression"))).field("value",i("Function")).field("computed",Boolean,s["false"]).field("static",Boolean,s["false"]),i("SpreadElement").bases("Node").build("argument").field("argument",i("Expression")),i("ArrayExpression").field("elements",[a(i("Expression"),i("SpreadElement"),i("RestElement"),null)]),i("NewExpression").field("arguments",[a(i("Expression"),i("SpreadElement"))]),i("CallExpression").field("arguments",[a(i("Expression"),i("SpreadElement"))]),i("AssignmentPattern").bases("Pattern").build("left","right").field("left",i("Pattern")).field("right",i("Expression"));var o=a(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"));i("ClassProperty").bases("Declaration").build("key").field("key",a(i("Literal"),i("Identifier"),i("Expression"))).field("computed",Boolean,s["false"]),i("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",o),i("ClassBody").bases("Declaration").build("body").field("body",[o]),i("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",a(i("Identifier"),null)).field("body",i("ClassBody")).field("superClass",a(i("Expression"),null),s["null"]),i("ClassExpression").bases("Expression").build("id","body","superClass").field("id",a(i("Identifier"),null),s["null"]).field("body",i("ClassBody")).field("superClass",a(i("Expression"),null),s["null"]).field("implements",[i("ClassImplements")],s.emptyArray),i("ClassImplements").bases("Node").build("id").field("id",i("Identifier")).field("superClass",a(i("Expression"),null),s["null"]),i("Specifier").bases("Node"),i("ModuleSpecifier").bases("Specifier").field("local",a(i("Identifier"),null),s["null"]).field("id",a(i("Identifier"),null),s["null"]).field("name",a(i("Identifier"),null),s["null"]),i("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",i("Expression")).field("quasi",i("TemplateLiteral")),i("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[i("TemplateElement")]).field("expressions",[i("Expression")]),i("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)},{562:562,574:574,575:575}],565:[function(e,t,r){e(564);var n=e(575),i=n.Type.def,a=n.Type.or,s=(n.builtInTypes,e(574).defaults);i("Function").field("async",Boolean,s["false"]),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ObjectExpression").field("properties",[a(i("Property"),i("SpreadProperty"))]),i("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",i("Pattern")),i("ObjectPattern").field("properties",[a(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"))]),i("AwaitExpression").bases("Expression").build("argument","all").field("argument",a(i("Expression"),null)).field("all",Boolean,s["false"])},{564:564,574:574,575:575}],566:[function(e,t,r){e(565);var n=e(575),i=e(574).defaults,a=n.Type.def,s=n.Type.or;a("VariableDeclaration").field("declarations",[s(a("VariableDeclarator"),a("Identifier"))]),a("Property").field("value",s(a("Expression"),a("Pattern"))),a("ArrayPattern").field("elements",[s(a("Pattern"),a("SpreadElement"),null)]),a("ObjectPattern").field("properties",[s(a("Property"),a("PropertyPattern"),a("SpreadPropertyPattern"),a("SpreadProperty"))]),a("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),a("ExportBatchSpecifier").bases("Specifier").build(),a("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),a("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),a("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),a("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(a("Declaration"),a("Expression"),null)).field("specifiers",[s(a("ExportSpecifier"),a("ExportBatchSpecifier"))],i.emptyArray).field("source",s(a("Literal"),null),i["null"]),a("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[s(a("ImportSpecifier"),a("ImportNamespaceSpecifier"),a("ImportDefaultSpecifier"))],i.emptyArray).field("source",a("Literal")),a("Block").bases("Comment").build("value","leading","trailing"),a("Line").bases("Comment").build("value","leading","trailing")},{565:565,574:574,575:575}],567:[function(e,t,r){e(565);var n=e(575),i=n.Type.def,a=n.Type.or,s=e(574).defaults;i("JSXAttribute").bases("Node").build("name","value").field("name",a(i("JSXIdentifier"),i("JSXNamespacedName"))).field("value",a(i("Literal"),i("JSXExpressionContainer"),null),s["null"]),i("JSXIdentifier").bases("Identifier").build("name").field("name",String),i("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",i("JSXIdentifier")).field("name",i("JSXIdentifier")),i("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",a(i("JSXIdentifier"),i("JSXMemberExpression"))).field("property",i("JSXIdentifier")).field("computed",Boolean,s["false"]);var o=a(i("JSXIdentifier"),i("JSXNamespacedName"),i("JSXMemberExpression"));i("JSXSpreadAttribute").bases("Node").build("argument").field("argument",i("Expression"));var u=[a(i("JSXAttribute"),i("JSXSpreadAttribute"))];i("JSXExpressionContainer").bases("Expression").build("expression").field("expression",i("Expression")),i("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",i("JSXOpeningElement")).field("closingElement",a(i("JSXClosingElement"),null),s["null"]).field("children",[a(i("JSXElement"),i("JSXExpressionContainer"),i("JSXText"),i("Literal"))],s.emptyArray).field("name",o,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",u,function(){return this.openingElement.attributes},!0),i("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",o).field("attributes",u,s.emptyArray).field("selfClosing",Boolean,s["false"]),i("JSXClosingElement").bases("Node").build("name").field("name",o),i("JSXText").bases("Literal").build("value").field("value",String),i("JSXEmptyExpression").bases("Expression").build(),i("Type").bases("Node"),i("AnyTypeAnnotation").bases("Type").build(),i("MixedTypeAnnotation").bases("Type").build(),i("VoidTypeAnnotation").bases("Type").build(),i("NumberTypeAnnotation").bases("Type").build(),i("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),i("StringTypeAnnotation").bases("Type").build(),i("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),i("BooleanTypeAnnotation").bases("Type").build(),i("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),i("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",i("Type")),i("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",i("Type")),i("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[i("FunctionTypeParam")]).field("returnType",i("Type")).field("rest",a(i("FunctionTypeParam"),null)).field("typeParameters",a(i("TypeParameterDeclaration"),null)),i("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",i("Identifier")).field("typeAnnotation",i("Type")).field("optional",Boolean),i("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",i("Type")),i("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[i("ObjectTypeProperty")]).field("indexers",[i("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[i("ObjectTypeCallProperty")],s.emptyArray),i("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",a(i("Literal"),i("Identifier"))).field("value",i("Type")).field("optional",Boolean),i("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",i("Identifier")).field("key",i("Type")).field("value",i("Type")),i("ObjectTypeCallProperty").bases("Node").build("value").field("value",i("FunctionTypeAnnotation")).field("static",Boolean,!1),i("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",a(i("Identifier"),i("QualifiedTypeIdentifier"))).field("id",i("Identifier")),i("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",a(i("Identifier"),i("QualifiedTypeIdentifier"))).field("typeParameters",a(i("TypeParameterInstantiation"),null)),i("MemberTypeAnnotation").bases("Type").build("object","property").field("object",i("Identifier")).field("property",a(i("MemberTypeAnnotation"),i("GenericTypeAnnotation"))),i("UnionTypeAnnotation").bases("Type").build("types").field("types",[i("Type")]),i("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[i("Type")]),i("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",i("Type")),i("Identifier").field("typeAnnotation",a(i("TypeAnnotation"),null),s["null"]),i("TypeParameterDeclaration").bases("Node").build("params").field("params",[i("Identifier")]),i("TypeParameterInstantiation").bases("Node").build("params").field("params",[i("Type")]),i("Function").field("returnType",a(i("TypeAnnotation"),null),s["null"]).field("typeParameters",a(i("TypeParameterDeclaration"),null),s["null"]),i("ClassProperty").build("key","value","typeAnnotation","static").field("value",a(i("Expression"),null)).field("typeAnnotation",a(i("TypeAnnotation"),null)).field("static",Boolean,s["false"]),i("ClassImplements").field("typeParameters",a(i("TypeParameterInstantiation"),null),s["null"]),i("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",i("Identifier")).field("typeParameters",a(i("TypeParameterDeclaration"),null),s["null"]).field("body",i("ObjectTypeAnnotation")).field("extends",[i("InterfaceExtends")]),i("InterfaceExtends").bases("Node").build("id").field("id",i("Identifier")).field("typeParameters",a(i("TypeParameterInstantiation"),null)),i("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",i("Identifier")).field("typeParameters",a(i("TypeParameterDeclaration"),null)).field("right",i("Type")),i("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",i("Expression")).field("typeAnnotation",i("TypeAnnotation")),i("TupleTypeAnnotation").bases("Type").build("types").field("types",[i("Type")]),i("DeclareVariable").bases("Statement").build("id").field("id",i("Identifier")),i("DeclareFunction").bases("Statement").build("id").field("id",i("Identifier")),i("DeclareClass").bases("InterfaceDeclaration").build("id"),i("DeclareModule").bases("Statement").build("id","body").field("id",a(i("Identifier"),i("Literal"))).field("body",i("BlockStatement"))},{565:565,574:574,575:575}],568:[function(e,t,r){e(562);var n=e(575),i=n.Type.def,a=n.Type.or,s=e(574),o=s.geq,u=s.defaults;i("Function").field("body",a(i("BlockStatement"),i("Expression"))),i("ForInStatement").build("left","right","body","each").field("each",Boolean,u["false"]),i("ForOfStatement").bases("Statement").build("left","right","body").field("left",a(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("LetStatement").bases("Statement").build("head","body").field("head",[i("VariableDeclarator")]).field("body",i("Statement")),i("LetExpression").bases("Expression").build("head","body").field("head",[i("VariableDeclarator")]).field("body",i("Expression")),i("GraphExpression").bases("Expression").build("index","expression").field("index",o(0)).field("expression",i("Literal")),i("GraphIndexExpression").bases("Expression").build("index").field("index",o(0))},{562:562,574:574,575:575}],569:[function(e,t,r){function n(e,t,r){return c.check(r)?r.length=0:r=null,a(e,t,r)}function i(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function a(e,t,r){return e===t?!0:c.check(e)?s(e,t,r):f.check(e)?o(e,t,r):d.check(e)?d.check(t)&&+e===+t:h.check(e)?h.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t}function s(e,t,r){c.assert(e);var n=e.length;if(!c.check(t)||t.length!==n)return r&&r.push("length"),!1;for(var i=0;n>i;++i){if(r&&r.push(i),i in e!=i in t)return!1;if(!a(e[i],t[i],r))return!1;if(r){var s=r.pop();if(s!==i)throw new Error(""+s)}}return!0}function o(e,t,r){if(f.assert(e),!f.check(t))return!1;if(e.type!==t.type)return r&&r.push("type"),!1;var n=p(e),i=n.length,s=p(t),o=s.length;if(i===o){for(var u=0;i>u;++u){var c=n[u],d=l(e,c),h=l(t,c);if(r&&r.push(c),!a(d,h,r))return!1;if(r){var y=r.pop();if(y!==c)throw new Error(""+y)}}return!0}if(!r)return!1;var g=Object.create(null);for(u=0;i>u;++u)g[n[u]]=!0;for(u=0;o>u;++u){if(c=s[u],!m.call(g,c))return r.push(c),!1;delete g[c]}for(c in g){r.push(c);break}return!1}var u=e(576),p=u.getFieldNames,l=u.getFieldValue,c=u.builtInTypes.array,f=u.builtInTypes.object,d=u.builtInTypes.Date,h=u.builtInTypes.RegExp,m=Object.prototype.hasOwnProperty;n.assert=function(e,t){var r=[];if(!n(e,t,r)){if(0!==r.length)throw new Error("Nodes differ in the following path: "+r.map(i).join(""));if(e!==t)throw new Error("Nodes must be equal")}},t.exports=n},{576:576}],570:[function(e,t,r){function n(e,t,r){if(!(this instanceof n))throw new Error("NodePath constructor cannot be invoked without 'new'");h.call(this,e,t,r)}function i(e){return l.BinaryExpression.check(e)||l.LogicalExpression.check(e)}function a(e){return l.CallExpression.check(e)?!0:d.check(e)?e.some(a):l.Node.check(e)?p.someField(e,function(e,t){return a(t)}):!1}function s(e){for(var t,r;e.parent;e=e.parent){if(t=e.node,r=e.parent.node,l.BlockStatement.check(r)&&"body"===e.parent.name&&0===e.name){if(r.body[0]!==t)throw new Error("Nodes must be equal");return!0}if(l.ExpressionStatement.check(r)&&"expression"===e.name){if(r.expression!==t)throw new Error("Nodes must be equal");return!0}if(l.SequenceExpression.check(r)&&"expressions"===e.parent.name&&0===e.name){if(r.expressions[0]!==t)throw new Error("Nodes must be equal")}else if(l.CallExpression.check(r)&&"callee"===e.name){if(r.callee!==t)throw new Error("Nodes must be equal")}else if(l.MemberExpression.check(r)&&"object"===e.name){if(r.object!==t)throw new Error("Nodes must be equal")}else if(l.ConditionalExpression.check(r)&&"test"===e.name){if(r.test!==t)throw new Error("Nodes must be equal")}else if(i(r)&&"left"===e.name){if(r.left!==t)throw new Error("Nodes must be equal")}else{if(!l.UnaryExpression.check(r)||r.prefix||"argument"!==e.name)return!1;if(r.argument!==t)throw new Error("Nodes must be equal")}}return!0}function o(e){if(l.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||0===t.length)return e.prune()}else if(l.ExpressionStatement.check(e.node)){if(!e.get("expression").value)return e.prune()}else l.IfStatement.check(e.node)&&u(e);return e}function u(e){var t=e.get("test").value,r=e.get("alternate").value,n=e.get("consequent").value;if(n||r){if(!n&&r){var i=c.unaryExpression("!",t,!0);l.UnaryExpression.check(t)&&"!"===t.operator&&(i=t.argument),e.get("test").replace(i),e.get("consequent").replace(r),e.get("alternate").replace()}}else{var a=c.expressionStatement(t);e.replace(a)}}var p=e(575),l=p.namedTypes,c=p.builders,f=p.builtInTypes.number,d=p.builtInTypes.array,h=e(572),m=e(573),y=n.prototype=Object.create(h.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(y,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),y.replace=function(){return delete this.node,delete this.parent,delete this.scope,h.prototype.replace.apply(this,arguments)},y.prune=function(){var e=this.parent;return this.replace(),o(e)},y._computeNode=function(){var e=this.value;if(l.Node.check(e))return e;var t=this.parentPath;return t&&t.node||null},y._computeParent=function(){var e=this.value,t=this.parentPath;if(!l.Node.check(e)){for(;t&&!l.Node.check(t.value);)t=t.parentPath;t&&(t=t.parentPath)}for(;t&&!l.Node.check(t.value);)t=t.parentPath;return t||null},y._computeScope=function(){var e=this.value,t=this.parentPath,r=t&&t.scope;return l.Node.check(e)&&m.isEstablishedBy(e)&&(r=new m(this,r)),r||null},y.getValueProperty=function(e){return p.getFieldValue(this.value,e)},y.needsParens=function(e){var t=this.parentPath;if(!t)return!1;var r=this.value;if(!l.Expression.check(r))return!1;if("Identifier"===r.type)return!1;for(;!l.Node.check(t.value);)if(t=t.parentPath,!t)return!1;var n=t.value;switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===n.type&&"object"===this.name&&n.object===r; case"BinaryExpression":case"LogicalExpression":switch(n.type){case"CallExpression":return"callee"===this.name&&n.callee===r;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===this.name&&n.object===r;case"BinaryExpression":case"LogicalExpression":var i=n.operator,t=g[i],s=r.operator,o=g[s];if(t>o)return!0;if(t===o&&"right"===this.name){if(n.right!==r)throw new Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(n.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(n.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===n.type&&f.check(r.value)&&"object"===this.name&&n.object===r;case"AssignmentExpression":case"ConditionalExpression":switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&n.callee===r;case"ConditionalExpression":return"test"===this.name&&n.test===r;case"MemberExpression":return"object"===this.name&&n.object===r;default:return!1}default:if("NewExpression"===n.type&&"callee"===this.name&&n.callee===r)return a(r)}return e!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement()?!0:!1};var g={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){g[e]=t})}),y.canBeFirstInStatement=function(){var e=this.node;return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},y.firstInStatement=function(){return s(this)},t.exports=n},{572:572,573:573,575:575}],571:[function(e,t,r){function n(){if(!(this instanceof n))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=i(this),this._shouldVisitComments=h.call(this._methodNameTable,"Block")||h.call(this._methodNameTable,"Line"),this.Context=o(this),this._visiting=!1,this._changeReported=!1}function i(e){var t=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(t[r.slice("visit".length)]=!0);for(var n=p.computeSupertypeLookupTable(t),i=Object.create(null),t=Object.keys(n),a=t.length,s=0;a>s;++s){var o=t[s];r="visit"+n[o],d.check(e[r])&&(i[o]=r)}return i}function a(e,t){for(var r in t)h.call(t,r)&&(e[r]=t[r]);return e}function s(e,t){if(!(e instanceof l))throw new Error("");if(!(t instanceof n))throw new Error("");var r=e.value;if(c.check(r))e.each(t.visitWithoutReset,t);else if(f.check(r)){var i=p.getFieldNames(r);t._shouldVisitComments&&r.comments&&i.indexOf("comments")<0&&i.push("comments");for(var a=i.length,s=[],o=0;a>o;++o){var u=i[o];h.call(r,u)||(r[u]=p.getFieldValue(r,u)),s.push(e.get(u))}for(var o=0;a>o;++o)t.visitWithoutReset(s[o])}else;return e.value}function o(e){function t(r){if(!(this instanceof t))throw new Error("");if(!(this instanceof n))throw new Error("");if(!(r instanceof l))throw new Error("");Object.defineProperty(this,"visitor",{value:e,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=r,this.needToCallTraverse=!0,Object.seal(this)}if(!(e instanceof n))throw new Error("");var r=t.prototype=Object.create(e);return r.constructor=t,a(r,y),t}var u,p=e(575),l=e(570),c=(p.namedTypes.Printable,p.builtInTypes.array),f=p.builtInTypes.object,d=p.builtInTypes["function"],h=Object.prototype.hasOwnProperty;n.fromMethodsObject=function(e){function t(){if(!(this instanceof t))throw new Error("Visitor constructor cannot be invoked without 'new'");n.call(this)}if(e instanceof n)return e;if(!f.check(e))return new n;var r=t.prototype=Object.create(m);return r.constructor=t,a(r,e),a(t,n),d.assert(t.fromMethodsObject),d.assert(t.visit),new t},n.visit=function(e,t){return n.fromMethodsObject(t).visit(e)};var m=n.prototype;m.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var e=arguments.length,t=new Array(e),r=0;e>r;++r)t[r]=arguments[r];t[0]instanceof l||(t[0]=new l({root:t[0]}).get("root")),this.reset.apply(this,t);try{var n=this.visitWithoutReset(t[0]),i=!0}finally{if(this._visiting=!1,!i&&this._abortRequested)return t[0].value}return n},m.AbortRequest=function(){},m.abort=function(){var e=this;e._abortRequested=!0;var t=new e.AbortRequest;throw t.cancel=function(){e._abortRequested=!1},t},m.reset=function(e){},m.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);if(!(e instanceof l))throw new Error("");var t=e.value,r=t&&"object"==typeof t&&"string"==typeof t.type&&this._methodNameTable[t.type];if(!r)return s(e,this);var n=this.acquireContext(e);try{return n.invokeVisitorMethod(r)}finally{this.releaseContext(n)}},m.acquireContext=function(e){return 0===this._reusableContextStack.length?new this.Context(e):this._reusableContextStack.pop().reset(e)},m.releaseContext=function(e){if(!(e instanceof this.Context))throw new Error("");this._reusableContextStack.push(e),e.currentPath=null},m.reportChanged=function(){this._changeReported=!0},m.wasChangeReported=function(){return this._changeReported};var y=Object.create(null);y.reset=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof l))throw new Error("");return this.currentPath=e,this.needToCallTraverse=!0,this},y.invokeVisitorMethod=function(e){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof l))throw new Error("");var t=this.visitor[e].call(this,this.currentPath);if(t===!1?this.needToCallTraverse=!1:t!==u&&(this.currentPath=this.currentPath.replace(t)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+e);var r=this.currentPath;return r&&r.value},y.traverse=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof l))throw new Error("");if(!(this.currentPath instanceof l))throw new Error("");return this.needToCallTraverse=!1,s(e,n.fromMethodsObject(t||this.visitor))},y.visit=function(e,t){if(!(this instanceof this.Context))throw new Error("");if(!(e instanceof l))throw new Error("");if(!(this.currentPath instanceof l))throw new Error("");return this.needToCallTraverse=!1,n.fromMethodsObject(t||this.visitor).visitWithoutReset(e)},y.reportChanged=function(){this.visitor.reportChanged()},y.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},t.exports=n},{570:570,575:575}],572:[function(e,t,r){function n(e,t,r){if(!(this instanceof n))throw new Error("Path constructor cannot be invoked without 'new'");if(t){if(!(t instanceof n))throw new Error("")}else t=null,r=null;this.value=e,this.parentPath=t,this.name=r,this.__childCache=null}function i(e){return e.__childCache||(e.__childCache=Object.create(null))}function a(e,t){var r=i(e),n=e.getValueProperty(t),a=r[t];return l.call(r,t)&&a.value===n||(a=r[t]=new e.constructor(n,e,t)),a}function s(){}function o(e,t,r,n){if(f.assert(e.value),0===t)return s;var a=e.value.length;if(1>a)return s;var o=arguments.length;2===o?(r=0,n=a):3===o?(r=Math.max(r,0),n=a):(r=Math.max(r,0),n=Math.min(n,a)),d.assert(r),d.assert(n);for(var u=Object.create(null),p=i(e),c=r;n>c;++c)if(l.call(e.value,c)){var h=e.get(c);if(h.name!==c)throw new Error("");var m=c+t;h.name=m,u[m]=h,delete p[c]}return delete p.length,function(){for(var t in u){var r=u[t];if(r.name!==+t)throw new Error("");p[t]=r,e.value[t]=r.value}}}function u(e){if(!(e instanceof n))throw new Error("");var t=e.parentPath;if(!t)return e;var r=t.value,a=i(t);if(r[e.name]===e.value)a[e.name]=e;else if(f.check(r)){var s=r.indexOf(e.value);s>=0&&(a[e.name=s]=e)}else r[e.name]=e.value,a[e.name]=e;if(r[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("");return e}var p=Object.prototype,l=p.hasOwnProperty,c=e(575),f=c.builtInTypes.array,d=c.builtInTypes.number,h=Array.prototype,m=(h.slice,h.map,n.prototype);m.getValueProperty=function(e){return this.value[e]},m.get=function(e){for(var t=this,r=arguments,n=r.length,i=0;n>i;++i)t=a(t,r[i]);return t},m.each=function(e,t){for(var r=[],n=this.value.length,i=0,i=0;n>i;++i)l.call(this.value,i)&&(r[i]=this.get(i));for(t=t||this,i=0;n>i;++i)l.call(r,i)&&e.call(t,r[i])},m.map=function(e,t){var r=[];return this.each(function(t){r.push(e.call(this,t))},t),r},m.filter=function(e,t){var r=[];return this.each(function(t){e.call(this,t)&&r.push(t)},t),r},m.shift=function(){var e=o(this,-1),t=this.value.shift();return e(),t},m.unshift=function(e){var t=o(this,arguments.length),r=this.value.unshift.apply(this.value,arguments);return t(),r},m.push=function(e){return f.assert(this.value),delete i(this).length,this.value.push.apply(this.value,arguments)},m.pop=function(){f.assert(this.value);var e=i(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},m.insertAt=function(e,t){var r=arguments.length,n=o(this,r-1,e);if(n===s)return this;e=Math.max(e,0);for(var i=1;r>i;++i)this.value[e+i-1]=arguments[i];return n(),this},m.insertBefore=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name],i=0;r>i;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},m.insertAfter=function(e){for(var t=this.parentPath,r=arguments.length,n=[this.name+1],i=0;r>i;++i)n.push(arguments[i]);return t.insertAt.apply(t,n)},m.replace=function(e){var t=[],r=this.parentPath.value,n=i(this.parentPath),a=arguments.length;if(u(this),f.check(r)){for(var s=r.length,p=o(this.parentPath,a-1,this.name+1),l=[this.name,1],c=0;a>c;++c)l.push(arguments[c]);var d=r.splice.apply(r,l);if(d[0]!==this.value)throw new Error("");if(r.length!==s-1+a)throw new Error("");if(p(),0===a)delete this.value,delete n[this.name],this.__childCache=null;else{if(r[this.name]!==e)throw new Error("");for(this.value!==e&&(this.value=e,this.__childCache=null),c=0;a>c;++c)t.push(this.parentPath.get(this.name+c));if(t[0]!==this)throw new Error("")}}else if(1===a)this.value!==e&&(this.__childCache=null),this.value=r[this.name]=e,t.push(this);else{if(0!==a)throw new Error("Could not replace path");delete r[this.name],delete this.value,this.__childCache=null}return t},t.exports=n},{575:575}],573:[function(e,t,r){function n(t,r){if(!(this instanceof n))throw new Error("Scope constructor cannot be invoked without 'new'");if(!(t instanceof e(570)))throw new Error("");g.assert(t.value);var i;if(r){if(!(r instanceof n))throw new Error("");i=r.depth+1}else r=null,i=0;Object.defineProperties(this,{path:{value:t},node:{value:t.value},isGlobal:{value:!r,enumerable:!0},depth:{value:i},parent:{value:r},bindings:{value:{}}})}function i(e,t){var r=e.value;g.assert(r),l.CatchClause.check(r)?o(e.get("param"),t):a(e,t)}function a(e,t){var r=e.value;e.parent&&l.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&o(e.parent.get("id"),t),r&&(d.check(r)?e.each(function(e){s(e,t)}):l.Function.check(r)?(e.get("params").each(function(e){o(e,t)}),s(e.get("body"),t)):l.VariableDeclarator.check(r)?(o(e.get("id"),t),s(e.get("init"),t)):"ImportSpecifier"===r.type||"ImportNamespaceSpecifier"===r.type||"ImportDefaultSpecifier"===r.type?o(e.get(r.local?"local":r.name?"name":"id"),t):c.check(r)&&!f.check(r)&&u.eachField(r,function(r,n){var i=e.get(r);if(i.value!==n)throw new Error("");s(i,t)}))}function s(e,t){var r=e.value;if(!r||f.check(r));else if(l.FunctionDeclaration.check(r))o(e.get("id"),t);else if(l.ClassDeclaration&&l.ClassDeclaration.check(r))o(e.get("id"),t);else if(g.check(r)){if(l.CatchClause.check(r)){var n=r.param.name,i=h.call(t,n);a(e.get("body"),t),i||delete t[n]}}else a(e,t)}function o(e,t){var r=e.value;l.Pattern.assert(r),l.Identifier.check(r)?h.call(t,r.name)?t[r.name].push(e):t[r.name]=[e]:l.ObjectPattern&&l.ObjectPattern.check(r)?e.get("properties").each(function(e){var r=e.value;l.Pattern.check(r)?o(e,t):l.Property.check(r)?o(e.get("value"),t):l.SpreadProperty&&l.SpreadProperty.check(r)&&o(e.get("argument"),t)}):l.ArrayPattern&&l.ArrayPattern.check(r)?e.get("elements").each(function(e){var r=e.value;l.Pattern.check(r)?o(e,t):l.SpreadElement&&l.SpreadElement.check(r)&&o(e.get("argument"),t)}):l.PropertyPattern&&l.PropertyPattern.check(r)?o(e.get("pattern"),t):(l.SpreadElementPattern&&l.SpreadElementPattern.check(r)||l.SpreadPropertyPattern&&l.SpreadPropertyPattern.check(r))&&o(e.get("argument"),t)}var u=e(575),p=u.Type,l=u.namedTypes,c=l.Node,f=l.Expression,d=u.builtInTypes.array,h=Object.prototype.hasOwnProperty,m=u.builders,y=[l.Program,l.Function,l.CatchClause],g=p.or.apply(p,y);n.isEstablishedBy=function(e){return g.check(e)};var v=n.prototype;v.didScan=!1,v.declares=function(e){return this.scan(),h.call(this.bindings,e)},v.declareTemporary=function(e){if(e){if(!/^[a-z$_]/i.test(e))throw new Error("")}else e="t$";e+=this.depth.toString(36)+"$",this.scan();for(var t=0;this.declares(e+t);)++t;var r=e+t;return this.bindings[r]=u.builders.identifier(r)},v.injectTemporary=function(e,t){e||(e=this.declareTemporary());var r=this.path.get("body");return l.BlockStatement.check(r.value)&&(r=r.get("body")),r.unshift(m.variableDeclaration("var",[m.variableDeclarator(e,t||null)])),e},v.scan=function(e){if(e||!this.didScan){for(var t in this.bindings)delete this.bindings[t];i(this.path,this.bindings),this.didScan=!0}},v.getBindings=function(){return this.scan(),this.bindings},v.lookup=function(e){for(var t=this;t&&!t.declares(e);t=t.parent);return t},v.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},t.exports=n},{570:570,575:575}],574:[function(e,t,r){var n=e(575),i=n.Type,a=n.builtInTypes,s=a.number;r.geq=function(e){return new i(function(t){return s.check(t)&&t>=e},s+" >= "+e)},r.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return!1},"true":function(){return!0},undefined:function(){}};var o=i.or(a.string,a.number,a["boolean"],a["null"],a.undefined);r.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},o.toString())},{575:575}],575:[function(e,t,r){function n(e,t){var r=this;if(!(r instanceof n))throw new Error("Type constructor cannot be invoked without 'new'");if(b.call(e)!==E)throw new Error(e+" is not a function");var i=b.call(t);if(i!==E&&i!==x)throw new Error(t+" is neither a function nor a string");Object.defineProperties(r,{name:{value:t},check:{value:function(t,n){var i=e.call(r,t,n);return!i&&n&&b.call(n)===E&&n(r,t),i}}})}function i(e){return k.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":F.check(e)?"["+e.map(i).join(", ")+"]":JSON.stringify(e)}function a(e,t){var r=b.call(e),i=new n(function(e){return b.call(e)===r},t);return w[t]=i,e&&"function"==typeof e.constructor&&(D.push(e.constructor),C.push(i)),i}function s(e,t){if(e instanceof n)return e;if(e instanceof u)return e.type;if(F.check(e))return n.fromArray(e);if(k.check(e))return n.fromObject(e);if(_.check(e)){var r=D.indexOf(e);return r>=0?C[r]:new n(e,t)}return new n(function(t){return t===e},B.check(t)?function(){return e+""}:t)}function o(e,t,r,n){var i=this;if(!(i instanceof o))throw new Error("Field constructor cannot be invoked without 'new'");I.assert(e),t=s(t);var a={name:{value:e},type:{value:t},hidden:{value:!!n}};_.check(r)&&(a.defaultFn={value:r}),Object.defineProperties(i,a)}function u(e){var t=this;if(!(t instanceof u))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(t,{typeName:{value:e},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new n(function(e,r){return t.check(e,r)},e)}})}function p(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function l(e){return e=p(e),e.replace(/(Expression)?$/,"Statement")}function c(e){var t=u.fromValue(e);if(t)return t.fieldNames.slice(0);if("type"in e)throw new Error("did not recognize object of type "+JSON.stringify(e.type));return Object.keys(e)}function f(e,t){var r=u.fromValue(e);if(r){var n=r.allFields[t];if(n)return n.getValue(e)}return e[t]}function d(e){var t=l(e);if(!j[t]){var r=j[p(e)];r&&(j[t]=function(){return j.expressionStatement(r.apply(j,arguments))})}}function h(e,t){t.length=0,t.push(e);for(var r=Object.create(null),n=0;n<t.length;++n){e=t[n];var i=M[e];if(i.finalized!==!0)throw new Error("");S.call(r,e)&&delete t[r[e]],r[e]=n,t.push.apply(t,i.baseNames)}for(var a=0,s=a,o=t.length;o>s;++s)S.call(t,s)&&(t[a++]=t[s]);t.length=a}function m(e,t){return Object.keys(t).forEach(function(r){e[r]=t[r]}),e}var y=Array.prototype,g=y.slice,v=(y.map,y.forEach,Object.prototype),b=v.toString,E=b.call(function(){}),x=b.call(""),S=v.hasOwnProperty,A=n.prototype;r.Type=n,A.assert=function(e,t){if(!this.check(e,t)){var r=i(e);throw new Error(r+" does not match type "+this)}return!0},A.toString=function(){var e=this.name;return I.check(e)?e:_.check(e)?e.call(this)+"":e+" type"};var D=[],C=[],w={};r.builtInTypes=w;var I=a("truthy","string"),_=a(function(){},"function"),F=a([],"array"),k=a({},"object"),P=(a(/./,"RegExp"),a(new Date,"Date"),a(3,"number")),B=(a(!0,"boolean"),a(null,"null"),a(void 0,"undefined"));n.or=function(){for(var e=[],t=arguments.length,r=0;t>r;++r)e.push(s(arguments[r]));return new n(function(r,n){for(var i=0;t>i;++i)if(e[i].check(r,n))return!0;return!1},function(){return e.join(" | ")})},n.fromArray=function(e){if(!F.check(e))throw new Error("");if(1!==e.length)throw new Error("only one element type is permitted for typed arrays");return s(e[0]).arrayOf()},A.arrayOf=function(){var e=this;return new n(function(t,r){return F.check(t)&&t.every(function(t){return e.check(t,r)})},function(){return"["+e+"]"})},n.fromObject=function(e){var t=Object.keys(e).map(function(t){return new o(t,e[t])});return new n(function(e,r){return k.check(e)&&t.every(function(t){return t.type.check(e[t.name],r)})},function(){return"{ "+t.join(", ")+" }"})};var T=o.prototype;T.toString=function(){return JSON.stringify(this.name)+": "+this.type},T.getValue=function(e){var t=e[this.name];return B.check(t)?(this.defaultFn&&(t=this.defaultFn.call(e)),t):t},n.def=function(e){return I.assert(e),S.call(M,e)?M[e]:M[e]=new u(e)};var M=Object.create(null);u.fromValue=function(e){if(e&&"object"==typeof e){var t=e.type;if("string"==typeof t&&S.call(M,t)){var r=M[t];if(r.finalized)return r}}return null};var O=u.prototype;O.isSupertypeOf=function(e){if(e instanceof u){if(this.finalized!==!0||e.finalized!==!0)throw new Error("");return S.call(e.allSupertypes,this.typeName)}throw new Error(e+" is not a Def")},r.getSupertypeNames=function(e){if(!S.call(M,e))throw new Error("");var t=M[e];if(t.finalized!==!0)throw new Error("");return t.supertypeList.slice(1)},r.computeSupertypeLookupTable=function(e){for(var t={},r=Object.keys(M),n=r.length,i=0;n>i;++i){var a=r[i],s=M[a];if(s.finalized!==!0)throw new Error(""+a);for(var o=0;o<s.supertypeList.length;++o){var u=s.supertypeList[o];if(S.call(e,u)){t[a]=u;break}}}return t},O.checkAllFields=function(e,t){function r(r){var i=n[r],a=i.type,s=i.getValue(e);return a.check(s,t)}var n=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);return k.check(e)&&Object.keys(n).every(r)},O.check=function(e,t){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(!k.check(e))return!1;var r=u.fromValue(e);return r?t&&r===this?this.checkAllFields(e,t):this.isSupertypeOf(r)?t?r.checkAllFields(e,t)&&this.checkAllFields(e,!1):!0:!1:"SourceLocation"===this.typeName||"Position"===this.typeName?this.checkAllFields(e,t):!1},O.bases=function(){var e=g.call(arguments),t=this.baseNames;if(this.finalized){if(e.length!==t.length)throw new Error("");for(var r=0;r<e.length;r++)if(e[r]!==t[r])throw new Error("");return this}return e.forEach(function(e){I.assert(e),t.indexOf(e)<0&&t.push(e)}),this},Object.defineProperty(O,"buildable",{value:!1});var j={};r.builders=j;var L={};r.defineMethod=function(e,t){var r=L[e];return B.check(t)?delete L[e]:(_.assert(t),Object.defineProperty(L,e,{enumerable:!0,configurable:!0,value:t})),r};var N=I.arrayOf();O.build=function(){var e=this,t=g.call(arguments);return N.assert(t),Object.defineProperty(e,"buildParams",{value:t,writable:!1,enumerable:!1,configurable:!0}),e.buildable?e:(e.field("type",String,function(){return e.typeName}),Object.defineProperty(e,"buildable",{value:!0}),Object.defineProperty(j,p(e.typeName),{enumerable:!0,value:function(){function t(t,s){if(!S.call(a,t)){var o=e.allFields;if(!S.call(o,t))throw new Error(""+t);var u,p=o[t],l=p.type;if(P.check(s)&&n>s)u=r[s];else{if(!p.defaultFn){var c="no value or default function given for field "+JSON.stringify(t)+" of "+e.typeName+"("+e.buildParams.map(function(e){return o[e]}).join(", ")+")";throw new Error(c)}u=p.defaultFn.call(a)}if(!l.check(u))throw new Error(i(u)+" does not match field "+p+" of type "+e.typeName);a[t]=u}}var r=arguments,n=r.length,a=Object.create(L);if(!e.finalized)throw new Error("attempting to instantiate unfinalized type "+e.typeName);if(e.buildParams.forEach(function(e,r){t(e,r)}),Object.keys(e.allFields).forEach(function(e){t(e)}),a.type!==e.typeName)throw new Error("");return a}}),e)},r.getBuilderName=p,r.getStatementBuilderName=l,O.field=function(e,t,r,n){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(e)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[e]=new o(e,t,r,n),this)};var R={};r.namedTypes=R,r.getFieldNames=c,r.getFieldValue=f,r.eachField=function(e,t,r){c(e).forEach(function(r){t.call(this,r,f(e,r))},r)},r.someField=function(e,t,r){return c(e).some(function(r){return t.call(this,r,f(e,r))},r)},Object.defineProperty(O,"finalized",{value:!1}),O.finalize=function(){var e=this;if(!e.finalized){var t=e.allFields,r=e.allSupertypes;e.baseNames.forEach(function(n){var i=M[n];if(!(i instanceof u)){var a="unknown supertype name "+JSON.stringify(n)+" for subtype "+JSON.stringify(e.typeName);throw new Error(a)}i.finalize(),m(t,i.allFields),m(r,i.allSupertypes)}),m(t,e.ownFields),r[e.typeName]=e,e.fieldNames.length=0;for(var n in t)S.call(t,n)&&!t[n].hidden&&e.fieldNames.push(n);Object.defineProperty(R,e.typeName,{enumerable:!0,value:e.type}),Object.defineProperty(e,"finalized",{value:!0}),h(e.typeName,e.supertypeList),e.buildable&&e.supertypeList.lastIndexOf("Expression")>=0&&d(e.typeName)}},r.finalize=function(){Object.keys(M).forEach(function(e){M[e].finalize()})}},{}],576:[function(e,t,r){var n=e(575);e(562),e(564),e(565),e(568),e(563),e(567),e(566),e(561),n.finalize(),r.Type=n.Type,r.builtInTypes=n.builtInTypes,r.namedTypes=n.namedTypes,r.builders=n.builders,r.defineMethod=n.defineMethod,r.getFieldNames=n.getFieldNames,r.getFieldValue=n.getFieldValue,r.eachField=n.eachField,r.someField=n.someField,r.getSupertypeNames=n.getSupertypeNames,r.astNodesAreEquivalent=e(569),r.finalize=n.finalize,r.NodePath=e(570),r.PathVisitor=e(571),r.visit=r.PathVisitor.visit},{561:561,562:562,563:563,564:564,565:565,566:566,567:567,568:568,569:569,570:570,571:571,575:575}],577:[function(e,t,r){(function(e,r){!function(r){"use strict";function n(e,t,r,n){var i=Object.create((t||a).prototype),s=new h(n||[]);return i._invoke=c(e,r,s),i}function i(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}function a(){}function s(){}function o(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function p(e){this.arg=e}function l(t){function r(e,r){var n=t[e](r),i=n.value;return i instanceof p?Promise.resolve(i.arg).then(a,s):Promise.resolve(i).then(function(e){return n.value=e,n})}function n(e,t){function n(){return r(e,t)}return i=i?i.then(n,n):new Promise(function(e){e(n())})}"object"==typeof e&&e.domain&&(r=e.domain.bind(r));var i,a=r.bind(t,"next"),s=r.bind(t,"throw");r.bind(t,"return");this._invoke=n}function c(e,t,r){var n=S;return function(a,s){if(n===D)throw new Error("Generator is already running");if(n===C){if("throw"===a)throw s;return y()}for(;;){var o=r.delegate;if(o){if("return"===a||"throw"===a&&o.iterator[a]===g){r.delegate=null;var u=o.iterator["return"];if(u){var p=i(u,o.iterator,s);if("throw"===p.type){a="throw",s=p.arg;continue}}if("return"===a)continue}var p=i(o.iterator[a],o.iterator,s);if("throw"===p.type){r.delegate=null,a="throw",s=p.arg;continue}a="next",s=g;var l=p.arg;if(!l.done)return n=A,l;r[o.resultName]=l.value,r.next=o.nextLoc,r.delegate=null}if("next"===a)n===A?r.sent=s:r.sent=g;else if("throw"===a){if(n===S)throw n=C,s;r.dispatchException(s)&&(a="next",s=g)}else"return"===a&&r.abrupt("return",s);n=D;var p=i(e,t,r);if("normal"===p.type){n=r.done?C:A;var l={value:p.arg,done:r.done};if(p.arg!==w)return l;r.delegate&&"next"===a&&(s=g)}else"throw"===p.type&&(n=C,a="throw",s=p.arg)}}}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function m(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function i(){for(;++r<e.length;)if(v.call(e,r))return i.value=e[r],i.done=!1,i;return i.value=g,i.done=!0,i};return n.next=n}}return{next:y}}function y(){return{value:g,done:!0}}var g,v=Object.prototype.hasOwnProperty,b="function"==typeof Symbol&&Symbol.iterator||"@@iterator",E="object"==typeof t,x=r.regeneratorRuntime;if(x)return void(E&&(t.exports=x));x=r.regeneratorRuntime=E?t.exports:{},x.wrap=n;var S="suspendedStart",A="suspendedYield",D="executing",C="completed",w={},I=o.prototype=a.prototype;s.prototype=I.constructor=o,o.constructor=s,s.displayName="GeneratorFunction",x.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return t?t===s||"GeneratorFunction"===(t.displayName||t.name):!1},x.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o,e.prototype=Object.create(I),e},x.awrap=function(e){return new p(e)},u(l.prototype),x.async=function(e,t,r,i){var a=new l(n(e,t,r,i));return x.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},u(I),I[b]=function(){return this},I.toString=function(){return"[object Generator]"},x.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},x.values=m,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=g,this.done=!1,this.delegate=null,this.tryEntries.forEach(d),!e)for(var t in this)"t"===t.charAt(0)&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,n){return a.type="throw",a.arg=e,r.next=t,!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=v.call(i,"catchLoc"),o=v.call(i,"finallyLoc");if(s&&o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&v.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?this.next=i.finallyLoc:this.complete(a),w},complete:function(e,t){if("throw"===e.type)throw e.arg;"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t)},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),d(r),w}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;d(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:m(e),resultName:t,nextLoc:r},w}}}("object"==typeof r?r:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,e(10),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10}],578:[function(e,t,r){var n=e(580);r.REGULAR={d:n().addRange(48,57),D:n().addRange(0,47).addRange(58,65535),s:n(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:n().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:n(95).addRange(48,57).addRange(65,90).addRange(97,122),W:n(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)},r.UNICODE={d:n().addRange(48,57),D:n().addRange(0,47).addRange(58,1114111),s:n(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:n().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:n(95).addRange(48,57).addRange(65,90).addRange(97,122),W:n(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)},r.UNICODE_IGNORE_CASE={d:n().addRange(48,57),D:n().addRange(0,47).addRange(58,1114111),s:n(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:n().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:n(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:n(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{580:580}],579:[function(e,t,r){t.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567, 66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,68736:68800,68737:68801,68738:68802,68739:68803,68740:68804,68741:68805,68742:68806,68743:68807,68744:68808,68745:68809,68746:68810,68747:68811,68748:68812,68749:68813,68750:68814,68751:68815,68752:68816,68753:68817,68754:68818,68755:68819,68756:68820,68757:68821,68758:68822,68759:68823,68760:68824,68761:68825,68762:68826,68763:68827,68764:68828,68765:68829,68766:68830,68767:68831,68768:68832,68769:68833,68770:68834,68771:68835,68772:68836,68773:68837,68774:68838,68775:68839,68776:68840,68777:68841,68778:68842,68779:68843,68780:68844,68781:68845,68782:68846,68783:68847,68784:68848,68785:68849,68786:68850,68800:68736,68801:68737,68802:68738,68803:68739,68804:68740,68805:68741,68806:68742,68807:68743,68808:68744,68809:68745,68810:68746,68811:68747,68812:68748,68813:68749,68814:68750,68815:68751,68816:68752,68817:68753,68818:68754,68819:68755,68820:68756,68821:68757,68822:68758,68823:68759,68824:68760,68825:68761,68826:68762,68827:68763,68828:68764,68829:68765,68830:68766,68831:68767,68832:68768,68833:68769,68834:68770,68835:68771,68836:68772,68837:68773,68838:68774,68839:68775,68840:68776,68841:68777,68842:68778,68843:68779,68844:68780,68845:68781,68846:68782,68847:68783,68848:68784,68849:68785,68850:68786,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],580:[function(t,r,n){(function(t){!function(i){var a="object"==typeof n&&n,s="object"==typeof r&&r&&r.exports==a&&r,o="object"==typeof t&&t;(o.global===o||o.window===o)&&(i=o);var u={rangeOrder:"A range’s `stop` value must be greater than or equal to the `start` value.",codePointRange:"Invalid code point value. Code points range from U+000000 to U+10FFFF."},p=55296,l=56319,c=56320,f=57343,d=/\\x00([^0123456789]|$)/g,h={},m=h.hasOwnProperty,y=function(e,t){var r;for(r in t)m.call(t,r)&&(e[r]=t[r]);return e},g=function(e,t){for(var r=-1,n=e.length;++r<n;)t(e[r],r)},v=h.toString,b=function(e){return"[object Array]"==v.call(e)},E=function(e){return"number"==typeof e||"[object Number]"==v.call(e)},x="0000",S=function(e,t){var r=String(e);return r.length<t?(x+r).slice(-t):r},A=function(e){return Number(e).toString(16).toUpperCase()},D=[].slice,C=function(e){for(var t,r=-1,n=e.length,i=n-1,a=[],s=!0,o=0;++r<n;)if(t=e[r],s)a.push(t),o=t,s=!1;else if(t==o+1){if(r!=i){o=t;continue}s=!0,a.push(t+1)}else a.push(o+1,t),o=t;return s||a.push(t+1),a},w=function(e,t){for(var r,n,i=0,a=e.length;a>i;){if(r=e[i],n=e[i+1],t>=r&&n>t)return t==r?n==r+1?(e.splice(i,2),e):(e[i]=t+1,e):t==n-1?(e[i+1]=t,e):(e.splice(i,2,r,t,t+1,n),e);i+=2}return e},I=function(e,t,r){if(t>r)throw Error(u.rangeOrder);for(var n,i,a=0;a<e.length;){if(n=e[a],i=e[a+1]-1,n>r)return e;if(n>=t&&r>=i)e.splice(a,2);else{if(t>=n&&i>r)return t==n?(e[a]=r+1,e[a+1]=i+1,e):(e.splice(a,2,n,t,r+1,i+1),e);if(t>=n&&i>=t)e[a+1]=t;else if(r>=n&&i>=r)return e[a]=r+1,e;a+=2}}return e},_=function(e,t){var r,n,i=0,a=null,s=e.length;if(0>t||t>1114111)throw RangeError(u.codePointRange);for(;s>i;){if(r=e[i],n=e[i+1],t>=r&&n>t)return e;if(t==r-1)return e[i]=t,e;if(r>t)return e.splice(null!=a?a+2:0,0,t,t+1),e;if(t==n)return t+1==e[i+2]?(e.splice(i,4,r,e[i+3]),e):(e[i+1]=t+1,e);a=i,i+=2}return e.push(t,t+1),e},F=function(e,t){for(var r,n,i=0,a=e.slice(),s=t.length;s>i;)r=t[i],n=t[i+1]-1,a=r==n?_(a,r):P(a,r,n),i+=2;return a},k=function(e,t){for(var r,n,i=0,a=e.slice(),s=t.length;s>i;)r=t[i],n=t[i+1]-1,a=r==n?w(a,r):I(a,r,n),i+=2;return a},P=function(e,t,r){if(t>r)throw Error(u.rangeOrder);if(0>t||t>1114111||0>r||r>1114111)throw RangeError(u.codePointRange);for(var n,i,a=0,s=!1,o=e.length;o>a;){if(n=e[a],i=e[a+1],s){if(n==r+1)return e.splice(a-1,2),e;if(n>r)return e;n>=t&&r>=n&&(i>t&&r>=i-1?(e.splice(a,2),a-=2):(e.splice(a-1,2),a-=2))}else{if(n==r+1)return e[a]=t,e;if(n>r)return e.splice(a,0,t,r+1),e;if(t>=n&&i>t&&i>=r+1)return e;t>=n&&i>t||i==t?(e[a+1]=r+1,s=!0):n>=t&&r+1>=i&&(e[a]=t,e[a+1]=r+1,s=!0)}a+=2}return s||e.push(t,r+1),e},B=function(e,t){var r=0,n=e.length,i=e[r],a=e[n-1];if(n>=2&&(i>t||t>a))return!1;for(;n>r;){if(i=e[r],a=e[r+1],t>=i&&a>t)return!0;r+=2}return!1},T=function(e,t){for(var r,n=0,i=t.length,a=[];i>n;)r=t[n],B(e,r)&&a.push(r),++n;return C(a)},M=function(e){return!e.length},O=function(e){return 2==e.length&&e[0]+1==e[1]},j=function(e){for(var t,r,n=0,i=[],a=e.length;a>n;){for(t=e[n],r=e[n+1];r>t;)i.push(t),++t;n+=2}return i},L=Math.floor,N=function(e){return parseInt(L((e-65536)/1024)+p,10)},R=function(e){return parseInt((e-65536)%1024+c,10)},V=String.fromCharCode,U=function(e){var t;return t=9==e?"\\t":10==e?"\\n":12==e?"\\f":13==e?"\\r":92==e?"\\\\":36==e||e>=40&&43>=e||45==e||46==e||63==e||e>=91&&94>=e||e>=123&&125>=e?"\\"+V(e):e>=32&&126>=e?V(e):255>=e?"\\x"+S(A(e),2):"\\u"+S(A(e),4)},q=function(e){var t,r=e.length,n=e.charCodeAt(0);return n>=p&&l>=n&&r>1?(t=e.charCodeAt(1),1024*(n-p)+t-c+65536):n},G=function(e){var t,r,n="",i=0,a=e.length;if(O(e))return U(e[0]);for(;a>i;)t=e[i],r=e[i+1]-1,n+=t==r?U(t):t+1==r?U(t)+U(r):U(t)+"-"+U(r),i+=2;return"["+n+"]"},H=function(e){for(var t,r,n=[],i=[],a=[],s=[],o=0,u=e.length;u>o;)t=e[o],r=e[o+1]-1,p>t?(p>r&&a.push(t,r+1),r>=p&&l>=r&&(a.push(t,p),n.push(p,r+1)),r>=c&&f>=r&&(a.push(t,p),n.push(p,l+1),i.push(c,r+1)),r>f&&(a.push(t,p),n.push(p,l+1),i.push(c,f+1),65535>=r?a.push(f+1,r+1):(a.push(f+1,65536),s.push(65536,r+1)))):t>=p&&l>=t?(r>=p&&l>=r&&n.push(t,r+1),r>=c&&f>=r&&(n.push(t,l+1),i.push(c,r+1)),r>f&&(n.push(t,l+1),i.push(c,f+1),65535>=r?a.push(f+1,r+1):(a.push(f+1,65536),s.push(65536,r+1)))):t>=c&&f>=t?(r>=c&&f>=r&&i.push(t,r+1),r>f&&(i.push(t,f+1),65535>=r?a.push(f+1,r+1):(a.push(f+1,65536),s.push(65536,r+1)))):t>f&&65535>=t?65535>=r?a.push(t,r+1):(a.push(t,65536),s.push(65536,r+1)):s.push(t,r+1),o+=2;return{loneHighSurrogates:n,loneLowSurrogates:i,bmp:a,astral:s}},W=function(e){for(var t,r,n,i,a,s,o=[],u=[],p=!1,l=-1,c=e.length;++l<c;)if(t=e[l],r=e[l+1]){for(n=t[0],i=t[1],a=r[0],s=r[1],u=i;a&&n[0]==a[0]&&n[1]==a[1];)u=O(s)?_(u,s[0]):P(u,s[0],s[1]-1),++l,t=e[l],n=t[0],i=t[1],r=e[l+1],a=r&&r[0],s=r&&r[1],p=!0;o.push([n,p?u:i]),p=!1}else o.push(t);return X(o)},X=function(e){if(1==e.length)return e;for(var t=-1,r=-1;++t<e.length;){var n=e[t],i=n[1],a=i[0],s=i[1];for(r=t;++r<e.length;){var o=e[r],u=o[1],p=u[0],l=u[1];a==p&&s==l&&(O(o[0])?n[0]=_(n[0],o[0][0]):n[0]=P(n[0],o[0][0],o[0][1]-1),e.splice(r,1),--r)}}return e},Y=function(e){if(!e.length)return[];for(var t,r,n,i,a,s,o=0,u=0,p=0,l=[],d=e.length;d>o;){t=e[o],r=e[o+1]-1,n=N(t),i=R(t),a=N(r),s=R(r);var h=i==c,m=s==f,y=!1;n==a||h&&m?(l.push([[n,a+1],[i,s+1]]),y=!0):l.push([[n,n+1],[i,f+1]]),!y&&a>n+1&&(m?(l.push([[n+1,a+1],[c,s+1]]),y=!0):l.push([[n+1,a],[c,f+1]])),y||l.push([[a,a+1],[c,s+1]]),u=n,p=a,o+=2}return W(l)},J=function(e){var t=[];return g(e,function(e){var r=e[0],n=e[1];t.push(G(r)+G(n))}),t.join("|")},z=function(e,t){var r=[],n=H(e),i=n.loneHighSurrogates,a=n.loneLowSurrogates,s=n.bmp,o=n.astral,u=(!M(n.astral),!M(i)),p=!M(a),l=Y(o);return t&&(s=F(s,i),u=!1,s=F(s,a),p=!1),M(s)||r.push(G(s)),l.length&&r.push(J(l)),u&&r.push(G(i)+"(?![\\uDC00-\\uDFFF])"),p&&r.push("(?:[^\\uD800-\\uDBFF]|^)"+G(a)),r.join("|")},K=function(e){return arguments.length>1&&(e=D.call(arguments)),this instanceof K?(this.data=[],e?this.add(e):this):(new K).add(e)};K.version="1.2.0";var $=K.prototype;y($,{add:function(e){var t=this;return null==e?t:e instanceof K?(t.data=F(t.data,e.data),t):(arguments.length>1&&(e=D.call(arguments)),b(e)?(g(e,function(e){t.add(e)}),t):(t.data=_(t.data,E(e)?e:q(e)),t))},remove:function(e){var t=this;return null==e?t:e instanceof K?(t.data=k(t.data,e.data),t):(arguments.length>1&&(e=D.call(arguments)),b(e)?(g(e,function(e){t.remove(e)}),t):(t.data=w(t.data,E(e)?e:q(e)),t))},addRange:function(e,t){var r=this;return r.data=P(r.data,E(e)?e:q(e),E(t)?t:q(t)),r},removeRange:function(e,t){var r=this,n=E(e)?e:q(e),i=E(t)?t:q(t);return r.data=I(r.data,n,i),r},intersection:function(e){var t=this,r=e instanceof K?j(e.data):e;return t.data=T(t.data,r),t},contains:function(e){return B(this.data,E(e)?e:q(e))},clone:function(){var e=new K;return e.data=this.data.slice(0),e},toString:function(e){var t=z(this.data,e?e.bmpOnly:!1);return t.replace(d,"\\0$1")},toRegExp:function(e){return RegExp(this.toString(),e||"")},valueOf:function(){return j(this.data)}}),$.toArray=$.valueOf,"function"==typeof e&&"object"==typeof e.amd&&e.amd?e(function(){return K}):a&&!a.nodeType?s?s.exports=K:a.regenerate=K:i.regenerate=K}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],581:[function(t,r,n){(function(t){(function(){"use strict";function i(){var e,t,r=16384,n=[],i=-1,a=arguments.length;if(!a)return"";for(var s="";++i<a;){var o=Number(arguments[i]);if(!isFinite(o)||0>o||o>1114111||I(o)!=o)throw RangeError("Invalid code point: "+o);65535>=o?n.push(o):(o-=65536,e=(o>>10)+55296,t=o%1024+56320,n.push(e,t)),(i+1==a||n.length>r)&&(s+=w.apply(null,n),n.length=0)}return s}function a(e,t){if(-1==t.indexOf("|")){if(e==t)return;throw Error("Invalid node type: "+e)}if(t=a.hasOwnProperty(t)?a[t]:a[t]=RegExp("^(?:"+t+")$"),!t.test(e))throw Error("Invalid node type: "+e)}function s(e){var t=e.type;if(s.hasOwnProperty(t)&&"function"==typeof s[t])return s[t](e);throw Error("Invalid node type: "+t)}function o(e){a(e.type,"alternative");var t=e.body,r=t?t.length:0;if(1==r)return b(t[0]);for(var n=-1,i="";++n<r;)i+=b(t[n]);return i}function u(e){switch(a(e.type,"anchor"),e.kind){case"start":return"^";case"end":return"$";case"boundary":return"\\b";case"not-boundary":return"\\B";default:throw Error("Invalid assertion")}}function p(e){return a(e.type,"anchor|characterClass|characterClassEscape|dot|group|reference|value"),s(e)}function l(e){a(e.type,"characterClass");var t=e.body,r=t?t.length:0,n=-1,i="[";for(e.negative&&(i+="^");++n<r;)i+=d(t[n]);return i+="]"}function c(e){return a(e.type,"characterClassEscape"),"\\"+e.value}function f(e){a(e.type,"characterClassRange");var t=e.min,r=e.max;if("characterClassRange"==t.type||"characterClassRange"==r.type)throw Error("Invalid character class range");return d(t)+"-"+d(r)}function d(e){return a(e.type,"anchor|characterClassEscape|characterClassRange|dot|value"),s(e)}function h(e){a(e.type,"disjunction");var t=e.body,r=t?t.length:0;if(0==r)throw Error("No body");if(1==r)return s(t[0]);for(var n=-1,i="";++n<r;)0!=n&&(i+="|"),i+=s(t[n]);return i}function m(e){return a(e.type,"dot"),"."}function y(e){a(e.type,"group");var t="(";switch(e.behavior){case"normal":break;case"ignore":t+="?:";break;case"lookahead":t+="?=";break;case"negativeLookahead":t+="?!";break;default:throw Error("Invalid behaviour: "+e.behaviour)}var r=e.body,n=r?r.length:0;if(1==n)t+=s(r[0]);else for(var i=-1;++i<n;)t+=s(r[i]);return t+=")"}function g(e){a(e.type,"quantifier");var t="",r=e.min,n=e.max;switch(n){case void 0:case null:switch(r){case 0:t="*";break;case 1:t="+";break;default:t="{"+r+",}"}break;default:t=r==n?"{"+r+"}":0==r&&1==n?"?":"{"+r+","+n+"}"}return e.greedy||(t+="?"),p(e.body[0])+t}function v(e){return a(e.type,"reference"),"\\"+e.matchIndex}function b(e){return a(e.type,"anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value"),s(e)}function E(e){a(e.type,"value");var t=e.kind,r=e.codePoint;switch(t){case"controlLetter":return"\\c"+i(r+64);case"hexadecimalEscape":return"\\x"+("00"+r.toString(16).toUpperCase()).slice(-2);case"identifier":return"\\"+i(r);case"null":return"\\"+r;case"octal":return"\\"+r.toString(8);case"singleEscape":switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r";default:throw Error("Invalid codepoint: "+r)}case"symbol":return i(r);case"unicodeEscape":return"\\u"+("0000"+r.toString(16).toUpperCase()).slice(-4);case"unicodeCodePointEscape":return"\\u{"+r.toString(16).toUpperCase()+"}";default:throw Error("Unsupported node kind: "+t)}}var x={"function":!0,object:!0},S=x[typeof window]&&window||this,A=x[typeof n]&&n,D=x[typeof r]&&r&&!r.nodeType&&r,C=A&&D&&"object"==typeof t&&t;!C||C.global!==C&&C.window!==C&&C.self!==C||(S=C);var w=String.fromCharCode,I=Math.floor;s.alternative=o,s.anchor=u,s.characterClass=l,s.characterClassEscape=c,s.characterClassRange=f,s.disjunction=h,s.dot=m,s.group=y,s.quantifier=g,s.reference=v,s.value=E,"function"==typeof e&&"object"==typeof e.amd&&e.amd?e(function(){return{generate:s}}):A&&D?A.generate=s:S.regjsgen={generate:s}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],582:[function(e,t,r){!function(){function e(e,t){function r(t){return t.raw=e.substring(t.range[0],t.range[1]),t}function n(e,t){return e.range[0]=t,r(e)}function i(e,t){return r({type:"anchor",kind:e,range:[$-t,$]})}function a(e,t,n,i){return r({type:"value",kind:e,codePoint:t,range:[n,i]})}function s(e,t,r,n){return n=n||0,a(e,t,$-(r.length+n),$)}function o(e){var t=e[0],r=t.charCodeAt(0);if(K){var n;if(1===t.length&&r>=55296&&56319>=r&&(n=x().charCodeAt(0),n>=56320&&57343>=n))return $++,a("symbol",1024*(r-55296)+n-56320+65536,$-2,$)}return a("symbol",r,$-1,$)}function u(e,t,n){return r({type:"disjunction",body:e,range:[t,n]})}function p(){return r({type:"dot",range:[$-1,$]})}function l(e){return r({type:"characterClassEscape",value:e,range:[$-2,$]})}function c(e){return r({type:"reference",matchIndex:parseInt(e,10),range:[$-1-e.length,$]})}function f(e,t,n,i){return r({type:"group",behavior:e,body:t,range:[n,i]})}function d(e,t,n,i){return null==i&&(n=$-1,i=$),r({type:"quantifier",min:e,max:t,greedy:!0,body:null,range:[n,i]})}function h(e,t,n){return r({type:"alternative",body:e,range:[t,n]})}function m(e,t,n,i){return r({type:"characterClass",body:e,negative:t,range:[n,i]})}function y(e,t,n,i){return e.codePoint>t.codePoint&&X("invalid range in character class",e.raw+"-"+t.raw,n,i),r({type:"characterClassRange",min:e,max:t,range:[n,i]})}function g(e){return"alternative"===e.type?e.body:[e]}function v(t){t=t||1;var r=e.substring($,$+t);return $+=t||1,r}function b(e){E(e)||X("character",e)}function E(t){return e.indexOf(t,$)===$?v(t.length):void 0}function x(){return e[$]}function S(t){return e.indexOf(t,$)===$}function A(t){return e[$+1]===t}function D(t){var r=e.substring($),n=r.match(t);return n&&(n.range=[],n.range[0]=$,v(n[0].length),n.range[1]=$),n}function C(){var e=[],t=$;for(e.push(w());E("|");)e.push(w());return 1===e.length?e[0]:u(e,t,$)}function w(){for(var e,t=[],r=$;e=I();)t.push(e);return 1===t.length?t[0]:h(t,r,$)}function I(){if($>=e.length||S("|")||S(")"))return null;var t=F();if(t)return t;var r=P();r||X("Expected atom");var i=k()||!1;return i?(i.body=g(r),n(i,r.range[0]),i):r}function _(e,t,r,n){var i=null,a=$;if(E(e))i=t;else{if(!E(r))return!1;i=n}var s=C();s||X("Expected disjunction"),b(")");var o=f(i,g(s),a,$);return"normal"==i&&z&&J++,o}function F(){return E("^")?i("start",1):E("$")?i("end",1):E("\\b")?i("boundary",2):E("\\B")?i("not-boundary",2):_("(?=","lookahead","(?!","negativeLookahead")}function k(){var e,t,r,n,i=$;return E("*")?t=d(0):E("+")?t=d(1):E("?")?t=d(0,1):(e=D(/^\{([0-9]+)\}/))?(r=parseInt(e[1],10),t=d(r,r,e.range[0],e.range[1])):(e=D(/^\{([0-9]+),\}/))?(r=parseInt(e[1],10),t=d(r,void 0,e.range[0],e.range[1])):(e=D(/^\{([0-9]+),([0-9]+)\}/))&&(r=parseInt(e[1],10),n=parseInt(e[2],10),r>n&&X("numbers out of order in {} quantifier","",i,$),t=d(r,n,e.range[0],e.range[1])),t&&E("?")&&(t.greedy=!1,t.range[1]+=1),t}function P(){var e;return(e=D(/^[^^$\\.*+?(){[|]/))?o(e):E(".")?p():E("\\")?(e=M(),e||X("atomEscape"),e):(e=R())?e:_("(?:","ignore","(","normal")}function B(e){if(K){var t,n;if("unicodeEscape"==e.kind&&(t=e.codePoint)>=55296&&56319>=t&&S("\\")&&A("u")){var i=$;$++;var a=T();"unicodeEscape"==a.kind&&(n=a.codePoint)>=56320&&57343>=n?(e.range[1]=a.range[1],e.codePoint=1024*(t-55296)+n-56320+65536,e.type="value",e.kind="unicodeCodePointEscape",r(e)):$=i}}return e}function T(){return M(!0)}function M(e){var t,r=$;if(t=O())return t;if(e){if(E("b"))return s("singleEscape",8,"\\b");E("B")&&X("\\B not possible inside of CharacterClass","",r)}return t=j()}function O(){var e,t;if(e=D(/^(?!0)\d+/)){t=e[0];var r=parseInt(e[0],10);return J>=r?c(e[0]):(Y.push(r),v(-e[0].length),(e=D(/^[0-7]{1,3}/))?s("octal",parseInt(e[0],8),e[0],1):(e=o(D(/^[89]/)),n(e,e.range[0]-1)))}return(e=D(/^[0-7]{1,3}/))?(t=e[0],/^0{1,3}$/.test(t)?s("null",0,"0",t.length+1):s("octal",parseInt(t,8),t,1)):(e=D(/^[dDsSwW]/))?l(e[0]):!1}function j(){var e;if(e=D(/^[fnrtv]/)){var t=0;switch(e[0]){case"t":t=9;break;case"n":t=10;break;case"v":t=11;break;case"f":t=12;break;case"r":t=13}return s("singleEscape",t,"\\"+e[0])}return(e=D(/^c([a-zA-Z])/))?s("controlLetter",e[1].charCodeAt(0)%32,e[1],2):(e=D(/^x([0-9a-fA-F]{2})/))?s("hexadecimalEscape",parseInt(e[1],16),e[1],2):(e=D(/^u([0-9a-fA-F]{4})/))?B(s("unicodeEscape",parseInt(e[1],16),e[1],2)):K&&(e=D(/^u\{([0-9a-fA-F]+)\}/))?s("unicodeCodePointEscape",parseInt(e[1],16),e[1],4):N()}function L(e){var t=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&t.test(String.fromCharCode(e))}function N(){var e,t="‌",r="‍";return L(x())?E(t)?s("identifier",8204,t):E(r)?s("identifier",8205,r):null:(e=v(),s("identifier",e.charCodeAt(0),e,1))}function R(){var e,t=$;return(e=D(/^\[\^/))?(e=V(),b("]"),m(e,!0,t,$)):E("[")?(e=V(),b("]"),m(e,!1,t,$)):null}function V(){var e;return S("]")?[]:(e=q(),e||X("nonEmptyClassRanges"),e)}function U(e){var t,r,n;if(S("-")&&!A("]")){b("-"),n=H(),n||X("classAtom"),r=$;var i=V();return i||X("classRanges"),t=e.range[0],"empty"===i.type?[y(e,n,t,r)]:[y(e,n,t,r)].concat(i)}return n=G(),n||X("nonEmptyClassRangesNoDash"),[e].concat(n)}function q(){var e=H();return e||X("classAtom"),S("]")?[e]:U(e)}function G(){var e=H();return e||X("classAtom"),S("]")?e:U(e)}function H(){return E("-")?o("-"):W()}function W(){var e;return(e=D(/^[^\\\]-]/))?o(e[0]):E("\\")?(e=T(),e||X("classEscape"),B(e)):void 0}function X(t,r,n,i){n=null==n?$:n,i=null==i?n:i;var a=Math.max(0,n-10),s=Math.min(i+10,e.length),o=" "+e.substring(a,s),u=" "+new Array(n-a+1).join(" ")+"^";throw SyntaxError(t+" at position "+n+(r?": "+r:"")+"\n"+o+"\n"+u)}var Y=[],J=0,z=!0,K=-1!==(t||"").indexOf("u"),$=0;e=String(e),""===e&&(e="(?:)");var Q=C();Q.range[1]!==e.length&&X("Could not parse entire input - got stuck","",Q.range[1]);for(var Z=0;Z<Y.length;Z++)if(Y[Z]<=J)return $=0,z=!1,C();return Q}var r={parse:e};"undefined"!=typeof t&&t.exports?t.exports=r:window.regjsparser=r}()},{}],583:[function(e,t,r){function n(e){return A?S?m.UNICODE_IGNORE_CASE[e]:m.UNICODE[e]:m.REGULAR[e]}function i(e,t){return g.call(e,t)}function a(e,t){for(var r in t)e[r]=t[r]}function s(e,t){if(t){var r=f(t,"");switch(r.type){case"characterClass":case"group":case"value":break;default:r=o(r,t)}a(e,r)}}function o(e,t){return{type:"group",behavior:"ignore",body:[e],raw:"(?:"+t+")"}}function u(e){return i(h,e)?h[e]:!1}function p(e){var t=d();e.body.forEach(function(e){switch(e.type){case"value":if(t.add(e.codePoint),S&&A){var r=u(e.codePoint);r&&t.add(r)}break;case"characterClassRange":var i=e.min.codePoint,a=e.max.codePoint;t.addRange(i,a),S&&A&&t.iuAddRange(i,a);break;case"characterClassEscape":t.add(n(e.value));break;default:throw Error("Unknown term type: "+e.type)}});return e.negative&&(t=(A?v:b).clone().remove(t)),s(e,t.toString()),e}function l(e){switch(e.type){case"dot":s(e,(A?E:x).toString());break;case"characterClass":e=p(e);break;case"characterClassEscape":s(e,n(e.value).toString());break;case"alternative":case"disjunction":case"group":case"quantifier":e.body=e.body.map(l);break;case"value":var t=e.codePoint,r=d(t);if(S&&A){var i=u(t);i&&r.add(i)}s(e,r.toString());break;case"anchor":case"empty":case"group":case"reference":break;default:throw Error("Unknown term type: "+e.type)}return e}var c=e(581).generate,f=e(582).parse,d=e(580),h=e(579),m=e(578),y={},g=y.hasOwnProperty,v=d().addRange(0,1114111),b=d().addRange(0,65535),E=v.clone().remove(10,13,8232,8233),x=E.clone().intersection(b);d.prototype.iuAddRange=function(e,t){var r=this;do{var n=u(e);n&&r.add(n)}while(++e<=t);return r};var S=!1,A=!1;t.exports=function(e,t){var r=f(e,t);return S=t?t.indexOf("i")>-1:!1,A=t?t.indexOf("u")>-1:!1,a(r,l(r)),c(r)}},{578:578,579:579,580:580,581:581,582:582}],584:[function(e,t,r){"use strict";var n=e(585);t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string as the first argument");if(0>t||!n(t))throw new TypeError("Expected a finite positive number");var r="";do 1&t&&(r+=e),e+=e;while(t>>=1);return r}},{585:585}],585:[function(e,t,r){arguments[4][399][0].apply(r,arguments)},{399:399,586:586}],586:[function(e,t,r){arguments[4][400][0].apply(r,arguments)},{400:400}],587:[function(e,t,r){"use strict";t.exports=/^#!.*/},{}],588:[function(e,t,r){"use strict";t.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},{}],589:[function(e,t,r){function n(){this._array=[],this._set={}}var i=e(598);n.fromArray=function(e,t){for(var r=new n,i=0,a=e.length;a>i;i++)r.add(e[i],t);return r},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(e,t){var r=i.toSetString(e),n=this._set.hasOwnProperty(r),a=this._array.length;(!n||t)&&this._array.push(e),n||(this._set[r]=a)},n.prototype.has=function(e){var t=i.toSetString(e);return this._set.hasOwnProperty(t)},n.prototype.indexOf=function(e){var t=i.toSetString(e);if(this._set.hasOwnProperty(t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},r.ArraySet=n},{598:598}],590:[function(e,t,r){function n(e){return 0>e?(-e<<1)+1:(e<<1)+0}function i(e){var t=1===(1&e),r=e>>1;return t?-r:r}var a=e(591),s=5,o=1<<s,u=o-1,p=o;r.encode=function(e){var t,r="",i=n(e);do t=i&u,i>>>=s,i>0&&(t|=p),r+=a.encode(t);while(i>0);return r},r.decode=function(e,t,r){var n,o,l=e.length,c=0,f=0;do{if(t>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(o=a.decode(e.charCodeAt(t++)),-1===o)throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(o&p),o&=u,c+=o<<f,f+=s}while(n);r.value=i(c),r.rest=t}},{591:591}],591:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(e>=0&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},r.decode=function(e){var t=65,r=90,n=97,i=122,a=48,s=57,o=43,u=47,p=26,l=52;return e>=t&&r>=e?e-t:e>=n&&i>=e?e-n+p:e>=a&&s>=e?e-a+l:e==o?62:e==u?63:-1}},{}],592:[function(e,t,r){function n(e,t,i,a,s,o){var u=Math.floor((t-e)/2)+e,p=s(i,a[u],!0);return 0===p?u:p>0?t-u>1?n(u,t,i,a,s,o):o==r.LEAST_UPPER_BOUND?t<a.length?t:-1:u:u-e>1?n(e,u,i,a,s,o):o==r.LEAST_UPPER_BOUND?u:0>e?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,t,i,a){if(0===t.length)return-1;var s=n(-1,t.length,e,t,i,a||r.GREATEST_LOWER_BOUND);if(0>s)return-1;for(;s-1>=0&&0===i(t[s],t[s-1],!0);)--s;return s}},{}],593:[function(e,t,r){function n(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,s=t.generatedColumn;return n>r||n==r&&s>=i||a.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var a=e(598);i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(a.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=i},{598:598}],594:[function(e,t,r){function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t){return Math.round(e+Math.random()*(t-e))}function a(e,t,r,s){if(s>r){var o=i(r,s),u=r-1;n(e,o,s);for(var p=e[s],l=r;s>l;l++)t(e[l],p)<=0&&(u+=1,n(e,u,l));n(e,u+1,l);var c=u+1;a(e,t,r,c-1),a(e,t,c+1,s)}}r.quickSort=function(e,t){a(e,t,0,e.length-1)}},{}],595:[function(e,t,r){function n(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new s(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sources"),i=o.getArg(t,"names",[]),a=o.getArg(t,"sourceRoot",null),s=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),l=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);n=n.map(o.normalize).map(function(e){return a&&o.isAbsolute(a)&&o.isAbsolute(e)?o.relative(a,e):e}),this._names=p.fromArray(i,!0),this._sources=p.fromArray(n,!0),this.sourceRoot=a,this.sourcesContent=s,this._mappings=u,this.file=l}function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new p,this._names=new p;var a={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=o.getArg(e,"offset"),r=o.getArg(t,"line"),i=o.getArg(t,"column");if(r<a.line||r===a.line&&i<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=t,{generatedOffset:{generatedLine:r+1,generatedColumn:i+1},consumer:new n(o.getArg(e,"map"))}})}var o=e(598),u=e(592),p=e(589).ArraySet,l=e(590),c=e(594).quickSort;n.fromSourceMap=function(e){return i.fromSourceMap(e)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),n.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},n.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(e,t,r){var i,a=t||null,s=r||n.GENERATED_ORDER;switch(s){case n.GENERATED_ORDER:i=this._generatedMappings;break;case n.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=o.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,a)},n.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var n=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var a=this._originalMappings[i];if(void 0===e.column)for(var s=a.originalLine;a&&a.originalLine===s;)n.push({line:o.getArg(a,"generatedLine",null),column:o.getArg(a,"generatedColumn",null),lastColumn:o.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var p=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==p;)n.push({line:o.getArg(a,"generatedLine",null),column:o.getArg(a,"generatedColumn",null),lastColumn:o.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return n},r.SourceMapConsumer=n,i.prototype=Object.create(n.prototype),i.prototype.consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=p.fromArray(e._names.toArray(),!0),n=t._sources=p.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var s=e._mappings.toArray().slice(),u=t.__generatedMappings=[],l=t.__originalMappings=[],f=0,d=s.length;d>f;f++){var h=s[f],m=new a;m.generatedLine=h.generatedLine,m.generatedColumn=h.generatedColumn,h.source&&(m.source=n.indexOf(h.source),m.originalLine=h.originalLine,m.originalColumn=h.originalColumn,h.name&&(m.name=r.indexOf(h.name)),l.push(m)),u.push(m)}return c(t.__originalMappings,o.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?o.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var r,n,i,s,u,p=1,f=0,d=0,h=0,m=0,y=0,g=e.length,v=0,b={},E={},x=[],S=[];g>v;)if(";"===e.charAt(v))p++,v++,f=0;else if(","===e.charAt(v))v++;else{for(r=new a,r.generatedLine=p,s=v;g>s&&!this._charIsMappingSeparator(e,s);s++);if(n=e.slice(v,s),i=b[n])v+=n.length;else{for(i=[];s>v;)l.decode(e,v,E),u=E.value,v=E.rest,i.push(u);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");b[n]=i}r.generatedColumn=f+i[0],f=r.generatedColumn,i.length>1&&(r.source=m+i[1],m+=i[1],r.originalLine=d+i[2],d=r.originalLine,r.originalLine+=1,r.originalColumn=h+i[3],h=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),S.push(r),"number"==typeof r.originalLine&&x.push(r); }c(S,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,c(x,o.compareByOriginalPositions),this.__originalMappings=x},i.prototype._findMapping=function(e,t,r,n,i,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return u.search(e,t,i,a)},i.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",o.compareByGeneratedPositionsDeflated,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var a=o.getArg(i,"source",null);null!==a&&(a=this._sources.at(a),null!=this.sourceRoot&&(a=o.join(this.sourceRoot,a)));var s=o.getArg(i,"name",null);return null!==s&&(s=this._names.at(s)),{source:a,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}):!1},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var r={source:t,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:o.getArg(a,"generatedLine",null),column:o.getArg(a,"generatedColumn",null),lastColumn:o.getArg(a,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=i,s.prototype=Object.create(n.prototype),s.prototype.constructor=n,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),s.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=u.search(t,this._sections,function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r?r:e.generatedColumn-t.generatedOffset.generatedColumn}),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},s.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r],i=n.consumer.sourceContentFor(e,!0);if(i)return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer.sources.indexOf(o.getArg(e,"source"))){var n=r.consumer.generatedPositionFor(e);if(n){var i={line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}},s.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],i=n.consumer._generatedMappings,a=0;a<i.length;a++){var s=i[a],u=n.consumer._sources.at(s.source);null!==n.consumer.sourceRoot&&(u=o.join(n.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var p=n.consumer._names.at(s.name);this._names.add(p),p=this._names.indexOf(p);var l={source:u,generatedLine:s.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(n.generatedOffset.generatedLine===s.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:p};this.__generatedMappings.push(l),"number"==typeof l.originalLine&&this.__originalMappings.push(l)}c(this.__generatedMappings,o.compareByGeneratedPositionsDeflated),c(this.__originalMappings,o.compareByOriginalPositions)},r.IndexedSourceMapConsumer=s},{589:589,590:590,592:592,594:594,598:598}],596:[function(e,t,r){function n(e){e||(e={}),this._file=a.getArg(e,"file",null),this._sourceRoot=a.getArg(e,"sourceRoot",null),this._skipValidation=a.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new o,this._sourcesContents=null}var i=e(590),a=e(598),s=e(589).ArraySet,o=e(593).MappingList;n.prototype._version=3,n.fromSourceMap=function(e){var t=e.sourceRoot,r=new n({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=a.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},n.prototype.addMapping=function(e){var t=a.getArg(e,"generated"),r=a.getArg(e,"original",null),n=a.getArg(e,"source",null),i=a.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null==n||this._sources.has(n)||this._sources.add(n),null==i||this._names.has(i)||this._names.add(i),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},n.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=a.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[a.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[a.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var i=this._sourceRoot;null!=i&&(n=a.relative(i,n));var o=new s,u=new s;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=r&&(t.source=a.join(r,t.source)),null!=i&&(t.source=a.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var p=t.source;null==p||o.has(p)||o.add(p);var l=t.name;null==l||u.has(l)||u.add(l)},this),this._sources=o,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=a.join(r,t)),null!=i&&(t=a.relative(i,t)),this.setSourceContent(t,n))},this)},n.prototype._validateMapping=function(e,t,r,n){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n=0,s=1,o=0,u=0,p=0,l=0,c="",f=this._mappings.toArray(),d=0,h=f.length;h>d;d++){if(e=f[d],e.generatedLine!==s)for(n=0;e.generatedLine!==s;)c+=";",s++;else if(d>0){if(!a.compareByGeneratedPositionsInflated(e,f[d-1]))continue;c+=","}c+=i.encode(e.generatedColumn-n),n=e.generatedColumn,null!=e.source&&(r=this._sources.indexOf(e.source),c+=i.encode(r-l),l=r,c+=i.encode(e.originalLine-1-u),u=e.originalLine-1,c+=i.encode(e.originalColumn-o),o=e.originalColumn,null!=e.name&&(t=this._names.indexOf(e.name),c+=i.encode(t-p),p=t))}return c},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=a.relative(t,e));var r=a.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=n},{589:589,590:590,593:593,598:598}],597:[function(e,t,r){function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[u]=!0,null!=n&&this.add(n)}var i=e(596).SourceMapGenerator,a=e(598),s=/(\r?\n)/,o=10,u="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=r?a.join(r,e.source):e.source;o.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new n,u=e.split(s),p=function(){var e=u.shift(),t=u.shift()||"";return e+t},l=1,c=0,f=null;return t.eachMapping(function(e){if(null!==f){if(!(l<e.generatedLine)){var t=u[0],r=t.substr(0,e.generatedColumn-c);return u[0]=t.substr(e.generatedColumn-c),c=e.generatedColumn,i(f,r),void(f=e)}i(f,p()),l++,c=0}for(;l<e.generatedLine;)o.add(p()),l++;if(c<e.generatedColumn){var t=u[0];o.add(t.substr(0,e.generatedColumn)),u[0]=t.substr(e.generatedColumn),c=e.generatedColumn}f=e},this),u.length>0&&(f&&i(f,p()),o.add(u.join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=a.join(r,e)),o.setSourceContent(e,n))}),o},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;n>r;r++)t=this.children[r],t[u]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;n-1>r;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},n.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},n.prototype.setSourceContent=function(e,t){this.sourceContents[a.toSetString(e)]=t},n.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;r>t;t++)this.children[t][u]&&this.children[t].walkSourceContents(e);for(var n=Object.keys(this.sourceContents),t=0,r=n.length;r>t;t++)e(a.fromSetString(n[t]),this.sourceContents[n[t]])},n.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},n.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new i(e),n=!1,a=null,s=null,u=null,p=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?((a!==i.source||s!==i.line||u!==i.column||p!==i.name)&&r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),a=i.source,s=i.line,u=i.column,p=i.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),a=null,n=!1);for(var l=0,c=e.length;c>l;l++)e.charCodeAt(l)===o?(t.line++,t.column=0,l+1===c?(a=null,n=!1):n&&r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:t.code,map:r}},r.SourceNode=n},{596:596,598:598}],598:[function(e,t,r){function n(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')}function i(e){var t=e.match(m);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function s(e){var t=e,n=i(e);if(n){if(!n.path)return e;t=n.path}for(var s,o=r.isAbsolute(t),u=t.split(/\/+/),p=0,l=u.length-1;l>=0;l--)s=u[l],"."===s?u.splice(l,1):".."===s?p++:p>0&&(""===s?(u.splice(l+1,p),p=0):(u.splice(l,2),p--));return t=u.join("/"),""===t&&(t=o?"/":"."),n?(n.path=t,a(n)):t}function o(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),n=i(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),a(r);if(r||t.match(y))return t;if(n&&!n.host&&!n.path)return n.host=t,a(n);var o="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,a(n)):o}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(0>n)return t;if(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}function p(e){return"$"+e}function l(e){return e.substr(1)}function c(e,t,r){var n=e.source-t.source;return 0!==n?n:(n=e.originalLine-t.originalLine,0!==n?n:(n=e.originalColumn-t.originalColumn,0!==n||r?n:(n=e.generatedColumn-t.generatedColumn,0!==n?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name))))}function f(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:(n=e.generatedColumn-t.generatedColumn,0!==n||r?n:(n=e.source-t.source,0!==n?n:(n=e.originalLine-t.originalLine,0!==n?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name))))}function d(e,t){return e===t?0:e>t?1:-1}function h(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:(r=e.generatedColumn-t.generatedColumn,0!==r?r:(r=d(e.source,t.source),0!==r?r:(r=e.originalLine-t.originalLine,0!==r?r:(r=e.originalColumn-t.originalColumn,0!==r?r:d(e.name,t.name)))))}r.getArg=n;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,y=/^data:.+\,.+$/;r.urlParse=i,r.urlGenerate=a,r.normalize=s,r.join=o,r.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},r.relative=u,r.toSetString=p,r.fromSetString=l,r.compareByOriginalPositions=c,r.compareByGeneratedPositionsDeflated=f,r.compareByGeneratedPositionsInflated=h},{}],599:[function(e,t,r){r.SourceMapGenerator=e(596).SourceMapGenerator,r.SourceMapConsumer=e(595).SourceMapConsumer,r.SourceNode=e(597).SourceNode},{595:595,596:596,597:597}],600:[function(e,t,r){"use strict";t.exports=function n(e){function t(){}t.prototype=e,new t}},{}],601:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.length;/[\s\uFEFF\u00A0]/.test(e[t-1]);)t--;return e.slice(0,t)}},{}],602:[function(e,t,r){(function(r){var n,i=e(1),a=t.exports=function(t,r){try{return(r||e).resolve(t)}catch(n){return null}};a.relative=function(e){if("object"==typeof i)return null;n||(n=new i,n.paths=i._nodeModulePaths(r.cwd()));try{return i._resolveFilename(e,n)}catch(t){return null}}}).call(this,e(10))},{1:1,10:10}],603:[function(e,t,r){t.exports={name:"babel-core",version:"5.8.31",description:"A compiler for writing next generation JavaScript",author:"Sebastian McKenzie <sebmck@gmail.com>",homepage:"https://babeljs.io/",license:"MIT",repository:"babel/babel",browser:{"./lib/api/register/node.js":"./lib/api/register/browser.js"},keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var"],scripts:{bench:"make bench",test:"make test"},dependencies:{"babel-plugin-constant-folding":"^1.0.1","babel-plugin-dead-code-elimination":"^1.0.2","babel-plugin-eval":"^1.0.1","babel-plugin-inline-environment-variables":"^1.0.1","babel-plugin-jscript":"^1.0.4","babel-plugin-member-expression-literals":"^1.0.1","babel-plugin-property-literals":"^1.0.1","babel-plugin-proto-to-assign":"^1.0.3","babel-plugin-react-constant-elements":"^1.0.3","babel-plugin-react-display-name":"^1.0.3","babel-plugin-remove-console":"^1.0.1","babel-plugin-remove-debugger":"^1.0.1","babel-plugin-runtime":"^1.0.7","babel-plugin-undeclared-variables-check":"^1.0.2","babel-plugin-undefined-to-void":"^1.1.6",babylon:"^5.8.29",bluebird:"^2.9.33",chalk:"^1.0.0","convert-source-map":"^1.1.0","core-js":"^1.0.0",debug:"^2.1.1","detect-indent":"^3.0.0",esutils:"^2.0.0","fs-readdir-recursive":"^0.1.0",globals:"^6.4.0","home-or-tmp":"^1.0.0","is-integer":"^1.0.4","js-tokens":"1.0.1",json5:"^0.4.0","line-numbers":"0.2.0",lodash:"^3.10.0",minimatch:"^2.0.3","output-file-sync":"^1.1.0","path-exists":"^1.0.0","path-is-absolute":"^1.0.0","private":"^0.1.6",regenerator:"0.8.40",regexpu:"^1.3.0",repeating:"^1.1.2",resolve:"^1.1.6","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.5.0","source-map-support":"^0.2.10","to-fast-properties":"^1.0.0","trim-right":"^1.0.0","try-resolve":"^1.0.0"}}},{}],604:[function(e,t,r){t.exports={"abstract-expression-call":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"PROPERTY"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"referenceGet"},computed:!1},computed:!0},arguments:[{type:"Identifier",name:"OBJECT"}]},property:{type:"Identifier",name:"call"},computed:!1},arguments:[{type:"Identifier",name:"OBJECT"}]}}]},"abstract-expression-delete":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"PROPERTY"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"referenceDelete"},computed:!1},computed:!0},arguments:[{type:"Identifier",name:"OBJECT"}]}}]},"abstract-expression-get":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"PROPERTY"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"referenceGet"},computed:!1},computed:!0},arguments:[{type:"Identifier",name:"OBJECT"}]}}]},"abstract-expression-set":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"PROPERTY"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"referenceSet"},computed:!1},computed:!0},arguments:[{type:"Identifier",name:"OBJECT"},{type:"Identifier",name:"VALUE"}]}}]},"array-comprehension-container":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"KEY"},init:{type:"ArrayExpression",elements:[]}}],kind:"var"},{type:"ReturnStatement",argument:{type:"Identifier",name:"KEY"}}]},parenthesizedExpression:!0},arguments:[]}}]},"array-from":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Array"},property:{type:"Identifier",name:"from"},computed:!1},arguments:[{type:"Identifier",name:"VALUE"}]}}]},"array-push":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"KEY"},property:{type:"Identifier",name:"push"},computed:!1},arguments:[{type:"Identifier",name:"STATEMENT"}]}}]},call:{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"OBJECT"},property:{type:"Identifier",name:"call"},computed:!1},arguments:[{type:"Identifier",name:"CONTEXT"}]}}]},"class-decorator":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"CLASS_REF"},right:{type:"LogicalExpression",left:{type:"CallExpression",callee:{type:"Identifier",name:"DECORATOR"},arguments:[{type:"Identifier",name:"CLASS_REF"}]},operator:"||",right:{type:"Identifier",name:"CLASS_REF"}}}}]},"class-derived-default-constructor":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Super"},arguments:[{type:"SpreadElement",argument:{type:"Identifier",name:"arguments"}}]}}]},parenthesizedExpression:!0}}]},"default-parameter-assign":{type:"Program",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"VARIABLE_NAME"},operator:"===",right:{type:"Identifier",name:"undefined"}},consequent:{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"VARIABLE_NAME"},right:{type:"Identifier",name:"DEFAULT_VALUE"}}},alternate:null}]},"default-parameter":{type:"Program",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"VARIABLE_NAME"},init:{type:"ConditionalExpression",test:{type:"LogicalExpression",left:{type:"BinaryExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"ARGUMENTS"},property:{type:"Identifier",name:"length"},computed:!1},operator:"<=",right:{type:"Identifier",name:"ARGUMENT_KEY"}},operator:"||",right:{type:"BinaryExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"ARGUMENTS"},property:{type:"Identifier",name:"ARGUMENT_KEY"},computed:!0},operator:"===",right:{type:"Identifier",name:"undefined"}}},consequent:{type:"Identifier",name:"DEFAULT_VALUE"},alternate:{type:"MemberExpression",object:{type:"Identifier",name:"ARGUMENTS"},property:{type:"Identifier",name:"ARGUMENT_KEY"},computed:!0}}}],kind:"let"}]},"exports-assign":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"exports"},property:{type:"Identifier",name:"KEY"},computed:!1},right:{type:"Identifier",name:"VALUE"}}}]},"exports-default-assign":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"module"},property:{type:"Identifier",name:"exports"},computed:!1},right:{type:"Identifier",name:"VALUE"}}}]},"exports-from-assign":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"defineProperty"},computed:!1},arguments:[{type:"Identifier",name:"exports"},{type:"Identifier",name:"ID"},{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"enumerable"},value:{type:"Literal",value:!0},kind:"init"},{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"get"},value:{type:"FunctionExpression",id:{type:"Identifier",name:"get"},generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"Identifier",name:"INIT"}}]}},kind:"init"}]}]}}]},"exports-module-declaration-loose":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"exports"},property:{type:"Identifier",name:"__esModule"},computed:!1},right:{type:"Literal",value:!0}}}]},"exports-module-declaration":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"defineProperty"},computed:!1},arguments:[{type:"Identifier",name:"exports"},{type:"Literal",value:"__esModule"},{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"value"},value:{type:"Literal",value:!0},kind:"init"}]}]}}]},"for-of-array":{type:"Program",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"KEY"},init:{type:"Literal",value:0}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"KEY"},operator:"<",right:{type:"MemberExpression",object:{type:"Identifier",name:"ARR"},property:{type:"Identifier",name:"length"},computed:!1}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"KEY"}},body:{type:"ExpressionStatement",expression:{type:"Identifier",name:"BODY"}}}]},"for-of-loose":{type:"Program",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"LOOP_OBJECT"},init:{type:"Identifier",name:"OBJECT"}},{type:"VariableDeclarator",id:{type:"Identifier",name:"IS_ARRAY"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Array"},property:{type:"Identifier",name:"isArray"},computed:!1},arguments:[{type:"Identifier",name:"LOOP_OBJECT"}]}},{type:"VariableDeclarator",id:{type:"Identifier",name:"INDEX"},init:{type:"Literal",value:0}},{type:"VariableDeclarator",id:{type:"Identifier",name:"LOOP_OBJECT"},init:{type:"ConditionalExpression",test:{type:"Identifier",name:"IS_ARRAY"},consequent:{type:"Identifier",name:"LOOP_OBJECT"},alternate:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"LOOP_OBJECT"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"iterator"},computed:!1},computed:!0},arguments:[]}}}],kind:"var"},test:null,update:null,body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"ID"},init:null}],kind:"var"},{type:"IfStatement",test:{type:"Identifier",name:"IS_ARRAY"},consequent:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"INDEX"},operator:">=",right:{type:"MemberExpression",object:{type:"Identifier",name:"LOOP_OBJECT"},property:{type:"Identifier",name:"length"},computed:!1}},consequent:{type:"BreakStatement",label:null},alternate:null},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"ID"},right:{type:"MemberExpression",object:{type:"Identifier",name:"LOOP_OBJECT"},property:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"INDEX"}},computed:!0}}}]},alternate:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"INDEX"},right:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"LOOP_OBJECT"},property:{type:"Identifier",name:"next"},computed:!1},arguments:[]}}},{type:"IfStatement",test:{type:"MemberExpression",object:{type:"Identifier",name:"INDEX"},property:{type:"Identifier",name:"done"},computed:!1},consequent:{type:"BreakStatement",label:null},alternate:null},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"ID"},right:{type:"MemberExpression",object:{type:"Identifier",name:"INDEX"},property:{type:"Identifier",name:"value"},computed:!1}}}]}}]}}]},"for-of":{type:"Program",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"ITERATOR_COMPLETION"},init:{type:"Literal",value:!0}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"ITERATOR_HAD_ERROR_KEY"},init:{type:"Literal",value:!1}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"ITERATOR_ERROR_KEY"},init:{type:"Identifier",name:"undefined"}}],kind:"var"},{type:"TryStatement",block:{type:"BlockStatement",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"ITERATOR_KEY"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"OBJECT"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"iterator"},computed:!1},computed:!0},arguments:[]}},{type:"VariableDeclarator",id:{type:"Identifier",name:"STEP_KEY"},init:null}],kind:"var"},test:{type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"ITERATOR_COMPLETION"},right:{type:"MemberExpression",object:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"STEP_KEY"},right:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"ITERATOR_KEY"},property:{type:"Identifier",name:"next"},computed:!1},arguments:[]},parenthesizedExpression:!0},property:{type:"Identifier",name:"done"},computed:!1},parenthesizedExpression:!0}},update:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"ITERATOR_COMPLETION"},right:{type:"Literal",value:!0}},body:{type:"BlockStatement",body:[]}}]},handler:{type:"CatchClause",param:{type:"Identifier",name:"err"},body:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"ITERATOR_HAD_ERROR_KEY"},right:{type:"Literal",value:!0}}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"ITERATOR_ERROR_KEY"},right:{type:"Identifier",name:"err"}}}]}},guardedHandlers:[],finalizer:{type:"BlockStatement",body:[{type:"TryStatement",block:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"Identifier",name:"ITERATOR_COMPLETION"}},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"ITERATOR_KEY"},property:{type:"Literal",value:"return"},computed:!0}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"ITERATOR_KEY"},property:{ type:"Literal",value:"return"},computed:!0},arguments:[]}}]},alternate:null}]},handler:null,guardedHandlers:[],finalizer:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"Identifier",name:"ITERATOR_HAD_ERROR_KEY"},consequent:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:{type:"Identifier",name:"ITERATOR_ERROR_KEY"}}]},alternate:null}]}}]}}]},"helper-async-to-generator":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"fn"}],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"gen"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"fn"},property:{type:"Identifier",name:"apply"},computed:!1},arguments:[{type:"ThisExpression"},{type:"Identifier",name:"arguments"}]}}],kind:"var"},{type:"ReturnStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"Promise"},arguments:[{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"resolve"},{type:"Identifier",name:"reject"}],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"callNext"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"step"},property:{type:"Identifier",name:"bind"},computed:!1},arguments:[{type:"Literal",value:null,rawValue:null},{type:"Literal",value:"next"}]}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"callThrow"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"step"},property:{type:"Identifier",name:"bind"},computed:!1},arguments:[{type:"Literal",value:null,rawValue:null},{type:"Literal",value:"throw"}]}}],kind:"var"},{type:"FunctionDeclaration",id:{type:"Identifier",name:"step"},generator:!1,expression:!1,params:[{type:"Identifier",name:"key"},{type:"Identifier",name:"arg"}],body:{type:"BlockStatement",body:[{type:"TryStatement",block:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"info"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"gen"},property:{type:"Identifier",name:"key"},computed:!0},arguments:[{type:"Identifier",name:"arg"}]}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"value"},init:{type:"MemberExpression",object:{type:"Identifier",name:"info"},property:{type:"Identifier",name:"value"},computed:!1}}],kind:"var"}]},handler:{type:"CatchClause",param:{type:"Identifier",name:"error"},body:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"reject"},arguments:[{type:"Identifier",name:"error"}]}},{type:"ReturnStatement",argument:null}]}},guardedHandlers:[],finalizer:null},{type:"IfStatement",test:{type:"MemberExpression",object:{type:"Identifier",name:"info"},property:{type:"Identifier",name:"done"},computed:!1},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"resolve"},arguments:[{type:"Identifier",name:"value"}]}}]},alternate:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Promise"},property:{type:"Identifier",name:"resolve"},computed:!1},arguments:[{type:"Identifier",name:"value"}]},property:{type:"Identifier",name:"then"},computed:!1},arguments:[{type:"Identifier",name:"callNext"},{type:"Identifier",name:"callThrow"}]}}]}}]}},{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"callNext"},arguments:[]}}]}}]}}]}}}]},parenthesizedExpression:!0}}]},"helper-bind":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:"Function"},property:{type:"Identifier",name:"prototype"},computed:!1},property:{type:"Identifier",name:"bind"},computed:!1}}]},"helper-class-call-check":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"instance"},{type:"Identifier",name:"Constructor"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"BinaryExpression",left:{type:"Identifier",name:"instance"},operator:"instanceof",right:{type:"Identifier",name:"Constructor"},parenthesizedExpression:!0}},consequent:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"TypeError"},arguments:[{type:"Literal",value:"Cannot call a class as a function"}]}}]},alternate:null}]},parenthesizedExpression:!0}}]},"helper-create-class":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"FunctionDeclaration",id:{type:"Identifier",name:"defineProperties"},generator:!1,expression:!1,params:[{type:"Identifier",name:"target"},{type:"Identifier",name:"props"}],body:{type:"BlockStatement",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"i"},init:{type:"Literal",value:0}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"i"},operator:"<",right:{type:"MemberExpression",object:{type:"Identifier",name:"props"},property:{type:"Identifier",name:"length"},computed:!1}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"i"}},body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"descriptor"},init:{type:"MemberExpression",object:{type:"Identifier",name:"props"},property:{type:"Identifier",name:"i"},computed:!0}}],kind:"var"},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"enumerable"},computed:!1},right:{type:"LogicalExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"enumerable"},computed:!1},operator:"||",right:{type:"Literal",value:!1}}}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"configurable"},computed:!1},right:{type:"Literal",value:!0}}},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Literal",value:"value"},operator:"in",right:{type:"Identifier",name:"descriptor"}},consequent:{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"writable"},computed:!1},right:{type:"Literal",value:!0}}},alternate:null},{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"defineProperty"},computed:!1},arguments:[{type:"Identifier",name:"target"},{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"key"},computed:!1},{type:"Identifier",name:"descriptor"}]}}]}}]}},{type:"ReturnStatement",argument:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"Constructor"},{type:"Identifier",name:"protoProps"},{type:"Identifier",name:"staticProps"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"Identifier",name:"protoProps"},consequent:{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"defineProperties"},arguments:[{type:"MemberExpression",object:{type:"Identifier",name:"Constructor"},property:{type:"Identifier",name:"prototype"},computed:!1},{type:"Identifier",name:"protoProps"}]}},alternate:null},{type:"IfStatement",test:{type:"Identifier",name:"staticProps"},consequent:{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"defineProperties"},arguments:[{type:"Identifier",name:"Constructor"},{type:"Identifier",name:"staticProps"}]}},alternate:null},{type:"ReturnStatement",argument:{type:"Identifier",name:"Constructor"}}]}}}]},parenthesizedExpression:!0},arguments:[]}}]},"helper-create-decorated-class":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"FunctionDeclaration",id:{type:"Identifier",name:"defineProperties"},generator:!1,expression:!1,params:[{type:"Identifier",name:"target"},{type:"Identifier",name:"descriptors"},{type:"Identifier",name:"initializers"}],body:{type:"BlockStatement",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"i"},init:{type:"Literal",value:0}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"i"},operator:"<",right:{type:"MemberExpression",object:{type:"Identifier",name:"descriptors"},property:{type:"Identifier",name:"length"},computed:!1}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"i"}},body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"descriptor"},init:{type:"MemberExpression",object:{type:"Identifier",name:"descriptors"},property:{type:"Identifier",name:"i"},computed:!0}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"decorators"},init:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"decorators"},computed:!1}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"key"},init:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"key"},computed:!1}}],kind:"var"},{type:"ExpressionStatement",expression:{type:"UnaryExpression",operator:"delete",prefix:!0,argument:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor",leadingComments:null},property:{type:"Identifier",name:"key"},computed:!1,leadingComments:null},leadingComments:null}},{type:"ExpressionStatement",expression:{type:"UnaryExpression",operator:"delete",prefix:!0,argument:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"decorators"},computed:!1}}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"enumerable"},computed:!1},right:{type:"LogicalExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"enumerable"},computed:!1},operator:"||",right:{type:"Literal",value:!1}}}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"configurable"},computed:!1},right:{type:"Literal",value:!0}}},{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"BinaryExpression",left:{type:"Literal",value:"value"},operator:"in",right:{type:"Identifier",name:"descriptor"}},operator:"||",right:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"initializer"},computed:!1}},consequent:{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"writable"},computed:!1},right:{type:"Literal",value:!0}}},alternate:null},{type:"IfStatement",test:{type:"Identifier",name:"decorators"},consequent:{type:"BlockStatement",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"f"},init:{type:"Literal",value:0}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"f"},operator:"<",right:{type:"MemberExpression",object:{type:"Identifier",name:"decorators"},property:{type:"Identifier",name:"length"},computed:!1}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"f"}},body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"decorator"},init:{type:"MemberExpression",object:{type:"Identifier",name:"decorators"},property:{type:"Identifier",name:"f"},computed:!0}}],kind:"var"},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"decorator"}},operator:"===",right:{type:"Literal",value:"function"}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"descriptor"},right:{type:"LogicalExpression",left:{type:"CallExpression",callee:{type:"Identifier",name:"decorator"},arguments:[{type:"Identifier",name:"target"},{type:"Identifier",name:"key"},{type:"Identifier",name:"descriptor"}]},operator:"||",right:{type:"Identifier",name:"descriptor"}}}}]},alternate:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"TypeError"},arguments:[{type:"BinaryExpression",left:{type:"BinaryExpression",left:{type:"BinaryExpression",left:{type:"Literal",value:"The decorator for method "},operator:"+",right:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"key"},computed:!1}},operator:"+",right:{type:"Literal",value:" is of the invalid type "}},operator:"+",right:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"decorator"}}}]}}]}}]}},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"initializer"},computed:!1},operator:"!==",right:{type:"Identifier",name:"undefined"}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"initializers"},property:{type:"Identifier",name:"key"},computed:!0},right:{type:"Identifier",name:"descriptor"}}},{type:"ContinueStatement",label:null}]},alternate:null}]},alternate:null},{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"defineProperty"},computed:!1},arguments:[{type:"Identifier",name:"target"},{type:"Identifier",name:"key"},{type:"Identifier",name:"descriptor"}]}}]}}]}},{type:"ReturnStatement",argument:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"Constructor"},{type:"Identifier",name:"protoProps"},{type:"Identifier",name:"staticProps"},{type:"Identifier",name:"protoInitializers"},{type:"Identifier",name:"staticInitializers"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"Identifier",name:"protoProps"},consequent:{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"defineProperties"},arguments:[{type:"MemberExpression",object:{type:"Identifier",name:"Constructor"},property:{type:"Identifier",name:"prototype"},computed:!1},{type:"Identifier",name:"protoProps"},{type:"Identifier",name:"protoInitializers"}]}},alternate:null},{type:"IfStatement",test:{type:"Identifier",name:"staticProps"},consequent:{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"defineProperties"},arguments:[{type:"Identifier",name:"Constructor"},{type:"Identifier",name:"staticProps"},{type:"Identifier",name:"staticInitializers"}]}},alternate:null},{type:"ReturnStatement",argument:{type:"Identifier",name:"Constructor"}}]}}}]},parenthesizedExpression:!0},arguments:[]}}]},"helper-create-decorated-object":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"descriptors"}],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"target"},init:{type:"ObjectExpression",properties:[]}}],kind:"var"},{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"i"},init:{type:"Literal",value:0}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"i"},operator:"<",right:{type:"MemberExpression",object:{type:"Identifier",name:"descriptors"},property:{type:"Identifier",name:"length"},computed:!1}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"i"}},body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"descriptor"},init:{type:"MemberExpression",object:{type:"Identifier",name:"descriptors"},property:{type:"Identifier",name:"i"},computed:!0}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"decorators"},init:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"decorators"},computed:!1}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"key"},init:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"key"},computed:!1}}],kind:"var"},{type:"ExpressionStatement",expression:{type:"UnaryExpression",operator:"delete",prefix:!0,argument:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor",leadingComments:null},property:{type:"Identifier",name:"key"},computed:!1,leadingComments:null},leadingComments:null}},{type:"ExpressionStatement",expression:{type:"UnaryExpression",operator:"delete",prefix:!0,argument:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"decorators"},computed:!1}}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"enumerable"},computed:!1},right:{type:"Literal",value:!0}}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"configurable"},computed:!1},right:{type:"Literal",value:!0}}},{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"BinaryExpression",left:{type:"Literal",value:"value"},operator:"in",right:{type:"Identifier",name:"descriptor"}},operator:"||",right:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"initializer"},computed:!1}},consequent:{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"writable"},computed:!1},right:{type:"Literal",value:!0}}},alternate:null},{type:"IfStatement",test:{type:"Identifier",name:"decorators"},consequent:{type:"BlockStatement",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"f"},init:{type:"Literal",value:0}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"f"},operator:"<",right:{type:"MemberExpression",object:{type:"Identifier",name:"decorators"},property:{type:"Identifier",name:"length"},computed:!1}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"f"}},body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"decorator"},init:{type:"MemberExpression",object:{type:"Identifier",name:"decorators"},property:{type:"Identifier",name:"f"},computed:!0}}],kind:"var"},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"decorator"}},operator:"===",right:{type:"Literal",value:"function"}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"descriptor"},right:{type:"LogicalExpression",left:{type:"CallExpression",callee:{type:"Identifier",name:"decorator"},arguments:[{type:"Identifier",name:"target"},{type:"Identifier",name:"key"},{type:"Identifier",name:"descriptor"}]},operator:"||",right:{type:"Identifier",name:"descriptor"}}}}]},alternate:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"TypeError"},arguments:[{type:"BinaryExpression",left:{type:"BinaryExpression",left:{type:"BinaryExpression",left:{type:"Literal",value:"The decorator for method "},operator:"+",right:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"key"},computed:!1}},operator:"+",right:{type:"Literal",value:" is of the invalid type "}},operator:"+",right:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"decorator"}}}]}}]}}]}}]},alternate:null},{type:"IfStatement",test:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"initializer"},computed:!1},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"value"},computed:!1},right:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"initializer"},computed:!1},property:{type:"Identifier",name:"call"},computed:!1},arguments:[{type:"Identifier",name:"target"}]}}}]},alternate:null},{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"defineProperty"},computed:!1},arguments:[{type:"Identifier",name:"target"},{type:"Identifier",name:"key"},{type:"Identifier",name:"descriptor"}]}}]}},{type:"ReturnStatement",argument:{type:"Identifier",name:"target"}}]},parenthesizedExpression:!0}}]},"helper-default-props":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"defaultProps"},{type:"Identifier",name:"props"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"Identifier",name:"defaultProps"},consequent:{type:"BlockStatement",body:[{type:"ForInStatement",left:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"propName"},init:null}],kind:"var"},right:{type:"Identifier",name:"defaultProps"},body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"MemberExpression",object:{type:"Identifier",name:"props"},property:{type:"Identifier",name:"propName"},computed:!0}},operator:"===",right:{type:"Literal",value:"undefined"}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"props"},property:{type:"Identifier",name:"propName"},computed:!0},right:{type:"MemberExpression",object:{type:"Identifier",name:"defaultProps"},property:{type:"Identifier",name:"propName"},computed:!0}}}]},alternate:null}]}}]},alternate:null},{type:"ReturnStatement",argument:{type:"Identifier",name:"props"}}]},parenthesizedExpression:!0}}]},"helper-defaults":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"obj"},{type:"Identifier",name:"defaults"}],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"keys"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"getOwnPropertyNames"},computed:!1},arguments:[{type:"Identifier",name:"defaults"}]}}],kind:"var"},{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"i"},init:{type:"Literal",value:0}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"i"},operator:"<",right:{type:"MemberExpression",object:{type:"Identifier",name:"keys"},property:{type:"Identifier",name:"length"},computed:!1}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"i"}},body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"key"},init:{type:"MemberExpression",object:{type:"Identifier",name:"keys"},property:{type:"Identifier",name:"i"},computed:!0}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"value"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"getOwnPropertyDescriptor"},computed:!1},arguments:[{type:"Identifier",name:"defaults"},{type:"Identifier",name:"key"}]}}],kind:"var"},{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"LogicalExpression",left:{type:"Identifier",name:"value"},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"value"},property:{type:"Identifier",name:"configurable"},computed:!1}},operator:"&&",right:{type:"BinaryExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"obj"},property:{type:"Identifier",name:"key"},computed:!0},operator:"===",right:{type:"Identifier",name:"undefined"}}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"defineProperty"},computed:!1},arguments:[{type:"Identifier",name:"obj"},{type:"Identifier",name:"key"},{type:"Identifier",name:"value"}]}}]},alternate:null}]}},{type:"ReturnStatement",argument:{type:"Identifier",name:"obj"}}]},parenthesizedExpression:!0}}]},"helper-define-decorated-property-descriptor":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"target"},{type:"Identifier",name:"key"},{type:"Identifier",name:"descriptors"}],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"_descriptor"},init:{type:"MemberExpression",object:{type:"Identifier",name:"descriptors"},property:{type:"Identifier",name:"key"},computed:!0}}],kind:"var"},{type:"IfStatement",test:{type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"Identifier",name:"_descriptor"}},consequent:{type:"ReturnStatement",argument:null,leadingComments:null,trailingComments:null},alternate:null},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"descriptor",leadingComments:null},init:{type:"ObjectExpression",properties:[]},leadingComments:null}],kind:"var"},{type:"ForInStatement",left:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"_key"},init:null}],kind:"var"},right:{type:"Identifier",name:"_descriptor"},body:{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"_key"},computed:!0},right:{type:"MemberExpression",object:{type:"Identifier",name:"_descriptor"},property:{type:"Identifier",name:"_key"},computed:!0}},trailingComments:null}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor",leadingComments:null},property:{type:"Identifier",name:"value"},computed:!1,leadingComments:null},right:{type:"ConditionalExpression",test:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"initializer"},computed:!1},consequent:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:"descriptor"},property:{type:"Identifier",name:"initializer"},computed:!1},property:{type:"Identifier",name:"call"},computed:!1},arguments:[{type:"Identifier",name:"target"}]},alternate:{type:"Identifier",name:"undefined"}},leadingComments:null}},{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"defineProperty"},computed:!1},arguments:[{type:"Identifier",name:"target"},{type:"Identifier",name:"key"},{type:"Identifier",name:"descriptor"}]}}]},parenthesizedExpression:!0}}]},"helper-define-property":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"obj"},{type:"Identifier",name:"key"},{type:"Identifier",name:"value"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"key",leadingComments:null},operator:"in",right:{type:"Identifier",name:"obj"},leadingComments:null},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"defineProperty"},computed:!1},arguments:[{type:"Identifier",name:"obj"},{type:"Identifier",name:"key"},{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"value"},value:{type:"Identifier",name:"value"},kind:"init"},{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"enumerable"},value:{type:"Literal",value:!0},kind:"init"},{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"configurable"},value:{type:"Literal",value:!0},kind:"init"},{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"writable"},value:{type:"Literal",value:!0},kind:"init"}]}]}}]},alternate:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"obj"},property:{type:"Identifier",name:"key"},computed:!0},right:{type:"Identifier",name:"value" }}}]}},{type:"ReturnStatement",argument:{type:"Identifier",name:"obj"}}]},parenthesizedExpression:!0}}]},"helper-extends":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"LogicalExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"assign"},computed:!1},operator:"||",right:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"target"}],body:{type:"BlockStatement",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"i"},init:{type:"Literal",value:1}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"i"},operator:"<",right:{type:"MemberExpression",object:{type:"Identifier",name:"arguments"},property:{type:"Identifier",name:"length"},computed:!1}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"i"}},body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"source"},init:{type:"MemberExpression",object:{type:"Identifier",name:"arguments"},property:{type:"Identifier",name:"i"},computed:!0}}],kind:"var"},{type:"ForInStatement",left:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"key"},init:null}],kind:"var"},right:{type:"Identifier",name:"source"},body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"prototype"},computed:!1},property:{type:"Identifier",name:"hasOwnProperty"},computed:!1},property:{type:"Identifier",name:"call"},computed:!1},arguments:[{type:"Identifier",name:"source"},{type:"Identifier",name:"key"}]},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"target"},property:{type:"Identifier",name:"key"},computed:!0},right:{type:"MemberExpression",object:{type:"Identifier",name:"source"},property:{type:"Identifier",name:"key"},computed:!0}}}]},alternate:null}]}}]}},{type:"ReturnStatement",argument:{type:"Identifier",name:"target"}}]}}}}]},"helper-get":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:{type:"Identifier",name:"get"},generator:!1,expression:!1,params:[{type:"Identifier",name:"object"},{type:"Identifier",name:"property"},{type:"Identifier",name:"receiver"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"object"},operator:"===",right:{type:"Literal",value:null,rawValue:null}},consequent:{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"object"},right:{type:"MemberExpression",object:{type:"Identifier",name:"Function"},property:{type:"Identifier",name:"prototype"},computed:!1}}},alternate:null},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"desc"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"getOwnPropertyDescriptor"},computed:!1},arguments:[{type:"Identifier",name:"object"},{type:"Identifier",name:"property"}]}}],kind:"var"},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"desc"},operator:"===",right:{type:"Identifier",name:"undefined"}},consequent:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"parent"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"getPrototypeOf"},computed:!1},arguments:[{type:"Identifier",name:"object"}]}}],kind:"var"},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"parent"},operator:"===",right:{type:"Literal",value:null,rawValue:null}},consequent:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"Identifier",name:"undefined"}}]},alternate:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"CallExpression",callee:{type:"Identifier",name:"get"},arguments:[{type:"Identifier",name:"parent"},{type:"Identifier",name:"property"},{type:"Identifier",name:"receiver"}]}}]}}]},alternate:{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Literal",value:"value"},operator:"in",right:{type:"Identifier",name:"desc"}},consequent:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"MemberExpression",object:{type:"Identifier",name:"desc"},property:{type:"Identifier",name:"value"},computed:!1}}]},alternate:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"getter"},init:{type:"MemberExpression",object:{type:"Identifier",name:"desc"},property:{type:"Identifier",name:"get"},computed:!1}}],kind:"var"},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"getter"},operator:"===",right:{type:"Identifier",name:"undefined"}},consequent:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"Identifier",name:"undefined"}}]},alternate:null},{type:"ReturnStatement",argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"getter"},property:{type:"Identifier",name:"call"},computed:!1},arguments:[{type:"Identifier",name:"receiver"}]}}]}}}]},parenthesizedExpression:!0}}]},"helper-has-own":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"prototype"},computed:!1},property:{type:"Identifier",name:"hasOwnProperty"},computed:!1}}]},"helper-inherits":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"subClass"},{type:"Identifier",name:"superClass"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"superClass"}},operator:"!==",right:{type:"Literal",value:"function"}},operator:"&&",right:{type:"BinaryExpression",left:{type:"Identifier",name:"superClass"},operator:"!==",right:{type:"Literal",value:null,rawValue:null}}},consequent:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"TypeError"},arguments:[{type:"BinaryExpression",left:{type:"Literal",value:"Super expression must either be null or a function, not "},operator:"+",right:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"superClass"}}}]}}]},alternate:null},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"subClass"},property:{type:"Identifier",name:"prototype"},computed:!1},right:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"create"},computed:!1},arguments:[{type:"LogicalExpression",left:{type:"Identifier",name:"superClass"},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"superClass"},property:{type:"Identifier",name:"prototype"},computed:!1}},{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"constructor"},value:{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"value"},value:{type:"Identifier",name:"subClass"},kind:"init"},{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"enumerable"},value:{type:"Literal",value:!1},kind:"init"},{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"writable"},value:{type:"Literal",value:!0},kind:"init"},{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"configurable"},value:{type:"Literal",value:!0},kind:"init"}]},kind:"init"}]}]}}},{type:"IfStatement",test:{type:"Identifier",name:"superClass"},consequent:{type:"ExpressionStatement",expression:{type:"ConditionalExpression",test:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"setPrototypeOf"},computed:!1},consequent:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"setPrototypeOf"},computed:!1},arguments:[{type:"Identifier",name:"subClass"},{type:"Identifier",name:"superClass"}]},alternate:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"subClass"},property:{type:"Identifier",name:"__proto__"},computed:!1},right:{type:"Identifier",name:"superClass"}}}},alternate:null}]},parenthesizedExpression:!0}}]},"helper-instanceof":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"left"},{type:"Identifier",name:"right"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"BinaryExpression",left:{type:"Identifier",name:"right"},operator:"!=",right:{type:"Literal",value:null,rawValue:null}},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"right"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"hasInstance"},computed:!1},computed:!0}},consequent:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"right"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"hasInstance"},computed:!1},computed:!0},arguments:[{type:"Identifier",name:"left"}]}}]},alternate:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"BinaryExpression",left:{type:"Identifier",name:"left"},operator:"instanceof",right:{type:"Identifier",name:"right"}}}]}}]},parenthesizedExpression:!0}}]},"helper-interop-export-wildcard":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"obj"},{type:"Identifier",name:"defaults"}],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"newObj"},init:{type:"CallExpression",callee:{type:"Identifier",name:"defaults"},arguments:[{type:"ObjectExpression",properties:[]},{type:"Identifier",name:"obj"}]}}],kind:"var"},{type:"ExpressionStatement",expression:{type:"UnaryExpression",operator:"delete",prefix:!0,argument:{type:"MemberExpression",object:{type:"Identifier",name:"newObj"},property:{type:"Literal",value:"default"},computed:!0}}},{type:"ReturnStatement",argument:{type:"Identifier",name:"newObj"}}]},parenthesizedExpression:!0}}]},"helper-interop-require-default":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"obj"}],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"ConditionalExpression",test:{type:"LogicalExpression",left:{type:"Identifier",name:"obj"},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"obj"},property:{type:"Identifier",name:"__esModule"},computed:!1}},consequent:{type:"Identifier",name:"obj"},alternate:{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Literal",value:"default"},value:{type:"Identifier",name:"obj"},kind:"init"}]}}}]},parenthesizedExpression:!0}}]},"helper-interop-require-wildcard":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"obj"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"Identifier",name:"obj"},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"obj"},property:{type:"Identifier",name:"__esModule"},computed:!1}},consequent:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"Identifier",name:"obj"}}]},alternate:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"newObj"},init:{type:"ObjectExpression",properties:[]}}],kind:"var"},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"obj"},operator:"!=",right:{type:"Literal",value:null,rawValue:null}},consequent:{type:"BlockStatement",body:[{type:"ForInStatement",left:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"key"},init:null}],kind:"var"},right:{type:"Identifier",name:"obj"},body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"prototype"},computed:!1},property:{type:"Identifier",name:"hasOwnProperty"},computed:!1},property:{type:"Identifier",name:"call"},computed:!1},arguments:[{type:"Identifier",name:"obj"},{type:"Identifier",name:"key"}]},consequent:{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"newObj"},property:{type:"Identifier",name:"key"},computed:!0},right:{type:"MemberExpression",object:{type:"Identifier",name:"obj"},property:{type:"Identifier",name:"key"},computed:!0}}},alternate:null}]}}]},alternate:null},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"newObj"},property:{type:"Literal",value:"default"},computed:!0},right:{type:"Identifier",name:"obj"}}},{type:"ReturnStatement",argument:{type:"Identifier",name:"newObj"}}]}}]},parenthesizedExpression:!0}}]},"helper-interop-require":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"obj"}],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"ConditionalExpression",test:{type:"LogicalExpression",left:{type:"Identifier",name:"obj"},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"obj"},property:{type:"Identifier",name:"__esModule"},computed:!1}},consequent:{type:"MemberExpression",object:{type:"Identifier",name:"obj"},property:{type:"Literal",value:"default"},computed:!0},alternate:{type:"Identifier",name:"obj"}}}]},parenthesizedExpression:!0}}]},"helper-new-arrow-check":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"innerThis"},{type:"Identifier",name:"boundThis"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"innerThis"},operator:"!==",right:{type:"Identifier",name:"boundThis"}},consequent:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"TypeError"},arguments:[{type:"Literal",value:"Cannot instantiate an arrow function"}]}}]},alternate:null}]},parenthesizedExpression:!0}}]},"helper-object-destructuring-empty":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"obj"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"obj"},operator:"==",right:{type:"Literal",value:null,rawValue:null}},consequent:{type:"ThrowStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"TypeError"},arguments:[{type:"Literal",value:"Cannot destructure undefined"}]}},alternate:null}]},parenthesizedExpression:!0}}]},"helper-object-without-properties":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"obj"},{type:"Identifier",name:"keys"}],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"target"},init:{type:"ObjectExpression",properties:[]}}],kind:"var"},{type:"ForInStatement",left:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"i"},init:null}],kind:"var"},right:{type:"Identifier",name:"obj"},body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"keys"},property:{type:"Identifier",name:"indexOf"},computed:!1},arguments:[{type:"Identifier",name:"i"}]},operator:">=",right:{type:"Literal",value:0}},consequent:{type:"ContinueStatement",label:null},alternate:null},{type:"IfStatement",test:{type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"prototype"},computed:!1},property:{type:"Identifier",name:"hasOwnProperty"},computed:!1},property:{type:"Identifier",name:"call"},computed:!1},arguments:[{type:"Identifier",name:"obj"},{type:"Identifier",name:"i"}]}},consequent:{type:"ContinueStatement",label:null},alternate:null},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"target"},property:{type:"Identifier",name:"i"},computed:!0},right:{type:"MemberExpression",object:{type:"Identifier",name:"obj"},property:{type:"Identifier",name:"i"},computed:!0}}}]}},{type:"ReturnStatement",argument:{type:"Identifier",name:"target"}}]},parenthesizedExpression:!0}}]},"helper-self-global":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"ConditionalExpression",test:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"global"}},operator:"===",right:{type:"Literal",value:"undefined"}},consequent:{type:"Identifier",name:"self"},alternate:{type:"Identifier",name:"global"}}}]},"helper-set":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:{type:"Identifier",name:"set"},generator:!1,expression:!1,params:[{type:"Identifier",name:"object"},{type:"Identifier",name:"property"},{type:"Identifier",name:"value"},{type:"Identifier",name:"receiver"}],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"desc"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"getOwnPropertyDescriptor"},computed:!1},arguments:[{type:"Identifier",name:"object"},{type:"Identifier",name:"property"}]}}],kind:"var"},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"desc"},operator:"===",right:{type:"Identifier",name:"undefined"}},consequent:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"parent"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"getPrototypeOf"},computed:!1},arguments:[{type:"Identifier",name:"object"}]}}],kind:"var"},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"parent"},operator:"!==",right:{type:"Literal",value:null,rawValue:null}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"set"},arguments:[{type:"Identifier",name:"parent"},{type:"Identifier",name:"property"},{type:"Identifier",name:"value"},{type:"Identifier",name:"receiver"}]}}]},alternate:null}]},alternate:{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"BinaryExpression",left:{type:"Literal",value:"value"},operator:"in",right:{type:"Identifier",name:"desc"}},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"desc"},property:{type:"Identifier",name:"writable"},computed:!1}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"desc"},property:{type:"Identifier",name:"value"},computed:!1},right:{type:"Identifier",name:"value"}}}]},alternate:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"setter"},init:{type:"MemberExpression",object:{type:"Identifier",name:"desc"},property:{type:"Identifier",name:"set"},computed:!1}}],kind:"var"},{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"setter"},operator:"!==",right:{type:"Identifier",name:"undefined"}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"setter"},property:{type:"Identifier",name:"call"},computed:!1},arguments:[{type:"Identifier",name:"receiver"},{type:"Identifier",name:"value"}]}}]},alternate:null}]}}},{type:"ReturnStatement",argument:{type:"Identifier",name:"value"}}]},parenthesizedExpression:!0}}]},"helper-slice":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"MemberExpression",object:{type:"MemberExpression",object:{type:"Identifier",name:"Array"},property:{type:"Identifier",name:"prototype"},computed:!1},property:{type:"Identifier",name:"slice"},computed:!1}}]},"helper-sliced-to-array-loose":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"arr"},{type:"Identifier",name:"i"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Array"},property:{type:"Identifier",name:"isArray"},computed:!1},arguments:[{type:"Identifier",name:"arr"}]},consequent:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"Identifier",name:"arr"}}]},alternate:{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"iterator"},computed:!1},operator:"in",right:{type:"CallExpression",callee:{type:"Identifier",name:"Object"},arguments:[{type:"Identifier",name:"arr"}]}},consequent:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"_arr"},init:{type:"ArrayExpression",elements:[]}}],kind:"var"},{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"_iterator"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"arr"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"iterator"},computed:!1},computed:!0},arguments:[]}},{type:"VariableDeclarator",id:{type:"Identifier",name:"_step"},init:null}],kind:"var"},test:{type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"MemberExpression",object:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"_step"},right:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"_iterator"},property:{type:"Identifier",name:"next"},computed:!1},arguments:[]},parenthesizedExpression:!0},property:{type:"Identifier",name:"done"},computed:!1}},update:null,body:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"_arr"},property:{type:"Identifier",name:"push"},computed:!1},arguments:[{type:"MemberExpression",object:{type:"Identifier",name:"_step"},property:{type:"Identifier",name:"value"},computed:!1}]}},{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"Identifier",name:"i"},operator:"&&",right:{type:"BinaryExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"_arr"},property:{type:"Identifier",name:"length"},computed:!1},operator:"===",right:{type:"Identifier",name:"i"}}},consequent:{type:"BreakStatement",label:null},alternate:null}]}},{type:"ReturnStatement",argument:{type:"Identifier",name:"_arr"}}]},alternate:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"TypeError"},arguments:[{type:"Literal",value:"Invalid attempt to destructure non-iterable instance"}]}}]}}}]},parenthesizedExpression:!0}}]},"helper-sliced-to-array":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"FunctionDeclaration",id:{type:"Identifier",name:"sliceIterator",leadingComments:null},generator:!1,expression:!1,params:[{type:"Identifier",name:"arr"},{type:"Identifier",name:"i"}],body:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"_arr",leadingComments:null},init:{type:"ArrayExpression",elements:[]},leadingComments:null}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"_n"},init:{type:"Literal",value:!0}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"_d"},init:{type:"Literal",value:!1}}],kind:"var"},{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"_e"},init:{type:"Identifier",name:"undefined"}}],kind:"var"},{type:"TryStatement",block:{type:"BlockStatement",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"_i"},init:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"arr"},property:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"iterator"},computed:!1},computed:!0},arguments:[]}},{type:"VariableDeclarator",id:{type:"Identifier",name:"_s"},init:null}],kind:"var"},test:{type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"_n"},right:{type:"MemberExpression",object:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"_s"},right:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"_i"},property:{type:"Identifier",name:"next"},computed:!1},arguments:[]},parenthesizedExpression:!0},property:{type:"Identifier",name:"done"},computed:!1},parenthesizedExpression:!0}},update:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"_n"},right:{type:"Literal",value:!0}},body:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"_arr"},property:{type:"Identifier",name:"push"},computed:!1},arguments:[{type:"MemberExpression",object:{type:"Identifier",name:"_s"},property:{type:"Identifier",name:"value"},computed:!1}]}},{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"Identifier",name:"i"},operator:"&&",right:{type:"BinaryExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"_arr"},property:{type:"Identifier",name:"length"},computed:!1},operator:"===",right:{type:"Identifier",name:"i"}}},consequent:{type:"BreakStatement",label:null},alternate:null}]}}]},handler:{type:"CatchClause",param:{type:"Identifier",name:"err"},body:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"_d"},right:{type:"Literal",value:!0}}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"Identifier",name:"_e"},right:{type:"Identifier",name:"err"}}}]}},guardedHandlers:[],finalizer:{type:"BlockStatement",body:[{type:"TryStatement",block:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"UnaryExpression",operator:"!",prefix:!0,argument:{type:"Identifier",name:"_n"}},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"_i"},property:{type:"Literal",value:"return"},computed:!0}},consequent:{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"_i"},property:{type:"Literal",value:"return"},computed:!0},arguments:[]}},alternate:null}]},handler:null,guardedHandlers:[],finalizer:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"Identifier",name:"_d"},consequent:{type:"ThrowStatement",argument:{type:"Identifier",name:"_e"}},alternate:null}]}}]}},{type:"ReturnStatement",argument:{type:"Identifier",name:"_arr"}}]}},{type:"ReturnStatement",argument:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"arr"},{type:"Identifier",name:"i"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Array"},property:{type:"Identifier",name:"isArray"},computed:!1},arguments:[{type:"Identifier",name:"arr"}]},consequent:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"Identifier",name:"arr"}}]},alternate:{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Identifier",name:"iterator"},computed:!1},operator:"in",right:{type:"CallExpression",callee:{type:"Identifier",name:"Object"},arguments:[{type:"Identifier",name:"arr"}]}},consequent:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"CallExpression",callee:{type:"Identifier",name:"sliceIterator"},arguments:[{type:"Identifier",name:"arr"},{type:"Identifier",name:"i"}]}}]},alternate:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"TypeError"},arguments:[{type:"Literal",value:"Invalid attempt to destructure non-iterable instance"}]}}]}}}]}}}]},parenthesizedExpression:!0},arguments:[]}}]},"helper-tagged-template-literal-loose":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"strings"},{type:"Identifier",name:"raw"}],body:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"strings"},property:{type:"Identifier",name:"raw"},computed:!1},right:{type:"Identifier",name:"raw"}}},{type:"ReturnStatement",argument:{type:"Identifier",name:"strings"}}]},parenthesizedExpression:!0}}]},"helper-tagged-template-literal":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"strings"},{type:"Identifier",name:"raw"}],body:{type:"BlockStatement",body:[{type:"ReturnStatement", argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"freeze"},computed:!1},arguments:[{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"defineProperties"},computed:!1},arguments:[{type:"Identifier",name:"strings"},{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"raw"},value:{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"value"},value:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"freeze"},computed:!1},arguments:[{type:"Identifier",name:"raw"}]},kind:"init"}]},kind:"init"}]}]}]}}]},parenthesizedExpression:!0}}]},"helper-temporal-assert-defined":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"val"},{type:"Identifier",name:"name"},{type:"Identifier",name:"undef"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"Identifier",name:"val"},operator:"===",right:{type:"Identifier",name:"undef"}},consequent:{type:"BlockStatement",body:[{type:"ThrowStatement",argument:{type:"NewExpression",callee:{type:"Identifier",name:"ReferenceError"},arguments:[{type:"BinaryExpression",left:{type:"Identifier",name:"name"},operator:"+",right:{type:"Literal",value:" is not defined - temporal dead zone"}}]}}]},alternate:null},{type:"ReturnStatement",argument:{type:"Literal",value:!0}}]},parenthesizedExpression:!0}}]},"helper-temporal-undefined":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"ObjectExpression",properties:[],parenthesizedExpression:!0}}]},"helper-to-array":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"arr"}],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"ConditionalExpression",test:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Array"},property:{type:"Identifier",name:"isArray"},computed:!1},arguments:[{type:"Identifier",name:"arr"}]},consequent:{type:"Identifier",name:"arr"},alternate:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Array"},property:{type:"Identifier",name:"from"},computed:!1},arguments:[{type:"Identifier",name:"arr"}]}}}]},parenthesizedExpression:!0}}]},"helper-to-consumable-array":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"arr"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Array"},property:{type:"Identifier",name:"isArray"},computed:!1},arguments:[{type:"Identifier",name:"arr"}]},consequent:{type:"BlockStatement",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"i"},init:{type:"Literal",value:0}},{type:"VariableDeclarator",id:{type:"Identifier",name:"arr2"},init:{type:"CallExpression",callee:{type:"Identifier",name:"Array"},arguments:[{type:"MemberExpression",object:{type:"Identifier",name:"arr"},property:{type:"Identifier",name:"length"},computed:!1}]}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"i"},operator:"<",right:{type:"MemberExpression",object:{type:"Identifier",name:"arr"},property:{type:"Identifier",name:"length"},computed:!1}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"i"}},body:{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"arr2"},property:{type:"Identifier",name:"i"},computed:!0},right:{type:"MemberExpression",object:{type:"Identifier",name:"arr"},property:{type:"Identifier",name:"i"},computed:!0}}}},{type:"ReturnStatement",argument:{type:"Identifier",name:"arr2"}}]},alternate:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Array"},property:{type:"Identifier",name:"from"},computed:!1},arguments:[{type:"Identifier",name:"arr"}]}}]}}]},parenthesizedExpression:!0}}]},"helper-typeof-react-element":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"LogicalExpression",left:{type:"LogicalExpression",left:{type:"LogicalExpression",left:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"Symbol"}},operator:"===",right:{type:"Literal",value:"function"}},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Literal",value:"for"},computed:!0}},operator:"&&",right:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"Symbol"},property:{type:"Literal",value:"for"},computed:!0},arguments:[{type:"Literal",value:"react.element"}]}},operator:"||",right:{type:"Literal",value:60103}}}]},"helper-typeof":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"obj"}],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"ConditionalExpression",test:{type:"LogicalExpression",left:{type:"Identifier",name:"obj"},operator:"&&",right:{type:"BinaryExpression",left:{type:"MemberExpression",object:{type:"Identifier",name:"obj"},property:{type:"Identifier",name:"constructor"},computed:!1},operator:"===",right:{type:"Identifier",name:"Symbol"}}},consequent:{type:"Literal",value:"symbol"},alternate:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"obj"}}}}]},parenthesizedExpression:!0}}]},"let-scoping-return":{type:"Program",body:[{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"RETURN"}},operator:"===",right:{type:"Literal",value:"object"}},consequent:{type:"ReturnStatement",argument:{type:"MemberExpression",object:{type:"Identifier",name:"RETURN"},property:{type:"Identifier",name:"v"},computed:!1}},alternate:null}]},"named-function":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"FunctionDeclaration",id:{type:"Identifier",name:"GET_OUTER_ID"},generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"Identifier",name:"FUNCTION_ID"}}]}},{type:"ReturnStatement",argument:{type:"Identifier",name:"FUNCTION"}}]},parenthesizedExpression:!0},arguments:[]}}]},"property-method-assignment-wrapper-generator":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"FUNCTION_KEY"}],body:{type:"BlockStatement",body:[{type:"FunctionDeclaration",id:{type:"Identifier",name:"FUNCTION_ID"},generator:!0,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"YieldExpression",delegate:!0,argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"FUNCTION_KEY"},property:{type:"Identifier",name:"apply"},computed:!1},arguments:[{type:"ThisExpression"},{type:"Identifier",name:"arguments"}]}}}]}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"FUNCTION_ID"},property:{type:"Identifier",name:"toString"},computed:!1},right:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"FUNCTION_KEY"},property:{type:"Identifier",name:"toString"},computed:!1},arguments:[]}}]}}}},{type:"ReturnStatement",argument:{type:"Identifier",name:"FUNCTION_ID"}}]},parenthesizedExpression:!0},arguments:[{type:"Identifier",name:"FUNCTION"}]}}]},"property-method-assignment-wrapper":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"FUNCTION_KEY"}],body:{type:"BlockStatement",body:[{type:"FunctionDeclaration",id:{type:"Identifier",name:"FUNCTION_ID"},generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"FUNCTION_KEY"},property:{type:"Identifier",name:"apply"},computed:!1},arguments:[{type:"ThisExpression"},{type:"Identifier",name:"arguments"}]}}]}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"FUNCTION_ID"},property:{type:"Identifier",name:"toString"},computed:!1},right:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"FUNCTION_KEY"},property:{type:"Identifier",name:"toString"},computed:!1},arguments:[]}}]}}}},{type:"ReturnStatement",argument:{type:"Identifier",name:"FUNCTION_ID"}}]},parenthesizedExpression:!0},arguments:[{type:"Identifier",name:"FUNCTION"}]}}]},"prototype-identifier":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"MemberExpression",object:{type:"Identifier",name:"CLASS_NAME"},property:{type:"Identifier",name:"prototype"},computed:!1}}]},"require-assign-key":{type:"Program",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"VARIABLE_NAME"},init:{type:"MemberExpression",object:{type:"CallExpression",callee:{type:"Identifier",name:"require"},arguments:[{type:"Identifier",name:"MODULE_NAME"}]},property:{type:"Identifier",name:"KEY"},computed:!1}}],kind:"var"}]},require:{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"require"},arguments:[{type:"Identifier",name:"MODULE_NAME"}]}}]},rest:{type:"Program",body:[{type:"ForStatement",init:{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"LEN"},init:{type:"MemberExpression",object:{type:"Identifier",name:"ARGUMENTS"},property:{type:"Identifier",name:"length"},computed:!1}},{type:"VariableDeclarator",id:{type:"Identifier",name:"ARRAY"},init:{type:"CallExpression",callee:{type:"Identifier",name:"Array"},arguments:[{type:"Identifier",name:"ARRAY_LEN"}]}},{type:"VariableDeclarator",id:{type:"Identifier",name:"KEY"},init:{type:"Identifier",name:"START"}}],kind:"var"},test:{type:"BinaryExpression",left:{type:"Identifier",name:"KEY"},operator:"<",right:{type:"Identifier",name:"LEN"}},update:{type:"UpdateExpression",operator:"++",prefix:!1,argument:{type:"Identifier",name:"KEY"}},body:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"ARRAY"},property:{type:"Identifier",name:"ARRAY_KEY"},computed:!0},right:{type:"MemberExpression",object:{type:"Identifier",name:"ARGUMENTS"},property:{type:"Identifier",name:"KEY"},computed:!0}}}]}}]},"self-contained-helpers-head":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"exports"},property:{type:"Literal",value:"default"},computed:!0},right:{type:"Identifier",name:"HELPER"}}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"exports"},property:{type:"Identifier",name:"__esModule"},computed:!1},right:{type:"Literal",value:!0}}}]},system:{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"System"},property:{type:"Identifier",name:"register"},computed:!1},arguments:[{type:"Identifier",name:"MODULE_NAME"},{type:"Identifier",name:"MODULE_DEPENDENCIES"},{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"EXPORT_IDENTIFIER"}],body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"setters"},value:{type:"Identifier",name:"SETTERS"},kind:"init"},{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"execute"},value:{type:"Identifier",name:"EXECUTE"},kind:"init"}]}}]}}]}}]},"tail-call-body":{type:"Program",body:[{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"AGAIN_ID"},init:{type:"Literal",value:!0}}],kind:"var"},{type:"LabeledStatement",body:{type:"WhileStatement",test:{type:"Identifier",name:"AGAIN_ID"},body:{type:"ExpressionStatement",expression:{type:"Identifier",name:"BLOCK"}}},label:{type:"Identifier",name:"FUNCTION_ID"}}]}]},"test-exports":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"exports"}},operator:"!==",right:{type:"Literal",value:"undefined"}}}]},"test-module":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"module"}},operator:"!==",right:{type:"Literal",value:"undefined"}}}]},"umd-commonjs-strict":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"root"},{type:"Identifier",name:"factory"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"define"}},operator:"===",right:{type:"Literal",value:"function"}},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"define"},property:{type:"Identifier",name:"amd"},computed:!1}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"define"},arguments:[{type:"Identifier",name:"AMD_ARGUMENTS"},{type:"Identifier",name:"factory"}]}}]},alternate:{type:"IfStatement",test:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"exports"}},operator:"===",right:{type:"Literal",value:"object"}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"factory"},arguments:[{type:"Identifier",name:"COMMON_ARGUMENTS"}]}}]},alternate:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"factory"},arguments:[{type:"Identifier",name:"BROWSER_ARGUMENTS"}]}}]}}}]},parenthesizedExpression:!0},arguments:[{type:"Identifier",name:"UMD_ROOT"},{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"FACTORY_PARAMETERS"}],body:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"Identifier",name:"FACTORY_BODY"}}]}}]}}]},"umd-runner-body":{type:"Program",body:[{type:"ExpressionStatement",expression:{type:"FunctionExpression",id:null,generator:!1,expression:!1,params:[{type:"Identifier",name:"global"},{type:"Identifier",name:"factory"}],body:{type:"BlockStatement",body:[{type:"IfStatement",test:{type:"LogicalExpression",left:{type:"BinaryExpression",left:{type:"UnaryExpression",operator:"typeof",prefix:!0,argument:{type:"Identifier",name:"define"}},operator:"===",right:{type:"Literal",value:"function"}},operator:"&&",right:{type:"MemberExpression",object:{type:"Identifier",name:"define"},property:{type:"Identifier",name:"amd"},computed:!1}},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"define"},arguments:[{type:"Identifier",name:"AMD_ARGUMENTS"},{type:"Identifier",name:"factory"}]}}]},alternate:{type:"IfStatement",test:{type:"Identifier",name:"COMMON_TEST"},consequent:{type:"BlockStatement",body:[{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"factory"},arguments:[{type:"Identifier",name:"COMMON_ARGUMENTS"}]}}]},alternate:{type:"BlockStatement",body:[{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:"mod"},init:{type:"ObjectExpression",properties:[{type:"Property",method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",name:"exports"},value:{type:"ObjectExpression",properties:[]},kind:"init"}]}}],kind:"var"},{type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"Identifier",name:"factory"},arguments:[{type:"MemberExpression",object:{type:"Identifier",name:"mod"},property:{type:"Identifier",name:"exports"},computed:!1},{type:"Identifier",name:"BROWSER_ARGUMENTS"}]}},{type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:{type:"MemberExpression",object:{type:"Identifier",name:"global"},property:{type:"Identifier",name:"GLOBAL_ARG"},computed:!1},right:{type:"MemberExpression",object:{type:"Identifier",name:"mod"},property:{type:"Identifier",name:"exports"},computed:!1}}}]}}}]},parenthesizedExpression:!0}}]}}},{}],605:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return new s["default"](t,e).parse()}r.__esModule=!0,r.parse=i;var a=e(609),s=n(a);e(614),e(613),e(611),e(608),e(612),e(610),e(607);var o=e(621);e(619),e(618);var u=e(615),p=n(u),l=e(616),c=n(l);a.plugins.flow=p["default"],a.plugins.jsx=c["default"],r.tokTypes=o.types},{607:607,608:608,609:609,610:610,611:611,612:612,613:613,614:614,615:615,616:616,618:618,619:619,621:621}],606:[function(e,t,r){"use strict";function n(e){var t={};for(var r in i)t[r]=e&&r in e?e[r]:i[r];return t}r.__esModule=!0,r.getOptions=n;var i={sourceType:"script",allowReserved:!0,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,plugins:{},features:{},strictMode:null};r.defaultOptions=i},{}],607:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){return e[e.length-1]}var a=e(609),s=n(a),o=s["default"].prototype;o.addComment=function(e){this.state.trailingComments.push(e),this.state.leadingComments.push(e)},o.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t,r,n,a=this.state.commentStack;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(r=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var s=i(a);a.length>0&&s.trailingComments&&s.trailingComments[0].start>=e.end&&(r=s.trailingComments,s.trailingComments=null)}for(;a.length>0&&i(a).start>=e.start;)t=a.pop();if(t){if(t.leadingComments)if(t!==e&&i(t.leadingComments).end<=e.start)e.leadingComments=t.leadingComments,t.leadingComments=null;else for(n=t.leadingComments.length-2;n>=0;--n)if(t.leadingComments[n].end<=e.start){e.leadingComments=t.leadingComments.splice(0,n+1);break}}else if(this.state.leadingComments.length>0)if(i(this.state.leadingComments).end<=e.start)e.leadingComments=this.state.leadingComments,this.state.leadingComments=[];else{for(n=0;n<this.state.leadingComments.length&&!(this.state.leadingComments[n].end>e.start);n++);e.leadingComments=this.state.leadingComments.slice(0,n),0===e.leadingComments.length&&(e.leadingComments=null),r=this.state.leadingComments.slice(n),0===r.length&&(r=null)}r&&(r.length&&r[0].start>=e.start&&i(r).end<=e.end?e.innerComments=r:e.trailingComments=r),a.push(e)}}},{609:609}],608:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(621),a=e(609),s=n(a),o=e(622),u=s["default"].prototype;u.checkPropClash=function(e,t){if(!(e.computed||e.method||e.shorthand)){var r=e.key,n=void 0;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var i=e.kind;"__proto__"===n&&"init"===i&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},u.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,a=this.parseMaybeAssign(e,t);if(this.match(i.types.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[a];this.eat(i.types.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return a},u.parseMaybeAssign=function(e,t,r){if(this.match(i.types._yield)&&this.state.inGenerator)return this.parseYield();var n=void 0;t?n=!1:(t={start:0},n=!0);var a=this.state.start,s=this.state.startLoc;(this.match(i.types.parenL)||this.match(i.types.name))&&(this.state.potentialArrowAt=this.state.start);var o=this.parseMaybeConditional(e,t);if(r&&(o=r.call(this,o,a,s)),this.state.type.isAssign){var u=this.startNodeAt(a,s);if(u.operator=this.state.value,u.left=this.match(i.types.eq)?this.toAssignable(o):o,t.start=0,this.checkLVal(o),o.parenthesizedExpression){var p=void 0;"ObjectPattern"===o.type?p="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===o.type&&(p="`([a]) = 0` use `([a] = 0)`"),p&&this.raise(o.start,"You're trying to assign to a parenthesized expression, eg. instead of "+p)}return this.next(),u.right=this.parseMaybeAssign(e),this.finishNode(u,"AssignmentExpression")}return n&&t.start&&this.unexpected(t.start),o},u.parseMaybeConditional=function(e,t){var r=this.state.start,n=this.state.startLoc,a=this.parseExprOps(e,t);if(t&&t.start)return a;if(this.eat(i.types.question)){var s=this.startNodeAt(r,n);return s.test=a,s.consequent=this.parseMaybeAssign(),this.expect(i.types.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return a},u.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},u.parseExprOp=function(e,t,r,n,a){var s=this.state.type.binop;if(!(null==s||a&&this.match(i.types._in))&&s>n){var o=this.startNodeAt(t,r);o.left=e,o.operator=this.state.value;var u=this.state.type;this.next();var p=this.state.start,l=this.state.startLoc;return o.right=this.parseExprOp(this.parseMaybeUnary(),p,l,u.rightAssociative?s-1:s,a),this.finishNode(o,u===i.types.logicalOR||u===i.types.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(o,t,r,n,a)}return e},u.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(i.types.incDec);return t.operator=this.state.value,t.prefix=!0,this.next(),t.argument=this.parseMaybeUnary(),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument):this.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var n=this.state.start,a=this.state.startLoc,s=this.parseExprSubscripts(e);if(e&&e.start)return s;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var t=this.startNodeAt(n,a);t.operator=this.state.value,t.prefix=!1,t.argument=s,this.checkLVal(s),this.next(),s=this.finishNode(t,"UpdateExpression")}return s},u.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.parseExprAtom(e);return e&&e.start?n:this.parseSubscripts(n,t,r)},u.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(i.types.doubleColon)){var a=this.startNodeAt(t,r);return a.object=e,a.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(a,"BindExpression"),t,r,n)}if(this.eat(i.types.dot)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseIdent(!0),a.computed=!1,e=this.finishNode(a,"MemberExpression")}else if(this.eat(i.types.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(i.types.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(i.types.parenL)){var s="Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var a=this.startNodeAt(t,r);a.callee=e,a.arguments=this.parseExprList(i.types.parenR,this.options.features["es7.trailingFunctionCommas"]),e=this.finishNode(a,"CallExpression"),s&&(this.match(i.types.colon)||this.match(i.types.arrow))?e=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),a):this.toReferencedList(a.arguments)}else{if(!this.match(i.types.backQuote))return e;var a=this.startNodeAt(t,r);a.tag=e,a.quasi=this.parseTemplate(),e=this.finishNode(a,"TaggedTemplateExpression")}}},u.parseAsyncArrowFromCallExpression=function(e,t){return this.options.features["es7.asyncFunctions"]||this.unexpected(),this.expect(i.types.arrow),this.parseArrowExpression(e,t.arguments,!0)},u.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},u.parseExprAtom=function(e){var t=void 0,r=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case i.types._super:this.state.inFunction||this.raise(this.state.start,"'super' outside of function or class");case i.types._this:var n=this.match(i.types._this)?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,n);case i.types._yield:this.state.inGenerator&&this.unexpected();case i.types._do:if(this.options.features["es7.doExpressions"]){var a=this.startNode();this.next();var s=this.state.inFunction,o=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,a.body=this.parseBlock(),this.state.inFunction=s,this.state.labels=o,this.finishNode(a,"DoExpression")}case i.types.name:t=this.startNode();var u=this.parseIdent(!0);if(this.options.features["es7.asyncFunctions"])if("await"===u.name){if(this.inAsync)return this.parseAwait(t)}else{if("async"===u.name&&this.match(i.types._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(t,!1,!1,!0);if(r&&"async"===u.name&&this.match(i.types.name)){var p=[this.parseIdent()];return this.expect(i.types.arrow),this.parseArrowExpression(t,p,!0)}}return r&&!this.canInsertSemicolon()&&this.eat(i.types.arrow)?this.parseArrowExpression(t,[u]):u;case i.types.regexp:var l=this.state.value;return t=this.parseLiteral(l.value),t.regex={pattern:l.pattern,flags:l.flags},t;case i.types.num:case i.types.string:return this.parseLiteral(this.state.value);case i.types._null:case i.types._true:case i.types._false:return t=this.startNode(),t.rawValue=t.value=this.match(i.types._null)?null:this.match(i.types._true),t.raw=this.state.type.keyword,this.next(),this.finishNode(t,"Literal");case i.types.parenL:return this.parseParenAndDistinguishExpression(null,null,r);case i.types.bracketL:return t=this.startNode(),this.next(),this.options.features["es7.comprehensions"]&&this.match(i.types._for)?this.parseComprehension(t,!1):(t.elements=this.parseExprList(i.types.bracketR,!0,!0,e),this.toReferencedList(t.elements),this.finishNode(t,"ArrayExpression"));case i.types.braceL:return this.parseObj(!1,e);case i.types._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case i.types.at:this.parseDecorators();case i.types._class:return t=this.startNode(),this.takeDecorators(t),this.parseClass(t,!1);case i.types._new:return this.parseNew();case i.types.backQuote:return this.parseTemplate();case i.types.doubleColon:t=this.startNode(),this.next(),t.object=null;var c=t.callee=this.parseNoCallExpr();if("MemberExpression"===c.type)return this.finishNode(t,"BindExpression");this.raise(c.start,"Binding should be performed on object property.");default:this.unexpected()}},u.parseLiteral=function(e){var t=this.startNode();return t.rawValue=t.value=e,t.raw=this.input.slice(this.state.start,this.state.end),this.next(),this.finishNode(t,"Literal")},u.parseParenExpression=function(){this.expect(i.types.parenL);var e=this.parseExpression();return this.expect(i.types.parenR),e},u.parseParenAndDistinguishExpression=function(e,t,r,n){e=e||this.state.start,t=t||this.state.startLoc;var a=void 0;if(this.next(),this.options.features["es7.comprehensions"]&&this.match(i.types._for))return this.parseComprehension(this.startNodeAt(e,t),!0);for(var s=this.state.start,o=this.state.startLoc,u=[],p=!0,l={start:0},c=void 0,f=void 0,d=void 0;!this.match(i.types.parenR);){if(p)p=!1;else if(this.expect(i.types.comma),this.match(i.types.parenR)&&this.options.features["es7.trailingFunctionCommas"]){d=this.state.start;break}if(this.match(i.types.ellipsis)){var h=this.state.start,m=this.state.startLoc;c=this.state.start,u.push(this.parseParenItem(this.parseRest(),m,h));break}this.match(i.types.parenL)&&!f&&(f=this.state.start),u.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var y=this.state.start,g=this.state.startLoc;if(this.expect(i.types.parenR),r&&!this.canInsertSemicolon()&&this.eat(i.types.arrow))return f&&this.unexpected(f),this.parseArrowExpression(this.startNodeAt(e,t),u,n);if(!u.length){if(n)return;this.unexpected(this.state.lastTokStart)}return d&&this.unexpected(d),c&&this.unexpected(c),l.start&&this.unexpected(l.start),u.length>1?(a=this.startNodeAt(s,o),a.expressions=u,this.toReferencedList(a.expressions),this.finishNodeAt(a,"SequenceExpression",y,g)):a=u[0],a.parenthesizedExpression=!0,a},u.parseParenItem=function(e){return e},u.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);return this.eat(i.types.dot)?(e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raise(e.property.start,"The only valid meta property for new is new.target"),this.finishNode(e,"MetaProperty")):(e.callee=this.parseNoCallExpr(),this.eat(i.types.parenL)?(e.arguments=this.parseExprList(i.types.parenR,this.options.features["es7.trailingFunctionCommas"]),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression"))},u.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(i.types.backQuote),this.finishNode(e,"TemplateElement")},u.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(i.types.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(i.types.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},u.parseObj=function(e,t){var r=this.startNode(),n=!0,a=Object.create(null);r.properties=[];var s=[];for(this.next();!this.eat(i.types.braceR);){if(n)n=!1;else if(this.expect(i.types.comma),this.eat(i.types.braceR))break;for(;this.match(i.types.at);)s.push(this.parseDecorator());var o=this.startNode(),u=!1,p=!1,l=void 0,c=void 0;if(s.length&&(o.decorators=s,s=[]),this.options.features["es7.objectRestSpread"]&&this.match(i.types.ellipsis))o=this.parseSpread(),o.type="SpreadProperty",r.properties.push(o);else{if(o.method=!1,o.shorthand=!1,(e||t)&&(l=this.state.start,c=this.state.startLoc),e||(u=this.eat(i.types.star)),!e&&this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){u&&this.unexpected(); var f=this.parseIdent();this.match(i.types.colon)||this.match(i.types.parenL)||this.match(i.types.braceR)?o.key=f:(p=!0,this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,l,c,u,p,e,t),this.checkPropClash(o,a),r.properties.push(this.finishNode(o,"Property"))}}return s.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},u.parseObjPropValue=function(e,t,r,n,a,s,u){if(this.eat(i.types.colon))e.value=s?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,u),e.kind="init";else if(this.match(i.types.parenL))s&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,a);else if(e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.match(i.types.comma)||this.match(i.types.braceR))e.computed||"Identifier"!==e.key.type?this.unexpected():(e.kind="init",s?((this.isKeyword(e.key.name)||this.strict&&(o.reservedWords.strictBind(e.key.name)||o.reservedWords.strict(e.key.name))||!this.options.allowReserved&&this.isReservedWord(e.key.name))&&this.raise(e.key.start,"Binding "+e.key.name),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):this.match(i.types.eq)&&u?(u.start||(u.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0);else{(n||a||s)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var p="get"===e.kind?0:1;if(e.value.params.length!==p){var l=e.value.start;"get"===e.kind?this.raise(l,"getter should have no params"):this.raise(l,"setter should have exactly one param")}}},u.parsePropertyName=function(e){return this.eat(i.types.bracketL)?(e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(i.types.bracketR),e.key):(e.computed=!1,e.key=this.match(i.types.num)||this.match(i.types.string)?this.parseExprAtom():this.parseIdent(!0))},u.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,this.options.features["es7.asyncFunctions"]&&(e.async=!!t)},u.parseMethod=function(e,t){var r=this.startNode();return this.initFunction(r,t),this.expect(i.types.parenL),r.params=this.parseBindingList(i.types.parenR,!1,this.options.features["es7.trailingFunctionCommas"]),r.generator=e,this.parseFunctionBody(r),this.finishNode(r,"FunctionExpression")},u.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},u.parseFunctionBody=function(e,t){var r=t&&!this.match(i.types.braceL),n=this.inAsync;if(this.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var a=this.state.inFunction,s=this.state.inGenerator,o=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=a,this.state.inGenerator=s,this.state.labels=o}if(this.inAsync=n,this.strict||!r&&e.body.body.length&&this.isUseStrict(e.body.body[0])){var u=Object.create(null),p=this.strict;this.strict=!0,e.id&&this.checkLVal(e.id,!0);for(var l=e.params,c=0;c<l.length;c++){var f=l[c];this.checkLVal(f,!0,u)}this.strict=p}},u.parseExprList=function(e,t,r,n){for(var a=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(i.types.comma),t&&this.eat(e))break;a.push(this.parseExprListItem(r,n))}return a},u.parseExprListItem=function(e,t){var r=void 0;return r=e&&this.match(i.types.comma)?null:this.match(i.types.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t)},u.parseIdent=function(e){var t=this.startNode();return this.match(i.types.name)?(!e&&(!this.options.allowReserved&&this.isReservedWord(this.state.value)||this.strict&&o.reservedWords.strict(this.state.value))&&this.raise(this.state.start,"The keyword '"+this.state.value+"' is reserved"),t.name=this.state.value):e&&this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},u.parseAwait=function(e){return(this.eat(i.types.semi)||this.canInsertSemicolon())&&this.unexpected(),e.all=this.eat(i.types.star),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},u.parseYield=function(){var e=this.startNode();return this.next(),this.match(i.types.semi)||this.canInsertSemicolon()||!this.match(i.types.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(i.types.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},u.parseComprehension=function(e,t){for(e.blocks=[];this.match(i.types._for);){var r=this.startNode();this.next(),this.expect(i.types.parenL),r.left=this.parseBindingAtom(),this.checkLVal(r.left,!0),this.expectContextual("of"),r.right=this.parseExpression(),this.expect(i.types.parenR),e.blocks.push(this.finishNode(r,"ComprehensionBlock"))}return e.filter=this.eat(i.types._if)?this.parseParenExpression():null,e.body=this.parseExpression(),this.expect(t?i.types.parenR:i.types.bracketR),e.generator=t,this.finishNode(e,"ComprehensionExpression")}},{609:609,621:621,622:622}],609:[function(e,t,r){"use strict";function n(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 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)}r.__esModule=!0;var s=e(622),o=e(606),u=e(619),p=n(u),l={};r.plugins=l;var c=function(e){function t(r,n){i(this,t),e.call(this,n),this.options=o.getOptions(r),this.isKeyword=s.isKeyword,this.isReservedWord=s.reservedWords[6],this.input=n,this.loadPlugins(this.options.plugins),this.inModule="module"===this.options.sourceType,this.strict=this.options.strictMode===!1?!1:this.inModule,0===this.state.pos&&"#"===this.input[0]&&"!"===this.input[1]&&this.skipLineComment(2)}return a(t,e),t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadPlugins=function(e){for(var t in e){var n=r.plugins[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(p["default"]);r["default"]=c},{606:606,619:619,622:622}],610:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(623),a=e(609),s=n(a),o=s["default"].prototype;o.raise=function(e,t){var r=i.getLineInfo(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n}},{609:609,623:623}],611:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(621),a=e(609),s=n(a),o=e(622),u=s["default"].prototype;u.toAssignable=function(e,t){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var r=e.properties,n=0;n<r.length;n++){var i=r[n];"SpreadProperty"!==i.type&&("init"!==i.kind&&this.raise(i.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(i.value,t))}break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}return e},u.toAssignableList=function(e,t){var r=e.length;if(r){var n=e[r-1];if(n&&"RestElement"===n.type)--r;else if(n&&"SpreadElement"===n.type){n.type="RestElement";var i=n.argument;this.toAssignable(i,t),"Identifier"!==i.type&&"MemberExpression"!==i.type&&"ArrayPattern"!==i.type&&this.unexpected(i.start),--r}}for(var a=0;r>a;a++){var s=e[a];s&&this.toAssignable(s,t)}return e},u.toReferencedList=function(e){return e},u.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(e),this.finishNode(t,"SpreadElement")},u.parseRest=function(){var e=this.startNode();return this.next(),e.argument=this.match(i.types.name)||this.match(i.types.bracketL)?this.parseBindingAtom():this.unexpected(),this.finishNode(e,"RestElement")},u.parseBindingAtom=function(){switch(this.state.type){case i.types.name:return this.parseIdent();case i.types.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(i.types.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case i.types.braceL:return this.parseObj(!0);default:this.unexpected()}},u.parseBindingList=function(e,t,r){for(var n=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(i.types.comma),t&&this.match(i.types.comma))n.push(null);else{if(r&&this.eat(e))break;if(this.match(i.types.ellipsis)){n.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}var s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s),n.push(this.parseMaybeDefault(null,null,s))}return n},u.parseAssignableListItemTypes=function(e){return e},u.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(i.types.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},u.checkLVal=function(e,t,r){switch(e.type){case"Identifier":this.strict&&(o.reservedWords.strictBind(e.name)||o.reservedWords.strict(e.name))&&this.raise(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(r[e.name]?this.raise(e.start,"Argument name clash in strict mode"):r[e.name]=!0);break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var n=e.properties,i=0;i<n.length;i++){var a=n[i];"Property"===a.type&&(a=a.value),this.checkLVal(a,t,r)}break;case"ArrayPattern":for(var s=e.elements,u=0;u<s.length;u++){var p=s[u];p&&this.checkLVal(p,t,r)}break;case"AssignmentPattern":this.checkLVal(e.left,t,r);break;case"SpreadProperty":case"RestElement":this.checkLVal(e.argument,t,r);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}}},{609:609,621:621,622:622}],612:[function(e,t,r){"use strict";function n(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 a(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}r.__esModule=!0;var s=e(609),o=n(s),u=e(623),p=o["default"].prototype,l=function(){function e(t,r,n){i(this,e),this.type="",this.start=r,this.end=0,this.loc=new u.SourceLocation(n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)t[r]=this[r];return t},e}();r.Node=l,p.startNode=function(){return new l(this,this.state.start,this.state.startLoc)},p.startNodeAt=function(e,t){return new l(this,e,t)},p.finishNode=function(e,t){return a.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},p.finishNodeAt=function(e,t,r,n){return a.call(this,e,t,r,n)}},{609:609,623:623}],613:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(621),a=e(609),s=n(a),o=e(624),u=s["default"].prototype;u.parseTopLevel=function(e,t){t.sourceType=this.options.sourceType,t.body=[];for(var r=!0;!this.match(i.types.eof);){var n=this.parseStatement(!0,!0);t.body.push(n),r&&(this.isUseStrict(n)&&this.setStrict(!0),r=!1)}return this.next(),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var p={kind:"loop"},l={kind:"switch"};u.parseStatement=function(e,t){this.match(i.types.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case i.types._break:case i.types._continue:return this.parseBreakContinueStatement(n,r.keyword);case i.types._debugger:return this.parseDebuggerStatement(n);case i.types._do:return this.parseDoStatement(n);case i.types._for:return this.parseForStatement(n);case i.types._function:return e||this.unexpected(),this.parseFunctionStatement(n);case i.types._class:return e||this.unexpected(),this.takeDecorators(n),this.parseClass(n,!0);case i.types._if:return this.parseIfStatement(n);case i.types._return:return this.parseReturnStatement(n);case i.types._switch:return this.parseSwitchStatement(n);case i.types._throw:return this.parseThrowStatement(n);case i.types._try:return this.parseTryStatement(n);case i.types._let:case i.types._const:e||this.unexpected();case i.types._var:return this.parseVarStatement(n,r);case i.types._while:return this.parseWhileStatement(n);case i.types._with:return this.parseWithStatement(n);case i.types.braceL:return this.parseBlock();case i.types.semi:return this.parseEmptyStatement(n);case i.types._export:case i.types._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===i.types._import?this.parseImport(n):this.parseExport(n);case i.types.name:if(this.options.features["es7.asyncFunctions"]&&"async"===this.state.value){var a=this.state.clone();if(this.next(),this.match(i.types._function)&&!this.canInsertSemicolon())return this.expect(i.types._function),this.parseFunction(n,!0,!1,!0);this.state=a}default:var s=this.state.value,o=this.parseExpression();return r===i.types.name&&"Identifier"===o.type&&this.eat(i.types.colon)?this.parseLabeledStatement(n,s,o):this.parseExpressionStatement(n,o)}},u.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},u.parseDecorators=function(e){for(;this.match(i.types.at);)this.state.decorators.push(this.parseDecorator());e&&this.match(i.types._export)||this.match(i.types._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},u.parseDecorator=function(){this.options.features["es7.decorators"]||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},u.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.eat(i.types.semi)||this.canInsertSemicolon()?e.label=null:this.match(i.types.name)?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var n=0;n<this.state.labels.length;++n){var a=this.state.labels[n];if(null==e.label||a.name===e.label.name){if(null!=a.kind&&(r||"loop"===a.kind))break;if(e.label&&r)break}}return n===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},u.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},u.parseDoStatement=function(e){return this.next(),this.state.labels.push(p),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(i.types._while),e.test=this.parseParenExpression(),this.eat(i.types.semi),this.finishNode(e,"DoWhileStatement")},u.parseForStatement=function(e){if(this.next(),this.state.labels.push(p),this.expect(i.types.parenL),this.match(i.types.semi))return this.parseFor(e,null);if(this.match(i.types._var)||this.match(i.types._let)||this.match(i.types._const)){var t=this.startNode(),r=this.state.type;return this.next(),this.parseVar(t,!0,r),this.finishNode(t,"VariableDeclaration"),!this.match(i.types._in)&&!this.isContextual("of")||1!==t.declarations.length||r!==i.types._var&&t.declarations[0].init?this.parseFor(e,t):this.parseForIn(e,t)}var n={start:0},a=this.parseExpression(!0,n);return this.match(i.types._in)||this.isContextual("of")?(this.toAssignable(a),this.checkLVal(a),this.parseForIn(e,a)):(n.start&&this.unexpected(n.start),this.parseFor(e,a))},u.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},u.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(i.types._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},u.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.eat(i.types.semi)||this.canInsertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},u.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(i.types.braceL),this.state.labels.push(l);for(var t,r;!this.match(i.types.braceR);)if(this.match(i.types._case)||this.match(i.types._default)){var n=this.match(i.types._case);t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raise(this.state.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(i.types.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")},u.parseThrowStatement=function(e){return this.next(),o.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var c=[];u.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(i.types._catch)){var t=this.startNode();this.next(),this.expect(i.types.parenL),t.param=this.parseBindingAtom(),this.checkLVal(t.param,!0),this.expect(i.types.parenR),t.body=this.parseBlock(),e.handler=this.finishNode(t,"CatchClause")}return e.guardedHandlers=c,e.finalizer=this.eat(i.types._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},u.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},u.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.state.labels.push(p),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"WhileStatement")},u.parseWithStatement=function(e){return this.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},u.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},u.parseLabeledStatement=function(e,t,r){for(var n=this.state.labels,a=0;a<n.length;a++){var s=n[a];s.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(i.types._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var s=this.state.labels[u];if(s.statementStart!==e.start)break;s.statementStart=this.state.start,s.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},u.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},u.parseBlock=function(e){var t=this.startNode(),r=!0,n=void 0;for(t.body=[],this.expect(i.types.braceL);!this.eat(i.types.braceR);){var a=this.parseStatement(!0);t.body.push(a),r&&e&&this.isUseStrict(a)&&(n=this.strict,this.setStrict(this.strict=!0)),r=!1}return n===!1&&this.setStrict(!1),this.finishNode(t,"BlockStatement")},u.parseFor=function(e,t){return e.init=t,this.expect(i.types.semi),e.test=this.match(i.types.semi)?null:this.parseExpression(),this.expect(i.types.semi),e.update=this.match(i.types.parenR)?null:this.parseExpression(),this.expect(i.types.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},u.parseForIn=function(e,t){var r=this.match(i.types._in)?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(i.types.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,r)},u.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(i.types.eq)?n.init=this.parseMaybeAssign(t):r!==i.types._const||this.match(i.types._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(i.types._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(i.types.comma))break}return e},u.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0)},u.parseFunction=function(e,t,r,n){return this.initFunction(e,n),e.generator=this.eat(i.types.star),(t||this.match(i.types.name))&&(e.id=this.parseIdent()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},u.parseFunctionParams=function(e){this.expect(i.types.parenL),e.params=this.parseBindingList(i.types.parenR,!1,this.options.features["es7.trailingFunctionCommas"])},u.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),n=!1;r.body=[],this.expect(i.types.braceL);for(var a=[];!this.eat(i.types.braceR);)if(!this.eat(i.types.semi))if(this.match(i.types.at))a.push(this.parseDecorator());else{var s=this.startNode();a.length&&(s.decorators=a,a=[]);var o=this.match(i.types.name)&&"static"===this.state.value,u=this.eat(i.types.star),p=!1;if(this.parsePropertyName(s),s["static"]=o&&!this.match(i.types.parenL),s["static"]&&(u&&this.unexpected(),u=this.eat(i.types.star),this.parsePropertyName(s)),u||"Identifier"!==s.key.type||s.computed||!this.isClassProperty()){!this.options.features["es7.asyncFunctions"]||this.match(i.types.parenL)||s.computed||"Identifier"!==s.key.type||"async"!==s.key.name||(p=!0,this.parsePropertyName(s));var l=!1;if(s.kind="method",!s.computed){var c=s.key;p||u||"Identifier"!==c.type||this.match(i.types.parenL)||"get"!==c.name&&"set"!==c.name||(l=!0,s.kind=c.name,c=this.parsePropertyName(s)),!s["static"]&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(n&&this.raise(c.start,"Duplicate constructor in the same class"),l&&this.raise(c.start,"Constructor can't have get/set modifier"),u&&this.raise(c.start,"Constructor can't be a generator"),p&&this.raise(c.start,"Constructor can't be an async function"),s.kind="constructor",n=!0)}if("constructor"===s.kind&&s.decorators&&this.raise(s.start,"You can't attach decorators to a class constructor"),this.parseClassMethod(r,s,u,p),l){var f="get"===s.kind?0:1;if(s.value.params.length!==f){var d=s.value.start;"get"===s.kind?this.raise(d,"getter should have no params"):this.raise(d,"setter should have exactly one param")}}}else r.body.push(this.parseClassProperty(s))}return a.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(r,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},u.isClassProperty=function(){return this.match(i.types.eq)||this.match(i.types.semi)||this.canInsertSemicolon()},u.parseClassProperty=function(e){return this.match(i.types.eq)?(this.options.features["es7.classProperties"]||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.finishNode(e,"ClassProperty")},u.parseClassMethod=function(e,t,r,n){t.value=this.parseMethod(r,n),e.body.push(this.finishNode(t,"MethodDefinition"))},u.parseClassId=function(e,t){e.id=this.match(i.types.name)?this.parseIdent():t?this.unexpected():null},u.parseClassSuper=function(e){e.superClass=this.eat(i.types._extends)?this.parseExprSubscripts():null},u.parseExport=function(e){if(this.next(),this.match(i.types.star)){var t=this.startNode();if(this.next(),!this.options.features["es7.exportExtensions"]||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdent(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.options.features["es7.exportExtensions"]&&this.isExportDefaultSpecifier()){var t=this.startNode();if(t.exported=this.parseIdent(!0),e.specifiers=[this.finishNode(t,"ExportDefaultSpecifier")],this.match(i.types.comma)&&this.lookahead().type===i.types.star){this.expect(i.types.comma);var r=this.startNode();this.expect(i.types.star),this.expectContextual("as"),r.exported=this.parseIdent(),e.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(i.types._default)){var n=this.match(i.types._function)||this.match(i.types._class),a=this.parseMaybeAssign(),s=!0;return n&&(s=!1,a.id&&(a.type="FunctionExpression"===a.type?"FunctionDeclaration":"ClassDeclaration")),e.declaration=a,s&&this.semicolon(),this.checkExport(e),this.finishNode(e,"ExportDefaultDeclaration")}this.state.type.keyword||this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e),this.finishNode(e,"ExportNamedDeclaration")},u.parseExportDeclaration=function(){return this.parseStatement(!0)},u.isExportDefaultSpecifier=function(){if(this.match(i.types.name))return"type"!==this.state.value&&"async"!==this.state.value;if(!this.match(i.types._default))return!1;var e=this.lookahead();return e.type===i.types.comma||e.type===i.types.name&&"from"===e.value},u.parseExportSpecifiersMaybe=function(e){this.eat(i.types.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},u.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(i.types.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},u.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")},u.checkExport=function(e){if(this.state.decorators.length){var t=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&t||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},u.parseExportSpecifiers=function(){var e=[],t=!0;for(this.expect(i.types.braceL);!this.eat(i.types.braceR);){if(t)t=!1;else if(this.expect(i.types.comma),this.eat(i.types.braceR))break;var r=this.startNode();r.local=this.parseIdent(this.match(i.types._default)),r.exported=this.eatContextual("as")?this.parseIdent(!0):r.local.__clone(),e.push(this.finishNode(r,"ExportSpecifier"))}return e},u.parseImport=function(e){return this.next(),this.match(i.types.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(i.types.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},u.parseImportSpecifiers=function(e){var t=!0;if(this.match(i.types.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),r,n)),!this.eat(i.types.comma))return}if(this.match(i.types.star)){var a=this.startNode();return this.next(),this.expectContextual("as"),a.local=this.parseIdent(),this.checkLVal(a.local,!0),void e.specifiers.push(this.finishNode(a,"ImportNamespaceSpecifier"))}for(this.expect(i.types.braceL);!this.eat(i.types.braceR);){if(t)t=!1;else if(this.expect(i.types.comma),this.eat(i.types.braceR))break;var a=this.startNode();a.imported=this.parseIdent(!0),a.local=this.eatContextual("as")?this.parseIdent():a.imported.__clone(),this.checkLVal(a.local,!0),e.specifiers.push(this.finishNode(a,"ImportSpecifier"))}},u.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0),this.finishNode(n,"ImportDefaultSpecifier")}},{609:609,621:621,624:624}],614:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var i=e(621),a=e(609),s=n(a),o=e(624),u=s["default"].prototype;u.isUseStrict=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"use strict"===e.expression.raw.slice(1,-1)},u.isRelational=function(e){return this.match(i.types.relational)&&this.state.value===e},u.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected()},u.isContextual=function(e){return this.match(i.types.name)&&this.state.value===e},u.eatContextual=function(e){return this.state.value===e&&this.eat(i.types.name)},u.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},u.canInsertSemicolon=function(){return this.match(i.types.eof)||this.match(i.types.braceR)||o.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start))},u.semicolon=function(){this.eat(i.types.semi)||this.canInsertSemicolon()||this.unexpected()},u.expect=function(e){return this.eat(e)||this.unexpected()},u.unexpected=function(e){this.raise(null!=e?e:this.state.start,"Unexpected token")}},{609:609,621:621,624:624}],615:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var i=e(621),a=e(609),s=n(a),o=s["default"].prototype;o.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||i.types.colon);var r=this.flowParseType();return this.state.inType=t,r},o.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},o.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdent(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(i.types.parenL);var a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,this.expect(i.types.parenR),r.returnType=this.flowParseTypeInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},o.flowParseDeclare=function(e){return this.match(i.types._class)?this.flowParseDeclareClass(e):this.match(i.types._function)?this.flowParseDeclareFunction(e):this.match(i.types._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.flowParseDeclareModule(e):void this.unexpected()},o.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},o.flowParseDeclareModule=function(e){this.next(),this.match(i.types.string)?e.id=this.parseExprAtom():e.id=this.parseIdent();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(i.types.braceL);!this.match(i.types.braceR);){var n=this.startNode();this.next(),r.push(this.flowParseDeclare(n))}return this.expect(i.types.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},o.flowParseInterfaceish=function(e,t){if(e.id=this.parseIdent(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e["extends"]=[],this.eat(i.types._extends))do e["extends"].push(this.flowParseInterfaceExtends());while(this.eat(i.types.comma));e.body=this.flowParseObjectType(t)},o.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.parseIdent(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null, this.finishNode(e,"InterfaceExtends")},o.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},o.flowParseTypeAlias=function(e){return e.id=this.parseIdent(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(i.types.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},o.flowParseTypeParameterDeclaration=function(){var e=this.startNode();for(e.params=[],this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseTypeAnnotatableIdentifier()),this.isRelational(">")||this.expect(i.types.comma);return this.expectRelational(">"),this.finishNode(e,"TypeParameterDeclaration")},o.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(i.types.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},o.flowParseObjectPropertyKey=function(){return this.match(i.types.num)||this.match(i.types.string)?this.parseExprAtom():this.parseIdent(!0)},o.flowParseObjectTypeIndexer=function(e,t){return e["static"]=t,this.expect(i.types.bracketL),e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser(),this.expect(i.types.bracketR),e.value=this.flowParseTypeInitialiser(),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},o.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(i.types.parenL);this.match(i.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(i.types.parenR)||this.expect(i.types.comma);return this.eat(i.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(i.types.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},o.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i["static"]=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},o.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e["static"]=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},o.flowParseObjectType=function(e){var t,r,n,a=this.startNode();for(a.callProperties=[],a.properties=[],a.indexers=[],this.expect(i.types.braceL);!this.match(i.types.braceR);){var s=!1,o=this.state.start,u=this.state.startLoc;t=this.startNode(),e&&this.isContextual("static")&&(this.next(),n=!0),this.match(i.types.bracketL)?a.indexers.push(this.flowParseObjectTypeIndexer(t,n)):this.match(i.types.parenL)||this.isRelational("<")?a.callProperties.push(this.flowParseObjectTypeCallProperty(t,e)):(r=n&&this.match(i.types.colon)?this.parseIdent():this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(i.types.parenL)?a.properties.push(this.flowParseObjectTypeMethod(o,u,n,r)):(this.eat(i.types.question)&&(s=!0),t.key=r,t.value=this.flowParseTypeInitialiser(),t.optional=s,t["static"]=n,this.flowObjectTypeSemicolon(),a.properties.push(this.finishNode(t,"ObjectTypeProperty"))))}return this.expect(i.types.braceR),this.finishNode(a,"ObjectTypeAnnotation")},o.flowObjectTypeSemicolon=function(){this.eat(i.types.semi)||this.eat(i.types.comma)||this.match(i.types.braceR)||this.unexpected()},o.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);for(n.typeParameters=null,n.id=r;this.eat(i.types.dot);){var a=this.startNodeAt(e,t);a.qualification=n.id,a.id=this.parseIdent(),n.id=this.finishNode(a,"QualifiedTypeIdentifier")}return this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},o.flowParseTypeofType=function(){var e=this.startNode();return this.expect(i.types._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},o.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(i.types.bracketL);this.state.pos<this.input.length&&!this.match(i.types.bracketR)&&(e.types.push(this.flowParseType()),!this.match(i.types.bracketR));)this.expect(i.types.comma);return this.expect(i.types.bracketR),this.finishNode(e,"TupleTypeAnnotation")},o.flowParseFunctionTypeParam=function(){var e=!1,t=this.startNode();return t.name=this.parseIdent(),this.eat(i.types.question)&&(e=!0),t.optional=e,t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeParam")},o.flowParseFunctionTypeParams=function(){for(var e={params:[],rest:null};this.match(i.types.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(i.types.parenR)||this.expect(i.types.comma);return this.eat(i.types.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},o.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},o.flowParsePrimaryType=function(){var e,t,r=this.state.start,n=this.state.startLoc,a=this.startNode(),s=!1;switch(this.state.type){case i.types.name:return this.flowIdentToTypeAnnotation(r,n,a,this.parseIdent());case i.types.braceL:return this.flowParseObjectType();case i.types.bracketL:return this.flowParseTupleType();case i.types.relational:if("<"===this.state.value)return a.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(i.types.parenL),e=this.flowParseFunctionTypeParams(),a.params=e.params,a.rest=e.rest,this.expect(i.types.parenR),this.expect(i.types.arrow),a.returnType=this.flowParseType(),this.finishNode(a,"FunctionTypeAnnotation");case i.types.parenL:if(this.next(),!this.match(i.types.parenR)&&!this.match(i.types.ellipsis))if(this.match(i.types.name)){var o=this.lookahead().type;s=o!==i.types.question&&o!==i.types.colon}else s=!0;return s?(t=this.flowParseType(),this.expect(i.types.parenR),this.eat(i.types.arrow)&&this.raise(a,"Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType"),t):(e=this.flowParseFunctionTypeParams(),a.params=e.params,a.rest=e.rest,this.expect(i.types.parenR),this.expect(i.types.arrow),a.returnType=this.flowParseType(),a.typeParameters=null,this.finishNode(a,"FunctionTypeAnnotation"));case i.types.string:return a.rawValue=a.value=this.state.value,a.raw=this.input.slice(this.state.start,this.state.end),this.next(),this.finishNode(a,"StringLiteralTypeAnnotation");case i.types._true:case i.types._false:return a.value=this.match(i.types._true),this.next(),this.finishNode(a,"BooleanLiteralTypeAnnotation");case i.types.num:return a.rawValue=a.value=this.state.value,a.raw=this.input.slice(this.state.start,this.state.end),this.next(),this.finishNode(a,"NumberLiteralTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},o.flowParsePostfixType=function(){var e=this.startNode(),t=e.elementType=this.flowParsePrimaryType();return this.match(i.types.bracketL)?(this.expect(i.types.bracketL),this.expect(i.types.bracketR),this.finishNode(e,"ArrayTypeAnnotation")):t},o.flowParsePrefixType=function(){var e=this.startNode();return this.eat(i.types.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},o.flowParseIntersectionType=function(){var e=this.startNode(),t=this.flowParsePrefixType();for(e.types=[t];this.eat(i.types.bitwiseAND);)e.types.push(this.flowParsePrefixType());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},o.flowParseUnionType=function(){var e=this.startNode(),t=this.flowParseIntersectionType();for(e.types=[t];this.eat(i.types.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},o.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},o.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},o.flowParseTypeAnnotatableIdentifier=function(e,t){var r=this.parseIdent(),n=!1;return t&&this.eat(i.types.question)&&(this.expect(i.types.question),n=!0),(e||this.match(i.types.colon))&&(r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,r.type)),n&&(r.optional=!0,this.finishNode(r,r.type)),r},r["default"]=function(e){function t(e){return e.expression.typeAnnotation=e.typeAnnotation,e.expression}e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(i.types.colon)&&!r&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.strict&&this.match(i.types.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(i.types._class)||this.match(i.types.name)||this.match(i.types._function)||this.match(i.types._var))return this.flowParseDeclare(t)}else if(this.match(i.types.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||e.call(this)}}),e.extend("parseParenItem",function(){return function(e,t,r,n){if(this.match(i.types.colon)){var a=this.startNodeAt(t,r);if(a.expression=e,a.typeAnnotation=this.flowParseTypeAnnotation(),n&&!this.match(i.types.arrow)&&this.unexpected(),this.eat(i.types.arrow)){var s=this.parseArrowExpression(this.startNodeAt(t,r),[e]);return s.returnType=a.typeAnnotation,s}return this.finishNode(a,"TypeCastExpression")}return e}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(i.types.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t,r){e.call(this,t,r),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return this.state.inType&&"void"===t?!1:e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(i.types.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){return this.state.inType?void 0:e.call(this)}}),e.extend("toAssignableList",function(e){return function(r,n){for(var i=0;i<r.length;i++){var a=r[i];a&&"TypeCastExpression"===a.type&&(r[i]=t(a))}return e.call(this,r,n)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(t,r){var n=this.startNode(),a=e.call(this,t,r);return this.match(i.types.colon)?(n._exprListItem=!0,n.expression=a,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")):a}}),e.extend("parseClassProperty",function(e){return function(t){return this.match(i.types.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassProperty",function(e){return function(){return this.match(i.types.colon)||e.call(this)}}),e.extend("parseClassMethod",function(){return function(e,t,r,n){var i;this.isRelational("<")&&(i=this.flowParseTypeParameterDeclaration()),t.value=this.parseMethod(r,n),t.value.typeParameters=i,e.body.push(this.finishNode(t,"MethodDefinition"))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var n=t["implements"]=[];do{var a=this.startNode();a.id=this.parseIdent(),this.isRelational("<")?a.typeParameters=this.flowParseTypeParameterInstantiation():a.typeParameters=null,n.push(this.finishNode(a,"ClassImplements"))}while(this.eat(i.types.comma))}}}),e.extend("parseObjPropValue",function(e){return function(t){var r;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(i.types.parenL)||this.unexpected()),e.apply(this,arguments),r&&(t.value.typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(i.types.question)&&(e.optional=!0),this.match(i.types.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=this.match(i.types._typeof)?"typeof":this.isContextual("type")?"type":null;if(r){var n=this.lookahead();(n.type===i.types.name&&"from"!==n.value||n.type===i.types.braceL||n.type===i.types.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(i.types.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){return this.match(i.types.colon)&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("parseParenAndDistinguishExpression",function(e){return function(t,r,n,a){if(t=t||this.state.start,r=r||this.state.startLoc,this.lookahead().type===i.types.parenR){this.expect(i.types.parenL),this.expect(i.types.parenR);var s=this.startNodeAt(t,r);return this.match(i.types.colon)&&(s.returnType=this.flowParseTypeAnnotation()),this.expect(i.types.arrow),this.parseArrowExpression(s,[],a)}var s=e.call(this,t,r,n,a);if(!this.match(i.types.colon))return s;var o=this.state.clone();try{return this.parseParenItem(s,t,r,!0)}catch(u){if(u instanceof SyntaxError)return this.state=o,s;throw u}}})},t.exports=r["default"]},{609:609,621:621}],616:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?i(e.object)+"."+i(e.property):void 0}r.__esModule=!0;var a=e(617),s=n(a),o=e(621),u=e(618),p=e(609),l=n(p),c=e(622),f=e(624),d=/^[\da-fA-F]+$/,h=/^\d+$/;u.types.j_oTag=new u.TokContext("<tag",!1),u.types.j_cTag=new u.TokContext("</tag",!1),u.types.j_expr=new u.TokContext("<tag>...</tag>",!0,!0),o.types.jsxName=new o.TokenType("jsxName"),o.types.jsxText=new o.TokenType("jsxText",{beforeExpr:!0}),o.types.jsxTagStart=new o.TokenType("jsxTagStart"),o.types.jsxTagEnd=new o.TokenType("jsxTagEnd"),o.types.jsxTagStart.updateContext=function(){this.state.context.push(u.types.j_expr),this.state.context.push(u.types.j_oTag),this.state.exprAllowed=!1},o.types.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===u.types.j_oTag&&e===o.types.slash||t===u.types.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===u.types.j_expr):this.state.exprAllowed=!0};var m=l["default"].prototype;m.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(o.types.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(o.types.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:f.isNewLine(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},m.jsxReadNewLine=function(e){var t,r=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===r&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(r),++this.state.curLine,this.state.lineStart=this.state.pos,t},m.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):f.isNewLine(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(o.types.string,t)},m.jsxReadEntity=function(){for(var e,t="",r=0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos<this.input.length&&r++<10;){if(n=this.input[this.state.pos++],";"===n){"#"===t[0]?"x"===t[1]?(t=t.substr(2),d.test(t)&&(e=String.fromCharCode(parseInt(t,16)))):(t=t.substr(1),h.test(t)&&(e=String.fromCharCode(parseInt(t,10)))):e=s["default"][t];break}t+=n}return e?e:(this.state.pos=i,"&")},m.jsxReadWord=function(){var e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(c.isIdentifierChar(e)||45===e);return this.finishToken(o.types.jsxName,this.input.slice(t,this.state.pos))},m.jsxParseIdentifier=function(){var e=this.startNode();return this.match(o.types.jsxName)?e.name=this.state.value:this.state.type.keyword?e.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")},m.jsxParseNamespacedName=function(){var e=this.state.start,t=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(o.types.colon))return r;var n=this.startNodeAt(e,t);return n.namespace=r,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")},m.jsxParseElementName=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.jsxParseNamespacedName();this.eat(o.types.dot);){var n=this.startNodeAt(e,t);n.object=r,n.property=this.jsxParseIdentifier(),r=this.finishNode(n,"JSXMemberExpression")}return r},m.jsxParseAttributeValue=function(){var e;switch(this.state.type){case o.types.braceL:if(e=this.jsxParseExpressionContainer(),"JSXEmptyExpression"!==e.expression.type)return e;this.raise(e.start,"JSX attributes must only be assigned a non-empty expression");case o.types.jsxTagStart:case o.types.string:return e=this.parseExprAtom(),e.rawValue=null,e;default:this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},m.jsxParseEmptyExpression=function(){var e=this.state.start;return this.state.start=this.state.lastTokEnd,this.state.lastTokEnd=e,e=this.state.startLoc,this.state.startLoc=this.state.lastTokEndLoc,this.state.lastTokEndLoc=e,this.finishNode(this.startNode(),"JSXEmptyExpression")},m.jsxParseExpressionContainer=function(){var e=this.startNode();return this.next(),this.match(o.types.braceR)?e.expression=this.jsxParseEmptyExpression():e.expression=this.parseExpression(),this.expect(o.types.braceR),this.finishNode(e,"JSXExpressionContainer")},m.jsxParseAttribute=function(){var e=this.startNode();return this.eat(o.types.braceL)?(this.expect(o.types.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(o.types.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(o.types.eq)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))},m.jsxParseOpeningElementAt=function(e,t){var r=this.startNodeAt(e,t);for(r.attributes=[],r.name=this.jsxParseElementName();!this.match(o.types.slash)&&!this.match(o.types.jsxTagEnd);)r.attributes.push(this.jsxParseAttribute());return r.selfClosing=this.eat(o.types.slash),this.expect(o.types.jsxTagEnd),this.finishNode(r,"JSXOpeningElement")},m.jsxParseClosingElementAt=function(e,t){var r=this.startNodeAt(e,t);return r.name=this.jsxParseElementName(),this.expect(o.types.jsxTagEnd),this.finishNode(r,"JSXClosingElement")},m.jsxParseElementAt=function(e,t){var r=this.startNodeAt(e,t),n=[],a=this.jsxParseOpeningElementAt(e,t),s=null;if(!a.selfClosing){e:for(;;)switch(this.state.type){case o.types.jsxTagStart:if(e=this.state.start,t=this.state.startLoc,this.next(),this.eat(o.types.slash)){s=this.jsxParseClosingElementAt(e,t);break e}n.push(this.jsxParseElementAt(e,t));break;case o.types.jsxText:n.push(this.parseExprAtom());break;case o.types.braceL:n.push(this.jsxParseExpressionContainer());break;default:this.unexpected()}i(s.name)!==i(a.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+i(a.name)+">")}return r.openingElement=a,r.closingElement=s,r.children=n,this.match(o.types.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},m.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)},r["default"]=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(o.types.jsxText)){var r=this.parseLiteral(this.state.value);return r.rawValue=null,r}return this.match(o.types.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){var r=this.curContext();if(r===u.types.j_expr)return this.jsxReadToken();if(r===u.types.j_oTag||r===u.types.j_cTag){if(c.isIdentifierStart(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(o.types.jsxTagEnd);if((34===t||39===t)&&r===u.types.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(o.types.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(o.types.braceL)){var r=this.curContext();r===u.types.j_oTag?this.state.context.push(u.types.b_expr):r===u.types.j_expr?this.state.context.push(u.types.b_tmpl):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(o.types.slash)||t!==o.types.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(u.types.j_cTag),this.state.exprAllowed=!1}}})},t.exports=r["default"]},{609:609,617:617,618:618,621:621,622:622,624:624}],617:[function(e,t,r){"use strict";r.__esModule=!0,r["default"]={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},t.exports=r["default"]},{}],618:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var i=e(621),a=function o(e,t,r,i){n(this,o),this.token=e,this.isExpr=!!t,this.preserveSpace=!!r,this.override=i};r.TokContext=a;var s={b_stat:new a("{",!1),b_expr:new a("{",!0),b_tmpl:new a("${",!0),p_stat:new a("(",!1),p_expr:new a("(",!0),q_tmpl:new a("`",!0,!0,function(e){return e.readTmplToken()}),f_expr:new a("function",!0)};r.types=s,i.types.parenR.updateContext=i.types.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);var e=this.state.context.pop();e===s.b_stat&&this.curContext()===s.f_expr?(this.state.context.pop(),this.state.exprAllowed=!1):e===s.b_tmpl?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr},i.types.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?s.b_stat:s.b_expr),this.state.exprAllowed=!0},i.types.dollarBraceL.updateContext=function(){this.state.context.push(s.b_tmpl),this.state.exprAllowed=!0},i.types.parenL.updateContext=function(e){var t=e===i.types._if||e===i.types._for||e===i.types._with||e===i.types._while;this.state.context.push(t?s.p_stat:s.p_expr),this.state.exprAllowed=!0},i.types.incDec.updateContext=function(){},i.types._function.updateContext=function(){this.curContext()!==s.b_stat&&this.state.context.push(s.f_expr),this.state.exprAllowed=!1},i.types.backQuote.updateContext=function(){this.curContext()===s.q_tmpl?this.state.context.pop():this.state.context.push(s.q_tmpl),this.state.exprAllowed=!1}},{621:621}],619:[function(e,t,r){"use strict";function n(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 a(e,t,r){try{return new RegExp(e,t)}catch(n){void 0!==r&&(n instanceof SyntaxError&&this.raise(r,"Error parsing regular expression: "+n.message),this.raise(n))}}function s(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}r.__esModule=!0;var o=e(622),u=e(621),p=e(618),l=e(623),c=e(624),f=e(620),d=n(f),h=function v(e){i(this,v),this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new l.SourceLocation(e.startLoc,e.endLoc)};r.Token=h;var m="object"==typeof Packages&&"[object JavaPackage]"===Object.prototype.toString.call(Packages),y=!!a("￿","u"),g=function(){function e(t){i(this,e),this.state=new d["default"],this.state.init(t)}return e.prototype.next=function(){this.state.tokens.push(new h(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return this.match(e)?(this.next(),!0):!1},e.prototype.match=function(e){return this.state.type===e},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(),this.next();var t=this.state.clone();return this.state=e,t},e.prototype.setStrict=function(e){if(this.strict=e,this.match(u.types.num)||this.match(u.types.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},e.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},e.prototype.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(u.types.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return o.isIdentifierStart(e,!0)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);if(55295>=e||e>=57344)return e;var t=this.input.charCodeAt(this.state.pos+1);return(e<<10)+t-56613888},e.prototype.pushComment=function(e,t,r,n,i,a){var s={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new l.SourceLocation(i,a),range:[r,n]};this.state.tokens.push(s),this.state.comments.push(s),this.addComment(s)},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,c.lineBreakG.lastIndex=t;for(var n=void 0;(n=c.lineBreakG.exec(this.input))&&n.index<this.state.pos;)++this.state.curLine,this.state.lineStart=n.index+n[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())},e.prototype.skipLineComment=function(e){for(var t=this.state.pos,r=this.state.curPosition(),n=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==n&&13!==n&&8232!==n&&8233!==n;)++this.state.pos,n=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())},e.prototype.skipSpace=function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&14>e||e>=5760&&c.nonASCIIwhitespace.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&57>=e)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3, this.finishToken(u.types.ellipsis)):(++this.state.pos,this.finishToken(u.types.dot))},e.prototype.readToken_slash=function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(u.types.assign,2):this.finishOp(u.types.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?u.types.star:u.types.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&this.options.features["es7.exponentiationOperator"]&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=u.types.exponent),61===n&&(r++,t=u.types.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?u.types.logicalOR:u.types.logicalAND,2):61===t?this.finishOp(u.types.assign,2):this.finishOp(124===e?u.types.bitwiseOR:u.types.bitwiseAND,1)},e.prototype.readToken_caret=function(){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(u.types.assign,2):this.finishOp(u.types.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&c.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(u.types.incDec,2):61===t?this.finishOp(u.types.assign,2):this.finishOp(u.types.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(u.types.assign,r+1):this.finishOp(u.types.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=61===this.input.charCodeAt(this.state.pos+2)?3:2),this.finishOp(u.types.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(u.types.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(u.types.arrow)):this.finishOp(61===e?u.types.eq:u.types.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(u.types.parenL);case 41:return++this.state.pos,this.finishToken(u.types.parenR);case 59:return++this.state.pos,this.finishToken(u.types.semi);case 44:return++this.state.pos,this.finishToken(u.types.comma);case 91:return++this.state.pos,this.finishToken(u.types.bracketL);case 93:return++this.state.pos,this.finishToken(u.types.bracketR);case 123:return++this.state.pos,this.finishToken(u.types.braceL);case 125:return++this.state.pos,this.finishToken(u.types.braceR);case 58:return this.options.features["es7.functionBind"]&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(u.types.doubleColon,2):(++this.state.pos,this.finishToken(u.types.colon));case 63:return++this.state.pos,this.finishToken(u.types.question);case 64:return++this.state.pos,this.finishToken(u.types.at);case 96:return++this.state.pos,this.finishToken(u.types.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(u.types.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+s(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this,t=void 0,r=void 0,n=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var i=this.input.charAt(this.state.pos);if(c.lineBreak.test(i)&&this.raise(n,"Unterminated regular expression"),t)t=!1;else{if("["===i)r=!0;else if("]"===i&&r)r=!1;else if("/"===i&&!r)break;t="\\"===i}++this.state.pos}var s=this.input.slice(n,this.state.pos);++this.state.pos;var o=this.readWord1(),p=s;if(o){var l=/^[gmsiyu]*$/;l.test(o)||this.raise(n,"Invalid regular expression flag"),o.indexOf("u")>=0&&!y&&(p=p.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(t,r,i){return r=Number("0x"+r),r>1114111&&e.raise(n+i+3,"Code point out of bounds"),"x"}),p=p.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"))}var f=null;return m||(a.call(this,p,void 0,n),f=a.call(this,s,o)),this.finishToken(u.types.regexp,{pattern:s,flags:o,value:f})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,a=null==t?1/0:t;a>i;++i){var s=this.input.charCodeAt(this.state.pos),o=void 0;if(o=s>=97?s-97+10:s>=65?s-65+10:s>=48&&57>=s?s-48:1/0,o>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),o.isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(u.types.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=!1,n=48===this.input.charCodeAt(this.state.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.state.pos);46===i&&(++this.state.pos,this.readInt(10),r=!0,i=this.input.charCodeAt(this.state.pos)),(69===i||101===i)&&(i=this.input.charCodeAt(++this.state.pos),(43===i||45===i)&&++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),o.isIdentifierStart(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),s=void 0;return r?s=parseFloat(a):n&&1!==a.length?/[89]/.test(a)||this.strict?this.raise(t,"Invalid number"):s=parseInt(a,8):s=parseInt(a,10),this.finishToken(u.types.num,s)},e.prototype.readCodePoint=function(){var e=this.input.charCodeAt(this.state.pos),t=void 0;if(123===e){var r=++this.state.pos;t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,t>1114111&&this.raise(r,"Code point out of bounds")}else t=this.readHexChar(4);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(c.isNewLine(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(u.types.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(u.types.template)?36===r?(this.state.pos+=2,this.finishToken(u.types.dollarBraceL)):(++this.state.pos,this.finishToken(u.types.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(u.types.template,e));if(92===r)e+=this.input.slice(t,this.state.pos),e+=this.readEscapedChar(!0),t=this.state.pos;else if(c.isNewLine(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return s(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(t>=48&&55>=t){var r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(r,8);return n>255&&(r=r.slice(0,-1),n=parseInt(r,8)),n>0&&(this.strict||e)&&this.raise(this.state.pos-2,"Octal literal in strict mode"),this.state.pos+=r.length-1,String.fromCharCode(n)}return String.fromCharCode(t)}},e.prototype.readHexChar=function(e){var t=this.state.pos,r=this.readInt(16,e);return null===r&&this.raise(t,"Bad character escape sequence"),r},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(o.isIdentifierChar(n,!0))this.state.pos+=65535>=n?1:2;else{if(92!==n)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var i=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var a=this.readCodePoint();(t?o.isIdentifierStart:o.isIdentifierChar)(a,!0)||this.raise(i,"Invalid Unicode escape"),e+=s(a),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)},e.prototype.readWord=function(){var e=this.readWord1(),t=u.types.name;return!this.state.containsEsc&&this.isKeyword(e)&&(t=u.keywords[e]),this.finishToken(t,e)},e.prototype.braceIsBlock=function(e){if(e===u.types.colon){var t=this.curContext();if(t===p.types.b_stat||t===p.types.b_expr)return!t.isExpr}return e===u.types._return?c.lineBreak.test(this.input.slice(this.state.lastTokEnd,this.state.start)):e===u.types._else||e===u.types.semi||e===u.types.eof||e===u.types.parenR?!0:e===u.types.braceL?this.curContext()===p.types.b_stat:!this.state.exprAllowed},e.prototype.updateContext=function(e){var t=void 0,r=this.state.type;r.keyword&&e===u.types.dot?this.state.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.state.exprAllowed=r.beforeExpr},e}();r["default"]=g},{618:618,620:620,621:621,622:622,623:623,624:624}],620:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var i=e(623),a=e(618),s=e(621),o=function(){function e(){n(this,e)}return e.prototype.init=function(e){return this.input=e,this.potentialArrowAt=-1,this.inFunction=this.inGenerator=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=1,this.type=s.types.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[a.types.b_stat],this.exprAllowed=!0,this.containsEsc=!1,this},e.prototype.curPosition=function(){return new i.Position(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(){var t=new e;for(var r in this){var n=this[r];Array.isArray(n)&&(n=n.slice()),t[r]=n}return t},e}();r["default"]=o,t.exports=r["default"]},{618:618,621:621,623:623}],621:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return new s(e,{beforeExpr:!0,binop:t})}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.keyword=e,l[e]=p["_"+e]=new s(e,t)}r.__esModule=!0;var s=function c(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];n(this,c),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};r.TokenType=s;var o={beforeExpr:!0},u={startsExpr:!0},p={num:new s("num",u),regexp:new s("regexp",u),string:new s("string",u),name:new s("name",u),eof:new s("eof"),bracketL:new s("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new s("]"),braceL:new s("{",{beforeExpr:!0,startsExpr:!0}),braceR:new s("}"),parenL:new s("(",{beforeExpr:!0,startsExpr:!0}),parenR:new s(")"),comma:new s(",",o),semi:new s(";",o),colon:new s(":",o),doubleColon:new s("::",o),dot:new s("."),question:new s("?",o),arrow:new s("=>",o),template:new s("template"),ellipsis:new s("...",o),backQuote:new s("`",u),dollarBraceL:new s("${",{beforeExpr:!0,startsExpr:!0}),at:new s("@"),eq:new s("=",{beforeExpr:!0,isAssign:!0}),assign:new s("_=",{beforeExpr:!0,isAssign:!0}),incDec:new s("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new s("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:i("||",1),logicalAND:i("&&",2),bitwiseOR:i("|",3),bitwiseXOR:i("^",4),bitwiseAND:i("&",5),equality:i("==/!=",6),relational:i("</>",7),bitShift:i("<</>>",8),plusMin:new s("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),exponent:new s("**",{beforeExpr:!0,binop:11,rightAssociative:!0})};r.types=p;var l={};r.keywords=l,a("break"),a("case",o),a("catch"),a("continue"),a("debugger"),a("default",o),a("do",{isLoop:!0}),a("else",o),a("finally"),a("for",{isLoop:!0}),a("function",u),a("if"),a("return",o),a("switch"),a("throw",o),a("try"),a("var"),a("let"),a("const"),a("while",{isLoop:!0}),a("with"),a("new",{beforeExpr:!0,startsExpr:!0}),a("this",u),a("super",u),a("class"),a("extends",o),a("export"),a("import"),a("yield",{beforeExpr:!0,startsExpr:!0}),a("null",u),a("true",u),a("false",u),a("in",{beforeExpr:!0,binop:7}),a("instanceof",{beforeExpr:!0,binop:7}),a("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),a("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),a("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},{}],622:[function(e,t,r){"use strict";function n(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function i(e,t){for(var r=65536,n=0;n<t.length;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}}function a(e){return 65>e?36===e:91>e?!0:97>e?95===e:123>e?!0:65535>=e?e>=170&&c.test(String.fromCharCode(e)):i(e,d)}function s(e){return 48>e?36===e:58>e?!0:65>e?!1:91>e?!0:97>e?95===e:123>e?!0:65535>=e?e>=170&&f.test(String.fromCharCode(e)):i(e,d)||i(e,h)}r.__esModule=!0,r.isIdentifierStart=a,r.isIdentifierChar=s;var o={6:n("enum await"),strict:n("implements interface let package private protected public static yield"),strictBind:n("eval arguments")};r.reservedWords=o;var u=n("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super");r.isKeyword=u;var p="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",l="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_",c=new RegExp("["+p+"]"),f=new RegExp("["+p+l+"]");p=l=null;var d=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,99,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,98,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,16481,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,1340,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,16355,541],h=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,9,20855,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,4305,6,792618,239]},{}],623:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=1,n=0;;){a.lineBreakG.lastIndex=n;var i=a.lineBreakG.exec(e);if(!(i&&i.index<t))return new s(r,t-n);++r,n=i.index+i[0].length}}r.__esModule=!0,r.getLineInfo=i;var a=e(624),s=function u(e,t){n(this,u),this.line=e,this.column=t};r.Position=s;var o=function p(e,t){n(this,p),this.start=e,this.end=t};r.SourceLocation=o},{624:624}],624:[function(e,t,r){"use strict";function n(e){return 10===e||13===e||8232===e||8233===e}r.__esModule=!0,r.isNewLine=n;var i=/\r\n?|\n|\u2028|\u2029/;r.lineBreak=i;var a=new RegExp(i.source,"g");r.lineBreakG=a;var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;r.nonASCIIwhitespace=s},{}]},{},[14])(14)});
ajax/libs/extjs/4.2.1/src/data/NodeStore.js
tresni/cdnjs
/* This file is part of Ext JS 4.2 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-05-16 14:36:50 (f9be68accb407158ba2b1be2c226a6ce1f649314) */ /** * Node Store * @private */ Ext.define('Ext.data.NodeStore', { extend: 'Ext.data.Store', alias: 'store.node', requires: ['Ext.data.NodeInterface'], /** * @property {Boolean} isNodeStore * `true` in this class to identify an object as an instantiated NodeStore, or subclass thereof. */ isNodeStore: true, /** * @cfg {Ext.data.Model} node * The Record you want to bind this Store to. Note that * this record will be decorated with the Ext.data.NodeInterface if this is not the * case yet. */ node: null, /** * @cfg {Boolean} recursive * Set this to true if you want this NodeStore to represent * all the descendents of the node in its flat data collection. This is useful for * rendering a tree structure to a DataView and is being used internally by * the TreeView. Any records that are moved, removed, inserted or appended to the * node at any depth below the node this store is bound to will be automatically * updated in this Store's internal flat data structure. */ recursive: false, /** * @cfg {Boolean} rootVisible * False to not include the root node in this Stores collection. */ rootVisible: false, /** * @cfg {Ext.data.TreeStore} treeStore * The TreeStore that is used by this NodeStore's Ext.tree.View. */ /** * @protected * Recursion level counter. Incremented when expansion or collaping of a node is initiated, * including when nested nodes below the expanding/collapsing root begin expanding or collapsing. * * This ensures that collapsestart, collapsecomplete, expandstart and expandcomplete only * fire on the top level node being collapsed/expanded. * * Also, allows listeners to the `add` and `remove` events to know whether a collapse of expand is in progress. */ isExpandingOrCollapsing: 0, constructor: function(config) { var me = this, node; config = config || {}; Ext.apply(me, config); //<debug> if (Ext.isDefined(me.proxy)) { Ext.Error.raise("A NodeStore cannot be bound to a proxy. Instead bind it to a record " + "decorated with the NodeInterface by setting the node config."); } me.useModelWarning = false; //</debug> config.proxy = {type: 'proxy'}; me.callParent([config]); node = me.node; if (node) { me.node = null; me.setNode(node); } }, // NodeStores are never buffered or paged. They are loaded from the TreeStore to reflect all visible // nodes. // BufferedRenderer always asks for the *total* count, so this must return the count. getTotalCount: function() { return this.getCount(); }, setNode: function(node) { var me = this; if (me.node && me.node != node) { // We want to unbind our listeners on the old node me.mun(me.node, { expand: me.onNodeExpand, collapse: me.onNodeCollapse, append: me.onNodeAppend, insert: me.onNodeInsert, bulkremove: me.onBulkRemove, remove: me.onNodeRemove, sort: me.onNodeSort, scope: me }); me.node = null; } if (node) { Ext.data.NodeInterface.decorate(node.self); me.removeAll(); if (me.rootVisible) { me.add(node); } else if (!node.isExpanded() && me.treeStore.autoLoad !== false) { node.expand(); } me.mon(node, { expand: me.onNodeExpand, collapse: me.onNodeCollapse, append: me.onNodeAppend, insert: me.onNodeInsert, bulkremove: me.onBulkRemove, remove: me.onNodeRemove, sort: me.onNodeSort, scope: me }); me.node = node; if (node.isExpanded() && node.isLoaded()) { me.onNodeExpand(node, node.childNodes, true); } } }, onNodeSort: function(node, childNodes) { var me = this; if ((me.indexOf(node) !== -1 || (node === me.node && !me.rootVisible) && node.isExpanded())) { Ext.suspendLayouts(); me.onNodeCollapse(node, childNodes, true); me.onNodeExpand(node, childNodes, true); Ext.resumeLayouts(true); } }, // Triggered by a NodeInterface's bubbled "expand" event. onNodeExpand: function(parent, records, suppressEvent) { var me = this, insertIndex = me.indexOf(parent) + 1, toAdd = []; // Used by the TreeView to bracket recursive expand & collapse ops // and refresh the size. This is most effective when folder nodes are loaded, // and this method is able to recurse. if (!suppressEvent) { me.fireEvent('beforeexpand', parent, records, insertIndex); } me.handleNodeExpand(parent, records, toAdd); // The add event from this insertion is handled by TreeView.onAdd. // That implementation calls parent and then ensures the previous sibling's joining lines are correct. // The datachanged event is relayed by the TreeStore. Internally, that's not used. me.insert(insertIndex, toAdd); // Triggers the TreeView's onExpand method which calls refreshSize, // and fires its afteritemexpand event if (!suppressEvent) { me.fireEvent('expand', parent, records); } }, // Collects child nodes to remove into the passed toRemove array. // When available, all descendant nodes are pushed into that array using recursion. handleNodeExpand: function(parent, records, toAdd) { var me = this, ln = records ? records.length : 0, i, record; // recursive is hardcoded to true in TreeView. if (!me.recursive && parent !== me.node) { return; } if (parent !== this.node && !me.isVisible(parent)) { return; } if (ln) { // The view items corresponding to these are rendered. // Loop through and expand any of the non-leaf nodes which are expanded for (i = 0; i < ln; i++) { record = records[i]; // Add to array being collected by recursion when child nodes are loaded. // Must be done here in loop so that child nodes are inserted into the stream in place // in recursive calls. toAdd.push(record); if (record.isExpanded()) { if (record.isLoaded()) { // Take a shortcut - appends to toAdd array me.handleNodeExpand(record, record.childNodes, toAdd); } else { // Might be asynchronous if child nodes are not immediately available record.set('expanded', false); record.expand(); } } } } }, // Triggered by NodeInterface's bubbled bulkremove event onBulkRemove: function(parent, childNodes, isMove) { this.onNodeCollapse(parent, childNodes, true); }, // Triggered by a NodeInterface's bubbled "collapse" event. onNodeCollapse: function(parent, records, suppressEvent, callback, scope) { var me = this, collapseIndex = me.indexOf(parent) + 1, node, lastNodeIndexPlus, sibling, found; if (!me.recursive && parent !== me.node) { return; } // Used by the TreeView to bracket recursive expand & collapse ops. // The TreeViewsets up the animWrap object if we are animating. // It also caches the collapse callback to call when it receives the // end collapse event. See below. if (!suppressEvent) { me.fireEvent('beforecollapse', parent, records, collapseIndex, callback, scope); } // Only attempt to remove the records if they are there. // Collapsing an ancestor node *immediately removes from the view, ALL its descendant nodes at all levels*. // But if the collapse was recursive, all descendant root nodes will still fire their // events. But we must ignore those events here - we have nothing to do. if (records.length && me.data.contains(records[0])) { // Calculate the index *one beyond* the last node we are going to remove // Need to loop up the tree to find the nearest view sibling, since it could // exist at some level above the current node. node = parent; while (node.parentNode) { sibling = node.nextSibling; if (sibling) { found = true; lastNodeIndexPlus = me.indexOf(sibling); break; } else { node = node.parentNode; } } if (!found) { lastNodeIndexPlus = me.getCount(); } // Remove the whole collapsed node set. me.removeAt(collapseIndex, lastNodeIndexPlus - collapseIndex); } // Triggers the TreeView's onCollapse method which calls refreshSize, // and fires its afteritecollapse event if (!suppressEvent) { me.fireEvent('collapse', parent, records, collapseIndex); } }, onNodeAppend: function(parent, node, index) { var me = this, refNode, sibling; // Only react to a node append if it is to a node which is expanded, and is part of a tree if (me.isVisible(node)) { if (index === 0) { refNode = parent; } else { sibling = node.previousSibling; while (sibling.isExpanded() && sibling.lastChild) { sibling = sibling.lastChild; } refNode = sibling; } me.insert(me.indexOf(refNode) + 1, node); if (!node.isLeaf() && node.isExpanded()) { if (node.isLoaded()) { // Take a shortcut me.onNodeExpand(node, node.childNodes, true); } else if (!me.treeStore.fillCount ) { // If the node has been marked as expanded, it means the children // should be provided as part of the raw data. If we're filling the nodes, // the children may not have been loaded yet, so only do this if we're // not in the middle of populating the nodes. node.set('expanded', false); node.expand(); } } } }, onNodeInsert: function(parent, node, refNode) { var me = this, index = this.indexOf(refNode); if (index != -1 && me.isVisible(node)) { me.insert(index, node); if (!node.isLeaf() && node.isExpanded()) { if (node.isLoaded()) { // Take a shortcut me.onNodeExpand(node, node.childNodes, true); } else { node.set('expanded', false); node.expand(); } } } }, onNodeRemove: function(parent, node, isMove) { var me = this; if (me.indexOf(node) != -1) { // If the removed node is a non-leaf and is expanded, use the onCollapse method to get rid // of all descendants at any level. if (!node.isLeaf() && node.isExpanded()) { // onCollapse expects to be able to use the "collapsing" node's parentNode // and nextSibling pointers so temporarily reinstate them. // Reinstating them is safe because we pass the suppressEvents flag, and no user code // is executed. node.parentNode = node.removeContext.parentNode; node.nextSibling = node.removeContext.nextSibling; me.onNodeCollapse(node, node.childNodes, true); node.parentNode = node.nextSibling = null; } me.remove(node); } }, isVisible: function(node) { var parent = node.parentNode; while (parent) { // Hit root and it is expanded, the node is visible if (parent === this.node && parent.data.expanded) { return true; } // Hit a collapsed ancestor, the node is not visible if (!parent.data.expanded) { return false; } parent = parent.parentNode; } // Walked off the top - the node is not part of the tree structure return false; } });
src/components/help.js
rscarson/Lavendeux
import React from 'react'; import { Container } from 'react-bootstrap'; import { helpText } from '../include/help_strings'; /** * Render the help tab * @param {Object} props Component properties * @returns Component contents */ function Help(props) { return ( <Container dangerouslySetInnerHTML={ {__html: helpText()} }></Container> ); } export default Help;
packages/material-ui-icons/lib/ElectricMopedOutlined.js
mbrookes/material-ui
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon")); var _jsxRuntime = require("react/jsx-runtime"); var _default = (0, _createSvgIcon.default)([/*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M19 5c0-1.1-.9-2-2-2h-3v2h3v2.65L13.52 12H10V7H6c-2.21 0-4 1.79-4 4v3h2c0 1.66 1.34 3 3 3s3-1.34 3-3h4.48L19 8.35V5zM4 12v-1c0-1.1.9-2 2-2h2v3H4zm3 3c-.55 0-1-.45-1-1h2c0 .55-.45 1-1 1z" }, "0"), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M5 4h5v2H5zm14 7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm0 4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zM7 20h4v-2l6 3h-4v2z" }, "1")], 'ElectricMopedOutlined'); exports.default = _default;
ajax/libs/orb/1.0.1/orb.js
rileyjshaw/cdnjs
/** * orb v1.0.1, Pivot grid javascript library. * * Copyright (c) 2014 Najmeddine Nouri. * * @version v1.0.1 * @link http://nnajm.github.io/orb/ * @license MIT */ 'use strict'; ! function(e) { if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else { var f; "undefined" != typeof window ? f = window : "undefined" != typeof global ? f = global : "undefined" != typeof self && (f = self), f.orb = e() } }(function() { var define, module, exports; return (function e(t, n, r) { function s(o, u) { if (!n[o]) { if (!t[o]) { var a = typeof require == "function" && require; if (!u && a) return a(o, !0); if (i) return i(o, !0); var f = new Error("Cannot find module '" + o + "'"); throw f.code = "MODULE_NOT_FOUND", f } var l = n[o] = { exports: {} }; t[o][0].call(l.exports, function(e) { var n = t[o][1][e]; return s(n ? n : e) }, l, l.exports, e, t, n, r) } return n[o].exports } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++) s(r[o]); return s })({ 1: [function(_dereq_, module, exports) { module.exports.utils = _dereq_('./orb.utils'); module.exports.pgrid = _dereq_('./orb.pgrid'); module.exports.pgridwidget = _dereq_('./orb.ui.pgridwidget'); }, { "./orb.pgrid": 7, "./orb.ui.pgridwidget": 11, "./orb.utils": 13 }], 2: [function(_dereq_, module, exports) { }, {}], 3: [function(_dereq_, module, exports) { module.exports = { count: function(datafield, intersection, datasource) { return intersection === 'all' ? datasource.length : intersection.length; }, sum: function(datafield, intersection, datasource) { var sum = 0; forEachIntersection(datafield, intersection, datasource, function(val) { sum += val; }); return sum; }, min: function(datafield, intersection, datasource) { var min = null; forEachIntersection(datafield, intersection, datasource, function(val) { if (min == null || val < min) { min = val; } }); return min; }, max: function(datafield, intersection, datasource) { var max = null; forEachIntersection(datafield, intersection, datasource, function(val) { if (max == null || val > max) { max = val; } }); return max; }, avg: function(datafield, intersection, datasource) { var avg = 0; var len = (intersection === 'all' ? datasource : intersection).length; if (len > 0) { forEachIntersection(datafield, intersection, datasource, function(val) { avg += val; }); avg /= len; } return avg; }, prod: function(datafield, intersection, datasource) { var prod; var len = (intersection === 'all' ? datasource : intersection).length; if (len > 0) { prod = 1; forEachIntersection(datafield, intersection, datasource, function(val) { prod *= val; }); } return prod; }, stdev: function(datafield, intersection, datasource) { return Math.sqrt(calcVariance(datafield, intersection, datasource, false)); }, stdevp: function(datafield, intersection, datasource) { return Math.sqrt(calcVariance(datafield, intersection, datasource, true)); }, var: function(datafield, intersection, datasource) { return calcVariance(datafield, intersection, datasource, false); }, varp: function(datafield, intersection, datasource) { return calcVariance(datafield, intersection, datasource, true); } }; function calcVariance(datafield, intersection, datasource, population) { var variance = 0; var avg = 0; var len = (intersection === 'all' ? datasource : intersection).length; if (len > 0) { if (population || len > 1) { forEachIntersection(datafield, intersection, datasource, function(val) { avg += val; }); avg /= len; forEachIntersection(datafield, intersection, datasource, function(val) { variance += (val - avg) * (val - avg); }); variance = variance / (population ? len : len - 1); } else { variance = NaN; } } return variance; } function forEachIntersection(datafield, intersection, datasource, callback) { var all = intersection === 'all'; intersection = all ? datasource : intersection; if (intersection.length > 0) { for (var i = 0; i < intersection.length; i++) { callback((all ? intersection[i] : datasource[intersection[i]])[datafield]); } } } }, {}], 4: [function(_dereq_, module, exports) { var utils = _dereq_('./orb.utils'); var dimension = _dereq_('./orb.dimension'); var AxeType = { COLUMNS: 1, ROWS: 2, DATA: 3 }; module.exports = function(pgrid, type) { var self = this; var dimid = 0; if (pgrid != null && pgrid.config != null) { this.pgrid = pgrid; this.type = type; this.fields = (function() { switch (type) { case AxeType.COLUMNS: return self.pgrid.config.columnFields; case AxeType.ROWS: return self.pgrid.config.rowFields; case AxeType.DATA: return self.pgrid.config.dataFields; default: return []; } }()); this.dimensionsCount = null; this.root = null; this.dimensionsByDepth = null; this.update = function() { self.dimensionsCount = self.fields.length; self.root = new dimension(++dimid, null, null, null, self.dimensionsCount + 1, true); self.dimensionsByDepth = {}; for (var depth = 1; depth <= self.dimensionsCount; depth++) { self.dimensionsByDepth[depth] = []; } // fill data fill(); // initial sort for (var findex = 0; findex < self.fields.length; findex++) { var ffield = self.fields[findex]; if (ffield.sort.order === 'asc' || ffield.sort.order === 'desc') { self.sort(ffield, true); } } }; this.sort = function(field, donottoggle) { if (field != null) { if (donottoggle !== true) { if (field.sort.order !== 'asc') { field.sort.order = 'asc'; } else { field.sort.order = 'desc'; } } var depth = self.dimensionsCount - getfieldindex(field); var parents = depth === self.dimensionsCount ? [self.root] : self.dimensionsByDepth[depth + 1]; for (var i = 0; i < parents.length; i++) { parents[i].values.sort(); if (field.sort.order === 'desc') { parents[i].values.reverse(); } } } }; this.update(); } function getfieldindex(field) { for (var i = 0; i < self.fields.length; i++) { if (self.fields[i].name === field.name) { return i; } } return -1; } function fill() { if (self.pgrid.config.dataSource != null && self.dimensionsCount > 0) { var datasource = self.pgrid.config.dataSource; if (datasource != null && utils.isArray(datasource) && datasource.length > 0) { for (var rowIndex = 0, dataLength = datasource.length; rowIndex < dataLength; rowIndex++) { var row = datasource[rowIndex]; var dim = self.root; for (var findex = 0; findex < self.dimensionsCount; findex++) { var depth = self.dimensionsCount - findex; var subfield = self.fields[findex]; var subvalue = row[subfield.name]; var subdimvals = dim.subdimvals; if (subdimvals[subvalue] !== undefined) { dim = subdimvals[subvalue]; } else { dim.values.push(subvalue); dim = new dimension(++dimid, dim, subvalue, subfield, depth, false, findex == self.dimensionsCount - 1); subdimvals[subvalue] = dim; dim.rowIndexes = []; self.dimensionsByDepth[depth].push(dim); } dim.rowIndexes.push(rowIndex); } } } } } }; module.exports.Type = AxeType; }, { "./orb.dimension": 6, "./orb.utils": 13 }], 5: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var aggregation = _dereq_('./orb.aggregation'); function getpropertyvalue(property, configs, defaultvalue) { for (var i = 0; i < configs.length; i++) { if (configs[i][property] != null) { return configs[i][property]; } } return defaultvalue; } function mergefieldconfigs() { var configs = []; var sorts = []; var subtotals = []; var filters = []; var functions = []; for (var i = 0; i < arguments.length; i++) { var nnconfig = arguments[i] || {}; configs.push(nnconfig); sorts.push(nnconfig.sort || {}); subtotals.push(nnconfig.subTotal || {}); filters.push(nnconfig.filter || {}); functions.push({ aggregateFunc: i === 0 ? nnconfig.aggregateFunc : (nnconfig.aggregateFunc ? nnconfig.aggregateFunc() : null), formatFunc: i === 0 ? nnconfig.formatFunc : (nnconfig.formatFunc ? nnconfig.formatFunc() : null), }); } return new Field({ name: getpropertyvalue('name', configs, ''), caption: getpropertyvalue('caption', configs, ''), filter: { type: getpropertyvalue('type', filters, 'operator'), regexp: getpropertyvalue('regexp', filters, null), operator: getpropertyvalue('operator', filters, null), value: getpropertyvalue('value', filters, null) }, sort: { order: getpropertyvalue('order', sorts, null), customfunc: getpropertyvalue('customfunc', sorts, null) }, subTotal: { visible: getpropertyvalue('visible', subtotals, true), collapsible: getpropertyvalue('collapsible', subtotals, true), collapsed: getpropertyvalue('collapsed', subtotals, false) }, aggregateFunc: getpropertyvalue('aggregateFunc', functions, null), formatFunc: getpropertyvalue('formatFunc', functions, null) }, false); } function createfield(rootconfig, axetype, fieldconfig, defaultfieldconfig) { var axeconfig; if (defaultfieldconfig) { switch (axetype) { case axe.Type.ROWS: axeconfig = defaultfieldconfig.rowSettings; break; case axe.Type.COLUMNS: axeconfig = defaultfieldconfig.columnSettings; break; case axe.Type.DATA: axeconfig = defaultfieldconfig.dataSettings; break; default: axeconfig = null; break; } } else { axeconfig = null; } return mergefieldconfigs(fieldconfig, axeconfig, defaultfieldconfig, rootconfig); } function GrandTotalConfig(options) { options = options || {}; this.rowsvisible = options.rowsvisible !== undefined ? options.rowsvisible : true; this.columnsvisible = options.columnsvisible !== undefined ? options.columnsvisible : true; } function SubTotalConfig(options, setdefaults) { var defaults = { visible: setdefaults === true ? true : undefined, collapsible: setdefaults === true ? true : undefined, collapsed: setdefaults === true ? false : undefined }; options = options || {}; this.visible = options.visible !== undefined ? options.visible : defaults.visible; this.collapsible = options.collapsible !== undefined ? options.collapsible : defaults.collapsible; this.collapsed = options.collapsed !== undefined ? options.collapsed : defaults.collapsed; } function SortConfig(options) { options = options || {}; this.order = options.order; this.customfunc = options.customfunc; } function FilterConfig(options) { options = options || {}; this.type = options.type; this.regexp = options.regexp; this.operator = options.operator; this.value = options.value; } var Field = module.exports.field = function(options, createSubOptions) { options = options || {}; // field name this.name = options.name; // shared settings this.caption = options.caption || this.name; this.filter = new FilterConfig(options.filter); // rows & columns settings this.sort = new SortConfig(options.sort); this.subTotal = new SubTotalConfig(options.subTotal); // data settings var _aggregatefunc; var _formatfunc; function defaultFormatFunc(val) { return val ? val.toString() : ''; } this.aggregateFunc = function(func) { if (func) { if (typeof func === 'string' && aggregation[func]) { _aggregatefunc = aggregation[func]; } else if (typeof func === 'function') { _aggregatefunc = func; } else { _aggregatefunc = aggregation.sum; } } else { return _aggregatefunc; } }; this.formatFunc = function(func) { if (func) { _formatfunc = func; } else { return _formatfunc; } }; this.aggregateFunc(options.aggregateFunc || 'sum'); this.formatFunc(options.formatFunc || defaultFormatFunc); if (createSubOptions !== false) { (this.rowSettings = new Field(options.rowSettings, false)).name = this.name; (this.columnSettings = new Field(options.columnSettings, false)).name = this.name; (this.dataSettings = new Field(options.dataSettings, false)).name = this.name; } }; module.exports.config = function(config) { var self = this; this.dataSource = config.dataSource; this.dataHeadersLocation = config.dataHeadersLocation === 'columns' ? 'columns' : 'rows'; this.grandTotal = new GrandTotalConfig(config.grandTotal); this.subTotal = new SubTotalConfig(config.subTotal, true); this.allFields = (config.fields || []).map(function(fieldconfig) { return new Field(fieldconfig); }); this.rowFields = (config.rows || []).map(function(fieldconfig) { return createfield(self, axe.Type.ROWS, fieldconfig, getfield(self.allFields, fieldconfig.name)); }); this.columnFields = (config.columns || []).map(function(fieldconfig) { return createfield(self, axe.Type.COLUMNS, fieldconfig, getfield(self.allFields, fieldconfig.name)); }); this.dataFields = (config.data || []).map(function(fieldconfig) { return createfield(self, axe.Type.DATA, fieldconfig, getfield(self.allFields, fieldconfig.name)); }); this.dataFieldsCount = this.dataFields ? (this.dataFields.length || 1) : 1; function getfield(axefields, fieldname) { var fieldindex = getfieldindex(axefields, fieldname); if (fieldindex > -1) { return axefields[fieldindex]; } return null; } function getfieldindex(axefields, fieldname) { for (var fi = 0; fi < axefields.length; fi++) { if (axefields[fi].name === fieldname) { return fi; } } return -1; } self.availablefields = function() { return self.allFields.filter(function(field) { var notequalfield = function(otherfield) { return field.name !== otherfield.name; }; return self.dataFields.every(notequalfield) && self.rowFields.every(notequalfield) && self.columnFields.every(notequalfield); }); }; this.moveField = function(fieldname, oldaxetype, newaxetype, position) { var oldaxe, oldposition; var newaxe; var field = getfield(self.allFields, fieldname); if (field) { switch (oldaxetype) { case axe.Type.ROWS: oldaxe = self.rowFields; break; case axe.Type.COLUMNS: oldaxe = self.columnFields; break; case axe.Type.DATA: oldaxe = self.dataFields; break; default: break; } switch (newaxetype) { case axe.Type.ROWS: newaxe = self.rowFields; break; case axe.Type.COLUMNS: newaxe = self.columnFields; break; case axe.Type.DATA: newaxe = self.dataFields; break; default: break; } if (oldaxe || newaxe) { if (oldaxe) { oldposition = getfieldindex(oldaxe, fieldname); if (oldaxetype === newaxetype) { if (oldposition == oldaxe.length - 1 && position == null || oldposition === position - 1) { return false; } } oldaxe.splice(oldposition, 1); } field = createfield(self, newaxetype, null, field); if (newaxe) { if (position != null) { newaxe.splice(position, 0, field); } else { newaxe.push(field); } } // update data fields count self.dataFieldsCount = self.dataFields ? (self.dataFields.length || 1) : 1; return true; } } }; }; }, { "./orb.aggregation": 3, "./orb.axe": 4 }], 6: [function(_dereq_, module, exports) { module.exports = function(id, parent, value, field, depth, isRoot, isLeaf) { var self = this; this.id = id; this.parent = parent; this.value = value; this.isRoot = isRoot; this.isLeaf = isLeaf; this.field = field; this.depth = depth; this.values = []; this.subdimvals = {}; this.rowIndexes = null; this.getRowIndexes = function(result) { if (self.rowIndexes == null) { this.rowIndexes = []; for (var i = 0; i < self.values.length; i++) { self.subdimvals[self.values[i]].getRowIndexes(this.rowIndexes); } } if (result != null) { for (var j = 0; j < self.rowIndexes.length; j++) { result.push(self.rowIndexes[j]); } return result; } else { return self.rowIndexes; } }; }; }, {}], 7: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var configuration = _dereq_('./orb.config').config; var query = _dereq_('./orb.query'); module.exports = function(config) { var defaultfield = { name: '#undefined#' }; var self = this; var _iCache; this.config = new configuration(config); this.rows = new axe(self, axe.Type.ROWS); this.columns = new axe(self, axe.Type.COLUMNS); this.dataMatrix = {}; this.moveField = function(fieldname, oldaxetype, newaxetype, position) { if (self.config.moveField(fieldname, oldaxetype, newaxetype, position)) { self.rows.update(); self.columns.update(); buildData(); } }; this.getData = function(datafield, rowdim, coldim) { if (rowdim && coldim) { datafield = datafield || (self.config.dataFields[0] || defaultfield).name; if (self.dataMatrix[rowdim.id] && self.dataMatrix[rowdim.id][coldim.id]) { return self.dataMatrix[rowdim.id][coldim.id][datafield] || null; } return null; } }; this.query = query(self); buildData(); function calcCellData(rowIndexes, colIndexes, origRowIndexes) { var res = {}; if (self.config.dataFieldsCount > 0) { var intersection; if (rowIndexes == null) { intersection = colIndexes; } else if (colIndexes == null) { intersection = rowIndexes; } else { intersection = []; for (var ri = 0; ri < rowIndexes.length; ri++) { var rowindex = rowIndexes[ri]; if (rowindex >= 0) { var colrowindex = colIndexes.indexOf(rowindex); if (colrowindex >= 0) { rowIndexes[ri] = 0 - (rowindex + 2); intersection.push(rowindex); } } } } var datasource = self.config.dataSource; for (var datafieldIndex = 0; datafieldIndex < self.config.dataFieldsCount; datafieldIndex++) { var datafield = self.config.dataFields[datafieldIndex] || defaultfield; if (datafield.aggregateFunc) { res[datafield.name] = datafield.aggregateFunc()(datafield.name, intersection || 'all', datasource, origRowIndexes, colIndexes); } } } return res; } function calcRowData(rowDim) { if (rowDim) { var data = {}; var rid = 'r' + rowDim.id; // set cached row indexes for current row dimension if (_iCache[rid] === undefined) { _iCache[rid] = rowDim.isRoot ? null : (_iCache[rowDim.parent.id] || rowDim.getRowIndexes()); } // calc grand-total cell data[self.columns.root.id] = calcCellData(rowDim.isRoot ? null : _iCache[rid].slice(0), null); if (self.columns.dimensionsCount > 0) { var p = 0; var parents = [self.columns.root]; while (p < parents.length) { var parent = parents[p]; var rowindexes = rowDim.isRoot ? null : (parent.isRoot ? _iCache[rid].slice(0) : _iCache['c' + parent.id].slice(0)); for (var i = 0; i < parent.values.length; i++) { var subdim = parent.subdimvals[parent.values[i]]; var cid = 'c' + subdim.id; // set cached row indexes for this column leaf dimension if (_iCache[cid] === undefined) { _iCache[cid] = _iCache[cid] || subdim.getRowIndexes().slice(0); } data[subdim.id] = calcCellData(rowindexes, _iCache[cid], rowDim.isRoot ? null : rowDim.getRowIndexes()); if (!subdim.isLeaf) { parents.push(subdim); if (rowindexes) { _iCache[cid] = []; for (var ur = 0; ur < rowindexes.length; ur++) { var vr = rowindexes[ur]; if (vr != -1 && vr < 0) { _iCache[cid].push(0 - (vr + 2)); rowindexes[ur] = -1; } } } } } _iCache['c' + parent.id] = undefined; p++; } } return data; } } function buildData() { self.dataMatrix = {}; _iCache = {}; // calc grand total row self.dataMatrix[self.rows.root.id] = calcRowData(self.rows.root); if (self.rows.dimensionsCount > 0) { var parents = [self.rows.root]; var p = 0; var parent; while (p < parents.length) { parent = parents[p]; // calc children rows for (var i = 0; i < parent.values.length; i++) { var subdim = parent.subdimvals[parent.values[i]]; // calc child row self.dataMatrix[subdim.id] = calcRowData(subdim); // if row is not a leaf, add it to parents array to process its children if (!subdim.isLeaf) { parents.push(subdim); } } // next parent p++; } } } }; }, { "./orb.axe": 4, "./orb.config": 5, "./orb.query": 8 }], 8: [function(_dereq_, module, exports) { ////var utils = require('./orb.utils'); var axe = _dereq_('./orb.axe'); module.exports = function(pgrid) { return function(parameters) { var query = {}; var filters = {}; var captionNameDict = {}; var rowfields = pgrid.config.rowFields; var colfields = pgrid.config.columnFields; var datafields = pgrid.config.dataFields; for (var i = 0; i < rowfields.length; i++) { var rfield = rowfields[i]; var rfieldFilter = pushFilter( axe.Type.ROWS, rfield.name, rowfields.length - i ); query[rfield.name] = rfieldFilter; if (rfield.caption && rfield.name !== rfield.caption) { query[rfield.caption] = rfieldFilter; captionNameDict[rfield.caption] = rfield.name; } } for (var j = 0; j < colfields.length; j++) { var cfield = colfields[j]; var cfieldFilter = pushFilter( axe.Type.COLUMNS, cfield.name, colfields.length - j ); query[colfields[j].name] = cfieldFilter; if (cfield.caption && cfield.name !== cfield.caption) { query[cfield.caption] = cfieldFilter; captionNameDict[cfield.caption] = cfield.name; } } for (var k = 0; k < datafields.length; k++) { var dfield = datafields[k]; query[dfield.name] = getMeasure(dfield.name); query[dfield.name].flat = getMeasure(dfield.name, true); if (dfield.caption && dfield.name !== dfield.caption) { query[dfield.caption] = query[dfield.name]; query[dfield.caption].flat = query[dfield.name].flat; captionNameDict[dfield.caption] = dfield.name; } } query.data = getMeasure(); query.data.flat = getMeasure(undefined, true); if (parameters) { for (var param in parameters) { if (parameters.hasOwnProperty(param)) { query[param](parameters[param]); } } } return query; function pushFilter(axetype, fieldname, fielddepth) { return function(val) { var f = { name: fieldname, val: val, depth: fielddepth }; (filters[axetype] = filters[axetype] || []).push(f); return query; } } function applyFilter(axetype) { if (filters[axetype]) { var rarr = filters[axetype].sort(function(f1, f2) { return f2.depth - f1.depth; }); var rfi = 0; var dims = null; while (rfi < rarr.length) { dims = pgrid[axetype === axe.Type.ROWS ? 'rows' : 'columns'].dimensionsByDepth[rarr[rfi].depth].filter(function(d) { return d.value === rarr[rfi].val && (rfi === 0 || dims.some(function(dd) { var parent = d.parent; var dp = d.depth + 1; while (dp < dd.depth) { parent = parent.parent; dp++; } return parent === dd; })); }); rfi++; } return dims; } return null; } function getFieldName(name) { return captionNameDict[name] ? captionNameDict[name] : name; } function getMeasure(datafieldname, flat) { datafieldname = getFieldName(datafieldname); return function() { var rowdims = applyFilter(axe.Type.ROWS) || [pgrid.rows.root]; var coldims = applyFilter(axe.Type.COLUMNS) || [pgrid.columns.root]; var res = []; for (var rdi = 0; rdi < rowdims.length; rdi++) { for (var cdi = 0; cdi < coldims.length; cdi++) { var rowdim = rowdims[rdi]; var coldim = coldims[cdi]; var resv; if (flat !== true) { resv = {}; if (!rowdim.isRoot) { resv[rowdim.field.name] = rowdim.value; } if (!coldim.isRoot) { resv[coldim.field.name] = coldim.value; } if (arguments.length == 0) { resv[datafieldname || 'data'] = pgrid.getData(datafieldname, rowdim, coldim); } else { var datares = {}; for (var ai = 0; ai < arguments.length; ai++) { datares[arguments[ai]] = pgrid.getData(getFieldName(arguments[ai]), rowdim, coldim); } resv.data = datares; } } else { resv = []; if (arguments.length == 0) { resv.push(pgrid.getData(datafieldname, rowdim, coldim)); } else { for (var ai = 0; ai < arguments.length; ai++) { resv.push(pgrid.getData(getFieldName(arguments[ai]), rowdim, coldim)); } } } res.push(resv); } } return res; } } }; }; }, { "./orb.axe": 4 }], 9: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var uiheaders = _dereq_('./orb.ui.header'); module.exports = function(columnsAxe) { var self = this; this.axe = columnsAxe; this.uiInfos = null; this.leafsHeaders = null; var _multidatafields; var _datafieldscount; this.build = function() { _datafieldscount = self.axe.pgrid.config.dataHeadersLocation === 'columns' ? self.axe.pgrid.config.dataFieldsCount : 1; _multidatafields = self.axe.pgrid.config.dataHeadersLocation === 'columns' && _datafieldscount > 1; self.uiInfos = []; if (self.axe != null) { // Fill columns layout infos for (var depth = self.axe.root.depth; depth > 1; depth--) { self.uiInfos.push([]); getUiInfo(depth, self.uiInfos); } if (self.axe.pgrid.config.grandTotal.columnsvisible) { // add grandtotal header (self.uiInfos[0] = self.uiInfos[0] || []).push(new uiheaders.header(axe.Type.COLUMNS, uiheaders.HeaderType.GRAND_TOTAL, self.axe.root, null, _datafieldscount)); } if (self.uiInfos.length === 0) { self.uiInfos.push([new uiheaders.header(axe.Type.COLUMNS, uiheaders.HeaderType.INNER, self.axe.root, null, _datafieldscount)]); } // generate leafs headers generateLeafsHeaders(); } }; function generateLeafsHeaders() { var leafsHeaders = []; function pushsubtotal(pheader) { if (pheader && pheader.dim.field.subTotal.visible) { leafsHeaders.push(pheader.subtotalHeader); } } if (self.uiInfos.length > 0) { // last headers row var infos = self.uiInfos[self.uiInfos.length - 1]; var header = infos[0]; var currparent, prevpar = header.parent; for (var i = 0; i < infos.length; i++) { header = infos[i]; currparent = header.parent; // if current header parent is different than previous header parent, // add previous parent if (currparent != prevpar) { pushsubtotal(prevpar); if (currparent != null) { // walk up parent hierarchy and add grand parents if different // than current header grand parents var grandpar = currparent.parent; var prevgrandpar = prevpar ? prevpar.parent : null; while (grandpar != prevgrandpar && prevgrandpar != null) { pushsubtotal(prevgrandpar); grandpar = grandpar ? grandpar.parent : null; prevgrandpar = prevgrandpar ? prevgrandpar.parent : null; } } // update previous parent variable prevpar = currparent; } // push current header leafsHeaders.push(infos[i]); // if it's the last header, add all of its parents up to the top if (i === infos.length - 1) { while (prevpar != null) { pushsubtotal(prevpar); prevpar = prevpar.parent; } } } // grandtotal is visible for columns and if there is more than one dimension in this axe if (self.axe.pgrid.config.grandTotal.columnsvisible && self.axe.dimensionsCount > 1) { // push also grand total header leafsHeaders.push(self.uiInfos[0][self.uiInfos[0].length - 1]); } } // add data headers if more than 1 data field and they willbe the leaf headers if (_multidatafields) { self.leafsHeaders = []; for (var leafIndex = 0; leafIndex < leafsHeaders.length; leafIndex++) { for (var datafieldindex = 0; datafieldindex < _datafieldscount; datafieldindex++) { self.leafsHeaders.push(new uiheaders.dataHeader(self.axe.pgrid.config.dataFields[datafieldindex], leafsHeaders[leafIndex])); } } self.uiInfos.push(self.leafsHeaders); } else { self.leafsHeaders = leafsHeaders; } } this.build(); function getUiInfo(depth, uiInfos) { var infos = uiInfos[uiInfos.length - 1]; var parents = self.axe.root.depth === depth ? [null] : uiInfos[self.axe.root.depth - depth - 1].filter(function(p) { return p.type !== uiheaders.HeaderType.SUB_TOTAL; }); for (var pi = 0; pi < parents.length; pi++) { var parent = parents[pi]; var parentDim = parent == null ? self.axe.root : parent.dim; for (var di = 0; di < parentDim.values.length; di++) { var subvalue = parentDim.values[di]; var subdim = parentDim.subdimvals[subvalue]; var subtotalHeader; if (!subdim.isLeaf && subdim.field.subTotal.visible) { subtotalHeader = new uiheaders.header(axe.Type.COLUMNS, uiheaders.HeaderType.SUB_TOTAL, subdim, parent, _datafieldscount); } else { subtotalHeader = null; } var header = new uiheaders.header(axe.Type.COLUMNS, null, subdim, parent, _datafieldscount, subtotalHeader); infos.push(header); if (!subdim.isLeaf && subdim.field.subTotal.visible) { infos.push(subtotalHeader); } } } } }; }, { "./orb.axe": 4, "./orb.ui.header": 10 }], 10: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var HeaderType = module.exports.HeaderType = { EMPTY: 1, DATA_HEADER: 2, DATA_VALUE: 3, FIELD_BUTTON: 4, INNER: 5, WRAPPER: 6, SUB_TOTAL: 7, GRAND_TOTAL: 8, getHeaderClass: function(headerType, axetype) { var cssclass = ''; switch (headerType) { case HeaderType.EMPTY: case HeaderType.FIELD_BUTTON: cssclass = 'empty'; break; case HeaderType.INNER: cssclass = 'header'; break; case HeaderType.WRAPPER: if (axetype === axe.Type.ROWS) { cssclass = 'header'; } else if (axetype === axe.Type.COLUMNS) { cssclass = 'header'; } break; case HeaderType.SUB_TOTAL: cssclass = 'header header-sub-total'; break; case HeaderType.GRAND_TOTAL: cssclass = 'header header-grand-total'; break; } return cssclass; }, getCellClass: function(rowHeaderType, colHeaderType) { var cssclass = ''; switch (rowHeaderType) { case HeaderType.GRAND_TOTAL: cssclass = 'cell-grand-total'; break; case HeaderType.SUB_TOTAL: if (colHeaderType === HeaderType.GRAND_TOTAL) { cssclass = 'cell-grand-total'; } else { cssclass = 'cell-sub-total'; } break; default: if (colHeaderType === HeaderType.GRAND_TOTAL) { cssclass = 'cell-grand-total'; } else if (colHeaderType === HeaderType.SUB_TOTAL) { cssclass = 'cell-sub-total'; } else { cssclass = 'cell'; } } return cssclass; } }; function CellBase(options) { this.axetype = options.axetype; this.type = options.type; this.template = options.template; this.value = options.value; this.expanded = true; this.cssclass = options.cssclass; this.hspan = options.hspan || function() { return 1; }; this.vspan = options.vspan || function() { return 1; }; this.visible = options.isvisible || function() { return true; }; } module.exports.header = function(axetype, headerType, dim, parent, datafieldscount, subtotalHeader) { var self = this; var hspan; var vspan; var value; var isRowsAxe = axetype === axe.Type.ROWS; headerType = headerType || (dim.depth === 1 ? HeaderType.INNER : HeaderType.WRAPPER); switch (headerType) { case HeaderType.GRAND_TOTAL: value = 'Grand Total'; hspan = isRowsAxe ? dim.depth - 1 || 1 : datafieldscount; vspan = isRowsAxe ? datafieldscount : dim.depth - 1 || 1; break; case HeaderType.SUB_TOTAL: value = 'Total ' + dim.value; hspan = isRowsAxe ? dim.depth : datafieldscount; vspan = isRowsAxe ? datafieldscount : dim.depth; break; default: value = dim.value; hspan = isRowsAxe ? 1 : null; vspan = isRowsAxe ? null : 1; break; } CellBase.call(this, { axetype: axetype, type: headerType, template: isRowsAxe ? 'cell-template-row-header' : 'cell-template-column-header', value: value, cssclass: HeaderType.getHeaderClass(headerType, axetype), hspan: hspan != null ? function() { return hspan; } : calcSpan, vspan: vspan != null ? function() { return vspan; } : calcSpan, isvisible: isParentExpanded }); this.subtotalHeader = subtotalHeader; this.parent = parent; this.subheaders = []; this.dim = dim; this.expanded = headerType !== HeaderType.SUB_TOTAL || !dim.field.subTotal.collapsed; this.expand = function() { self.expanded = true; }; this.collapse = function() { self.expanded = false; }; if (parent != null) { parent.subheaders.push(this); } function isParentExpanded() { if (self.type === HeaderType.SUB_TOTAL) { var hparent = self.parent; while (hparent != null) { if (hparent.subtotalHeader && !hparent.subtotalHeader.expanded) { return false; } hparent = hparent.parent; } return true; } else { var isexpanded = self.dim.isRoot || self.dim.isLeaf || !self.dim.field.subTotal.visible || self.subtotalHeader.expanded; if (!isexpanded) { return false; } var par = self.parent; while (par != null && (!par.dim.field.subTotal.visible || (par.subtotalHeader != null && par.subtotalHeader.expanded))) { par = par.parent; } return par == null || par.subtotalHeader == null ? isexpanded : par.subtotalHeader.expanded; } } function calcSpan() { var tspan = 0; var subSpan; var addone = false; if (self.visible()) { if (!self.dim.isLeaf) { // subdimvals 'own' properties are the set of values for this dimension for (var i = 0; i < self.subheaders.length; i++) { var subheader = self.subheaders[i]; // if its not an array if (!subheader.dim.isLeaf) { subSpan = isRowsAxe ? subheader.vspan() : subheader.hspan(); tspan += subSpan; if (i === 0 && (subSpan === 0 || (isRowsAxe && subheader.type === HeaderType.SUB_TOTAL && !subheader.expanded))) { addone = true; } } else { tspan += datafieldscount; } } } else { return datafieldscount; } return tspan + (addone ? 1 : 0); } return tspan; } }; module.exports.dataHeader = function(datafield, parent) { CellBase.call(this, { axetype: null, type: HeaderType.DATA_HEADER, template: 'cell-template-dataheader', value: datafield, cssclass: HeaderType.getHeaderClass(parent.type), isvisible: parent.visible }); this.parent = parent; }; module.exports.dataCell = function(pgrid, isvisible, rowinfo, colinfo) { var rowdim = rowinfo.type === HeaderType.DATA_HEADER ? rowinfo.parent.dim : rowinfo.dim; var coldim = colinfo.type === HeaderType.DATA_HEADER ? colinfo.parent.dim : colinfo.dim; var rowtype = rowinfo.type === HeaderType.DATA_HEADER ? rowinfo.parent.type : rowinfo.type; var coltype = colinfo.type === HeaderType.DATA_HEADER ? colinfo.parent.type : colinfo.type; var datafield = pgrid.config.dataFieldsCount > 1 ? (pgrid.config.dataHeadersLocation === 'rows' ? rowinfo.value : colinfo.value) : pgrid.config.dataFields[0]; CellBase.call(this, { axetype: null, type: HeaderType.DATA_VALUE, template: 'cell-template-datavalue', value: pgrid.getData(datafield ? datafield.name : null, rowdim, coldim), cssclass: 'cell ' + HeaderType.getCellClass(rowtype, coltype), isvisible: isvisible }); this.datafield = datafield; }; module.exports.buttonCell = function(field) { CellBase.call(this, { axetype: null, type: HeaderType.FIELD_BUTTON, template: 'cell-template-fieldbutton', value: field, cssclass: HeaderType.getHeaderClass(HeaderType.FIELD_BUTTON) }); }; module.exports.emptyCell = function(hspan, vspan) { CellBase.call(this, { axetype: null, type: HeaderType.EMPTY, template: 'cell-template-empty', value: null, cssclass: HeaderType.getHeaderClass(HeaderType.EMPTY), hspan: function() { return hspan; }, vspan: function() { return vspan; }, }); }; }, { "./orb.axe": 4 }], 11: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var pgrid = _dereq_('./orb.pgrid'); var uiheaders = _dereq_('./orb.ui.header'); var uirows = _dereq_('./orb.ui.rows'); var uicols = _dereq_('./orb.ui.cols'); //var React = require('react'); var OrbReactComps = _dereq_('./react/orb.react.compiled'); module.exports = function(config) { var self = this; this.pgrid = new pgrid(config); this.rows = null; this.columns = null; this.rowHeadersWidth = null; this.columnHeadersWidth = null; this.rowHeadersHeight = null; this.columnHeadersHeight = null; this.totalWidth = null; this.totalWidth = null; this.sort = function(axetype, field) { if (axetype === axe.Type.ROWS) { self.pgrid.rows.sort(field); } else if (axetype === axe.Type.COLUMNS) { self.pgrid.columns.sort(field); } else { return; } buildUi(); }; this.moveField = function(field, oldAxeType, newAxeType, position) { self.pgrid.moveField(field, oldAxeType, newAxeType, position); buildUi(); }; this.filters = null; this.cells = []; this.render = function(element) { var pivotTableFactory = React.createFactory(OrbReactComps.PivotTable); var pivottable = pivotTableFactory({ data: self, config: config }); React.render(pivottable, element); }; buildUi(); function buildUi() { // build rows and columns self.rows = new uirows(self.pgrid.rows); self.columns = new uicols(self.pgrid.columns); var rowsInfos = self.rows.uiInfos; var rowsInfoslength = rowsInfos.length; var columnsInfos = self.columns.uiInfos; var columnsInfoslength = columnsInfos.length; var columnsAllHeaders = self.columns.leafsHeaders; var columnsAllHeaderslength = columnsAllHeaders.length; // set control properties self.rowHeadersWidth = (self.pgrid.rows.fields.length || 1) + (self.pgrid.config.dataHeadersLocation === 'rows' && self.pgrid.config.dataFieldsCount > 1 ? 1 : 0); self.columnHeadersWidth = columnsAllHeaderslength; self.rowHeadersHeight = rowsInfoslength; self.columnHeadersHeight = (self.pgrid.columns.fields.length || 1) + (self.pgrid.config.dataHeadersLocation === 'columns' && self.pgrid.config.dataFieldsCount > 1 ? 1 : 0); self.totalWidth = self.rowHeadersWidth + self.columnHeadersWidth; self.totalHeight = self.rowHeadersHeight + self.columnHeadersHeight; var cells = []; setArrayLength(cells, columnsInfoslength + rowsInfoslength); function setArrayLength(arr, length) { if (arr.length !== length) { arr.length = length; return true; } return false; } var arr; for (var ci = 0; ci < columnsInfoslength; ci++) { var uiinfo = columnsInfos[ci]; var prelength = 0; arr = (cells[ci] = cells[ci] || []); if (columnsInfoslength > 1 && ci === 0) { prelength = 1; setArrayLength(arr, prelength + uiinfo.length); arr[0] = new uiheaders.emptyCell(self.rowHeadersWidth, self.columnHeadersHeight - 1); } else if (ci === columnsInfoslength - 1) { prelength = self.rowHeadersWidth; setArrayLength(arr, prelength + uiinfo.length); if (self.pgrid.rows.fields.length > 0) { for (var findex = 0; findex < self.pgrid.config.rowFields.length; findex++) { arr[findex] = new uiheaders.buttonCell(self.pgrid.config.rowFields[findex]); } } else { arr[0] = new uiheaders.emptyCell(self.rowHeadersWidth, 1); } } for (var ui = 0; ui < uiinfo.length; ui++) { arr[prelength + ui] = uiinfo[ui]; } } function createVisibleFunc(rowvisible, colvisible) { return function() { return rowvisible() && colvisible(); }; } for (var ri = 0; ri < rowsInfoslength; ri++) { var ruiinfo = rowsInfos[ri]; arr = (cells[columnsInfoslength + ri] = cells[columnsInfoslength + ri] || new Array(ruiinfo.length + columnsAllHeaderslength)); setArrayLength(arr, ruiinfo.length + columnsAllHeaderslength); for (var uri = 0; uri < ruiinfo.length; uri++) { arr[uri] = ruiinfo[uri]; } var rinfo = ruiinfo[ruiinfo.length - 1]; for (var cinfosIndex = 0; cinfosIndex < columnsAllHeaderslength; cinfosIndex++) { var cinfo = columnsAllHeaders[cinfosIndex]; var isvisible = createVisibleFunc(rinfo.visible, cinfo.visible); arr[ruiinfo.length + cinfosIndex] = new uiheaders.dataCell(self.pgrid, isvisible, rinfo, cinfo); } } self.cells = cells; } }; }, { "./orb.axe": 4, "./orb.pgrid": 7, "./orb.ui.cols": 9, "./orb.ui.header": 10, "./orb.ui.rows": 12, "./react/orb.react.compiled": 14 }], 12: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var uiheaders = _dereq_('./orb.ui.header'); module.exports = function(rowsAxe) { var self = this; this.axe = rowsAxe; this.uiInfos = []; var _multidatafields; var _datafieldscount; this.build = function() { _datafieldscount = self.axe.pgrid.config.dataHeadersLocation === 'rows' ? (self.axe.pgrid.config.dataFieldsCount || 1) : 1; _multidatafields = self.axe.pgrid.config.dataHeadersLocation === 'rows' && _datafieldscount > 1; var uiInfos = [ [] ]; if (self.axe != null) { // Fill Rows layout infos getUiInfo(uiInfos, self.axe.root); if (self.axe.pgrid.config.grandTotal.rowsvisible) { var lastrow = uiInfos[uiInfos.length - 1]; var grandtotalHeader = new uiheaders.header(axe.Type.ROWS, uiheaders.HeaderType.GRAND_TOTAL, self.axe.root, null, _datafieldscount); if (lastrow.length === 0) { lastrow.push(grandtotalHeader); } else { uiInfos.push([grandtotalHeader]); } // add grand-total data headers if more than 1 data field and they will be the leaf headers addDataHeaders(uiInfos, grandtotalHeader); } if (uiInfos[0].length === 0) { uiInfos[0].push(new uiheaders.header(axe.Type.ROWS, uiheaders.HeaderType.INNER, self.axe.root, null, _datafieldscount)); } } self.uiInfos = uiInfos; }; this.build(); function addDataHeaders(infos, parent) { if (_multidatafields) { var lastInfosArray = infos[infos.length - 1]; for (var datafieldindex = 0; datafieldindex < _datafieldscount; datafieldindex++) { lastInfosArray.push(new uiheaders.dataHeader(self.axe.pgrid.config.dataFields[datafieldindex], parent)); if (datafieldindex < _datafieldscount - 1) { infos.push((lastInfosArray = [])); } } } } function getUiInfo(infos, dimension) { if (dimension.values.length > 0) { var infosMaxIndex = infos.length - 1; var lastInfosArray = infos[infosMaxIndex]; var parent = lastInfosArray.length > 0 ? lastInfosArray[lastInfosArray.length - 1] : null; for (var valIndex = 0; valIndex < dimension.values.length; valIndex++) { var subvalue = dimension.values[valIndex]; var subdim = dimension.subdimvals[subvalue]; var subTotalHeader; if (!subdim.isLeaf && subdim.field.subTotal.visible) { subTotalHeader = new uiheaders.header(axe.Type.ROWS, uiheaders.HeaderType.SUB_TOTAL, subdim, parent, _datafieldscount); } else { subTotalHeader = null; } var newHeader = new uiheaders.header(axe.Type.ROWS, null, subdim, parent, _datafieldscount, subTotalHeader); if (valIndex > 0) { infos.push((lastInfosArray = [])); } lastInfosArray.push(newHeader); if (!subdim.isLeaf) { getUiInfo(infos, subdim); if (subdim.field.subTotal.visible) { infos.push([subTotalHeader]); // add sub-total data headers if more than 1 data field and they will be the leaf headers addDataHeaders(infos, subTotalHeader); } } else { // add data headers if more than 1 data field and they will be the leaf headers addDataHeaders(infos, newHeader); } } } } }; }, { "./orb.axe": 4, "./orb.ui.header": 10 }], 13: [function(_dereq_, module, exports) { module.exports = { ns: function(identifier, parent) { var parts = identifier.split('.'); var i = 0; parent = parent || window; while (i < parts.length) { parent[parts[i]] = parent[parts[i]] || {}; parent = parent[parts[i]]; i++; } return parent; }, ownProperties: function(obj) { var arr = []; for (var prop in obj) { if (obj.hasOwnProperty(prop)) { arr.push(prop); } } return arr; }, isArray: function(obj) { return Object.prototype.toString.apply(obj) === '[object Array]'; }, findInArray: function(array, predicate) { if (this.isArray(array) && predicate) { for (var i = 0; i < array.length; i++) { var item = array[i]; if (predicate(item)) { return item; } } } return undefined; }, jsonStringify: function(obj, censorKeywords) { function censor(key, value) { return censorKeywords && censorKeywords.indexOf(key) > -1 ? undefined : value; } return JSON.stringify(obj, censor, 2); } }; }, {}], 14: [function(_dereq_, module, exports) { var react = typeof window === 'undefined' ? _dereq_('react') : window.React; var utils = _dereq_('../orb.utils'); var axe = _dereq_('../orb.axe'); var uiheaders = _dereq_('../orb.ui.header'); var extraCol = 1; var comps = module.exports; module.exports.PivotTable = react.createClass({ getInitialState: function() { comps.DragManager.init(this); return {}; }, sort: function(axetype, field) { this.props.data.sort(axetype, field); this.setProps(this.props); }, moveButton: function(button, newAxeType, position) { this.props.data.moveField(button.props.field.name, button.props.axetype, newAxeType, position); this.setProps(this.props); }, expandRow: function(cell) { cell.expanded = true; this.setProps({}); }, collapseRow: function(cell) { cell.subtotalHeader.expanded = false; this.setProps({}); }, render: function() { var self = this; var ptc = this.props.data; var PivotButton = comps.PivotButton; var PivotRow = comps.PivotRow; var DropTarget = comps.DropTarget; var fieldButtons = ptc.pgrid.config.availablefields().map(function(field, index) { return React.createElement(PivotButton, { key: field.name, field: field, axetype: null, position: index, rootComp: self }); }); var dataButtons = ptc.pgrid.config.dataFields.map(function(field, index) { return React.createElement(PivotButton, { key: field.name, field: field, axetype: axe.Type.DATA, position: index, rootComp: self }); }); var columnButtons = ptc.pgrid.config.columnFields.map(function(field, index) { return React.createElement(PivotButton, { key: field.name, field: field, axetype: axe.Type.COLUMNS, position: index, rootComp: self }); }); // get 'row buttons' row (also last row containing column headers) var rowButtons = utils.findInArray(ptc.cells, function(row) { return row[0].template === 'cell-template-fieldbutton'; }); // build row buttons if (rowButtons !== undefined) { rowButtons = rowButtons.filter(function(buttonCell) { return buttonCell.template === 'cell-template-fieldbutton'; }).map(function(buttonCell, index) { return React.createElement(PivotButton, { key: buttonCell.value.name, field: buttonCell.value, axetype: axe.Type.ROWS, position: index, rootComp: self }); }); } else { rowButtons = []; } // build the cell that will contains 'row buttons' var rowButtonsCell = React.createElement("td", { className: "empty", colSpan: ptc.rowHeadersWidth + extraCol, rowSpan: "1" }, React.createElement(DropTarget, { data: rowButtons, axetype: axe.Type.ROWS }) ); var rows = ptc.cells.map(function(row, index) { if (index == ptc.columnHeadersHeight - 1) { return React.createElement(PivotRow, { key: index, row: row, rowButtonsCount: ptc.rowHeadersWidth, rowButtonsCell: rowButtonsCell, rootComp: self }); } else { return React.createElement(PivotRow, { key: index, row: row, rootComp: self }); } }); var tblStyle = {}; if (this.props.config.width) { tblStyle.width = this.props.config.width; } if (this.props.config.height) { tblStyle.height = this.props.config.height; } return ( React.createElement("div", { className: "orb-container", style: tblStyle }, React.createElement("table", { id: "tbl", className: "orb", style: { width: '100%' } }, React.createElement("tbody", null, React.createElement("tr", null, React.createElement("td", { className: "available-fields field-group", colSpan: extraCol, rowSpan: "1" }, React.createElement("div", { className: "field-group-caption" }, "Fields:") ), React.createElement("td", { className: "available-fields", colSpan: ptc.totalWidth, rowSpan: "1" }, React.createElement(DropTarget, { data: fieldButtons, axetype: null }) ) ), React.createElement("tr", null, React.createElement("td", { className: "field-group", colSpan: extraCol, rowSpan: "1" }, React.createElement("div", { className: "field-group-caption" }, "Data fields:") ), React.createElement("td", { className: "empty", colSpan: ptc.totalWidth, rowSpan: "1" }, React.createElement(DropTarget, { data: dataButtons, axetype: axe.Type.DATA }) ) ), React.createElement("tr", null, React.createElement("td", { className: "empty", colSpan: ptc.rowHeadersWidth + extraCol, rowSpan: "1" }), React.createElement("td", { className: "empty", colSpan: ptc.columnHeadersWidth, rowSpan: "1" }, React.createElement(DropTarget, { data: columnButtons, axetype: axe.Type.COLUMNS }) ) ), rows ) ) ) ); } }); module.exports.PivotRow = react.createClass({ render: function() { var self = this; var PivotCell = comps.PivotCell; var lastCellIndex = this.props.row.length - 1; var cell0 = this.props.row[0]; var cells; var rowstyle = {}; if (this.props.rowButtonsCell !== undefined) { cells = this.props.row.slice(this.props.rowButtonsCount).map(function(cell, index) { var isrightmost = index === (lastCellIndex - self.props.rowButtonsCount); return React.createElement(PivotCell, { key: index, cell: cell, rightmost: isrightmost, leftmost: false, rootComp: self.props.rootComp }); }); return ( React.createElement("tr", null, this.props.rowButtonsCell, cells ) ); } else { if (cell0.template == 'cell-template-row-header' && cell0.visible && !cell0.visible()) { rowstyle.display = 'none'; } cells = this.props.row.map(function(cell, index) { var isrightmost = index === lastCellIndex; var isleftmost = index === 0 && ( cell.type === uiheaders.HeaderType.EMPTY || (cell.type === uiheaders.HeaderType.SUB_TOTAL && cell.dim.parent.isRoot) || cell.type === uiheaders.HeaderType.GRAND_TOTAL || (cell.dim && (cell.dim.isRoot || cell.dim.parent.isRoot)) ); return React.createElement(PivotCell, { key: index, cell: cell, rightmost: isrightmost, leftmost: isleftmost, rootComp: self.props.rootComp }); }); return ( React.createElement("tr", { style: rowstyle }, cells ) ); } } }); module.exports.PivotCell = react.createClass({ expand: function() { this.props.rootComp.expandRow(this.props.cell); }, collapse: function() { this.props.rootComp.collapseRow(this.props.cell); }, render: function() { var cell = this.props.cell; var divcontent = []; var value; var vArrow = '\u25bc'; var hArrow = '\u25b6'; switch (cell.template) { case 'cell-template-row-header': case 'cell-template-column-header': if (cell.type === uiheaders.HeaderType.WRAPPER && cell.dim.field.subTotal.visible && cell.dim.field.subTotal.collapsible && cell.subtotalHeader.expanded) { divcontent.push(React.createElement("span", { key: "toggle-button", className: "toggle-button", onClick: this.collapse }, vArrow)); } else if (cell.type === uiheaders.HeaderType.SUB_TOTAL && !cell.expanded) { divcontent.push(React.createElement("span", { key: "toggle-button", className: "toggle-button", onClick: this.expand }, hArrow)); } value = cell.value; break; case 'cell-template-dataheader': value = cell.value.caption; break; case 'cell-template-datavalue': value = (cell.datafield && cell.datafield.formatFunc) ? cell.datafield.formatFunc()(cell.value) : cell.value; break; default: break; } divcontent.push(React.createElement("span", { key: "cell-value", style: { whiteSpace: 'nowrap' } }, value)); var classname = cell.cssclass; var isHidden = !cell.visible(); if (isHidden || this.props.rightmost || this.props.leftmost) { if (isHidden) { classname += ' cell-hidden'; } if (this.props.rightmost && (cell.axetype !== axe.Type.COLUMNS || cell.type === uiheaders.HeaderType.GRAND_TOTAL)) { classname += ' cell-rightmost'; } if (this.props.leftmost) { classname += ' cell-leftmost'; } } return React.createElement("td", { className: classname, colSpan: cell.hspan() + (this.props.leftmost ? extraCol : 0), rowSpan: cell.vspan() }, React.createElement("div", null, divcontent ) ); } }); function forEach(list, func, defStop) { var ret; if (list != null) { for (var i = 0, l = list.length; i < l; i++) { ret = func(list[i], i); if (ret !== undefined && defStop === true) { break; } } } return ret; } var dragManager = module.exports.DragManager = (function() { var _pivotComp = null; var _dragElement = null; var _dragNode = null; var _dropTargets = []; var _dropIndicators = []; function doElementsOverlap(elem1Rect, elem2Rect) { return !(elem1Rect.right < elem2Rect.left || elem1Rect.left > elem2Rect.right || elem1Rect.bottom < elem2Rect.top || elem1Rect.top > elem2Rect.bottom); } function signalDragOver(target) { if (target.onDragOver) { target.onDragOver(_dragElement); return true; } return false; } function signalDragEnd(target) { if (target.onDragEnd) { target.onDragEnd(); return true; } return false; } function getDropTarget() { return forEach(_dropTargets, function(target) { if (target.component.state.isover) { return target; } }, true); } function getDropIndicator() { return forEach(_dropIndicators, function(indicator) { if (indicator.component.state.isover) { return indicator; } }, true); } var _initialized = false; return { init: function(pivotComp) { _initialized = true; _pivotComp = pivotComp; }, dragElement: function(elem) { var prevDragElement = _dragElement; _dragElement = elem; if (_dragElement != prevDragElement) { if (elem == null) { // Drop Target var dropTarget = getDropTarget(); // Drop Indicator var dropIndicator = getDropIndicator(); if (dropTarget) { var position = dropIndicator != null ? dropIndicator.position : null; _pivotComp.moveButton(prevDragElement, dropTarget.component.props.axetype, position); } _dragNode = null; forEach(_dropTargets, function(target) { signalDragEnd(target); }); forEach(_dropIndicators, function(indicator) { signalDragEnd(indicator); }); } else { _dragNode = _dragElement.getDOMNode(); } } }, registerTarget: function(target, axetype, dragOverHandler, dargEndHandler) { _dropTargets.push({ component: target, axetype: axetype, onDragOver: dragOverHandler, onDragEnd: dargEndHandler }); }, unregisterTarget: function(target) { var tindex; for (var i = 0; i < _dropTargets.length; i++) { if (_dropTargets[i].component == target) { tindex = i; break; } } if (tindex != null) { _dropTargets.splice(tindex, 1); } }, registerIndicator: function(indicator, axetype, position, dragOverHandler, dargEndHandler) { _dropIndicators.push({ component: indicator, axetype: axetype, position: position, onDragOver: dragOverHandler, onDragEnd: dargEndHandler }); }, unregisterIndicator: function(indicator) { var iindex; for (var i = 0; i < _dropIndicators.length; i++) { if (_dropIndicators[i].component == indicator) { iindex = i; break; } } if (iindex != null) { _dropIndicators.splice(iindex, 1); } }, elementMoved: function() { if (_dragElement != null) { var dragNodeRect = _dragNode.getBoundingClientRect(); var foundTarget; forEach(_dropTargets, function(target) { if (!foundTarget) { var tnodeRect = target.component.getDOMNode().getBoundingClientRect(); var isOverlap = doElementsOverlap(dragNodeRect, tnodeRect); if (isOverlap && signalDragOver(target)) { foundTarget = target; return true; } else { signalDragEnd(target); } } }, true); var foundIndicator; if (foundTarget) { forEach(_dropIndicators, function(indicator, index) { if (!foundIndicator) { var elementOwnIndicator = indicator.component.props.axetype === _dragElement.props.axetype && indicator.component.props.position === _dragElement.props.position; var targetIndicator = indicator.component.props.axetype === foundTarget.component.props.axetype; if (targetIndicator && !elementOwnIndicator) { var tnodeRect = indicator.component.getDOMNode().getBoundingClientRect(); var isOverlap = doElementsOverlap(dragNodeRect, tnodeRect); if (isOverlap && signalDragOver(indicator)) { foundIndicator = indicator; return; } } } signalDragEnd(indicator); }); if (!foundIndicator) { var axeIndicators = _dropIndicators.filter(function(indicator) { return indicator.component.props.axetype === foundTarget.component.props.axetype; }); if (axeIndicators.length > 0) { signalDragOver(axeIndicators[axeIndicators.length - 1]); } } } else { forEach(_dropIndicators, function(indicator, index) { signalDragEnd(indicator); }); } } } }; }()); var dtid = 0; module.exports.DropTarget = react.createClass({ getInitialState: function() { this.dtid = ++dtid; // initial state, all zero. dragManager.registerTarget(this, this.props.axetype, this.onDragOver, this.onDragEnd); return { isover: false }; }, componentWillUnmount: function() { dragManager.unregisterTarget(this); }, onDragOver: function(component) { this.setState({ isover: true }); }, onDragEnd: function() { this.setState({ isover: false }); }, render: function() { var self = this; var DropIndicator = module.exports.DropIndicator; var buttons = this.props.data.map(function(button, index) { if (index < self.props.data.length - 1) { return [ React.createElement(DropIndicator, { isFirst: index === 0, position: index, axetype: self.props.axetype }), button ]; } else { return [ React.createElement(DropIndicator, { isFirst: index === 0, position: index, axetype: self.props.axetype }), button, React.createElement(DropIndicator, { isLast: true, position: null, axetype: self.props.axetype }) ]; } }); return React.createElement("div", { className: 'drop-target' + (this.state.isover ? ' drag-over' : '') }, buttons ); } }); function getOffset(element) { if (element != null) { var rect = element.getBoundingClientRect(); return { x: rect.left + 0, y: rect.top + 0 }; } return { x: 0, y: 0 }; } function getSize(element) { if (element != null) { var rect = element.getBoundingClientRect(); return { width: rect.right - rect.left, height: rect.bottom - rect.top }; } return { x: 0, y: 0 }; } module.exports.DropIndicator = react.createClass({ displayName: 'DropIndicator', getInitialState: function() { dragManager.registerIndicator(this, this.props.axetype, this.props.position, this.onDragOver, this.onDragEnd); return { isover: false }; }, componentWillUnmount: function() { dragManager.unregisterIndicator(this); }, onDragOver: function(component) { this.setState({ isover: true, width: component.getDOMNode().style.width }); }, onDragEnd: function() { this.setState({ isover: false, width: null }); }, render: function() { var classname = 'drop-indicator'; if (this.props.isFirst) { classname += ' drop-indicator-first'; } if (this.props.isLast) { classname += ' drop-indicator-last'; } var style = {}; if (this.state.isover) { classname += ' drop-indicator-drag-over'; } return React.createElement("div", { style: style, className: classname }); } }); var pbid = 0; module.exports.PivotButton = react.createClass({ displayName: 'PivotButton', getInitialState: function() { this.pbid = ++pbid; // initial state, all zero. return { pos: { x: 0, y: 0 }, startpos: { x: 0, y: 0 }, mousedown: false, dragging: false }; }, onMouseDown: function(e) { // drag/sort with left mouse button if (e.button !== 0) return; var thispos = getOffset(this.getDOMNode()); // inform mousedown, save start pos this.setState({ mousedown: true, mouseoffset: { x: thispos.x - e.pageX, y: thispos.y - e.pageY, }, startpos: { x: e.pageX, y: e.pageY } }); // prevent event bubbling (to prevent text selection while dragging for example) e.stopPropagation(); e.preventDefault(); }, componentDidUpdate: function() { if (!this.state.mousedown) { // mouse not down, don't care about mouse up/move events. dragManager.dragElement(null); document.removeEventListener('mousemove', this.onMouseMove); document.removeEventListener('mouseup', this.onMouseUp); } else if (this.state.mousedown) { // mouse down, interested by mouse up/move events. dragManager.dragElement(this); document.addEventListener('mousemove', this.onMouseMove); document.addEventListener('mouseup', this.onMouseUp); } }, componentWillUnmount: function() { document.removeEventListener('mousemove', this.onMouseMove); document.removeEventListener('mouseup', this.onMouseUp); }, onMouseUp: function() { var wasdragging = this.state.dragging; this.setState({ mousedown: false, dragging: false, size: null, pos: { x: 0, y: 0 } }); // if button was not dragged, proceed as a click if (!wasdragging) { this.props.rootComp.sort(this.props.axetype, this.props.field); } }, onMouseMove: function(e) { // if the mouse is not down while moving, return (no drag) if (!this.state.mousedown) return; var size = null; if (!this.state.dragging) { size = getSize(this.getDOMNode()); } else { size = this.state.size; } var newpos = { x: e.pageX + this.state.mouseoffset.x, y: e.pageY + this.state.mouseoffset.y }; this.setState({ dragging: true, size: size, pos: newpos }); dragManager.elementMoved(); e.stopPropagation(); e.preventDefault(); }, render: function() { var self = this; var divstyle = { left: self.state.pos.x + 'px', top: self.state.pos.y + 'px', position: self.state.dragging ? 'fixed' : '' }; if (self.state.size) { divstyle.width = self.state.size.width + 'px'; } var DropIndicator = module.exports.DropIndicator; var sortIndicator = self.props.field.sort.order === 'asc' ? ' \u25B3' : (self.props.field.sort.order === 'desc' ? ' \u25BD' : ''); return React.createElement("div", { key: self.props.field.name, className: "field-button", onMouseDown: this.onMouseDown, style: divstyle }, self.props.field.caption, React.createElement("span", null, sortIndicator) ); } }); }, { "../orb.axe": 4, "../orb.ui.header": 10, "../orb.utils": 13, "react": 2 }] }, {}, [1])(1) });
Realization/frontend/czechidm-core/src/components/basic/Table/DateCell.js
bcvsolutions/CzechIdMng
import React from 'react'; import moment from 'moment'; // import DefaultCell from './DefaultCell'; /** * Renders cell with date content. * Parametrs are automatically propagated from table / row / column. * * @param number rowIndex * @param array[json] input data * @param property column key * @param props other optional properties * * @author Radek Tomiška */ const DateCell = ({ rowIndex, data, property, format, ...props }) => { const propertyValue = DefaultCell.getPropertyValue(data[rowIndex], property); // return ( <DefaultCell { ...props }> { propertyValue ? moment(propertyValue).format(format) : null } </DefaultCell> ); }; export default DateCell;
ajax/libs/yasgui/1.0.7/yasgui.bundled.min.js
quba/cdnjs
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.YASGUI=e()}}(function(){var e;return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t){t.exports=e("./main.js")},{"./main.js":98}],2:[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 s(e){return void 0===e}t.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)||0>e||isNaN(e))throw TypeError("n must be a positive number");this._maxListeners=e;return this};n.prototype.emit=function(e){var t,n,i,a,l,u;this._events||(this._events={});if("error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){t=arguments[1];if(t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}n=this._events[e];if(s(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:i=arguments.length;a=new Array(i-1);for(l=1;i>l;l++)a[l-1]=arguments[l];n.apply(this,a)}else if(o(n)){i=arguments.length;a=new Array(i-1);for(l=1;i>l;l++)a[l-1]=arguments[l];u=n.slice();i=u.length;for(l=0;i>l;l++)u[l].apply(this,a)}return!0};n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");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;if(o(this._events[e])&&!this._events[e].warned){var i;i=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners;if(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()}}return this};n.prototype.on=n.prototype.addListener;n.prototype.once=function(e,t){function n(){this.removeListener(e,n);if(!i){i=!0;t.apply(this,arguments)}}if(!r(t))throw TypeError("listener must be a function");var i=!1;n.listener=t;this.on(e,n);return this};n.prototype.removeListener=function(e,t){var n,i,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e];s=n.length;i=-1;if(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(a=s;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(0>i)return this;if(1===n.length){n.length=0;delete this._events[e]}else 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){0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this}if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener");this._events={};return this}n=this._events[e];if(r(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);delete this._events[e];return this};n.prototype.listeners=function(e){var t;t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[];return t};n.listenerCount=function(e,t){var n;n=e._events&&e._events[t]?r(e._events[t])?1:e._events[t].length:0;return n}},{}],3:[function(e){var t=e("jquery");(function(e,t){function n(e,t,n){return[parseFloat(e[0])*(f.test(e[0])?t/100:1),parseFloat(e[1])*(f.test(e[1])?n/100:1)]}function r(t,n){return parseInt(e.css(t,n),10)||0}function i(t){var n=t[0];return 9===n.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var o,s=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,p=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,f=/%$/,h=e.fn.position;e.position={scrollbarWidth:function(){if(o!==t)return o;var n,r,i=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=i.children()[0];e("body").append(i);n=s.offsetWidth;i.css("overflow","scroll");r=s.offsetWidth;n===r&&(r=i[0].clientWidth);i.remove();return o=n-r},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),r=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth,o="scroll"===r||"auto"===r&&t.height<t.element[0].scrollHeight;return{width:o?e.position.scrollbarWidth():0,height:i?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),r=e.isWindow(n[0]),i=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:r,isDocument:i,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:r?n.width():n.outerWidth(),height:r?n.height():n.outerHeight()}}};e.fn.position=function(t){if(!t||!t.of)return h.apply(this,arguments);t=e.extend({},t);var o,f,g,m,v,E,y=e(t.of),x=e.position.getWithinInfo(t.within),b=e.position.getScrollInfo(x),T=(t.collision||"flip").split(" "),S={};E=i(y);y[0].preventDefault&&(t.at="left top");f=E.width;g=E.height;m=E.offset;v=e.extend({},m);e.each(["my","at"],function(){var e,n,r=(t[this]||"").split(" ");1===r.length&&(r=u.test(r[0])?r.concat(["center"]):c.test(r[0])?["center"].concat(r):["center","center"]);r[0]=u.test(r[0])?r[0]:"center";r[1]=c.test(r[1])?r[1]:"center";e=p.exec(r[0]);n=p.exec(r[1]);S[this]=[e?e[0]:0,n?n[0]:0];t[this]=[d.exec(r[0])[0],d.exec(r[1])[0]]});1===T.length&&(T[1]=T[0]);"right"===t.at[0]?v.left+=f:"center"===t.at[0]&&(v.left+=f/2);"bottom"===t.at[1]?v.top+=g:"center"===t.at[1]&&(v.top+=g/2);o=n(S.at,f,g);v.left+=o[0];v.top+=o[1];return this.each(function(){var i,u,c=e(this),p=c.outerWidth(),d=c.outerHeight(),h=r(this,"marginLeft"),E=r(this,"marginTop"),N=p+h+r(this,"marginRight")+b.width,C=d+E+r(this,"marginBottom")+b.height,L=e.extend({},v),A=n(S.my,c.outerWidth(),c.outerHeight());"right"===t.my[0]?L.left-=p:"center"===t.my[0]&&(L.left-=p/2);"bottom"===t.my[1]?L.top-=d:"center"===t.my[1]&&(L.top-=d/2);L.left+=A[0];L.top+=A[1];if(!e.support.offsetFractions){L.left=l(L.left);L.top=l(L.top)}i={marginLeft:h,marginTop:E};e.each(["left","top"],function(n,r){e.ui.position[T[n]]&&e.ui.position[T[n]][r](L,{targetWidth:f,targetHeight:g,elemWidth:p,elemHeight:d,collisionPosition:i,collisionWidth:N,collisionHeight:C,offset:[o[0]+A[0],o[1]+A[1]],my:t.my,at:t.at,within:x,elem:c})});t.using&&(u=function(e){var n=m.left-L.left,r=n+f-p,i=m.top-L.top,o=i+g-d,l={target:{element:y,left:m.left,top:m.top,width:f,height:g},element:{element:c,left:L.left,top:L.top,width:p,height:d},horizontal:0>r?"left":n>0?"right":"center",vertical:0>o?"top":i>0?"bottom":"middle"};p>f&&a(n+r)<f&&(l.horizontal="center");d>g&&a(i+o)<g&&(l.vertical="middle");l.important=s(a(n),a(r))>s(a(i),a(o))?"horizontal":"vertical";t.using.call(this,e,l)});c.offset(e.extend(L,{using:u}))})};e.ui.position={fit:{left:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollLeft:r.offset.left,o=r.width,a=e.left-t.collisionPosition.marginLeft,l=i-a,u=a+t.collisionWidth-o-i;if(t.collisionWidth>o)if(l>0&&0>=u){n=e.left+l+t.collisionWidth-o-i;e.left+=l-n}else e.left=u>0&&0>=l?i:l>u?i+o-t.collisionWidth:i;else l>0?e.left+=l:u>0?e.left-=u:e.left=s(e.left-a,e.left)},top:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollTop:r.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,l=i-a,u=a+t.collisionHeight-o-i;if(t.collisionHeight>o)if(l>0&&0>=u){n=e.top+l+t.collisionHeight-o-i;e.top+=l-n}else e.top=u>0&&0>=l?i:l>u?i+o-t.collisionHeight:i;else l>0?e.top+=l:u>0?e.top-=u:e.top=s(e.top-a,e.top)}},flip:{left:function(e,t){var n,r,i=t.within,o=i.offset.left+i.scrollLeft,s=i.width,l=i.isWindow?i.scrollLeft:i.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,p=u+t.collisionWidth-s-l,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,f="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,h=-2*t.offset[0];if(0>c){n=e.left+d+f+h+t.collisionWidth-s-o;(0>n||n<a(c))&&(e.left+=d+f+h)}else if(p>0){r=e.left-t.collisionPosition.marginLeft+d+f+h-l;(r>0||a(r)<p)&&(e.left+=d+f+h)}},top:function(e,t){var n,r,i=t.within,o=i.offset.top+i.scrollTop,s=i.height,l=i.isWindow?i.scrollTop:i.offset.top,u=e.top-t.collisionPosition.marginTop,c=u-l,p=u+t.collisionHeight-s-l,d="top"===t.my[1],f=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,h="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,g=-2*t.offset[1];if(0>c){r=e.top+f+h+g+t.collisionHeight-s-o;e.top+f+h+g>c&&(0>r||r<a(c))&&(e.top+=f+h+g)}else if(p>0){n=e.top-t.collisionPosition.marginTop+f+h+g-l;e.top+f+h+g>p&&(n>0||a(n)<p)&&(e.top+=f+h+g)}}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments);e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments);e.ui.position.fit.top.apply(this,arguments)}}};(function(){var t,n,r,i,o,s=document.getElementsByTagName("body")[0],a=document.createElement("div");t=document.createElement(s?"div":"body");r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};s&&e.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in r)t.style[o]=r[o];t.appendChild(a);n=s||document.documentElement;n.insertBefore(t,n.firstChild);a.style.cssText="position: absolute; left: 10.7432222px;";i=e(a).offset().left;e.support.offsetFractions=i>10&&11>i;t.innerHTML="";n.removeChild(t)})()})(t)},{jquery:4}],4:[function(t,n){(function(e,t){"object"==typeof n&&"object"==typeof n.exports?n.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)})("undefined"!=typeof window?window:this,function(t,n){function r(e){var t=e.length,n=ot.type(e);return"function"===n||ot.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(ot.isFunction(t))return ot.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ot.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ft.test(t))return ot.filter(t,e,n);t=ot.filter(t,e)}return ot.grep(e,function(e){return ot.inArray(e,t)>=0!==n})}function o(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function s(e){var t=bt[e]={};ot.each(e.match(xt)||[],function(e,n){t[n]=!0});return t}function a(){if(gt.addEventListener){gt.removeEventListener("DOMContentLoaded",l,!1);t.removeEventListener("load",l,!1)}else{gt.detachEvent("onreadystatechange",l);t.detachEvent("onload",l)}}function l(){if(gt.addEventListener||"load"===event.type||"complete"===gt.readyState){a();ot.ready()}}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(Lt,"-$1").toLowerCase();n=e.getAttribute(r);if("string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Ct.test(n)?ot.parseJSON(n):n}catch(i){}ot.data(e,t,n)}else n=void 0}return n}function c(e){var t;for(t in e)if(("data"!==t||!ot.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function p(e,t,n,r){if(ot.acceptData(e)){var i,o,s=ot.expando,a=e.nodeType,l=a?ot.cache:e,u=a?e[s]:e[s]&&s;if(u&&l[u]&&(r||l[u].data)||void 0!==n||"string"!=typeof t){u||(u=a?e[s]=K.pop()||ot.guid++:s);l[u]||(l[u]=a?{}:{toJSON:ot.noop});("object"==typeof t||"function"==typeof t)&&(r?l[u]=ot.extend(l[u],t):l[u].data=ot.extend(l[u].data,t));o=l[u];if(!r){o.data||(o.data={});o=o.data}void 0!==n&&(o[ot.camelCase(t)]=n);if("string"==typeof t){i=o[t];null==i&&(i=o[ot.camelCase(t)])}else i=o;return i}}}function d(e,t,n){if(ot.acceptData(e)){var r,i,o=e.nodeType,s=o?ot.cache:e,a=o?e[ot.expando]:ot.expando;if(s[a]){if(t){r=n?s[a]:s[a].data;if(r){if(ot.isArray(t))t=t.concat(ot.map(t,ot.camelCase));else if(t in r)t=[t];else{t=ot.camelCase(t);t=t in r?[t]:t.split(" ")}i=t.length;for(;i--;)delete r[t[i]];if(n?!c(r):!ot.isEmptyObject(r))return}}if(!n){delete s[a].data;if(!c(s[a]))return}o?ot.cleanData([e],!0):rt.deleteExpando||s!=s.window?delete s[a]:s[a]=null}}}function f(){return!0}function h(){return!1}function g(){try{return gt.activeElement}catch(e){}}function m(e){var t=Mt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function v(e,t){var n,r,i=0,o=typeof e.getElementsByTagName!==Nt?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==Nt?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||ot.nodeName(r,t)?o.push(r):ot.merge(o,v(r,t));return void 0===t||t&&ot.nodeName(e,t)?ot.merge([e],o):o}function E(e){Ot.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return ot.nodeName(e,"table")&&ot.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function x(e){e.type=(null!==ot.find.attr(e,"type"))+"/"+e.type;return e}function b(e){var t=Xt.exec(e.type);t?e.type=t[1]:e.removeAttribute("type");return e}function T(e,t){for(var n,r=0;null!=(n=e[r]);r++)ot._data(n,"globalEval",!t||ot._data(t[r],"globalEval"))}function S(e,t){if(1===t.nodeType&&ot.hasData(e)){var n,r,i,o=ot._data(e),s=ot._data(t,o),a=o.events;if(a){delete s.handle;s.events={};for(n in a)for(r=0,i=a[n].length;i>r;r++)ot.event.add(t,n,a[n][r])}s.data&&(s.data=ot.extend({},s.data))}}function N(e,t){var n,r,i;if(1===t.nodeType){n=t.nodeName.toLowerCase();if(!rt.noCloneEvent&&t[ot.expando]){i=ot._data(t);for(r in i.events)ot.removeEvent(t,r,i.handle);t.removeAttribute(ot.expando)}if("script"===n&&t.text!==e.text){x(t).text=e.text;b(t)}else if("object"===n){t.parentNode&&(t.outerHTML=e.outerHTML);rt.html5Clone&&e.innerHTML&&!ot.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)}else if("input"===n&&Ot.test(e.type)){t.defaultChecked=t.checked=e.checked;t.value!==e.value&&(t.value=e.value)}else"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function C(e,n){var r,i=ot(n.createElement(e)).appendTo(n.body),o=t.getDefaultComputedStyle&&(r=t.getDefaultComputedStyle(i[0]))?r.display:ot.css(i[0],"display");i.detach();return o}function L(e){var t=gt,n=en[e];if(!n){n=C(e,t);if("none"===n||!n){Zt=(Zt||ot("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement);t=(Zt[0].contentWindow||Zt[0].contentDocument).document;t.write();t.close();n=C(e,t);Zt.detach()}en[e]=n}return n}function A(e,t){return{get:function(){var n=e();if(null!=n){if(!n)return(this.get=t).apply(this,arguments);delete this.get}}}}function I(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=hn.length;i--;){t=hn[i]+n;if(t in e)return t}return r}function w(e,t){for(var n,r,i,o=[],s=0,a=e.length;a>s;s++){r=e[s];if(r.style){o[s]=ot._data(r,"olddisplay");n=r.style.display;if(t){o[s]||"none"!==n||(r.style.display="");""===r.style.display&&wt(r)&&(o[s]=ot._data(r,"olddisplay",L(r.nodeName)))}else{i=wt(r);(n&&"none"!==n||!i)&&ot._data(r,"olddisplay",i?n:ot.css(r,"display"))}}}for(s=0;a>s;s++){r=e[s];r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"))}return e}function R(e,t,n){var r=cn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function O(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;4>o;o+=2){"margin"===n&&(s+=ot.css(e,n+It[o],!0,i));if(r){"content"===n&&(s-=ot.css(e,"padding"+It[o],!0,i));"margin"!==n&&(s-=ot.css(e,"border"+It[o]+"Width",!0,i))}else{s+=ot.css(e,"padding"+It[o],!0,i);"padding"!==n&&(s+=ot.css(e,"border"+It[o]+"Width",!0,i))}}return s}function _(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=tn(e),s=rt.boxSizing&&"border-box"===ot.css(e,"boxSizing",!1,o);if(0>=i||null==i){i=nn(e,t,o);(0>i||null==i)&&(i=e.style[t]);if(on.test(i))return i;r=s&&(rt.boxSizingReliable()||i===e.style[t]);i=parseFloat(i)||0}return i+O(e,t,n||(s?"border":"content"),r,o)+"px"}function D(e,t,n,r,i){return new D.prototype.init(e,t,n,r,i)}function k(){setTimeout(function(){gn=void 0});return gn=ot.now()}function F(e,t){var n,r={height:e},i=0;t=t?1:0;for(;4>i;i+=2-t){n=It[i];r["margin"+n]=r["padding"+n]=e}t&&(r.opacity=r.width=e);return r}function P(e,t,n){for(var r,i=(bn[t]||[]).concat(bn["*"]),o=0,s=i.length;s>o;o++)if(r=i[o].call(n,t,e))return r}function M(e,t,n){var r,i,o,s,a,l,u,c,p=this,d={},f=e.style,h=e.nodeType&&wt(e),g=ot._data(e,"fxshow");if(!n.queue){a=ot._queueHooks(e,"fx");if(null==a.unqueued){a.unqueued=0;l=a.empty.fire;a.empty.fire=function(){a.unqueued||l()}}a.unqueued++;p.always(function(){p.always(function(){a.unqueued--;ot.queue(e,"fx").length||a.empty.fire()})})}if(1===e.nodeType&&("height"in t||"width"in t)){n.overflow=[f.overflow,f.overflowX,f.overflowY];u=ot.css(e,"display");c="none"===u?ot._data(e,"olddisplay")||L(e.nodeName):u;"inline"===c&&"none"===ot.css(e,"float")&&(rt.inlineBlockNeedsLayout&&"inline"!==L(e.nodeName)?f.zoom=1:f.display="inline-block")}if(n.overflow){f.overflow="hidden";rt.shrinkWrapBlocks()||p.always(function(){f.overflow=n.overflow[0];f.overflowX=n.overflow[1];f.overflowY=n.overflow[2]})}for(r in t){i=t[r];if(vn.exec(i)){delete t[r];o=o||"toggle"===i;if(i===(h?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;h=!0}d[r]=g&&g[r]||ot.style(e,r)}else u=void 0}if(ot.isEmptyObject(d))"inline"===("none"===u?L(e.nodeName):u)&&(f.display=u);else{g?"hidden"in g&&(h=g.hidden):g=ot._data(e,"fxshow",{});o&&(g.hidden=!h);h?ot(e).show():p.done(function(){ot(e).hide()});p.done(function(){var t;ot._removeData(e,"fxshow");for(t in d)ot.style(e,t,d[t])});for(r in d){s=P(h?g[r]:0,r,p);if(!(r in g)){g[r]=s.start;if(h){s.end=s.start;s.start="width"===r||"height"===r?1:0}}}}}function j(e,t){var n,r,i,o,s;for(n in e){r=ot.camelCase(n);i=t[r];o=e[n];if(ot.isArray(o)){i=o[1];o=e[n]=o[0]}if(n!==r){e[r]=o;delete e[n]}s=ot.cssHooks[r];if(s&&"expand"in s){o=s.expand(o);delete e[r];for(n in o)if(!(n in e)){e[n]=o[n];t[n]=i}}else t[r]=i}}function G(e,t,n){var r,i,o=0,s=xn.length,a=ot.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=gn||k(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,s=0,l=u.tweens.length;l>s;s++)u.tweens[s].run(o);a.notifyWith(e,[u,o,n]);if(1>o&&l)return n;a.resolveWith(e,[u]);return!1},u=a.promise({elem:e,props:ot.extend({},t),opts:ot.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:gn||k(),duration:n.duration,tweens:[],createTween:function(t,n){var r=ot.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);u.tweens.push(r);return r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;i=!0;for(;r>n;n++)u.tweens[n].run(1);t?a.resolveWith(e,[u,t]):a.rejectWith(e,[u,t]);return this}}),c=u.props;j(c,u.opts.specialEasing);for(;s>o;o++){r=xn[o].call(u,e,c,u.opts);if(r)return r}ot.map(c,P,u);ot.isFunction(u.opts.start)&&u.opts.start.call(e,u);ot.fx.timer(ot.extend(l,{elem:e,anim:u,queue:u.opts.queue}));return u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function B(e){return function(t,n){if("string"!=typeof t){n=t;t="*"}var r,i=0,o=t.toLowerCase().match(xt)||[];if(ot.isFunction(n))for(;r=o[i++];)if("+"===r.charAt(0)){r=r.slice(1)||"*";(e[r]=e[r]||[]).unshift(n)}else(e[r]=e[r]||[]).push(n)}}function U(e,t,n,r){function i(a){var l;o[a]=!0;ot.each(e[a]||[],function(e,a){var u=a(t,n,r);if("string"==typeof u&&!s&&!o[u]){t.dataTypes.unshift(u);i(u);return!1}return s?!(l=u):void 0});return l}var o={},s=e===Wn;return i(t.dataTypes[0])||!o["*"]&&i("*")}function q(e,t){var n,r,i=ot.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);n&&ot.extend(!0,e,n);return e}function H(e,t,n){for(var r,i,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];){l.shift();void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"))}if(i)for(s in a)if(a[s]&&a[s].test(i)){l.unshift(s);break}if(l[0]in n)o=l[0];else{for(s in n){if(!l[0]||e.converters[s+" "+l[0]]){o=s;break}r||(r=s)}o=o||r}if(o){o!==l[0]&&l.unshift(o);return n[o]}}function V(e,t,n,r){var i,o,s,a,l,u={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];o=c.shift();for(;o;){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)if("*"===o)o=l;else if("*"!==l&&l!==o){s=u[l+" "+o]||u["* "+o];if(!s)for(i in u){a=i.split(" ");if(a[1]===o){s=u[l+" "+a[0]]||u["* "+a[0]];if(s){if(s===!0)s=u[i];else if(u[i]!==!0){o=a[0];c.unshift(a[1])}break}}}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(p){return{state:"parsererror",error:s?p:"No conversion from "+l+" to "+o}}}}return{state:"success",data:t}}function W(e,t,n,r){var i;if(ot.isArray(t))ot.each(t,function(t,i){n||Kn.test(e)?r(e,i):W(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==ot.type(t))r(e,t);else for(i in t)W(e+"["+i+"]",t[i],n,r)}function z(){try{return new t.XMLHttpRequest}catch(e){}}function $(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function X(e){return ot.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var K=[],Y=K.slice,Q=K.concat,J=K.push,Z=K.indexOf,et={},tt=et.toString,nt=et.hasOwnProperty,rt={},it="1.11.2",ot=function(e,t){return new ot.fn.init(e,t)},st=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,at=/^-ms-/,lt=/-([\da-z])/gi,ut=function(e,t){return t.toUpperCase()};ot.fn=ot.prototype={jquery:it,constructor:ot,selector:"",length:0,toArray:function(){return Y.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:Y.call(this)},pushStack:function(e){var t=ot.merge(this.constructor(),e);t.prevObject=this;t.context=this.context;return t},each:function(e,t){return ot.each(this,e,t)},map:function(e){return this.pushStack(ot.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:J,sort:K.sort,splice:K.splice};ot.extend=ot.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;if("boolean"==typeof s){u=s;s=arguments[a]||{};a++}"object"==typeof s||ot.isFunction(s)||(s={});if(a===l){s=this;a--}for(;l>a;a++)if(null!=(i=arguments[a]))for(r in i){e=s[r];n=i[r];if(s!==n)if(u&&n&&(ot.isPlainObject(n)||(t=ot.isArray(n)))){if(t){t=!1;o=e&&ot.isArray(e)?e:[]}else o=e&&ot.isPlainObject(e)?e:{};s[r]=ot.extend(u,o,n)}else void 0!==n&&(s[r]=n)}return s};ot.extend({expando:"jQuery"+(it+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===ot.type(e)},isArray:Array.isArray||function(e){return"array"===ot.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!ot.isArray(e)&&e-parseFloat(e)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==ot.type(e)||e.nodeType||ot.isWindow(e))return!1;try{if(e.constructor&&!nt.call(e,"constructor")&&!nt.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(rt.ownLast)for(t in e)return nt.call(e,t);for(t in e);return void 0===t||nt.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?et[tt.call(e)]||"object":typeof e},globalEval:function(e){e&&ot.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(e){return e.replace(at,"ms-").replace(lt,ut)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var i,o=0,s=e.length,a=r(e);if(n)if(a)for(;s>o;o++){i=t.apply(e[o],n);if(i===!1)break}else for(o in e){i=t.apply(e[o],n);if(i===!1)break}else if(a)for(;s>o;o++){i=t.call(e[o],o,e[o]);if(i===!1)break}else for(o in e){i=t.call(e[o],o,e[o]);if(i===!1)break}return e},trim:function(e){return null==e?"":(e+"").replace(st,"")},makeArray:function(e,t){var n=t||[];null!=e&&(r(Object(e))?ot.merge(n,"string"==typeof e?[e]:e):J.call(n,e));return n},inArray:function(e,t,n){var r;if(t){if(Z)return Z.call(t,e,n);r=t.length;n=n?0>n?Math.max(0,r+n):n:0;for(;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;)e[i++]=t[r++];if(n!==n)for(;void 0!==t[r];)e[i++]=t[r++];e.length=i;return e},grep:function(e,t,n){for(var r,i=[],o=0,s=e.length,a=!n;s>o;o++){r=!t(e[o],o);r!==a&&i.push(e[o])}return i},map:function(e,t,n){var i,o=0,s=e.length,a=r(e),l=[];if(a)for(;s>o;o++){i=t(e[o],o,n);null!=i&&l.push(i)}else for(o in e){i=t(e[o],o,n);null!=i&&l.push(i)}return Q.apply([],l)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t){i=e[t];t=e;e=i}if(!ot.isFunction(e))return void 0;n=Y.call(arguments,2);r=function(){return e.apply(t||this,n.concat(Y.call(arguments)))};r.guid=e.guid=e.guid||ot.guid++;return r},now:function(){return+new Date},support:rt});ot.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){et["[object "+t+"]"]=t.toLowerCase()});var ct=function(e){function t(e,t,n,r){var i,o,s,a,l,u,p,f,h,g;(t?t.ownerDocument||t:B)!==_&&O(t);t=t||_;n=n||[];a=t.nodeType;if("string"!=typeof e||!e||1!==a&&9!==a&&11!==a)return n;if(!r&&k){if(11!==a&&(i=Et.exec(e)))if(s=i[1]){if(9===a){o=t.getElementById(s);if(!o||!o.parentNode)return n;if(o.id===s){n.push(o);return n}}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&j(t,o)&&o.id===s){n.push(o);return n}}else{if(i[2]){J.apply(n,t.getElementsByTagName(e));return n}if((s=i[3])&&b.getElementsByClassName){J.apply(n,t.getElementsByClassName(s));return n}}if(b.qsa&&(!F||!F.test(e))){f=p=G;h=t;g=1!==a&&e;if(1===a&&"object"!==t.nodeName.toLowerCase()){u=C(e);(p=t.getAttribute("id"))?f=p.replace(xt,"\\$&"):t.setAttribute("id",f);f="[id='"+f+"'] ";l=u.length;for(;l--;)u[l]=f+d(u[l]);h=yt.test(e)&&c(t.parentNode)||t;g=u.join(",")}if(g)try{J.apply(n,h.querySelectorAll(g));return n}catch(m){}finally{p||t.removeAttribute("id")}}}return A(e.replace(lt,"$1"),t,n,r)}function n(){function e(n,r){t.push(n+" ")>T.cacheLength&&delete e[t.shift()];return e[n+" "]=r}var t=[];return e}function r(e){e[G]=!0;return e}function i(e){var t=_.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=e.length;r--;)T.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||$)-(~e.sourceIndex||$);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(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){t=+t;return r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function p(){}function d(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function f(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=q++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,s){var a,l,u=[U,o];if(s){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||i){l=t[G]||(t[G]={});if((a=l[r])&&a[0]===U&&a[1]===o)return u[2]=a[2];l[r]=u;if(u[2]=e(t,n,s))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;o>i;i++)t(e,n[i],r);return r}function m(e,t,n,r,i){for(var o,s=[],a=0,l=e.length,u=null!=t;l>a;a++)if((o=e[a])&&(!n||n(o,r,i))){s.push(o);u&&t.push(a)}return s}function v(e,t,n,i,o,s){i&&!i[G]&&(i=v(i));o&&!o[G]&&(o=v(o,s));return r(function(r,s,a,l){var u,c,p,d=[],f=[],h=s.length,v=r||g(t||"*",a.nodeType?[a]:a,[]),E=!e||!r&&t?v:m(v,d,e,a,l),y=n?o||(r?e:h||i)?[]:s:E;n&&n(E,y,a,l);if(i){u=m(y,f);i(u,[],a,l);c=u.length;for(;c--;)(p=u[c])&&(y[f[c]]=!(E[f[c]]=p))}if(r){if(o||e){if(o){u=[];c=y.length;for(;c--;)(p=y[c])&&u.push(E[c]=p);o(null,y=[],u,l)}c=y.length;for(;c--;)(p=y[c])&&(u=o?et(r,p):d[c])>-1&&(r[u]=!(s[u]=p))}}else{y=m(y===s?y.splice(h,y.length):y);o?o(null,s,y,l):J.apply(s,y)}})}function E(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],s=o||T.relative[" "],a=o?1:0,l=f(function(e){return e===t},s,!0),u=f(function(e){return et(t,e)>-1},s,!0),c=[function(e,n,r){var i=!o&&(r||n!==I)||((t=n).nodeType?l(e,n,r):u(e,n,r));t=null;return i}];i>a;a++)if(n=T.relative[e[a].type])c=[f(h(c),n)];else{n=T.filter[e[a].type].apply(null,e[a].matches);if(n[G]){r=++a;for(;i>r&&!T.relative[e[r].type];r++);return v(a>1&&h(c),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(lt,"$1"),n,r>a&&E(e.slice(a,r)),i>r&&E(e=e.slice(r)),i>r&&d(e))}c.push(n)}return h(c)}function y(e,n){var i=n.length>0,o=e.length>0,s=function(r,s,a,l,u){var c,p,d,f=0,h="0",g=r&&[],v=[],E=I,y=r||o&&T.find.TAG("*",u),x=U+=null==E?1:Math.random()||.1,b=y.length;u&&(I=s!==_&&s);for(;h!==b&&null!=(c=y[h]);h++){if(o&&c){p=0;for(;d=e[p++];)if(d(c,s,a)){l.push(c);break}u&&(U=x)}if(i){(c=!d&&c)&&f--;r&&g.push(c)}}f+=h;if(i&&h!==f){p=0;for(;d=n[p++];)d(g,v,s,a);if(r){if(f>0)for(;h--;)g[h]||v[h]||(v[h]=Y.call(l));v=m(v)}J.apply(l,v);u&&!r&&v.length>0&&f+n.length>1&&t.uniqueSort(l)}if(u){U=x;I=E}return g};return i?r(s):s}var x,b,T,S,N,C,L,A,I,w,R,O,_,D,k,F,P,M,j,G="sizzle"+1*new Date,B=e.document,U=0,q=0,H=n(),V=n(),W=n(),z=function(e,t){e===t&&(R=!0);return 0},$=1<<31,X={}.hasOwnProperty,K=[],Y=K.pop,Q=K.push,J=K.push,Z=K.slice,et=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},tt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",it=rt.replace("w","w#"),ot="\\["+nt+"*("+rt+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+it+"))|)"+nt+"*\\]",st=":("+rt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",at=new RegExp(nt+"+","g"),lt=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ut=new RegExp("^"+nt+"*,"+nt+"*"),ct=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),pt=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),dt=new RegExp(st),ft=new RegExp("^"+it+"$"),ht={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt.replace("w","w*")+")"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+tt+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},gt=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,Et=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,xt=/'|\\/g,bt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),Tt=function(e,t,n){var r="0x"+t-65536; return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},St=function(){O()};try{J.apply(K=Z.call(B.childNodes),B.childNodes);K[B.childNodes.length].nodeType}catch(Nt){J={apply:K.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}}}b=t.support={};N=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1};O=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;if(r===_||9!==r.nodeType||!r.documentElement)return _;_=r;D=r.documentElement;n=r.defaultView;n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",St,!1):n.attachEvent&&n.attachEvent("onunload",St));k=!N(r);b.attributes=i(function(e){e.className="i";return!e.getAttribute("className")});b.getElementsByTagName=i(function(e){e.appendChild(r.createComment(""));return!e.getElementsByTagName("*").length});b.getElementsByClassName=vt.test(r.getElementsByClassName);b.getById=i(function(e){D.appendChild(e).id=G;return!r.getElementsByName||!r.getElementsByName(G).length});if(b.getById){T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&k){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}};T.filter.ID=function(e){var t=e.replace(bt,Tt);return function(e){return e.getAttribute("id")===t}}}else{delete T.find.ID;T.filter.ID=function(e){var t=e.replace(bt,Tt);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}}T.find.TAG=b.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):b.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};T.find.CLASS=b.getElementsByClassName&&function(e,t){return k?t.getElementsByClassName(e):void 0};P=[];F=[];if(b.qsa=vt.test(r.querySelectorAll)){i(function(e){D.appendChild(e).innerHTML="<a id='"+G+"'></a><select id='"+G+"-\f]' msallowcapture=''><option selected=''></option></select>";e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+nt+"*(?:''|\"\")");e.querySelectorAll("[selected]").length||F.push("\\["+nt+"*(?:value|"+tt+")");e.querySelectorAll("[id~="+G+"-]").length||F.push("~=");e.querySelectorAll(":checked").length||F.push(":checked");e.querySelectorAll("a#"+G+"+*").length||F.push(".#.+[+~]")});i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden");e.appendChild(t).setAttribute("name","D");e.querySelectorAll("[name=d]").length&&F.push("name"+nt+"*[*^$|!~]?=");e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled");e.querySelectorAll("*,:x");F.push(",.*:")})}(b.matchesSelector=vt.test(M=D.matches||D.webkitMatchesSelector||D.mozMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&i(function(e){b.disconnectedMatch=M.call(e,"div");M.call(e,"[s!='']:x");P.push("!=",st)});F=F.length&&new RegExp(F.join("|"));P=P.length&&new RegExp(P.join("|"));t=vt.test(D.compareDocumentPosition);j=t||vt.test(D.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){R=!0;return 0}var n=!e.compareDocumentPosition-!t.compareDocumentPosition;if(n)return n;n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1;return 1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===B&&j(B,e)?-1:t===r||t.ownerDocument===B&&j(B,t)?1:w?et(w,e)-et(w,t):0:4&n?-1:1}:function(e,t){if(e===t){R=!0;return 0}var n,i=0,o=e.parentNode,a=t.parentNode,l=[e],u=[t];if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:w?et(w,e)-et(w,t):0;if(o===a)return s(e,t);n=e;for(;n=n.parentNode;)l.unshift(n);n=t;for(;n=n.parentNode;)u.unshift(n);for(;l[i]===u[i];)i++;return i?s(l[i],u[i]):l[i]===B?-1:u[i]===B?1:0};return r};t.matches=function(e,n){return t(e,null,null,n)};t.matchesSelector=function(e,n){(e.ownerDocument||e)!==_&&O(e);n=n.replace(pt,"='$1']");if(!(!b.matchesSelector||!k||P&&P.test(n)||F&&F.test(n)))try{var r=M.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,_,null,[e]).length>0};t.contains=function(e,t){(e.ownerDocument||e)!==_&&O(e);return j(e,t)};t.attr=function(e,t){(e.ownerDocument||e)!==_&&O(e);var n=T.attrHandle[t.toLowerCase()],r=n&&X.call(T.attrHandle,t.toLowerCase())?n(e,t,!k):void 0;return void 0!==r?r:b.attributes||!k?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;R=!b.detectDuplicates;w=!b.sortStable&&e.slice(0);e.sort(z);if(R){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}w=null;return e};S=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+=S(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=S(t);return n};T=t.selectors={cacheLength:50,createPseudo:r,match:ht,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(bt,Tt);e[3]=(e[3]||e[4]||e[5]||"").replace(bt,Tt);"~="===e[2]&&(e[3]=" "+e[3]+" ");return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if("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])}else e[3]&&t.error(e[0]);return e},PSEUDO:function(e){var t,n=!e[6]&&e[2];if(ht.CHILD.test(e[0]))return null;if(e[3])e[2]=e[4]||e[5]||"";else if(n&&dt.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)){e[0]=e[0].slice(0,t);e[2]=n.slice(0,t)}return e.slice(0,3)}},filter:{TAG:function(e){var t=e.replace(bt,Tt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=H[e+" "];return t||(t=new RegExp("(^|"+nt+")"+e+"("+nt+"|$)"))&&H(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);if(null==o)return"!="===n;if(!n)return!0;o+="";return"="===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(at," ")+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,d,f,h,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),E=!l&&!a;if(m){if(o){for(;g;){p=t;for(;p=p[g];)if(a?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}h=[s?m.firstChild:m.lastChild];if(s&&E){c=m[G]||(m[G]={});u=c[e]||[];f=u[0]===U&&u[1];d=u[0]===U&&u[2];p=f&&m.childNodes[f];for(;p=++f&&p&&p[g]||(d=f=0)||h.pop();)if(1===p.nodeType&&++d&&p===t){c[e]=[U,f,d];break}}else if(E&&(u=(t[G]||(t[G]={}))[e])&&u[0]===U)d=u[1];else for(;p=++f&&p&&p[g]||(d=f=0)||h.pop();)if((a?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++d){E&&((p[G]||(p[G]={}))[e]=[U,d]);if(p===t)break}d-=i;return d===r||d%r===0&&d/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);if(o[G])return o(n);if(o.length>1){i=[e,e,"",n];return T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;){r=et(e,i[s]);e[r]=!(t[r]=i[s])}}):function(e){return o(e,0,i)}}return o}},pseudos:{not:r(function(e){var t=[],n=[],i=L(e.replace(lt,"$1"));return i[G]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){t[0]=e;i(t,null,o,n);t[0]=null;return!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){e=e.replace(bt,Tt);return function(t){return(t.textContent||t.innerText||S(t)).indexOf(e)>-1}}),lang:r(function(e){ft.test(e||"")||t.error("unsupported lang: "+e);e=e.replace(bt,Tt).toLowerCase();return function(t){var n;do if(n=k?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang")){n=n.toLowerCase();return 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===D},focus:function(e){return e===_.activeElement&&(!_.hasFocus||_.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){e.parentNode&&e.parentNode.selectedIndex;return 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!T.pseudos.empty(e)},header:function(e){return mt.test(e.nodeName)},input:function(e){return gt.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[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}};T.pseudos.nth=T.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[x]=a(x);for(x in{submit:!0,reset:!0})T.pseudos[x]=l(x);p.prototype=T.filters=T.pseudos;T.setFilters=new p;C=t.tokenize=function(e,n){var r,i,o,s,a,l,u,c=V[e+" "];if(c)return n?0:c.slice(0);a=e;l=[];u=T.preFilter;for(;a;){if(!r||(i=ut.exec(a))){i&&(a=a.slice(i[0].length)||a);l.push(o=[])}r=!1;if(i=ct.exec(a)){r=i.shift();o.push({value:r,type:i[0].replace(lt," ")});a=a.slice(r.length)}for(s in T.filter)if((i=ht[s].exec(a))&&(!u[s]||(i=u[s](i)))){r=i.shift();o.push({value:r,type:s,matches:i});a=a.slice(r.length)}if(!r)break}return n?a.length:a?t.error(e):V(e,l).slice(0)};L=t.compile=function(e,t){var n,r=[],i=[],o=W[e+" "];if(!o){t||(t=C(e));n=t.length;for(;n--;){o=E(t[n]);o[G]?r.push(o):i.push(o)}o=W(e,y(i,r));o.selector=e}return o};A=t.select=function(e,t,n,r){var i,o,s,a,l,u="function"==typeof e&&e,p=!r&&C(e=u.selector||e);n=n||[];if(1===p.length){o=p[0]=p[0].slice(0);if(o.length>2&&"ID"===(s=o[0]).type&&b.getById&&9===t.nodeType&&k&&T.relative[o[1].type]){t=(T.find.ID(s.matches[0].replace(bt,Tt),t)||[])[0];if(!t)return n;u&&(t=t.parentNode);e=e.slice(o.shift().value.length)}i=ht.needsContext.test(e)?0:o.length;for(;i--;){s=o[i];if(T.relative[a=s.type])break;if((l=T.find[a])&&(r=l(s.matches[0].replace(bt,Tt),yt.test(o[0].type)&&c(t.parentNode)||t))){o.splice(i,1);e=r.length&&d(o);if(!e){J.apply(n,r);return n}break}}}(u||L(e,p))(r,t,!k,n,yt.test(e)&&c(t.parentNode)||t);return n};b.sortStable=G.split("").sort(z).join("")===G;b.detectDuplicates=!!R;O();b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(_.createElement("div"))});i(function(e){e.innerHTML="<a href='#'></a>";return"#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)});b.attributes&&i(function(e){e.innerHTML="<input/>";e.firstChild.setAttribute("value","");return""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue});i(function(e){return null==e.getAttribute("disabled")})||o(tt,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null});return t}(t);ot.find=ct;ot.expr=ct.selectors;ot.expr[":"]=ot.expr.pseudos;ot.unique=ct.uniqueSort;ot.text=ct.getText;ot.isXMLDoc=ct.isXML;ot.contains=ct.contains;var pt=ot.expr.match.needsContext,dt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ft=/^.[^:#\[\.,]*$/;ot.filter=function(e,t,n){var r=t[0];n&&(e=":not("+e+")");return 1===t.length&&1===r.nodeType?ot.find.matchesSelector(r,e)?[r]:[]:ot.find.matches(e,ot.grep(t,function(e){return 1===e.nodeType}))};ot.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(ot(e).filter(function(){for(t=0;i>t;t++)if(ot.contains(r[t],this))return!0}));for(t=0;i>t;t++)ot.find(e,r[t],n);n=this.pushStack(i>1?ot.unique(n):n);n.selector=this.selector?this.selector+" "+e:e;return n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&pt.test(e)?ot(e):e||[],!1).length}});var ht,gt=t.document,mt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,vt=ot.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:mt.exec(e);if(!n||!n[1]&&t)return!t||t.jquery?(t||ht).find(e):this.constructor(t).find(e);if(n[1]){t=t instanceof ot?t[0]:t;ot.merge(this,ot.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:gt,!0));if(dt.test(n[1])&&ot.isPlainObject(t))for(n in t)ot.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}r=gt.getElementById(n[2]);if(r&&r.parentNode){if(r.id!==n[2])return ht.find(e);this.length=1;this[0]=r}this.context=gt;this.selector=e;return this}if(e.nodeType){this.context=this[0]=e;this.length=1;return this}if(ot.isFunction(e))return"undefined"!=typeof ht.ready?ht.ready(e):e(ot);if(void 0!==e.selector){this.selector=e.selector;this.context=e.context}return ot.makeArray(e,this)};vt.prototype=ot.fn;ht=ot(gt);var Et=/^(?:parents|prev(?:Until|All))/,yt={children:!0,contents:!0,next:!0,prev:!0};ot.extend({dir:function(e,t,n){for(var r=[],i=e[t];i&&9!==i.nodeType&&(void 0===n||1!==i.nodeType||!ot(i).is(n));){1===i.nodeType&&r.push(i);i=i[t]}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});ot.fn.extend({has:function(e){var t,n=ot(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(ot.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],s=pt.test(e)||"string"!=typeof e?ot(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&ot.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ot.unique(o):o)},index:function(e){return e?"string"==typeof e?ot.inArray(this[0],ot(e)):ot.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ot.unique(ot.merge(this.get(),ot(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});ot.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ot.dir(e,"parentNode")},parentsUntil:function(e,t,n){return ot.dir(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return ot.dir(e,"nextSibling")},prevAll:function(e){return ot.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ot.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ot.dir(e,"previousSibling",n)},siblings:function(e){return ot.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ot.sibling(e.firstChild)},contents:function(e){return ot.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ot.merge([],e.childNodes)}},function(e,t){ot.fn[e]=function(n,r){var i=ot.map(this,t,n);"Until"!==e.slice(-5)&&(r=n);r&&"string"==typeof r&&(i=ot.filter(r,i));if(this.length>1){yt[e]||(i=ot.unique(i));Et.test(e)&&(i=i.reverse())}return this.pushStack(i)}});var xt=/\S+/g,bt={};ot.Callbacks=function(e){e="string"==typeof e?bt[e]||s(e):ot.extend({},e);var t,n,r,i,o,a,l=[],u=!e.once&&[],c=function(s){n=e.memory&&s;r=!0;o=a||0;a=0;i=l.length;t=!0;for(;l&&i>o;o++)if(l[o].apply(s[0],s[1])===!1&&e.stopOnFalse){n=!1;break}t=!1;l&&(u?u.length&&c(u.shift()):n?l=[]:p.disable())},p={add:function(){if(l){var r=l.length;(function o(t){ot.each(t,function(t,n){var r=ot.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&o(n)})})(arguments);if(t)i=l.length;else if(n){a=r;c(n)}}return this},remove:function(){l&&ot.each(arguments,function(e,n){for(var r;(r=ot.inArray(n,l,r))>-1;){l.splice(r,1);if(t){i>=r&&i--;o>=r&&o--}}});return this},has:function(e){return e?ot.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){l=[];i=0;return this},disable:function(){l=u=n=void 0;return this},disabled:function(){return!l},lock:function(){u=void 0;n||p.disable();return this},locked:function(){return!u},fireWith:function(e,n){if(l&&(!r||u)){n=n||[];n=[e,n.slice?n.slice():n];t?u.push(n):c(n)}return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!r}};return p};ot.extend({Deferred:function(e){var t=[["resolve","done",ot.Callbacks("once memory"),"resolved"],["reject","fail",ot.Callbacks("once memory"),"rejected"],["notify","progress",ot.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){i.done(arguments).fail(arguments);return this},then:function(){var e=arguments;return ot.Deferred(function(n){ot.each(t,function(t,o){var s=ot.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&ot.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})});e=null}).promise()},promise:function(e){return null!=e?ot.extend(e,r):r}},i={};r.pipe=r.then;ot.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add;a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock);i[o[0]]=function(){i[o[0]+"With"](this===i?r:this,arguments);return this};i[o[0]+"With"]=s.fireWith});r.promise(i);e&&e.call(i,i);return i},when:function(e){var t,n,r,i=0,o=Y.call(arguments),s=o.length,a=1!==s||e&&ot.isFunction(e.promise)?s:0,l=1===a?e:ot.Deferred(),u=function(e,n,r){return function(i){n[e]=this;r[e]=arguments.length>1?Y.call(arguments):i;r===t?l.notifyWith(n,r):--a||l.resolveWith(n,r)}};if(s>1){t=new Array(s);n=new Array(s);r=new Array(s);for(;s>i;i++)o[i]&&ot.isFunction(o[i].promise)?o[i].promise().done(u(i,r,o)).fail(l.reject).progress(u(i,n,t)):--a}a||l.resolveWith(r,o);return l.promise()}});var Tt;ot.fn.ready=function(e){ot.ready.promise().done(e);return this};ot.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ot.readyWait++:ot.ready(!0)},ready:function(e){if(e===!0?!--ot.readyWait:!ot.isReady){if(!gt.body)return setTimeout(ot.ready);ot.isReady=!0;if(!(e!==!0&&--ot.readyWait>0)){Tt.resolveWith(gt,[ot]);if(ot.fn.triggerHandler){ot(gt).triggerHandler("ready");ot(gt).off("ready")}}}}});ot.ready.promise=function(e){if(!Tt){Tt=ot.Deferred();if("complete"===gt.readyState)setTimeout(ot.ready);else if(gt.addEventListener){gt.addEventListener("DOMContentLoaded",l,!1);t.addEventListener("load",l,!1)}else{gt.attachEvent("onreadystatechange",l);t.attachEvent("onload",l);var n=!1;try{n=null==t.frameElement&&gt.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!ot.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}a();ot.ready()}}()}}return Tt.promise(e)};var St,Nt="undefined";for(St in ot(rt))break;rt.ownLast="0"!==St;rt.inlineBlockNeedsLayout=!1;ot(function(){var e,t,n,r;n=gt.getElementsByTagName("body")[0];if(n&&n.style){t=gt.createElement("div");r=gt.createElement("div");r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px";n.appendChild(r).appendChild(t);if(typeof t.style.zoom!==Nt){t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";rt.inlineBlockNeedsLayout=e=3===t.offsetWidth;e&&(n.style.zoom=1)}n.removeChild(r)}});(function(){var e=gt.createElement("div");if(null==rt.deleteExpando){rt.deleteExpando=!0;try{delete e.test}catch(t){rt.deleteExpando=!1}}e=null})();ot.acceptData=function(e){var t=ot.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return 1!==n&&9!==n?!1:!t||t!==!0&&e.getAttribute("classid")===t};var Ct=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Lt=/([A-Z])/g;ot.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){e=e.nodeType?ot.cache[e[ot.expando]]:e[ot.expando];return!!e&&!c(e)},data:function(e,t,n){return p(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return p(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}});ot.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length){i=ot.data(o);if(1===o.nodeType&&!ot._data(o,"parsedAttrs")){n=s.length;for(;n--;)if(s[n]){r=s[n].name;if(0===r.indexOf("data-")){r=ot.camelCase(r.slice(5));u(o,r,i[r])}}ot._data(o,"parsedAttrs",!0)}}return i}return"object"==typeof e?this.each(function(){ot.data(this,e)}):arguments.length>1?this.each(function(){ot.data(this,e,t)}):o?u(o,e,ot.data(o,e)):void 0},removeData:function(e){return this.each(function(){ot.removeData(this,e)})}});ot.extend({queue:function(e,t,n){var r;if(e){t=(t||"fx")+"queue";r=ot._data(e,t);n&&(!r||ot.isArray(n)?r=ot._data(e,t,ot.makeArray(n)):r.push(n));return r||[]}},dequeue:function(e,t){t=t||"fx";var n=ot.queue(e,t),r=n.length,i=n.shift(),o=ot._queueHooks(e,t),s=function(){ot.dequeue(e,t)};if("inprogress"===i){i=n.shift();r--}if(i){"fx"===t&&n.unshift("inprogress");delete o.stop;i.call(e,s,o)}!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ot._data(e,n)||ot._data(e,n,{empty:ot.Callbacks("once memory").add(function(){ot._removeData(e,t+"queue");ot._removeData(e,n)})})}});ot.fn.extend({queue:function(e,t){var n=2;if("string"!=typeof e){t=e;e="fx";n--}return arguments.length<n?ot.queue(this[0],e):void 0===t?this:this.each(function(){var n=ot.queue(this,e,t);ot._queueHooks(this,e);"fx"===e&&"inprogress"!==n[0]&&ot.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ot.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ot.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};if("string"!=typeof e){t=e;e=void 0}e=e||"fx";for(;s--;){n=ot._data(o[s],e+"queueHooks");if(n&&n.empty){r++;n.empty.add(a)}}a();return i.promise(t)}});var At=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,It=["Top","Right","Bottom","Left"],wt=function(e,t){e=t||e;return"none"===ot.css(e,"display")||!ot.contains(e.ownerDocument,e)},Rt=ot.access=function(e,t,n,r,i,o,s){var a=0,l=e.length,u=null==n;if("object"===ot.type(n)){i=!0;for(a in n)ot.access(e,t,a,n[a],!0,o,s)}else if(void 0!==r){i=!0;ot.isFunction(r)||(s=!0);if(u)if(s){t.call(e,r);t=null}else{u=t;t=function(e,t,n){return u.call(ot(e),n)}}if(t)for(;l>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)))}return i?e:u?t.call(e):l?t(e[0],n):o},Ot=/^(?:checkbox|radio)$/i;(function(){var e=gt.createElement("input"),t=gt.createElement("div"),n=gt.createDocumentFragment();t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";rt.leadingWhitespace=3===t.firstChild.nodeType;rt.tbody=!t.getElementsByTagName("tbody").length;rt.htmlSerialize=!!t.getElementsByTagName("link").length;rt.html5Clone="<:nav></:nav>"!==gt.createElement("nav").cloneNode(!0).outerHTML;e.type="checkbox";e.checked=!0;n.appendChild(e);rt.appendChecked=e.checked;t.innerHTML="<textarea>x</textarea>";rt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue;n.appendChild(t);t.innerHTML="<input type='radio' checked='checked' name='t'/>";rt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked;rt.noCloneEvent=!0;if(t.attachEvent){t.attachEvent("onclick",function(){rt.noCloneEvent=!1});t.cloneNode(!0).click()}if(null==rt.deleteExpando){rt.deleteExpando=!0;try{delete t.test}catch(r){rt.deleteExpando=!1}}})();(function(){var e,n,r=gt.createElement("div");for(e in{submit:!0,change:!0,focusin:!0}){n="on"+e;if(!(rt[e+"Bubbles"]=n in t)){r.setAttribute(n,"t");rt[e+"Bubbles"]=r.attributes[n].expando===!1}}r=null})();var _t=/^(?:input|select|textarea)$/i,Dt=/^key/,kt=/^(?:mouse|pointer|contextmenu)|click/,Ft=/^(?:focusinfocus|focusoutblur)$/,Pt=/^([^.]*)(?:\.(.+)|)$/;ot.event={global:{},add:function(e,t,n,r,i){var o,s,a,l,u,c,p,d,f,h,g,m=ot._data(e);if(m){if(n.handler){l=n;n=l.handler;i=l.selector}n.guid||(n.guid=ot.guid++);(s=m.events)||(s=m.events={});if(!(c=m.handle)){c=m.handle=function(e){return typeof ot===Nt||e&&ot.event.triggered===e.type?void 0:ot.event.dispatch.apply(c.elem,arguments)};c.elem=e}t=(t||"").match(xt)||[""];a=t.length;for(;a--;){o=Pt.exec(t[a])||[];f=g=o[1];h=(o[2]||"").split(".").sort();if(f){u=ot.event.special[f]||{};f=(i?u.delegateType:u.bindType)||f;u=ot.event.special[f]||{};p=ot.extend({type:f,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ot.expr.match.needsContext.test(i),namespace:h.join(".")},l);if(!(d=s[f])){d=s[f]=[];d.delegateCount=0;u.setup&&u.setup.call(e,r,h,c)!==!1||(e.addEventListener?e.addEventListener(f,c,!1):e.attachEvent&&e.attachEvent("on"+f,c))}if(u.add){u.add.call(e,p);p.handler.guid||(p.handler.guid=n.guid)}i?d.splice(d.delegateCount++,0,p):d.push(p);ot.event.global[f]=!0}}e=null}},remove:function(e,t,n,r,i){var o,s,a,l,u,c,p,d,f,h,g,m=ot.hasData(e)&&ot._data(e);if(m&&(c=m.events)){t=(t||"").match(xt)||[""];u=t.length;for(;u--;){a=Pt.exec(t[u])||[];f=g=a[1];h=(a[2]||"").split(".").sort();if(f){p=ot.event.special[f]||{};f=(r?p.delegateType:p.bindType)||f;d=c[f]||[];a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)");l=o=d.length;for(;o--;){s=d[o];if(!(!i&&g!==s.origType||n&&n.guid!==s.guid||a&&!a.test(s.namespace)||r&&r!==s.selector&&("**"!==r||!s.selector))){d.splice(o,1);s.selector&&d.delegateCount--;p.remove&&p.remove.call(e,s)}}if(l&&!d.length){p.teardown&&p.teardown.call(e,h,m.handle)!==!1||ot.removeEvent(e,f,m.handle);delete c[f]}}else for(f in c)ot.event.remove(e,f+t[u],n,r,!0)}if(ot.isEmptyObject(c)){delete m.handle;ot._removeData(e,"events")}}},trigger:function(e,n,r,i){var o,s,a,l,u,c,p,d=[r||gt],f=nt.call(e,"type")?e.type:e,h=nt.call(e,"namespace")?e.namespace.split("."):[];a=c=r=r||gt;if(3!==r.nodeType&&8!==r.nodeType&&!Ft.test(f+ot.event.triggered)){if(f.indexOf(".")>=0){h=f.split(".");f=h.shift();h.sort()}s=f.indexOf(":")<0&&"on"+f;e=e[ot.expando]?e:new ot.Event(f,"object"==typeof e&&e);e.isTrigger=i?2:3;e.namespace=h.join(".");e.namespace_re=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;e.result=void 0;e.target||(e.target=r);n=null==n?[e]:ot.makeArray(n,[e]);u=ot.event.special[f]||{};if(i||!u.trigger||u.trigger.apply(r,n)!==!1){if(!i&&!u.noBubble&&!ot.isWindow(r)){l=u.delegateType||f;Ft.test(l+f)||(a=a.parentNode);for(;a;a=a.parentNode){d.push(a);c=a}c===(r.ownerDocument||gt)&&d.push(c.defaultView||c.parentWindow||t)}p=0;for(;(a=d[p++])&&!e.isPropagationStopped();){e.type=p>1?l:u.bindType||f;o=(ot._data(a,"events")||{})[e.type]&&ot._data(a,"handle");o&&o.apply(a,n);o=s&&a[s];if(o&&o.apply&&ot.acceptData(a)){e.result=o.apply(a,n);e.result===!1&&e.preventDefault()}}e.type=f;if(!i&&!e.isDefaultPrevented()&&(!u._default||u._default.apply(d.pop(),n)===!1)&&ot.acceptData(r)&&s&&r[f]&&!ot.isWindow(r)){c=r[s];c&&(r[s]=null);ot.event.triggered=f;try{r[f]()}catch(g){}ot.event.triggered=void 0;c&&(r[s]=c)}return e.result}}},dispatch:function(e){e=ot.event.fix(e);var t,n,r,i,o,s=[],a=Y.call(arguments),l=(ot._data(this,"events")||{})[e.type]||[],u=ot.event.special[e.type]||{};a[0]=e;e.delegateTarget=this;if(!u.preDispatch||u.preDispatch.call(this,e)!==!1){s=ot.event.handlers.call(this,e,l);t=0;for(;(i=s[t++])&&!e.isPropagationStopped();){e.currentTarget=i.elem;o=0;for(;(r=i.handlers[o++])&&!e.isImmediatePropagationStopped();)if(!e.namespace_re||e.namespace_re.test(r.namespace)){e.handleObj=r;e.data=r.data;n=((ot.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,a);if(void 0!==n&&(e.result=n)===!1){e.preventDefault();e.stopPropagation()}}}u.postDispatch&&u.postDispatch.call(this,e);return e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){i=[];for(o=0;a>o;o++){r=t[o];n=r.selector+" ";void 0===i[n]&&(i[n]=r.needsContext?ot(n,this).index(l)>=0:ot.find(n,this,null,[l]).length);i[n]&&i.push(r)}i.length&&s.push({elem:l,handlers:i})}a<t.length&&s.push({elem:this,handlers:t.slice(a)});return s},fix:function(e){if(e[ot.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=kt.test(i)?this.mouseHooks:Dt.test(i)?this.keyHooks:{});r=s.props?this.props.concat(s.props):this.props;e=new ot.Event(o);t=r.length;for(;t--;){n=r[t];e[n]=o[n]}e.target||(e.target=o.srcElement||gt);3===e.target.nodeType&&(e.target=e.target.parentNode);e.metaKey=!!e.metaKey;return s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode);return e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,s=t.fromElement;if(null==e.pageX&&null!=t.clientX){r=e.target.ownerDocument||gt;i=r.documentElement;n=r.body;e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0);e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)}!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?t.toElement:s);e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0);return e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==g()&&this.focus)try{this.focus();return!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===g()&&this.blur){this.blur();return!1}},delegateType:"focusout"},click:{trigger:function(){if(ot.nodeName(this,"input")&&"checkbox"===this.type&&this.click){this.click();return!1}},_default:function(e){return ot.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=ot.extend(new ot.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?ot.event.trigger(i,null,t):ot.event.dispatch.call(t,i);i.isDefaultPrevented()&&n.preventDefault()}};ot.removeEvent=gt.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;if(e.detachEvent){typeof e[r]===Nt&&(e[r]=null);e.detachEvent(r,n)}};ot.Event=function(e,t){if(!(this instanceof ot.Event))return new ot.Event(e,t);if(e&&e.type){this.originalEvent=e;this.type=e.type;this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?f:h}else this.type=e;t&&ot.extend(this,t);this.timeStamp=e&&e.timeStamp||ot.now();this[ot.expando]=!0};ot.Event.prototype={isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=f;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=f;if(e){e.stopPropagation&&e.stopPropagation();e.cancelBubble=!0}},stopImmediatePropagation:function(){var e=this.originalEvent; this.isImmediatePropagationStopped=f;e&&e.stopImmediatePropagation&&e.stopImmediatePropagation();this.stopPropagation()}};ot.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ot.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;if(!i||i!==r&&!ot.contains(r,i)){e.type=o.origType;n=o.handler.apply(this,arguments);e.type=t}return n}}});rt.submitBubbles||(ot.event.special.submit={setup:function(){if(ot.nodeName(this,"form"))return!1;ot.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=ot.nodeName(t,"input")||ot.nodeName(t,"button")?t.form:void 0;if(n&&!ot._data(n,"submitBubbles")){ot.event.add(n,"submit._submit",function(e){e._submit_bubble=!0});ot._data(n,"submitBubbles",!0)}});return void 0},postDispatch:function(e){if(e._submit_bubble){delete e._submit_bubble;this.parentNode&&!e.isTrigger&&ot.event.simulate("submit",this.parentNode,e,!0)}},teardown:function(){if(ot.nodeName(this,"form"))return!1;ot.event.remove(this,"._submit");return void 0}});rt.changeBubbles||(ot.event.special.change={setup:function(){if(_t.test(this.nodeName)){if("checkbox"===this.type||"radio"===this.type){ot.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)});ot.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1);ot.event.simulate("change",this,e,!0)})}return!1}ot.event.add(this,"beforeactivate._change",function(e){var t=e.target;if(_t.test(t.nodeName)&&!ot._data(t,"changeBubbles")){ot.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ot.event.simulate("change",this.parentNode,e,!0)});ot._data(t,"changeBubbles",!0)}})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){ot.event.remove(this,"._change");return!_t.test(this.nodeName)}});rt.focusinBubbles||ot.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ot.event.simulate(t,e.target,ot.event.fix(e),!0)};ot.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=ot._data(r,t);i||r.addEventListener(e,n,!0);ot._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=ot._data(r,t)-1;if(i)ot._data(r,t,i);else{r.removeEventListener(e,n,!0);ot._removeData(r,t)}}}});ot.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){if("string"!=typeof t){n=n||t;t=void 0}for(o in e)this.on(o,t,n,e[o],i);return this}if(null==n&&null==r){r=t;n=t=void 0}else if(null==r)if("string"==typeof t){r=n;n=void 0}else{r=n;n=t;t=void 0}if(r===!1)r=h;else if(!r)return this;if(1===i){s=r;r=function(e){ot().off(e);return s.apply(this,arguments)};r.guid=s.guid||(s.guid=ot.guid++)}return this.each(function(){ot.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj){r=e.handleObj;ot(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler);return this}if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}if(t===!1||"function"==typeof t){n=t;t=void 0}n===!1&&(n=h);return this.each(function(){ot.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){ot.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?ot.event.trigger(e,t,n,!0):void 0}});var Mt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",jt=/ jQuery\d+="(?:null|\d+)"/g,Gt=new RegExp("<(?:"+Mt+")[\\s/>]","i"),Bt=/^\s+/,Ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,qt=/<([\w:]+)/,Ht=/<tbody/i,Vt=/<|&#?\w+;/,Wt=/<(?:script|style|link)/i,zt=/checked\s*(?:[^=]|=\s*.checked.)/i,$t=/^$|\/(?:java|ecma)script/i,Xt=/^true\/(.*)/,Kt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Yt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:rt.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Qt=m(gt),Jt=Qt.appendChild(gt.createElement("div"));Yt.optgroup=Yt.option;Yt.tbody=Yt.tfoot=Yt.colgroup=Yt.caption=Yt.thead;Yt.th=Yt.td;ot.extend({clone:function(e,t,n){var r,i,o,s,a,l=ot.contains(e.ownerDocument,e);if(rt.html5Clone||ot.isXMLDoc(e)||!Gt.test("<"+e.nodeName+">"))o=e.cloneNode(!0);else{Jt.innerHTML=e.outerHTML;Jt.removeChild(o=Jt.firstChild)}if(!(rt.noCloneEvent&&rt.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ot.isXMLDoc(e))){r=v(o);a=v(e);for(s=0;null!=(i=a[s]);++s)r[s]&&N(i,r[s])}if(t)if(n){a=a||v(e);r=r||v(o);for(s=0;null!=(i=a[s]);s++)S(i,r[s])}else S(e,o);r=v(o,"script");r.length>0&&T(r,!l&&v(e,"script"));r=a=i=null;return o},buildFragment:function(e,t,n,r){for(var i,o,s,a,l,u,c,p=e.length,d=m(t),f=[],h=0;p>h;h++){o=e[h];if(o||0===o)if("object"===ot.type(o))ot.merge(f,o.nodeType?[o]:o);else if(Vt.test(o)){a=a||d.appendChild(t.createElement("div"));l=(qt.exec(o)||["",""])[1].toLowerCase();c=Yt[l]||Yt._default;a.innerHTML=c[1]+o.replace(Ut,"<$1></$2>")+c[2];i=c[0];for(;i--;)a=a.lastChild;!rt.leadingWhitespace&&Bt.test(o)&&f.push(t.createTextNode(Bt.exec(o)[0]));if(!rt.tbody){o="table"!==l||Ht.test(o)?"<table>"!==c[1]||Ht.test(o)?0:a:a.firstChild;i=o&&o.childNodes.length;for(;i--;)ot.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}ot.merge(f,a.childNodes);a.textContent="";for(;a.firstChild;)a.removeChild(a.firstChild);a=d.lastChild}else f.push(t.createTextNode(o))}a&&d.removeChild(a);rt.appendChecked||ot.grep(v(f,"input"),E);h=0;for(;o=f[h++];)if(!r||-1===ot.inArray(o,r)){s=ot.contains(o.ownerDocument,o);a=v(d.appendChild(o),"script");s&&T(a);if(n){i=0;for(;o=a[i++];)$t.test(o.type||"")&&n.push(o)}}a=null;return d},cleanData:function(e,t){for(var n,r,i,o,s=0,a=ot.expando,l=ot.cache,u=rt.deleteExpando,c=ot.event.special;null!=(n=e[s]);s++)if(t||ot.acceptData(n)){i=n[a];o=i&&l[i];if(o){if(o.events)for(r in o.events)c[r]?ot.event.remove(n,r):ot.removeEvent(n,r,o.handle);if(l[i]){delete l[i];u?delete n[a]:typeof n.removeAttribute!==Nt?n.removeAttribute(a):n[a]=null;K.push(i)}}}}});ot.fn.extend({text:function(e){return Rt(this,function(e){return void 0===e?ot.text(this):this.empty().append((this[0]&&this[0].ownerDocument||gt).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?ot.filter(e,this):this,i=0;null!=(n=r[i]);i++){t||1!==n.nodeType||ot.cleanData(v(n));if(n.parentNode){t&&ot.contains(n.ownerDocument,n)&&T(v(n,"script"));n.parentNode.removeChild(n)}}return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){1===e.nodeType&&ot.cleanData(v(e,!1));for(;e.firstChild;)e.removeChild(e.firstChild);e.options&&ot.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){e=null==e?!1:e;t=null==t?e:t;return this.map(function(){return ot.clone(this,e,t)})},html:function(e){return Rt(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(jt,""):void 0;if(!("string"!=typeof e||Wt.test(e)||!rt.htmlSerialize&&Gt.test(e)||!rt.leadingWhitespace&&Bt.test(e)||Yt[(qt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Ut,"<$1></$2>");try{for(;r>n;n++){t=this[n]||{};if(1===t.nodeType){ot.cleanData(v(t,!1));t.innerHTML=e}}t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];this.domManip(arguments,function(t){e=this.parentNode;ot.cleanData(v(this));e&&e.replaceChild(t,this)});return e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=Q.apply([],e);var n,r,i,o,s,a,l=0,u=this.length,c=this,p=u-1,d=e[0],f=ot.isFunction(d);if(f||u>1&&"string"==typeof d&&!rt.checkClone&&zt.test(d))return this.each(function(n){var r=c.eq(n);f&&(e[0]=d.call(this,n,r.html()));r.domManip(e,t)});if(u){a=ot.buildFragment(e,this[0].ownerDocument,!1,this);n=a.firstChild;1===a.childNodes.length&&(a=n);if(n){o=ot.map(v(a,"script"),x);i=o.length;for(;u>l;l++){r=a;if(l!==p){r=ot.clone(r,!0,!0);i&&ot.merge(o,v(r,"script"))}t.call(this[l],r,l)}if(i){s=o[o.length-1].ownerDocument;ot.map(o,b);for(l=0;i>l;l++){r=o[l];$t.test(r.type||"")&&!ot._data(r,"globalEval")&&ot.contains(s,r)&&(r.src?ot._evalUrl&&ot._evalUrl(r.src):ot.globalEval((r.text||r.textContent||r.innerHTML||"").replace(Kt,"")))}}a=n=null}}return this}});ot.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ot.fn[e]=function(e){for(var n,r=0,i=[],o=ot(e),s=o.length-1;s>=r;r++){n=r===s?this:this.clone(!0);ot(o[r])[t](n);J.apply(i,n.get())}return this.pushStack(i)}});var Zt,en={};(function(){var e;rt.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,r;n=gt.getElementsByTagName("body")[0];if(n&&n.style){t=gt.createElement("div");r=gt.createElement("div");r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px";n.appendChild(r).appendChild(t);if(typeof t.style.zoom!==Nt){t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1";t.appendChild(gt.createElement("div")).style.width="5px";e=3!==t.offsetWidth}n.removeChild(r);return e}}})();var tn,nn,rn=/^margin/,on=new RegExp("^("+At+")(?!px)[a-z%]+$","i"),sn=/^(top|right|bottom|left)$/;if(t.getComputedStyle){tn=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):t.getComputedStyle(e,null)};nn=function(e,t,n){var r,i,o,s,a=e.style;n=n||tn(e);s=n?n.getPropertyValue(t)||n[t]:void 0;if(n){""!==s||ot.contains(e.ownerDocument,e)||(s=ot.style(e,t));if(on.test(s)&&rn.test(t)){r=a.width;i=a.minWidth;o=a.maxWidth;a.minWidth=a.maxWidth=a.width=s;s=n.width;a.width=r;a.minWidth=i;a.maxWidth=o}}return void 0===s?s:s+""}}else if(gt.documentElement.currentStyle){tn=function(e){return e.currentStyle};nn=function(e,t,n){var r,i,o,s,a=e.style;n=n||tn(e);s=n?n[t]:void 0;null==s&&a&&a[t]&&(s=a[t]);if(on.test(s)&&!sn.test(t)){r=a.left;i=e.runtimeStyle;o=i&&i.left;o&&(i.left=e.currentStyle.left);a.left="fontSize"===t?"1em":s;s=a.pixelLeft+"px";a.left=r;o&&(i.left=o)}return void 0===s?s:s+""||"auto"}}(function(){function e(){var e,n,r,i;n=gt.getElementsByTagName("body")[0];if(n&&n.style){e=gt.createElement("div");r=gt.createElement("div");r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px";n.appendChild(r).appendChild(e);e.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute";o=s=!1;l=!0;if(t.getComputedStyle){o="1%"!==(t.getComputedStyle(e,null)||{}).top;s="4px"===(t.getComputedStyle(e,null)||{width:"4px"}).width;i=e.appendChild(gt.createElement("div"));i.style.cssText=e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0";i.style.marginRight=i.style.width="0";e.style.width="1px";l=!parseFloat((t.getComputedStyle(i,null)||{}).marginRight);e.removeChild(i)}e.innerHTML="<table><tr><td></td><td>t</td></tr></table>";i=e.getElementsByTagName("td");i[0].style.cssText="margin:0;border:0;padding:0;display:none";a=0===i[0].offsetHeight;if(a){i[0].style.display="";i[1].style.display="none";a=0===i[0].offsetHeight}n.removeChild(r)}}var n,r,i,o,s,a,l;n=gt.createElement("div");n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";i=n.getElementsByTagName("a")[0];r=i&&i.style;if(r){r.cssText="float:left;opacity:.5";rt.opacity="0.5"===r.opacity;rt.cssFloat=!!r.cssFloat;n.style.backgroundClip="content-box";n.cloneNode(!0).style.backgroundClip="";rt.clearCloneStyle="content-box"===n.style.backgroundClip;rt.boxSizing=""===r.boxSizing||""===r.MozBoxSizing||""===r.WebkitBoxSizing;ot.extend(rt,{reliableHiddenOffsets:function(){null==a&&e();return a},boxSizingReliable:function(){null==s&&e();return s},pixelPosition:function(){null==o&&e();return o},reliableMarginRight:function(){null==l&&e();return l}})}})();ot.swap=function(e,t,n,r){var i,o,s={};for(o in t){s[o]=e.style[o];e.style[o]=t[o]}i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i};var an=/alpha\([^)]*\)/i,ln=/opacity\s*=\s*([^)]*)/,un=/^(none|table(?!-c[ea]).+)/,cn=new RegExp("^("+At+")(.*)$","i"),pn=new RegExp("^([+-])=("+At+")","i"),dn={position:"absolute",visibility:"hidden",display:"block"},fn={letterSpacing:"0",fontWeight:"400"},hn=["Webkit","O","Moz","ms"];ot.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nn(e,"opacity");return""===n?"1":n}}}},cssNumber:{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":rt.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=ot.camelCase(t),l=e.style;t=ot.cssProps[a]||(ot.cssProps[a]=I(l,a));s=ot.cssHooks[t]||ot.cssHooks[a];if(void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:l[t];o=typeof n;if("string"===o&&(i=pn.exec(n))){n=(i[1]+1)*i[2]+parseFloat(ot.css(e,t));o="number"}if(null!=n&&n===n){"number"!==o||ot.cssNumber[a]||(n+="px");rt.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit");if(!(s&&"set"in s&&void 0===(n=s.set(e,n,r))))try{l[t]=n}catch(u){}}}},css:function(e,t,n,r){var i,o,s,a=ot.camelCase(t);t=ot.cssProps[a]||(ot.cssProps[a]=I(e.style,a));s=ot.cssHooks[t]||ot.cssHooks[a];s&&"get"in s&&(o=s.get(e,!0,n));void 0===o&&(o=nn(e,t,r));"normal"===o&&t in fn&&(o=fn[t]);if(""===n||n){i=parseFloat(o);return n===!0||ot.isNumeric(i)?i||0:o}return o}});ot.each(["height","width"],function(e,t){ot.cssHooks[t]={get:function(e,n,r){return n?un.test(ot.css(e,"display"))&&0===e.offsetWidth?ot.swap(e,dn,function(){return _(e,t,r)}):_(e,t,r):void 0},set:function(e,n,r){var i=r&&tn(e);return R(e,n,r?O(e,t,r,rt.boxSizing&&"border-box"===ot.css(e,"boxSizing",!1,i),i):0)}}});rt.opacity||(ot.cssHooks.opacity={get:function(e,t){return ln.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=ot.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1;if((t>=1||""===t)&&""===ot.trim(o.replace(an,""))&&n.removeAttribute){n.removeAttribute("filter");if(""===t||r&&!r.filter)return}n.filter=an.test(o)?o.replace(an,i):o+" "+i}});ot.cssHooks.marginRight=A(rt.reliableMarginRight,function(e,t){return t?ot.swap(e,{display:"inline-block"},nn,[e,"marginRight"]):void 0});ot.each({margin:"",padding:"",border:"Width"},function(e,t){ot.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+It[r]+t]=o[r]||o[r-2]||o[0];return i}};rn.test(e)||(ot.cssHooks[e+t].set=R)});ot.fn.extend({css:function(e,t){return Rt(this,function(e,t,n){var r,i,o={},s=0;if(ot.isArray(t)){r=tn(e);i=t.length;for(;i>s;s++)o[t[s]]=ot.css(e,t[s],!1,r);return o}return void 0!==n?ot.style(e,t,n):ot.css(e,t)},e,t,arguments.length>1)},show:function(){return w(this,!0)},hide:function(){return w(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){wt(this)?ot(this).show():ot(this).hide()})}});ot.Tween=D;D.prototype={constructor:D,init:function(e,t,n,r,i,o){this.elem=e;this.prop=n;this.easing=i||"swing";this.options=t;this.start=this.now=this.cur();this.end=r;this.unit=o||(ot.cssNumber[n]?"":"px")},cur:function(){var e=D.propHooks[this.prop];return e&&e.get?e.get(this):D.propHooks._default.get(this)},run:function(e){var t,n=D.propHooks[this.prop];this.pos=t=this.options.duration?ot.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):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):D.propHooks._default.set(this);return this}};D.prototype.init.prototype=D.prototype;D.propHooks={_default:{get:function(e){var t;if(null!=e.elem[e.prop]&&(!e.elem.style||null==e.elem.style[e.prop]))return e.elem[e.prop];t=ot.css(e.elem,e.prop,"");return t&&"auto"!==t?t:0},set:function(e){ot.fx.step[e.prop]?ot.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ot.cssProps[e.prop]]||ot.cssHooks[e.prop])?ot.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}};D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}};ot.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}};ot.fx=D.prototype.init;ot.fx.step={};var gn,mn,vn=/^(?:toggle|show|hide)$/,En=new RegExp("^(?:([+-])=|)("+At+")([a-z%]*)$","i"),yn=/queueHooks$/,xn=[M],bn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=En.exec(t),o=i&&i[3]||(ot.cssNumber[e]?"":"px"),s=(ot.cssNumber[e]||"px"!==o&&+r)&&En.exec(ot.css(n.elem,e)),a=1,l=20;if(s&&s[3]!==o){o=o||s[3];i=i||[];s=+r||1;do{a=a||".5";s/=a;ot.style(n.elem,e,s+o)}while(a!==(a=n.cur()/r)&&1!==a&&--l)}if(i){s=n.start=+s||+r||0;n.unit=o;n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]}return n}]};ot.Animation=ot.extend(G,{tweener:function(e,t){if(ot.isFunction(e)){t=e;e=["*"]}else e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++){n=e[r];bn[n]=bn[n]||[];bn[n].unshift(t)}},prefilter:function(e,t){t?xn.unshift(e):xn.push(e)}});ot.speed=function(e,t,n){var r=e&&"object"==typeof e?ot.extend({},e):{complete:n||!n&&t||ot.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ot.isFunction(t)&&t};r.duration=ot.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ot.fx.speeds?ot.fx.speeds[r.duration]:ot.fx.speeds._default;(null==r.queue||r.queue===!0)&&(r.queue="fx");r.old=r.complete;r.complete=function(){ot.isFunction(r.old)&&r.old.call(this);r.queue&&ot.dequeue(this,r.queue)};return r};ot.fn.extend({fadeTo:function(e,t,n,r){return this.filter(wt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ot.isEmptyObject(e),o=ot.speed(t,n,r),s=function(){var t=G(this,ot.extend({},e),o);(i||ot._data(this,"finish"))&&t.stop(!0)};s.finish=s;return i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop;t(n)};if("string"!=typeof e){n=t;t=e;e=void 0}t&&e!==!1&&this.queue(e||"fx",[]);return this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=ot.timers,s=ot._data(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&yn.test(i)&&r(s[i]);for(i=o.length;i--;)if(o[i].elem===this&&(null==e||o[i].queue===e)){o[i].anim.stop(n);t=!1;o.splice(i,1)}(t||!n)&&ot.dequeue(this,e)})},finish:function(e){e!==!1&&(e=e||"fx");return this.each(function(){var t,n=ot._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=ot.timers,s=r?r.length:0;n.finish=!0;ot.queue(this,e,[]);i&&i.stop&&i.stop.call(this,!0);for(t=o.length;t--;)if(o[t].elem===this&&o[t].queue===e){o[t].anim.stop(!0);o.splice(t,1)}for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});ot.each(["toggle","show","hide"],function(e,t){var n=ot.fn[t];ot.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(F(t,!0),e,r,i)}});ot.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ot.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}});ot.timers=[];ot.fx.tick=function(){var e,t=ot.timers,n=0;gn=ot.now();for(;n<t.length;n++){e=t[n];e()||t[n]!==e||t.splice(n--,1)}t.length||ot.fx.stop();gn=void 0};ot.fx.timer=function(e){ot.timers.push(e);e()?ot.fx.start():ot.timers.pop()};ot.fx.interval=13;ot.fx.start=function(){mn||(mn=setInterval(ot.fx.tick,ot.fx.interval))};ot.fx.stop=function(){clearInterval(mn);mn=null};ot.fx.speeds={slow:600,fast:200,_default:400};ot.fn.delay=function(e,t){e=ot.fx?ot.fx.speeds[e]||e:e;t=t||"fx";return this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})};(function(){var e,t,n,r,i;t=gt.createElement("div");t.setAttribute("className","t");t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";r=t.getElementsByTagName("a")[0];n=gt.createElement("select");i=n.appendChild(gt.createElement("option"));e=t.getElementsByTagName("input")[0];r.style.cssText="top:1px";rt.getSetAttribute="t"!==t.className;rt.style=/top/.test(r.getAttribute("style"));rt.hrefNormalized="/a"===r.getAttribute("href");rt.checkOn=!!e.value;rt.optSelected=i.selected;rt.enctype=!!gt.createElement("form").enctype;n.disabled=!0;rt.optDisabled=!i.disabled;e=gt.createElement("input");e.setAttribute("value","");rt.input=""===e.getAttribute("value");e.value="t";e.setAttribute("type","radio");rt.radioValue="t"===e.value})();var Tn=/\r/g;ot.fn.extend({val:function(e){var t,n,r,i=this[0];if(arguments.length){r=ot.isFunction(e);return this.each(function(n){var i;if(1===this.nodeType){i=r?e.call(this,n,ot(this).val()):e;null==i?i="":"number"==typeof i?i+="":ot.isArray(i)&&(i=ot.map(i,function(e){return null==e?"":e+""}));t=ot.valHooks[this.type]||ot.valHooks[this.nodeName.toLowerCase()];t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i)}})}if(i){t=ot.valHooks[i.type]||ot.valHooks[i.nodeName.toLowerCase()];if(t&&"get"in t&&void 0!==(n=t.get(i,"value")))return n;n=i.value;return"string"==typeof n?n.replace(Tn,""):null==n?"":n}}});ot.extend({valHooks:{option:{get:function(e){var t=ot.find.attr(e,"value");return null!=t?t:ot.trim(ot.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,l=0>i?a:o?i:0;a>l;l++){n=r[l];if(!(!n.selected&&l!==i||(rt.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&ot.nodeName(n.parentNode,"optgroup"))){t=ot(n).val();if(o)return t;s.push(t)}}return s},set:function(e,t){for(var n,r,i=e.options,o=ot.makeArray(t),s=i.length;s--;){r=i[s];if(ot.inArray(ot.valHooks.option.get(r),o)>=0)try{r.selected=n=!0}catch(a){r.scrollHeight}else r.selected=!1}n||(e.selectedIndex=-1);return i}}}});ot.each(["radio","checkbox"],function(){ot.valHooks[this]={set:function(e,t){return ot.isArray(t)?e.checked=ot.inArray(ot(e).val(),t)>=0:void 0}};rt.checkOn||(ot.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Sn,Nn,Cn=ot.expr.attrHandle,Ln=/^(?:checked|selected)$/i,An=rt.getSetAttribute,In=rt.input;ot.fn.extend({attr:function(e,t){return Rt(this,ot.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ot.removeAttr(this,e)})}});ot.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o){if(typeof e.getAttribute===Nt)return ot.prop(e,t,n);if(1!==o||!ot.isXMLDoc(e)){t=t.toLowerCase();r=ot.attrHooks[t]||(ot.expr.match.bool.test(t)?Nn:Sn)}if(void 0===n){if(r&&"get"in r&&null!==(i=r.get(e,t)))return i;i=ot.find.attr(e,t);return null==i?void 0:i}if(null!==n){if(r&&"set"in r&&void 0!==(i=r.set(e,n,t)))return i;e.setAttribute(t,n+"");return n}ot.removeAttr(e,t)}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(xt);if(o&&1===e.nodeType)for(;n=o[i++];){r=ot.propFix[n]||n;ot.expr.match.bool.test(n)?In&&An||!Ln.test(n)?e[r]=!1:e[ot.camelCase("default-"+n)]=e[r]=!1:ot.attr(e,n,"");e.removeAttribute(An?n:r)}},attrHooks:{type:{set:function(e,t){if(!rt.radioValue&&"radio"===t&&ot.nodeName(e,"input")){var n=e.value;e.setAttribute("type",t);n&&(e.value=n);return t}}}}});Nn={set:function(e,t,n){t===!1?ot.removeAttr(e,n):In&&An||!Ln.test(n)?e.setAttribute(!An&&ot.propFix[n]||n,n):e[ot.camelCase("default-"+n)]=e[n]=!0;return n}};ot.each(ot.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Cn[t]||ot.find.attr;Cn[t]=In&&An||!Ln.test(t)?function(e,t,r){var i,o;if(!r){o=Cn[t];Cn[t]=i;i=null!=n(e,t,r)?t.toLowerCase():null;Cn[t]=o}return i}:function(e,t,n){return n?void 0:e[ot.camelCase("default-"+t)]?t.toLowerCase():null}});In&&An||(ot.attrHooks.value={set:function(e,t,n){if(!ot.nodeName(e,"input"))return Sn&&Sn.set(e,t,n);e.defaultValue=t;return void 0}});if(!An){Sn={set:function(e,t,n){var r=e.getAttributeNode(n);r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n));r.value=t+="";return"value"===n||t===e.getAttribute(n)?t:void 0}};Cn.id=Cn.name=Cn.coords=function(e,t,n){var r;return n?void 0:(r=e.getAttributeNode(t))&&""!==r.value?r.value:null};ot.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:Sn.set};ot.attrHooks.contenteditable={set:function(e,t,n){Sn.set(e,""===t?!1:t,n)}};ot.each(["width","height"],function(e,t){ot.attrHooks[t]={set:function(e,n){if(""===n){e.setAttribute(t,"auto");return n}}}})}rt.style||(ot.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var wn=/^(?:input|select|textarea|button|object)$/i,Rn=/^(?:a|area)$/i;ot.fn.extend({prop:function(e,t){return Rt(this,ot.prop,e,t,arguments.length>1)},removeProp:function(e){e=ot.propFix[e]||e;return this.each(function(){try{this[e]=void 0;delete this[e]}catch(t){}})}});ot.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s){o=1!==s||!ot.isXMLDoc(e);if(o){t=ot.propFix[t]||t;i=ot.propHooks[t]}return 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=ot.find.attr(e,"tabindex");return t?parseInt(t,10):wn.test(e.nodeName)||Rn.test(e.nodeName)&&e.href?0:-1}}}});rt.hrefNormalized||ot.each(["href","src"],function(e,t){ot.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}});rt.optSelected||(ot.propHooks.selected={get:function(e){var t=e.parentNode;if(t){t.selectedIndex;t.parentNode&&t.parentNode.selectedIndex}return null}});ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this});rt.enctype||(ot.propFix.enctype="encoding");var On=/[\t\r\n\f]/g;ot.fn.extend({addClass:function(e){var t,n,r,i,o,s,a=0,l=this.length,u="string"==typeof e&&e;if(ot.isFunction(e))return this.each(function(t){ot(this).addClass(e.call(this,t,this.className))});if(u){t=(e||"").match(xt)||[];for(;l>a;a++){n=this[a];r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(On," "):" ");if(r){o=0;for(;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");s=ot.trim(r);n.className!==s&&(n.className=s)}}}return this},removeClass:function(e){var t,n,r,i,o,s,a=0,l=this.length,u=0===arguments.length||"string"==typeof e&&e;if(ot.isFunction(e))return this.each(function(t){ot(this).removeClass(e.call(this,t,this.className))});if(u){t=(e||"").match(xt)||[];for(;l>a;a++){n=this[a];r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(On," "):"");if(r){o=0;for(;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");s=e?ot.trim(r):"";n.className!==s&&(n.className=s)}}}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(ot.isFunction(e)?function(n){ot(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,r=0,i=ot(this),o=e.match(xt)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else if(n===Nt||"boolean"===n){this.className&&ot._data(this,"__className__",this.className);this.className=this.className||e===!1?"":ot._data(this,"__className__")||""}})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(On," ").indexOf(t)>=0)return!0;return!1}});ot.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){ot.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});ot.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},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)}});var _n=ot.now(),Dn=/\?/,kn=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ot.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,r=null,i=ot.trim(e+"");return i&&!ot.trim(i.replace(kn,function(e,t,i,o){n&&t&&(r=0);if(0===r)return e;n=i||t;r+=!o-!i;return""}))?Function("return "+i)():ot.error("Invalid JSON: "+e)};ot.parseXML=function(e){var n,r;if(!e||"string"!=typeof e)return null;try{if(t.DOMParser){r=new DOMParser;n=r.parseFromString(e,"text/xml")}else{n=new ActiveXObject("Microsoft.XMLDOM");n.async="false";n.loadXML(e)}}catch(i){n=void 0}n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ot.error("Invalid XML: "+e);return n};var Fn,Pn,Mn=/#.*$/,jn=/([?&])_=[^&]*/,Gn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Bn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Un=/^(?:GET|HEAD)$/,qn=/^\/\//,Hn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Vn={},Wn={},zn="*/".concat("*");try{Pn=location.href}catch($n){Pn=gt.createElement("a");Pn.href="";Pn=Pn.href}Fn=Hn.exec(Pn.toLowerCase())||[];ot.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Pn,type:"GET",isLocal:Bn.test(Fn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ot.parseJSON,"text xml":ot.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?q(q(e,ot.ajaxSettings),t):q(ot.ajaxSettings,e)},ajaxPrefilter:B(Vn),ajaxTransport:B(Wn),ajax:function(e,t){function n(e,t,n,r){var i,c,v,E,x,T=t;if(2!==y){y=2;a&&clearTimeout(a);u=void 0;s=r||"";b.readyState=e>0?4:0;i=e>=200&&300>e||304===e;n&&(E=H(p,b,n));E=V(p,E,b,i);if(i){if(p.ifModified){x=b.getResponseHeader("Last-Modified");x&&(ot.lastModified[o]=x);x=b.getResponseHeader("etag");x&&(ot.etag[o]=x)}if(204===e||"HEAD"===p.type)T="nocontent";else if(304===e)T="notmodified";else{T=E.state;c=E.data;v=E.error;i=!v}}else{v=T;if(e||!T){T="error";0>e&&(e=0)}}b.status=e;b.statusText=(t||T)+"";i?h.resolveWith(d,[c,T,b]):h.rejectWith(d,[b,T,v]);b.statusCode(m);m=void 0;l&&f.trigger(i?"ajaxSuccess":"ajaxError",[b,p,i?c:v]);g.fireWith(d,[b,T]);if(l){f.trigger("ajaxComplete",[b,p]);--ot.active||ot.event.trigger("ajaxStop")}}}if("object"==typeof e){t=e;e=void 0}t=t||{};var r,i,o,s,a,l,u,c,p=ot.ajaxSetup({},t),d=p.context||p,f=p.context&&(d.nodeType||d.jquery)?ot(d):ot.event,h=ot.Deferred(),g=ot.Callbacks("once memory"),m=p.statusCode||{},v={},E={},y=0,x="canceled",b={readyState:0,getResponseHeader:function(e){var t; if(2===y){if(!c){c={};for(;t=Gn.exec(s);)c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();if(!y){e=E[n]=E[n]||e;v[e]=t}return this},overrideMimeType:function(e){y||(p.mimeType=e);return this},statusCode:function(e){var t;if(e)if(2>y)for(t in e)m[t]=[m[t],e[t]];else b.always(e[b.status]);return this},abort:function(e){var t=e||x;u&&u.abort(t);n(0,t);return this}};h.promise(b).complete=g.add;b.success=b.done;b.error=b.fail;p.url=((e||p.url||Pn)+"").replace(Mn,"").replace(qn,Fn[1]+"//");p.type=t.method||t.type||p.method||p.type;p.dataTypes=ot.trim(p.dataType||"*").toLowerCase().match(xt)||[""];if(null==p.crossDomain){r=Hn.exec(p.url.toLowerCase());p.crossDomain=!(!r||r[1]===Fn[1]&&r[2]===Fn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(Fn[3]||("http:"===Fn[1]?"80":"443")))}p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ot.param(p.data,p.traditional));U(Vn,p,t,b);if(2===y)return b;l=ot.event&&p.global;l&&0===ot.active++&&ot.event.trigger("ajaxStart");p.type=p.type.toUpperCase();p.hasContent=!Un.test(p.type);o=p.url;if(!p.hasContent){if(p.data){o=p.url+=(Dn.test(o)?"&":"?")+p.data;delete p.data}p.cache===!1&&(p.url=jn.test(o)?o.replace(jn,"$1_="+_n++):o+(Dn.test(o)?"&":"?")+"_="+_n++)}if(p.ifModified){ot.lastModified[o]&&b.setRequestHeader("If-Modified-Since",ot.lastModified[o]);ot.etag[o]&&b.setRequestHeader("If-None-Match",ot.etag[o])}(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&b.setRequestHeader("Content-Type",p.contentType);b.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)b.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(d,b,p)===!1||2===y))return b.abort();x="abort";for(i in{success:1,error:1,complete:1})b[i](p[i]);u=U(Wn,p,t,b);if(u){b.readyState=1;l&&f.trigger("ajaxSend",[b,p]);p.async&&p.timeout>0&&(a=setTimeout(function(){b.abort("timeout")},p.timeout));try{y=1;u.send(v,n)}catch(T){if(!(2>y))throw T;n(-1,T)}}else n(-1,"No Transport");return b},getJSON:function(e,t,n){return ot.get(e,t,n,"json")},getScript:function(e,t){return ot.get(e,void 0,t,"script")}});ot.each(["get","post"],function(e,t){ot[t]=function(e,n,r,i){if(ot.isFunction(n)){i=i||r;r=n;n=void 0}return ot.ajax({url:e,type:t,dataType:i,data:n,success:r})}});ot._evalUrl=function(e){return ot.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})};ot.fn.extend({wrapAll:function(e){if(ot.isFunction(e))return this.each(function(t){ot(this).wrapAll(e.call(this,t))});if(this[0]){var t=ot(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(ot.isFunction(e)?function(t){ot(this).wrapInner(e.call(this,t))}:function(){var t=ot(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ot.isFunction(e);return this.each(function(n){ot(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ot.nodeName(this,"body")||ot(this).replaceWith(this.childNodes)}).end()}});ot.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!rt.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||ot.css(e,"display"))};ot.expr.filters.visible=function(e){return!ot.expr.filters.hidden(e)};var Xn=/%20/g,Kn=/\[\]$/,Yn=/\r?\n/g,Qn=/^(?:submit|button|image|reset|file)$/i,Jn=/^(?:input|select|textarea|keygen)/i;ot.param=function(e,t){var n,r=[],i=function(e,t){t=ot.isFunction(t)?t():null==t?"":t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};void 0===t&&(t=ot.ajaxSettings&&ot.ajaxSettings.traditional);if(ot.isArray(e)||e.jquery&&!ot.isPlainObject(e))ot.each(e,function(){i(this.name,this.value)});else for(n in e)W(n,e[n],t,i);return r.join("&").replace(Xn,"+")};ot.fn.extend({serialize:function(){return ot.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ot.prop(this,"elements");return e?ot.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ot(this).is(":disabled")&&Jn.test(this.nodeName)&&!Qn.test(e)&&(this.checked||!Ot.test(e))}).map(function(e,t){var n=ot(this).val();return null==n?null:ot.isArray(n)?ot.map(n,function(e){return{name:t.name,value:e.replace(Yn,"\r\n")}}):{name:t.name,value:n.replace(Yn,"\r\n")}}).get()}});ot.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&z()||$()}:z;var Zn=0,er={},tr=ot.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var e in er)er[e](void 0,!0)});rt.cors=!!tr&&"withCredentials"in tr;tr=rt.ajax=!!tr;tr&&ot.ajaxTransport(function(e){if(!e.crossDomain||rt.cors){var t;return{send:function(n,r){var i,o=e.xhr(),s=++Zn;o.open(e.type,e.url,e.async,e.username,e.password);if(e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType);e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)void 0!==n[i]&&o.setRequestHeader(i,n[i]+"");o.send(e.hasContent&&e.data||null);t=function(n,i){var a,l,u;if(t&&(i||4===o.readyState)){delete er[s];t=void 0;o.onreadystatechange=ot.noop;if(i)4!==o.readyState&&o.abort();else{u={};a=o.status;"string"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(c){l=""}a||!e.isLocal||e.crossDomain?1223===a&&(a=204):a=u.text?200:404}}u&&r(a,l,u,o.getAllResponseHeaders())};e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=er[s]=t:t()},abort:function(){t&&t(void 0,!0)}}}});ot.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){ot.globalEval(e);return e}}});ot.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1);if(e.crossDomain){e.type="GET";e.global=!1}});ot.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=gt.head||ot("head")[0]||gt.documentElement;return{send:function(r,i){t=gt.createElement("script");t.async=!0;e.scriptCharset&&(t.charset=e.scriptCharset);t.src=e.url;t.onload=t.onreadystatechange=function(e,n){if(n||!t.readyState||/loaded|complete/.test(t.readyState)){t.onload=t.onreadystatechange=null;t.parentNode&&t.parentNode.removeChild(t);t=null;n||i(200,"success")}};n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var nr=[],rr=/(=)\?(?=&|$)|\?\?/;ot.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=nr.pop()||ot.expando+"_"+_n++;this[e]=!0;return e}});ot.ajaxPrefilter("json jsonp",function(e,n,r){var i,o,s,a=e.jsonp!==!1&&(rr.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&rr.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0]){i=e.jsonpCallback=ot.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback;a?e[a]=e[a].replace(rr,"$1"+i):e.jsonp!==!1&&(e.url+=(Dn.test(e.url)?"&":"?")+e.jsonp+"="+i);e.converters["script json"]=function(){s||ot.error(i+" was not called");return s[0]};e.dataTypes[0]="json";o=t[i];t[i]=function(){s=arguments};r.always(function(){t[i]=o;if(e[i]){e.jsonpCallback=n.jsonpCallback;nr.push(i)}s&&ot.isFunction(o)&&o(s[0]);s=o=void 0});return"script"}});ot.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;if("boolean"==typeof t){n=t;t=!1}t=t||gt;var r=dt.exec(e),i=!n&&[];if(r)return[t.createElement(r[1])];r=ot.buildFragment([e],t,i);i&&i.length&&ot(i).remove();return ot.merge([],r.childNodes)};var ir=ot.fn.load;ot.fn.load=function(e,t,n){if("string"!=typeof e&&ir)return ir.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");if(a>=0){r=ot.trim(e.slice(a,e.length));e=e.slice(0,a)}if(ot.isFunction(t)){n=t;t=void 0}else t&&"object"==typeof t&&(o="POST");s.length>0&&ot.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){i=arguments;s.html(r?ot("<div>").append(ot.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,i||[e.responseText,t,e])});return this};ot.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ot.fn[t]=function(e){return this.on(t,e)}});ot.expr.filters.animated=function(e){return ot.grep(ot.timers,function(t){return e===t.elem}).length};var or=t.document.documentElement;ot.offset={setOffset:function(e,t,n){var r,i,o,s,a,l,u,c=ot.css(e,"position"),p=ot(e),d={};"static"===c&&(e.style.position="relative");a=p.offset();o=ot.css(e,"top");l=ot.css(e,"left");u=("absolute"===c||"fixed"===c)&&ot.inArray("auto",[o,l])>-1;if(u){r=p.position();s=r.top;i=r.left}else{s=parseFloat(o)||0;i=parseFloat(l)||0}ot.isFunction(t)&&(t=t.call(e,n,a));null!=t.top&&(d.top=t.top-a.top+s);null!=t.left&&(d.left=t.left-a.left+i);"using"in t?t.using.call(e,d):p.css(d)}};ot.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ot.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o){t=o.documentElement;if(!ot.contains(t,i))return r;typeof i.getBoundingClientRect!==Nt&&(r=i.getBoundingClientRect());n=X(o);return{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}}},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];if("fixed"===ot.css(r,"position"))t=r.getBoundingClientRect();else{e=this.offsetParent();t=this.offset();ot.nodeName(e[0],"html")||(n=e.offset());n.top+=ot.css(e[0],"borderTopWidth",!0);n.left+=ot.css(e[0],"borderLeftWidth",!0)}return{top:t.top-n.top-ot.css(r,"marginTop",!0),left:t.left-n.left-ot.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||or;e&&!ot.nodeName(e,"html")&&"static"===ot.css(e,"position");)e=e.offsetParent;return e||or})}});ot.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);ot.fn[e]=function(r){return Rt(this,function(e,r,i){var o=X(e);if(void 0===i)return o?t in o?o[t]:o.document.documentElement[r]:e[r];o?o.scrollTo(n?ot(o).scrollLeft():i,n?i:ot(o).scrollTop()):e[r]=i;return void 0},e,r,arguments.length,null)}});ot.each(["top","left"],function(e,t){ot.cssHooks[t]=A(rt.pixelPosition,function(e,n){if(n){n=nn(e,t);return on.test(n)?ot(e).position()[t]+"px":n}})});ot.each({Height:"height",Width:"width"},function(e,t){ot.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ot.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||i===!0?"margin":"border");return Rt(this,function(t,n,r){var i;if(ot.isWindow(t))return t.document.documentElement["client"+e];if(9===t.nodeType){i=t.documentElement;return Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])}return void 0===r?ot.css(t,n,s):ot.style(t,n,r,s)},t,o?r:void 0,o,null)}})});ot.fn.size=function(){return this.length};ot.fn.andSelf=ot.fn.addBack;"function"==typeof e&&e.amd&&e("jquery",[],function(){return ot});var sr=t.jQuery,ar=t.$;ot.noConflict=function(e){t.$===ot&&(t.$=ar);e&&t.jQuery===ot&&(t.jQuery=sr);return ot};typeof n===Nt&&(t.jQuery=t.$=ot);return ot})},{}],5:[function(t,n,r){(function(t,i){"function"==typeof e&&e.amd?e(i):"object"==typeof r?n.exports=i():t.MicroPlugin=i()})(this,function(){var e={};e.mixin=function(e){e.plugins={};e.prototype.initializePlugins=function(e){var n,r,i,o=this,s=[];o.plugins={names:[],settings:{},requested:{},loaded:{}};if(t.isArray(e))for(n=0,r=e.length;r>n;n++)if("string"==typeof e[n])s.push(e[n]);else{o.plugins.settings[e[n].name]=e[n].options;s.push(e[n].name)}else if(e)for(i in e)if(e.hasOwnProperty(i)){o.plugins.settings[i]=e[i];s.push(i)}for(;s.length;)o.require(s.shift())};e.prototype.loadPlugin=function(t){var n=this,r=n.plugins,i=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');r.requested[t]=!0;r.loaded[t]=i.fn.apply(n,[n.plugins.settings[t]||{}]);r.names.push(t)};e.prototype.require=function(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return n.loaded[e]};e.define=function(t,n){e.plugins[t]={name:t,fn:n}}};var t={isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}};return e})},{}],6:[function(t,n,r){(function(i,o){"function"==typeof e&&e.amd?e(["jquery","sifter","microplugin"],o):"object"==typeof r?n.exports=o(t("jquery"),t("sifter"),t("microplugin")):i.Selectize=o(i.jQuery,i.Sifter,i.MicroPlugin)})(this,function(e,t,n){"use strict";var r=function(e,t){if("string"!=typeof t||t.length){var n="string"==typeof t?new RegExp(t,"i"):t,r=function(e){var t=0;if(3===e.nodeType){var i=e.data.search(n);if(i>=0&&e.data.length>0){var o=e.data.match(n),s=document.createElement("span");s.className="highlight";var a=e.splitText(i),l=(a.splitText(o[0].length),a.cloneNode(!0));s.appendChild(l);a.parentNode.replaceChild(s,a);t=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName))for(var u=0;u<e.childNodes.length;++u)u+=r(e.childNodes[u]);return t};return e.each(function(){r(this)})}},i=function(){};i.prototype={on:function(e,t){this._events=this._events||{};this._events[e]=this._events[e]||[];this._events[e].push(t)},off:function(e,t){var n=arguments.length;if(0===n)return delete this._events;if(1===n)return delete this._events[e];this._events=this._events||{};e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)},trigger:function(e){this._events=this._events||{};if(e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}};i.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=i.prototype[t[n]]};var o=/Mac/.test(navigator.userAgent),s=65,a=13,l=27,u=37,c=38,p=80,d=39,f=40,h=78,g=8,m=46,v=16,E=o?91:17,y=o?18:17,x=9,b=1,T=2,S=function(e){return"undefined"!=typeof e},N=function(e){return"undefined"==typeof e||null===e?null:"boolean"==typeof e?e?"1":"0":e+""},C=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},L=function(e){return(e+"").replace(/\$/g,"$$$$")},A={};A.before=function(e,t,n){var r=e[t];e[t]=function(){n.apply(e,arguments);return r.apply(e,arguments)}};A.after=function(e,t,n){var r=e[t];e[t]=function(){var t=r.apply(e,arguments);n.apply(e,arguments);return t}};var I=function(t,n){if(!e.isArray(n))return n;var r,i,o={};for(r=0,i=n.length;i>r;r++)n[r].hasOwnProperty(t)&&(o[n[r][t]]=n[r]);return o},w=function(e){var t=!1;return function(){if(!t){t=!0;e.apply(this,arguments)}}},R=function(e,t){var n;return function(){var r=this,i=arguments;window.clearTimeout(n);n=window.setTimeout(function(){e.apply(r,i)},t)}},O=function(e,t,n){var r,i=e.trigger,o={};e.trigger=function(){var n=arguments[0];if(-1===t.indexOf(n))return i.apply(e,arguments);o[n]=arguments;return void 0};n.apply(e,[]);e.trigger=i;for(r in o)o.hasOwnProperty(r)&&i.apply(e,o[r])},_=function(e,t,n,r){e.on(t,n,function(t){for(var n=t.target;n&&n.parentNode!==e[0];)n=n.parentNode;t.currentTarget=n;return r.apply(this,[t])})},D=function(e){var t={};if("selectionStart"in e){t.start=e.selectionStart;t.length=e.selectionEnd-t.start}else if(document.selection){e.focus();var n=document.selection.createRange(),r=document.selection.createRange().text.length;n.moveStart("character",-e.value.length);t.start=n.text.length-r;t.length=r}return t},k=function(e,t,n){var r,i,o={};if(n)for(r=0,i=n.length;i>r;r++)o[n[r]]=e.css(n[r]);else o=e.css();t.css(o)},F=function(t,n){if(!t)return 0;var r=e("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(t).appendTo("body");k(n,r,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var i=r.width();r.remove();return i},P=function(e){var t=null,n=function(n,r){var i,o,s,a,l,u,c,p;n=n||window.event||{};r=r||{};if(!n.metaKey&&!n.altKey&&(r.force||e.data("grow")!==!1)){i=e.val();if(n.type&&"keydown"===n.type.toLowerCase()){o=n.keyCode;s=o>=97&&122>=o||o>=65&&90>=o||o>=48&&57>=o||32===o;if(o===m||o===g){p=D(e[0]);p.length?i=i.substring(0,p.start)+i.substring(p.start+p.length):o===g&&p.start?i=i.substring(0,p.start-1)+i.substring(p.start+1):o===m&&"undefined"!=typeof p.start&&(i=i.substring(0,p.start)+i.substring(p.start+1))}else if(s){u=n.shiftKey;c=String.fromCharCode(n.keyCode);c=u?c.toUpperCase():c.toLowerCase();i+=c}}a=e.attr("placeholder");!i&&a&&(i=a);l=F(i,e)+4;if(l!==t){t=l;e.width(l);e.triggerHandler("resize")}}};e.on("keydown keyup update blur",n);n()},M=function(n,r){var i,o,s=this;o=n[0];o.selectize=s;var a=window.getComputedStyle&&window.getComputedStyle(o,null);i=a?a.getPropertyValue("direction"):o.currentStyle&&o.currentStyle.direction;i=i||n.parents("[dir]:first").attr("dir")||"";e.extend(s,{settings:r,$input:n,tagType:"select"===o.tagName.toLowerCase()?b:T,rtl:/rtl/i.test(i),eventNS:".selectize"+ ++M.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:n.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===r.loadThrottle?s.onSearchChange:R(s.onSearchChange,r.loadThrottle)});s.sifter=new t(this.options,{diacritics:r.diacritics});e.extend(s.options,I(r.valueField,r.options));delete s.settings.options;e.extend(s.optgroups,I(r.optgroupValueField,r.optgroups));delete s.settings.optgroups;s.settings.mode=s.settings.mode||(1===s.settings.maxItems?"single":"multi");"boolean"!=typeof s.settings.hideSelected&&(s.settings.hideSelected="multi"===s.settings.mode);s.initializePlugins(s.settings.plugins);s.setupCallbacks();s.setupTemplates();s.setup()};i.mixin(M);n.mixin(M);e.extend(M.prototype,{setup:function(){var t,n,r,i,s,a,l,u,c,p,d=this,f=d.settings,h=d.eventNS,g=e(window),m=e(document),x=d.$input;l=d.settings.mode;u=x.attr("tabindex")||"";c=x.attr("class")||"";t=e("<div>").addClass(f.wrapperClass).addClass(c).addClass(l);n=e("<div>").addClass(f.inputClass).addClass("items").appendTo(t);r=e('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",u);a=e(f.dropdownParent||t);i=e("<div>").addClass(f.dropdownClass).addClass(l).hide().appendTo(a);s=e("<div>").addClass(f.dropdownContentClass).appendTo(i);d.settings.copyClassesToDropdown&&i.addClass(c);t.css({width:x[0].style.width});if(d.plugins.names.length){p="plugin-"+d.plugins.names.join(" plugin-");t.addClass(p);i.addClass(p)}(null===f.maxItems||f.maxItems>1)&&d.tagType===b&&x.attr("multiple","multiple");d.settings.placeholder&&r.attr("placeholder",f.placeholder);x.attr("autocorrect")&&r.attr("autocorrect",x.attr("autocorrect"));x.attr("autocapitalize")&&r.attr("autocapitalize",x.attr("autocapitalize"));d.$wrapper=t;d.$control=n;d.$control_input=r;d.$dropdown=i;d.$dropdown_content=s;i.on("mouseenter","[data-selectable]",function(){return d.onOptionHover.apply(d,arguments)});i.on("mousedown","[data-selectable]",function(){return d.onOptionSelect.apply(d,arguments)});_(n,"mousedown","*:not(input)",function(){return d.onItemSelect.apply(d,arguments)});P(r);n.on({mousedown:function(){return d.onMouseDown.apply(d,arguments)},click:function(){return d.onClick.apply(d,arguments)}});r.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return d.onKeyDown.apply(d,arguments)},keyup:function(){return d.onKeyUp.apply(d,arguments)},keypress:function(){return d.onKeyPress.apply(d,arguments)},resize:function(){d.positionDropdown.apply(d,[])},blur:function(){return d.onBlur.apply(d,arguments)},focus:function(){d.ignoreBlur=!1;return d.onFocus.apply(d,arguments)},paste:function(){return d.onPaste.apply(d,arguments)}});m.on("keydown"+h,function(e){d.isCmdDown=e[o?"metaKey":"ctrlKey"];d.isCtrlDown=e[o?"altKey":"ctrlKey"];d.isShiftDown=e.shiftKey});m.on("keyup"+h,function(e){e.keyCode===y&&(d.isCtrlDown=!1);e.keyCode===v&&(d.isShiftDown=!1);e.keyCode===E&&(d.isCmdDown=!1)});m.on("mousedown"+h,function(e){if(d.isFocused){if(e.target===d.$dropdown[0]||e.target.parentNode===d.$dropdown[0])return!1;d.$control.has(e.target).length||e.target===d.$control[0]||d.blur()}});g.on(["scroll"+h,"resize"+h].join(" "),function(){d.isOpen&&d.positionDropdown.apply(d,arguments)});g.on("mousemove"+h,function(){d.ignoreHover=!1});this.revertSettings={$children:x.children().detach(),tabindex:x.attr("tabindex")};x.attr("tabindex",-1).hide().after(d.$wrapper);if(e.isArray(f.items)){d.setValue(f.items);delete f.items}x[0].validity&&x.on("invalid"+h,function(e){e.preventDefault();d.isInvalid=!0;d.refreshState()});d.updateOriginalInput();d.refreshItems();d.refreshState();d.updatePlaceholder();d.isSetup=!0;x.is(":disabled")&&d.disable();d.on("change",this.onChange);x.data("selectize",d);x.addClass("selectized");d.trigger("initialize");f.preload===!0&&d.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,r=t.settings.optgroupLabelField,i={optgroup:function(e){return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[r])+"</div>"},option:function(e,t){return'<div class="option">'+t(e[n])+"</div>"},item:function(e,t){return'<div class="item">'+t(e[n])+"</div>"},option_create:function(e,t){return'<div class="create">Add <strong>'+t(e.input)+"</strong>&hellip;</div>"}};t.settings.render=e.extend({},i,t.settings.render)},setupCallbacks:function(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad"};for(e in n)if(n.hasOwnProperty(e)){t=this.settings[n[e]];t&&this.on(e,t)}},onClick:function(e){var t=this;if(!t.isFocused){t.focus();e.preventDefault()}},onMouseDown:function(t){{var n=this,r=t.isDefaultPrevented();e(t.target)}if(n.isFocused){if(t.target!==n.$control_input[0]){"single"===n.settings.mode?n.isOpen?n.close():n.open():r||n.setActiveItem(null);return!1}}else r||window.setTimeout(function(){n.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(e){var t=this;(t.isFull()||t.isInputHidden||t.isLocked)&&e.preventDefault()},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var t=String.fromCharCode(e.keyCode||e.which);if(this.settings.create&&t===this.settings.delimiter){this.createItem();e.preventDefault();return!1}},onKeyDown:function(e){var t=(e.target===this.$control_input[0],this);if(t.isLocked)e.keyCode!==x&&e.preventDefault();else{switch(e.keyCode){case s:if(t.isCmdDown){t.selectAll();return}break;case l:t.close();return;case h:if(!e.ctrlKey||e.altKey)break;case f:if(!t.isOpen&&t.hasOptions)t.open();else if(t.$activeOption){t.ignoreHover=!0;var n=t.getAdjacentOption(t.$activeOption,1);n.length&&t.setActiveOption(n,!0,!0)}e.preventDefault();return;case p:if(!e.ctrlKey||e.altKey)break;case c:if(t.$activeOption){t.ignoreHover=!0;var r=t.getAdjacentOption(t.$activeOption,-1);r.length&&t.setActiveOption(r,!0,!0)}e.preventDefault();return;case a:t.isOpen&&t.$activeOption&&t.onOptionSelect({currentTarget:t.$activeOption});e.preventDefault();return;case u:t.advanceSelection(-1,e);return;case d:t.advanceSelection(1,e);return;case x:if(t.settings.selectOnTab&&t.isOpen&&t.$activeOption){t.onOptionSelect({currentTarget:t.$activeOption});e.preventDefault()}t.settings.create&&t.createItem()&&e.preventDefault();return;case g:case m:t.deleteSelection(e);return}!t.isFull()&&!t.isInputHidden||(o?e.metaKey:e.ctrlKey)||e.preventDefault()}},onKeyUp:function(e){var t=this;if(t.isLocked)return e&&e.preventDefault();var n=t.$control_input.val()||"";if(t.lastValue!==n){t.lastValue=n;t.onSearchChange(n);t.refreshOptions();t.trigger("type",n)}},onSearchChange:function(e){var t=this,n=t.settings.load;if(n&&!t.loadedSearches.hasOwnProperty(e)){t.loadedSearches[e]=!0;t.load(function(r){n.apply(t,[e,r])})}},onFocus:function(e){var t=this;t.isFocused=!0;if(t.isDisabled){t.blur();e&&e.preventDefault();return!1}if(!t.ignoreFocus){"focus"===t.settings.preload&&t.onSearchChange("");if(!t.$activeItems.length){t.showInput();t.setActiveItem(null);t.refreshOptions(!!t.settings.openOnFocus)}t.refreshState()}},onBlur:function(e){var t=this;t.isFocused=!1;if(!t.ignoreFocus)if(t.ignoreBlur||document.activeElement!==t.$dropdown_content[0]){t.settings.create&&t.settings.createOnBlur&&t.createItem(!1);t.close();t.setTextboxValue("");t.setActiveItem(null);t.setActiveOption(null);t.setCaret(t.items.length);t.refreshState()}else{t.ignoreBlur=!0;t.onFocus(e)}},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(t){var n,r,i=this;if(t.preventDefault){t.preventDefault();t.stopPropagation()}r=e(t.currentTarget);if(r.hasClass("create"))i.createItem();else{n=r.attr("data-value");if("undefined"!=typeof n){i.lastQuery=null;i.setTextboxValue("");i.addItem(n);!i.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&i.setActiveOption(i.getOption(n))}}},onItemSelect:function(e){var t=this;if(!t.isLocked&&"multi"===t.settings.mode){e.preventDefault();t.setActiveItem(e.currentTarget,e)}},load:function(e){var t=this,n=t.$wrapper.addClass("loading");t.loading++;e.apply(t,[function(e){t.loading=Math.max(t.loading-1,0);if(e&&e.length){t.addOption(e);t.refreshOptions(t.isFocused&&!t.isInputHidden)}t.loading||n.removeClass("loading");t.trigger("load",e)}])},setTextboxValue:function(e){var t=this.$control_input,n=t.val()!==e;if(n){t.val(e).triggerHandler("update");this.lastValue=e}},getValue:function(){return this.tagType===b&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e){O(this,["change"],function(){this.clear();this.addItems(e)})},setActiveItem:function(t,n){var r,i,o,s,a,l,u,c,p=this;if("single"!==p.settings.mode){t=e(t);if(t.length){r=n&&n.type.toLowerCase();if("mousedown"===r&&p.isShiftDown&&p.$activeItems.length){c=p.$control.children(".active:last");s=Array.prototype.indexOf.apply(p.$control[0].childNodes,[c[0]]);a=Array.prototype.indexOf.apply(p.$control[0].childNodes,[t[0]]);if(s>a){u=s;s=a;a=u}for(i=s;a>=i;i++){l=p.$control[0].childNodes[i];if(-1===p.$activeItems.indexOf(l)){e(l).addClass("active");p.$activeItems.push(l)}}n.preventDefault()}else if("mousedown"===r&&p.isCtrlDown||"keydown"===r&&this.isShiftDown)if(t.hasClass("active")){o=p.$activeItems.indexOf(t[0]);p.$activeItems.splice(o,1);t.removeClass("active")}else p.$activeItems.push(t.addClass("active")[0]);else{e(p.$activeItems).removeClass("active");p.$activeItems=[t.addClass("active")[0]]}p.hideInput();this.isFocused||p.focus()}else{e(p.$activeItems).removeClass("active");p.$activeItems=[];p.isFocused&&p.showInput()}}},setActiveOption:function(t,n,r){var i,o,s,a,l,u=this;u.$activeOption&&u.$activeOption.removeClass("active");u.$activeOption=null;t=e(t);if(t.length){u.$activeOption=t.addClass("active");if(n||!S(n)){i=u.$dropdown_content.height();o=u.$activeOption.outerHeight(!0);n=u.$dropdown_content.scrollTop()||0;s=u.$activeOption.offset().top-u.$dropdown_content.offset().top+n;a=s;l=s-i+o;s+o>i+n?u.$dropdown_content.stop().animate({scrollTop:l},r?u.settings.scrollDuration:0):n>s&&u.$dropdown_content.stop().animate({scrollTop:a},r?u.settings.scrollDuration:0)}}},selectAll:function(){var e=this;if("single"!==e.settings.mode){e.$activeItems=Array.prototype.slice.apply(e.$control.children(":not(input)").addClass("active"));if(e.$activeItems.length){e.hideInput();e.close()}e.focus()}},hideInput:function(){var e=this;e.setTextboxValue("");e.$control_input.css({opacity:0,position:"absolute",left:e.rtl?1e4:-1e4});e.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0});this.isInputHidden=!1},focus:function(){var e=this;if(!e.isDisabled){e.ignoreFocus=!0;e.$control_input[0].focus();window.setTimeout(function(){e.ignoreFocus=!1;e.onFocus()},0)}},blur:function(){this.$control_input.trigger("blur")},getScoreFunction:function(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())},getSearchOptions:function(){var e=this.settings,t=e.sortField;"string"==typeof t&&(t={field:t});return{fields:e.searchField,conjunction:e.searchConjunction,sort:t}},search:function(t){var n,r,i,o=this,s=o.settings,a=this.getSearchOptions();if(s.score){i=o.settings.score.apply(this,[t]);if("function"!=typeof i)throw new Error('Selectize "score" setting must be a function that returns a function')}if(t!==o.lastQuery){o.lastQuery=t;r=o.sifter.search(t,e.extend(a,{score:i}));o.currentResults=r}else r=e.extend(!0,{},o.currentResults);if(s.hideSelected)for(n=r.items.length-1;n>=0;n--)-1!==o.items.indexOf(N(r.items[n].id))&&r.items.splice(n,1);return r},refreshOptions:function(t){var n,i,o,s,a,l,u,c,p,d,f,h,g,m,v,E;"undefined"==typeof t&&(t=!0);var y=this,x=e.trim(y.$control_input.val()),b=y.search(x),T=y.$dropdown_content,S=y.$activeOption&&N(y.$activeOption.attr("data-value"));s=b.items.length;"number"==typeof y.settings.maxOptions&&(s=Math.min(s,y.settings.maxOptions));a={};if(y.settings.optgroupOrder){l=y.settings.optgroupOrder;for(n=0;n<l.length;n++)a[l[n]]=[]}else l=[];for(n=0;s>n;n++){u=y.options[b.items[n].id];c=y.render("option",u);p=u[y.settings.optgroupField]||"";d=e.isArray(p)?p:[p];for(i=0,o=d&&d.length;o>i;i++){p=d[i];y.optgroups.hasOwnProperty(p)||(p="");if(!a.hasOwnProperty(p)){a[p]=[];l.push(p)}a[p].push(c)}}f=[];for(n=0,s=l.length;s>n;n++){p=l[n];if(y.optgroups.hasOwnProperty(p)&&a[p].length){h=y.render("optgroup_header",y.optgroups[p])||"";h+=a[p].join("");f.push(y.render("optgroup",e.extend({},y.optgroups[p],{html:h})))}else f.push(a[p].join(""))}T.html(f.join(""));if(y.settings.highlight&&b.query.length&&b.tokens.length)for(n=0,s=b.tokens.length;s>n;n++)r(T,b.tokens[n].regex);if(!y.settings.hideSelected)for(n=0,s=y.items.length;s>n;n++)y.getOption(y.items[n]).addClass("selected");g=y.canCreate(x);if(g){T.prepend(y.render("option_create",{input:x}));E=e(T[0].childNodes[0])}y.hasOptions=b.items.length>0||g;if(y.hasOptions){if(b.items.length>0){v=S&&y.getOption(S);v&&v.length?m=v:"single"===y.settings.mode&&y.items.length&&(m=y.getOption(y.items[0]));m&&m.length||(m=E&&!y.settings.addPrecedence?y.getAdjacentOption(E,1):T.find("[data-selectable]:first"))}else m=E;y.setActiveOption(m);t&&!y.isOpen&&y.open()}else{y.setActiveOption(null);t&&y.isOpen&&y.close()}},addOption:function(t){var n,r,i,o=this;if(e.isArray(t))for(n=0,r=t.length;r>n;n++)o.addOption(t[n]);else{i=N(t[o.settings.valueField]);if("string"==typeof i&&!o.options.hasOwnProperty(i)){o.userOptions[i]=!0;o.options[i]=t;o.lastQuery=null;o.trigger("option_add",i,t)}}},addOptionGroup:function(e,t){this.optgroups[e]=t;this.trigger("optgroup_add",e,t)},updateOption:function(t,n){var r,i,o,s,a,l,u=this;t=N(t);o=N(n[u.settings.valueField]);if(null!==t&&u.options.hasOwnProperty(t)){if("string"!=typeof o)throw new Error("Value must be set in option data");if(o!==t){delete u.options[t];s=u.items.indexOf(t);-1!==s&&u.items.splice(s,1,o)}u.options[o]=n;a=u.renderCache.item;l=u.renderCache.option;if(a){delete a[t];delete a[o]}if(l){delete l[t];delete l[o]}if(-1!==u.items.indexOf(o)){r=u.getItem(t);i=e(u.render("item",n));r.hasClass("active")&&i.addClass("active");r.replaceWith(i)}u.lastQuery=null;u.isOpen&&u.refreshOptions(!1)}},removeOption:function(e){var t=this;e=N(e);var n=t.renderCache.item,r=t.renderCache.option;n&&delete n[e];r&&delete r[e]; delete t.userOptions[e];delete t.options[e];t.lastQuery=null;t.trigger("option_remove",e);t.removeItem(e)},clearOptions:function(){var e=this;e.loadedSearches={};e.userOptions={};e.renderCache={};e.options=e.sifter.items={};e.lastQuery=null;e.trigger("option_clear");e.clear()},getOption:function(e){return this.getElementWithValue(e,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(t,n){var r=this.$dropdown.find("[data-selectable]"),i=r.index(t)+n;return i>=0&&i<r.length?r.eq(i):e()},getElementWithValue:function(t,n){t=N(t);if("undefined"!=typeof t&&null!==t)for(var r=0,i=n.length;i>r;r++)if(n[r].getAttribute("data-value")===t)return e(n[r]);return e()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},addItems:function(t){for(var n=e.isArray(t)?t:[t],r=0,i=n.length;i>r;r++){this.isPending=i-1>r;this.addItem(n[r])}},addItem:function(t){O(this,["change"],function(){var n,r,i,o,s,a=this,l=a.settings.mode;t=N(t);if(-1===a.items.indexOf(t)){if(a.options.hasOwnProperty(t)){"single"===l&&a.clear();if("multi"!==l||!a.isFull()){n=e(a.render("item",a.options[t]));s=a.isFull();a.items.splice(a.caretPos,0,t);a.insertAtCaret(n);(!a.isPending||!s&&a.isFull())&&a.refreshState();if(a.isSetup){i=a.$dropdown_content.find("[data-selectable]");if(!a.isPending){r=a.getOption(t);o=a.getAdjacentOption(r,1).attr("data-value");a.refreshOptions(a.isFocused&&"single"!==l);o&&a.setActiveOption(a.getOption(o))}!i.length||a.isFull()?a.close():a.positionDropdown();a.updatePlaceholder();a.trigger("item_add",t,n);a.updateOriginalInput()}}}}else"single"===l&&a.close()})},removeItem:function(e){var t,n,r,i=this;t="object"==typeof e?e:i.getItem(e);e=N(t.attr("data-value"));n=i.items.indexOf(e);if(-1!==n){t.remove();if(t.hasClass("active")){r=i.$activeItems.indexOf(t[0]);i.$activeItems.splice(r,1)}i.items.splice(n,1);i.lastQuery=null;!i.settings.persist&&i.userOptions.hasOwnProperty(e)&&i.removeOption(e);n<i.caretPos&&i.setCaret(i.caretPos-1);i.refreshState();i.updatePlaceholder();i.updateOriginalInput();i.positionDropdown();i.trigger("item_remove",e)}},createItem:function(t){var n=this,r=e.trim(n.$control_input.val()||""),i=n.caretPos;if(!n.canCreate(r))return!1;n.lock();"undefined"==typeof t&&(t=!0);var o="function"==typeof n.settings.create?this.settings.create:function(e){var t={};t[n.settings.labelField]=e;t[n.settings.valueField]=e;return t},s=w(function(e){n.unlock();if(e&&"object"==typeof e){var r=N(e[n.settings.valueField]);if("string"==typeof r){n.setTextboxValue("");n.addOption(e);n.setCaret(i);n.addItem(r);n.refreshOptions(t&&"single"!==n.settings.mode)}}}),a=o.apply(this,[r,s]);"undefined"!=typeof a&&s(a);return!0},refreshItems:function(){this.lastQuery=null;if(this.isSetup)for(var e=0;e<this.items.length;e++)this.addItem(this.items);this.refreshState();this.updateOriginalInput()},refreshState:function(){var e,t=this;if(t.isRequired){t.items.length&&(t.isInvalid=!1);t.$control_input.prop("required",e)}t.refreshClasses()},refreshClasses:function(){var t=this,n=t.isFull(),r=t.isLocked;t.$wrapper.toggleClass("rtl",t.rtl);t.$control.toggleClass("focus",t.isFocused).toggleClass("disabled",t.isDisabled).toggleClass("required",t.isRequired).toggleClass("invalid",t.isInvalid).toggleClass("locked",r).toggleClass("full",n).toggleClass("not-full",!n).toggleClass("input-active",t.isFocused&&!t.isInputHidden).toggleClass("dropdown-active",t.isOpen).toggleClass("has-options",!e.isEmptyObject(t.options)).toggleClass("has-items",t.items.length>0);t.$control_input.data("grow",!n&&!r)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(){var e,t,n,r=this;if(r.tagType===b){n=[];for(e=0,t=r.items.length;t>e;e++)n.push('<option value="'+C(r.items[e])+'" selected="selected"></option>');n.length||this.$input.attr("multiple")||n.push('<option value="" selected="selected"></option>');r.$input.html(n.join(""))}else{r.$input.val(r.getValue());r.$input.attr("value",r.$input.val())}r.isSetup&&r.trigger("change",r.$input.val())},updatePlaceholder:function(){if(this.settings.placeholder){var e=this.$control_input;this.items.length?e.removeAttr("placeholder"):e.attr("placeholder",this.settings.placeholder);e.triggerHandler("update",{force:!0})}},open:function(){var e=this;if(!(e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull())){e.focus();e.isOpen=!0;e.refreshState();e.$dropdown.css({visibility:"hidden",display:"block"});e.positionDropdown();e.$dropdown.css({visibility:"visible"});e.trigger("dropdown_open",e.$dropdown)}},close:function(){var e=this,t=e.isOpen;"single"===e.settings.mode&&e.items.length&&e.hideInput();e.isOpen=!1;e.$dropdown.hide();e.setActiveOption(null);e.refreshState();t&&e.trigger("dropdown_close",e.$dropdown)},positionDropdown:function(){var e=this.$control,t="body"===this.settings.dropdownParent?e.offset():e.position();t.top+=e.outerHeight(!0);this.$dropdown.css({width:e.outerWidth(),top:t.top,left:t.left})},clear:function(){var e=this;if(e.items.length){e.$control.children(":not(input)").remove();e.items=[];e.lastQuery=null;e.setCaret(0);e.setActiveItem(null);e.updatePlaceholder();e.updateOriginalInput();e.refreshState();e.showInput();e.trigger("clear")}},insertAtCaret:function(t){var n=Math.min(this.caretPos,this.items.length);0===n?this.$control.prepend(t):e(this.$control[0].childNodes[n]).before(t);this.setCaret(n+1)},deleteSelection:function(t){var n,r,i,o,s,a,l,u,c,p=this;i=t&&t.keyCode===g?-1:1;o=D(p.$control_input[0]);p.$activeOption&&!p.settings.hideSelected&&(l=p.getAdjacentOption(p.$activeOption,-1).attr("data-value"));s=[];if(p.$activeItems.length){c=p.$control.children(".active:"+(i>0?"last":"first"));a=p.$control.children(":not(input)").index(c);i>0&&a++;for(n=0,r=p.$activeItems.length;r>n;n++)s.push(e(p.$activeItems[n]).attr("data-value"));if(t){t.preventDefault();t.stopPropagation()}}else(p.isFocused||"single"===p.settings.mode)&&p.items.length&&(0>i&&0===o.start&&0===o.length?s.push(p.items[p.caretPos-1]):i>0&&o.start===p.$control_input.val().length&&s.push(p.items[p.caretPos]));if(!s.length||"function"==typeof p.settings.onDelete&&p.settings.onDelete.apply(p,[s])===!1)return!1;"undefined"!=typeof a&&p.setCaret(a);for(;s.length;)p.removeItem(s.pop());p.showInput();p.positionDropdown();p.refreshOptions(!0);if(l){u=p.getOption(l);u.length&&p.setActiveOption(u)}return!0},advanceSelection:function(e,t){var n,r,i,o,s,a,l=this;if(0!==e){l.rtl&&(e*=-1);n=e>0?"last":"first";r=D(l.$control_input[0]);if(l.isFocused&&!l.isInputHidden){o=l.$control_input.val().length;s=0>e?0===r.start&&0===r.length:r.start===o;s&&!o&&l.advanceCaret(e,t)}else{a=l.$control.children(".active:"+n);if(a.length){i=l.$control.children(":not(input)").index(a);l.setActiveItem(null);l.setCaret(e>0?i+1:i)}}}},advanceCaret:function(e,t){var n,r,i=this;if(0!==e){n=e>0?"next":"prev";if(i.isShiftDown){r=i.$control_input[n]();if(r.length){i.hideInput();i.setActiveItem(r);t&&t.preventDefault()}}else i.setCaret(i.caretPos+e)}},setCaret:function(t){var n=this;t="single"===n.settings.mode?n.items.length:Math.max(0,Math.min(n.items.length,t));if(!n.isPending){var r,i,o,s;o=n.$control.children(":not(input)");for(r=0,i=o.length;i>r;r++){s=e(o[r]).detach();t>r?n.$control_input.before(s):n.$control.append(s)}}n.caretPos=t},lock:function(){this.close();this.isLocked=!0;this.refreshState()},unlock:function(){this.isLocked=!1;this.refreshState()},disable:function(){var e=this;e.$input.prop("disabled",!0);e.isDisabled=!0;e.lock()},enable:function(){var e=this;e.$input.prop("disabled",!1);e.isDisabled=!1;e.unlock()},destroy:function(){var t=this,n=t.eventNS,r=t.revertSettings;t.trigger("destroy");t.off();t.$wrapper.remove();t.$dropdown.remove();t.$input.html("").append(r.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:r.tabindex}).show();t.$control_input.removeData("grow");t.$input.removeData("selectize");e(window).off(n);e(document).off(n);e(document.body).off(n);delete t.$input[0].selectize},render:function(e,t){var n,r,i="",o=!1,s=this,a=/^[\t ]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;if("option"===e||"item"===e){n=N(t[s.settings.valueField]);o=!!n}if(o){S(s.renderCache[e])||(s.renderCache[e]={});if(s.renderCache[e].hasOwnProperty(n))return s.renderCache[e][n]}i=s.settings.render[e].apply(this,[t,C]);("option"===e||"option_create"===e)&&(i=i.replace(a,"<$1 data-selectable"));if("optgroup"===e){r=t[s.settings.optgroupValueField]||"";i=i.replace(a,'<$1 data-group="'+L(C(r))+'"')}("option"===e||"item"===e)&&(i=i.replace(a,'<$1 data-value="'+L(C(n||""))+'"'));o&&(s.renderCache[e][n]=i);return i},clearCache:function(e){var t=this;"undefined"==typeof e?t.renderCache={}:delete t.renderCache[e]},canCreate:function(e){var t=this;if(!t.settings.create)return!1;var n=t.settings.createFilter;return!(!e.length||"function"==typeof n&&!n.apply(t,[e])||"string"==typeof n&&!new RegExp(n).test(e)||n instanceof RegExp&&!n.test(e))}});M.count=0;M.defaults={plugins:[],delimiter:",",persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,scrollDuration:60,loadThrottle:300,dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",optgroupOrder:null,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}};e.fn.selectize=function(t){var n=e.fn.selectize.defaults,r=e.extend({},n,t),i=r.dataAttr,o=r.labelField,s=r.valueField,a=r.optgroupField,l=r.optgroupLabelField,u=r.optgroupValueField,c=function(t,n){var i,a,l,u,c=e.trim(t.val()||"");if(r.allowEmptyOption||c.length){l=c.split(r.delimiter);for(i=0,a=l.length;a>i;i++){u={};u[o]=l[i];u[s]=l[i];n.options[l[i]]=u}n.items=l}},p=function(t,n){var c,p,d,f,h=0,g=n.options,m=function(e){var t=i&&e.attr(i);return"string"==typeof t&&t.length?JSON.parse(t):null},v=function(t,i){var l,u;t=e(t);l=t.attr("value")||"";if(l.length||r.allowEmptyOption)if(g.hasOwnProperty(l))i&&(g[l].optgroup?e.isArray(g[l].optgroup)?g[l].optgroup.push(i):g[l].optgroup=[g[l].optgroup,i]:g[l].optgroup=i);else{u=m(t)||{};u[o]=u[o]||t.text();u[s]=u[s]||l;u[a]=u[a]||i;u.$order=++h;g[l]=u;t.is(":selected")&&n.items.push(l)}},E=function(t){var r,i,o,s,a;t=e(t);o=t.attr("label");if(o){s=m(t)||{};s[l]=o;s[u]=o;n.optgroups[o]=s}a=e("option",t);for(r=0,i=a.length;i>r;r++)v(a[r],o)};n.maxItems=t.attr("multiple")?null:1;f=t.children();for(c=0,p=f.length;p>c;c++){d=f[c].tagName.toLowerCase();"optgroup"===d?E(f[c]):"option"===d&&v(f[c])}};return this.each(function(){if(!this.selectize){var i,o=e(this),s=this.tagName.toLowerCase(),a=o.attr("placeholder")||o.attr("data-placeholder");a||r.allowEmptyOption||(a=o.children('option[value=""]').text());var l={placeholder:a,options:{},optgroups:{},items:[]};"select"===s?p(o,l):c(o,l);i=new M(o,e.extend(!0,{},n,l,t))}})};e.fn.selectize.defaults=M.defaults;M.define("drag_drop",function(){if(!e.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var t=this;t.lock=function(){var e=t.lock;return function(){var n=t.$control.data("sortable");n&&n.disable();return e.apply(t,arguments)}}();t.unlock=function(){var e=t.unlock;return function(){var n=t.$control.data("sortable");n&&n.enable();return e.apply(t,arguments)}}();t.setup=function(){var n=t.setup;return function(){n.apply(this,arguments);var r=t.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:t.isLocked,start:function(e,t){t.placeholder.css("width",t.helper.css("width"));r.css({overflow:"visible"})},stop:function(){r.css({overflow:"hidden"});var n=t.$activeItems?t.$activeItems.slice():null,i=[];r.children("[data-value]").each(function(){i.push(e(this).attr("data-value"))});t.setValue(i);t.setActiveItem(n)}})}}()}});M.define("dropdown_header",function(t){var n=this;t=e.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(e){return'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a href="javascript:void(0)" class="'+e.closeClass+'">&times;</a></div></div>'}},t);n.setup=function(){var r=n.setup;return function(){r.apply(n,arguments);n.$dropdown_header=e(t.html(t));n.$dropdown.prepend(n.$dropdown_header)}}()});M.define("optgroup_columns",function(t){var n=this;t=e.extend({equalizeWidth:!0,equalizeHeight:!0},t);this.getAdjacentOption=function(t,n){var r=t.closest("[data-group]").find("[data-selectable]"),i=r.index(t)+n;return i>=0&&i<r.length?r.eq(i):e()};this.onKeyDown=function(){var e=n.onKeyDown;return function(t){var r,i,o,s;if(!this.isOpen||t.keyCode!==u&&t.keyCode!==d)return e.apply(this,arguments);n.ignoreHover=!0;s=this.$activeOption.closest("[data-group]");r=s.find("[data-selectable]").index(this.$activeOption);s=t.keyCode===u?s.prev("[data-group]"):s.next("[data-group]");o=s.find("[data-selectable]");i=o.eq(Math.min(o.length-1,r));i.length&&this.setActiveOption(i)}}();var r=function(){var e,t=r.width,n=document;if("undefined"==typeof t){e=n.createElement("div");e.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>';e=e.firstChild;n.body.appendChild(e);t=r.width=e.offsetWidth-e.clientWidth;n.body.removeChild(e)}return t},i=function(){var i,o,s,a,l,u,c;c=e("[data-group]",n.$dropdown_content);o=c.length;if(o&&n.$dropdown_content.width()){if(t.equalizeHeight){s=0;for(i=0;o>i;i++)s=Math.max(s,c.eq(i).height());c.css({height:s})}if(t.equalizeWidth){u=n.$dropdown_content.innerWidth()-r();a=Math.round(u/o);c.css({width:a});if(o>1){l=u-a*(o-1);c.eq(o-1).css({width:l})}}}};if(t.equalizeHeight||t.equalizeWidth){A.after(this,"positionDropdown",i);A.after(this,"refreshOptions",i)}});M.define("remove_button",function(t){if("single"!==this.settings.mode){t=e.extend({label:"&times;",title:"Remove",className:"remove",append:!0},t);var n=this,r='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+C(t.title)+'">'+t.label+"</a>",i=function(e,t){var n=e.search(/(<\/[^>]+>\s*)$/);return e.substring(0,n)+t+e.substring(n)};this.setup=function(){var o=n.setup;return function(){if(t.append){var s=n.settings.render.item;n.settings.render.item=function(){return i(s.apply(this,arguments),r)}}o.apply(this,arguments);this.$control.on("click","."+t.className,function(t){t.preventDefault();if(!n.isLocked){var r=e(t.currentTarget).parent();n.setActiveItem(r);n.deleteSelection()&&n.setCaret(n.items.length)}})}}()}});M.define("restore_on_backspace",function(e){var t=this;e.text=e.text||function(e){return e[this.settings.labelField]};this.onKeyDown=function(){var n=t.onKeyDown;return function(t){var r,i;if(t.keyCode===g&&""===this.$control_input.val()&&!this.$activeItems.length){r=this.caretPos-1;if(r>=0&&r<this.items.length){i=this.options[this.items[r]];if(this.deleteSelection(t)){this.setTextboxValue(e.text.apply(this,[i]));this.refreshOptions(!0)}t.preventDefault();return}}return n.apply(this,arguments)}}()});return M})},{jquery:4,microplugin:5,sifter:7}],7:[function(t,n,r){(function(t,i){"function"==typeof e&&e.amd?e(i):"object"==typeof r?n.exports=i():t.Sifter=i()})(this,function(){var e=function(e,t){this.items=e;this.settings=t||{diacritics:!0}};e.prototype.tokenize=function(e){e=r(String(e||"").toLowerCase());if(!e||!e.length)return[];var t,n,o,a,l=[],u=e.split(/ +/);for(t=0,n=u.length;n>t;t++){o=i(u[t]);if(this.settings.diacritics)for(a in s)s.hasOwnProperty(a)&&(o=o.replace(new RegExp(a,"g"),s[a]));l.push({string:u[t],regex:new RegExp(o,"i")})}return l};e.prototype.iterator=function(e,t){var n;n=o(e)?Array.prototype.forEach||function(e){for(var t=0,n=this.length;n>t;t++)e(this[t],t,this)}:function(e){for(var t in this)this.hasOwnProperty(t)&&e(this[t],t,this)};n.apply(e,[t])};e.prototype.getScoreFunction=function(e,t){var n,r,i,o;n=this;e=n.prepareSearch(e,t);i=e.tokens;r=e.options.fields;o=i.length;var s=function(e,t){var n,r;if(!e)return 0;e=String(e||"");r=e.search(t.regex);if(-1===r)return 0;n=t.string.length/e.length;0===r&&(n+=.5);return n},a=function(){var e=r.length;return e?1===e?function(e,t){return s(t[r[0]],e)}:function(t,n){for(var i=0,o=0;e>i;i++)o+=s(n[r[i]],t);return o/e}:function(){return 0}}();return o?1===o?function(e){return a(i[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,r=0;o>n;n++){t=a(i[n],e);if(0>=t)return 0;r+=t}return r/o}:function(e){for(var t=0,n=0;o>t;t++)n+=a(i[t],e);return n/o}:function(){return 0}};e.prototype.getSortFunction=function(e,n){var r,i,o,s,a,l,u,c,p,d,f;o=this;e=o.prepareSearch(e,n);f=!e.query&&n.sort_empty||n.sort;p=function(e,t){return"$score"===e?t.score:o.items[t.id][e]};a=[];if(f)for(r=0,i=f.length;i>r;r++)(e.query||"$score"!==f[r].field)&&a.push(f[r]);if(e.query){d=!0;for(r=0,i=a.length;i>r;r++)if("$score"===a[r].field){d=!1;break}d&&a.unshift({field:"$score",direction:"desc"})}else for(r=0,i=a.length;i>r;r++)if("$score"===a[r].field){a.splice(r,1);break}c=[];for(r=0,i=a.length;i>r;r++)c.push("desc"===a[r].direction?-1:1);l=a.length;if(l){if(1===l){s=a[0].field;u=c[0];return function(e,n){return u*t(p(s,e),p(s,n))}}return function(e,n){var r,i,o;for(r=0;l>r;r++){o=a[r].field;i=c[r]*t(p(o,e),p(o,n));if(i)return i}return 0}}return null};e.prototype.prepareSearch=function(e,t){if("object"==typeof e)return e;t=n({},t);var r=t.fields,i=t.sort,s=t.sort_empty;r&&!o(r)&&(t.fields=[r]);i&&!o(i)&&(t.sort=[i]);s&&!o(s)&&(t.sort_empty=[s]);return{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e),total:0,items:[]}};e.prototype.search=function(e,t){var n,r,i,o,s=this;r=this.prepareSearch(e,t);t=r.options;e=r.query;o=t.score||s.getScoreFunction(r);e.length?s.iterator(s.items,function(e,i){n=o(e);(t.filter===!1||n>0)&&r.items.push({score:n,id:i})}):s.iterator(s.items,function(e,t){r.items.push({score:1,id:t})});i=s.getSortFunction(r,t);i&&r.items.sort(i);r.total=r.items.length;"number"==typeof t.limit&&(r.items=r.items.slice(0,t.limit));return r};var t=function(e,t){if("number"==typeof e&&"number"==typeof t)return e>t?1:t>e?-1:0;e=String(e||"").toLowerCase();t=String(t||"").toLowerCase();return e>t?1:t>e?-1:0},n=function(e){var t,n,r,i;for(t=1,n=arguments.length;n>t;t++){i=arguments[t];if(i)for(r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e},r=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},i=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},o=Array.isArray||$&&$.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s={a:"[aÀÁÂÃÄÅàáâãäåĀā]",c:"[cÇçćĆčČ]",d:"[dđĐďĎ]",e:"[eÈÉÊËèéêëěĚĒē]",i:"[iÌÍÎÏìíîïĪī]",n:"[nÑñňŇ]",o:"[oÒÓÔÕÕÖØòóôõöøŌō]",r:"[rřŘ]",s:"[sŠš]",t:"[tťŤ]",u:"[uÙÚÛÜùúûüůŮŪū]",y:"[yŸÿýÝ]",z:"[zŽž]"};return e})},{}],8:[function(t,n){(function(t){function r(){try{return l in t&&t[l]}catch(e){return!1}}function i(e){return e.replace(/^d/,"___$&").replace(h,"___")}var o,s={},a=t.document,l="localStorage",u="script";s.disabled=!1;s.version="1.3.17";s.set=function(){};s.get=function(){};s.has=function(e){return void 0!==s.get(e)};s.remove=function(){};s.clear=function(){};s.transact=function(e,t,n){if(null==n){n=t;t=null}null==t&&(t={});var r=s.get(e,t);n(r);s.set(e,r)};s.getAll=function(){};s.forEach=function(){};s.serialize=function(e){return JSON.stringify(e)};s.deserialize=function(e){if("string"!=typeof e)return void 0;try{return JSON.parse(e)}catch(t){return e||void 0}};if(r()){o=t[l];s.set=function(e,t){if(void 0===t)return s.remove(e);o.setItem(e,s.serialize(t));return t};s.get=function(e,t){var n=s.deserialize(o.getItem(e));return void 0===n?t:n};s.remove=function(e){o.removeItem(e)};s.clear=function(){o.clear()};s.getAll=function(){var e={};s.forEach(function(t,n){e[t]=n});return e};s.forEach=function(e){for(var t=0;t<o.length;t++){var n=o.key(t);e(n,s.get(n))}}}else if(a.documentElement.addBehavior){var c,p;try{p=new ActiveXObject("htmlfile");p.open();p.write("<"+u+">document.w=window</"+u+'><iframe src="/favicon.ico"></iframe>');p.close();c=p.w.frames[0].document;o=c.createElement("div")}catch(d){o=a.createElement("div");c=a.body}var f=function(e){return function(){var t=Array.prototype.slice.call(arguments,0);t.unshift(o);c.appendChild(o);o.addBehavior("#default#userData");o.load(l);var n=e.apply(s,t);c.removeChild(o);return n}},h=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");s.set=f(function(e,t,n){t=i(t);if(void 0===n)return s.remove(t);e.setAttribute(t,s.serialize(n));e.save(l);return n});s.get=f(function(e,t,n){t=i(t);var r=s.deserialize(e.getAttribute(t));return void 0===r?n:r});s.remove=f(function(e,t){t=i(t);e.removeAttribute(t);e.save(l)});s.clear=f(function(e){var t=e.XMLDocument.documentElement.attributes;e.load(l);for(var n,r=0;n=t[r];r++)e.removeAttribute(n.name);e.save(l)});s.getAll=function(){var e={};s.forEach(function(t,n){e[t]=n});return e};s.forEach=f(function(e,t){for(var n,r=e.XMLDocument.documentElement.attributes,i=0;n=r[i];++i)t(n.name,s.deserialize(e.getAttribute(n.name)))})}try{var g="__storejs__";s.set(g,g);s.get(g)!=g&&(s.disabled=!0);s.remove(g)}catch(d){s.disabled=!0}s.enabled=!s.disabled;"undefined"!=typeof n&&n.exports&&this.module!==n?n.exports=s:"function"==typeof e&&e.amd?e(s):t.store=s})(Function("return this")())},{}],9:[function(e,t){t.exports={name:"yasgui-utils",version:"1.5.0",description:"Utils for YASGUI libs",main:"src/main.js",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],author:"Laurens Rietveld",maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],bugs:{url:"https://github.com/YASGUI/Utils/issues"},homepage:"https://github.com/YASGUI/Utils",dependencies:{store:"^1.3.14"}}},{}],10:[function(e,t){window.console=window.console||{log:function(){}};t.exports={storage:e("./storage.js"),svg:e("./svg.js"),version:{"yasgui-utils":e("../package.json").version}}},{"../package.json":9,"./storage.js":11,"./svg.js":12}],11:[function(e,t){{var n=e("store"),r={day:function(){return 864e5},month:function(){30*r.day()},year:function(){12*r.month()}};t.exports={set:function(e,t,i){if(n.enabled&&e&&t){"string"==typeof i&&(i=r[i]());t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));n.set(e,{val:t,exp:i,time:(new Date).getTime()})}},remove:function(e){n.enabled&&e&&n.remove(e)},get:function(e){if(!n.enabled)return null;if(e){var t=n.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}return null}}}},{store:8}],12:[function(e,t){t.exports={draw:function(e,n){if(e){var r=t.exports.getElement(n);r&&(e.append?e.append(r):e.appendChild(r))}},getElement:function(e){if(e&&0==e.indexOf("<svg")){var t=new DOMParser,n=t.parseFromString(e,"text/xml"),r=n.documentElement,i=document.createElement("div");i.className="svgImg";i.appendChild(r);return i}return!1}}},{}],13:[function(e){"use strict";var t=e("jquery");t.deparam=function(e,n){var r={},i={"true":!0,"false":!1,"null":null};t.each(e.replace(/\+/g," ").split("&"),function(e,o){var s,a=o.split("="),l=decodeURIComponent(a[0]),u=r,c=0,p=l.split("]["),d=p.length-1;if(/\[/.test(p[0])&&/\]$/.test(p[d])){p[d]=p[d].replace(/\]$/,"");p=p.shift().split("[").concat(p);d=p.length-1}else d=0;if(2===a.length){s=decodeURIComponent(a[1]);n&&(s=s&&!isNaN(s)?+s:"undefined"===s?void 0:void 0!==i[s]?i[s]:s);if(d)for(;d>=c;c++){l=""===p[c]?u.length:p[c];u=u[l]=d>c?u[l]||(p[c+1]&&isNaN(p[c+1])?{}:[]):s}else t.isArray(r[l])?r[l].push(s):r[l]=void 0!==r[l]?[r[l],s]:s}else l&&(r[l]=n?void 0:"")});return r}},{jquery:26}],14:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("codemirror")):"function"==typeof e&&e.amd?e(["codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.defineMode("sparql11",function(e){function t(){var e,t,n="<[^<>\"'|{}^\\\x00- ]*>",r="[A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]",i=r+"|_",o="("+i+"|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])",s="("+i+"|[0-9])("+i+"|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*",a="\\?"+s,l="\\$"+s,c="("+r+")((("+o+")|\\.)*("+o+"))?",p="[0-9A-Fa-f]",d="(%"+p+p+")",f="(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%])",h="("+d+"|"+f+")";if("sparql11"==u){e="("+i+"|:|[0-9]|"+h+")(("+o+"|\\.|:|"+h+")*("+o+"|:|"+h+"))?";t="_:("+i+"|[0-9])(("+o+"|\\.)*"+o+")?"}else{e="("+i+"|[0-9])((("+o+")|\\.)*("+o+"))?";t="_:"+e}var g="("+c+")?:",m=g+e,v="@[a-zA-Z]+(-[a-zA-Z0-9]+)*",E="[eE][\\+-]?[0-9]+",y="[0-9]+",x="(([0-9]+\\.[0-9]*)|(\\.[0-9]+))",b="(([0-9]+\\.[0-9]*"+E+")|(\\.[0-9]+"+E+")|([0-9]+"+E+"))",T="\\+"+y,S="\\+"+x,N="\\+"+b,C="-"+y,L="-"+x,A="-"+b,I="\\\\[tbnrf\\\\\"']",w="'(([^\\x27\\x5C\\x0A\\x0D])|"+I+")*'",R='"(([^\\x22\\x5C\\x0A\\x0D])|'+I+')*"',O="'''(('|'')?([^'\\\\]|"+I+"))*'''",_='"""(("|"")?([^"\\\\]|'+I+'))*"""',D="[\\x20\\x09\\x0D\\x0A]",k="#([^\\n\\r]*[\\n\\r]|[^\\n\\r]*$)",F="("+D+"|("+k+"))*",P="\\("+F+"\\)",M="\\["+F+"\\]",j={terminal:[{name:"WS",regex:new RegExp("^"+D+"+"),style:"ws"},{name:"COMMENT",regex:new RegExp("^"+k),style:"comment"},{name:"IRI_REF",regex:new RegExp("^"+n),style:"variable-3"},{name:"VAR1",regex:new RegExp("^"+a),style:"atom"},{name:"VAR2",regex:new RegExp("^"+l),style:"atom"},{name:"LANGTAG",regex:new RegExp("^"+v),style:"meta"},{name:"DOUBLE",regex:new RegExp("^"+b),style:"number"},{name:"DECIMAL",regex:new RegExp("^"+x),style:"number"},{name:"INTEGER",regex:new RegExp("^"+y),style:"number"},{name:"DOUBLE_POSITIVE",regex:new RegExp("^"+N),style:"number"},{name:"DECIMAL_POSITIVE",regex:new RegExp("^"+S),style:"number"},{name:"INTEGER_POSITIVE",regex:new RegExp("^"+T),style:"number"},{name:"DOUBLE_NEGATIVE",regex:new RegExp("^"+A),style:"number"},{name:"DECIMAL_NEGATIVE",regex:new RegExp("^"+L),style:"number"},{name:"INTEGER_NEGATIVE",regex:new RegExp("^"+C),style:"number"},{name:"STRING_LITERAL_LONG1",regex:new RegExp("^"+O),style:"string"},{name:"STRING_LITERAL_LONG2",regex:new RegExp("^"+_),style:"string"},{name:"STRING_LITERAL1",regex:new RegExp("^"+w),style:"string"},{name:"STRING_LITERAL2",regex:new RegExp("^"+R),style:"string"},{name:"NIL",regex:new RegExp("^"+P),style:"punc"},{name:"ANON",regex:new RegExp("^"+M),style:"punc"},{name:"PNAME_LN",regex:new RegExp("^"+m),style:"string-2"},{name:"PNAME_NS",regex:new RegExp("^"+g),style:"string-2"},{name:"BLANK_NODE_LABEL",regex:new RegExp("^"+t),style:"string-2"}]};return j}function n(e){var t=[],n=o[e];if(void 0!=n)for(var r in n)t.push(r.toString());else t.push(e);return t}function r(e,t){function r(){for(var t=null,n=0;n<f.length;++n){t=e.match(f[n].regex,!0,!1);if(t)return{cat:f[n].name,style:f[n].style,text:t[0]}}t=e.match(s,!0,!1);if(t)return{cat:e.current().toUpperCase(),style:"keyword",text:t[0]};t=e.match(a,!0,!1);if(t)return{cat:e.current(),style:"punc",text:t[0]};t=e.match(/^.[A-Za-z0-9]*/,!0,!1);return{cat:"<invalid_token>",style:"error",text:t[0]}}function i(){var n=e.column();t.errorStartPos=n;t.errorEndPos=n+p.text.length}function l(e){null==t.queryType&&("SELECT"==e||"CONSTRUCT"==e||"ASK"==e||"DESCRIBE"==e||"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e)&&(t.queryType=e)}function u(e){"disallowVars"==e?t.allowVars=!1:"allowVars"==e?t.allowVars=!0:"disallowBnodes"==e?t.allowBnodes=!1:"allowBnodes"==e?t.allowBnodes=!0:"storeProperty"==e&&(t.storeProperty=!0)}function c(e){return(t.allowVars||"var"!=e)&&(t.allowBnodes||"blankNode"!=e&&"blankNodePropertyList"!=e&&"blankNodePropertyListPath"!=e)}0==e.pos&&(t.possibleCurrent=t.possibleNext);var p=r();if("<invalid_token>"==p.cat){if(1==t.OK){t.OK=!1;i()}t.complete=!1;return p.style}if("WS"==p.cat||"COMMENT"==p.cat){t.possibleCurrent=t.possibleNext;return p.style}for(var d,h=!1,g=p.cat;t.stack.length>0&&g&&t.OK&&!h;){d=t.stack.pop();if(o[d]){var m=o[d][g];if(void 0!=m&&c(d)){for(var v=m.length-1;v>=0;--v)t.stack.push(m[v]);u(d)}else{t.OK=!1;t.complete=!1;i();t.stack.push(d)}}else if(d==g){h=!0;l(d);for(var E=!0,y=t.stack.length;y>0;--y){var x=o[t.stack[y-1]];x&&x.$||(E=!1)}t.complete=E;if(t.storeProperty&&"punc"!=g.cat){t.lastProperty=p.text;t.storeProperty=!1}}else{t.OK=!1;t.complete=!1;i()}}if(!h&&t.OK){t.OK=!1;t.complete=!1;i()}t.possibleCurrent=t.possibleNext;t.possibleNext=n(t.stack[t.stack.length-1]);return p.style}function i(t,n){var r=0,i=t.stack.length-1;if(/^[\}\]\)]/.test(n)){for(var o=n.substr(0,1);i>=0;--i)if(t.stack[i]==o){--i;break}}else{var s=h[t.stack[i]];if(s){r+=s;--i}}for(;i>=0;--i){var s=g[t.stack[i]];s&&(r+=s)}return r*e.indentUnit}var o=(e.indentUnit,{"*[&&,valueLogical]":{"&&":["[&&,valueLogical]","*[&&,valueLogical]"],AS:[],")":[],",":[],"||":[],";":[]},"*[,,expression]":{",":["[,,expression]","*[,,expression]"],")":[]},"*[,,objectPath]":{",":["[,,objectPath]","*[,,objectPath]"],".":[],";":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[,,object]":{",":["[,,object]","*[,,object]"],".":[],";":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[/,pathEltOrInverse]":{"/":["[/,pathEltOrInverse]","*[/,pathEltOrInverse]"],"|":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[;,?[or([verbPath,verbSimple]),objectList]]":{";":["[;,?[or([verbPath,verbSimple]),objectList]]","*[;,?[or([verbPath,verbSimple]),objectList]]"],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[;,?[verb,objectList]]":{";":["[;,?[verb,objectList]]","*[;,?[verb,objectList]]"],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[UNION,groupGraphPattern]":{UNION:["[UNION,groupGraphPattern]","*[UNION,groupGraphPattern]"],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[graphPatternNotTriples,?.,?triplesBlock]":{"{":["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":[]},"*[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["[quadsNotTriples,?.,?triplesTemplate]","*[quadsNotTriples,?.,?triplesTemplate]"],"}":[]},"*[|,pathOneInPropertySet]":{"|":["[|,pathOneInPropertySet]","*[|,pathOneInPropertySet]"],")":[]},"*[|,pathSequence]":{"|":["[|,pathSequence]","*[|,pathSequence]"],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[||,conditionalAndExpression]":{"||":["[||,conditionalAndExpression]","*[||,conditionalAndExpression]"],AS:[],")":[],",":[],";":[]},"*dataBlockValue":{UNDEF:["dataBlockValue","*dataBlockValue"],IRI_REF:["dataBlockValue","*dataBlockValue"],TRUE:["dataBlockValue","*dataBlockValue"],FALSE:["dataBlockValue","*dataBlockValue"],PNAME_LN:["dataBlockValue","*dataBlockValue"],PNAME_NS:["dataBlockValue","*dataBlockValue"],STRING_LITERAL1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL2:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG2:["dataBlockValue","*dataBlockValue"],INTEGER:["dataBlockValue","*dataBlockValue"],DECIMAL:["dataBlockValue","*dataBlockValue"],DOUBLE:["dataBlockValue","*dataBlockValue"],INTEGER_POSITIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_POSITIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_POSITIVE:["dataBlockValue","*dataBlockValue"],INTEGER_NEGATIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_NEGATIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_NEGATIVE:["dataBlockValue","*dataBlockValue"],"}":[],")":[]},"*datasetClause":{FROM:["datasetClause","*datasetClause"],WHERE:[],"{":[]},"*describeDatasetClause":{FROM:["describeDatasetClause","*describeDatasetClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],VALUES:[],$:[]},"*graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"],")":[]},"*graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"],")":[]},"*groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"*havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"*or([[ (,*dataBlockValue,)],NIL])":{"(":["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],NIL:["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],"}":[]},"*or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],";":[]},"*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"*or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],WHERE:[],"{":[],FROM:[]},"*orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"*prefixDecl":{PREFIX:["prefixDecl","*prefixDecl"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[]},"*usingClause":{USING:["usingClause","*usingClause"],WHERE:[]},"*var":{VAR1:["var","*var"],VAR2:["var","*var"],")":[]},"*varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],FROM:[],VALUES:[],$:[]},"+graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"]},"+graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"]},"+groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"]},"+havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"]},"+or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"]},"+orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"]},"+varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"]},"?.":{".":["."],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?DISTINCT":{DISTINCT:["DISTINCT"],"!":[],"+":[],"-":[],VAR1:[],VAR2:[],"(":[],STR:[],LANG:[],LANGMATCHES:[],DATATYPE:[],BOUND:[],IRI:[],URI:[],BNODE:[],RAND:[],ABS:[],CEIL:[],FLOOR:[],ROUND:[],CONCAT:[],STRLEN:[],UCASE:[],LCASE:[],ENCODE_FOR_URI:[],CONTAINS:[],STRSTARTS:[],STRENDS:[],STRBEFORE:[],STRAFTER:[],YEAR:[],MONTH:[],DAY:[],HOURS:[],MINUTES:[],SECONDS:[],TIMEZONE:[],TZ:[],NOW:[],UUID:[],STRUUID:[],MD5:[],SHA1:[],SHA256:[],SHA384:[],SHA512:[],COALESCE:[],IF:[],STRLANG:[],STRDT:[],SAMETERM:[],ISIRI:[],ISURI:[],ISBLANK:[],ISLITERAL:[],ISNUMERIC:[],TRUE:[],FALSE:[],COUNT:[],SUM:[],MIN:[],MAX:[],AVG:[],SAMPLE:[],GROUP_CONCAT:[],SUBSTR:[],REPLACE:[],REGEX:[],EXISTS:[],NOT:[],IRI_REF:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],PNAME_LN:[],PNAME_NS:[],"*":[]},"?GRAPH":{GRAPH:["GRAPH"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT":{SILENT:["SILENT"],VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_1":{SILENT:["SILENT"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_2":{SILENT:["SILENT"],GRAPH:[],DEFAULT:[],NAMED:[],ALL:[]},"?SILENT_3":{SILENT:["SILENT"],GRAPH:[]},"?SILENT_4":{SILENT:["SILENT"],DEFAULT:[],GRAPH:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?WHERE":{WHERE:["WHERE"],"{":[]},"?[,,expression]":{",":["[,,expression]"],")":[]},"?[.,?constructTriples]":{".":["[.,?constructTriples]"],"}":[]},"?[.,?triplesBlock]":{".":["[.,?triplesBlock]"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[.,?triplesTemplate]":{".":["[.,?triplesTemplate]"],"}":[],GRAPH:[]},"?[;,SEPARATOR,=,string]":{";":["[;,SEPARATOR,=,string]"],")":[]},"?[;,update]":{";":["[;,update]"],$:[]},"?[AS,var]":{AS:["[AS,var]"],")":[]},"?[INTO,graphRef]":{INTO:["[INTO,graphRef]"],";":[],$:[]},"?[or([verbPath,verbSimple]),objectList]":{VAR1:["[or([verbPath,verbSimple]),objectList]"],VAR2:["[or([verbPath,verbSimple]),objectList]"],"^":["[or([verbPath,verbSimple]),objectList]"],a:["[or([verbPath,verbSimple]),objectList]"],"!":["[or([verbPath,verbSimple]),objectList]"],"(":["[or([verbPath,verbSimple]),objectList]"],IRI_REF:["[or([verbPath,verbSimple]),objectList]"],PNAME_LN:["[or([verbPath,verbSimple]),objectList]"],PNAME_NS:["[or([verbPath,verbSimple]),objectList]"],";":[],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],"^":["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],IRI_REF:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_LN:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_NS:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],")":[]},"?[update1,?[;,update]]":{INSERT:["[update1,?[;,update]]"],DELETE:["[update1,?[;,update]]"],LOAD:["[update1,?[;,update]]"],CLEAR:["[update1,?[;,update]]"],DROP:["[update1,?[;,update]]"],ADD:["[update1,?[;,update]]"],MOVE:["[update1,?[;,update]]"],COPY:["[update1,?[;,update]]"],CREATE:["[update1,?[;,update]]"],WITH:["[update1,?[;,update]]"],$:[]},"?[verb,objectList]":{a:["[verb,objectList]"],VAR1:["[verb,objectList]"],VAR2:["[verb,objectList]"],IRI_REF:["[verb,objectList]"],PNAME_LN:["[verb,objectList]"],PNAME_NS:["[verb,objectList]"],";":[],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?argList":{NIL:["argList"],"(":["argList"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],"*":[],"/":[],";":[]},"?baseDecl":{BASE:["baseDecl"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[],PREFIX:[]},"?constructTriples":{VAR1:["constructTriples"],VAR2:["constructTriples"],NIL:["constructTriples"],"(":["constructTriples"],"[":["constructTriples"],IRI_REF:["constructTriples"],TRUE:["constructTriples"],FALSE:["constructTriples"],BLANK_NODE_LABEL:["constructTriples"],ANON:["constructTriples"],PNAME_LN:["constructTriples"],PNAME_NS:["constructTriples"],STRING_LITERAL1:["constructTriples"],STRING_LITERAL2:["constructTriples"],STRING_LITERAL_LONG1:["constructTriples"],STRING_LITERAL_LONG2:["constructTriples"],INTEGER:["constructTriples"],DECIMAL:["constructTriples"],DOUBLE:["constructTriples"],INTEGER_POSITIVE:["constructTriples"],DECIMAL_POSITIVE:["constructTriples"],DOUBLE_POSITIVE:["constructTriples"],INTEGER_NEGATIVE:["constructTriples"],DECIMAL_NEGATIVE:["constructTriples"],DOUBLE_NEGATIVE:["constructTriples"],"}":[]},"?groupClause":{GROUP:["groupClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"?havingClause":{HAVING:["havingClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"?insertClause":{INSERT:["insertClause"],WHERE:[],USING:[]},"?limitClause":{LIMIT:["limitClause"],VALUES:[],$:[],"}":[]},"?limitOffsetClauses":{LIMIT:["limitOffsetClauses"],OFFSET:["limitOffsetClauses"],VALUES:[],$:[],"}":[]},"?offsetClause":{OFFSET:["offsetClause"],VALUES:[],$:[],"}":[]},"?or([DISTINCT,REDUCED])":{DISTINCT:["or([DISTINCT,REDUCED])"],REDUCED:["or([DISTINCT,REDUCED])"],"*":[],"(":[],VAR1:[],VAR2:[]},"?or([LANGTAG,[^^,iriRef]])":{LANGTAG:["or([LANGTAG,[^^,iriRef]])"],"^^":["or([LANGTAG,[^^,iriRef]])"],UNDEF:[],IRI_REF:[],TRUE:[],FALSE:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],a:[],VAR1:[],VAR2:[],"^":[],"!":[],"(":[],".":[],";":[],",":[],AS:[],")":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],"*":[],"/":[],"}":[],"[":[],NIL:[],BLANK_NODE_LABEL:[],ANON:[],"]":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])"],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"!=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IN:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AS:[],")":[],",":[],"||":[],"&&":[],";":[]},"?orderClause":{ORDER:["orderClause"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"?pathMod":{"*":["pathMod"],"?":["pathMod"],"+":["pathMod"],"{":["pathMod"],"|":[],"/":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"?triplesBlock":{VAR1:["triplesBlock"],VAR2:["triplesBlock"],NIL:["triplesBlock"],"(":["triplesBlock"],"[":["triplesBlock"],IRI_REF:["triplesBlock"],TRUE:["triplesBlock"],FALSE:["triplesBlock"],BLANK_NODE_LABEL:["triplesBlock"],ANON:["triplesBlock"],PNAME_LN:["triplesBlock"],PNAME_NS:["triplesBlock"],STRING_LITERAL1:["triplesBlock"],STRING_LITERAL2:["triplesBlock"],STRING_LITERAL_LONG1:["triplesBlock"],STRING_LITERAL_LONG2:["triplesBlock"],INTEGER:["triplesBlock"],DECIMAL:["triplesBlock"],DOUBLE:["triplesBlock"],INTEGER_POSITIVE:["triplesBlock"],DECIMAL_POSITIVE:["triplesBlock"],DOUBLE_POSITIVE:["triplesBlock"],INTEGER_NEGATIVE:["triplesBlock"],DECIMAL_NEGATIVE:["triplesBlock"],DOUBLE_NEGATIVE:["triplesBlock"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?triplesTemplate":{VAR1:["triplesTemplate"],VAR2:["triplesTemplate"],NIL:["triplesTemplate"],"(":["triplesTemplate"],"[":["triplesTemplate"],IRI_REF:["triplesTemplate"],TRUE:["triplesTemplate"],FALSE:["triplesTemplate"],BLANK_NODE_LABEL:["triplesTemplate"],ANON:["triplesTemplate"],PNAME_LN:["triplesTemplate"],PNAME_NS:["triplesTemplate"],STRING_LITERAL1:["triplesTemplate"],STRING_LITERAL2:["triplesTemplate"],STRING_LITERAL_LONG1:["triplesTemplate"],STRING_LITERAL_LONG2:["triplesTemplate"],INTEGER:["triplesTemplate"],DECIMAL:["triplesTemplate"],DOUBLE:["triplesTemplate"],INTEGER_POSITIVE:["triplesTemplate"],DECIMAL_POSITIVE:["triplesTemplate"],DOUBLE_POSITIVE:["triplesTemplate"],INTEGER_NEGATIVE:["triplesTemplate"],DECIMAL_NEGATIVE:["triplesTemplate"],DOUBLE_NEGATIVE:["triplesTemplate"],"}":[],GRAPH:[]},"?whereClause":{WHERE:["whereClause"],"{":["whereClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],VALUES:[],$:[]},"[ (,*dataBlockValue,)]":{"(":["(","*dataBlockValue",")"]},"[ (,*var,)]":{"(":["(","*var",")"]},"[ (,expression,)]":{"(":["(","expression",")"]},"[ (,expression,AS,var,)]":{"(":["(","expression","AS","var",")"]},"[!=,numericExpression]":{"!=":["!=","numericExpression"]},"[&&,valueLogical]":{"&&":["&&","valueLogical"]},"[*,unaryExpression]":{"*":["*","unaryExpression"]},"[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]":{WHERE:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"],FROM:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"]},"[+,multiplicativeExpression]":{"+":["+","multiplicativeExpression"]},"[,,expression]":{",":[",","expression"]},"[,,integer,}]":{",":[",","integer","}"]},"[,,objectPath]":{",":[",","objectPath"]},"[,,object]":{",":[",","object"]},"[,,or([},[integer,}]])]":{",":[",","or([},[integer,}]])"]},"[-,multiplicativeExpression]":{"-":["-","multiplicativeExpression"]},"[.,?constructTriples]":{".":[".","?constructTriples"]},"[.,?triplesBlock]":{".":[".","?triplesBlock"]},"[.,?triplesTemplate]":{".":[".","?triplesTemplate"]},"[/,pathEltOrInverse]":{"/":["/","pathEltOrInverse"]},"[/,unaryExpression]":{"/":["/","unaryExpression"]},"[;,?[or([verbPath,verbSimple]),objectList]]":{";":[";","?[or([verbPath,verbSimple]),objectList]"]},"[;,?[verb,objectList]]":{";":[";","?[verb,objectList]"]},"[;,SEPARATOR,=,string]":{";":[";","SEPARATOR","=","string"]},"[;,update]":{";":[";","update"]},"[<,numericExpression]":{"<":["<","numericExpression"]},"[<=,numericExpression]":{"<=":["<=","numericExpression"]},"[=,numericExpression]":{"=":["=","numericExpression"]},"[>,numericExpression]":{">":[">","numericExpression"]},"[>=,numericExpression]":{">=":[">=","numericExpression"]},"[AS,var]":{AS:["AS","var"]},"[IN,expressionList]":{IN:["IN","expressionList"]},"[INTO,graphRef]":{INTO:["INTO","graphRef"]},"[NAMED,iriRef]":{NAMED:["NAMED","iriRef"]},"[NOT,IN,expressionList]":{NOT:["NOT","IN","expressionList"]},"[UNION,groupGraphPattern]":{UNION:["UNION","groupGraphPattern"]},"[^^,iriRef]":{"^^":["^^","iriRef"]},"[constructTemplate,*datasetClause,whereClause,solutionModifier]":{"{":["constructTemplate","*datasetClause","whereClause","solutionModifier"]},"[deleteClause,?insertClause]":{DELETE:["deleteClause","?insertClause"]},"[graphPatternNotTriples,?.,?triplesBlock]":{"{":["graphPatternNotTriples","?.","?triplesBlock"],OPTIONAL:["graphPatternNotTriples","?.","?triplesBlock"],MINUS:["graphPatternNotTriples","?.","?triplesBlock"],GRAPH:["graphPatternNotTriples","?.","?triplesBlock"],SERVICE:["graphPatternNotTriples","?.","?triplesBlock"],FILTER:["graphPatternNotTriples","?.","?triplesBlock"],BIND:["graphPatternNotTriples","?.","?triplesBlock"],VALUES:["graphPatternNotTriples","?.","?triplesBlock"]},"[integer,or([[,,or([},[integer,}]])],}])]":{INTEGER:["integer","or([[,,or([},[integer,}]])],}])"]},"[integer,}]":{INTEGER:["integer","}"]},"[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]":{INTEGER_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"]},"[or([verbPath,verbSimple]),objectList]":{VAR1:["or([verbPath,verbSimple])","objectList"],VAR2:["or([verbPath,verbSimple])","objectList"],"^":["or([verbPath,verbSimple])","objectList"],a:["or([verbPath,verbSimple])","objectList"],"!":["or([verbPath,verbSimple])","objectList"],"(":["or([verbPath,verbSimple])","objectList"],IRI_REF:["or([verbPath,verbSimple])","objectList"],PNAME_LN:["or([verbPath,verbSimple])","objectList"],PNAME_NS:["or([verbPath,verbSimple])","objectList"]},"[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],"^":["pathOneInPropertySet","*[|,pathOneInPropertySet]"],IRI_REF:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_LN:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_NS:["pathOneInPropertySet","*[|,pathOneInPropertySet]"]},"[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["quadsNotTriples","?.","?triplesTemplate"]},"[update1,?[;,update]]":{INSERT:["update1","?[;,update]"],DELETE:["update1","?[;,update]"],LOAD:["update1","?[;,update]"],CLEAR:["update1","?[;,update]"],DROP:["update1","?[;,update]"],ADD:["update1","?[;,update]"],MOVE:["update1","?[;,update]"],COPY:["update1","?[;,update]"],CREATE:["update1","?[;,update]"],WITH:["update1","?[;,update]"]},"[verb,objectList]":{a:["verb","objectList"],VAR1:["verb","objectList"],VAR2:["verb","objectList"],IRI_REF:["verb","objectList"],PNAME_LN:["verb","objectList"],PNAME_NS:["verb","objectList"]},"[|,pathOneInPropertySet]":{"|":["|","pathOneInPropertySet"]},"[|,pathSequence]":{"|":["|","pathSequence"]},"[||,conditionalAndExpression]":{"||":["||","conditionalAndExpression"]},add:{ADD:["ADD","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},additiveExpression:{"!":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"+":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"(":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANGMATCHES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DATATYPE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BOUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BNODE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],RAND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ABS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CEIL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FLOOR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ROUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLEN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ENCODE_FOR_URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONTAINS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRSTARTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRENDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRBEFORE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRAFTER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],YEAR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MONTH:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DAY:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],HOURS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MINUTES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SECONDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TIMEZONE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TZ:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOW:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRUUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MD5:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA256:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA384:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA512:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COALESCE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRDT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMETERM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISIRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISURI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISBLANK:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISLITERAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISNUMERIC:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TRUE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FALSE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COUNT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MIN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MAX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AVG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMPLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],GROUP_CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUBSTR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REPLACE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REGEX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],EXISTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI_REF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_LN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_NS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"]},aggregate:{COUNT:["COUNT","(","?DISTINCT","or([*,expression])",")"],SUM:["SUM","(","?DISTINCT","expression",")"],MIN:["MIN","(","?DISTINCT","expression",")"],MAX:["MAX","(","?DISTINCT","expression",")"],AVG:["AVG","(","?DISTINCT","expression",")"],SAMPLE:["SAMPLE","(","?DISTINCT","expression",")"],GROUP_CONCAT:["GROUP_CONCAT","(","?DISTINCT","expression","?[;,SEPARATOR,=,string]",")"]},allowBnodes:{"}":[]},allowVars:{"}":[]},argList:{NIL:["NIL"],"(":["(","?DISTINCT","expression","*[,,expression]",")"]},askQuery:{ASK:["ASK","*datasetClause","whereClause","solutionModifier"]},baseDecl:{BASE:["BASE","IRI_REF"]},bind:{BIND:["BIND","(","expression","AS","var",")"]},blankNode:{BLANK_NODE_LABEL:["BLANK_NODE_LABEL"],ANON:["ANON"]},blankNodePropertyList:{"[":["[","propertyListNotEmpty","]"]},blankNodePropertyListPath:{"[":["[","propertyListPathNotEmpty","]"]},booleanLiteral:{TRUE:["TRUE"],FALSE:["FALSE"]},brackettedExpression:{"(":["(","expression",")"]},builtInCall:{STR:["STR","(","expression",")"],LANG:["LANG","(","expression",")"],LANGMATCHES:["LANGMATCHES","(","expression",",","expression",")"],DATATYPE:["DATATYPE","(","expression",")"],BOUND:["BOUND","(","var",")"],IRI:["IRI","(","expression",")"],URI:["URI","(","expression",")"],BNODE:["BNODE","or([[ (,expression,)],NIL])"],RAND:["RAND","NIL"],ABS:["ABS","(","expression",")"],CEIL:["CEIL","(","expression",")"],FLOOR:["FLOOR","(","expression",")"],ROUND:["ROUND","(","expression",")"],CONCAT:["CONCAT","expressionList"],SUBSTR:["substringExpression"],STRLEN:["STRLEN","(","expression",")"],REPLACE:["strReplaceExpression"],UCASE:["UCASE","(","expression",")"],LCASE:["LCASE","(","expression",")"],ENCODE_FOR_URI:["ENCODE_FOR_URI","(","expression",")"],CONTAINS:["CONTAINS","(","expression",",","expression",")"],STRSTARTS:["STRSTARTS","(","expression",",","expression",")"],STRENDS:["STRENDS","(","expression",",","expression",")"],STRBEFORE:["STRBEFORE","(","expression",",","expression",")"],STRAFTER:["STRAFTER","(","expression",",","expression",")"],YEAR:["YEAR","(","expression",")"],MONTH:["MONTH","(","expression",")"],DAY:["DAY","(","expression",")"],HOURS:["HOURS","(","expression",")"],MINUTES:["MINUTES","(","expression",")"],SECONDS:["SECONDS","(","expression",")"],TIMEZONE:["TIMEZONE","(","expression",")"],TZ:["TZ","(","expression",")"],NOW:["NOW","NIL"],UUID:["UUID","NIL"],STRUUID:["STRUUID","NIL"],MD5:["MD5","(","expression",")"],SHA1:["SHA1","(","expression",")"],SHA256:["SHA256","(","expression",")"],SHA384:["SHA384","(","expression",")"],SHA512:["SHA512","(","expression",")"],COALESCE:["COALESCE","expressionList"],IF:["IF","(","expression",",","expression",",","expression",")"],STRLANG:["STRLANG","(","expression",",","expression",")"],STRDT:["STRDT","(","expression",",","expression",")"],SAMETERM:["SAMETERM","(","expression",",","expression",")"],ISIRI:["ISIRI","(","expression",")"],ISURI:["ISURI","(","expression",")"],ISBLANK:["ISBLANK","(","expression",")"],ISLITERAL:["ISLITERAL","(","expression",")"],ISNUMERIC:["ISNUMERIC","(","expression",")"],REGEX:["regexExpression"],EXISTS:["existsFunc"],NOT:["notExistsFunc"]},clear:{CLEAR:["CLEAR","?SILENT_2","graphRefAll"]},collection:{"(":["(","+graphNode",")"]},collectionPath:{"(":["(","+graphNodePath",")"]},conditionalAndExpression:{"!":["valueLogical","*[&&,valueLogical]"],"+":["valueLogical","*[&&,valueLogical]"],"-":["valueLogical","*[&&,valueLogical]"],VAR1:["valueLogical","*[&&,valueLogical]"],VAR2:["valueLogical","*[&&,valueLogical]"],"(":["valueLogical","*[&&,valueLogical]"],STR:["valueLogical","*[&&,valueLogical]"],LANG:["valueLogical","*[&&,valueLogical]"],LANGMATCHES:["valueLogical","*[&&,valueLogical]"],DATATYPE:["valueLogical","*[&&,valueLogical]"],BOUND:["valueLogical","*[&&,valueLogical]"],IRI:["valueLogical","*[&&,valueLogical]"],URI:["valueLogical","*[&&,valueLogical]"],BNODE:["valueLogical","*[&&,valueLogical]"],RAND:["valueLogical","*[&&,valueLogical]"],ABS:["valueLogical","*[&&,valueLogical]"],CEIL:["valueLogical","*[&&,valueLogical]"],FLOOR:["valueLogical","*[&&,valueLogical]"],ROUND:["valueLogical","*[&&,valueLogical]"],CONCAT:["valueLogical","*[&&,valueLogical]"],STRLEN:["valueLogical","*[&&,valueLogical]"],UCASE:["valueLogical","*[&&,valueLogical]"],LCASE:["valueLogical","*[&&,valueLogical]"],ENCODE_FOR_URI:["valueLogical","*[&&,valueLogical]"],CONTAINS:["valueLogical","*[&&,valueLogical]"],STRSTARTS:["valueLogical","*[&&,valueLogical]"],STRENDS:["valueLogical","*[&&,valueLogical]"],STRBEFORE:["valueLogical","*[&&,valueLogical]"],STRAFTER:["valueLogical","*[&&,valueLogical]"],YEAR:["valueLogical","*[&&,valueLogical]"],MONTH:["valueLogical","*[&&,valueLogical]"],DAY:["valueLogical","*[&&,valueLogical]"],HOURS:["valueLogical","*[&&,valueLogical]"],MINUTES:["valueLogical","*[&&,valueLogical]"],SECONDS:["valueLogical","*[&&,valueLogical]"],TIMEZONE:["valueLogical","*[&&,valueLogical]"],TZ:["valueLogical","*[&&,valueLogical]"],NOW:["valueLogical","*[&&,valueLogical]"],UUID:["valueLogical","*[&&,valueLogical]"],STRUUID:["valueLogical","*[&&,valueLogical]"],MD5:["valueLogical","*[&&,valueLogical]"],SHA1:["valueLogical","*[&&,valueLogical]"],SHA256:["valueLogical","*[&&,valueLogical]"],SHA384:["valueLogical","*[&&,valueLogical]"],SHA512:["valueLogical","*[&&,valueLogical]"],COALESCE:["valueLogical","*[&&,valueLogical]"],IF:["valueLogical","*[&&,valueLogical]"],STRLANG:["valueLogical","*[&&,valueLogical]"],STRDT:["valueLogical","*[&&,valueLogical]"],SAMETERM:["valueLogical","*[&&,valueLogical]"],ISIRI:["valueLogical","*[&&,valueLogical]"],ISURI:["valueLogical","*[&&,valueLogical]"],ISBLANK:["valueLogical","*[&&,valueLogical]"],ISLITERAL:["valueLogical","*[&&,valueLogical]"],ISNUMERIC:["valueLogical","*[&&,valueLogical]"],TRUE:["valueLogical","*[&&,valueLogical]"],FALSE:["valueLogical","*[&&,valueLogical]"],COUNT:["valueLogical","*[&&,valueLogical]"],SUM:["valueLogical","*[&&,valueLogical]"],MIN:["valueLogical","*[&&,valueLogical]"],MAX:["valueLogical","*[&&,valueLogical]"],AVG:["valueLogical","*[&&,valueLogical]"],SAMPLE:["valueLogical","*[&&,valueLogical]"],GROUP_CONCAT:["valueLogical","*[&&,valueLogical]"],SUBSTR:["valueLogical","*[&&,valueLogical]"],REPLACE:["valueLogical","*[&&,valueLogical]"],REGEX:["valueLogical","*[&&,valueLogical]"],EXISTS:["valueLogical","*[&&,valueLogical]"],NOT:["valueLogical","*[&&,valueLogical]"],IRI_REF:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL2:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG2:["valueLogical","*[&&,valueLogical]"],INTEGER:["valueLogical","*[&&,valueLogical]"],DECIMAL:["valueLogical","*[&&,valueLogical]"],DOUBLE:["valueLogical","*[&&,valueLogical]"],INTEGER_POSITIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_POSITIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_POSITIVE:["valueLogical","*[&&,valueLogical]"],INTEGER_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_NEGATIVE:["valueLogical","*[&&,valueLogical]"],PNAME_LN:["valueLogical","*[&&,valueLogical]"],PNAME_NS:["valueLogical","*[&&,valueLogical]"]},conditionalOrExpression:{"!":["conditionalAndExpression","*[||,conditionalAndExpression]"],"+":["conditionalAndExpression","*[||,conditionalAndExpression]"],"-":["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR1:["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR2:["conditionalAndExpression","*[||,conditionalAndExpression]"],"(":["conditionalAndExpression","*[||,conditionalAndExpression]"],STR:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANGMATCHES:["conditionalAndExpression","*[||,conditionalAndExpression]"],DATATYPE:["conditionalAndExpression","*[||,conditionalAndExpression]"],BOUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],BNODE:["conditionalAndExpression","*[||,conditionalAndExpression]"],RAND:["conditionalAndExpression","*[||,conditionalAndExpression]"],ABS:["conditionalAndExpression","*[||,conditionalAndExpression]"],CEIL:["conditionalAndExpression","*[||,conditionalAndExpression]"],FLOOR:["conditionalAndExpression","*[||,conditionalAndExpression]"],ROUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLEN:["conditionalAndExpression","*[||,conditionalAndExpression]"],UCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],LCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],ENCODE_FOR_URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONTAINS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRSTARTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRENDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRBEFORE:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRAFTER:["conditionalAndExpression","*[||,conditionalAndExpression]"],YEAR:["conditionalAndExpression","*[||,conditionalAndExpression]"],MONTH:["conditionalAndExpression","*[||,conditionalAndExpression]"],DAY:["conditionalAndExpression","*[||,conditionalAndExpression]"],HOURS:["conditionalAndExpression","*[||,conditionalAndExpression]"],MINUTES:["conditionalAndExpression","*[||,conditionalAndExpression]"],SECONDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],TIMEZONE:["conditionalAndExpression","*[||,conditionalAndExpression]"],TZ:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOW:["conditionalAndExpression","*[||,conditionalAndExpression]"],UUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRUUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],MD5:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA1:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA256:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA384:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA512:["conditionalAndExpression","*[||,conditionalAndExpression]"],COALESCE:["conditionalAndExpression","*[||,conditionalAndExpression]"],IF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRDT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMETERM:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISIRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISURI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISBLANK:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISLITERAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISNUMERIC:["conditionalAndExpression","*[||,conditionalAndExpression]"],TRUE:["conditionalAndExpression","*[||,conditionalAndExpression]"],FALSE:["conditionalAndExpression","*[||,conditionalAndExpression]"],COUNT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUM:["conditionalAndExpression","*[||,conditionalAndExpression]"],MIN:["conditionalAndExpression","*[||,conditionalAndExpression]"],MAX:["conditionalAndExpression","*[||,conditionalAndExpression]"],AVG:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMPLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],GROUP_CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUBSTR:["conditionalAndExpression","*[||,conditionalAndExpression]"],REPLACE:["conditionalAndExpression","*[||,conditionalAndExpression]"],REGEX:["conditionalAndExpression","*[||,conditionalAndExpression]"],EXISTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOT:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI_REF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL2:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG2:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_LN:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_NS:["conditionalAndExpression","*[||,conditionalAndExpression]"]},constraint:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"]},constructQuery:{CONSTRUCT:["CONSTRUCT","or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])"]},constructTemplate:{"{":["{","?constructTriples","}"]},constructTriples:{VAR1:["triplesSameSubject","?[.,?constructTriples]"],VAR2:["triplesSameSubject","?[.,?constructTriples]"],NIL:["triplesSameSubject","?[.,?constructTriples]"],"(":["triplesSameSubject","?[.,?constructTriples]"],"[":["triplesSameSubject","?[.,?constructTriples]"],IRI_REF:["triplesSameSubject","?[.,?constructTriples]"],TRUE:["triplesSameSubject","?[.,?constructTriples]"],FALSE:["triplesSameSubject","?[.,?constructTriples]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?constructTriples]"],ANON:["triplesSameSubject","?[.,?constructTriples]"],PNAME_LN:["triplesSameSubject","?[.,?constructTriples]"],PNAME_NS:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL2:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?constructTriples]"],INTEGER:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"]},copy:{COPY:["COPY","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},create:{CREATE:["CREATE","?SILENT_3","graphRef"]},dataBlock:{NIL:["or([inlineDataOneVar,inlineDataFull])"],"(":["or([inlineDataOneVar,inlineDataFull])"],VAR1:["or([inlineDataOneVar,inlineDataFull])"],VAR2:["or([inlineDataOneVar,inlineDataFull])"]},dataBlockValue:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],UNDEF:["UNDEF"]},datasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},defaultGraphClause:{IRI_REF:["sourceSelector"],PNAME_LN:["sourceSelector"],PNAME_NS:["sourceSelector"]},delete1:{DATA:["DATA","quadDataNoBnodes"],WHERE:["WHERE","quadPatternNoBnodes"],"{":["quadPatternNoBnodes","?insertClause","*usingClause","WHERE","groupGraphPattern"]},deleteClause:{DELETE:["DELETE","quadPattern"]},describeDatasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},describeQuery:{DESCRIBE:["DESCRIBE","or([+varOrIRIref,*])","*describeDatasetClause","?whereClause","solutionModifier"]},disallowBnodes:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},disallowVars:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},drop:{DROP:["DROP","?SILENT_2","graphRefAll"]},existsFunc:{EXISTS:["EXISTS","groupGraphPattern"]},expression:{"!":["conditionalOrExpression"],"+":["conditionalOrExpression"],"-":["conditionalOrExpression"],VAR1:["conditionalOrExpression"],VAR2:["conditionalOrExpression"],"(":["conditionalOrExpression"],STR:["conditionalOrExpression"],LANG:["conditionalOrExpression"],LANGMATCHES:["conditionalOrExpression"],DATATYPE:["conditionalOrExpression"],BOUND:["conditionalOrExpression"],IRI:["conditionalOrExpression"],URI:["conditionalOrExpression"],BNODE:["conditionalOrExpression"],RAND:["conditionalOrExpression"],ABS:["conditionalOrExpression"],CEIL:["conditionalOrExpression"],FLOOR:["conditionalOrExpression"],ROUND:["conditionalOrExpression"],CONCAT:["conditionalOrExpression"],STRLEN:["conditionalOrExpression"],UCASE:["conditionalOrExpression"],LCASE:["conditionalOrExpression"],ENCODE_FOR_URI:["conditionalOrExpression"],CONTAINS:["conditionalOrExpression"],STRSTARTS:["conditionalOrExpression"],STRENDS:["conditionalOrExpression"],STRBEFORE:["conditionalOrExpression"],STRAFTER:["conditionalOrExpression"],YEAR:["conditionalOrExpression"],MONTH:["conditionalOrExpression"],DAY:["conditionalOrExpression"],HOURS:["conditionalOrExpression"],MINUTES:["conditionalOrExpression"],SECONDS:["conditionalOrExpression"],TIMEZONE:["conditionalOrExpression"],TZ:["conditionalOrExpression"],NOW:["conditionalOrExpression"],UUID:["conditionalOrExpression"],STRUUID:["conditionalOrExpression"],MD5:["conditionalOrExpression"],SHA1:["conditionalOrExpression"],SHA256:["conditionalOrExpression"],SHA384:["conditionalOrExpression"],SHA512:["conditionalOrExpression"],COALESCE:["conditionalOrExpression"],IF:["conditionalOrExpression"],STRLANG:["conditionalOrExpression"],STRDT:["conditionalOrExpression"],SAMETERM:["conditionalOrExpression"],ISIRI:["conditionalOrExpression"],ISURI:["conditionalOrExpression"],ISBLANK:["conditionalOrExpression"],ISLITERAL:["conditionalOrExpression"],ISNUMERIC:["conditionalOrExpression"],TRUE:["conditionalOrExpression"],FALSE:["conditionalOrExpression"],COUNT:["conditionalOrExpression"],SUM:["conditionalOrExpression"],MIN:["conditionalOrExpression"],MAX:["conditionalOrExpression"],AVG:["conditionalOrExpression"],SAMPLE:["conditionalOrExpression"],GROUP_CONCAT:["conditionalOrExpression"],SUBSTR:["conditionalOrExpression"],REPLACE:["conditionalOrExpression"],REGEX:["conditionalOrExpression"],EXISTS:["conditionalOrExpression"],NOT:["conditionalOrExpression"],IRI_REF:["conditionalOrExpression"],STRING_LITERAL1:["conditionalOrExpression"],STRING_LITERAL2:["conditionalOrExpression"],STRING_LITERAL_LONG1:["conditionalOrExpression"],STRING_LITERAL_LONG2:["conditionalOrExpression"],INTEGER:["conditionalOrExpression"],DECIMAL:["conditionalOrExpression"],DOUBLE:["conditionalOrExpression"],INTEGER_POSITIVE:["conditionalOrExpression"],DECIMAL_POSITIVE:["conditionalOrExpression"],DOUBLE_POSITIVE:["conditionalOrExpression"],INTEGER_NEGATIVE:["conditionalOrExpression"],DECIMAL_NEGATIVE:["conditionalOrExpression"],DOUBLE_NEGATIVE:["conditionalOrExpression"],PNAME_LN:["conditionalOrExpression"],PNAME_NS:["conditionalOrExpression"]},expressionList:{NIL:["NIL"],"(":["(","expression","*[,,expression]",")"]},filter:{FILTER:["FILTER","constraint"]},functionCall:{IRI_REF:["iriRef","argList"],PNAME_LN:["iriRef","argList"],PNAME_NS:["iriRef","argList"]},graphGraphPattern:{GRAPH:["GRAPH","varOrIRIref","groupGraphPattern"]},graphNode:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNode"],"[":["triplesNode"]},graphNodePath:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNodePath"],"[":["triplesNodePath"]},graphOrDefault:{DEFAULT:["DEFAULT"],IRI_REF:["?GRAPH","iriRef"],PNAME_LN:["?GRAPH","iriRef"],PNAME_NS:["?GRAPH","iriRef"],GRAPH:["?GRAPH","iriRef"]},graphPatternNotTriples:{"{":["groupOrUnionGraphPattern"],OPTIONAL:["optionalGraphPattern"],MINUS:["minusGraphPattern"],GRAPH:["graphGraphPattern"],SERVICE:["serviceGraphPattern"],FILTER:["filter"],BIND:["bind"],VALUES:["inlineData"]},graphRef:{GRAPH:["GRAPH","iriRef"]},graphRefAll:{GRAPH:["graphRef"],DEFAULT:["DEFAULT"],NAMED:["NAMED"],ALL:["ALL"]},graphTerm:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],BLANK_NODE_LABEL:["blankNode"],ANON:["blankNode"],NIL:["NIL"]},groupClause:{GROUP:["GROUP","BY","+groupCondition"]},groupCondition:{STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"],"(":["(","expression","?[AS,var]",")"],VAR1:["var"],VAR2:["var"]},groupGraphPattern:{"{":["{","or([subSelect,groupGraphPatternSub])","}"]},groupGraphPatternSub:{"{":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],NIL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"(":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"[":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],IRI_REF:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],TRUE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FALSE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BLANK_NODE_LABEL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],ANON:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_LN:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_NS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"]},groupOrUnionGraphPattern:{"{":["groupGraphPattern","*[UNION,groupGraphPattern]"]},havingClause:{HAVING:["HAVING","+havingCondition"]},havingCondition:{"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"]},inlineData:{VALUES:["VALUES","dataBlock"]},inlineDataFull:{NIL:["or([NIL,[ (,*var,)]])","{","*or([[ (,*dataBlockValue,)],NIL])","}"],"(":["or([NIL,[ (,*var,)]])","{","*or([[ (,*dataBlockValue,)],NIL])","}"]},inlineDataOneVar:{VAR1:["var","{","*dataBlockValue","}"],VAR2:["var","{","*dataBlockValue","}"]},insert1:{DATA:["DATA","quadData"],"{":["quadPattern","*usingClause","WHERE","groupGraphPattern"]},insertClause:{INSERT:["INSERT","quadPattern"]},integer:{INTEGER:["INTEGER"]},iriRef:{IRI_REF:["IRI_REF"],PNAME_LN:["prefixedName"],PNAME_NS:["prefixedName"]},iriRefOrFunction:{IRI_REF:["iriRef","?argList"],PNAME_LN:["iriRef","?argList"],PNAME_NS:["iriRef","?argList"]},limitClause:{LIMIT:["LIMIT","INTEGER"]},limitOffsetClauses:{LIMIT:["limitClause","?offsetClause"],OFFSET:["offsetClause","?limitClause"]},load:{LOAD:["LOAD","?SILENT_1","iriRef","?[INTO,graphRef]"]},minusGraphPattern:{MINUS:["MINUS","groupGraphPattern"]},modify:{WITH:["WITH","iriRef","or([[deleteClause,?insertClause],insertClause])","*usingClause","WHERE","groupGraphPattern"]},move:{MOVE:["MOVE","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},multiplicativeExpression:{"!":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"+":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"-":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"(":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANGMATCHES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DATATYPE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BOUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BNODE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],RAND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ABS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CEIL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FLOOR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ROUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLEN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ENCODE_FOR_URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONTAINS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRSTARTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRENDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRBEFORE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRAFTER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],YEAR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MONTH:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DAY:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],HOURS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MINUTES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SECONDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TIMEZONE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TZ:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOW:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRUUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MD5:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA256:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA384:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA512:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COALESCE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRDT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMETERM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISIRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISURI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISBLANK:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISLITERAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISNUMERIC:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TRUE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FALSE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COUNT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MIN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MAX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],AVG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMPLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],GROUP_CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUBSTR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REPLACE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REGEX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],EXISTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI_REF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_LN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_NS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"]},namedGraphClause:{NAMED:["NAMED","sourceSelector"]},notExistsFunc:{NOT:["NOT","EXISTS","groupGraphPattern"]},numericExpression:{"!":["additiveExpression"],"+":["additiveExpression"],"-":["additiveExpression"],VAR1:["additiveExpression"],VAR2:["additiveExpression"],"(":["additiveExpression"],STR:["additiveExpression"],LANG:["additiveExpression"],LANGMATCHES:["additiveExpression"],DATATYPE:["additiveExpression"],BOUND:["additiveExpression"],IRI:["additiveExpression"],URI:["additiveExpression"],BNODE:["additiveExpression"],RAND:["additiveExpression"],ABS:["additiveExpression"],CEIL:["additiveExpression"],FLOOR:["additiveExpression"],ROUND:["additiveExpression"],CONCAT:["additiveExpression"],STRLEN:["additiveExpression"],UCASE:["additiveExpression"],LCASE:["additiveExpression"],ENCODE_FOR_URI:["additiveExpression"],CONTAINS:["additiveExpression"],STRSTARTS:["additiveExpression"],STRENDS:["additiveExpression"],STRBEFORE:["additiveExpression"],STRAFTER:["additiveExpression"],YEAR:["additiveExpression"],MONTH:["additiveExpression"],DAY:["additiveExpression"],HOURS:["additiveExpression"],MINUTES:["additiveExpression"],SECONDS:["additiveExpression"],TIMEZONE:["additiveExpression"],TZ:["additiveExpression"],NOW:["additiveExpression"],UUID:["additiveExpression"],STRUUID:["additiveExpression"],MD5:["additiveExpression"],SHA1:["additiveExpression"],SHA256:["additiveExpression"],SHA384:["additiveExpression"],SHA512:["additiveExpression"],COALESCE:["additiveExpression"],IF:["additiveExpression"],STRLANG:["additiveExpression"],STRDT:["additiveExpression"],SAMETERM:["additiveExpression"],ISIRI:["additiveExpression"],ISURI:["additiveExpression"],ISBLANK:["additiveExpression"],ISLITERAL:["additiveExpression"],ISNUMERIC:["additiveExpression"],TRUE:["additiveExpression"],FALSE:["additiveExpression"],COUNT:["additiveExpression"],SUM:["additiveExpression"],MIN:["additiveExpression"],MAX:["additiveExpression"],AVG:["additiveExpression"],SAMPLE:["additiveExpression"],GROUP_CONCAT:["additiveExpression"],SUBSTR:["additiveExpression"],REPLACE:["additiveExpression"],REGEX:["additiveExpression"],EXISTS:["additiveExpression"],NOT:["additiveExpression"],IRI_REF:["additiveExpression"],STRING_LITERAL1:["additiveExpression"],STRING_LITERAL2:["additiveExpression"],STRING_LITERAL_LONG1:["additiveExpression"],STRING_LITERAL_LONG2:["additiveExpression"],INTEGER:["additiveExpression"],DECIMAL:["additiveExpression"],DOUBLE:["additiveExpression"],INTEGER_POSITIVE:["additiveExpression"],DECIMAL_POSITIVE:["additiveExpression"],DOUBLE_POSITIVE:["additiveExpression"],INTEGER_NEGATIVE:["additiveExpression"],DECIMAL_NEGATIVE:["additiveExpression"],DOUBLE_NEGATIVE:["additiveExpression"],PNAME_LN:["additiveExpression"],PNAME_NS:["additiveExpression"]},numericLiteral:{INTEGER:["numericLiteralUnsigned"],DECIMAL:["numericLiteralUnsigned"],DOUBLE:["numericLiteralUnsigned"],INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},numericLiteralNegative:{INTEGER_NEGATIVE:["INTEGER_NEGATIVE"],DECIMAL_NEGATIVE:["DECIMAL_NEGATIVE"],DOUBLE_NEGATIVE:["DOUBLE_NEGATIVE"]},numericLiteralPositive:{INTEGER_POSITIVE:["INTEGER_POSITIVE"],DECIMAL_POSITIVE:["DECIMAL_POSITIVE"],DOUBLE_POSITIVE:["DOUBLE_POSITIVE"]},numericLiteralUnsigned:{INTEGER:["INTEGER"],DECIMAL:["DECIMAL"],DOUBLE:["DOUBLE"]},object:{"(":["graphNode"],"[":["graphNode"],VAR1:["graphNode"],VAR2:["graphNode"],NIL:["graphNode"],IRI_REF:["graphNode"],TRUE:["graphNode"],FALSE:["graphNode"],BLANK_NODE_LABEL:["graphNode"],ANON:["graphNode"],PNAME_LN:["graphNode"],PNAME_NS:["graphNode"],STRING_LITERAL1:["graphNode"],STRING_LITERAL2:["graphNode"],STRING_LITERAL_LONG1:["graphNode"],STRING_LITERAL_LONG2:["graphNode"],INTEGER:["graphNode"],DECIMAL:["graphNode"],DOUBLE:["graphNode"],INTEGER_POSITIVE:["graphNode"],DECIMAL_POSITIVE:["graphNode"],DOUBLE_POSITIVE:["graphNode"],INTEGER_NEGATIVE:["graphNode"],DECIMAL_NEGATIVE:["graphNode"],DOUBLE_NEGATIVE:["graphNode"]},objectList:{"(":["object","*[,,object]"],"[":["object","*[,,object]"],VAR1:["object","*[,,object]"],VAR2:["object","*[,,object]"],NIL:["object","*[,,object]"],IRI_REF:["object","*[,,object]"],TRUE:["object","*[,,object]"],FALSE:["object","*[,,object]"],BLANK_NODE_LABEL:["object","*[,,object]"],ANON:["object","*[,,object]"],PNAME_LN:["object","*[,,object]"],PNAME_NS:["object","*[,,object]"],STRING_LITERAL1:["object","*[,,object]"],STRING_LITERAL2:["object","*[,,object]"],STRING_LITERAL_LONG1:["object","*[,,object]"],STRING_LITERAL_LONG2:["object","*[,,object]"],INTEGER:["object","*[,,object]"],DECIMAL:["object","*[,,object]"],DOUBLE:["object","*[,,object]"],INTEGER_POSITIVE:["object","*[,,object]"],DECIMAL_POSITIVE:["object","*[,,object]"],DOUBLE_POSITIVE:["object","*[,,object]"],INTEGER_NEGATIVE:["object","*[,,object]"],DECIMAL_NEGATIVE:["object","*[,,object]"],DOUBLE_NEGATIVE:["object","*[,,object]"]},objectListPath:{"(":["objectPath","*[,,objectPath]"],"[":["objectPath","*[,,objectPath]"],VAR1:["objectPath","*[,,objectPath]"],VAR2:["objectPath","*[,,objectPath]"],NIL:["objectPath","*[,,objectPath]"],IRI_REF:["objectPath","*[,,objectPath]"],TRUE:["objectPath","*[,,objectPath]"],FALSE:["objectPath","*[,,objectPath]"],BLANK_NODE_LABEL:["objectPath","*[,,objectPath]"],ANON:["objectPath","*[,,objectPath]"],PNAME_LN:["objectPath","*[,,objectPath]"],PNAME_NS:["objectPath","*[,,objectPath]"],STRING_LITERAL1:["objectPath","*[,,objectPath]"],STRING_LITERAL2:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG1:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG2:["objectPath","*[,,objectPath]"],INTEGER:["objectPath","*[,,objectPath]"],DECIMAL:["objectPath","*[,,objectPath]"],DOUBLE:["objectPath","*[,,objectPath]"],INTEGER_POSITIVE:["objectPath","*[,,objectPath]"],DECIMAL_POSITIVE:["objectPath","*[,,objectPath]"],DOUBLE_POSITIVE:["objectPath","*[,,objectPath]"],INTEGER_NEGATIVE:["objectPath","*[,,objectPath]"],DECIMAL_NEGATIVE:["objectPath","*[,,objectPath]"],DOUBLE_NEGATIVE:["objectPath","*[,,objectPath]"]},objectPath:{"(":["graphNodePath"],"[":["graphNodePath"],VAR1:["graphNodePath"],VAR2:["graphNodePath"],NIL:["graphNodePath"],IRI_REF:["graphNodePath"],TRUE:["graphNodePath"],FALSE:["graphNodePath"],BLANK_NODE_LABEL:["graphNodePath"],ANON:["graphNodePath"],PNAME_LN:["graphNodePath"],PNAME_NS:["graphNodePath"],STRING_LITERAL1:["graphNodePath"],STRING_LITERAL2:["graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath"],INTEGER:["graphNodePath"],DECIMAL:["graphNodePath"],DOUBLE:["graphNodePath"],INTEGER_POSITIVE:["graphNodePath"],DECIMAL_POSITIVE:["graphNodePath"],DOUBLE_POSITIVE:["graphNodePath"],INTEGER_NEGATIVE:["graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath"]},offsetClause:{OFFSET:["OFFSET","INTEGER"]},optionalGraphPattern:{OPTIONAL:["OPTIONAL","groupGraphPattern"]},"or([*,expression])":{"*":["*"],"!":["expression"],"+":["expression"],"-":["expression"],VAR1:["expression"],VAR2:["expression"],"(":["expression"],STR:["expression"],LANG:["expression"],LANGMATCHES:["expression"],DATATYPE:["expression"],BOUND:["expression"],IRI:["expression"],URI:["expression"],BNODE:["expression"],RAND:["expression"],ABS:["expression"],CEIL:["expression"],FLOOR:["expression"],ROUND:["expression"],CONCAT:["expression"],STRLEN:["expression"],UCASE:["expression"],LCASE:["expression"],ENCODE_FOR_URI:["expression"],CONTAINS:["expression"],STRSTARTS:["expression"],STRENDS:["expression"],STRBEFORE:["expression"],STRAFTER:["expression"],YEAR:["expression"],MONTH:["expression"],DAY:["expression"],HOURS:["expression"],MINUTES:["expression"],SECONDS:["expression"],TIMEZONE:["expression"],TZ:["expression"],NOW:["expression"],UUID:["expression"],STRUUID:["expression"],MD5:["expression"],SHA1:["expression"],SHA256:["expression"],SHA384:["expression"],SHA512:["expression"],COALESCE:["expression"],IF:["expression"],STRLANG:["expression"],STRDT:["expression"],SAMETERM:["expression"],ISIRI:["expression"],ISURI:["expression"],ISBLANK:["expression"],ISLITERAL:["expression"],ISNUMERIC:["expression"],TRUE:["expression"],FALSE:["expression"],COUNT:["expression"],SUM:["expression"],MIN:["expression"],MAX:["expression"],AVG:["expression"],SAMPLE:["expression"],GROUP_CONCAT:["expression"],SUBSTR:["expression"],REPLACE:["expression"],REGEX:["expression"],EXISTS:["expression"],NOT:["expression"],IRI_REF:["expression"],STRING_LITERAL1:["expression"],STRING_LITERAL2:["expression"],STRING_LITERAL_LONG1:["expression"],STRING_LITERAL_LONG2:["expression"],INTEGER:["expression"],DECIMAL:["expression"],DOUBLE:["expression"],INTEGER_POSITIVE:["expression"],DECIMAL_POSITIVE:["expression"],DOUBLE_POSITIVE:["expression"],INTEGER_NEGATIVE:["expression"],DECIMAL_NEGATIVE:["expression"],DOUBLE_NEGATIVE:["expression"],PNAME_LN:["expression"],PNAME_NS:["expression"]},"or([+or([var,[ (,expression,AS,var,)]]),*])":{"(":["+or([var,[ (,expression,AS,var,)]])"],VAR1:["+or([var,[ (,expression,AS,var,)]])"],VAR2:["+or([var,[ (,expression,AS,var,)]])"],"*":["*"]},"or([+varOrIRIref,*])":{VAR1:["+varOrIRIref"],VAR2:["+varOrIRIref"],IRI_REF:["+varOrIRIref"],PNAME_LN:["+varOrIRIref"],PNAME_NS:["+varOrIRIref"],"*":["*"]},"or([ASC,DESC])":{ASC:["ASC"],DESC:["DESC"]},"or([DISTINCT,REDUCED])":{DISTINCT:["DISTINCT"],REDUCED:["REDUCED"]},"or([LANGTAG,[^^,iriRef]])":{LANGTAG:["LANGTAG"],"^^":["[^^,iriRef]"]},"or([NIL,[ (,*var,)]])":{NIL:["NIL"],"(":["[ (,*var,)]"]},"or([[ (,*dataBlockValue,)],NIL])":{"(":["[ (,*dataBlockValue,)]"],NIL:["NIL"]},"or([[ (,expression,)],NIL])":{"(":["[ (,expression,)]"],NIL:["NIL"]},"or([[*,unaryExpression],[/,unaryExpression]])":{"*":["[*,unaryExpression]"],"/":["[/,unaryExpression]"]},"or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["[+,multiplicativeExpression]"],"-":["[-,multiplicativeExpression]"],INTEGER_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],INTEGER_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"]},"or([[,,or([},[integer,}]])],}])":{",":["[,,or([},[integer,}]])]"],"}":["}"]},"or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["[=,numericExpression]"],"!=":["[!=,numericExpression]"],"<":["[<,numericExpression]"],">":["[>,numericExpression]"],"<=":["[<=,numericExpression]"],">=":["[>=,numericExpression]"],IN:["[IN,expressionList]"],NOT:["[NOT,IN,expressionList]"]},"or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])":{"{":["[constructTemplate,*datasetClause,whereClause,solutionModifier]"],WHERE:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"],FROM:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"]},"or([[deleteClause,?insertClause],insertClause])":{DELETE:["[deleteClause,?insertClause]"],INSERT:["insertClause"]},"or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])":{INTEGER:["[integer,or([[,,or([},[integer,}]])],}])]"],",":["[,,integer,}]"]},"or([defaultGraphClause,namedGraphClause])":{IRI_REF:["defaultGraphClause"],PNAME_LN:["defaultGraphClause"],PNAME_NS:["defaultGraphClause"],NAMED:["namedGraphClause"]},"or([inlineDataOneVar,inlineDataFull])":{VAR1:["inlineDataOneVar"],VAR2:["inlineDataOneVar"],NIL:["inlineDataFull"],"(":["inlineDataFull"]},"or([iriRef,[NAMED,iriRef]])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],NAMED:["[NAMED,iriRef]"]},"or([iriRef,a])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"]},"or([numericLiteralPositive,numericLiteralNegative])":{INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},"or([queryAll,updateAll])":{CONSTRUCT:["queryAll"],DESCRIBE:["queryAll"],ASK:["queryAll"],SELECT:["queryAll"],INSERT:["updateAll"],DELETE:["updateAll"],LOAD:["updateAll"],CLEAR:["updateAll"],DROP:["updateAll"],ADD:["updateAll"],MOVE:["updateAll"],COPY:["updateAll"],CREATE:["updateAll"],WITH:["updateAll"],$:["updateAll"]},"or([selectQuery,constructQuery,describeQuery,askQuery])":{SELECT:["selectQuery"],CONSTRUCT:["constructQuery"],DESCRIBE:["describeQuery"],ASK:["askQuery"]},"or([subSelect,groupGraphPatternSub])":{SELECT:["subSelect"],"{":["groupGraphPatternSub"],OPTIONAL:["groupGraphPatternSub"],MINUS:["groupGraphPatternSub"],GRAPH:["groupGraphPatternSub"],SERVICE:["groupGraphPatternSub"],FILTER:["groupGraphPatternSub"],BIND:["groupGraphPatternSub"],VALUES:["groupGraphPatternSub"],VAR1:["groupGraphPatternSub"],VAR2:["groupGraphPatternSub"],NIL:["groupGraphPatternSub"],"(":["groupGraphPatternSub"],"[":["groupGraphPatternSub"],IRI_REF:["groupGraphPatternSub"],TRUE:["groupGraphPatternSub"],FALSE:["groupGraphPatternSub"],BLANK_NODE_LABEL:["groupGraphPatternSub"],ANON:["groupGraphPatternSub"],PNAME_LN:["groupGraphPatternSub"],PNAME_NS:["groupGraphPatternSub"],STRING_LITERAL1:["groupGraphPatternSub"],STRING_LITERAL2:["groupGraphPatternSub"],STRING_LITERAL_LONG1:["groupGraphPatternSub"],STRING_LITERAL_LONG2:["groupGraphPatternSub"],INTEGER:["groupGraphPatternSub"],DECIMAL:["groupGraphPatternSub"],DOUBLE:["groupGraphPatternSub"],INTEGER_POSITIVE:["groupGraphPatternSub"],DECIMAL_POSITIVE:["groupGraphPatternSub"],DOUBLE_POSITIVE:["groupGraphPatternSub"],INTEGER_NEGATIVE:["groupGraphPatternSub"],DECIMAL_NEGATIVE:["groupGraphPatternSub"],DOUBLE_NEGATIVE:["groupGraphPatternSub"],"}":["groupGraphPatternSub"]},"or([var,[ (,expression,AS,var,)]])":{VAR1:["var"],VAR2:["var"],"(":["[ (,expression,AS,var,)]"]},"or([verbPath,verbSimple])":{"^":["verbPath"],a:["verbPath"],"!":["verbPath"],"(":["verbPath"],IRI_REF:["verbPath"],PNAME_LN:["verbPath"],PNAME_NS:["verbPath"],VAR1:["verbSimple"],VAR2:["verbSimple"]},"or([},[integer,}]])":{"}":["}"],INTEGER:["[integer,}]"]},orderClause:{ORDER:["ORDER","BY","+orderCondition"]},orderCondition:{ASC:["or([ASC,DESC])","brackettedExpression"],DESC:["or([ASC,DESC])","brackettedExpression"],"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"],VAR1:["var"],VAR2:["var"]},path:{"^":["pathAlternative"],a:["pathAlternative"],"!":["pathAlternative"],"(":["pathAlternative"],IRI_REF:["pathAlternative"],PNAME_LN:["pathAlternative"],PNAME_NS:["pathAlternative"]},pathAlternative:{"^":["pathSequence","*[|,pathSequence]"],a:["pathSequence","*[|,pathSequence]"],"!":["pathSequence","*[|,pathSequence]"],"(":["pathSequence","*[|,pathSequence]"],IRI_REF:["pathSequence","*[|,pathSequence]"],PNAME_LN:["pathSequence","*[|,pathSequence]"],PNAME_NS:["pathSequence","*[|,pathSequence]"]},pathElt:{a:["pathPrimary","?pathMod"],"!":["pathPrimary","?pathMod"],"(":["pathPrimary","?pathMod"],IRI_REF:["pathPrimary","?pathMod"],PNAME_LN:["pathPrimary","?pathMod"],PNAME_NS:["pathPrimary","?pathMod"]},pathEltOrInverse:{a:["pathElt"],"!":["pathElt"],"(":["pathElt"],IRI_REF:["pathElt"],PNAME_LN:["pathElt"],PNAME_NS:["pathElt"],"^":["^","pathElt"]},pathMod:{"*":["*"],"?":["?"],"+":["+"],"{":["{","or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])"]},pathNegatedPropertySet:{a:["pathOneInPropertySet"],"^":["pathOneInPropertySet"],IRI_REF:["pathOneInPropertySet"],PNAME_LN:["pathOneInPropertySet"],PNAME_NS:["pathOneInPropertySet"],"(":["(","?[pathOneInPropertySet,*[|,pathOneInPropertySet]]",")"]},pathOneInPropertySet:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"],"^":["^","or([iriRef,a])"]},pathPrimary:{IRI_REF:["storeProperty","iriRef"],PNAME_LN:["storeProperty","iriRef"],PNAME_NS:["storeProperty","iriRef"],a:["storeProperty","a"],"!":["!","pathNegatedPropertySet"],"(":["(","path",")"]},pathSequence:{"^":["pathEltOrInverse","*[/,pathEltOrInverse]"],a:["pathEltOrInverse","*[/,pathEltOrInverse]"],"!":["pathEltOrInverse","*[/,pathEltOrInverse]"],"(":["pathEltOrInverse","*[/,pathEltOrInverse]"],IRI_REF:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_LN:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_NS:["pathEltOrInverse","*[/,pathEltOrInverse]"]},prefixDecl:{PREFIX:["PREFIX","PNAME_NS","IRI_REF"]},prefixedName:{PNAME_LN:["PNAME_LN"],PNAME_NS:["PNAME_NS"]},primaryExpression:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["iriRefOrFunction"],PNAME_LN:["iriRefOrFunction"],PNAME_NS:["iriRefOrFunction"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],VAR1:["var"],VAR2:["var"],COUNT:["aggregate"],SUM:["aggregate"],MIN:["aggregate"],MAX:["aggregate"],AVG:["aggregate"],SAMPLE:["aggregate"],GROUP_CONCAT:["aggregate"]},prologue:{PREFIX:["?baseDecl","*prefixDecl"],BASE:["?baseDecl","*prefixDecl"],$:["?baseDecl","*prefixDecl"],CONSTRUCT:["?baseDecl","*prefixDecl"],DESCRIBE:["?baseDecl","*prefixDecl"],ASK:["?baseDecl","*prefixDecl"],INSERT:["?baseDecl","*prefixDecl"],DELETE:["?baseDecl","*prefixDecl"],SELECT:["?baseDecl","*prefixDecl"],LOAD:["?baseDecl","*prefixDecl"],CLEAR:["?baseDecl","*prefixDecl"],DROP:["?baseDecl","*prefixDecl"],ADD:["?baseDecl","*prefixDecl"],MOVE:["?baseDecl","*prefixDecl"],COPY:["?baseDecl","*prefixDecl"],CREATE:["?baseDecl","*prefixDecl"],WITH:["?baseDecl","*prefixDecl"]},propertyList:{a:["propertyListNotEmpty"],VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"}":[],GRAPH:[]},propertyListNotEmpty:{a:["verb","objectList","*[;,?[verb,objectList]]"],VAR1:["verb","objectList","*[;,?[verb,objectList]]"],VAR2:["verb","objectList","*[;,?[verb,objectList]]"],IRI_REF:["verb","objectList","*[;,?[verb,objectList]]"],PNAME_LN:["verb","objectList","*[;,?[verb,objectList]]"],PNAME_NS:["verb","objectList","*[;,?[verb,objectList]]"]},propertyListPath:{a:["propertyListNotEmpty"],VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},propertyListPathNotEmpty:{VAR1:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],VAR2:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"^":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],a:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"!":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"(":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],IRI_REF:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_LN:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_NS:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"]},quadData:{"{":["{","disallowVars","quads","allowVars","}"]},quadDataNoBnodes:{"{":["{","disallowBnodes","disallowVars","quads","allowVars","allowBnodes","}"]},quadPattern:{"{":["{","quads","}"]},quadPatternNoBnodes:{"{":["{","disallowBnodes","quads","allowBnodes","}"]},quads:{GRAPH:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],NIL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"(":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"[":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],IRI_REF:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],TRUE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],FALSE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],BLANK_NODE_LABEL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],ANON:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_LN:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_NS:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"}":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"]},quadsNotTriples:{GRAPH:["GRAPH","varOrIRIref","{","?triplesTemplate","}"]},queryAll:{CONSTRUCT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],DESCRIBE:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],ASK:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],SELECT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"]},rdfLiteral:{STRING_LITERAL1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL2:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG2:["string","?or([LANGTAG,[^^,iriRef]])"]},regexExpression:{REGEX:["REGEX","(","expression",",","expression","?[,,expression]",")"]},relationalExpression:{"!":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"+":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"-":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"(":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANGMATCHES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DATATYPE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BOUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BNODE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],RAND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ABS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CEIL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FLOOR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ROUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLEN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ENCODE_FOR_URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONTAINS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRSTARTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRENDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRBEFORE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRAFTER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],YEAR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MONTH:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DAY:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],HOURS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MINUTES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SECONDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TIMEZONE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TZ:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOW:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRUUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MD5:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA256:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA384:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA512:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COALESCE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRDT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMETERM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISIRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISURI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISBLANK:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISLITERAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISNUMERIC:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TRUE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FALSE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COUNT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MIN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MAX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AVG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMPLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],GROUP_CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUBSTR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REPLACE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REGEX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],EXISTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI_REF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_LN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_NS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"]},selectClause:{SELECT:["SELECT","?or([DISTINCT,REDUCED])","or([+or([var,[ (,expression,AS,var,)]]),*])"]},selectQuery:{SELECT:["selectClause","*datasetClause","whereClause","solutionModifier"]},serviceGraphPattern:{SERVICE:["SERVICE","?SILENT","varOrIRIref","groupGraphPattern"]},solutionModifier:{LIMIT:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],OFFSET:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],ORDER:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],HAVING:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],GROUP:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],VALUES:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],$:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],"}":["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"]},sourceSelector:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},sparql11:{$:["prologue","or([queryAll,updateAll])","$"],CONSTRUCT:["prologue","or([queryAll,updateAll])","$"],DESCRIBE:["prologue","or([queryAll,updateAll])","$"],ASK:["prologue","or([queryAll,updateAll])","$"],INSERT:["prologue","or([queryAll,updateAll])","$"],DELETE:["prologue","or([queryAll,updateAll])","$"],SELECT:["prologue","or([queryAll,updateAll])","$"],LOAD:["prologue","or([queryAll,updateAll])","$"],CLEAR:["prologue","or([queryAll,updateAll])","$"],DROP:["prologue","or([queryAll,updateAll])","$"],ADD:["prologue","or([queryAll,updateAll])","$"],MOVE:["prologue","or([queryAll,updateAll])","$"],COPY:["prologue","or([queryAll,updateAll])","$"],CREATE:["prologue","or([queryAll,updateAll])","$"],WITH:["prologue","or([queryAll,updateAll])","$"],PREFIX:["prologue","or([queryAll,updateAll])","$"],BASE:["prologue","or([queryAll,updateAll])","$"]},storeProperty:{VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[],a:[]},strReplaceExpression:{REPLACE:["REPLACE","(","expression",",","expression",",","expression","?[,,expression]",")"]},string:{STRING_LITERAL1:["STRING_LITERAL1"],STRING_LITERAL2:["STRING_LITERAL2"],STRING_LITERAL_LONG1:["STRING_LITERAL_LONG1"],STRING_LITERAL_LONG2:["STRING_LITERAL_LONG2"]},subSelect:{SELECT:["selectClause","whereClause","solutionModifier","valuesClause"]},substringExpression:{SUBSTR:["SUBSTR","(","expression",",","expression","?[,,expression]",")"]},triplesBlock:{VAR1:["triplesSameSubjectPath","?[.,?triplesBlock]"],VAR2:["triplesSameSubjectPath","?[.,?triplesBlock]"],NIL:["triplesSameSubjectPath","?[.,?triplesBlock]"],"(":["triplesSameSubjectPath","?[.,?triplesBlock]"],"[":["triplesSameSubjectPath","?[.,?triplesBlock]"],IRI_REF:["triplesSameSubjectPath","?[.,?triplesBlock]"],TRUE:["triplesSameSubjectPath","?[.,?triplesBlock]"],FALSE:["triplesSameSubjectPath","?[.,?triplesBlock]"],BLANK_NODE_LABEL:["triplesSameSubjectPath","?[.,?triplesBlock]"],ANON:["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_LN:["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_NS:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL2:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG2:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"]},triplesNode:{"(":["collection"],"[":["blankNodePropertyList"]},triplesNodePath:{"(":["collectionPath"],"[":["blankNodePropertyListPath"]},triplesSameSubject:{VAR1:["varOrTerm","propertyListNotEmpty"],VAR2:["varOrTerm","propertyListNotEmpty"],NIL:["varOrTerm","propertyListNotEmpty"],IRI_REF:["varOrTerm","propertyListNotEmpty"],TRUE:["varOrTerm","propertyListNotEmpty"],FALSE:["varOrTerm","propertyListNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListNotEmpty"],ANON:["varOrTerm","propertyListNotEmpty"],PNAME_LN:["varOrTerm","propertyListNotEmpty"],PNAME_NS:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListNotEmpty"],INTEGER:["varOrTerm","propertyListNotEmpty"],DECIMAL:["varOrTerm","propertyListNotEmpty"],DOUBLE:["varOrTerm","propertyListNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListNotEmpty"],"(":["triplesNode","propertyList"],"[":["triplesNode","propertyList"]},triplesSameSubjectPath:{VAR1:["varOrTerm","propertyListPathNotEmpty"],VAR2:["varOrTerm","propertyListPathNotEmpty"],NIL:["varOrTerm","propertyListPathNotEmpty"],IRI_REF:["varOrTerm","propertyListPathNotEmpty"],TRUE:["varOrTerm","propertyListPathNotEmpty"],FALSE:["varOrTerm","propertyListPathNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListPathNotEmpty"],ANON:["varOrTerm","propertyListPathNotEmpty"],PNAME_LN:["varOrTerm","propertyListPathNotEmpty"],PNAME_NS:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListPathNotEmpty"],INTEGER:["varOrTerm","propertyListPathNotEmpty"],DECIMAL:["varOrTerm","propertyListPathNotEmpty"],DOUBLE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],"(":["triplesNodePath","propertyListPath"],"[":["triplesNodePath","propertyListPath"]},triplesTemplate:{VAR1:["triplesSameSubject","?[.,?triplesTemplate]"],VAR2:["triplesSameSubject","?[.,?triplesTemplate]"],NIL:["triplesSameSubject","?[.,?triplesTemplate]"],"(":["triplesSameSubject","?[.,?triplesTemplate]"],"[":["triplesSameSubject","?[.,?triplesTemplate]"],IRI_REF:["triplesSameSubject","?[.,?triplesTemplate]"],TRUE:["triplesSameSubject","?[.,?triplesTemplate]"],FALSE:["triplesSameSubject","?[.,?triplesTemplate]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?triplesTemplate]"],ANON:["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_LN:["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_NS:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL2:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"]},unaryExpression:{"!":["!","primaryExpression"],"+":["+","primaryExpression"],"-":["-","primaryExpression"],VAR1:["primaryExpression"],VAR2:["primaryExpression"],"(":["primaryExpression"],STR:["primaryExpression"],LANG:["primaryExpression"],LANGMATCHES:["primaryExpression"],DATATYPE:["primaryExpression"],BOUND:["primaryExpression"],IRI:["primaryExpression"],URI:["primaryExpression"],BNODE:["primaryExpression"],RAND:["primaryExpression"],ABS:["primaryExpression"],CEIL:["primaryExpression"],FLOOR:["primaryExpression"],ROUND:["primaryExpression"],CONCAT:["primaryExpression"],STRLEN:["primaryExpression"],UCASE:["primaryExpression"],LCASE:["primaryExpression"],ENCODE_FOR_URI:["primaryExpression"],CONTAINS:["primaryExpression"],STRSTARTS:["primaryExpression"],STRENDS:["primaryExpression"],STRBEFORE:["primaryExpression"],STRAFTER:["primaryExpression"],YEAR:["primaryExpression"],MONTH:["primaryExpression"],DAY:["primaryExpression"],HOURS:["primaryExpression"],MINUTES:["primaryExpression"],SECONDS:["primaryExpression"],TIMEZONE:["primaryExpression"],TZ:["primaryExpression"],NOW:["primaryExpression"],UUID:["primaryExpression"],STRUUID:["primaryExpression"],MD5:["primaryExpression"],SHA1:["primaryExpression"],SHA256:["primaryExpression"],SHA384:["primaryExpression"],SHA512:["primaryExpression"],COALESCE:["primaryExpression"],IF:["primaryExpression"],STRLANG:["primaryExpression"],STRDT:["primaryExpression"],SAMETERM:["primaryExpression"],ISIRI:["primaryExpression"],ISURI:["primaryExpression"],ISBLANK:["primaryExpression"],ISLITERAL:["primaryExpression"],ISNUMERIC:["primaryExpression"],TRUE:["primaryExpression"],FALSE:["primaryExpression"],COUNT:["primaryExpression"],SUM:["primaryExpression"],MIN:["primaryExpression"],MAX:["primaryExpression"],AVG:["primaryExpression"],SAMPLE:["primaryExpression"],GROUP_CONCAT:["primaryExpression"],SUBSTR:["primaryExpression"],REPLACE:["primaryExpression"],REGEX:["primaryExpression"],EXISTS:["primaryExpression"],NOT:["primaryExpression"],IRI_REF:["primaryExpression"],STRING_LITERAL1:["primaryExpression"],STRING_LITERAL2:["primaryExpression"],STRING_LITERAL_LONG1:["primaryExpression"],STRING_LITERAL_LONG2:["primaryExpression"],INTEGER:["primaryExpression"],DECIMAL:["primaryExpression"],DOUBLE:["primaryExpression"],INTEGER_POSITIVE:["primaryExpression"],DECIMAL_POSITIVE:["primaryExpression"],DOUBLE_POSITIVE:["primaryExpression"],INTEGER_NEGATIVE:["primaryExpression"],DECIMAL_NEGATIVE:["primaryExpression"],DOUBLE_NEGATIVE:["primaryExpression"],PNAME_LN:["primaryExpression"],PNAME_NS:["primaryExpression"]},update:{INSERT:["prologue","?[update1,?[;,update]]"],DELETE:["prologue","?[update1,?[;,update]]"],LOAD:["prologue","?[update1,?[;,update]]"],CLEAR:["prologue","?[update1,?[;,update]]"],DROP:["prologue","?[update1,?[;,update]]"],ADD:["prologue","?[update1,?[;,update]]"],MOVE:["prologue","?[update1,?[;,update]]"],COPY:["prologue","?[update1,?[;,update]]"],CREATE:["prologue","?[update1,?[;,update]]"],WITH:["prologue","?[update1,?[;,update]]"],PREFIX:["prologue","?[update1,?[;,update]]"],BASE:["prologue","?[update1,?[;,update]]"],$:["prologue","?[update1,?[;,update]]"]},update1:{LOAD:["load"],CLEAR:["clear"],DROP:["drop"],ADD:["add"],MOVE:["move"],COPY:["copy"],CREATE:["create"],INSERT:["INSERT","insert1"],DELETE:["DELETE","delete1"],WITH:["modify"]},updateAll:{INSERT:["?[update1,?[;,update]]"],DELETE:["?[update1,?[;,update]]"],LOAD:["?[update1,?[;,update]]"],CLEAR:["?[update1,?[;,update]]"],DROP:["?[update1,?[;,update]]"],ADD:["?[update1,?[;,update]]"],MOVE:["?[update1,?[;,update]]"],COPY:["?[update1,?[;,update]]"],CREATE:["?[update1,?[;,update]]"],WITH:["?[update1,?[;,update]]"],$:["?[update1,?[;,update]]"]},usingClause:{USING:["USING","or([iriRef,[NAMED,iriRef]])"]},valueLogical:{"!":["relationalExpression"],"+":["relationalExpression"],"-":["relationalExpression"],VAR1:["relationalExpression"],VAR2:["relationalExpression"],"(":["relationalExpression"],STR:["relationalExpression"],LANG:["relationalExpression"],LANGMATCHES:["relationalExpression"],DATATYPE:["relationalExpression"],BOUND:["relationalExpression"],IRI:["relationalExpression"],URI:["relationalExpression"],BNODE:["relationalExpression"],RAND:["relationalExpression"],ABS:["relationalExpression"],CEIL:["relationalExpression"],FLOOR:["relationalExpression"],ROUND:["relationalExpression"],CONCAT:["relationalExpression"],STRLEN:["relationalExpression"],UCASE:["relationalExpression"],LCASE:["relationalExpression"],ENCODE_FOR_URI:["relationalExpression"],CONTAINS:["relationalExpression"],STRSTARTS:["relationalExpression"],STRENDS:["relationalExpression"],STRBEFORE:["relationalExpression"],STRAFTER:["relationalExpression"],YEAR:["relationalExpression"],MONTH:["relationalExpression"],DAY:["relationalExpression"],HOURS:["relationalExpression"],MINUTES:["relationalExpression"],SECONDS:["relationalExpression"],TIMEZONE:["relationalExpression"],TZ:["relationalExpression"],NOW:["relationalExpression"],UUID:["relationalExpression"],STRUUID:["relationalExpression"],MD5:["relationalExpression"],SHA1:["relationalExpression"],SHA256:["relationalExpression"],SHA384:["relationalExpression"],SHA512:["relationalExpression"],COALESCE:["relationalExpression"],IF:["relationalExpression"],STRLANG:["relationalExpression"],STRDT:["relationalExpression"],SAMETERM:["relationalExpression"],ISIRI:["relationalExpression"],ISURI:["relationalExpression"],ISBLANK:["relationalExpression"],ISLITERAL:["relationalExpression"],ISNUMERIC:["relationalExpression"],TRUE:["relationalExpression"],FALSE:["relationalExpression"],COUNT:["relationalExpression"],SUM:["relationalExpression"],MIN:["relationalExpression"],MAX:["relationalExpression"],AVG:["relationalExpression"],SAMPLE:["relationalExpression"],GROUP_CONCAT:["relationalExpression"],SUBSTR:["relationalExpression"],REPLACE:["relationalExpression"],REGEX:["relationalExpression"],EXISTS:["relationalExpression"],NOT:["relationalExpression"],IRI_REF:["relationalExpression"],STRING_LITERAL1:["relationalExpression"],STRING_LITERAL2:["relationalExpression"],STRING_LITERAL_LONG1:["relationalExpression"],STRING_LITERAL_LONG2:["relationalExpression"],INTEGER:["relationalExpression"],DECIMAL:["relationalExpression"],DOUBLE:["relationalExpression"],INTEGER_POSITIVE:["relationalExpression"],DECIMAL_POSITIVE:["relationalExpression"],DOUBLE_POSITIVE:["relationalExpression"],INTEGER_NEGATIVE:["relationalExpression"],DECIMAL_NEGATIVE:["relationalExpression"],DOUBLE_NEGATIVE:["relationalExpression"],PNAME_LN:["relationalExpression"],PNAME_NS:["relationalExpression"]},valuesClause:{VALUES:["VALUES","dataBlock"],$:[],"}":[]},"var":{VAR1:["VAR1"],VAR2:["VAR2"]},varOrIRIref:{VAR1:["var"],VAR2:["var"],IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},varOrTerm:{VAR1:["var"],VAR2:["var"],NIL:["graphTerm"],IRI_REF:["graphTerm"],TRUE:["graphTerm"],FALSE:["graphTerm"],BLANK_NODE_LABEL:["graphTerm"],ANON:["graphTerm"],PNAME_LN:["graphTerm"],PNAME_NS:["graphTerm"],STRING_LITERAL1:["graphTerm"],STRING_LITERAL2:["graphTerm"],STRING_LITERAL_LONG1:["graphTerm"],STRING_LITERAL_LONG2:["graphTerm"],INTEGER:["graphTerm"],DECIMAL:["graphTerm"],DOUBLE:["graphTerm"],INTEGER_POSITIVE:["graphTerm"],DECIMAL_POSITIVE:["graphTerm"],DOUBLE_POSITIVE:["graphTerm"],INTEGER_NEGATIVE:["graphTerm"],DECIMAL_NEGATIVE:["graphTerm"],DOUBLE_NEGATIVE:["graphTerm"]},verb:{VAR1:["storeProperty","varOrIRIref"],VAR2:["storeProperty","varOrIRIref"],IRI_REF:["storeProperty","varOrIRIref"],PNAME_LN:["storeProperty","varOrIRIref"],PNAME_NS:["storeProperty","varOrIRIref"],a:["storeProperty","a"]},verbPath:{"^":["path"],a:["path"],"!":["path"],"(":["path"],IRI_REF:["path"],PNAME_LN:["path"],PNAME_NS:["path"]},verbSimple:{VAR1:["var"],VAR2:["var"]},whereClause:{"{":["?WHERE","groupGraphPattern"],WHERE:["?WHERE","groupGraphPattern"]}}),s=/^(GROUP_CONCAT|DATATYPE|BASE|PREFIX|SELECT|CONSTRUCT|DESCRIBE|ASK|FROM|NAMED|ORDER|BY|LIMIT|ASC|DESC|OFFSET|DISTINCT|REDUCED|WHERE|GRAPH|OPTIONAL|UNION|FILTER|GROUP|HAVING|AS|VALUES|LOAD|CLEAR|DROP|CREATE|MOVE|COPY|SILENT|INSERT|DELETE|DATA|WITH|TO|USING|NAMED|MINUS|BIND|LANGMATCHES|LANG|BOUND|SAMETERM|ISIRI|ISURI|ISBLANK|ISLITERAL|REGEX|TRUE|FALSE|UNDEF|ADD|DEFAULT|ALL|SERVICE|INTO|IN|NOT|IRI|URI|BNODE|RAND|ABS|CEIL|FLOOR|ROUND|CONCAT|STRLEN|UCASE|LCASE|ENCODE_FOR_URI|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|NOW|UUID|STRUUID|MD5|SHA1|SHA256|SHA384|SHA512|COALESCE|IF|STRLANG|STRDT|ISNUMERIC|SUBSTR|REPLACE|EXISTS|COUNT|SUM|MIN|MAX|AVG|SAMPLE|SEPARATOR|STR)/i,a=/^(\*|a|\.|\{|\}|,|\(|\)|;|\[|\]|\|\||&&|=|!=|!|<=|>=|<|>|\+|-|\/|\^\^|\?|\||\^)/,l=null,u="sparql11",c="sparql11",p=!0,d=t(),f=d.terminal,h={"*[,, object]":3,"*[(,),object]":3,"*[(,),objectPath]":3,"*[/,pathEltOrInverse]":2,object:2,objectPath:2,objectList:2,objectListPath:2,storeProperty:2,pathMod:2,"?pathMod":2,propertyListNotEmpty:1,propertyList:1,propertyListPath:1,propertyListPathNotEmpty:1,"?[verb,objectList]":1,"?[or([verbPath, verbSimple]),objectList]":1},g={"}":1,"]":0,")":1,"{":-1,"(":-1,"*[;,?[or([verbPath,verbSimple]),objectList]]":1}; return{token:r,startState:function(){return{tokenize:r,OK:!0,complete:p,errorStartPos:null,errorEndPos:null,queryType:l,possibleCurrent:n(c),possibleNext:n(c),allowVars:!0,allowBnodes:!0,storeProperty:!1,lastProperty:"",stack:[c]}},indent:i,electricChars:"}])"}});e.defineMIME("application/x-sparql-query","sparql11")})},{codemirror:25}],15:[function(e,t){var n=t.exports=function(){this.words=0;this.prefixes=0;this.children=[]};n.prototype={insert:function(e,t){if(0!=e.length){var r,i,o=this;void 0===t&&(t=0);if(t!==e.length){o.prefixes++;r=e[t];void 0===o.children[r]&&(o.children[r]=new n);i=o.children[r];i.insert(e,t+1)}else o.words++}},remove:function(e,t){if(0!=e.length){var n,r,i=this;void 0===t&&(t=0);if(void 0!==i)if(t!==e.length){i.prefixes--;n=e[t];r=i.children[n];r.remove(e,t+1)}else i.words--}},update:function(e,t){if(0!=e.length&&0!=t.length){this.remove(e);this.insert(t)}},countWord:function(e,t){if(0==e.length)return 0;var n,r,i=this,o=0;void 0===t&&(t=0);if(t===e.length)return i.words;n=e[t];r=i.children[n];void 0!==r&&(o=r.countWord(e,t+1));return o},countPrefix:function(e,t){if(0==e.length)return 0;var n,r,i=this,o=0;void 0===t&&(t=0);if(t===e.length)return i.prefixes;var n=e[t];r=i.children[n];void 0!==r&&(o=r.countPrefix(e,t+1));return o},find:function(e){return 0==e.length?!1:this.countWord(e)>0?!0:!1},getAllWords:function(e){var t,n,r=this,i=[];void 0===e&&(e="");if(void 0===r)return[];r.words>0&&i.push(e);for(t in r.children){n=r.children[t];i=i.concat(n.getAllWords(e+t))}return i},autoComplete:function(e,t){var n,r,i=this;if(0==e.length)return void 0===t?i.getAllWords(e):[];void 0===t&&(t=0);n=e[t];r=i.children[n];return void 0===r?[]:t===e.length-1?r.getAllWords(e):r.autoComplete(e,t+1)}}},{}],16:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height};t.style.width="";t.style.height="auto";t.className+=" CodeMirror-fullscreen";document.documentElement.style.overflow="hidden";e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,"");document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width;t.style.height=n.height;window.scrollTo(n.scrollLeft,n.scrollTop);e.refresh()}e.defineOption("fullScreen",!1,function(r,i,o){o==e.Init&&(o=!1);!o!=!i&&(i?t(r):n(r))})})},{"../../lib/codemirror":25}],17:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){function t(e,t,r,i){var o=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&a[o.text.charAt(l)]||a[o.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(r&&c>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(s(t.line,l+1)),d=n(e,s(t.line,l+(c>0?1:0)),c,p||null,i);return null==d?null:{from:s(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:c>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,u=[],c=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,p=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=p;d+=n){var f=e.getLine(d);if(f){var h=n>0?0:f.length-1,g=n>0?f.length:-1;if(!(f.length>o)){d==t.line&&(h=t.ch-(0>n?1:0));for(;h!=g;h+=n){var m=f.charAt(h);if(c.test(m)&&(void 0===r||e.getTokenTypeAt(s(d,h+1))==r)){var v=a[m];if(">"==v.charAt(1)==n>0)u.push(m);else{if(!u.length)return{pos:s(d,h),ch:m};u.pop()}}}}}}return d-n==(n>0?e.lastLine():e.firstLine())?!1:null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],l=e.listSelections(),u=0;u<l.length;u++){var c=l[u].empty()&&t(e,l[u].head,!1,r);if(c&&e.getLine(c.from.line).length<=i){var p=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(c.from,s(c.from.line,c.from.ch+1),{className:p}));c.to&&e.getLine(c.to.line).length<=i&&a.push(e.markText(c.to,s(c.to.line,c.to.ch+1),{className:p}))}}if(a.length){o&&e.state.focused&&e.display.input.focus();var d=function(){e.operation(function(){for(var e=0;e<a.length;e++)a[e].clear()})};if(!n)return d;setTimeout(d,800)}}function i(e){e.operation(function(){if(l){l();l=null}l=r(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),s=e.Pos,a={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",i);if(n){t.state.matchBrackets="object"==typeof n?n:{};t.on("cursorActivity",i)}});e.defineExtension("matchBrackets",function(){r(this,!0)});e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)});e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},{"../../lib/codemirror":25}],18:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function r(r){for(var i=n.ch,l=0;;){var u=0>=i?-1:a.lastIndexOf(r,i-1);if(-1!=u){if(1==l&&u<n.ch)break;o=t.getTokenTypeAt(e.Pos(s,u+1));if(!/^(comment|string)/.test(o))return u+1;i=u-1}else{if(1==l)break;l=1;i=a.length}}}var i,o,s=n.line,a=t.getLine(s),l="{",u="}",i=r("{");if(null==i){l="[",u="]";i=r("[")}if(null!=i){var c,p,d=1,f=t.lastLine();e:for(var h=s;f>=h;++h)for(var g=t.getLine(h),m=h==s?i:0;;){var v=g.indexOf(l,m),E=g.indexOf(u,m);0>v&&(v=g.length);0>E&&(E=g.length);m=Math.min(v,E);if(m==g.length)break;if(t.getTokenTypeAt(e.Pos(h,m+1))==o)if(m==v)++d;else if(!--d){c=h;p=m;break e}++m}if(null!=c&&(s!=c||p!=i))return{from:e.Pos(s,i),to:e.Pos(c,p)}}});e.registerHelper("fold","import",function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1)));if("keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);o>=i;++i){var s=t.getLine(i),a=s.indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(i,a)}}}var i,n=n.line,o=r(n);if(!o||r(n-1)||(i=r(n-2))&&i.end.line==n-1)return null;for(var s=o.end;;){var a=r(s.line+1);if(null==a)break;s=a.end}return{from:t.clipPos(e.Pos(n,o.startCh+1)),to:s}});e.registerHelper("fold","include",function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1)));return"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var n=n.line,i=r(n);if(null==i||null!=r(n-1))return null;for(var o=n;;){var s=r(o+1);if(null==s)break;++o}return{from:e.Pos(n,i+1),to:t.clipPos(e.Pos(o))}})})},{"../../lib/codemirror":25}],19:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(t,i,o,s){function a(e){var n=l(t,i);if(!n||n.to.line-n.from.line<u)return null;for(var r=t.findMarksAt(n.from),o=0;o<r.length;++o)if(r[o].__isFold&&"fold"!==s){if(!e)return null;n.cleared=!0;r[o].clear()}return n}if(o&&o.call){var l=o;o=null}else var l=r(t,o,"rangeFinder");"number"==typeof i&&(i=e.Pos(i,0));var u=r(t,o,"minFoldSize"),c=a(!0);if(r(t,o,"scanUp"))for(;!c&&i.line>t.firstLine();){i=e.Pos(i.line-1,0);c=a(!1)}if(c&&!c.cleared&&"unfold"!==s){var p=n(t,o);e.on(p,"mousedown",function(t){d.clear();e.e_preventDefault(t)});var d=t.markText(c.from,c.to,{replacedWith:p,clearOnEnter:!0,__isFold:!0});d.on("clear",function(n,r){e.signal(t,"unfold",t,n,r)});e.signal(t,"fold",t,c.from,c.to)}}function n(e,t){var n=r(e,t,"widget");if("string"==typeof n){var i=document.createTextNode(n);n=document.createElement("span");n.appendChild(i);n.className="CodeMirror-foldmarker"}return n}function r(e,t,n){if(t&&void 0!==t[n])return t[n];var r=e.options.foldOptions;return r&&void 0!==r[n]?r[n]:i[n]}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}};e.defineExtension("foldCode",function(e,n,r){t(this,e,n,r)});e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0});e.commands.toggleFold=function(e){e.foldCode(e.getCursor())};e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")};e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")};e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),null,"fold")})};e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),null,"unfold")})};e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}});e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}});var i={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1};e.defineOption("foldOptions",null);e.defineExtension("foldOption",function(e,t){return r(this,e,t)})})},{"../../lib/codemirror":25}],20:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror"),t("./foldcode")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","./foldcode"],i):i(CodeMirror)})(function(e){"use strict";function t(e){this.options=e;this.from=this.to=0}function n(e){e===!0&&(e={});null==e.gutter&&(e.gutter="CodeMirror-foldgutter");null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open");null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded");return e}function r(e,t){for(var n=e.findMarksAt(p(t)),r=0;r<n.length;++r)if(n[r].__isFold&&n[r].find().from.line==t)return!0}function i(e){if("string"==typeof e){var t=document.createElement("div");t.className=e+" CodeMirror-guttermarker-subtle";return t}return e.cloneNode(!0)}function o(e,t,n){var o=e.state.foldGutter.options,s=t,a=e.foldOption(o,"minFoldSize"),l=e.foldOption(o,"rangeFinder");e.eachLine(t,n,function(t){var n=null;if(r(e,s))n=i(o.indicatorFolded);else{var u=p(s,0),c=l&&l(e,u);c&&c.to.line-c.from.line>=a&&(n=i(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n);++s})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;if(n){e.operation(function(){o(e,t.from,t.to)});n.from=t.from;n.to=t.to}}function a(e,t,n){var r=e.state.foldGutter.options;n==r.gutter&&e.foldCode(p(t,0),r.rangeFinder)}function l(e){var t=e.state.foldGutter,n=e.state.foldGutter.options;t.from=t.to=0;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}function u(e){var t=e.state.foldGutter,n=e.state.foldGutter.options;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation(function(){if(n.from<t.from){o(e,n.from,t.from);t.from=n.from}if(n.to>t.to){o(e,t.to,n.to);t.to=n.to}})},n.updateViewportTimeSpan||400)}function c(e,t){var n=e.state.foldGutter,r=t.line;r>=n.from&&r<n.to&&o(e,r,r+1)}e.defineOption("foldGutter",!1,function(r,i,o){if(o&&o!=e.Init){r.clearGutter(r.state.foldGutter.options.gutter);r.state.foldGutter=null;r.off("gutterClick",a);r.off("change",l);r.off("viewportChange",u);r.off("fold",c);r.off("unfold",c);r.off("swapDoc",s)}if(i){r.state.foldGutter=new t(n(i));s(r);r.on("gutterClick",a);r.on("change",l);r.on("viewportChange",u);r.on("fold",c);r.on("unfold",c);r.on("swapDoc",s)}});var p=e.Pos})},{"../../lib/codemirror":25,"./foldcode":19}],21:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,r){this.line=t;this.ch=n;this.cm=e;this.text=e.getLine(t);this.min=r?r.from:e.firstLine();this.max=r?r.to-1:e.lastLine()}function r(e,t){var n=e.cm.getTokenTypeAt(d(e.line,t));return n&&/\btag\b/.test(n)}function i(e){if(!(e.line>=e.max)){e.ch=0;e.text=e.cm.getLine(++e.line);return!0}}function o(e){if(!(e.line<=e.min)){e.text=e.cm.getLine(--e.line);e.ch=e.text.length;return!0}}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(i(e))continue;return}if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));e.ch=t+1;return o?"selfClose":"regular"}e.ch=t+1}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(r(e,t+1)){g.lastIndex=t;e.ch=t;var n=g.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(i(e))continue;return}if(r(e,t.index+1)){e.ch=t.index+t[0].length;return t}e.ch=t.index+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));e.ch=t+1;return i?"selfClose":"regular"}e.ch=t}}function c(e,t){for(var n=[];;){var r,i=l(e),o=e.line,a=e.ch-(i?i[0].length:0);if(!i||!(r=s(e)))return;if("selfClose"!=r)if(i[1]){for(var u=n.length-1;u>=0;--u)if(n[u]==i[2]){n.length=u;break}if(0>u&&(!t||t==i[2]))return{tag:i[2],from:d(o,a),to:d(e.line,e.ch)}}else n.push(i[2])}}function p(e,t){for(var n=[];;){var r=u(e);if(!r)return;if("selfClose"!=r){var i=e.line,o=e.ch,s=a(e);if(!s)return;if(s[1])n.push(s[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==s[2]){n.length=l;break}if(0>l&&(!t||t==s[2]))return{tag:s[2],from:d(e.line,e.ch),to:d(i,o)}}}else a(e)}}var d=e.Pos,f="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",h=f+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+f+"]["+h+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var r=new n(e,t.line,0);;){var i,o=l(r);if(!o||r.line!=t.line||!(i=s(r)))return;if(!o[1]&&"selfClose"!=i){var t=d(r.line,r.ch),a=c(r,o[2]);return a&&{from:t,to:a.from}}}});e.findMatchingTag=function(e,r,i){var o=new n(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var l=s(o),u=l&&d(o.line,o.ch),f=l&&a(o);if(l&&f&&!(t(o,r)>0)){var h={from:d(o.line,o.ch),to:u,tag:f[2]};if("selfClose"==l)return{open:h,close:null,at:"open"};if(f[1])return{open:p(o,f[2]),close:h,at:"close"};o=new n(e,u.line,u.ch,i);return{open:h,close:c(o,f[2]),at:"open"}}}};e.findEnclosingTag=function(e,t,r){for(var i=new n(e,t.line,t.ch,r);;){var o=p(i);if(!o)break;var s=new n(e,t.line,t.ch,r),a=c(s,o.tag);if(a)return{open:o,close:a}}};e.scanForClosingTag=function(e,t,r,i){var o=new n(e,t.line,t.ch,i?{from:0,to:i}:null);return c(o,r)}})},{"../../lib/codemirror":25}],22:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e,t){this.cm=e;this.options=this.buildOptions(t);this.widget=this.onClose=null}function n(e){return"string"==typeof e?e:e.text}function r(e,t){function n(e,n){var i;i="string"!=typeof n?function(e){return n(e,t)}:r.hasOwnProperty(n)?r[n]:n;o[e]=i}var r={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},i=e.options.customKeys,o=i?{}:r;if(i)for(var s in i)i.hasOwnProperty(s)&&n(s,i[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&n(s,a[s]);return o}function i(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function o(t,o){this.completion=t;this.data=o;var l=this,u=t.cm,c=this.hints=document.createElement("ul");c.className="CodeMirror-hints";this.selectedHint=o.selectedHint||0;for(var p=o.list,d=0;d<p.length;++d){var f=c.appendChild(document.createElement("li")),h=p[d],g=s+(d!=this.selectedHint?"":" "+a);null!=h.className&&(g=h.className+" "+g);f.className=g;h.render?h.render(f,o,h):f.appendChild(document.createTextNode(h.displayText||n(h)));f.hintId=d}var m=u.cursorCoords(t.options.alignWithWord?o.from:null),v=m.left,E=m.bottom,y=!0;c.style.left=v+"px";c.style.top=E+"px";var x=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),b=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(t.options.container||document.body).appendChild(c);var T=c.getBoundingClientRect(),S=T.bottom-b;if(S>0){var N=T.bottom-T.top,C=m.top-(m.bottom-T.top);if(C-N>0){c.style.top=(E=m.top-N)+"px";y=!1}else if(N>b){c.style.height=b-5+"px";c.style.top=(E=m.bottom-T.top)+"px";var L=u.getCursor();if(o.from.ch!=L.ch){m=u.cursorCoords(L);c.style.left=(v=m.left)+"px";T=c.getBoundingClientRect()}}}var A=T.right-x;if(A>0){if(T.right-T.left>x){c.style.width=x-5+"px";A-=T.right-T.left-x}c.style.left=(v=m.left-A)+"px"}u.addKeyMap(this.keyMap=r(t,{moveFocus:function(e,t){l.changeActive(l.selectedHint+e,t)},setFocus:function(e){l.changeActive(e)},menuSize:function(){return l.screenAmount()},length:p.length,close:function(){t.close()},pick:function(){l.pick()},data:o}));if(t.options.closeOnUnfocus){var I;u.on("blur",this.onBlur=function(){I=setTimeout(function(){t.close()},100)});u.on("focus",this.onFocus=function(){clearTimeout(I)})}var w=u.getScrollInfo();u.on("scroll",this.onScroll=function(){var e=u.getScrollInfo(),n=u.getWrapperElement().getBoundingClientRect(),r=E+w.top-e.top,i=r-(window.pageYOffset||(document.documentElement||document.body).scrollTop);y||(i+=c.offsetHeight);if(i<=n.top||i>=n.bottom)return t.close();c.style.top=r+"px";c.style.left=v+w.left-e.left+"px"});e.on(c,"dblclick",function(e){var t=i(c,e.target||e.srcElement);if(t&&null!=t.hintId){l.changeActive(t.hintId);l.pick()}});e.on(c,"click",function(e){var n=i(c,e.target||e.srcElement);if(n&&null!=n.hintId){l.changeActive(n.hintId);t.options.completeOnSingleClick&&l.pick()}});e.on(c,"mousedown",function(){setTimeout(function(){u.focus()},20)});e.signal(o,"select",p[0],c.firstChild);return!0}var s="CodeMirror-hint",a="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)};e.defineExtension("showHint",function(n){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var r=this.state.completionActive=new t(this,n),i=r.options.hint;if(i){e.signal(this,"startCompletion",this);if(!i.async)return r.showHints(i(this,r.options));i(this,function(e){r.showHints(e)},r.options);return void 0}}});t.prototype={close:function(){if(this.active()){this.cm.state.completionActive=null;this.widget&&this.widget.close();this.onClose&&this.onClose();e.signal(this.cm,"endCompletion",this.cm)}},active:function(){return this.cm.state.completionActive==this},pick:function(t,r){var i=t.list[r];i.hint?i.hint(this.cm,t,i):this.cm.replaceRange(n(i),i.from||t.from,i.to||t.to,"complete");e.signal(t,"pick",i);this.close()},showHints:function(e){if(!e||!e.list.length||!this.active())return this.close();this.options.completeSingle&&1==e.list.length?this.pick(e,0):this.showWidget(e);return void 0},showWidget:function(t){function n(){if(!l){l=!0;c.close();c.cm.off("cursorActivity",a);t&&e.signal(t,"close")}}function r(){if(!l){e.signal(t,"update");var n=c.options.hint;n.async?n(c.cm,i,c.options):i(n(c.cm,c.options))}}function i(e){t=e;if(!l){if(!t||!t.list.length)return n();c.widget&&c.widget.close();c.widget=new o(c,t)}}function s(){if(u){g(u);u=0}}function a(){s();var e=c.cm.getCursor(),t=c.cm.getLine(e.line);if(e.line!=d.line||t.length-e.ch!=f-d.ch||e.ch<d.ch||c.cm.somethingSelected()||e.ch&&p.test(t.charAt(e.ch-1)))c.close();else{u=h(r);c.widget&&c.widget.close()}}this.widget=new o(this,t);e.signal(t,"shown");var l,u=0,c=this,p=this.options.closeCharacters,d=this.cm.getCursor(),f=this.cm.getLine(d.line).length,h=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},g=window.cancelAnimationFrame||clearTimeout;this.cm.on("cursorActivity",a);this.onClose=n},buildOptions:function(e){var t=this.cm.options.hintOptions,n={};for(var r in l)n[r]=l[r];if(t)for(var r in t)void 0!==t[r]&&(n[r]=t[r]);if(e)for(var r in e)void 0!==e[r]&&(n[r]=e[r]);return n}};o.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null;this.hints.parentNode.removeChild(this.hints);this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm;if(this.completion.options.closeOnUnfocus){e.off("blur",this.onBlur);e.off("focus",this.onFocus)}e.off("scroll",this.onScroll)}},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){t>=this.data.list.length?t=n?this.data.list.length-1:0:0>t&&(t=n?0:this.data.list.length-1);if(this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r.className=r.className.replace(" "+a,"");r=this.hints.childNodes[this.selectedHint=t];r.className+=" "+a;r.offsetTop<this.hints.scrollTop?this.hints.scrollTop=r.offsetTop-3:r.offsetTop+r.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+3);e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}};e.registerHelper("hint","auto",function(t,n){var r,i=t.getHelpers(t.getCursor(),"hint");if(i.length)for(var o=0;o<i.length;o++){var s=i[o](t,n);if(s&&s.list.length)return s}else if(r=t.getHelper(t.getCursor(),"hintWords")){if(r)return e.hint.fromList(t,{words:r})}else if(e.hint.anyword)return e.hint.anyword(t,n)});e.registerHelper("hint","fromList",function(t,n){for(var r=t.getCursor(),i=t.getTokenAt(r),o=[],s=0;s<n.words.length;s++){var a=n.words[s];a.slice(0,i.string.length)==i.string&&o.push(a)}return o.length?{list:o,from:e.Pos(r.line,i.start),to:e.Pos(r.line,i.end)}:void 0});e.commands.autocomplete=e.showHint;var l={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!1,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)})},{"../../lib/codemirror":25}],23:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.runMode=function(t,n,r,i){var o=e.getMode(e.defaults,n),s=/MSIE \d/.test(navigator.userAgent),a=s&&(null==document.documentMode||document.documentMode<9);if(1==r.nodeType){var l=i&&i.tabSize||e.defaults.tabSize,u=r,c=0;u.innerHTML="";r=function(e,t){if("\n"!=e){for(var n="",r=0;;){var i=e.indexOf(" ",r);if(-1==i){n+=e.slice(r);c+=e.length-r;break}c+=i-r;n+=e.slice(r,i);var o=l-c%l;c+=o;for(var s=0;o>s;++s)n+=" ";r=i+1}if(t){var p=u.appendChild(document.createElement("span"));p.className="cm-"+t.replace(/ +/g," cm-");p.appendChild(document.createTextNode(n))}else u.appendChild(document.createTextNode(n))}else{u.appendChild(document.createTextNode(a?"\r":e));c=0}}}for(var p=e.splitLines(t),d=i&&i.state||e.startState(o),f=0,h=p.length;h>f;++f){f&&r("\n");var g=new e.StringStream(p[f]);!g.string&&o.blankLine&&o.blankLine(d);for(;!g.eol();){var m=o.token(g,d);r(g.current(),m,f,g.start,d);g.start=g.pos}}}})},{"../../lib/codemirror":25}],24:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e,t,i,o){this.atOccurrence=!1;this.doc=e;null==o&&"string"==typeof t&&(o=!1);i=i?e.clipPos(i):r(0,0);this.pos={from:i,to:i};if("string"!=typeof t){t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g"));this.matches=function(n,i){if(n){t.lastIndex=0;for(var o,s,a=e.getLine(i.line).slice(0,i.ch),l=0;;){t.lastIndex=l;var u=t.exec(a);if(!u)break;o=u;s=o.index;l=o.index+(o[0].length||1);if(l==a.length)break}var c=o&&o[0].length||0;c||(0==s&&0==a.length?o=void 0:s!=e.getLine(i.line).length&&c++)}else{t.lastIndex=i.ch;var a=e.getLine(i.line),o=t.exec(a),c=o&&o[0].length||0,s=o&&o.index;s+c==a.length||c||(c=1)}return o&&c?{from:r(i.line,s),to:r(i.line,s+c),match:o}:void 0}}else{var s=t;o&&(t=t.toLowerCase());var a=o?function(e){return e.toLowerCase()}:function(e){return e},l=t.split("\n");if(1==l.length)this.matches=t.length?function(i,o){if(i){var l=e.getLine(o.line).slice(0,o.ch),u=a(l),c=u.lastIndexOf(t);if(c>-1){c=n(l,u,c);return{from:r(o.line,c),to:r(o.line,c+s.length)}}}else{var l=e.getLine(o.line).slice(o.ch),u=a(l),c=u.indexOf(t);if(c>-1){c=n(l,u,c)+o.ch;return{from:r(o.line,c),to:r(o.line,c+s.length)}}}}:function(){};else{var u=s.split("\n");this.matches=function(t,n){var i=l.length-1;if(t){if(n.line-(l.length-1)<e.firstLine())return;if(a(e.getLine(n.line).slice(0,u[i].length))!=l[l.length-1])return;for(var o=r(n.line,u[i].length),s=n.line-1,c=i-1;c>=1;--c,--s)if(l[c]!=a(e.getLine(s)))return;var p=e.getLine(s),d=p.length-u[0].length;if(a(p.slice(d))!=l[0])return;return{from:r(s,d),to:o}}if(!(n.line+(l.length-1)>e.lastLine())){var p=e.getLine(n.line),d=p.length-u[0].length;if(a(p.slice(d))==l[0]){for(var f=r(n.line,d),s=n.line+1,c=1;i>c;++c,++s)if(l[c]!=a(e.getLine(s)))return;if(a(e.getLine(s).slice(0,u[i].length))==l[i])return{from:f,to:r(s,u[i].length)}}}}}}}function n(e,t,n){if(e.length==t.length)return n;for(var r=Math.min(n,e.length);;){var i=e.slice(0,r).toLowerCase().length;if(n>i)++r;else{if(!(i>n))return r;--r}}}var r=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=r(e,0);n.pos={from:t,to:t};n.atOccurrence=!1;return!1}for(var n=this,i=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,i)){this.atOccurrence=!0;return this.pos.match||!0}if(e){if(!i.line)return t(0);i=r(i.line-1,this.doc.getLine(i.line-1).length)}else{var o=this.doc.lineCount();if(i.line==o-1)return t(o);i=r(i.line+1,0)}}},from:function(){return this.atOccurrence?this.pos.from:void 0},to:function(){return this.atOccurrence?this.pos.to:void 0},replace:function(t){if(this.atOccurrence){var n=e.splitLines(t);this.doc.replaceRange(n,this.pos.from,this.pos.to);this.pos.to=r(this.pos.from.line+n.length-1,n[n.length-1].length+(1==n.length?this.pos.from.ch:0))}}};e.defineExtension("getSearchCursor",function(e,n,r){return new t(this.doc,e,n,r)});e.defineDocExtension("getSearchCursor",function(e,n,r){return new t(this,e,n,r)});e.defineExtension("selectMatches",function(t,n){for(var r,i=[],o=this.getSearchCursor(t,this.getCursor("from"),n);(r=o.findNext())&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)i.push({anchor:o.from(),head:o.to()});i.length&&this.setSelections(i,0)})})},{"../../lib/codemirror":25}],25:[function(t,n,r){(function(t){if("object"==typeof r&&"object"==typeof n)n.exports=t();else{if("function"==typeof e&&e.amd)return e([],t);this.CodeMirror=t()}})(function(){"use strict";function e(n,r){if(!(this instanceof e))return new e(n,r);this.options=r=r?No(r):{};No(Gs,r,!1);f(r);var i=r.value;"string"==typeof i&&(i=new ua(i,r.mode));this.doc=i;var o=this.display=new t(n,i);o.wrapper.CodeMirror=this;u(this);a(this);r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap");r.autofocus&&!gs&&On(this);v(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new vo,keySeq:null};is&&11>os&&setTimeout(Co(Rn,this,!0),20);kn(this);Mo();on(this);this.curOp.forceUpdate=!0;Mi(this,i);r.autofocus&&!gs||Do()==o.input?setTimeout(Co(ir,this),20):or(this);for(var s in Bs)Bs.hasOwnProperty(s)&&Bs[s](this,r[s],Us);T(this);for(var l=0;l<Ws.length;++l)Ws[l](this);an(this);ss&&r.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function t(e,t){var n=this,r=n.input=wo("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");ss?r.style.width="1000px":r.setAttribute("wrap","off");hs&&(r.style.border="1px solid black");r.setAttribute("autocorrect","off");r.setAttribute("autocapitalize","off");r.setAttribute("spellcheck","false");n.inputDiv=wo("div",[r],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");n.scrollbarFiller=wo("div",null,"CodeMirror-scrollbar-filler");n.scrollbarFiller.setAttribute("not-content","true");n.gutterFiller=wo("div",null,"CodeMirror-gutter-filler");n.gutterFiller.setAttribute("not-content","true");n.lineDiv=wo("div",null,"CodeMirror-code");n.selectionDiv=wo("div",null,null,"position: relative; z-index: 1");n.cursorDiv=wo("div",null,"CodeMirror-cursors");n.measure=wo("div",null,"CodeMirror-measure");n.lineMeasure=wo("div",null,"CodeMirror-measure");n.lineSpace=wo("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none");n.mover=wo("div",[wo("div",[n.lineSpace],"CodeMirror-lines")],null,"position: relative");n.sizer=wo("div",[n.mover],"CodeMirror-sizer");n.sizerWidth=null;n.heightForcer=wo("div",null,null,"position: absolute; height: "+ya+"px; width: 1px;");n.gutters=wo("div",null,"CodeMirror-gutters");n.lineGutter=null;n.scroller=wo("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll");n.scroller.setAttribute("tabIndex","-1");n.wrapper=wo("div",[n.inputDiv,n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror");if(is&&8>os){n.gutters.style.zIndex=-1;n.scroller.style.paddingRight=0}hs&&(r.style.width="0px");ss||(n.scroller.draggable=!0);if(ps){n.inputDiv.style.height="1px";n.inputDiv.style.position="absolute"}e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper));n.viewFrom=n.viewTo=t.first;n.reportedViewFrom=n.reportedViewTo=t.first;n.view=[];n.renderedView=null;n.externalMeasured=null;n.viewOffset=0;n.lastWrapHeight=n.lastWrapWidth=0;n.updateLineNumbers=null;n.nativeBarWidth=n.barHeight=n.barWidth=0;n.scrollbarsClipped=!1;n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null;n.prevInput="";n.alignWidgets=!1;n.pollingFast=!1;n.poll=new vo;n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null;n.inaccurateSelection=!1;n.maxLine=null;n.maxLineLength=0;n.maxLineChanged=!1;n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null;n.shift=!1;n.selForContextMenu=null}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption);r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null);e.styles&&(e.styles=null)});e.doc.frontier=e.doc.first;Nt(e,100);e.state.modeGen++;e.curOp&&xn(e)}function i(e){if(e.options.lineWrapping){ka(e.display.wrapper,"CodeMirror-wrap");e.display.sizer.style.minWidth="";e.display.sizerWidth=null}else{Da(e.display.wrapper,"CodeMirror-wrap");d(e)}s(e);xn(e);Wt(e);setTimeout(function(){E(e)},100)}function o(e){var t=nn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/rn(e.display)-3);return function(i){if(ui(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s<i.widgets.length;s++)i.widgets[s].height&&(o+=i.widgets[s].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function s(e){var t=e.doc,n=o(e);t.iter(function(e){var t=n(e);t!=e.height&&Ui(e,t)})}function a(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-");Wt(e)}function l(e){u(e);xn(e);setTimeout(function(){b(e) },20)}function u(e){var t=e.display.gutters,n=e.options.gutters;Ro(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(wo("div",null,"CodeMirror-gutter "+i));if("CodeMirror-linenumbers"==i){e.display.lineGutter=o;o.style.width=(e.display.lineNumWidth||1)+"px"}}t.style.display=r?"":"none";c(e)}function c(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function p(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=ni(r);){var i=t.find(0,!0);r=i.from.line;n+=i.from.ch-i.to.ch}r=e;for(;t=ri(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch;r=i.to.line;n+=r.text.length-i.to.ch}return n}function d(e){var t=e.display,n=e.doc;t.maxLine=ji(n,n.first);t.maxLineLength=p(t.maxLine);t.maxLineChanged=!0;n.iter(function(e){var n=p(e);if(n>t.maxLineLength){t.maxLineLength=n;t.maxLine=e}})}function f(e){var t=bo(e.gutters,"CodeMirror-linenumbers");if(-1==t&&e.lineNumbers)e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]);else if(t>-1&&!e.lineNumbers){e.gutters=e.gutters.slice(0);e.gutters.splice(t,1)}}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Ot(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var r=this.vert=wo("div",[wo("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=wo("div",[wo("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r);e(i);ga(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")});ga(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")});this.checkedOverlay=!1;is&&8>os&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function m(){}function v(t){if(t.display.scrollbars){t.display.scrollbars.clear();t.display.scrollbars.addClass&&Da(t.display.wrapper,t.display.scrollbars.addClass)}t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller);ga(e,"mousedown",function(){t.state.focused&&setTimeout(Co(On,t),0)});e.setAttribute("not-content","true")},function(e,n){"horizontal"==n?$n(t,e):zn(t,e)},t);t.display.scrollbars.addClass&&ka(t.display.wrapper,t.display.scrollbars.addClass)}function E(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;y(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++){n!=e.display.barWidth&&e.options.lineWrapping&&O(e);y(e,h(e));n=e.display.barWidth;r=e.display.barHeight}}function y(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px";n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px";if(r.right&&r.bottom){n.scrollbarFiller.style.display="block";n.scrollbarFiller.style.height=r.bottom+"px";n.scrollbarFiller.style.width=r.right+"px"}else n.scrollbarFiller.style.display="";if(r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter){n.gutterFiller.style.display="block";n.gutterFiller.style.height=r.bottom+"px";n.gutterFiller.style.width=t.gutterWidth+"px"}else n.gutterFiller.style.display=""}function x(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-It(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Hi(t,r),s=Hi(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;if(o>a){o=a;s=Hi(t,Vi(ji(t,a))+e.wrapper.clientHeight)}else if(Math.min(l,t.lastLine())>=s){o=Hi(t,Vi(ji(t,l))-e.wrapper.clientHeight);s=l}}return{from:o,to:Math.max(s,o+1)}}function b(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=N(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",s=0;s<n.length;s++)if(!n[s].hidden){e.options.fixedGutter&&n[s].gutter&&(n[s].gutter.style.left=o);var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function T(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=S(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(wo("div",[wo("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,s=i.offsetWidth-o;r.lineGutter.style.width="";r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-s);r.lineNumWidth=r.lineNumInnerWidth+s;r.lineNumChars=r.lineNumInnerWidth?n.length:-1;r.lineGutter.style.width=r.lineNumWidth+"px";c(e);return!0}return!1}function S(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function N(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function C(e,t,n){var r=e.display;this.viewport=t;this.visible=x(r,e.doc,t);this.editorIsHidden=!r.wrapper.offsetWidth;this.wrapperHeight=r.wrapper.clientHeight;this.wrapperWidth=r.wrapper.clientWidth;this.oldDisplayWidth=_t(e);this.force=n;this.dims=D(e)}function L(e){var t=e.display;if(!t.scrollbarsClipped&&t.scroller.offsetWidth){t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth;t.heightForcer.style.height=Ot(e)+"px";t.sizer.style.marginBottom=-t.nativeBarWidth+"px";t.sizer.style.borderRightWidth=Ot(e)+"px";t.scrollbarsClipped=!0}}function A(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden){Tn(e);return!1}if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ln(e))return!1;if(T(e)){Tn(e);t.dims=D(e)}var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom));n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo));if(Ts){o=ai(e.doc,o);s=li(e.doc,s)}var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Cn(e,o,s);n.viewOffset=Vi(ji(e.doc,n.viewFrom));e.display.mover.style.top=n.viewOffset+"px";var l=Ln(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Do();l>4&&(n.lineDiv.style.display="none");k(e,n.updateLineNumbers,t.dims);l>4&&(n.lineDiv.style.display="");n.renderedView=n.view;u&&Do()!=u&&u.offsetHeight&&u.focus();Ro(n.cursorDiv);Ro(n.selectionDiv);n.gutters.style.height=0;if(a){n.lastWrapHeight=t.wrapperHeight;n.lastWrapWidth=t.wrapperWidth;Nt(e,400)}n.updateLineNumbers=null;return!0}function I(e,t){for(var n=t.force,r=t.viewport,i=!0;;i=!1){if(i&&e.options.lineWrapping&&t.oldDisplayWidth!=_t(e))n=!0;else{n=!1;r&&null!=r.top&&(r={top:Math.min(e.doc.height+wt(e.display)-Dt(e),r.top)});t.visible=x(e.display,e.doc,r);if(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}if(!A(e,t))break;O(e);var o=h(e);xt(e);R(e,o);E(e,o)}co(e,"update",e);if(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo){co(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo);e.display.reportedViewFrom=e.display.viewFrom;e.display.reportedViewTo=e.display.viewTo}}function w(e,t){var n=new C(e,t);if(A(e,n)){O(e);I(e,n);var r=h(e);xt(e);R(e,r);E(e,r)}}function R(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px";e.display.gutters.style.height=Math.max(n+Ot(e),t.clientHeight)+"px"}function O(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i,o=t.view[r];if(!o.hidden){if(is&&8>os){var s=o.node.offsetTop+o.node.offsetHeight;i=s-n;n=s}else{var a=o.node.getBoundingClientRect();i=a.bottom-a.top}var l=o.line.height-i;2>i&&(i=nn(t));if(l>.001||-.001>l){Ui(o.line,i);_(o.line);if(o.rest)for(var u=0;u<o.rest.length;u++)_(o.rest[u])}}}}function _(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.offsetHeight}function D(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s){n[e.options.gutters[s]]=o.offsetLeft+o.clientLeft+i;r[e.options.gutters[s]]=o.clientWidth}return{fixedPos:N(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function k(e,t,n){function r(t){var n=t.nextSibling;ss&&ms&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t);return n}for(var i=e.display,o=e.options.lineNumbers,s=i.lineDiv,a=s.firstChild,l=i.view,u=i.viewFrom,c=0;c<l.length;c++){var p=l[c];if(p.hidden);else if(p.node){for(;a!=p.node;)a=r(a);var d=o&&null!=t&&u>=t&&p.lineNumber;if(p.changes){bo(p.changes,"gutter")>-1&&(d=!1);F(e,p,u,n)}if(d){Ro(p.lineNumber);p.lineNumber.appendChild(document.createTextNode(S(e.options,u)))}a=p.node.nextSibling}else{var f=H(e,p,u,n);s.insertBefore(f,a)}u+=p.size}for(;a;)a=r(a)}function F(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?G(e,t):"gutter"==o?U(e,t,n,r):"class"==o?B(t):"widget"==o&&q(t,r)}t.changes=null}function P(e){if(e.node==e.text){e.node=wo("div",null,null,"position: relative");e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text);e.node.appendChild(e.text);is&&8>os&&(e.node.style.zIndex=2)}return e.node}function M(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;t&&(t+=" CodeMirror-linebackground");if(e.background)if(t)e.background.className=t;else{e.background.parentNode.removeChild(e.background);e.background=null}else if(t){var n=P(e);e.background=n.insertBefore(wo("div",null,t),n.firstChild)}}function j(e,t){var n=e.display.externalMeasured;if(n&&n.line==t.line){e.display.externalMeasured=null;t.measure=n.measure;return n.built}return Ci(e,t)}function G(e,t){var n=t.text.className,r=j(e,t);t.text==t.node&&(t.node=r.pre);t.text.parentNode.replaceChild(r.pre,t.text);t.text=r.pre;if(r.bgClass!=t.bgClass||r.textClass!=t.textClass){t.bgClass=r.bgClass;t.textClass=r.textClass;B(t)}else n&&(t.text.className=n)}function B(e){M(e);e.line.wrapClass?P(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function U(e,t,n,r){if(t.gutter){t.node.removeChild(t.gutter);t.gutter=null}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=P(t),s=t.gutter=o.insertBefore(wo("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.text);t.line.gutterClass&&(s.className+=" "+t.line.gutterClass);!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(wo("div",S(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px")));if(i)for(var a=0;a<e.options.gutters.length;++a){var l=e.options.gutters[a],u=i.hasOwnProperty(l)&&i[l];u&&s.appendChild(wo("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[l]+"px; width: "+r.gutterWidth[l]+"px"))}}}function q(e,t){e.alignable&&(e.alignable=null);for(var n,r=e.node.firstChild;r;r=n){var n=r.nextSibling;"CodeMirror-linewidget"==r.className&&e.node.removeChild(r)}V(e,t)}function H(e,t,n,r){var i=j(e,t);t.text=t.node=i.pre;i.bgClass&&(t.bgClass=i.bgClass);i.textClass&&(t.textClass=i.textClass);B(t);U(e,t,n,r);V(t,r);return t.node}function V(e,t){W(e.line,e,t,!0);if(e.rest)for(var n=0;n<e.rest.length;n++)W(e.rest[n],e,t,!1)}function W(e,t,n,r){if(e.widgets)for(var i=P(t),o=0,s=e.widgets;o<s.length;++o){var a=s[o],l=wo("div",[a.node],"CodeMirror-linewidget");a.handleMouseEvents||l.setAttribute("cm-ignore-events","true");z(a,l,t,n);r&&a.above?i.insertBefore(l,t.gutter||t.text):i.appendChild(l);co(a,"redraw")}}function z(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px";if(!e.coverGutter){i-=r.gutterTotalWidth;t.style.paddingLeft=r.gutterTotalWidth+"px"}t.style.width=i+"px"}if(e.coverGutter){t.style.zIndex=5;t.style.position="relative";e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px")}}function $(e){return Ss(e.line,e.ch)}function X(e,t){return Ns(e,t)<0?t:e}function K(e,t){return Ns(e,t)<0?e:t}function Y(e,t){this.ranges=e;this.primIndex=t}function Q(e,t){this.anchor=e;this.head=t}function J(e,t){var n=e[t];e.sort(function(e,t){return Ns(e.from(),t.from())});t=bo(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(Ns(o.to(),i.from())>=0){var s=K(o.from(),i.from()),a=X(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t;e.splice(--r,2,new Q(l?a:s,l?s:a))}}return new Y(e,t)}function Z(e,t){return new Y([new Q(e,t||e)],0)}function et(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function tt(e,t){if(t.line<e.first)return Ss(e.first,0);var n=e.first+e.size-1;return t.line>n?Ss(n,ji(e,n).text.length):nt(t,ji(e,t.line).text.length)}function nt(e,t){var n=e.ch;return null==n||n>t?Ss(e.line,t):0>n?Ss(e.line,0):e}function rt(e,t){return t>=e.first&&t<e.first+e.size}function it(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=tt(e,t[r]);return n}function ot(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=Ns(n,i)<0;if(o!=Ns(r,i)<0){i=n;n=r}else o!=Ns(n,r)<0&&(n=r)}return new Q(i,n)}return new Q(r||n,n)}function st(e,t,n,r){dt(e,new Y([ot(e,e.sel.primary(),t,n)],0),r)}function at(e,t,n){for(var r=[],i=0;i<e.sel.ranges.length;i++)r[i]=ot(e,e.sel.ranges[i],t[i],null);var o=J(r,e.sel.primIndex);dt(e,o,n)}function lt(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n;dt(e,J(i,e.sel.primIndex),r)}function ut(e,t,n,r){dt(e,Z(t,n),r)}function ct(e,t){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Q(tt(e,t[n].anchor),tt(e,t[n].head))}};va(e,"beforeSelectionChange",e,n);e.cm&&va(e.cm,"beforeSelectionChange",e.cm,n);return n.ranges!=t.ranges?J(n.ranges,n.ranges.length-1):t}function pt(e,t,n){var r=e.history.done,i=xo(r);if(i&&i.ranges){r[r.length-1]=t;ft(e,t,n)}else dt(e,t,n)}function dt(e,t,n){ft(e,t,n);Ji(e,e.sel,e.cm?e.cm.curOp.id:0/0,n)}function ft(e,t,n){(go(e,"beforeSelectionChange")||e.cm&&go(e.cm,"beforeSelectionChange"))&&(t=ct(e,t));var r=n&&n.bias||(Ns(t.primary().head,e.sel.primary().head)<0?-1:1);ht(e,mt(e,t,r,!0));n&&n.scroll===!1||!e.cm||Cr(e.cm)}function ht(e,t){if(!t.equals(e.sel)){e.sel=t;if(e.cm){e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0;ho(e.cm)}co(e,"cursorActivity",e)}}function gt(e){ht(e,mt(e,e.sel,null,!1),ba)}function mt(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=vt(e,s.anchor,n,r),l=vt(e,s.head,n,r);if(i||a!=s.anchor||l!=s.head){i||(i=t.ranges.slice(0,o));i[o]=new Q(a,l)}}return i?J(i,t.primIndex):t}function vt(e,t,n,r){var i=!1,o=t,s=n||1;e.cantEdit=!1;e:for(;;){var a=ji(e,o.line);if(a.markedSpans)for(var l=0;l<a.markedSpans.length;++l){var u=a.markedSpans[l],c=u.marker;if((null==u.from||(c.inclusiveLeft?u.from<=o.ch:u.from<o.ch))&&(null==u.to||(c.inclusiveRight?u.to>=o.ch:u.to>o.ch))){if(r){va(c,"beforeCursorEnter");if(c.explicitlyCleared){if(a.markedSpans){--l;continue}break}}if(!c.atomic)continue;var p=c.find(0>s?-1:1);if(0==Ns(p,o)){p.ch+=s;p.ch<0?p=p.line>e.first?tt(e,Ss(p.line-1)):null:p.ch>a.text.length&&(p=p.line<e.first+e.size-1?Ss(p.line+1,0):null);if(!p){if(i){if(!r)return vt(e,t,n,!0);e.cantEdit=!0;return Ss(e.first,0)}i=!0;p=t;s=-s}}o=p;continue e}}return o}}function Et(e){for(var t=e.display,n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),s=0;s<n.sel.ranges.length;s++){var a=n.sel.ranges[s],l=a.empty();(l||e.options.showCursorWhenSelecting)&&bt(e,a,i);l||Tt(e,a,o)}if(e.options.moveInputWithCursor){var u=Qt(e,n.sel.primary().head,"div"),c=t.wrapper.getBoundingClientRect(),p=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,u.top+p.top-c.top));r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,u.left+p.left-c.left))}return r}function yt(e,t){Oo(e.display.cursorDiv,t.cursors);Oo(e.display.selectionDiv,t.selection);if(null!=t.teTop){e.display.inputDiv.style.top=t.teTop+"px";e.display.inputDiv.style.left=t.teLeft+"px"}}function xt(e){yt(e,Et(e))}function bt(e,t,n){var r=Qt(e,t.head,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(wo("div"," ","CodeMirror-cursor"));i.style.left=r.left+"px";i.style.top=r.top+"px";i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px";if(r.other){var o=n.appendChild(wo("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="";o.style.left=r.other.left+"px";o.style.top=r.other.top+"px";o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Tt(e,t,n){function r(e,t,n,r){0>t&&(t=0);t=Math.round(t);r=Math.round(r);a.appendChild(wo("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return Yt(e,Ss(t,n),"div",p,r)}var a,l,p=ji(s,t),d=p.text.length;qo(Wi(p),n||0,null==i?d:i,function(e,t,s){var p,f,h,g=o(e,"left");if(e==t){p=g;f=h=g.left}else{p=o(t-1,"right");if("rtl"==s){var m=g;g=p;p=m}f=g.left;h=p.right}null==n&&0==e&&(f=u);if(p.top-g.top>3){r(f,g.top,null,g.bottom);f=u;g.bottom<p.top&&r(f,g.bottom,null,p.top)}null==i&&t==d&&(h=c);(!a||g.top<a.top||g.top==a.top&&g.left<a.left)&&(a=g);(!l||p.bottom>l.bottom||p.bottom==l.bottom&&p.right>l.right)&&(l=p);u+1>f&&(f=u);r(f,p.top,h-f,p.bottom)});return{start:a,end:l}}var o=e.display,s=e.doc,a=document.createDocumentFragment(),l=Rt(e.display),u=l.left,c=Math.max(o.sizerWidth,_t(e)-o.sizer.offsetLeft)-l.right,p=t.from(),d=t.to();if(p.line==d.line)i(p.line,p.ch,d.ch);else{var f=ji(s,p.line),h=ji(s,d.line),g=oi(f)==oi(h),m=i(p.line,p.ch,g?f.text.length+1:null).end,v=i(d.line,g?0:null,d.ch).start;if(g)if(m.top<v.top-2){r(m.right,m.top,null,m.bottom);r(u,v.top,v.left,v.bottom)}else r(m.right,m.top,v.left-m.right,m.bottom);m.bottom<v.top&&r(u,m.bottom,null,v.top)}n.appendChild(a)}function St(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="";e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Nt(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,Co(Ct,e))}function Ct(e){var t=e.doc;t.frontier<t.first&&(t.frontier=t.first);if(!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=$s(t.mode,At(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var s=o.styles,a=bi(e,o,r,!0);o.styles=a.styles;var l=o.styleClasses,u=a.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var c=!s||s.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),p=0;!c&&p<s.length;++p)c=s[p]!=o.styles[p];c&&i.push(t.frontier);o.stateAfter=$s(t.mode,r)}else{Si(e,o.text,r);o.stateAfter=t.frontier%5==0?$s(t.mode,r):null}++t.frontier;if(+new Date>n){Nt(e,e.options.workDelay);return!0}});i.length&&hn(e,function(){for(var t=0;t<i.length;t++)bn(e,i[t],"text")})}}function Lt(e,t,n){for(var r,i,o=e.doc,s=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=ji(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var u=Na(l.text,null,e.options.tabSize);if(null==i||r>u){i=a-1;r=u}}return i}function At(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=Lt(e,t,n),s=o>r.first&&ji(r,o-1).stateAfter;s=s?$s(r.mode,s):Xs(r.mode);r.iter(o,t,function(n){Si(e,n.text,s);var a=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;n.stateAfter=a?$s(r.mode,s):null;++o});n&&(r.frontier=o);return s}function It(e){return e.lineSpace.offsetTop}function wt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Rt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Oo(e.measure,wo("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r);return r}function Ot(e){return ya-e.display.nativeBarWidth}function _t(e){return e.display.scroller.clientWidth-Ot(e)-e.display.barWidth}function Dt(e){return e.display.scroller.clientHeight-Ot(e)-e.display.barHeight}function kt(e,t,n){var r=e.options.lineWrapping,i=r&&_t(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],u=s[a+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ft(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var r=0;r<e.rest.length;r++)if(qi(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Pt(e,t){t=oi(t);var n=qi(t),r=e.display.externalMeasured=new En(e.doc,t,n);r.lineN=n;var i=r.built=Ci(e,r);r.text=i.pre;Oo(e.display.lineMeasure,i.pre);return r}function Mt(e,t,n,r){return Bt(e,Gt(e,t),n,r)}function jt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Sn(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Gt(e,t){var n=qi(t),r=jt(e,n);r&&!r.text?r=null:r&&r.changes&&F(e,r,n,D(e));r||(r=Pt(e,t));var i=Ft(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Bt(e,t,n,r,i){t.before&&(n=-1);var o,s=n+(r||"");if(t.cache.hasOwnProperty(s))o=t.cache[s];else{t.rect||(t.rect=t.view.text.getBoundingClientRect());if(!t.hasHeights){kt(e,t.view,t.rect);t.hasHeights=!0}o=Ut(e,t,n,r);o.bogus||(t.cache[s]=o)}return{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function Ut(e,t,n,r){for(var i,o,s,a,l=t.map,u=0;u<l.length;u+=3){var c=l[u],p=l[u+1];if(c>n){o=0;s=1;a="left"}else if(p>n){o=n-c;s=o+1}else if(u==l.length-3||n==p&&l[u+3]>n){s=p-c;o=s-1;n>=p&&(a="right")}if(null!=o){i=l[u+2];c==p&&r==(i.insertLeft?"left":"right")&&(a=r);if("left"==r&&0==o)for(;u&&l[u-2]==l[u-3]&&l[u-1].insertLeft;){i=l[(u-=3)+2];a="left"}if("right"==r&&o==p-c)for(;u<l.length-3&&l[u+3]==l[u+4]&&!l[u+5].insertLeft;){i=l[(u+=3)+2];a="right"}break}}var d;if(3==i.nodeType){for(var u=0;4>u;u++){for(;o&&Io(t.line.text.charAt(c+o));)--o;for(;p>c+s&&Io(t.line.text.charAt(c+s));)++s;if(is&&9>os&&0==o&&s==p-c)d=i.parentNode.getBoundingClientRect();else if(is&&e.options.lineWrapping){var f=Aa(i,o,s).getClientRects();d=f.length?f["right"==r?f.length-1:0]:Is}else d=Aa(i,o,s).getBoundingClientRect()||Is;if(d.left||d.right||0==o)break;s=o;o-=1;a="right"}is&&11>os&&(d=qt(e.display.measure,d))}else{o>0&&(a=r="right");var f;d=e.options.lineWrapping&&(f=i.getClientRects()).length>1?f["right"==r?f.length-1:0]:i.getBoundingClientRect()}if(is&&9>os&&!o&&(!d||!d.left&&!d.right)){var h=i.parentNode.getClientRects()[0];d=h?{left:h.left,right:h.left+rn(e.display),top:h.top,bottom:h.bottom}:Is}for(var g=d.top-t.rect.top,m=d.bottom-t.rect.top,v=(g+m)/2,E=t.view.measure.heights,u=0;u<E.length-1&&!(v<E[u]);u++);var y=u?E[u-1]:0,x=E[u],b={left:("right"==a?d.right:d.left)-t.rect.left,right:("left"==a?d.left:d.right)-t.rect.left,top:y,bottom:x};d.left||d.right||(b.bogus=!0);if(!e.options.singleCursorHeightPerLine){b.rtop=g;b.rbottom=m}return b}function qt(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Uo(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function Ht(e){if(e.measure){e.measure.cache={};e.measure.heights=null;if(e.rest)for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}}function Vt(e){e.display.externalMeasure=null;Ro(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Ht(e.display.view[t])}function Wt(e){Vt(e);e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null;e.options.lineWrapping||(e.display.maxLineChanged=!0);e.display.lineNumChars=null}function zt(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function $t(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function Xt(e,t,n,r){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=di(t.widgets[i]);n.top+=o;n.bottom+=o}if("line"==r)return n;r||(r="local");var s=Vi(t);"local"==r?s+=It(e.display):s-=e.display.viewOffset;if("page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==r?0:$t());var l=a.left+("window"==r?0:zt());n.left+=l;n.right+=l}n.top+=s;n.bottom+=s;return n}function Kt(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n){r-=zt();i-=$t()}else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left;i+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:r-s.left,top:i-s.top}}function Yt(e,t,n,r,i){r||(r=ji(e.doc,t.line));return Xt(e,r,Mt(e,r,t.ch,i),n)}function Qt(e,t,n,r,i,o){function s(t,s){var a=Bt(e,i,t,s?"right":"left",o);s?a.left=a.right:a.right=a.left;return Xt(e,r,a,n)}function a(e,t){var n=l[t],r=n.level%2;if(e==Ho(n)&&t&&n.level<l[t-1].level){n=l[--t];e=Vo(n)-(n.level%2?0:1);r=!0}else if(e==Vo(n)&&t<l.length-1&&n.level<l[t+1].level){n=l[++t];e=Ho(n)-n.level%2;r=!1}return r&&e==n.to&&e>n.from?s(e-1):s(e,r)}r=r||ji(e.doc,t.line);i||(i=Gt(e,r));var l=Wi(r),u=t.ch;if(!l)return s(u);var c=Qo(l,u),p=a(u,c);null!=qa&&(p.other=a(u,qa));return p}function Jt(e,t){var n=0,t=tt(e.doc,t);e.options.lineWrapping||(n=rn(e.display)*t.ch);var r=ji(e.doc,t.line),i=Vi(r)+It(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Zt(e,t,n,r){var i=Ss(e,t);i.xRel=r;n&&(i.outside=!0);return i}function en(e,t,n){var r=e.doc;n+=e.display.viewOffset;if(0>n)return Zt(r.first,0,!0,-1);var i=Hi(r,n),o=r.first+r.size-1;if(i>o)return Zt(r.first+r.size-1,ji(r,o).text.length,!0,1);0>t&&(t=0);for(var s=ji(r,i);;){var a=tn(e,s,i,t,n),l=ri(s),u=l&&l.find(0,!0);if(!l||!(a.ch>u.from.ch||a.ch==u.from.ch&&a.xRel>0))return a;i=qi(s=u.to.line)}}function tn(e,t,n,r,i){function o(r){var i=Qt(e,Ss(n,r),"line",t,u);a=!0;if(s>i.bottom)return i.left-l;if(s<i.top)return i.left+l;a=!1;return i.left}var s=i-Vi(t),a=!1,l=2*e.display.wrapper.clientWidth,u=Gt(e,t),c=Wi(t),p=t.text.length,d=Wo(t),f=zo(t),h=o(d),g=a,m=o(f),v=a;if(r>m)return Zt(n,f,v,1);for(;;){if(c?f==d||f==Zo(t,d,1):1>=f-d){for(var E=h>r||m-r>=r-h?d:f,y=r-(E==d?h:m);Io(t.text.charAt(E));)++E;var x=Zt(n,E,E==d?g:v,-1>y?-1:y>1?1:0);return x}var b=Math.ceil(p/2),T=d+b;if(c){T=d;for(var S=0;b>S;++S)T=Zo(t,T,1)}var N=o(T);if(N>r){f=T;m=N;(v=a)&&(m+=1e3);p=b}else{d=T;h=N;g=a;p-=b}}}function nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Cs){Cs=wo("pre");for(var t=0;49>t;++t){Cs.appendChild(document.createTextNode("x"));Cs.appendChild(wo("br"))}Cs.appendChild(document.createTextNode("x"))}Oo(e.measure,Cs);var n=Cs.offsetHeight/50;n>3&&(e.cachedTextHeight=n);Ro(e.measure);return n||1}function rn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=wo("span","xxxxxxxxxx"),n=wo("pre",[t]);Oo(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;i>2&&(e.cachedCharWidth=i);return i||10}function on(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++Rs};ws?ws.ops.push(e.curOp):e.curOp.ownsGroup=ws={ops:[e.curOp],delayedCallbacks:[]}}function sn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n]();for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++](i.cm)}}while(n<t.length)}function an(e){var t=e.curOp,n=t.ownsGroup;if(n)try{sn(n)}finally{ws=null;for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;ln(n)}}function ln(e){for(var t=e.ops,n=0;n<t.length;n++)un(t[n]);for(var n=0;n<t.length;n++)cn(t[n]);for(var n=0;n<t.length;n++)pn(t[n]);for(var n=0;n<t.length;n++)dn(t[n]);for(var n=0;n<t.length;n++)fn(t[n])}function un(e){var t=e.cm,n=t.display;L(t);e.updateMaxLine&&d(t);e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping;e.update=e.mustUpdate&&new C(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function cn(e){e.updatedDisplay=e.mustUpdate&&A(e.cm,e.update)}function pn(e){var t=e.cm,n=t.display;e.updatedDisplay&&O(t);e.barMeasure=h(t);if(n.maxLineChanged&&!t.options.lineWrapping){e.adjustWidthTo=Mt(t,n.maxLine,n.maxLine.text.length).left+3;t.display.sizerWidth=e.adjustWidthTo;e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ot(t)+t.display.barWidth);e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-_t(t))}(e.updatedDisplay||e.selectionChanged)&&(e.newSelectionNodes=Et(t))}function dn(e){var t=e.cm;if(null!=e.adjustWidthTo){t.display.sizer.style.minWidth=e.adjustWidthTo+"px";e.maxScrollLeft<t.doc.scrollLeft&&$n(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0);t.display.maxLineChanged=!1}e.newSelectionNodes&&yt(t,e.newSelectionNodes);e.updatedDisplay&&R(t,e.barMeasure);(e.updatedDisplay||e.startHeight!=t.doc.height)&&E(t,e.barMeasure);e.selectionChanged&&St(t);t.state.focused&&e.updateInput&&Rn(t,e.typing)}function fn(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&I(t,e.update);null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null);if(null!=e.scrollTop&&(n.scroller.scrollTop!=e.scrollTop||e.forceScroll)){r.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop));n.scrollbars.setScrollTop(r.scrollTop);n.scroller.scrollTop=r.scrollTop}if(null!=e.scrollLeft&&(n.scroller.scrollLeft!=e.scrollLeft||e.forceScroll)){r.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-_t(t),e.scrollLeft));n.scrollbars.setScrollLeft(r.scrollLeft);n.scroller.scrollLeft=r.scrollLeft;b(t)}if(e.scrollToPos){var i=br(t,tt(r,e.scrollToPos.from),tt(r,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&xr(t,i)}var o=e.maybeHiddenMarkers,s=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||va(o[a],"hide");if(s)for(var a=0;a<s.length;++a)s[a].lines.length&&va(s[a],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop);e.changeObjs&&va(t,"changes",t,e.changeObjs)}function hn(e,t){if(e.curOp)return t();on(e);try{return t()}finally{an(e)}}function gn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);on(e);try{return t.apply(e,arguments)}finally{an(e)}}}function mn(e){return function(){if(this.curOp)return e.apply(this,arguments);on(this);try{return e.apply(this,arguments)}finally{an(this)}}}function vn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);on(t);try{return e.apply(this,arguments)}finally{an(t)}}}function En(e,t,n){this.line=t;this.rest=si(t);this.size=this.rest?qi(xo(this.rest))-n+1:1;this.node=this.text=null;this.hidden=ui(e,t)}function yn(e,t,n){for(var r,i=[],o=t;n>o;o=r){var s=new En(e.doc,ji(e.doc,o),o);r=o+s.size;i.push(s)}return i}function xn(e,t,n,r){null==t&&(t=e.doc.first);null==n&&(n=e.doc.first+e.doc.size);r||(r=0);var i=e.display;r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t);e.curOp.viewChanged=!0;if(t>=i.viewTo)Ts&&ai(e.doc,t)<i.viewTo&&Tn(e);else if(n<=i.viewFrom)if(Ts&&li(e.doc,n+r)>i.viewFrom)Tn(e); else{i.viewFrom+=r;i.viewTo+=r}else if(t<=i.viewFrom&&n>=i.viewTo)Tn(e);else if(t<=i.viewFrom){var o=Nn(e,n,n+r,1);if(o){i.view=i.view.slice(o.index);i.viewFrom=o.lineN;i.viewTo+=r}else Tn(e)}else if(n>=i.viewTo){var o=Nn(e,t,t,-1);if(o){i.view=i.view.slice(0,o.index);i.viewTo=o.lineN}else Tn(e)}else{var s=Nn(e,t,t,-1),a=Nn(e,n,n+r,1);if(s&&a){i.view=i.view.slice(0,s.index).concat(yn(e,s.lineN,a.lineN)).concat(i.view.slice(a.index));i.viewTo+=r}else Tn(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function bn(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null);if(!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Sn(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==bo(s,n)&&s.push(n)}}}function Tn(e){e.display.viewFrom=e.display.viewTo=e.doc.first;e.display.view=[];e.display.viewOffset=0}function Sn(e,t){if(t>=e.display.viewTo)return null;t-=e.display.viewFrom;if(0>t)return null;for(var n=e.display.view,r=0;r<n.length;r++){t-=n[r].size;if(0>t)return r}}function Nn(e,t,n,r){var i,o=Sn(e,t),s=e.display.view;if(!Ts||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=0,l=e.display.viewFrom;o>a;a++)l+=s[a].size;if(l!=t){if(r>0){if(o==s.length-1)return null;i=l+s[o].size-t;o++}else i=l-t;t+=i;n+=i}for(;ai(e.doc,n)!=n;){if(o==(0>r?0:s.length-1))return null;n+=r*s[o-(0>r?1:0)].size;o+=r}return{index:o,lineN:n}}function Cn(e,t,n){var r=e.display,i=r.view;if(0==i.length||t>=r.viewTo||n<=r.viewFrom){r.view=yn(e,t,n);r.viewFrom=t}else{r.viewFrom>t?r.view=yn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Sn(e,t)));r.viewFrom=t;r.viewTo<n?r.view=r.view.concat(yn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Sn(e,n)))}r.viewTo=n}function Ln(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function An(e){e.display.pollingFast||e.display.poll.set(e.options.pollInterval,function(){wn(e);e.state.focused&&An(e)})}function In(e){function t(){var r=wn(e);if(r||n){e.display.pollingFast=!1;An(e)}else{n=!0;e.display.poll.set(60,t)}}var n=!1;e.display.pollingFast=!0;e.display.poll.set(20,t)}function wn(e){var t=e.display.input,n=e.display.prevInput,r=e.doc;if(!e.state.focused||ja(t)&&!n||Dn(e)||e.options.disableInput||e.state.keySeq)return!1;if(e.state.pasteIncoming&&e.state.fakedLastChar){t.value=t.value.substring(0,t.value.length-1);e.state.fakedLastChar=!1}var i=t.value;if(i==n&&!e.somethingSelected())return!1;if(is&&os>=9&&e.display.inputHasSelection===i||ms&&/[\uf700-\uf7ff]/.test(i)){Rn(e);return!1}var o=!e.curOp;o&&on(e);e.display.shift=!1;8203!=i.charCodeAt(0)||r.sel!=e.display.selForContextMenu||n||(n="​");for(var s=0,a=Math.min(n.length,i.length);a>s&&n.charCodeAt(s)==i.charCodeAt(s);)++s;var l=i.slice(s),u=Ma(l),c=null;e.state.pasteIncoming&&r.sel.ranges.length>1&&(Os&&Os.join("\n")==l?c=r.sel.ranges.length%Os.length==0&&To(Os,Ma):u.length==r.sel.ranges.length&&(c=To(u,function(e){return[e]})));for(var p=r.sel.ranges.length-1;p>=0;p--){var d=r.sel.ranges[p],f=d.from(),h=d.to();s<n.length?f=Ss(f.line,f.ch-(n.length-s)):e.state.overwrite&&d.empty()&&!e.state.pasteIncoming&&(h=Ss(h.line,Math.min(ji(r,h.line).text.length,h.ch+xo(u).length)));var g=e.curOp.updateInput,m={from:f,to:h,text:c?c[p%c.length]:u,origin:e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input"};fr(e.doc,m);co(e,"inputRead",e,m);if(l&&!e.state.pasteIncoming&&e.options.electricChars&&e.options.smartIndent&&d.head.ch<100&&(!p||r.sel.ranges[p-1].head.line!=d.head.line)){var v=e.getModeAt(d.head),E=js(m);if(v.electricChars){for(var y=0;y<v.electricChars.length;y++)if(l.indexOf(v.electricChars.charAt(y))>-1){Ar(e,E.line,"smart");break}}else v.electricInput&&v.electricInput.test(ji(r,E.line).text.slice(0,E.ch))&&Ar(e,E.line,"smart")}}Cr(e);e.curOp.updateInput=g;e.curOp.typing=!0;i.length>1e3||i.indexOf("\n")>-1?t.value=e.display.prevInput="":e.display.prevInput=i;o&&an(e);e.state.pasteIncoming=e.state.cutIncoming=!1;return!0}function Rn(e,t){if(!e.display.contextMenuPending){var n,r,i=e.doc;if(e.somethingSelected()){e.display.prevInput="";var o=i.sel.primary();n=Ga&&(o.to().line-o.from().line>100||(r=e.getSelection()).length>1e3);var s=n?"-":r||e.getSelection();e.display.input.value=s;e.state.focused&&La(e.display.input);is&&os>=9&&(e.display.inputHasSelection=s)}else if(!t){e.display.prevInput=e.display.input.value="";is&&os>=9&&(e.display.inputHasSelection=null)}e.display.inaccurateSelection=n}}function On(e){"nocursor"==e.options.readOnly||gs&&Do()==e.display.input||e.display.input.focus()}function _n(e){if(!e.state.focused){On(e);ir(e)}}function Dn(e){return e.options.readOnly||e.doc.cantEdit}function kn(e){function t(t){fo(e,t)||ha(t)}function n(t){if(e.somethingSelected()){Os=e.getSelections();if(r.inaccurateSelection){r.prevInput="";r.inaccurateSelection=!1;r.input.value=Os.join("\n");La(r.input)}}else{for(var n=[],i=[],o=0;o<e.doc.sel.ranges.length;o++){var s=e.doc.sel.ranges[o].head.line,a={anchor:Ss(s,0),head:Ss(s+1,0)};i.push(a);n.push(e.getRange(a.anchor,a.head))}if("cut"==t.type)e.setSelections(i,null,ba);else{r.prevInput="";r.input.value=n.join("\n");La(r.input)}Os=n}"cut"==t.type&&(e.state.cutIncoming=!0)}var r=e.display;ga(r.scroller,"mousedown",gn(e,jn));is&&11>os?ga(r.scroller,"dblclick",gn(e,function(t){if(!fo(e,t)){var n=Mn(e,t);if(n&&!Hn(e,t)&&!Pn(e.display,t)){da(t);var r=e.findWordAt(n);st(e.doc,r.anchor,r.head)}}})):ga(r.scroller,"dblclick",function(t){fo(e,t)||da(t)});ga(r.lineSpace,"selectstart",function(e){Pn(r,e)||da(e)});xs||ga(r.scroller,"contextmenu",function(t){sr(e,t)});ga(r.scroller,"scroll",function(){if(r.scroller.clientHeight){zn(e,r.scroller.scrollTop);$n(e,r.scroller.scrollLeft,!0);va(e,"scroll",e)}});ga(r.scroller,"mousewheel",function(t){Xn(e,t)});ga(r.scroller,"DOMMouseScroll",function(t){Xn(e,t)});ga(r.wrapper,"scroll",function(){r.wrapper.scrollTop=r.wrapper.scrollLeft=0});ga(r.input,"keyup",function(t){nr.call(e,t)});ga(r.input,"input",function(){is&&os>=9&&e.display.inputHasSelection&&(e.display.inputHasSelection=null);wn(e)});ga(r.input,"keydown",gn(e,er));ga(r.input,"keypress",gn(e,rr));ga(r.input,"focus",Co(ir,e));ga(r.input,"blur",Co(or,e));if(e.options.dragDrop){ga(r.scroller,"dragstart",function(t){Wn(e,t)});ga(r.scroller,"dragenter",t);ga(r.scroller,"dragover",t);ga(r.scroller,"drop",gn(e,Vn))}ga(r.scroller,"paste",function(t){if(!Pn(r,t)){e.state.pasteIncoming=!0;On(e);In(e)}});ga(r.input,"paste",function(){if(ss&&!e.state.fakedLastChar&&!(new Date-e.state.lastMiddleDown<200)){var t=r.input.selectionStart,n=r.input.selectionEnd;r.input.value+="$";r.input.selectionEnd=n;r.input.selectionStart=t;e.state.fakedLastChar=!0}e.state.pasteIncoming=!0;In(e)});ga(r.input,"cut",n);ga(r.input,"copy",n);ps&&ga(r.sizer,"mouseup",function(){Do()==r.input&&r.input.blur();On(e)})}function Fn(e){var t=e.display;if(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth){t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null;t.scrollbarsClipped=!1;e.setSize()}}function Pn(e,t){for(var n=lo(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Mn(e,t,n,r){var i=e.display;if(!n&&"true"==lo(t).getAttribute("not-content"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left;s=t.clientY-a.top}catch(t){return null}var l,u=en(e,o,s);if(r&&1==u.xRel&&(l=ji(e.doc,u.line).text).length==u.ch){var c=Na(l,l.length,e.options.tabSize)-l.length;u=Ss(u.line,Math.max(0,Math.round((o-Rt(e.display).left)/rn(e.display))-c))}return u}function jn(e){if(!fo(this,e)){var t=this,n=t.display;n.shift=e.shiftKey;if(Pn(n,e)){if(!ss){n.scroller.draggable=!1;setTimeout(function(){n.scroller.draggable=!0},100)}}else if(!Hn(t,e)){var r=Mn(t,e);window.focus();switch(uo(e)){case 1:r?Gn(t,e,r):lo(e)==n.scroller&&da(e);break;case 2:ss&&(t.state.lastMiddleDown=+new Date);r&&st(t.doc,r);setTimeout(Co(On,t),20);da(e);break;case 3:xs&&sr(t,e)}}}}function Gn(e,t,n){setTimeout(Co(_n,e),0);var r,i=+new Date;if(As&&As.time>i-400&&0==Ns(As.pos,n))r="triple";else if(Ls&&Ls.time>i-400&&0==Ns(Ls.pos,n)){r="double";As={time:i,pos:n}}else{r="single";Ls={time:i,pos:n}}var o,s=e.doc.sel,a=ms?t.metaKey:t.ctrlKey;e.options.dragDrop&&Pa&&!Dn(e)&&"single"==r&&(o=s.contains(n))>-1&&!s.ranges[o].empty()?Bn(e,t,n,a):Un(e,t,n,r,a)}function Bn(e,t,n,r){var i=e.display,o=gn(e,function(s){ss&&(i.scroller.draggable=!1);e.state.draggingText=!1;ma(document,"mouseup",o);ma(i.scroller,"drop",o);if(Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10){da(s);r||st(e.doc,n);On(e);is&&9==os&&setTimeout(function(){document.body.focus();On(e)},20)}});ss&&(i.scroller.draggable=!0);e.state.draggingText=o;i.scroller.dragDrop&&i.scroller.dragDrop();ga(document,"mouseup",o);ga(i.scroller,"drop",o)}function Un(e,t,n,r,i){function o(t){if(0!=Ns(m,t)){m=t;if("rect"==r){for(var i=[],o=e.options.tabSize,s=Na(ji(u,n.line).text,n.ch,o),a=Na(ji(u,t.line).text,t.ch,o),l=Math.min(s,a),f=Math.max(s,a),h=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));g>=h;h++){var v=ji(u,h).text,E=Eo(v,l,o);l==f?i.push(new Q(Ss(h,E),Ss(h,E))):v.length>E&&i.push(new Q(Ss(h,E),Ss(h,Eo(v,f,o))))}i.length||i.push(new Q(n,n));dt(u,J(d.ranges.slice(0,p).concat(i),p),{origin:"*mouse",scroll:!1});e.scrollIntoView(t)}else{var y=c,x=y.anchor,b=t;if("single"!=r){if("double"==r)var T=e.findWordAt(t);else var T=new Q(Ss(t.line,0),tt(u,Ss(t.line+1,0)));if(Ns(T.anchor,x)>0){b=T.head;x=K(y.from(),T.anchor)}else{b=T.anchor;x=X(y.to(),T.head)}}var i=d.ranges.slice(0);i[p]=new Q(tt(u,x),b);dt(u,J(i,p),Ta)}}}function s(t){var n=++E,i=Mn(e,t,!0,"rect"==r);if(i)if(0!=Ns(i,m)){_n(e);o(i);var a=x(l,u);(i.line>=a.to||i.line<a.from)&&setTimeout(gn(e,function(){E==n&&s(t)}),150)}else{var c=t.clientY<v.top?-20:t.clientY>v.bottom?20:0;c&&setTimeout(gn(e,function(){if(E==n){l.scroller.scrollTop+=c;s(t)}}),50)}}function a(t){E=1/0;da(t);On(e);ma(document,"mousemove",y);ma(document,"mouseup",b);u.history.lastSelOrigin=null}var l=e.display,u=e.doc;da(t);var c,p,d=u.sel,f=d.ranges;if(i&&!t.shiftKey){p=u.sel.contains(n);c=p>-1?f[p]:new Q(n,n)}else c=u.sel.primary();if(t.altKey){r="rect";i||(c=new Q(n,n));n=Mn(e,t,!0,!0);p=-1}else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||u.extend?ot(u,c,h.anchor,h.head):h}else if("triple"==r){var g=new Q(Ss(n.line,0),tt(u,Ss(n.line+1,0)));c=e.display.shift||u.extend?ot(u,c,g.anchor,g.head):g}else c=ot(u,c,n);if(i)if(-1==p){p=f.length;dt(u,J(f.concat([c]),p),{scroll:!1,origin:"*mouse"})}else if(f.length>1&&f[p].empty()&&"single"==r){dt(u,J(f.slice(0,p).concat(f.slice(p+1)),0));d=u.sel}else lt(u,p,c,Ta);else{p=0;dt(u,new Y([c],0),Ta);d=u.sel}var m=n,v=l.wrapper.getBoundingClientRect(),E=0,y=gn(e,function(e){uo(e)?s(e):a(e)}),b=gn(e,a);ga(document,"mousemove",y);ga(document,"mouseup",b)}function qn(e,t,n,r,i){try{var o=t.clientX,s=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&da(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(s>l.bottom||!go(e,n))return ao(t);s-=l.top-a.viewOffset;for(var u=0;u<e.options.gutters.length;++u){var c=a.gutters.childNodes[u];if(c&&c.getBoundingClientRect().right>=o){var p=Hi(e.doc,s),d=e.options.gutters[u];i(e,n,e,p,d,t);return ao(t)}}}function Hn(e,t){return qn(e,t,"gutterClick",!0,co)}function Vn(e){var t=this;if(!fo(t,e)&&!Pn(t.display,e)){da(e);is&&(_s=+new Date);var n=Mn(t,e,!0),r=e.dataTransfer.files;if(n&&!Dn(t))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,a=function(e,r){var a=new FileReader;a.onload=gn(t,function(){o[r]=a.result;if(++s==i){n=tt(t.doc,n);var e={from:n,to:n,text:Ma(o.join("\n")),origin:"paste"};fr(t.doc,e);pt(t.doc,Z(n,js(e)))}});a.readAsText(e)},l=0;i>l;++l)a(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e);setTimeout(Co(On,t),20);return}try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(ms?e.metaKey:e.ctrlKey))var u=t.listSelections();ft(t.doc,Z(n,n));if(u)for(var l=0;l<u.length;++l)yr(t.doc,"",u[l].anchor,u[l].head,"drag");t.replaceSelection(o,"around","paste");On(t)}}catch(e){}}}}function Wn(e,t){if(is&&(!e.state.draggingText||+new Date-_s<100))ha(t);else if(!fo(e,t)&&!Pn(e.display,t)){t.dataTransfer.setData("Text",e.getSelection());if(t.dataTransfer.setDragImage&&!cs){var n=wo("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(us){n.width=n.height=1;e.display.wrapper.appendChild(n);n._top=n.offsetTop}t.dataTransfer.setDragImage(n,0,0);us&&n.parentNode.removeChild(n)}}}function zn(e,t){if(!(Math.abs(e.doc.scrollTop-t)<2)){e.doc.scrollTop=t;ts||w(e,{top:t});e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t);e.display.scrollbars.setScrollTop(t);ts&&w(e);Nt(e,100)}}function $n(e,t,n){if(!(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth);e.doc.scrollLeft=t;b(e);e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t);e.display.scrollbars.setScrollLeft(t)}}function Xn(e,t){var n=Fs(t),r=n.x,i=n.y,o=e.display,s=o.scroller;if(r&&s.scrollWidth>s.clientWidth||i&&s.scrollHeight>s.clientHeight){if(i&&ms&&ss)e:for(var a=t.target,l=o.view;a!=s;a=a.parentNode)for(var u=0;u<l.length;u++)if(l[u].node==a){e.display.currentWheelTarget=a;break e}if(!r||ts||us||null==ks){if(i&&null!=ks){var c=i*ks,p=e.doc.scrollTop,d=p+o.wrapper.clientHeight;0>c?p=Math.max(0,p+c-50):d=Math.min(e.doc.height,d+c+50);w(e,{top:p,bottom:d})}if(20>Ds)if(null==o.wheelStartX){o.wheelStartX=s.scrollLeft;o.wheelStartY=s.scrollTop;o.wheelDX=r;o.wheelDY=i;setTimeout(function(){if(null!=o.wheelStartX){var e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null;if(n){ks=(ks*Ds+n)/(Ds+1);++Ds}}},200)}else{o.wheelDX+=r;o.wheelDY+=i}}else{i&&zn(e,Math.max(0,Math.min(s.scrollTop+i*ks,s.scrollHeight-s.clientHeight)));$n(e,Math.max(0,Math.min(s.scrollLeft+r*ks,s.scrollWidth-s.clientWidth)));da(t);o.wheelStartX=null}}}function Kn(e,t,n){if("string"==typeof t){t=Ks[t];if(!t)return!1}e.display.pollingFast&&wn(e)&&(e.display.pollingFast=!1);var r=e.display.shift,i=!1;try{Dn(e)&&(e.state.suppressEdits=!0);n&&(e.display.shift=!1);i=t(e)!=xa}finally{e.display.shift=r;e.state.suppressEdits=!1}return i}function Yn(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Qs(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Qs(t,e.options.extraKeys,n,e)||Qs(t,e.options.keyMap,n,e)}function Qn(e,t,n,r){var i=e.state.keySeq;if(i){if(Js(t))return"handled";Ps.set(50,function(){if(e.state.keySeq==i){e.state.keySeq=null;Rn(e)}});t=i+" "+t}var o=Yn(e,t,r);"multi"==o&&(e.state.keySeq=t);"handled"==o&&co(e,"keyHandled",e,t,n);if("handled"==o||"multi"==o){da(n);St(e)}if(i&&!o&&/\'$/.test(t)){da(n);return!0}return!!o}function Jn(e,t){var n=Zs(t,!0);return n?t.shiftKey&&!e.state.keySeq?Qn(e,"Shift-"+n,t,function(t){return Kn(e,t,!0)})||Qn(e,n,t,function(t){return("string"==typeof t?/^go[A-Z]/.test(t):t.motion)?Kn(e,t):void 0}):Qn(e,n,t,function(t){return Kn(e,t)}):!1}function Zn(e,t,n){return Qn(e,"'"+n+"'",t,function(t){return Kn(e,t,!0)})}function er(e){var t=this;_n(t);if(!fo(t,e)){is&&11>os&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=Jn(t,e);if(us){Ms=r?n:null;!r&&88==n&&!Ga&&(ms?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")}18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||tr(t)}}function tr(e){function t(e){if(18==e.keyCode||!e.altKey){Da(n,"CodeMirror-crosshair");ma(document,"keyup",t);ma(document,"mouseover",t)}}var n=e.display.lineDiv;ka(n,"CodeMirror-crosshair");ga(document,"keyup",t);ga(document,"mouseover",t)}function nr(e){16==e.keyCode&&(this.doc.sel.shift=!1);fo(this,e)}function rr(e){var t=this;if(!(fo(t,e)||e.ctrlKey&&!e.altKey||ms&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(us&&n==Ms){Ms=null;da(e)}else if(!(us&&(!e.which||e.which<10)||ps)||!Jn(t,e)){var i=String.fromCharCode(null==r?n:r);if(!Zn(t,e,i)){is&&os>=9&&(t.display.inputHasSelection=null);In(t)}}}}function ir(e){if("nocursor"!=e.options.readOnly){if(!e.state.focused){va(e,"focus",e);e.state.focused=!0;ka(e.display.wrapper,"CodeMirror-focused");if(!e.curOp&&e.display.selForContextMenu!=e.doc.sel){Rn(e);ss&&setTimeout(Co(Rn,e,!0),0)}}An(e);St(e)}}function or(e){if(e.state.focused){va(e,"blur",e);e.state.focused=!1;Da(e.display.wrapper,"CodeMirror-focused")}clearInterval(e.display.blinker);setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function sr(e,t){function n(){if(null!=i.input.selectionStart){var t=e.somethingSelected(),n=i.input.value="​"+(t?i.input.value:"");i.prevInput=t?"":"​";i.input.selectionStart=1;i.input.selectionEnd=n.length;i.selForContextMenu=e.doc.sel}}function r(){i.contextMenuPending=!1;i.inputDiv.style.position="relative";i.input.style.cssText=l;is&&9>os&&i.scrollbars.setScrollTop(i.scroller.scrollTop=s);An(e);if(null!=i.input.selectionStart){(!is||is&&9>os)&&n();var t=0,r=function(){i.selForContextMenu==e.doc.sel&&0==i.input.selectionStart?gn(e,Ks.selectAll)(e):t++<10?i.detectingSelectAll=setTimeout(r,500):Rn(e)};i.detectingSelectAll=setTimeout(r,200)}}if(!fo(e,t,"contextmenu")){var i=e.display;if(!Pn(i,t)&&!ar(e,t)){var o=Mn(e,t),s=i.scroller.scrollTop;if(o&&!us){var a=e.options.resetSelectionOnContextMenu;a&&-1==e.doc.sel.contains(o)&&gn(e,dt)(e.doc,Z(o),ba);var l=i.input.style.cssText;i.inputDiv.style.position="absolute";i.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(t.clientY-5)+"px; left: "+(t.clientX-5)+"px; z-index: 1000; background: "+(is?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";if(ss)var u=window.scrollY;On(e);ss&&window.scrollTo(null,u);Rn(e);e.somethingSelected()||(i.input.value=i.prevInput=" ");i.contextMenuPending=!0;i.selForContextMenu=e.doc.sel;clearTimeout(i.detectingSelectAll);is&&os>=9&&n();if(xs){ha(t);var c=function(){ma(window,"mouseup",c);setTimeout(r,20)};ga(window,"mouseup",c)}else setTimeout(r,50)}}}}function ar(e,t){return go(e,"gutterContextMenu")?qn(e,t,"gutterContextMenu",!1,va):!1}function lr(e,t){if(Ns(e,t.from)<0)return e;if(Ns(e,t.to)<=0)return js(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;e.line==t.to.line&&(r+=js(t).ch-t.to.ch);return Ss(n,r)}function ur(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Q(lr(i.anchor,t),lr(i.head,t)))}return J(n,e.sel.primIndex)}function cr(e,t,n){return e.line==t.line?Ss(n.line,e.ch-t.ch+n.ch):Ss(n.line+(e.line-t.line),e.ch)}function pr(e,t,n){for(var r=[],i=Ss(e.first,0),o=i,s=0;s<t.length;s++){var a=t[s],l=cr(a.from,i,o),u=cr(js(a),i,o);i=a.to;o=u;if("around"==n){var c=e.sel.ranges[s],p=Ns(c.head,c.anchor)<0;r[s]=new Q(p?u:l,p?l:u)}else r[s]=new Q(l,l)}return new Y(r,e.sel.primIndex)}function dr(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};n&&(r.update=function(t,n,r,i){t&&(this.from=tt(e,t));n&&(this.to=tt(e,n));r&&(this.text=r);void 0!==i&&(this.origin=i)});va(e,"beforeChange",e,r);e.cm&&va(e.cm,"beforeChange",e.cm,r);return r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function fr(e,t,n){if(e.cm){if(!e.cm.curOp)return gn(e.cm,fr)(e,t,n);if(e.cm.state.suppressEdits)return}if(go(e,"beforeChange")||e.cm&&go(e.cm,"beforeChange")){t=dr(e,t,!0);if(!t)return}var r=bs&&!n&&Kr(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)hr(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else hr(e,t)}function hr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Ns(t.from,t.to)){var n=ur(e,t);Yi(e,t,n,e.cm?e.cm.curOp.id:0/0);vr(e,t,n,zr(e,t));var r=[];Pi(e,function(e,n){if(!n&&-1==bo(r,e.history)){so(e.history,t);r.push(e.history)}vr(e,t,null,zr(e,t))})}}function gr(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,s="undo"==t?i.done:i.undone,a="undo"==t?i.undone:i.done,l=0;l<s.length;l++){r=s[l];if(n?r.ranges&&!r.equals(e.sel):!r.ranges)break}if(l!=s.length){i.lastOrigin=i.lastSelOrigin=null;for(;;){r=s.pop();if(!r.ranges)break;Zi(r,a);if(n&&!r.equals(e.sel)){dt(e,r,{clearRedo:!1});return}o=r}var u=[];Zi(o,a);a.push({changes:u,generation:i.generation});i.generation=r.generation||++i.maxGeneration;for(var c=go(e,"beforeChange")||e.cm&&go(e.cm,"beforeChange"),l=r.changes.length-1;l>=0;--l){var p=r.changes[l];p.origin=t;if(c&&!dr(e,p,!1)){s.length=0;return}u.push($i(e,p));var d=l?ur(e,p):xo(s);vr(e,p,d,Xr(e,p));!l&&e.cm&&e.cm.scrollIntoView({from:p.from,to:js(p)});var f=[];Pi(e,function(e,t){if(!t&&-1==bo(f,e.history)){so(e.history,p);f.push(e.history)}vr(e,p,null,Xr(e,p))})}}}}function mr(e,t){if(0!=t){e.first+=t;e.sel=new Y(To(e.sel.ranges,function(e){return new Q(Ss(e.anchor.line+t,e.anchor.ch),Ss(e.head.line+t,e.head.ch))}),e.sel.primIndex);if(e.cm){xn(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)bn(e.cm,r,"gutter")}}}function vr(e,t,n,r){if(e.cm&&!e.cm.curOp)return gn(e.cm,vr)(e,t,n,r);if(t.to.line<e.first)mr(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);mr(e,i);t={from:Ss(e.first,0),to:Ss(t.to.line+i,t.to.ch),text:[xo(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:Ss(o,ji(e,o).text.length),text:[t.text[0]],origin:t.origin});t.removed=Gi(e,t.from,t.to);n||(n=ur(e,t));e.cm?Er(e.cm,t,r):Di(e,t,r);ft(e,n,ba)}}function Er(e,t,n){var r=e.doc,i=e.display,s=t.from,a=t.to,l=!1,u=s.line;if(!e.options.lineWrapping){u=qi(oi(ji(r,s.line)));r.iter(u,a.line+1,function(e){if(e==i.maxLine){l=!0;return!0}})}r.sel.contains(t.from,t.to)>-1&&ho(e);Di(r,t,n,o(e));if(!e.options.lineWrapping){r.iter(u,s.line+t.text.length,function(e){var t=p(e);if(t>i.maxLineLength){i.maxLine=e;i.maxLineLength=t;i.maxLineChanged=!0;l=!1}});l&&(e.curOp.updateMaxLine=!0)}r.frontier=Math.min(r.frontier,s.line);Nt(e,400);var c=t.text.length-(a.line-s.line)-1;t.full?xn(e):s.line!=a.line||1!=t.text.length||_i(e.doc,t)?xn(e,s.line,a.line+1,c):bn(e,s.line,"text");var d=go(e,"changes"),f=go(e,"change");if(f||d){var h={from:s,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&co(e,"change",e,h);d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function yr(e,t,n,r,i){r||(r=n);if(Ns(r,n)<0){var o=r;r=n;n=o}"string"==typeof t&&(t=Ma(t));fr(e,{from:n,to:r,text:t,origin:i})}function xr(e,t){if(!fo(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1);if(null!=i&&!fs){var o=wo("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-It(e.display))+"px; height: "+(t.bottom-t.top+Ot(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o);o.scrollIntoView(i);e.display.lineSpace.removeChild(o)}}}function br(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,s=Qt(e,t),a=n&&n!=t?Qt(e,n):s,l=Sr(e,Math.min(s.left,a.left),Math.min(s.top,a.top)-r,Math.max(s.left,a.left),Math.max(s.bottom,a.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop){zn(e,l.scrollTop);Math.abs(e.doc.scrollTop-u)>1&&(o=!0)}if(null!=l.scrollLeft){$n(e,l.scrollLeft);Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)}if(!o)break}return s}function Tr(e,t,n,r,i){var o=Sr(e,t,n,r,i);null!=o.scrollTop&&zn(e,o.scrollTop);null!=o.scrollLeft&&$n(e,o.scrollLeft)}function Sr(e,t,n,r,i){var o=e.display,s=nn(e.display);0>n&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Dt(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+wt(o),p=s>n,d=i>c-s;if(a>n)u.scrollTop=p?0:n;else if(i>a+l){var f=Math.min(n,(d?c:i)-l);f!=a&&(u.scrollTop=f)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=_t(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=r-t>g;m&&(r=t+g);10>t?u.scrollLeft=0:h>t?u.scrollLeft=Math.max(0,t-(m?0:10)):r>g+h-3&&(u.scrollLeft=r+(m?0:10)-g);return u}function Nr(e,t,n){(null!=t||null!=n)&&Lr(e);null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t);null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Cr(e){Lr(e);var t=e.getCursor(),n=t,r=t;if(!e.options.lineWrapping){n=t.ch?Ss(t.line,t.ch-1):t;r=Ss(t.line,t.ch+1)}e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Lr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Jt(e,t.from),r=Jt(e,t.to),i=Sr(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Ar(e,t,n,r){var i,o=e.doc;null==n&&(n="add");"smart"==n&&(o.mode.indent?i=At(e,t):n="prev");var s=e.options.tabSize,a=ji(o,t),l=Na(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n){u=o.mode.indent(i,a.text.slice(c.length),a.text);if(u==xa||u>150){if(!r)return;n="prev"}}}else{u=0;n="not"}"prev"==n?u=t>o.first?Na(ji(o,t-1).text,null,s):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n);u=Math.max(0,u);var p="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/s);f;--f){d+=s;p+=" "}u>d&&(p+=yo(u-d));if(p!=c)yr(o,p,Ss(t,0),Ss(t,c.length),"+input");else for(var f=0;f<o.sel.ranges.length;f++){var h=o.sel.ranges[f];if(h.head.line==t&&h.head.ch<c.length){var d=Ss(t,c.length);lt(o,f,new Q(d,d));break}}a.stateAfter=null}function Ir(e,t,n,r){var i=t,o=t;"number"==typeof t?o=ji(e,et(e,t)):i=qi(t);if(null==i)return null;r(o,i)&&e.cm&&bn(e.cm,i,n);return o}function wr(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&Ns(o.from,xo(r).to)<=0;){var s=r.pop();if(Ns(s.from,o.from)<0){o.from=s.from;break}}r.push(o)}hn(e,function(){for(var t=r.length-1;t>=0;t--)yr(e.doc,"",r[t].from,r[t].to,"+delete");Cr(e)})}function Rr(e,t,n,r,i){function o(){var t=a+n;if(t<e.first||t>=e.first+e.size)return p=!1;a=t;return c=ji(e,t)}function s(e){var t=(i?Zo:es)(c,l,n,!0);if(null==t){if(e||!o())return p=!1;l=i?(0>n?zo:Wo)(c):0>n?c.text.length:0}else l=t;return!0}var a=t.line,l=t.ch,u=n,c=ji(e,a),p=!0;if("char"==r)s();else if("column"==r)s(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),g=!0;!(0>n)||s(!g);g=!1){var m=c.text.charAt(l)||"\n",v=Lo(m,h)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";!f||g||v||(v="s");if(d&&d!=v){if(0>n){n=1;s()}break}v&&(d=v);if(n>0&&!s(!g))break}var E=vt(e,Ss(a,l),u,!0);p||(E.hitSide=!0);return E}function Or(e,t,n,r){var i,o=e.doc,s=t.left;if("page"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(a-(0>n?1.5:.5)*nn(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=en(e,s,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function _r(t,n,r,i){e.defaults[t]=n;r&&(Bs[t]=i?function(e,t,n){n!=Us&&r(e,t,n)}:r)}function Dr(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],s=0;s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}t&&(e="Alt-"+e);n&&(e="Ctrl-"+e);i&&(e="Cmd-"+e);r&&(e="Shift-"+e);return e}function kr(e){return"string"==typeof e?Ys[e]:e}function Fr(e,t,n,r,i){if(r&&r.shared)return Pr(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return gn(e.cm,Fr)(e,t,n,r,i);var o=new ta(e,i),s=Ns(t,n);r&&No(r,o,!1);if(s>0||0==s&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith){o.collapsed=!0;o.widgetNode=wo("span",[o.replacedWith],"CodeMirror-widget");r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true");r.insertLeft&&(o.widgetNode.insertLeft=!0)}if(o.collapsed){if(ii(e,t.line,t,n,o)||t.line!=n.line&&ii(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ts=!0}o.addToHistory&&Yi(e,{from:t,to:n,origin:"markText"},e.sel,0/0);var a,l=t.line,u=e.cm;e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&oi(e)==u.display.maxLine&&(a=!0);o.collapsed&&l!=t.line&&Ui(e,0);Hr(e,new Br(o,l==t.line?t.ch:null,l==n.line?n.ch:null));++l});o.collapsed&&e.iter(t.line,n.line+1,function(t){ui(e,t)&&Ui(t,0)});o.clearOnEnter&&ga(o,"beforeCursorEnter",function(){o.clear()});if(o.readOnly){bs=!0;(e.history.done.length||e.history.undone.length)&&e.clearHistory()}if(o.collapsed){o.id=++na;o.atomic=!0}if(u){a&&(u.curOp.updateMaxLine=!0);if(o.collapsed)xn(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)bn(u,c,"text");o.atomic&&gt(u.doc);co(u,"markerAdded",u,o)}return o}function Pr(e,t,n,r,i){r=No(r);r.shared=!1;var o=[Fr(e,t,n,r,i)],s=o[0],a=r.widgetNode;Pi(e,function(e){a&&(r.widgetNode=a.cloneNode(!0));o.push(Fr(e,tt(e,t),tt(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=xo(o)});return new ra(o,s)}function Mr(e){return e.findMarks(Ss(e.first,0),e.clipPos(Ss(e.lastLine())),function(e){return e.parent})}function jr(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),s=e.clipPos(i.to);if(Ns(o,s)){var a=Fr(e,o,s,r.primary,r.primary.type);r.markers.push(a);a.parent=r}}}function Gr(e){for(var t=0;t<e.length;t++){var n=e[t],r=[n.primary.doc];Pi(n.primary.doc,function(e){r.push(e)});for(var i=0;i<n.markers.length;i++){var o=n.markers[i];if(-1==bo(r,o.doc)){o.parent=null;n.markers.splice(i--,1)}}}}function Br(e,t,n){this.marker=e;this.from=t;this.to=n}function Ur(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function qr(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Hr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t];t.marker.attachLine(e)}function Vr(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],s=o.marker,a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&"bookmark"==s.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Br(s,o.from,l?null:o.to))}}return r}function Wr(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],s=o.marker,a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Br(s,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}function zr(e,t){if(t.full)return null;var n=rt(e,t.from.line)&&ji(e,t.from.line).markedSpans,r=rt(e,t.to.line)&&ji(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,s=0==Ns(t.from,t.to),a=Vr(n,i,s),l=Wr(r,o,s),u=1==t.text.length,c=xo(t.text).length+(u?i:0);if(a)for(var p=0;p<a.length;++p){var d=a[p];if(null==d.to){var f=Ur(l,d.marker);f?u&&(d.to=null==f.to?null:f.to+c):d.to=i}}if(l)for(var p=0;p<l.length;++p){var d=l[p];null!=d.to&&(d.to+=c);if(null==d.from){var f=Ur(a,d.marker);if(!f){d.from=c;u&&(a||(a=[])).push(d)}}else{d.from+=c;u&&(a||(a=[])).push(d)}}a&&(a=$r(a));l&&l!=a&&(l=$r(l));var h=[a];if(!u){var g,m=t.text.length-2;if(m>0&&a)for(var p=0;p<a.length;++p)null==a[p].to&&(g||(g=[])).push(new Br(a[p].marker,null,null));for(var p=0;m>p;++p)h.push(g);h.push(l)}return h}function $r(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Xr(e,t){var n=no(e,t),r=zr(e,t); if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],s=r[i];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else s&&(n[i]=s)}return n}function Kr(e,t,n){var r=null;e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=bo(r,n)||(r||(r=[])).push(n)}});if(!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var s=r[o],a=s.find(0),l=0;l<i.length;++l){var u=i[l];if(!(Ns(u.to,a.from)<0||Ns(u.from,a.to)>0)){var c=[l,1],p=Ns(u.from,a.from),d=Ns(u.to,a.to);(0>p||!s.inclusiveLeft&&!p)&&c.push({from:u.from,to:a.from});(d>0||!s.inclusiveRight&&!d)&&c.push({from:a.to,to:u.to});i.splice.apply(i,c);l+=c.length-1}}return i}function Yr(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Qr(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Jr(e){return e.inclusiveLeft?-1:0}function Zr(e){return e.inclusiveRight?1:0}function ei(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=Ns(r.from,i.from)||Jr(e)-Jr(t);if(o)return-o;var s=Ns(r.to,i.to)||Zr(e)-Zr(t);return s?s:t.id-e.id}function ti(e,t){var n,r=Ts&&e.markedSpans;if(r)for(var i,o=0;o<r.length;++o){i=r[o];i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||ei(n,i.marker)<0)&&(n=i.marker)}return n}function ni(e){return ti(e,!0)}function ri(e){return ti(e,!1)}function ii(e,t,n,r,i){var o=ji(e,t),s=Ts&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var u=l.marker.find(0),c=Ns(u.from,n)||Jr(l.marker)-Jr(i),p=Ns(u.to,r)||Zr(l.marker)-Zr(i);if(!(c>=0&&0>=p||0>=c&&p>=0)&&(0>=c&&(Ns(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Ns(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function oi(e){for(var t;t=ni(e);)e=t.find(-1,!0).line;return e}function si(e){for(var t,n;t=ri(e);){e=t.find(1,!0).line;(n||(n=[])).push(e)}return n}function ai(e,t){var n=ji(e,t),r=oi(n);return n==r?t:qi(r)}function li(e,t){if(t>e.lastLine())return t;var n,r=ji(e,t);if(!ui(e,r))return t;for(;n=ri(r);)r=n.find(1,!0).line;return qi(r)+1}function ui(e,t){var n=Ts&&t.markedSpans;if(n)for(var r,i=0;i<n.length;++i){r=n[i];if(r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&ci(e,t,r))return!0}}}function ci(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return ci(e,r.line,Ur(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o){i=t.markedSpans[o];if(i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&ci(e,t,i))return!0}}function pi(e,t,n){Vi(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Nr(e,null,n)}function di(e){if(null!=e.height)return e.height;if(!_o(document.body,e.node)){var t="position: relative;";e.coverGutter&&(t+="margin-left: -"+e.cm.display.gutters.offsetWidth+"px;");e.noHScroll&&(t+="width: "+e.cm.display.wrapper.clientWidth+"px;");Oo(e.cm.display.measure,wo("div",[e.node],null,t))}return e.height=e.node.offsetHeight}function fi(e,t,n,r){var i=new ia(e,n,r);i.noHScroll&&(e.display.alignWidgets=!0);Ir(e.doc,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i);i.line=t;if(!ui(e.doc,t)){var r=Vi(t)<e.doc.scrollTop;Ui(t,t.height+di(i));r&&Nr(e,null,i.height);e.curOp.forceUpdate=!0}return!0});return i}function hi(e,t,n,r){e.text=t;e.stateAfter&&(e.stateAfter=null);e.styles&&(e.styles=null);null!=e.order&&(e.order=null);Yr(e);Qr(e,n);var i=r?r(e):1;i!=e.height&&Ui(e,i)}function gi(e){e.parent=null;Yr(e)}function mi(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function vi(t,n){if(t.blankLine)return t.blankLine(n);if(t.innerMode){var r=e.innerMode(t,n);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Ei(t,n,r,i){for(var o=0;10>o;o++){i&&(i[0]=e.innerMode(t,r).mode);var s=t.token(n,r);if(n.pos>n.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}function yi(e,t,n,r){function i(e){return{start:p.start,end:p.pos,string:p.current(),type:o||null,state:e?$s(s.mode,c):c}}var o,s=e.doc,a=s.mode;t=tt(s,t);var l,u=ji(s,t.line),c=At(e,t.line,n),p=new ea(u.text,e.options.tabSize);r&&(l=[]);for(;(r||p.pos<t.ch)&&!p.eol();){p.start=p.pos;o=Ei(a,p,c);r&&l.push(i(!0))}return r?l:i()}function xi(e,t,n,r,i,o,s){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,u=0,c=null,p=new ea(t,e.options.tabSize),d=e.options.addModeClass&&[null];""==t&&mi(vi(n,r),o);for(;!p.eol();){if(p.pos>e.options.maxHighlightLength){a=!1;s&&Si(e,t,r,p.pos);p.pos=t.length;l=null}else l=mi(Ei(n,p,r,d),o);if(d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||c!=l){for(;u<p.start;){u=Math.min(p.start,u+5e4);i(u,c)}c=l}p.start=p.pos}for(;u<p.pos;){var h=Math.min(p.pos,u+5e4);i(h,c);u=h}}function bi(e,t,n,r){var i=[e.state.modeGen],o={};xi(e,t.text,e.doc.mode,n,function(e,t){i.push(e,t)},o,r);for(var s=0;s<e.state.overlays.length;++s){var a=e.state.overlays[s],l=1,u=0;xi(e,t.text,a.mode,!0,function(e,t){for(var n=l;e>u;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r);l+=2;u=Math.min(e,r)}if(t)if(a.opaque){i.splice(n,l-n,e,"cm-overlay "+t);l=n+2}else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Ti(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=bi(e,t,t.stateAfter=At(e,qi(t)));t.styles=r.styles;r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null);n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Si(e,t,n,r){var i=e.doc.mode,o=new ea(t,e.options.tabSize);o.start=o.pos=r||0;""==t&&vi(i,n);for(;!o.eol()&&o.pos<=e.options.maxHighlightLength;){Ei(i,o,n);o.start=o.pos}}function Ni(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?aa:sa;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Ci(e,t){var n=wo("span",null,null,ss?"padding-right: .1px":null),r={pre:wo("pre",[n]),content:n,col:0,pos:0,cm:e};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,s=i?t.rest[i-1]:t.line;r.pos=0;r.addToken=Ai;(is||ss)&&e.getOption("lineWrapping")&&(r.addToken=Ii(r.addToken));Bo(e.display.measure)&&(o=Wi(s))&&(r.addToken=wi(r.addToken,o));r.map=[];var a=t!=e.display.externalMeasured&&qi(s);Oi(s,r,Ti(e,s,a));if(s.styleClasses){s.styleClasses.bgClass&&(r.bgClass=Fo(s.styleClasses.bgClass,r.bgClass||""));s.styleClasses.textClass&&(r.textClass=Fo(s.styleClasses.textClass,r.textClass||""))}0==r.map.length&&r.map.push(0,0,r.content.appendChild(Go(e.display.measure)));if(0==i){t.measure.map=r.map;t.measure.cache={}}else{(t.measure.maps||(t.measure.maps=[])).push(r.map);(t.measure.caches||(t.measure.caches=[])).push({})}}ss&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack");va(e,"renderLine",e,t.line,r.pre);r.pre.className&&(r.textClass=Fo(r.pre.className,r.textClass||""));return r}function Li(e){var t=wo("span","•","cm-invalidchar");t.title="\\u"+e.charCodeAt(0).toString(16);return t}function Ai(e,t,n,r,i,o,s){if(t){var a=e.cm.options.specialChars,l=!1;if(a.test(t))for(var u=document.createDocumentFragment(),c=0;;){a.lastIndex=c;var p=a.exec(t),d=p?p.index-c:t.length-c;if(d){var f=document.createTextNode(t.slice(c,c+d));u.appendChild(is&&9>os?wo("span",[f]):f);e.map.push(e.pos,e.pos+d,f);e.col+=d;e.pos+=d}if(!p)break;c+=d+1;if(" "==p[0]){var h=e.cm.options.tabSize,g=h-e.col%h,f=u.appendChild(wo("span",yo(g),"cm-tab"));e.col+=g}else{var f=e.cm.options.specialCharPlaceholder(p[0]);u.appendChild(is&&9>os?wo("span",[f]):f);e.col+=1}e.map.push(e.pos,e.pos+1,f);e.pos++}else{e.col+=t.length;var u=document.createTextNode(t);e.map.push(e.pos,e.pos+t.length,u);is&&9>os&&(l=!0);e.pos+=t.length}if(n||r||i||l||s){var m=n||"";r&&(m+=r);i&&(m+=i);var v=wo("span",[u],m,s);o&&(v.title=o);return e.content.appendChild(v)}e.content.appendChild(u)}}function Ii(e){function t(e){for(var t=" ",n=0;n<e.length-2;++n)t+=n%2?" ":" ";t+=" ";return t}return function(n,r,i,o,s,a){e(n,r.replace(/ {3,}/g,t),i,o,s,a)}}function wi(e,t){return function(n,r,i,o,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var l=n.pos,u=l+r.length;;){for(var c=0;c<t.length;c++){var p=t[c];if(p.to>l&&p.from<=l)break}if(p.to>=u)return e(n,r,i,o,s,a);e(n,r.slice(0,p.to-l),i,o,null,a);o=null;r=r.slice(p.to-l);l=p.to}}}function Ri(e,t,n,r){var i=!r&&n.widgetNode;if(i){e.map.push(e.pos,e.pos+t,i);e.content.appendChild(i)}e.pos+=t}function Oi(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,u,c,p,d,f=i.length,h=0,g=1,m="",v=0;;){if(v==h){l=u=c=p=a="";d=null;v=1/0;for(var E=[],y=0;y<r.length;++y){var x=r[y],b=x.marker;if(x.from<=h&&(null==x.to||x.to>h)){if(null!=x.to&&v>x.to){v=x.to;u=""}b.className&&(l+=" "+b.className);b.css&&(a=b.css);b.startStyle&&x.from==h&&(c+=" "+b.startStyle);b.endStyle&&x.to==v&&(u+=" "+b.endStyle);b.title&&!p&&(p=b.title);b.collapsed&&(!d||ei(d.marker,b)<0)&&(d=x)}else x.from>h&&v>x.from&&(v=x.from);"bookmark"==b.type&&x.from==h&&b.widgetNode&&E.push(b)}if(d&&(d.from||0)==h){Ri(t,(null==d.to?f+1:d.to)-h,d.marker,null==d.from);if(null==d.to)return}if(!d&&E.length)for(var y=0;y<E.length;++y)Ri(t,0,E[y])}if(h>=f)break;for(var T=Math.min(f,v);;){if(m){var S=h+m.length;if(!d){var N=S>T?m.slice(0,T-h):m;t.addToken(t,N,s?s+l:l,c,h+N.length==v?u:"",p,a)}if(S>=T){m=m.slice(T-h);h=T;break}h=S;c=""}m=i.slice(o,o=n[g++]);s=Ni(n[g++],t.cm.options)}}else for(var g=1;g<n.length;g+=2)t.addToken(t,i.slice(o,o=n[g]),Ni(n[g+1],t.cm.options))}function _i(e,t){return 0==t.from.ch&&0==t.to.ch&&""==xo(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Di(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){hi(e,n,i,r);co(e,"change",e,t)}function s(e,t){for(var n=e,o=[];t>n;++n)o.push(new oa(u[n],i(n),r));return o}var a=t.from,l=t.to,u=t.text,c=ji(e,a.line),p=ji(e,l.line),d=xo(u),f=i(u.length-1),h=l.line-a.line;if(t.full){e.insert(0,s(0,u.length));e.remove(u.length,e.size-u.length)}else if(_i(e,t)){var g=s(0,u.length-1);o(p,p.text,f);h&&e.remove(a.line,h);g.length&&e.insert(a.line,g)}else if(c==p)if(1==u.length)o(c,c.text.slice(0,a.ch)+d+c.text.slice(l.ch),f);else{var g=s(1,u.length-1);g.push(new oa(d+c.text.slice(l.ch),f,r));o(c,c.text.slice(0,a.ch)+u[0],i(0));e.insert(a.line+1,g)}else if(1==u.length){o(c,c.text.slice(0,a.ch)+u[0]+p.text.slice(l.ch),i(0));e.remove(a.line+1,h)}else{o(c,c.text.slice(0,a.ch)+u[0],i(0));o(p,d+p.text.slice(l.ch),f);var g=s(1,u.length-1);h>1&&e.remove(a.line+1,h-1);e.insert(a.line+1,g)}co(e,"change",e,t)}function ki(e){this.lines=e;this.parent=null;for(var t=0,n=0;t<e.length;++t){e[t].parent=this;n+=e[t].height}this.height=n}function Fi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize();n+=i.height;i.parent=this}this.size=t;this.height=n;this.parent=null}function Pi(e,t,n){function r(e,i,o){if(e.linked)for(var s=0;s<e.linked.length;++s){var a=e.linked[s];if(a.doc!=i){var l=o&&a.sharedHist;if(!n||l){t(a.doc,l);r(a.doc,e,l)}}}}r(e,null,!0)}function Mi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t;t.cm=e;s(e);n(e);e.options.lineWrapping||d(e);e.options.mode=t.modeOption;xn(e)}function ji(e,t){t-=e.first;if(0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Gi(e,t,n){var r=[],i=t.line;e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch));i==t.line&&(o=o.slice(t.ch));r.push(o);++i});return r}function Bi(e,t,n){var r=[];e.iter(t,n,function(e){r.push(e.text)});return r}function Ui(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function qi(e){if(null==e.parent)return null;for(var t=e.parent,n=bo(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Hi(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(o>t){e=i;continue e}t-=o;n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;r<e.lines.length;++r){var s=e.lines[r],a=s.height;if(a>t)break;t-=a}return n+r}function Vi(e){e=oi(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var r=0;r<o.children.length;++r){var s=o.children[r];if(s==n)break;t+=s.height}return t}function Wi(e){var t=e.order;null==t&&(t=e.order=Ha(e.text));return t}function zi(e){this.done=[];this.undone=[];this.undoDepth=1/0;this.lastModTime=this.lastSelTime=0;this.lastOp=this.lastSelOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=e||1}function $i(e,t){var n={from:$(t.from),to:js(t),text:Gi(e,t.from,t.to)};eo(e,n,t.from.line,t.to.line+1);Pi(e,function(e){eo(e,n,t.from.line,t.to.line+1)},!0);return n}function Xi(e){for(;e.length;){var t=xo(e);if(!t.ranges)break;e.pop()}}function Ki(e,t){if(t){Xi(e.done);return xo(e.done)}if(e.done.length&&!xo(e.done).ranges)return xo(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges){e.done.pop();return xo(e.done)}}function Yi(e,t,n,r){var i=e.history;i.undone.length=0;var o,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=Ki(i,i.lastOp==r))){var a=xo(o.changes);0==Ns(t.from,t.to)&&0==Ns(t.from,a.to)?a.to=js(t):o.changes.push($i(e,t))}else{var l=xo(i.done);l&&l.ranges||Zi(e.sel,i.done);o={changes:[$i(e,t)],generation:i.generation};i.done.push(o);for(;i.done.length>i.undoDepth;){i.done.shift();i.done[0].ranges||i.done.shift()}}i.done.push(n);i.generation=++i.maxGeneration;i.lastModTime=i.lastSelTime=s;i.lastOp=i.lastSelOp=r;i.lastOrigin=i.lastSelOrigin=t.origin;a||va(e,"historyAdded")}function Qi(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Ji(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Qi(e,o,xo(i.done),t))?i.done[i.done.length-1]=t:Zi(t,i.done);i.lastSelTime=+new Date;i.lastSelOrigin=o;i.lastSelOp=n;r&&r.clearRedo!==!1&&Xi(i.undone)}function Zi(e,t){var n=xo(t);n&&n.ranges&&n.equals(e)||t.push(e)}function eo(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans);++o})}function to(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function no(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=0,i=[];r<t.text.length;++r)i.push(to(n[r]));return i}function ro(e,t,n){for(var r=0,i=[];r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?Y.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];i.push({changes:a});for(var l=0;l<s.length;++l){var u,c=s[l];a.push({from:c.from,to:c.to,text:c.text});if(t)for(var p in c)if((u=p.match(/^spans_(\d+)$/))&&bo(t,Number(u[1]))>-1){xo(a)[p]=c[p];delete c[p]}}}}return i}function io(e,t,n,r){if(n<e.line)e.line+=r;else if(t<e.line){e.line=t;e.ch=0}}function oo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],s=!0;if(o.ranges){if(!o.copied){o=e[i]=o.deepCopy();o.copied=!0}for(var a=0;a<o.ranges.length;a++){io(o.ranges[a].anchor,t,n,r);io(o.ranges[a].head,t,n,r)}}else{for(var a=0;a<o.changes.length;++a){var l=o.changes[a];if(n<l.from.line){l.from=Ss(l.from.line+r,l.from.ch);l.to=Ss(l.to.line+r,l.to.ch)}else if(t<=l.to.line){s=!1;break}}if(!s){e.splice(0,i+1);i=0}}}}function so(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;oo(e.done,n,r,i);oo(e.undone,n,r,i)}function ao(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function lo(e){return e.target||e.srcElement}function uo(e){var t=e.which;null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2));ms&&e.ctrlKey&&1==t&&(t=3);return t}function co(e,t){function n(e){return function(){e.apply(null,o)}}var r=e._handlers&&e._handlers[t];if(r){var i,o=Array.prototype.slice.call(arguments,2);if(ws)i=ws.delayedCallbacks;else if(Ea)i=Ea;else{i=Ea=[];setTimeout(po,0)}for(var s=0;s<r.length;++s)i.push(n(r[s]))}}function po(){var e=Ea;Ea=null;for(var t=0;t<e.length;++t)e[t]()}function fo(e,t,n){"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}});va(e,n||t.type,e,t);return ao(t)||t.codemirrorIgnore}function ho(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==bo(n,t[r])&&n.push(t[r])}function go(e,t){var n=e._handlers&&e._handlers[t];return n&&n.length>0}function mo(e){e.prototype.on=function(e,t){ga(this,e,t)};e.prototype.off=function(e,t){ma(this,e,t)}}function vo(){this.id=null}function Eo(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);i+=o-r;i+=n-i%n;r=o+1;if(i>=t)return r}}function yo(e){for(;Ca.length<=e;)Ca.push(xo(Ca)+" ");return Ca[e]}function xo(e){return e[e.length-1]}function bo(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function To(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function So(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e;n=new r}t&&No(t,n);return n}function No(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||n===!1&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function Co(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Lo(e,t){return t?t.source.indexOf("\\w")>-1&&wa(e)?!0:t.test(e):wa(e)}function Ao(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Io(e){return e.charCodeAt(0)>=768&&Ra.test(e)}function wo(e,t,n,r){var i=document.createElement(e);n&&(i.className=n);r&&(i.style.cssText=r);if("string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Ro(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Oo(e,t){return Ro(e).appendChild(t)}function _o(e,t){if(e.contains)return e.contains(t);for(;t=t.parentNode;)if(t==e)return!0}function Do(){return document.activeElement}function ko(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Fo(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!ko(n[r]).test(t)&&(t+=" "+n[r]);return t}function Po(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}function Mo(){if(!Fa){jo();Fa=!0}}function jo(){var e;ga(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null;Po(Fn)},100))});ga(window,"blur",function(){Po(or)})}function Go(e){if(null==Oa){var t=wo("span","​");Oo(e,wo("span",[t,document.createTextNode("x")]));0!=e.firstChild.offsetHeight&&(Oa=t.offsetWidth<=1&&t.offsetHeight>2&&!(is&&8>os))}return Oa?wo("span","​"):wo("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function Bo(e){if(null!=_a)return _a;var t=Oo(e,document.createTextNode("AخA")),n=Aa(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Aa(t,1,2).getBoundingClientRect();return _a=r.right-n.right<3}function Uo(e){if(null!=Ba)return Ba;var t=Oo(e,wo("span","x")),n=t.getBoundingClientRect(),r=Aa(t,0,1).getBoundingClientRect();return Ba=Math.abs(n.left-r.left)>1}function qo(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;o<e.length;++o){var s=e[o];if(s.from<n&&s.to>t||t==n&&s.to==t){r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr");i=!0}}i||r(t,n,"ltr")}function Ho(e){return e.level%2?e.to:e.from}function Vo(e){return e.level%2?e.from:e.to}function Wo(e){var t=Wi(e);return t?Ho(t[0]):0}function zo(e){var t=Wi(e);return t?Vo(xo(t)):e.text.length}function $o(e,t){var n=ji(e.doc,t),r=oi(n);r!=n&&(t=qi(r));var i=Wi(r),o=i?i[0].level%2?zo(r):Wo(r):0;return Ss(t,o)}function Xo(e,t){for(var n,r=ji(e.doc,t);n=ri(r);){r=n.find(1,!0).line;t=null}var i=Wi(r),o=i?i[0].level%2?Wo(r):zo(r):r.text.length;return Ss(null==t?qi(r):t,o)}function Ko(e,t){var n=$o(e,t.line),r=ji(e.doc,n.line),i=Wi(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return Ss(n.line,s?0:o)}return n}function Yo(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function Qo(e,t){qa=null;for(var n,r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n){if(Yo(e,i.level,e[n].level)){i.from!=i.to&&(qa=n);return r}i.from!=i.to&&(qa=r);return n}n=r}}return n}function Jo(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Io(e.text.charAt(t)));return t}function Zo(e,t,n,r){var i=Wi(e);if(!i)return es(e,t,n,r);for(var o=Qo(i,t),s=i[o],a=Jo(e,t,s.level%2?-n:n,r);;){if(a>s.from&&a<s.to)return a;if(a==s.from||a==s.to){if(Qo(i,a)==o)return a;s=i[o+=n];return n>0==s.level%2?s.to:s.from}s=i[o+=n];if(!s)return null;a=n>0==s.level%2?Jo(e,s.to,-1,r):Jo(e,s.from,1,r)}}function es(e,t,n,r){var i=t+n;if(r)for(;i>0&&Io(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var ts=/gecko\/\d/i.test(navigator.userAgent),ns=/MSIE \d/.test(navigator.userAgent),rs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),is=ns||rs,os=is&&(ns?document.documentMode||6:rs[1]),ss=/WebKit\//.test(navigator.userAgent),as=ss&&/Qt\/\d+\.\d+/.test(navigator.userAgent),ls=/Chrome\//.test(navigator.userAgent),us=/Opera\//.test(navigator.userAgent),cs=/Apple Computer/.test(navigator.vendor),ps=/KHTML\//.test(navigator.userAgent),ds=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),fs=/PhantomJS/.test(navigator.userAgent),hs=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),gs=hs||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),ms=hs||/Mac/.test(navigator.platform),vs=/win/i.test(navigator.platform),Es=us&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Es&&(Es=Number(Es[1]));if(Es&&Es>=15){us=!1;ss=!0}var ys=ms&&(as||us&&(null==Es||12.11>Es)),xs=ts||is&&os>=9,bs=!1,Ts=!1;g.prototype=No({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block";this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(t){this.horiz.style.display="block";this.horiz.style.right=n?r+"px":"0";this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedOverlay&&e.clientHeight>0){0==r&&this.overlayHack();this.checkedOverlay=!0}return{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=ms&&!ds?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){lo(e)!=t.vert&&lo(e)!=t.horiz&&gn(t.cm,jn)(e)};ga(this.vert,"mousedown",n);ga(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz);e.removeChild(this.vert)}},g.prototype);m.prototype=No({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},m.prototype);e.scrollbarModel={"native":g,"null":m};var Ss=e.Pos=function(e,t){if(!(this instanceof Ss))return new Ss(e,t);this.line=e;this.ch=t},Ns=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch};Y.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(0!=Ns(n.anchor,r.anchor)||0!=Ns(n.head,r.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Q($(this.ranges[t].anchor),$(this.ranges[t].head));return new Y(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(Ns(t,r.from())>=0&&Ns(e,r.to())<=0)return n}return-1}};Q.prototype={from:function(){return K(this.anchor,this.head)},to:function(){return X(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Cs,Ls,As,Is={left:0,right:0,top:0,bottom:0},ws=null,Rs=0,Os=null,_s=0,Ds=0,ks=null;is?ks=-.53:ts?ks=15:ls?ks=-.7:cs&&(ks=-1/3);var Fs=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail);null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta);return{x:t,y:n}};e.wheelEventPixels=function(e){var t=Fs(e);t.x*=ks;t.y*=ks;return t};var Ps=new vo,Ms=null,js=e.changeEnd=function(e){return e.text?Ss(e.from.line+e.text.length-1,xo(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus();On(this);In(this)},setOption:function(e,t){var n=this.options,r=n[e];if(n[e]!=t||"mode"==e){n[e]=t;Bs.hasOwnProperty(e)&&gn(this,Bs[e])(this,t,r)}},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](kr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e){t.splice(n,1);return!0}},addOverlay:mn(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:r,modeSpec:t,opaque:n&&n.opaque});this.state.modeGen++;xn(this)}),removeOverlay:mn(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e){t.splice(n,1);this.state.modeGen++;xn(this);return}}}),indentLine:mn(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract");rt(this.doc,e)&&Ar(this,e,t,n)}),indentSelection:mn(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty()){if(i.head.line>n){Ar(this,i.head.line,e,!0);n=i.head.line;r==this.doc.sel.primIndex&&Cr(this)}}else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;n>l;++l)Ar(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&lt(this.doc,r,new Q(o,u[r].to()),ba)}}}),getTokenAt:function(e,t){return yi(this,e,t)},getLineTokens:function(e,t){return yi(this,Ss(e),t,!0)},getTokenTypeAt:function(e){e=tt(this.doc,e);var t,n=Ti(this,ji(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]<o)){t=n[2*s+2];break}r=s+1}}var a=t?t.indexOf("cm-overlay "):-1;return 0>a?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!zs.hasOwnProperty(t))return zs;var r=zs[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var s=r[i[t][o]];s&&n.push(s)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(var o=0;o<r._global.length;o++){var a=r._global[o];a.pred(i,this)&&-1==bo(n,a.val)&&n.push(a.val)}return n},getStateAfter:function(e,t){var n=this.doc;e=et(n,null==e?n.first+n.size-1:e);return At(this,e+1,t)},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();n=null==e?r.head:"object"==typeof e?tt(this.doc,e):e?r.from():r.to();return Qt(this,n,t||"page")},charCoords:function(e,t){return Yt(this,tt(this.doc,e),t||"page")},coordsChar:function(e,t){e=Kt(this,e,t||"page");return en(this,e.left,e.top)},lineAtHeight:function(e,t){e=Kt(this,{top:e,left:0},t||"page").top;return Hi(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var n=!1,r=this.doc.first+this.doc.size-1;if(e<this.doc.first)e=this.doc.first;else if(e>r){e=r;n=!0}var i=ji(this.doc,e);return Xt(this,i,{top:0,left:0},t||"page").top+(n?this.doc.height-Vi(i):0)},defaultTextHeight:function(){return nn(this.display)},defaultCharWidth:function(){return rn(this.display)},setGutterMarker:mn(function(e,t,n){return Ir(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});r[t]=n;!n&&Ao(r)&&(e.gutterMarkers=null);return!0})}),clearGutter:mn(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){if(n.gutterMarkers&&n.gutterMarkers[e]){n.gutterMarkers[e]=null;bn(t,r,"gutter");Ao(n.gutterMarkers)&&(n.gutterMarkers=null)}++r})}),addLineWidget:mn(function(e,t,n){return fi(this,e,t,n)}),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if("number"==typeof e){if(!rt(this.doc,e))return null;var t=e;e=ji(this.doc,e);if(!e)return null}else{var t=qi(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=Qt(this,tt(this.doc,e));var s=e.bottom,a=e.left;t.style.position="absolute";t.setAttribute("cm-ignore-events","true");o.sizer.appendChild(t);if("over"==r)s=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom);a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=s+"px";t.style.left=t.style.right="";if("right"==i){a=o.sizer.clientWidth-t.offsetWidth;t.style.right="0px"}else{"left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2);t.style.left=a+"px"}n&&Tr(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:mn(er),triggerOnKeyPress:mn(rr),triggerOnKeyUp:nr,execCommand:function(e){return Ks.hasOwnProperty(e)?Ks[e](this):void 0},findPosH:function(e,t,n,r){var i=1;if(0>t){i=-1;t=-t}for(var o=0,s=tt(this.doc,e);t>o;++o){s=Rr(this.doc,s,i,n,r);if(s.hitSide)break}return s},moveH:mn(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Rr(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Sa)}),deleteH:mn(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):wr(this,function(n){var i=Rr(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;if(0>t){i=-1;t=-t}for(var s=0,a=tt(this.doc,e);t>s;++s){var l=Qt(this,a,"div");null==o?o=l.left:l.left=o;a=Or(this,l,i,n);if(a.hitSide)break}return a},moveV:mn(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();r.extendSelectionsBy(function(s){if(o)return 0>e?s.from():s.to();var a=Qt(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn);i.push(a.left);var l=Or(n,a,e,t); "page"==t&&s==r.sel.primary()&&Nr(n,null,Yt(n,l,"div").top-a.top);return l},Sa);if(i.length)for(var s=0;s<r.sel.ranges.length;s++)r.sel.ranges[s].goalColumn=i[s]}),findWordAt:function(e){var t=this.doc,n=ji(t,e.line).text,r=e.ch,i=e.ch;if(n){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==n.length)&&r?--r:++i;for(var s=n.charAt(r),a=Lo(s,o)?function(e){return Lo(e,o)}:/\s/.test(s)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!Lo(e)};r>0&&a(n.charAt(r-1));)--r;for(;i<n.length&&a(n.charAt(i));)++i}return new Q(Ss(e.line,r),Ss(e.line,i))},toggleOverwrite:function(e){if(null==e||e!=this.state.overwrite){(this.state.overwrite=!this.state.overwrite)?ka(this.display.cursorDiv,"CodeMirror-overwrite"):Da(this.display.cursorDiv,"CodeMirror-overwrite");va(this,"overwriteToggle",this,this.state.overwrite)}},hasFocus:function(){return Do()==this.display.input},scrollTo:mn(function(e,t){(null!=e||null!=t)&&Lr(this);null!=e&&(this.curOp.scrollLeft=e);null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ot(this)-this.display.barHeight,width:e.scrollWidth-Ot(this)-this.display.barWidth,clientHeight:Dt(this),clientWidth:_t(this)}},scrollIntoView:mn(function(e,t){if(null==e){e={from:this.doc.sel.primary().head,to:null};null==t&&(t=this.options.cursorScrollMargin)}else"number"==typeof e?e={from:Ss(e,0),to:null}:null==e.from&&(e={from:e,to:null});e.to||(e.to=e.from);e.margin=t||0;if(null!=e.from.line){Lr(this);this.curOp.scrollToPos=e}else{var n=Sr(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}}),setSize:mn(function(e,t){function n(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var r=this;null!=e&&(r.display.wrapper.style.width=n(e));null!=t&&(r.display.wrapper.style.height=n(t));r.options.lineWrapping&&Vt(this);var i=r.display.viewFrom;r.doc.iter(i,r.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){bn(r,i,"widget");break}++i});r.curOp.forceUpdate=!0;va(r,"refresh",this)}),operation:function(e){return hn(this,e)},refresh:mn(function(){var e=this.display.cachedTextHeight;xn(this);this.curOp.forceUpdate=!0;Wt(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);c(this);(null==e||Math.abs(e-nn(this.display))>.5)&&s(this);va(this,"refresh",this)}),swapDoc:mn(function(e){var t=this.doc;t.cm=null;Mi(this,e);Wt(this);Rn(this);this.scrollTo(e.scrollLeft,e.scrollTop);this.curOp.forceScroll=!0;co(this,"swapDoc",this,t);return t}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};mo(e);var Gs=e.defaults={},Bs=e.optionHandlers={},Us=e.Init={toString:function(){return"CodeMirror.Init"}};_r("value","",function(e,t){e.setValue(t)},!0);_r("mode",null,function(e,t){e.doc.modeOption=t;n(e)},!0);_r("indentUnit",2,n,!0);_r("indentWithTabs",!1);_r("smartIndent",!0);_r("tabSize",4,function(e){r(e);Wt(e);xn(e)},!0);_r("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t){e.options.specialChars=new RegExp(t.source+(t.test(" ")?"":"| "),"g");e.refresh()},!0);_r("specialCharPlaceholder",Li,function(e){e.refresh()},!0);_r("electricChars",!0);_r("rtlMoveVisually",!vs);_r("wholeLineUpdateBefore",!0);_r("theme","default",function(e){a(e);l(e)},!0);_r("keyMap","default",function(t,n,r){var i=kr(n),o=r!=e.Init&&kr(r);o&&o.detach&&o.detach(t,i);i.attach&&i.attach(t,o||null)});_r("extraKeys",null);_r("lineWrapping",!1,i,!0);_r("gutters",[],function(e){f(e.options);l(e)},!0);_r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?N(e.display)+"px":"0";e.refresh()},!0);_r("coverGutterNextToScrollbar",!1,function(e){E(e)},!0);_r("scrollbarStyle","native",function(e){v(e);E(e);e.display.scrollbars.setScrollTop(e.doc.scrollTop);e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0);_r("lineNumbers",!1,function(e){f(e.options);l(e)},!0);_r("firstLineNumber",1,l,!0);_r("lineNumberFormatter",function(e){return e},l,!0);_r("showCursorWhenSelecting",!1,xt,!0);_r("resetSelectionOnContextMenu",!0);_r("readOnly",!1,function(e,t){if("nocursor"==t){or(e);e.display.input.blur();e.display.disabled=!0}else{e.display.disabled=!1;t||Rn(e)}});_r("disableInput",!1,function(e,t){t||Rn(e)},!0);_r("dragDrop",!0);_r("cursorBlinkRate",530);_r("cursorScrollMargin",0);_r("cursorHeight",1,xt,!0);_r("singleCursorHeightPerLine",!0,xt,!0);_r("workTime",100);_r("workDelay",100);_r("flattenSpans",!0,r,!0);_r("addModeClass",!1,r,!0);_r("pollInterval",100);_r("undoDepth",200,function(e,t){e.doc.history.undoDepth=t});_r("historyEventDelay",1250);_r("viewportMargin",10,function(e){e.refresh()},!0);_r("maxHighlightLength",1e4,r,!0);_r("moveInputWithCursor",!0,function(e,t){t||(e.display.inputDiv.style.top=e.display.inputDiv.style.left=0)});_r("tabindex",null,function(e,t){e.display.input.tabIndex=t||""});_r("autofocus",null);var qs=e.modes={},Hs=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t);arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2));qs[t]=n};e.defineMIME=function(e,t){Hs[e]=t};e.resolveMode=function(t){if("string"==typeof t&&Hs.hasOwnProperty(t))t=Hs[t];else if(t&&"string"==typeof t.name&&Hs.hasOwnProperty(t.name)){var n=Hs[t.name];"string"==typeof n&&(n={name:n});t=So(n,t);t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}};e.getMode=function(t,n){var n=e.resolveMode(n),r=qs[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(Vs.hasOwnProperty(n.name)){var o=Vs[n.name];for(var s in o)if(o.hasOwnProperty(s)){i.hasOwnProperty(s)&&(i["_"+s]=i[s]);i[s]=o[s]}}i.name=n.name;n.helperType&&(i.helperType=n.helperType);if(n.modeProps)for(var s in n.modeProps)i[s]=n.modeProps[s];return i};e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}});e.defineMIME("text/plain","null");var Vs=e.modeExtensions={};e.extendMode=function(e,t){var n=Vs.hasOwnProperty(e)?Vs[e]:Vs[e]={};No(t,n)};e.defineExtension=function(t,n){e.prototype[t]=n};e.defineDocExtension=function(e,t){ua.prototype[e]=t};e.defineOption=_r;var Ws=[];e.defineInitHook=function(e){Ws.push(e)};var zs=e.helpers={};e.registerHelper=function(t,n,r){zs.hasOwnProperty(t)||(zs[t]=e[t]={_global:[]});zs[t][n]=r};e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i);zs[t]._global.push({pred:r,val:i})};var $s=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([]));n[r]=i}return n},Xs=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state;e=n.mode}return n||{mode:e,state:t}};var Ks=e.commands={selectAll:function(e){e.setSelection(Ss(e.firstLine(),0),Ss(e.lastLine()),ba)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ba)},killLine:function(e){wr(e,function(t){if(t.empty()){var n=ji(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:Ss(t.head.line+1,0)}:{from:t.head,to:Ss(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){wr(e,function(t){return{from:Ss(t.from().line,0),to:tt(e.doc,Ss(t.to().line+1,0))}})},delLineLeft:function(e){wr(e,function(e){return{from:Ss(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){wr(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){wr(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(Ss(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(Ss(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return $o(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){return Ko(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy(function(t){return Xo(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},Sa)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},Sa)},goLineLeftSmart:function(e){e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?Ko(e,t.head):r},Sa)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),s=Na(e.getLine(o.line),o.ch,r);t.push(new Array(r-s%r+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){hn(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r].head,o=ji(e.doc,i.line).text;if(o){i.ch==o.length&&(i=new Ss(i.line,i.ch-1));if(i.ch>0){i=new Ss(i.line,i.ch+1);e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Ss(i.line,i.ch-2),i,"+transpose")}else if(i.line>e.doc.first){var s=ji(e.doc,i.line-1).text;s&&e.replaceRange(o.charAt(0)+"\n"+s.charAt(s.length-1),Ss(i.line-1,s.length-1),Ss(i.line,1),"+transpose")}}n.push(new Q(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){hn(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange("\n",r.anchor,r.head,"+input");e.indentLine(r.from().line+1,null,!0);Cr(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},Ys=e.keyMap={};Ys.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};Ys.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};Ys.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};Ys.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]};Ys["default"]=ms?Ys.macDefault:Ys.pcDefault;e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=To(n.split(" "),Dr),o=0;o<i.length;o++){var s,a;if(o==i.length-1){a=n;s=r}else{a=i.slice(0,o+1).join(" ");s="..."}var l=t[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else t[a]=s}delete e[n]}for(var u in t)e[u]=t[u];return e};var Qs=e.lookupKey=function(e,t,n,r){t=kr(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Qs(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var s=Qs(e,t.fallthrough[o],n,r);if(s)return s}}},Js=e.isModifierKey=function(e){var t="string"==typeof e?e:Ua[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},Zs=e.keyName=function(e,t){if(us&&34==e.keyCode&&e["char"])return!1;var n=Ua[e.keyCode],r=n;if(null==r||e.altGraphKey)return!1;e.altKey&&"Alt"!=n&&(r="Alt-"+r);(ys?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(r="Ctrl-"+r);(ys?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(r="Cmd-"+r);!t&&e.shiftKey&&"Shift"!=n&&(r="Shift-"+r);return r};e.fromTextArea=function(t,n){function r(){t.value=u.getValue()}n||(n={});n.value=t.value;!n.tabindex&&t.tabindex&&(n.tabindex=t.tabindex);!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder);if(null==n.autofocus){var i=Do();n.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}if(t.form){ga(t.form,"submit",r);if(!n.leaveSubmitMethodAlone){var o=t.form,s=o.submit;try{var a=o.submit=function(){r();o.submit=s;o.submit();o.submit=a}}catch(l){}}}t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},n);u.save=r;u.getTextArea=function(){return t};u.toTextArea=function(){u.toTextArea=isNaN;r();t.parentNode.removeChild(u.getWrapperElement());t.style.display="";if(t.form){ma(t.form,"submit",r);"function"==typeof t.form.submit&&(t.form.submit=s)}};return u};var ea=e.StringStream=function(e,t){this.pos=this.start=0;this.string=e;this.tabSize=t||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};ea.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else var n=t&&(e.test?e.test(t):e(t));if(n){++this.pos;return t}},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1){this.pos=t;return!0}},backUp:function(e){this.pos-=e},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=Na(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?Na(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Na(this.string,null,this.tabSize)-(this.lineStart?Na(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);if(r&&r.index>0)return null;r&&t!==!1&&(this.pos+=r[0].length);return r}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e)){t!==!1&&(this.pos+=e.length);return!0}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ta=e.TextMarker=function(e,t){this.lines=[];this.type=t;this.doc=e};mo(ta);ta.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;t&&on(e);if(go(this,"clear")){var n=this.find();n&&co(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Ur(s.markedSpans,this);if(e&&!this.collapsed)bn(e,qi(s),"text");else if(e){null!=a.to&&(i=qi(s));null!=a.from&&(r=qi(s))}s.markedSpans=qr(s.markedSpans,a);null==a.from&&this.collapsed&&!ui(this.doc,s)&&e&&Ui(s,nn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var l=oi(this.lines[o]),u=p(l);if(u>e.display.maxLineLength){e.display.maxLine=l;e.display.maxLineLength=u;e.display.maxLineChanged=!0}}null!=r&&e&&this.collapsed&&xn(e,r,i+1);this.lines.length=0;this.explicitlyCleared=!0;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=!1;e&&gt(e.doc)}e&&co(e,"markerCleared",e,this);t&&an(e);this.parent&&this.parent.clear()}};ta.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var o=this.lines[i],s=Ur(o.markedSpans,this);if(null!=s.from){n=Ss(t?o:qi(o),s.from);if(-1==e)return n}if(null!=s.to){r=Ss(t?o:qi(o),s.to);if(1==e)return r}}return n&&{from:n,to:r}};ta.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&hn(n,function(){var r=e.line,i=qi(e.line),o=jt(n,i);if(o){Ht(o);n.curOp.selectionChanged=n.curOp.forceUpdate=!0}n.curOp.updateMaxLine=!0;if(!ui(t.doc,r)&&null!=t.height){var s=t.height;t.height=null;var a=di(t)-s;a&&Ui(r,r.height+a)}})};ta.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=bo(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)};ta.prototype.detachLine=function(e){this.lines.splice(bo(this.lines,e),1);if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var na=0,ra=e.SharedTextMarker=function(e,t){this.markers=e;this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};mo(ra);ra.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();co(this,"clear")}};ra.prototype.find=function(e,t){return this.primary.find(e,t)};var ia=e.LineWidget=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.cm=e;this.node=t};mo(ia);ia.prototype.clear=function(){var e=this.cm,t=this.line.widgets,n=this.line,r=qi(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=di(this);hn(e,function(){pi(e,n,-o);bn(e,r,"widget");Ui(n,Math.max(0,n.height-o))})}};ia.prototype.changed=function(){var e=this.height,t=this.cm,n=this.line;this.height=null;var r=di(this)-e;r&&hn(t,function(){t.curOp.forceUpdate=!0;pi(t,n,r);Ui(n,n.height+r)})};var oa=e.Line=function(e,t,n){this.text=e;Qr(this,t);this.height=n?n(this):1};mo(oa);oa.prototype.lineNo=function(){return qi(this)};var sa={},aa={};ki.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;r>n;++n){var i=this.lines[n];this.height-=i.height;gi(i);co(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n;this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;r>e;++e)if(n(this.lines[e]))return!0}};Fi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(i>e){var o=Math.min(t,i-e),s=r.height;r.removeInner(e,o);this.height-=s-r.height;if(i==o){this.children.splice(n--,1);r.parent=null}if(0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ki))){var a=[];this.collapse(a);this.children=[new ki(a)];this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length;this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(o>=e){i.insertInner(e,t,n);if(i.lines&&i.lines.length>50){for(;i.lines.length>50;){var s=i.lines.splice(i.lines.length-25,25),a=new ki(s);i.height-=a.height;this.children.splice(r+1,0,a);a.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Fi(t);if(e.parent){e.size-=n.size;e.height-=n.height;var r=bo(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Fi(e.children);i.parent=e;e.children=[i,n];e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(o>e){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var la=0,ua=e.Doc=function(e,t,n){if(!(this instanceof ua))return new ua(e,t,n);null==n&&(n=0);Fi.call(this,[new ki([new oa("",null)])]);this.first=n;this.scrollTop=this.scrollLeft=0;this.cantEdit=!1;this.cleanGeneration=1;this.frontier=n;var r=Ss(n,0);this.sel=Z(r);this.history=new zi(null);this.id=++la;this.modeOption=t;"string"==typeof e&&(e=Ma(e));Di(this,{from:r,to:r,text:e});dt(this,Z(r),ba)};ua.prototype=So(Fi.prototype,{constructor:ua,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Bi(this,this.first,this.first+this.size);return e===!1?t:t.join(e||"\n")},setValue:vn(function(e){var t=Ss(this.first,0),n=this.first+this.size-1;fr(this,{from:t,to:Ss(n,ji(this,n).text.length),text:Ma(e),origin:"setValue",full:!0},!0);dt(this,Z(t))}),replaceRange:function(e,t,n,r){t=tt(this,t);n=n?tt(this,n):t;yr(this,e,t,n,r)},getRange:function(e,t,n){var r=Gi(this,tt(this,e),tt(this,t));return n===!1?r:r.join(n||"\n")},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){return rt(this,e)?ji(this,e):void 0},getLineNumber:function(e){return qi(e)},getLineHandleVisualStart:function(e){"number"==typeof e&&(e=ji(this,e));return oi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return tt(this,e)},getCursor:function(e){var t,n=this.sel.primary();t=null==e||"head"==e?n.head:"anchor"==e?n.anchor:"end"==e||"to"==e||e===!1?n.to():n.from();return t},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:vn(function(e,t,n){ut(this,tt(this,"number"==typeof e?Ss(e,t||0):e),null,n)}),setSelection:vn(function(e,t,n){ut(this,tt(this,e),tt(this,t||e),n)}),extendSelection:vn(function(e,t,n){st(this,tt(this,e),t&&tt(this,t),n)}),extendSelections:vn(function(e,t){at(this,it(this,e,t))}),extendSelectionsBy:vn(function(e,t){at(this,To(this.sel.ranges,e),t)}),setSelections:vn(function(e,t,n){if(e.length){for(var r=0,i=[];r<e.length;r++)i[r]=new Q(tt(this,e[r].anchor),tt(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex));dt(this,J(i,t),n)}}),addSelection:vn(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Q(tt(this,e),tt(this,t||e)));dt(this,J(r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Gi(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return e===!1?t:t.join(e||"\n")},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Gi(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||"\n"));t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:vn(function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var s=i.ranges[o];r[o]={from:s.from(),to:s.to(),text:Ma(e[o]),origin:n}}for(var a=t&&"end"!=t&&pr(this,r,t),o=r.length-1;o>=0;o--)fr(this,r[o]);a?pt(this,a):this.cm&&Cr(this.cm)}),undo:vn(function(){gr(this,"undo")}),redo:vn(function(){gr(this,"redo")}),undoSelection:vn(function(){gr(this,"undo",!0)}),redoSelection:vn(function(){gr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new zi(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null);return this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ro(this.history.done),undone:ro(this.history.undone)}},setHistory:function(e){var t=this.history=new zi(this.history.maxGeneration);t.done=ro(e.done.slice(0),null,!0);t.undone=ro(e.undone.slice(0),null,!0)},addLineClass:vn(function(e,t,n){return Ir(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(ko(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0})}),removeLineClass:vn(function(e,t,n){return Ir(this,e,"gutter"==t?"gutter":"class",function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(ko(n));if(!o)return!1;var s=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&s!=i.length?" ":"")+i.slice(s)||null}return!0})}),markText:function(e,t,n){return Fr(this,tt(this,e),tt(this,t),n,"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared};e=tt(this,e);return Fr(this,e,e,n,"bookmark")},findMarksAt:function(e){e=tt(this,e);var t=[],n=ji(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=tt(this,e);t=tt(this,t);var r=[],i=e.line;this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];i==e.line&&e.ch>l.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i});return r},getAllMarks:function(){var e=[];this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)});return e},posFromIndex:function(e){var t,n=this.first;this.iter(function(r){var i=r.text.length+1;if(i>e){t=e;return!0}e-=i;++n});return tt(this,Ss(n,t))},indexFromPos:function(e){e=tt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;this.iter(this.first,e.line,function(e){t+=e.text.length+1});return t},copy:function(e){var t=new ua(Bi(this,this.first,this.first+this.size),this.modeOption,this.first);t.scrollTop=this.scrollTop;t.scrollLeft=this.scrollLeft;t.sel=this.sel;t.extend=!1;if(e){t.history.undoDepth=this.history.undoDepth;t.setHistory(this.getHistory())}return t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from);null!=e.to&&e.to<n&&(n=e.to);var r=new ua(Bi(this,t,n),e.mode||this.modeOption,t);e.sharedHist&&(r.history=this.history);(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist});r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}];jr(r,Mr(this));return r},unlinkDoc:function(t){t instanceof e&&(t=t.doc);if(this.linked)for(var n=0;n<this.linked.length;++n){var r=this.linked[n];if(r.doc==t){this.linked.splice(n,1);t.unlinkDoc(this);Gr(Mr(this));break}}if(t.history==this.history){var i=[t.id];Pi(t,function(e){i.push(e.id)},!0);t.history=new zi(null);t.history.done=ro(this.history.done,i);t.history.undone=ro(this.history.undone,i)}},iterLinkedDocs:function(e){Pi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});ua.prototype.eachLine=ua.prototype.iter;var ca="iter insert remove copy getEditor".split(" ");for(var pa in ua.prototype)ua.prototype.hasOwnProperty(pa)&&bo(ca,pa)<0&&(e.prototype[pa]=function(e){return function(){return e.apply(this.doc,arguments)}}(ua.prototype[pa]));mo(ua);var da=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},fa=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},ha=e.e_stop=function(e){da(e);fa(e)},ga=e.on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={}),i=r[t]||(r[t]=[]);i.push(n)}},ma=e.off=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers&&e._handlers[t];if(!r)return;for(var i=0;i<r.length;++i)if(r[i]==n){r.splice(i,1);break}}},va=e.signal=function(e,t){var n=e._handlers&&e._handlers[t];if(n)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)},Ea=null,ya=30,xa=e.Pass={toString:function(){return"CodeMirror.Pass"}},ba={scroll:!1},Ta={origin:"*mouse"},Sa={origin:"+move"};vo.prototype.set=function(e,t){clearTimeout(this.id);this.id=setTimeout(t,e)};var Na=e.countColumn=function(e,t,n,r,i){if(null==t){t=e.search(/[^\s\u00a0]/);-1==t&&(t=e.length)}for(var o=r||0,s=i||0;;){var a=e.indexOf(" ",o);if(0>a||a>=t)return s+(t-o);s+=a-o;s+=n-s%n;o=a+1}},Ca=[""],La=function(e){e.select()};hs?La=function(e){e.selectionStart=0;e.selectionEnd=e.value.length}:is&&(La=function(e){try{e.select()}catch(t){}});var Aa,Ia=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,wa=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Ia.test(e))},Ra=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; Aa=document.createRange?function(e,t,n){var r=document.createRange();r.setEnd(e,n);r.setStart(e,t);return r}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}r.collapse(!0);r.moveEnd("character",n);r.moveStart("character",t);return r};is&&11>os&&(Do=function(){try{return document.activeElement}catch(e){return document.body}});var Oa,_a,Da=e.rmClass=function(e,t){var n=e.className,r=ko(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},ka=e.addClass=function(e,t){var n=e.className;ko(t).test(n)||(e.className+=(n?" ":"")+t)},Fa=!1,Pa=function(){if(is&&9>os)return!1;var e=wo("div");return"draggable"in e||"dragDrop"in e}(),Ma=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),s=o.indexOf("\r");if(-1!=s){n.push(o.slice(0,s));t+=s+1}else{n.push(o);t=i+1}}return n}:function(e){return e.split(/\r\n?|\n/)},ja=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Ga=function(){var e=wo("div");if("oncopy"in e)return!0;e.setAttribute("oncopy","return;");return"function"==typeof e.oncopy}(),Ba=null,Ua={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=Ua;(function(){for(var e=0;10>e;e++)Ua[e+48]=Ua[e+96]=String(e);for(var e=65;90>=e;e++)Ua[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)Ua[e+111]=Ua[e+63235]="F"+e})();var qa,Ha=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e;this.from=t;this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,p=[],d=0;c>d;++d)p.push(r=e(n.charCodeAt(d)));for(var d=0,f=u;c>d;++d){var r=p[d];"m"==r?p[d]=f:f=r}for(var d=0,h=u;c>d;++d){var r=p[d];if("1"==r&&"r"==h)p[d]="n";else if(s.test(r)){h=r;"r"==r&&(p[d]="R")}}for(var d=1,f=p[0];c-1>d;++d){var r=p[d];"+"==r&&"1"==f&&"1"==p[d+1]?p[d]="1":","!=r||f!=p[d+1]||"1"!=f&&"n"!=f||(p[d]=f);f=r}for(var d=0;c>d;++d){var r=p[d];if(","==r)p[d]="N";else if("%"==r){for(var g=d+1;c>g&&"%"==p[g];++g);for(var m=d&&"!"==p[d-1]||c>g&&"1"==p[g]?"1":"N",v=d;g>v;++v)p[v]=m;d=g-1}}for(var d=0,h=u;c>d;++d){var r=p[d];"L"==h&&"1"==r?p[d]="L":s.test(r)&&(h=r)}for(var d=0;c>d;++d)if(o.test(p[d])){for(var g=d+1;c>g&&o.test(p[g]);++g);for(var E="L"==(d?p[d-1]:u),y="L"==(c>g?p[g]:u),m=E||y?"L":"R",v=d;g>v;++v)p[v]=m;d=g-1}for(var x,b=[],d=0;c>d;)if(a.test(p[d])){var T=d;for(++d;c>d&&a.test(p[d]);++d);b.push(new t(0,T,d))}else{var S=d,N=b.length;for(++d;c>d&&"L"!=p[d];++d);for(var v=S;d>v;)if(l.test(p[v])){v>S&&b.splice(N,0,new t(1,S,v));var C=v;for(++v;d>v&&l.test(p[v]);++v);b.splice(N,0,new t(2,C,v));S=v}else++v;d>S&&b.splice(N,0,new t(1,S,d))}if(1==b[0].level&&(x=n.match(/^\s+/))){b[0].from=x[0].length;b.unshift(new t(0,0,x[0].length))}if(1==xo(b).level&&(x=n.match(/\s+$/))){xo(b).to-=x[0].length;b.push(new t(0,c-x[0].length,c))}b[0].level!=xo(b).level&&b.push(new t(b[0].level,c,c));return b}}();e.version="4.12.0";return e})},{}],26:[function(e,t){t.exports=e(4)},{"/home/lrd900/yasgui/yasgui/node_modules/jquery/dist/jquery.js":4}],27:[function(e,t){t.exports=e(8)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/node_modules/store/store.js":8}],28:[function(e,t){t.exports=e(9)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/package.json":9}],29:[function(e,t){t.exports=e(10)},{"../package.json":28,"./storage.js":30,"./svg.js":31,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/main.js":10}],30:[function(e,t){t.exports=e(11)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/storage.js":11,store:27}],31:[function(e,t){t.exports=e(12)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/svg.js":12}],32:[function(e,t){t.exports={name:"yasgui-yasqe",description:"Yet Another SPARQL Query Editor",version:"2.3.1",main:"src/main.js",licenses:[{type:"MIT",url:"http://yasqe.yasgui.org/license.txt"}],author:"Laurens Rietveld",homepage:"http://yasqe.yasgui.org",devDependencies:{browserify:"^6.1.0",gulp:"~3.6.0","gulp-bump":"^0.1.11","gulp-concat":"^2.4.1","gulp-connect":"^2.0.5","gulp-embedlr":"^0.5.2","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jsvalidate":"^0.2.0","gulp-livereload":"^1.3.1","gulp-minify-css":"^0.3.11","gulp-notify":"^2.0.1","gulp-rename":"^1.2.0","gulp-streamify":"0.0.5","gulp-tag-version":"^1.1.0","gulp-uglify":"^1.0.1","require-dir":"^0.1.0","run-sequence":"^1.0.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~0.1.1",watchify:"^0.6.4","gulp-sourcemaps":"^1.2.8",exorcist:"^0.1.6","vinyl-transform":"0.0.1","gulp-sass":"^1.2.2","bootstrap-sass":"^3.3.1","browserify-transform-tools":"^1.2.1","gulp-cssimport":"^1.3.1"},bugs:"https://github.com/YASGUI/YASQE/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASQE.git"},dependencies:{jquery:"~ 1.11.0",codemirror:"^4.7.0","yasgui-utils":"^1.4.1"},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"}}}},{}],33:[function(e,t){"use strict";var n=e("jquery"),r=e("../utils.js"),i=e("yasgui-utils"),o=e("../../lib/trie.js");t.exports=function(e,t){var a={},l={},u={};t.on("cursorActivity",function(){d(!0)});t.on("change",function(){var e=[];for(var r in a)a[r].is(":visible")&&e.push(a[r]);if(e.length>0){var i=n(t.getWrapperElement()).find(".CodeMirror-vscrollbar"),o=0;i.is(":visible")&&(o=i.outerWidth());e.forEach(function(e){e.css("right",o)})}});var c=function(e,n){u[e.name]=new o;for(var s=0;s<n.length;s++)u[e.name].insert(n[s]);var a=r.getPersistencyId(t,e.persistent);a&&i.storage.set(a,n,"month")},p=function(e,n){var o=l[e]=new n(t,e);o.name=e;if(o.bulk){var s=function(e){e&&e instanceof Array&&e.length>0&&c(o,e)};if(o.get instanceof Array)s(o.get);else{var a=null,u=r.getPersistencyId(t,o.persistent);u&&(a=i.storage.get(u));a&&a.length>0?s(a):o.get instanceof Function&&(o.async?o.get(null,s):s(o.get()))}}},d=function(r){if(!t.somethingSelected()){var i=function(n){if(r&&(!n.autoShow||!n.bulk&&n.async))return!1;var i={closeCharacters:/(?=a)b/,completeSingle:!1};!n.bulk&&n.async&&(i.async=!0);{var o=function(e,t){return f(n,t)};e.showHint(t,o,i)}return!0};for(var o in l)if(-1!=n.inArray(o,t.options.autocompleters)){var s=l[o];if(s.isValidCompletionPosition)if(s.isValidCompletionPosition()){if(!s.callbacks||!s.callbacks.validPosition||s.callbacks.validPosition(t,s)!==!1){var a=i(s);if(a)break}}else s.callbacks&&s.callbacks.invalidPosition&&s.callbacks.invalidPosition(t,s)}}},f=function(e,n){var r=function(t){var n=t.autocompletionString||t.string,r=[];if(u[e.name])r=u[e.name].autoComplete(n);else if("function"==typeof e.get&&0==e.async)r=e.get(n);else if("object"==typeof e.get)for(var i=n.length,o=0;o<e.get.length;o++){var s=e.get[o];s.slice(0,i)==n&&r.push(s)}return h(r,e,t)},i=t.getCompleteToken();e.preProcessToken&&(i=e.preProcessToken(i));if(i){if(e.bulk||!e.async)return r(i);var o=function(t){n(h(t,e,i))};e.get(i,o)}},h=function(e,n,r){for(var i=[],o=0;o<e.length;o++){var a=e[o];n.postProcessToken&&(a=n.postProcessToken(r,a));i.push({text:a,displayText:a,hint:s})}var l=t.getCursor(),u={completionToken:r.string,list:i,from:{line:l.line,ch:r.start},to:{line:l.line,ch:r.end}};if(n.callbacks)for(var c in n.callbacks)n.callbacks[c]&&t.on(u,c,n.callbacks[c]);return u};return{init:p,completers:l,notifications:{getEl:function(e){return n(a[e.name])},show:function(e,t){if(!t.autoshow){a[t.name]||(a[t.name]=n("<div class='completionNotification'></div>"));a[t.name].show().text("Press "+(-1!=navigator.userAgent.indexOf("Mac OS X")?"CMD":"CTRL")+" - <spacebar> to autocomplete").appendTo(n(e.getWrapperElement()))}},hide:function(e,t){a[t.name]&&a[t.name].hide()}},autoComplete:d,getTrie:function(e){return"string"==typeof e?u[e]:u[e.name]}}};var s=function(e,t,n){n.text!=e.getTokenAt(e.getCursor()).string&&e.replaceRange(n.text,t.from,t.to)}},{"../../lib/trie.js":15,"../utils.js":46,jquery:26,"yasgui-utils":29}],34:[function(e,t){"use strict";e("jquery");t.exports=function(n,r){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(n)},get:function(t,r){return e("./utils").fetchFromLov(n,this,t,r)},preProcessToken:function(e){return t.exports.preProcessToken(n,e)},postProcessToken:function(e,r){return t.exports.postProcessToken(n,e,r)},async:!0,bulk:!1,autoShow:!1,persistent:r,callbacks:{validPosition:n.autocompleters.notifications.show,invalidPosition:n.autocompleters.notifications.hide}}};t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.indexOf("?"))return!1;var n=e.getCursor(),r=e.getPreviousNonWsToken(n.line,t);return"a"==r.string?!0:"rdf:type"==r.string?!0:"rdfs:domain"==r.string?!0:"rdfs:range"==r.string?!0:!1};t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)};t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils":37,"./utils.js":37,jquery:26}],35:[function(e,t){"use strict";var n=e("jquery"),r={"string-2":"prefixed",atom:"var"};t.exports=function(e,r){e.on("change",function(){t.exports.appendPrefixIfNeeded(e,r)});return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(e,t){n.get("http://prefix.cc/popular/all.file.json",function(e){var n=[];for(var r in e)if("bif"!=r){var i=r+": <"+e[r]+">";n.push(i)}n.sort();t(n)})},preProcessToken:function(n){return t.exports.preprocessPrefixTokenForCompletion(e,n)},async:!0,bulk:!0,autoShow:!0,persistent:r}};t.exports.isValidCompletionPosition=function(e){var t=e.getCursor(),r=e.getTokenAt(t);if(e.getLine(t.line).length>t.ch)return!1;"ws"!=r.type&&(r=e.getCompleteToken());if(0==!r.string.indexOf("a")&&-1==n.inArray("PNAME_NS",r.state.possibleCurrent))return!1;var i=e.getPreviousNonWsToken(t.line,r);return i&&"PREFIX"==i.string.toUpperCase()?!0:!1};t.exports.preprocessPrefixTokenForCompletion=function(e,t){var n=e.getPreviousNonWsToken(e.getCursor().line,t);n&&n.string&&":"==n.string.slice(-1)&&(t={start:n.start,end:t.end,string:n.string+" "+t.string,state:t.state});return t};t.exports.appendPrefixIfNeeded=function(e,t){if(e.autocompleters.getTrie(t)&&e.options.autocompleters&&-1!=e.options.autocompleters.indexOf(t)){var n=e.getCursor(),i=e.getTokenAt(n);if("prefixed"==r[i.type]){var o=i.string.indexOf(":");if(-1!==o){var s=e.getPreviousNonWsToken(n.line,i).string.toUpperCase(),a=e.getTokenAt({line:n.line,ch:i.start});if("PREFIX"!=s&&("ws"==a.type||null==a.type)){var l=i.string.substring(0,o+1),u=e.getPrefixesFromQuery();if(null==u[l.slice(0,-1)]){var c=e.autocompleters.getTrie(t).autoComplete(l);c.length>0&&e.addPrefixes(c[0])}}}}}}},{jquery:26}],36:[function(e,t){"use strict";var n=e("jquery");t.exports=function(n,r){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(n)},get:function(t,r){return e("./utils").fetchFromLov(n,this,t,r)},preProcessToken:function(e){return t.exports.preProcessToken(n,e)},postProcessToken:function(e,r){return t.exports.postProcessToken(n,e,r)},async:!0,bulk:!1,autoShow:!1,persistent:r,callbacks:{validPosition:n.autocompleters.notifications.show,invalidPosition:n.autocompleters.notifications.hide}}};t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.length)return!1;if(0==t.string.indexOf("?"))return!1;if(n.inArray("a",t.state.possibleCurrent)>=0)return!0;var r=e.getCursor(),i=e.getPreviousNonWsToken(r.line,t);return"rdfs:subPropertyOf"==i.string?!0:!1};t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)};t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils":37,"./utils.js":37,jquery:26}],37:[function(e,t){"use strict";var n=e("jquery"),r=(e("./utils.js"),e("yasgui-utils")),i=function(e,t){var n=e.getPrefixesFromQuery();if(0==!t.string.indexOf("<")){t.tokenPrefix=t.string.substring(0,t.string.indexOf(":")+1);null!=n[t.tokenPrefix.slice(0,-1)]&&(t.tokenPrefixUri=n[t.tokenPrefix.slice(0,-1)])}t.autocompletionString=t.string.trim();if(0==!t.string.indexOf("<")&&t.string.indexOf(":")>-1)for(var r in n)if(0==t.string.indexOf(r)){t.autocompletionString=n[r];t.autocompletionString+=t.string.substring(r.length+1);break}0==t.autocompletionString.indexOf("<")&&(t.autocompletionString=t.autocompletionString.substring(1));-1!==t.autocompletionString.indexOf(">",t.length-1)&&(t.autocompletionString=t.autocompletionString.substring(0,t.autocompletionString.length-1));return t},o=function(e,t,n){n=t.tokenPrefix&&t.autocompletionString&&t.tokenPrefixUri?t.tokenPrefix+n.substring(t.tokenPrefixUri.length):"<"+n+">";return n},s=function(t,i,o,s){if(!o||!o.string||0==o.string.trim().length){t.autocompleters.notifications.getEl(i).empty().append("Nothing to autocomplete yet!");return!1}var a=50,l={q:o.autocompletionString,page:1};l.type="classes"==i.name?"class":"property";var u=[],c="",p=function(){c="http://lov.okfn.org/dataset/lov/api/v2/autocomplete/terms?"+n.param(l)};p();var d=function(){l.page++;p()},f=function(){n.get(c,function(e){for(var r=0;r<e.results.length;r++)u.push(n.isArray(e.results[r].uri)&&e.results[r].uri.length>0?e.results[r].uri[0]:e.results[r].uri);if(u.length<e.total_results&&u.length<a){d();f()}else{u.length>0?t.autocompleters.notifications.hide(t,i):t.autocompleters.notifications.getEl(i).text("0 matches found...");s(u)}}).fail(function(){t.autocompleters.notifications.getEl(i).empty().append("Failed fetching suggestions..")})};t.autocompleters.notifications.getEl(i).empty().append(n("<span>Fetchting autocompletions &nbsp;</span>")).append(n(r.svg.getElement(e("../imgs.js").loader)).addClass("notificationLoader"));f()};t.exports={fetchFromLov:s,preprocessResourceTokenForCompletion:i,postprocessResourceTokenForCompletion:o}},{"../imgs.js":40,"./utils.js":37,jquery:26,"yasgui-utils":29}],38:[function(e,t){"use strict";var n=e("jquery");t.exports=function(e){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());if("ws"!=t.type){t=e.getCompleteToken(t);if(t&&0==t.string.indexOf("?"))return!0}return!1},get:function(t){if(0==t.trim().length)return[];var r={};n(e.getWrapperElement()).find(".cm-atom").each(function(){var e=this.innerHTML;if(0==e.indexOf("?")){var i=n(this).next(),o=i.attr("class");o&&i.attr("class").indexOf("cm-atom")>=0&&(e+=i.text());if(e.length<=1)return;if(0!==e.indexOf(t))return;if(e==t)return;r[e]=!0}});var i=[];for(var o in r)i.push(o);i.sort();return i},async:!1,bulk:!1,autoShow:!0}}},{jquery:26}],39:[function(e){var t=e("jquery"),n=e("./main.js");n.defaults=t.extend(!0,{},n.defaults,{mode:"sparql11",value:"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nSELECT * WHERE {\n ?sub ?pred ?obj .\n} \nLIMIT 10",highlightSelectionMatches:{showToken:/\w/},tabMode:"indent",lineNumbers:!0,lineWrapping:!0,foldGutter:{rangeFinder:n.fold.brace},gutters:["gutterErrorBar","CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:!0,fixedGutter:!0,syntaxErrorCheck:!0,extraKeys:{"Ctrl-Space":n.autoComplete,"Cmd-Space":n.autoComplete,"Ctrl-D":n.deleteLine,"Ctrl-K":n.deleteLine,"Cmd-D":n.deleteLine,"Cmd-K":n.deleteLine,"Ctrl-/":n.commentLines,"Cmd-/":n.commentLines,"Ctrl-Alt-Down":n.copyLineDown,"Ctrl-Alt-Up":n.copyLineUp,"Cmd-Alt-Down":n.copyLineDown,"Cmd-Alt-Up":n.copyLineUp,"Shift-Ctrl-F":n.doAutoFormat,"Shift-Cmd-F":n.doAutoFormat,"Ctrl-]":n.indentMore,"Cmd-]":n.indentMore,"Ctrl-[":n.indentLess,"Cmd-[":n.indentLess,"Ctrl-S":n.storeQuery,"Cmd-S":n.storeQuery,"Ctrl-Enter":n.executeQuery,"Cmd-Enter":n.executeQuery,F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}},cursorHeight:.9,createShareLink:n.createShareLink,consumeShareLink:n.consumeShareLink,persistent:function(e){return"yasqe_"+t(e.getWrapperElement()).closest("[id]").attr("id")+"_queryVal"},sparql:{showQueryButton:!1,endpoint:"http://dbpedia.org/sparql",requestMethod:"POST",acceptHeaderGraph:"text/turtle,*/*;q=0.9",acceptHeaderSelect:"application/sparql-results+json,*/*;q=0.9",acceptHeaderUpdate:"text/plain,*/*;q=0.9",namedGraphs:[],defaultGraphs:[],args:[],headers:{},callbacks:{beforeSend:null,complete:null,error:null,success:null},handlers:{}}})},{"./main.js":41,jquery:26}],40:[function(e,t){"use strict";t.exports={loader:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="100%" height="100%" fill="black"> <circle cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(45 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.125s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(90 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.25s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(135 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.375s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(180 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(225 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.625s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(270 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.75s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(315 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.875s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(180 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle></svg>',query:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"><g ></g><g > <path d="M64.622,2.411H14.995c-6.627,0-12,5.373-12,12v49.897c0,6.627,5.373,12,12,12h49.627c6.627,0,12-5.373,12-12V14.411 C76.622,7.783,71.249,2.411,64.622,2.411z M24.125,63.906V15.093L61,39.168L24.125,63.906z"/></g></svg>',queryInvalid:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 73.627 73.897" enable-background="new 0 0 80 80" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="warning.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" inkscape:zoom="3.1936344" inkscape:cx="36.8135" inkscape:cy="36.9485" inkscape:window-x="2625" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" /><g transform="translate(-2.995,-2.411)" /><g transform="translate(-2.995,-2.411)" ><path d="M 64.622,2.411 H 14.995 c -6.627,0 -12,5.373 -12,12 v 49.897 c 0,6.627 5.373,12 12,12 h 49.627 c 6.627,0 12,-5.373 12,-12 V 14.411 c 0,-6.628 -5.373,-12 -12,-12 z M 24.125,63.906 V 15.093 L 61,39.168 24.125,63.906 z" inkscape:connector-curvature="0" /></g><path d="M 66.129381,65.903784 H 49.769875 c -1.64721,0 -2.889385,-0.581146 -3.498678,-1.63595 -0.609293,-1.055608 -0.491079,-2.422161 0.332391,-3.848223 l 8.179753,-14.167069 c 0.822934,-1.42633 1.9477,-2.211737 3.166018,-2.211737 1.218319,0 2.343086,0.785407 3.166019,2.211737 l 8.179751,14.167069 c 0.823472,1.426062 0.941686,2.792615 0.33239,3.848223 -0.609023,1.054804 -1.851197,1.63595 -3.498138,1.63595 z M 59.618815,60.91766 c 0,-0.850276 -0.68944,-1.539719 -1.539717,-1.539719 -0.850276,0 -1.539718,0.689443 -1.539718,1.539719 0,0.850277 0.689442,1.539718 1.539718,1.539718 0.850277,0 1.539717,-0.689441 1.539717,-1.539718 z m 0.04155,-9.265919 c 0,-0.873061 -0.707939,-1.580998 -1.580999,-1.580998 -0.873061,0 -1.580999,0.707937 -1.580999,1.580998 l 0.373403,5.610965 h 0.0051 c 0.05415,0.619747 0.568548,1.10761 1.202504,1.10761 0.586239,0 1.075443,-0.415756 1.188563,-0.968489 0.0092,-0.04476 0.0099,-0.09248 0.01392,-0.138854 h 0.01072 l 0.367776,-5.611232 z" inkscape:connector-curvature="0" style="fill:#aa8800" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g ></g><g > <path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',share:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"><path d="M36.764,50c0,0.308-0.07,0.598-0.088,0.905l32.247,16.119c2.76-2.338,6.293-3.797,10.195-3.797 C87.89,63.228,95,70.338,95,79.109C95,87.89,87.89,95,79.118,95c-8.78,0-15.882-7.11-15.882-15.891c0-0.316,0.07-0.598,0.088-0.905 L31.077,62.085c-2.769,2.329-6.293,3.788-10.195,3.788C12.11,65.873,5,58.771,5,50c0-8.78,7.11-15.891,15.882-15.891 c3.902,0,7.427,1.468,10.195,3.797l32.247-16.119c-0.018-0.308-0.088-0.598-0.088-0.914C63.236,12.11,70.338,5,79.118,5 C87.89,5,95,12.11,95,20.873c0,8.78-7.11,15.891-15.882,15.891c-3.911,0-7.436-1.468-10.195-3.806L36.676,49.086 C36.693,49.394,36.764,49.684,36.764,50z"/></svg>',warning:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="0 0 66.399998 66.399998" enable-background="new 0 0 69.3 69.3" xml:space="preserve" height="100%" width="100%" inkscape:version="0.48.4 r9939" ><g transform="translate(-1.5,-1.5)" style="fill:#ff0000"><path d="M 34.7,1.5 C 16.4,1.5 1.5,16.4 1.5,34.7 1.5,53 16.4,67.9 34.7,67.9 53,67.9 67.9,53 67.9,34.7 67.9,16.4 53,1.5 34.7,1.5 z m 0,59.4 C 20.2,60.9 8.5,49.1 8.5,34.7 8.5,20.2 20.3,8.5 34.7,8.5 c 14.4,0 26.2,11.8 26.2,26.2 0,14.4 -11.8,26.2 -26.2,26.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.6,47.1 c -1.4,0 -2.5,0.5 -3.5,1.5 -0.9,1 -1.4,2.2 -1.4,3.6 0,1.6 0.5,2.8 1.5,3.8 1,0.9 2.1,1.3 3.4,1.3 1.3,0 2.4,-0.5 3.4,-1.4 1,-0.9 1.5,-2.2 1.5,-3.7 0,-1.4 -0.5,-2.6 -1.4,-3.6 -0.9,-1 -2.1,-1.5 -3.5,-1.5 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.8,13.9 c -1.5,0 -2.8,0.5 -3.7,1.6 -0.9,1 -1.4,2.4 -1.4,4.2 0,1.1 0.1,2.9 0.2,5.6 l 0.8,13.1 c 0.2,1.8 0.4,3.2 0.9,4.1 0.5,1.2 1.5,1.8 2.9,1.8 1.3,0 2.3,-0.7 2.9,-1.9 0.5,-1 0.7,-2.3 0.9,-4 L 39.4,25 c 0.1,-1.3 0.2,-2.5 0.2,-3.8 0,-2.2 -0.3,-3.9 -0.8,-5.1 -0.5,-1 -1.6,-2.2 -4,-2.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /></g></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'}},{}],41:[function(e,t){"use strict";window.console=window.console||{log:function(){}};var n=e("jquery"),r=e("codemirror"),i=e("./utils.js"),o=e("yasgui-utils"),s=e("./imgs.js");e("../lib/deparam.js");e("codemirror/addon/fold/foldcode.js");e("codemirror/addon/fold/foldgutter.js");e("codemirror/addon/fold/xml-fold.js");e("codemirror/addon/fold/brace-fold.js");e("codemirror/addon/hint/show-hint.js");e("codemirror/addon/search/searchcursor.js");e("codemirror/addon/edit/matchbrackets.js");e("codemirror/addon/runmode/runmode.js");e("codemirror/addon/display/fullscreen.js");e("../lib/flint.js");var a=t.exports=function(e,t){var i=n("<div>",{"class":"yasqe"}).appendTo(n(e));t=l(t);var o=u(r(i[0],t));d(o);return o},l=function(e){var t=n.extend(!0,{},a.defaults,e);return t},u=function(t){t.autocompleters=e("./autocompleters/autocompleterBase.js")(a,t);t.options.autocompleters&&t.options.autocompleters.forEach(function(e){a.Autocompleters[e]&&t.autocompleters.init(e,a.Autocompleters[e]) });t.getCompleteToken=function(n,r){return e("./tokenUtils.js").getCompleteToken(t,n,r)};t.getPreviousNonWsToken=function(n,r){return e("./tokenUtils.js").getPreviousNonWsToken(t,n,r)};t.getNextNonWsToken=function(n,r){return e("./tokenUtils.js").getNextNonWsToken(t,n,r)};t.query=function(e){a.executeQuery(t,e)};t.getUrlArguments=function(e){return a.getUrlArguments(t,e)};t.getPrefixesFromQuery=function(){return e("./prefixUtils.js").getPrefixesFromQuery(t)};t.addPrefixes=function(n){return e("./prefixUtils.js").addPrefixes(t,n)};t.removePrefixes=function(n){return e("./prefixUtils.js").removePrefixes(t,n)};t.getValueWithoutComments=function(){var e="";a.runMode(t.getValue(),"sparql11",function(t,n){"comment"!=n&&(e+=t)});return e};t.getQueryType=function(){return t.queryType};t.getQueryMode=function(){var e=t.getQueryType();return"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e?"update":"query"};t.setCheckSyntaxErrors=function(e){t.options.syntaxErrorCheck=e;h(t)};t.enableCompleter=function(e){c(t.options,e);a.Autocompleters[e]&&t.autocompleters.init(e,a.Autocompleters[e])};t.disableCompleter=function(e){p(t.options,e)};return t},c=function(e,t){e.autocompleters||(e.autocompleters=[]);e.autocompleters.push(t)},p=function(e,t){if("object"==typeof e.autocompleters){var r=n.inArray(t,e.autocompleters);if(r>=0){e.autocompleters.splice(r,1);p(e,t)}}},d=function(e){var t=i.getPersistencyId(e,e.options.persistent);if(t){var r=o.storage.get(t);r&&e.setValue(r)}a.drawButtons(e);e.on("blur",function(e){a.storeQuery(e)});e.on("change",function(e){h(e);a.updateQueryButton(e);a.positionButtons(e)});e.on("changes",function(){h(e);a.updateQueryButton(e);a.positionButtons(e)});e.on("cursorActivity",function(e){f(e)});e.prevQueryValid=!1;h(e);a.positionButtons(e);if(e.options.consumeShareLink){var s=n.deparam(window.location.search.substring(1));e.options.consumeShareLink(e,s)}},f=function(e){e.cursor=n(".CodeMirror-cursor");e.buttons&&e.buttons.is(":visible")&&e.cursor.length>0&&(i.elementsOverlap(e.cursor,e.buttons)?e.buttons.find("svg").attr("opacity","0.2"):e.buttons.find("svg").attr("opacity","1.0"))},h=function(t,r){t.queryValid=!0;t.clearGutter("gutterErrorBar");for(var i=null,a=0;a<t.lineCount();++a){var l=!1;t.prevQueryValid||(l=!0);var u=t.getTokenAt({line:a,ch:t.getLine(a).length},l),i=u.state;t.queryType=i.queryType;if(0==i.OK){if(!t.options.syntaxErrorCheck){n(t.getWrapperElement).find(".sp-error").css("color","black");return}var c=o.svg.getElement(s.warning);i.possibleCurrent&&i.possibleCurrent.length>0&&e("./tooltip")(t,c,function(){var e=[];i.possibleCurrent.forEach(function(t){e.push("<strong style='text-decoration:underline'>"+n("<div/>").text(t).html()+"</strong>")});return"This line is invalid. Expected: "+e.join(", ")});c.style.marginTop="2px";c.style.marginLeft="2px";c.className="parseErrorIcon";t.setGutterMarker(a,"gutterErrorBar",c);t.queryValid=!1;break}}t.prevQueryValid=t.queryValid;if(r&&null!=i&&void 0!=i.stack){var p=i.stack,d=i.stack.length;d>1?t.queryValid=!1:1==d&&"solutionModifier"!=p[0]&&"?limitOffsetClauses"!=p[0]&&"?offsetClause"!=p[0]&&(t.queryValid=!1)}};n.extend(a,r);a.Autocompleters={};a.registerAutocompleter=function(e,t){a.Autocompleters[e]=t;c(a.defaults,e)};a.autoComplete=function(e){e.autocompleters.autoComplete(!1)};a.registerAutocompleter("prefixes",e("./autocompleters/prefixes.js"));a.registerAutocompleter("properties",e("./autocompleters/properties.js"));a.registerAutocompleter("classes",e("./autocompleters/classes.js"));a.registerAutocompleter("variables",e("./autocompleters/variables.js"));a.positionButtons=function(e){var t=n(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),r=0;t.is(":visible")&&(r=t.outerWidth());e.buttons.is(":visible")&&e.buttons.css("right",r+6)};a.createShareLink=function(e){var t=n.deparam(window.location.search.substring(1));t.query=e.getValue();return t};a.consumeShareLink=function(e,t){t.query&&e.setValue(t.query)};a.drawButtons=function(e){e.buttons=n("<div class='yasqe_buttons'></div>").appendTo(n(e.getWrapperElement()));if(e.options.createShareLink){var t=n(o.svg.getElement(s.share));t.click(function(r){r.stopPropagation();var i=n("<div class='yasqe_sharePopup'></div>").appendTo(e.buttons);n("html").click(function(){i&&i.remove()});i.click(function(e){e.stopPropagation()});var o=n("<textarea></textarea>").val(location.protocol+"//"+location.host+location.pathname+"?"+n.param(e.options.createShareLink(e)));o.focus(function(){var e=n(this);e.select();e.mouseup(function(){e.unbind("mouseup");return!1})});i.empty().append(o);var s=t.position();i.css("top",s.top+t.outerHeight()+"px").css("left",s.left+t.outerWidth()-i.outerWidth()+"px")}).addClass("yasqe_share").attr("title","Share your query").appendTo(e.buttons)}var r=n("<div>",{"class":"fullscreenToggleBtns"}).append(n(o.svg.getElement(s.fullscreen)).addClass("yasqe_fullscreenBtn").attr("title","Set editor full screen").click(function(){e.setOption("fullScreen",!0)})).append(n(o.svg.getElement(s.smallscreen)).addClass("yasqe_smallscreenBtn").attr("title","Set editor to normale size").click(function(){e.setOption("fullScreen",!1)}));e.buttons.append(r);if(e.options.sparql.showQueryButton){n("<div>",{"class":"yasqe_queryButton"}).click(function(){if(n(this).hasClass("query_busy")){e.xhr&&e.xhr.abort();a.updateQueryButton(e)}else e.query()}).appendTo(e.buttons);a.updateQueryButton(e)}};var g={busy:"loader",valid:"query",error:"queryInvalid"};a.updateQueryButton=function(e,t){var r=n(e.getWrapperElement()).find(".yasqe_queryButton");if(0!=r.length){if(!t){t="valid";e.queryValid===!1&&(t="error")}if(t!=e.queryStatus&&("busy"==t||"valid"==t||"error"==t)){r.empty().removeClass(function(e,t){return t.split(" ").filter(function(e){return 0==e.indexOf("query_")}).join(" ")}).addClass("query_"+t);o.svg.draw(r,s[g[t]]);e.queryStatus=t}}};a.fromTextArea=function(e,t){t=l(t);var i=(n("<div>",{"class":"yasqe"}).insertBefore(n(e)).append(n(e)),u(r.fromTextArea(e,t)));d(i);return i};a.storeQuery=function(e){var t=i.getPersistencyId(e,e.options.persistent);t&&o.storage.set(t,e.getValue(),"month")};a.commentLines=function(e){for(var t=e.getCursor(!0).line,n=e.getCursor(!1).line,r=Math.min(t,n),i=Math.max(t,n),o=!0,s=r;i>=s;s++){var a=e.getLine(s);if(0==a.length||"#"!=a.substring(0,1)){o=!1;break}}for(var s=r;i>=s;s++)o?e.replaceRange("",{line:s,ch:0},{line:s,ch:1}):e.replaceRange("#",{line:s,ch:0})};a.copyLineUp=function(e){var t=e.getCursor(),n=e.lineCount();e.replaceRange("\n",{line:n-1,ch:e.getLine(n-1).length});for(var r=n;r>t.line;r--){var i=e.getLine(r-1);e.replaceRange(i,{line:r,ch:0},{line:r,ch:e.getLine(r).length})}};a.copyLineDown=function(e){a.copyLineUp(e);var t=e.getCursor();t.line++;e.setCursor(t)};a.doAutoFormat=function(e){if(e.somethingSelected()){var t={line:e.getCursor(!1).line,ch:e.getSelection().length};m(e,e.getCursor(!0),t)}else{var n=e.lineCount(),r=e.getTextArea().value.length;m(e,{line:0,ch:0},{line:n,ch:r})}};var m=function(e,t,n){var r=e.indexFromPos(t),i=e.indexFromPos(n),o=v(e.getValue(),r,i);e.operation(function(){e.replaceRange(o,t,n);for(var i=e.posFromIndex(r).line,s=e.posFromIndex(r+o.length).line,a=i;s>=a;a++)e.indentLine(a,"smart")})},v=function(e,t,i){e=e.substring(t,i);var o=[["keyword","ws","prefixed","ws","uri"],["keyword","ws","uri"]],s=["{",".",";"],a=["}"],l=function(e){for(var t=0;t<o.length;t++)if(p.valueOf().toString()==o[t].valueOf().toString())return 1;for(var t=0;t<s.length;t++)if(e==s[t])return 1;for(var t=0;t<a.length;t++)if(""!=n.trim(c)&&e==a[t])return-1;return 0},u="",c="",p=[];r.runMode(e,"sparql11",function(e,t){p.push(t);var n=l(e,t);if(0!=n){if(1==n){u+=e+"\n";c=""}else{u+="\n"+e;c=e}p=[]}else{c+=e;u+=e}1==p.length&&"sp-ws"==p[0]&&(p=[])});return n.trim(u.replace(/\n\s*\n/g,"\n"))};e("./sparql.js"),e("./defaults.js");a.version={CodeMirror:r.version,YASQE:e("../package.json").version,jquery:n.fn.jquery,"yasgui-utils":o.version}},{"../lib/deparam.js":13,"../lib/flint.js":14,"../package.json":32,"./autocompleters/autocompleterBase.js":33,"./autocompleters/classes.js":34,"./autocompleters/prefixes.js":35,"./autocompleters/properties.js":36,"./autocompleters/variables.js":38,"./defaults.js":39,"./imgs.js":40,"./prefixUtils.js":42,"./sparql.js":43,"./tokenUtils.js":44,"./tooltip":45,"./utils.js":46,codemirror:25,"codemirror/addon/display/fullscreen.js":16,"codemirror/addon/edit/matchbrackets.js":17,"codemirror/addon/fold/brace-fold.js":18,"codemirror/addon/fold/foldcode.js":19,"codemirror/addon/fold/foldgutter.js":20,"codemirror/addon/fold/xml-fold.js":21,"codemirror/addon/hint/show-hint.js":22,"codemirror/addon/runmode/runmode.js":23,"codemirror/addon/search/searchcursor.js":24,jquery:26,"yasgui-utils":29}],42:[function(e,t){"use strict";var n=function(e,t){var n=e.getPrefixesFromQuery();if("string"==typeof t)r(e,t);else for(var i in t)i in n||r(e,i+": <"+t[i]+">")},r=function(e,t){for(var n=null,r=0,i=e.lineCount(),o=0;i>o;o++){var a=e.getNextNonWsToken(o);if(null!=a&&("PREFIX"==a.string||"BASE"==a.string)){n=a;r=o}}if(null==n)e.replaceRange("PREFIX "+t+"\n",{line:0,ch:0});else{var l=s(e,r);e.replaceRange("\n"+l+"PREFIX "+t,{line:r})}},i=function(e,t){var n=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};for(var r in t)e.setValue(e.getValue().replace(new RegExp("PREFIX\\s*"+r+":\\s*"+n("<"+t[r]+">")+"\\s*","ig"),""))},o=function(e){for(var t={},n=!0,r=function(i,s){if(n){s||(s=1);var a=e.getNextNonWsToken(o,s);if(a){-1==a.state.possibleCurrent.indexOf("PREFIX")&&-1==a.state.possibleNext.indexOf("PREFIX")&&(n=!1);if("PREFIX"==a.string.toUpperCase()){var l=e.getNextNonWsToken(o,a.end+1);if(l){var u=e.getNextNonWsToken(o,l.end+1);if(u){var c=u.string;0==c.indexOf("<")&&(c=c.substring(1));">"==c.slice(-1)&&(c=c.substring(0,c.length-1));t[l.string.slice(0,-1)]=c;r(i,u.end+1)}else r(i,l.end+1)}else r(i,a.end+1)}else r(i,a.end+1)}}},i=e.lineCount(),o=0;i>o&&n;o++)r(o);return t},s=function(e,t,n){void 0==n&&(n=1);var r=e.getTokenAt({line:t,ch:n});return null==r||void 0==r||"ws"!=r.type?"":r.string+s(e,t,r.end+1)};t.exports={addPrefixes:n,getPrefixesFromQuery:o,removePrefixes:i}},{}],43:[function(e){"use strict";var t=e("jquery"),n=e("./main.js");n.executeQuery=function(e,i){var o="function"==typeof i?i:null,s="object"==typeof i?i:{};e.options.sparql&&(s=t.extend({},e.options.sparql,s));s.handlers&&t.extend(!0,s.callbacks,s.handlers);if(s.endpoint&&0!=s.endpoint.length){var a={url:"function"==typeof s.endpoint?s.endpoint(e):s.endpoint,type:"function"==typeof s.requestMethod?s.requestMethod(e):s.requestMethod,headers:{Accept:r(e,s)}},l=!1;if(s.callbacks)for(var u in s.callbacks)if(s.callbacks[u]){l=!0;a[u]=s.callbacks[u]}a.data=e.getUrlArguments(e,s);if(l||o){o&&(a.complete=o);s.headers&&!t.isEmptyObject(s.headers)&&t.extend(a.headers,s.headers);n.updateQueryButton(e,"busy");var c=function(){n.updateQueryButton(e)};a.complete=a.complete?[c,a.complete]:c;e.xhr=t.ajax(a)}}};n.getUrlArguments=function(e,n){var r=e.getQueryMode(),i=[{name:"query",value:e.getValue()}];if(n.namedGraphs&&n.namedGraphs.length>0)for(var o="query"==r?"named-graph-uri":"using-named-graph-uri ",s=0;s<n.namedGraphs.length;s++)i.push({name:o,value:n.namedGraphs[s]});if(n.defaultGraphs&&n.defaultGraphs.length>0)for(var o="query"==r?"default-graph-uri":"using-graph-uri ",s=0;s<n.defaultGraphs.length;s++)i.push({name:o,value:n.defaultGraphs[s]});n.args&&n.args.length>0&&t.merge(i,n.args);return i};var r=function(e,t){var n=null;if(!t.acceptHeader||t.acceptHeaderGraph||t.acceptHeaderSelect||t.acceptHeaderUpdate)if("update"==e.getQueryMode())n="function"==typeof t.acceptHeader?t.acceptHeaderUpdate(e):t.acceptHeaderUpdate;else{var r=e.getQueryType();n="DESCRIBE"==r||"CONSTRUCT"==r?"function"==typeof t.acceptHeaderGraph?t.acceptHeaderGraph(e):t.acceptHeaderGraph:"function"==typeof t.acceptHeaderSelect?t.acceptHeaderSelect(e):t.acceptHeaderSelect}else n="function"==typeof t.acceptHeader?t.acceptHeader(e):t.acceptHeader;return n}},{"./main.js":41,jquery:26}],44:[function(e,t){"use strict";var n=function(e,t,r){r||(r=e.getCursor());t||(t=e.getTokenAt(r));var i=e.getTokenAt({line:r.line,ch:t.start});if(null!=i.type&&"ws"!=i.type&&null!=t.type&&"ws"!=t.type){t.start=i.start;t.string=i.string+t.string;return n(e,t,{line:r.line,ch:i.start})}if(null!=t.type&&"ws"==t.type){t.start=t.start+1;t.string=t.string.substring(1);return t}return t},r=function(e,t,n){var i=e.getTokenAt({line:t,ch:n.start});null!=i&&"ws"==i.type&&(i=r(e,t,i));return i},i=function(e,t,n){void 0==n&&(n=1);var r=e.getTokenAt({line:t,ch:n});return null==r||void 0==r||r.end<n?null:"ws"==r.type?i(e,t,r.end+1):r};t.exports={getPreviousNonWsToken:r,getCompleteToken:n,getNextNonWsToken:i}},{}],45:[function(e,t){"use strict";{var n=e("jquery");e("./utils.js")}t.exports=function(e,t,r){var i,t=n(t);t.hover(function(){"function"==typeof r&&(r=r());i=n("<div>").addClass("yasqe_tooltip").html(r).appendTo(t);o()},function(){n(".yasqe_tooltip").remove()});var o=function(){if(n(e.getWrapperElement()).offset().top>=i.offset().top){i.css("bottom","auto");i.css("top","26px")}}}},{"./utils.js":46,jquery:26}],46:[function(e,t){"use strict";var n=e("jquery"),r=function(e,t){var n=!1;try{void 0!==e[t]&&(n=!0)}catch(r){}return n},i=function(e,t){var n=null;t&&(n="string"==typeof t?t:t(e));return n},o=function(){function e(e){var t,r,i;t=n(e).offset();r=n(e).width();i=n(e).height();return[[t.left,t.left+r],[t.top,t.top+i]]}function t(e,t){var n,r;n=e[0]<t[0]?e:t;r=e[0]<t[0]?t:e;return n[1]>r[0]||n[0]===r[0]}return function(n,r){var i=e(n),o=e(r);return t(i[0],o[0])&&t(i[1],o[1])}}();t.exports={keyExists:r,getPersistencyId:i,elementsOverlap:o}},{jquery:26}],47:[function(t,n,r){(function(n,i,o){(function(n){"use strict";"function"==typeof e&&e.amd?e("datatables",["jquery"],n):"object"==typeof r?n(t("jquery")):jQuery&&!jQuery.fn.dataTable&&n(jQuery)})(function(e){"use strict";function t(n){var r,i,o="a aa ai ao as b fn i m o s ",s={};e.each(n,function(e){r=e.match(/^([^A-Z]+?)([A-Z])/);if(r&&-1!==o.indexOf(r[1]+" ")){i=e.replace(r[0],r[2].toLowerCase());s[i]=e;"o"===r[1]&&t(n[e])}});n._hungarianMap=s}function r(n,i,s){n._hungarianMap||t(n);var a;e.each(i,function(t){a=n._hungarianMap[t];if(a!==o&&(s||i[a]===o))if("o"===a.charAt(0)){i[a]||(i[a]={});e.extend(!0,i[a],i[t]);r(n[a],i[a],s)}else i[a]=i[t]})}function s(e){var t=Xt.defaults.oLanguage,n=e.sZeroRecords;!e.sEmptyTable&&n&&"No data available in table"===t.sEmptyTable&&Mt(e,e,"sZeroRecords","sEmptyTable");!e.sLoadingRecords&&n&&"Loading..."===t.sLoadingRecords&&Mt(e,e,"sZeroRecords","sLoadingRecords");e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var r=e.sDecimal;r&&zt(r)}function a(e){En(e,"ordering","bSort");En(e,"orderMulti","bSortMulti");En(e,"orderClasses","bSortClasses");En(e,"orderCellsTop","bSortCellsTop");En(e,"order","aaSorting");En(e,"orderFixed","aaSortingFixed");En(e,"paging","bPaginate");En(e,"pagingType","sPaginationType");En(e,"pageLength","iDisplayLength");En(e,"searching","bFilter");var t=e.aoSearchCols;if(t)for(var n=0,i=t.length;i>n;n++)t[n]&&r(Xt.models.oSearch,t[n])}function l(e){En(e,"orderable","bSortable");En(e,"orderData","aDataSort");En(e,"orderSequence","asSorting");En(e,"orderDataType","sortDataType")}function u(t){var n=t.oBrowser,r=e("<div/>").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(e("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(e('<div class="test"/>').css({width:"100%",height:10}))).appendTo("body"),i=r.find(".test");n.bScrollOversize=100===i[0].offsetWidth;n.bScrollbarLeft=1!==i.offset().left;r.remove()}function c(e,t,n,r,i,s){var a,l=r,u=!1;if(n!==o){a=n;u=!0}for(;l!==i;)if(e.hasOwnProperty(l)){a=u?t(a,e[l],l,e):e[l];u=!0;l+=s}return a}function p(t,n){var r=Xt.defaults.column,o=t.aoColumns.length,s=e.extend({},Xt.models.oColumn,r,{nTh:n?n:i.createElement("th"),sTitle:r.sTitle?r.sTitle:n?n.innerHTML:"",aDataSort:r.aDataSort?r.aDataSort:[o],mData:r.mData?r.mData:o,idx:o});t.aoColumns.push(s);var a=t.aoPreSearchCols;a[o]=e.extend({},Xt.models.oSearch,a[o]);d(t,o,null)}function d(t,n,i){var s=t.aoColumns[n],a=t.oClasses,u=e(s.nTh);if(!s.sWidthOrig){s.sWidthOrig=u.attr("width")||null;var c=(u.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);c&&(s.sWidthOrig=c[1])}if(i!==o&&null!==i){l(i);r(Xt.defaults.column,i);i.mDataProp===o||i.mData||(i.mData=i.mDataProp);i.sType&&(s._sManualType=i.sType);i.className&&!i.sClass&&(i.sClass=i.className);e.extend(s,i);Mt(s,i,"sWidth","sWidthOrig");"number"==typeof i.iDataSort&&(s.aDataSort=[i.iDataSort]);Mt(s,i,"aDataSort")}var p=s.mData,d=A(p),f=s.mRender?A(s.mRender):null,h=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};s._bAttrSrc=e.isPlainObject(p)&&(h(p.sort)||h(p.type)||h(p.filter));s.fnGetData=function(e,t,n){var r=d(e,t,o,n);return f&&t?f(r,t,e,n):r};s.fnSetData=function(e,t,n){return I(p)(e,t,n)};if(!t.oFeatures.bSort){s.bSortable=!1;u.addClass(a.sSortableNone)}var g=-1!==e.inArray("asc",s.asSorting),m=-1!==e.inArray("desc",s.asSorting);if(s.bSortable&&(g||m))if(g&&!m){s.sSortingClass=a.sSortableAsc;s.sSortingClassJUI=a.sSortJUIAscAllowed}else if(!g&&m){s.sSortingClass=a.sSortableDesc;s.sSortingClassJUI=a.sSortJUIDescAllowed}else{s.sSortingClass=a.sSortable;s.sSortingClassJUI=a.sSortJUI}else{s.sSortingClass=a.sSortableNone;s.sSortingClassJUI=""}}function f(e){if(e.oFeatures.bAutoWidth!==!1){var t=e.aoColumns;Et(e);for(var n=0,r=t.length;r>n;n++)t[n].nTh.style.width=t[n].sWidth}var i=e.oScroll;(""!==i.sY||""!==i.sX)&&mt(e);Ut(e,null,"column-sizing",[e])}function h(e,t){var n=v(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function g(t,n){var r=v(t,"bVisible"),i=e.inArray(n,r);return-1!==i?i:null}function m(e){return v(e,"bVisible").length}function v(t,n){var r=[];e.map(t.aoColumns,function(e,t){e[n]&&r.push(t)});return r}function E(e){var t,n,r,i,s,a,l,u,c,p=e.aoColumns,d=e.aoData,f=Xt.ext.type.detect;for(t=0,n=p.length;n>t;t++){l=p[t];c=[];if(!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(r=0,i=f.length;i>r;r++){for(s=0,a=d.length;a>s;s++){c[s]===o&&(c[s]=N(e,s,t,"type"));u=f[r](c[s],e);if(!u||"html"===u)break}if(u){l.sType=u;break}}l.sType||(l.sType="string")}}}function y(t,n,r,i){var s,a,l,u,c,d,f,h=t.aoColumns;if(n)for(s=n.length-1;s>=0;s--){f=n[s];var g=f.targets!==o?f.targets:f.aTargets;e.isArray(g)||(g=[g]);for(l=0,u=g.length;u>l;l++)if("number"==typeof g[l]&&g[l]>=0){for(;h.length<=g[l];)p(t);i(g[l],f)}else if("number"==typeof g[l]&&g[l]<0)i(h.length+g[l],f);else if("string"==typeof g[l])for(c=0,d=h.length;d>c;c++)("_all"==g[l]||e(h[c].nTh).hasClass(g[l]))&&i(c,f)}if(r)for(s=0,a=r.length;a>s;s++)i(s,r[s])}function x(t,n,r,i){var o=t.aoData.length,s=e.extend(!0,{},Xt.models.oRow,{src:r?"dom":"data"});s._aData=n;t.aoData.push(s);for(var a=t.aoColumns,l=0,u=a.length;u>l;l++){r&&C(t,o,l,N(t,o,l));a[l].sType=null}t.aiDisplayMaster.push(o);(r||!t.oFeatures.bDeferRender)&&k(t,o,r,i);return o}function b(t,n){var r;n instanceof e||(n=e(n));return n.map(function(e,n){r=D(t,n);return x(t,r.data,n,r.cells)})}function T(e,t){return t._DT_RowIndex!==o?t._DT_RowIndex:null}function S(t,n,r){return e.inArray(r,t.aoData[n].anCells)}function N(e,t,n,r){var i=e.iDraw,s=e.aoColumns[n],a=e.aoData[t]._aData,l=s.sDefaultContent,u=s.fnGetData(a,r,{settings:e,row:t,col:n});if(u===o){if(e.iDrawError!=i&&null===l){Pt(e,0,"Requested unknown parameter "+("function"==typeof s.mData?"{function}":"'"+s.mData+"'")+" for row "+t,4);e.iDrawError=i}return l}if(u!==a&&null!==u||null===l){if("function"==typeof u)return u.call(a)}else u=l;return null===u&&"display"==r?"":u}function C(e,t,n,r){var i=e.aoColumns[n],o=e.aoData[t]._aData;i.fnSetData(o,r,{settings:e,row:t,col:n})}function L(t){return e.map(t.match(/(\\.|[^\.])+/g),function(e){return e.replace(/\\./g,".")})}function A(t){if(e.isPlainObject(t)){var n={};e.each(t,function(e,t){t&&(n[e]=A(t))});return function(e,t,r,i){var s=n[t]||n._;return s!==o?s(e,t,r,i):e}}if(null===t)return function(e){return e};if("function"==typeof t)return function(e,n,r,i){return t(e,n,r,i)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e){return e[t]};var r=function(e,t,n){var i,s,a,l;if(""!==n)for(var u=L(n),c=0,p=u.length;p>c;c++){i=u[c].match(yn);s=u[c].match(xn);if(i){u[c]=u[c].replace(yn,"");""!==u[c]&&(e=e[u[c]]);a=[];u.splice(0,c+1);l=u.join(".");for(var d=0,f=e.length;f>d;d++)a.push(r(e[d],t,l));var h=i[0].substring(1,i[0].length-1);e=""===h?a:a.join(h);break}if(s){u[c]=u[c].replace(xn,"");e=e[u[c]]()}else{if(null===e||e[u[c]]===o)return o;e=e[u[c]]}}return e};return function(e,n){return r(e,n,t)}}function I(t){if(e.isPlainObject(t))return I(t._);if(null===t)return function(){};if("function"==typeof t)return function(e,n,r){t(e,"set",n,r)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){e[t]=n};var n=function(e,t,r){for(var i,s,a,l,u,c=L(r),p=c[c.length-1],d=0,f=c.length-1;f>d;d++){s=c[d].match(yn);a=c[d].match(xn);if(s){c[d]=c[d].replace(yn,"");e[c[d]]=[];i=c.slice();i.splice(0,d+1);u=i.join(".");for(var h=0,g=t.length;g>h;h++){l={};n(l,t[h],u);e[c[d]].push(l)}return}if(a){c[d]=c[d].replace(xn,"");e=e[c[d]](t)}(null===e[c[d]]||e[c[d]]===o)&&(e[c[d]]={});e=e[c[d]]}p.match(xn)?e=e[p.replace(xn,"")](t):e[p.replace(yn,"")]=t};return function(e,r){return n(e,r,t)}}function w(e){return fn(e.aoData,"_aData")}function R(e){e.aoData.length=0;e.aiDisplayMaster.length=0;e.aiDisplay.length=0}function O(e,t,n){for(var r=-1,i=0,s=e.length;s>i;i++)e[i]==t?r=i:e[i]>t&&e[i]--;-1!=r&&n===o&&e.splice(r,1)}function _(e,t,n,r){var i,s,a=e.aoData[t];if("dom"!==n&&(n&&"auto"!==n||"dom"!==a.src)){var l,u=a.anCells;if(u)for(i=0,s=u.length;s>i;i++){l=u[i];for(;l.childNodes.length;)l.removeChild(l.firstChild);u[i].innerHTML=N(e,t,i,"display")}}else a._aData=D(e,a).data;a._aSortData=null;a._aFilterData=null;var c=e.aoColumns;if(r!==o)c[r].sType=null;else for(i=0,s=c.length;s>i;i++)c[i].sType=null;F(a)}function D(t,n){var r,i,o,s,a=[],l=[],u=n.firstChild,c=0,p=t.aoColumns,d=function(e,t,n){if("string"==typeof e){var r=e.indexOf("@");if(-1!==r){var i=e.substring(r+1);o["@"+i]=n.getAttribute(i)}}},f=function(t){i=p[c];s=e.trim(t.innerHTML);if(i&&i._bAttrSrc){o={display:s};d(i.mData.sort,o,t);d(i.mData.type,o,t);d(i.mData.filter,o,t);a.push(o)}else a.push(s);c++};if(u)for(;u;){r=u.nodeName.toUpperCase();if("TD"==r||"TH"==r){f(u);l.push(u)}u=u.nextSibling}else{l=n.anCells;for(var h=0,g=l.length;g>h;h++)f(l[h])}return{data:a,cells:l}}function k(e,t,n,r){var o,s,a,l,u,c=e.aoData[t],p=c._aData,d=[];if(null===c.nTr){o=n||i.createElement("tr");c.nTr=o;c.anCells=d;o._DT_RowIndex=t;F(c);for(l=0,u=e.aoColumns.length;u>l;l++){a=e.aoColumns[l];s=n?r[l]:i.createElement(a.sCellType);d.push(s);(!n||a.mRender||a.mData!==l)&&(s.innerHTML=N(e,t,l,"display"));a.sClass&&(s.className+=" "+a.sClass);a.bVisible&&!n?o.appendChild(s):!a.bVisible&&n&&s.parentNode.removeChild(s);a.fnCreatedCell&&a.fnCreatedCell.call(e.oInstance,s,N(e,t,l),p,t,l)}Ut(e,"aoRowCreatedCallback",null,[o,p,t])}c.nTr.setAttribute("role","row")}function F(t){var n=t.nTr,r=t._aData;if(n){r.DT_RowId&&(n.id=r.DT_RowId);if(r.DT_RowClass){var i=r.DT_RowClass.split(" ");t.__rowc=t.__rowc?vn(t.__rowc.concat(i)):i;e(n).removeClass(t.__rowc.join(" ")).addClass(r.DT_RowClass)}r.DT_RowData&&e(n).data(r.DT_RowData)}}function P(t){var n,r,i,o,s,a=t.nTHead,l=t.nTFoot,u=0===e("th, td",a).length,c=t.oClasses,p=t.aoColumns;u&&(o=e("<tr/>").appendTo(a));for(n=0,r=p.length;r>n;n++){s=p[n];i=e(s.nTh).addClass(s.sClass);u&&i.appendTo(o);if(t.oFeatures.bSort){i.addClass(s.sSortingClass);if(s.bSortable!==!1){i.attr("tabindex",t.iTabIndex).attr("aria-controls",t.sTableId);Rt(t,s.nTh,n)}}s.sTitle!=i.html()&&i.html(s.sTitle);Ht(t,"header")(t,i,s,c)}u&&U(t.aoHeader,a);e(a).find(">tr").attr("role","row");e(a).find(">tr>th, >tr>td").addClass(c.sHeaderTH);e(l).find(">tr>th, >tr>td").addClass(c.sFooterTH);if(null!==l){var d=t.aoFooter[0];for(n=0,r=d.length;r>n;n++){s=p[n];s.nTf=d[n].cell;s.sClass&&e(s.nTf).addClass(s.sClass)}}}function M(t,n,r){var i,s,a,l,u,c,p,d,f,h=[],g=[],m=t.aoColumns.length;if(n){r===o&&(r=!1);for(i=0,s=n.length;s>i;i++){h[i]=n[i].slice();h[i].nTr=n[i].nTr;for(a=m-1;a>=0;a--)t.aoColumns[a].bVisible||r||h[i].splice(a,1);g.push([])}for(i=0,s=h.length;s>i;i++){p=h[i].nTr;if(p)for(;c=p.firstChild;)p.removeChild(c);for(a=0,l=h[i].length;l>a;a++){d=1;f=1;if(g[i][a]===o){p.appendChild(h[i][a].cell);g[i][a]=1;for(;h[i+d]!==o&&h[i][a].cell==h[i+d][a].cell;){g[i+d][a]=1;d++}for(;h[i][a+f]!==o&&h[i][a].cell==h[i][a+f].cell;){for(u=0;d>u;u++)g[i+u][a+f]=1;f++}e(h[i][a].cell).attr("rowspan",d).attr("colspan",f)}}}}}function j(t){var n=Ut(t,"aoPreDrawCallback","preDraw",[t]);if(-1===e.inArray(!1,n)){var r=[],i=0,s=t.asStripeClasses,a=s.length,l=(t.aoOpenRows.length,t.oLanguage),u=t.iInitDisplayStart,c="ssp"==Vt(t),p=t.aiDisplay;t.bDrawing=!0;if(u!==o&&-1!==u){t._iDisplayStart=c?u:u>=t.fnRecordsDisplay()?0:u;t.iInitDisplayStart=-1}var d=t._iDisplayStart,f=t.fnDisplayEnd();if(t.bDeferLoading){t.bDeferLoading=!1;t.iDraw++;ht(t,!1)}else if(c){if(!t.bDestroying&&!V(t))return}else t.iDraw++;if(0!==p.length)for(var h=c?0:d,g=c?t.aoData.length:f,v=h;g>v;v++){var E=p[v],y=t.aoData[E];null===y.nTr&&k(t,E);var x=y.nTr;if(0!==a){var b=s[i%a];if(y._sRowStripe!=b){e(x).removeClass(y._sRowStripe).addClass(b);y._sRowStripe=b}}Ut(t,"aoRowCallback",null,[x,y._aData,i,v]);r.push(x);i++}else{var T=l.sZeroRecords;1==t.iDraw&&"ajax"==Vt(t)?T=l.sLoadingRecords:l.sEmptyTable&&0===t.fnRecordsTotal()&&(T=l.sEmptyTable);r[0]=e("<tr/>",{"class":a?s[0]:""}).append(e("<td />",{valign:"top",colSpan:m(t),"class":t.oClasses.sRowEmpty}).html(T))[0]}Ut(t,"aoHeaderCallback","header",[e(t.nTHead).children("tr")[0],w(t),d,f,p]);Ut(t,"aoFooterCallback","footer",[e(t.nTFoot).children("tr")[0],w(t),d,f,p]);var S=e(t.nTBody);S.children().detach();S.append(e(r));Ut(t,"aoDrawCallback","draw",[t]);t.bSorted=!1;t.bFiltered=!1;t.bDrawing=!1}else ht(t,!1)}function G(e,t){var n=e.oFeatures,r=n.bSort,i=n.bFilter;r&&At(e);i?K(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice();t!==!0&&(e._iDisplayStart=0);e._drawHold=t;j(e);e._drawHold=!1}function B(t){var n=t.oClasses,r=e(t.nTable),i=e("<div/>").insertBefore(r),o=t.oFeatures,s=e("<div/>",{id:t.sTableId+"_wrapper","class":n.sWrapper+(t.nTFoot?"":" "+n.sNoFooter)});t.nHolding=i[0];t.nTableWrapper=s[0];t.nTableReinsertBefore=t.nTable.nextSibling;for(var a,l,u,c,p,d,f=t.sDom.split(""),h=0;h<f.length;h++){a=null;l=f[h];if("<"==l){u=e("<div/>")[0];c=f[h+1];if("'"==c||'"'==c){p="";d=2;for(;f[h+d]!=c;){p+=f[h+d];d++}"H"==p?p=n.sJUIHeader:"F"==p&&(p=n.sJUIFooter);if(-1!=p.indexOf(".")){var g=p.split(".");u.id=g[0].substr(1,g[0].length-1);u.className=g[1]}else"#"==p.charAt(0)?u.id=p.substr(1,p.length-1):u.className=p;h+=d}s.append(u);s=e(u)}else if(">"==l)s=s.parent();else if("l"==l&&o.bPaginate&&o.bLengthChange)a=ct(t);else if("f"==l&&o.bFilter)a=X(t);else if("r"==l&&o.bProcessing)a=ft(t);else if("t"==l)a=gt(t);else if("i"==l&&o.bInfo)a=it(t);else if("p"==l&&o.bPaginate)a=pt(t);else if(0!==Xt.ext.feature.length)for(var m=Xt.ext.feature,v=0,E=m.length;E>v;v++)if(l==m[v].cFeature){a=m[v].fnInit(t);break}if(a){var y=t.aanFeatures;y[l]||(y[l]=[]);y[l].push(a);s.append(a)}}i.replaceWith(s)}function U(t,n){var r,i,o,s,a,l,u,c,p,d,f,h=e(n).children("tr"),g=function(e,t,n){for(var r=e[t];r[n];)n++;return n};t.splice(0,t.length);for(o=0,l=h.length;l>o;o++)t.push([]);for(o=0,l=h.length;l>o;o++){r=h[o];c=0;i=r.firstChild;for(;i;){if("TD"==i.nodeName.toUpperCase()||"TH"==i.nodeName.toUpperCase()){p=1*i.getAttribute("colspan");d=1*i.getAttribute("rowspan");p=p&&0!==p&&1!==p?p:1;d=d&&0!==d&&1!==d?d:1;u=g(t,o,c);f=1===p?!0:!1;for(a=0;p>a;a++)for(s=0;d>s;s++){t[o+s][u+a]={cell:i,unique:f};t[o+s].nTr=r}}i=i.nextSibling}}}function q(e,t,n){var r=[];if(!n){n=e.aoHeader;if(t){n=[];U(n,t)}}for(var i=0,o=n.length;o>i;i++)for(var s=0,a=n[i].length;a>s;s++)!n[i][s].unique||r[s]&&e.bSortCellsTop||(r[s]=n[i][s].cell);return r}function H(t,n,r){Ut(t,"aoServerParams","serverParams",[n]);if(n&&e.isArray(n)){var i={},o=/(.*?)\[\]$/;e.each(n,function(e,t){var n=t.name.match(o);if(n){var r=n[0];i[r]||(i[r]=[]);i[r].push(t.value)}else i[t.name]=t.value});n=i}var s,a=t.ajax,l=t.oInstance;if(e.isPlainObject(a)&&a.data){s=a.data;var u=e.isFunction(s)?s(n):s;n=e.isFunction(s)&&u?u:e.extend(!0,n,u);delete a.data}var c={data:n,success:function(e){var n=e.error||e.sError;n&&t.oApi._fnLog(t,0,n);t.json=e;Ut(t,null,"xhr",[t,e]);r(e)},dataType:"json",cache:!1,type:t.sServerMethod,error:function(e,n){var r=t.oApi._fnLog;"parsererror"==n?r(t,0,"Invalid JSON response",1):4===e.readyState&&r(t,0,"Ajax error",7);ht(t,!1)}};t.oAjaxData=n;Ut(t,null,"preXhr",[t,n]);if(t.fnServerData)t.fnServerData.call(l,t.sAjaxSource,e.map(n,function(e,t){return{name:t,value:e}}),r,t);else if(t.sAjaxSource||"string"==typeof a)t.jqXHR=e.ajax(e.extend(c,{url:a||t.sAjaxSource}));else if(e.isFunction(a))t.jqXHR=a.call(l,n,r,t);else{t.jqXHR=e.ajax(e.extend(c,a));a.data=s}}function V(e){if(e.bAjaxDataGet){e.iDraw++;ht(e,!0);H(e,W(e),function(t){z(e,t)});return!1}return!0}function W(t){var n,r,i,o,s=t.aoColumns,a=s.length,l=t.oFeatures,u=t.oPreviousSearch,c=t.aoPreSearchCols,p=[],d=Lt(t),f=t._iDisplayStart,h=l.bPaginate!==!1?t._iDisplayLength:-1,g=function(e,t){p.push({name:e,value:t})};g("sEcho",t.iDraw);g("iColumns",a);g("sColumns",fn(s,"sName").join(","));g("iDisplayStart",f);g("iDisplayLength",h);var m={draw:t.iDraw,columns:[],order:[],start:f,length:h,search:{value:u.sSearch,regex:u.bRegex}};for(n=0;a>n;n++){i=s[n];o=c[n];r="function"==typeof i.mData?"function":i.mData;m.columns.push({data:r,name:i.sName,searchable:i.bSearchable,orderable:i.bSortable,search:{value:o.sSearch,regex:o.bRegex}});g("mDataProp_"+n,r);if(l.bFilter){g("sSearch_"+n,o.sSearch);g("bRegex_"+n,o.bRegex);g("bSearchable_"+n,i.bSearchable)}l.bSort&&g("bSortable_"+n,i.bSortable)}if(l.bFilter){g("sSearch",u.sSearch);g("bRegex",u.bRegex)}if(l.bSort){e.each(d,function(e,t){m.order.push({column:t.col,dir:t.dir});g("iSortCol_"+e,t.col);g("sSortDir_"+e,t.dir)});g("iSortingCols",d.length)}var v=Xt.ext.legacy.ajax;return null===v?t.sAjaxSource?p:m:v?p:m}function z(e,t){var n=function(e,n){return t[e]!==o?t[e]:t[n]},r=n("sEcho","draw"),i=n("iTotalRecords","recordsTotal"),s=n("iTotalDisplayRecords","recordsFiltered");if(r){if(1*r<e.iDraw)return;e.iDraw=1*r}R(e);e._iRecordsTotal=parseInt(i,10);e._iRecordsDisplay=parseInt(s,10);for(var a=$(e,t),l=0,u=a.length;u>l;l++)x(e,a[l]);e.aiDisplay=e.aiDisplayMaster.slice();e.bAjaxDataGet=!1;j(e);e._bInitComplete||lt(e,t);e.bAjaxDataGet=!0;ht(e,!1)}function $(t,n){var r=e.isPlainObject(t.ajax)&&t.ajax.dataSrc!==o?t.ajax.dataSrc:t.sAjaxDataProp;return"data"===r?n.aaData||n[r]:""!==r?A(r)(n):n}function X(t){var n=t.oClasses,r=t.sTableId,o=t.oLanguage,s=t.oPreviousSearch,a=t.aanFeatures,l='<input type="search" class="'+n.sFilterInput+'"/>',u=o.sSearch;u=u.match(/_INPUT_/)?u.replace("_INPUT_",l):u+l;var c=e("<div/>",{id:a.f?null:r+"_filter","class":n.sFilter}).append(e("<label/>").append(u)),p=function(){var e=(a.f,this.value?this.value:"");if(e!=s.sSearch){K(t,{sSearch:e,bRegex:s.bRegex,bSmart:s.bSmart,bCaseInsensitive:s.bCaseInsensitive});t._iDisplayStart=0;j(t)}},d=e("input",c).val(s.sSearch).attr("placeholder",o.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT","ssp"===Vt(t)?yt(p,400):p).bind("keypress.DT",function(e){return 13==e.keyCode?!1:void 0}).attr("aria-controls",r);e(t.nTable).on("search.dt.DT",function(e,n){if(t===n)try{d[0]!==i.activeElement&&d.val(s.sSearch)}catch(r){}});return c[0]}function K(e,t,n){var r=e.oPreviousSearch,i=e.aoPreSearchCols,s=function(e){r.sSearch=e.sSearch;r.bRegex=e.bRegex;r.bSmart=e.bSmart;r.bCaseInsensitive=e.bCaseInsensitive},a=function(e){return e.bEscapeRegex!==o?!e.bEscapeRegex:e.bRegex};E(e);if("ssp"!=Vt(e)){J(e,t.sSearch,n,a(t),t.bSmart,t.bCaseInsensitive); s(t);for(var l=0;l<i.length;l++)Q(e,i[l].sSearch,l,a(i[l]),i[l].bSmart,i[l].bCaseInsensitive);Y(e)}else s(t);e.bFiltered=!0;Ut(e,null,"search",[e])}function Y(e){for(var t,n,r=Xt.ext.search,i=e.aiDisplay,o=0,s=r.length;s>o;o++){for(var a=[],l=0,u=i.length;u>l;l++){n=i[l];t=e.aoData[n];r[o](e,t._aFilterData,n,t._aData,l)&&a.push(n)}i.length=0;i.push.apply(i,a)}}function Q(e,t,n,r,i,o){if(""!==t)for(var s,a=e.aiDisplay,l=Z(t,r,i,o),u=a.length-1;u>=0;u--){s=e.aoData[a[u]]._aFilterData[n];l.test(s)||a.splice(u,1)}}function J(e,t,n,r,i,o){var s,a,l,u=Z(t,r,i,o),c=e.oPreviousSearch.sSearch,p=e.aiDisplayMaster;0!==Xt.ext.search.length&&(n=!0);a=tt(e);if(t.length<=0)e.aiDisplay=p.slice();else{(a||n||c.length>t.length||0!==t.indexOf(c)||e.bSorted)&&(e.aiDisplay=p.slice());s=e.aiDisplay;for(l=s.length-1;l>=0;l--)u.test(e.aoData[s[l]]._sFilterRow)||s.splice(l,1)}}function Z(t,n,r,i){t=n?t:et(t);if(r){var o=e.map(t.match(/"[^"]+"|[^ ]+/g)||"",function(e){return'"'===e.charAt(0)?e.match(/^"(.*)"$/)[1]:e});t="^(?=.*?"+o.join(")(?=.*?")+").*$"}return new RegExp(t,i?"i":"")}function et(e){return e.replace(on,"\\$1")}function tt(e){var t,n,r,i,o,s,a,l,u=e.aoColumns,c=Xt.ext.type.search,p=!1;for(n=0,i=e.aoData.length;i>n;n++){l=e.aoData[n];if(!l._aFilterData){s=[];for(r=0,o=u.length;o>r;r++){t=u[r];if(t.bSearchable){a=N(e,n,r,"filter");c[t.sType]&&(a=c[t.sType](a));null===a&&(a="");"string"!=typeof a&&a.toString&&(a=a.toString())}else a="";if(a.indexOf&&-1!==a.indexOf("&")){bn.innerHTML=a;a=Tn?bn.textContent:bn.innerText}a.replace&&(a=a.replace(/[\r\n]/g,""));s.push(a)}l._aFilterData=s;l._sFilterRow=s.join(" ");p=!0}}return p}function nt(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function rt(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function it(t){var n=t.sTableId,r=t.aanFeatures.i,i=e("<div/>",{"class":t.oClasses.sInfo,id:r?null:n+"_info"});if(!r){t.aoDrawCallback.push({fn:ot,sName:"information"});i.attr("role","status").attr("aria-live","polite");e(t.nTable).attr("aria-describedby",n+"_info")}return i[0]}function ot(t){var n=t.aanFeatures.i;if(0!==n.length){var r=t.oLanguage,i=t._iDisplayStart+1,o=t.fnDisplayEnd(),s=t.fnRecordsTotal(),a=t.fnRecordsDisplay(),l=a?r.sInfo:r.sInfoEmpty;a!==s&&(l+=" "+r.sInfoFiltered);l+=r.sInfoPostFix;l=st(t,l);var u=r.fnInfoCallback;null!==u&&(l=u.call(t.oInstance,t,i,o,s,a,l));e(n).html(l)}}function st(e,t){var n=e.fnFormatNumber,r=e._iDisplayStart+1,i=e._iDisplayLength,o=e.fnRecordsDisplay(),s=-1===i;return t.replace(/_START_/g,n.call(e,r)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,o)).replace(/_PAGE_/g,n.call(e,s?1:Math.ceil(r/i))).replace(/_PAGES_/g,n.call(e,s?1:Math.ceil(o/i)))}function at(e){var t,n,r,i=e.iInitDisplayStart,o=e.aoColumns,s=e.oFeatures;if(e.bInitialised){B(e);P(e);M(e,e.aoHeader);M(e,e.aoFooter);ht(e,!0);s.bAutoWidth&&Et(e);for(t=0,n=o.length;n>t;t++){r=o[t];r.sWidth&&(r.nTh.style.width=Nt(r.sWidth))}G(e);var a=Vt(e);if("ssp"!=a)if("ajax"==a)H(e,[],function(n){var r=$(e,n);for(t=0;t<r.length;t++)x(e,r[t]);e.iInitDisplayStart=i;G(e);ht(e,!1);lt(e,n)},e);else{ht(e,!1);lt(e)}}else setTimeout(function(){at(e)},200)}function lt(e,t){e._bInitComplete=!0;t&&f(e);Ut(e,"aoInitComplete","init",[e,t])}function ut(e,t){var n=parseInt(t,10);e._iDisplayLength=n;qt(e);Ut(e,null,"length",[e,n])}function ct(t){for(var n=t.oClasses,r=t.sTableId,i=t.aLengthMenu,o=e.isArray(i[0]),s=o?i[0]:i,a=o?i[1]:i,l=e("<select/>",{name:r+"_length","aria-controls":r,"class":n.sLengthSelect}),u=0,c=s.length;c>u;u++)l[0][u]=new Option(a[u],s[u]);var p=e("<div><label/></div>").addClass(n.sLength);t.aanFeatures.l||(p[0].id=r+"_length");p.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML));e("select",p).val(t._iDisplayLength).bind("change.DT",function(){ut(t,e(this).val());j(t)});e(t.nTable).bind("length.dt.DT",function(n,r,i){t===r&&e("select",p).val(i)});return p[0]}function pt(t){var n=t.sPaginationType,r=Xt.ext.pager[n],i="function"==typeof r,o=function(e){j(e)},s=e("<div/>").addClass(t.oClasses.sPaging+n)[0],a=t.aanFeatures;i||r.fnInit(t,s,o);if(!a.p){s.id=t.sTableId+"_paginate";t.aoDrawCallback.push({fn:function(e){if(i){var t,n,s=e._iDisplayStart,l=e._iDisplayLength,u=e.fnRecordsDisplay(),c=-1===l,p=c?0:Math.ceil(s/l),d=c?1:Math.ceil(u/l),f=r(p,d);for(t=0,n=a.p.length;n>t;t++)Ht(e,"pageButton")(e,a.p[t],t,f,p,d)}else r.fnUpdate(e,o)},sName:"pagination"})}return s}function dt(e,t,n){var r=e._iDisplayStart,i=e._iDisplayLength,o=e.fnRecordsDisplay();if(0===o||-1===i)r=0;else if("number"==typeof t){r=t*i;r>o&&(r=0)}else if("first"==t)r=0;else if("previous"==t){r=i>=0?r-i:0;0>r&&(r=0)}else"next"==t?o>r+i&&(r+=i):"last"==t?r=Math.floor((o-1)/i)*i:Pt(e,0,"Unknown paging action: "+t,5);var s=e._iDisplayStart!==r;e._iDisplayStart=r;if(s){Ut(e,null,"page",[e]);n&&j(e)}return s}function ft(t){return e("<div/>",{id:t.aanFeatures.r?null:t.sTableId+"_processing","class":t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function ht(t,n){t.oFeatures.bProcessing&&e(t.aanFeatures.r).css("display",n?"block":"none");Ut(t,null,"processing",[t,n])}function gt(t){var n=e(t.nTable);n.attr("role","grid");var r=t.oScroll;if(""===r.sX&&""===r.sY)return t.nTable;var i=r.sX,o=r.sY,s=t.oClasses,a=n.children("caption"),l=a.length?a[0]._captionSide:null,u=e(n[0].cloneNode(!1)),c=e(n[0].cloneNode(!1)),p=n.children("tfoot"),d="<div/>",f=function(e){return e?Nt(e):null};r.sX&&"100%"===n.attr("width")&&n.removeAttr("width");p.length||(p=null);var h=e(d,{"class":s.sScrollWrapper}).append(e(d,{"class":s.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:i?f(i):"100%"}).append(e(d,{"class":s.sScrollHeadInner}).css({"box-sizing":"content-box",width:r.sXInner||"100%"}).append(u.removeAttr("id").css("margin-left",0).append(n.children("thead")))).append("top"===l?a:null)).append(e(d,{"class":s.sScrollBody}).css({overflow:"auto",height:f(o),width:f(i)}).append(n));p&&h.append(e(d,{"class":s.sScrollFoot}).css({overflow:"hidden",border:0,width:i?f(i):"100%"}).append(e(d,{"class":s.sScrollFootInner}).append(c.removeAttr("id").css("margin-left",0).append(n.children("tfoot")))).append("bottom"===l?a:null));var g=h.children(),m=g[0],v=g[1],E=p?g[2]:null;i&&e(v).scroll(function(){var e=this.scrollLeft;m.scrollLeft=e;p&&(E.scrollLeft=e)});t.nScrollHead=m;t.nScrollBody=v;t.nScrollFoot=E;t.aoDrawCallback.push({fn:mt,sName:"scrolling"});return h[0]}function mt(t){var n,r,i,o,s,a,l,u,c,p=t.oScroll,d=p.sX,f=p.sXInner,g=p.sY,m=p.iBarWidth,v=e(t.nScrollHead),E=v[0].style,y=v.children("div"),x=y[0].style,b=y.children("table"),T=t.nScrollBody,S=e(T),N=T.style,C=e(t.nScrollFoot),L=C.children("div"),A=L.children("table"),I=e(t.nTHead),w=e(t.nTable),R=w[0],O=R.style,_=t.nTFoot?e(t.nTFoot):null,D=t.oBrowser,k=D.bScrollOversize,F=[],P=[],M=[],j=function(e){var t=e.style;t.paddingTop="0";t.paddingBottom="0";t.borderTopWidth="0";t.borderBottomWidth="0";t.height=0};w.children("thead, tfoot").remove();s=I.clone().prependTo(w);n=I.find("tr");i=s.find("tr");s.find("th, td").removeAttr("tabindex");if(_){a=_.clone().prependTo(w);r=_.find("tr");o=a.find("tr")}if(!d){N.width="100%";v[0].style.width="100%"}e.each(q(t,s),function(e,n){l=h(t,e);n.style.width=t.aoColumns[l].sWidth});_&&vt(function(e){e.style.width=""},o);p.bCollapse&&""!==g&&(N.height=S[0].offsetHeight+I[0].offsetHeight+"px");c=w.outerWidth();if(""===d){O.width="100%";k&&(w.find("tbody").height()>T.offsetHeight||"scroll"==S.css("overflow-y"))&&(O.width=Nt(w.outerWidth()-m))}else if(""!==f)O.width=Nt(f);else if(c==S.width()&&S.height()<w.height()){O.width=Nt(c-m);w.outerWidth()>c-m&&(O.width=Nt(c))}else O.width=Nt(c);c=w.outerWidth();vt(j,i);vt(function(t){M.push(t.innerHTML);F.push(Nt(e(t).css("width")))},i);vt(function(e,t){e.style.width=F[t]},n);e(i).height(0);if(_){vt(j,o);vt(function(t){P.push(Nt(e(t).css("width")))},o);vt(function(e,t){e.style.width=P[t]},r);e(o).height(0)}vt(function(e,t){e.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+M[t]+"</div>";e.style.width=F[t]},i);_&&vt(function(e,t){e.innerHTML="";e.style.width=P[t]},o);if(w.outerWidth()<c){u=T.scrollHeight>T.offsetHeight||"scroll"==S.css("overflow-y")?c+m:c;k&&(T.scrollHeight>T.offsetHeight||"scroll"==S.css("overflow-y"))&&(O.width=Nt(u-m));(""===d||""!==f)&&Pt(t,1,"Possible column misalignment",6)}else u="100%";N.width=Nt(u);E.width=Nt(u);_&&(t.nScrollFoot.style.width=Nt(u));g||k&&(N.height=Nt(R.offsetHeight+m));if(g&&p.bCollapse){N.height=Nt(g);var G=d&&R.offsetWidth>T.offsetWidth?m:0;R.offsetHeight<T.offsetHeight&&(N.height=Nt(R.offsetHeight+G))}var B=w.outerWidth();b[0].style.width=Nt(B);x.width=Nt(B);var U=w.height()>T.clientHeight||"scroll"==S.css("overflow-y"),H="padding"+(D.bScrollbarLeft?"Left":"Right");x[H]=U?m+"px":"0px";if(_){A[0].style.width=Nt(B);L[0].style.width=Nt(B);L[0].style[H]=U?m+"px":"0px"}S.scroll();!t.bSorted&&!t.bFiltered||t._drawHold||(T.scrollTop=0)}function vt(e,t,n){for(var r,i,o=0,s=0,a=t.length;a>s;){r=t[s].firstChild;i=n?n[s].firstChild:null;for(;r;){if(1===r.nodeType){n?e(r,i,o):e(r,o);o++}r=r.nextSibling;i=n?i.nextSibling:null}s++}}function Et(t){var r,i,o,s,a,l=t.nTable,u=t.aoColumns,c=t.oScroll,p=c.sY,d=c.sX,h=c.sXInner,g=u.length,E=v(t,"bVisible"),y=e("th",t.nTHead),x=l.getAttribute("width"),b=l.parentNode,T=!1;for(r=0;r<E.length;r++){i=u[E[r]];if(null!==i.sWidth){i.sWidth=xt(i.sWidthOrig,b);T=!0}}if(T||d||p||g!=m(t)||g!=y.length){var S=e(l).clone().empty().css("visibility","hidden").removeAttr("id").append(e(t.nTHead).clone(!1)).append(e(t.nTFoot).clone(!1)).append(e("<tbody><tr/></tbody>"));S.find("tfoot th, tfoot td").css("width","");var N=S.find("tbody tr");y=q(t,S.find("thead")[0]);for(r=0;r<E.length;r++){i=u[E[r]];y[r].style.width=null!==i.sWidthOrig&&""!==i.sWidthOrig?Nt(i.sWidthOrig):""}if(t.aoData.length)for(r=0;r<E.length;r++){o=E[r];i=u[o];e(Tt(t,o)).clone(!1).append(i.sContentPadding).appendTo(N)}S.appendTo(b);if(d&&h)S.width(h);else if(d){S.css("width","auto");S.width()<b.offsetWidth&&S.width(b.offsetWidth)}else p?S.width(b.offsetWidth):x&&S.width(x);bt(t,S[0]);if(d){var C=0;for(r=0;r<E.length;r++){i=u[E[r]];a=e(y[r]).outerWidth();C+=null===i.sWidthOrig?a:parseInt(i.sWidth,10)+a-e(y[r]).width()}S.width(Nt(C));l.style.width=Nt(C)}for(r=0;r<E.length;r++){i=u[E[r]];s=e(y[r]).width();s&&(i.sWidth=Nt(s))}l.style.width=Nt(S.css("width"));S.remove()}else for(r=0;g>r;r++)u[r].sWidth=Nt(y.eq(r).width());x&&(l.style.width=Nt(x));if((x||d)&&!t._reszEvt){e(n).bind("resize.DT-"+t.sInstance,yt(function(){f(t)}));t._reszEvt=!0}}function yt(e,t){var n,r,i=t||200;return function(){var t=this,s=+new Date,a=arguments;if(n&&n+i>s){clearTimeout(r);r=setTimeout(function(){n=o;e.apply(t,a)},i)}else if(n){n=s;e.apply(t,a)}else n=s}}function xt(t,n){if(!t)return 0;var r=e("<div/>").css("width",Nt(t)).appendTo(n||i.body),o=r[0].offsetWidth;r.remove();return o}function bt(t,n){var r=t.oScroll;if(r.sX||r.sY){var i=r.sX?0:r.iBarWidth;n.style.width=Nt(e(n).outerWidth()-i)}}function Tt(t,n){var r=St(t,n);if(0>r)return null;var i=t.aoData[r];return i.nTr?i.anCells[n]:e("<td/>").html(N(t,r,n,"display"))[0]}function St(e,t){for(var n,r=-1,i=-1,o=0,s=e.aoData.length;s>o;o++){n=N(e,o,t,"display")+"";n=n.replace(Sn,"");if(n.length>r){r=n.length;i=o}}return i}function Nt(e){return null===e?"0px":"number"==typeof e?0>e?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Ct(){if(!Xt.__scrollbarWidth){var t=e("<p/>").css({width:"100%",height:200,padding:0})[0],n=e("<div/>").css({position:"absolute",top:0,left:0,width:200,height:150,padding:0,overflow:"hidden",visibility:"hidden"}).append(t).appendTo("body"),r=t.offsetWidth;n.css("overflow","scroll");var i=t.offsetWidth;r===i&&(i=n[0].clientWidth);n.remove();Xt.__scrollbarWidth=r-i}return Xt.__scrollbarWidth}function Lt(t){var n,r,i,o,s,a,l,u=[],c=t.aoColumns,p=t.aaSortingFixed,d=e.isPlainObject(p),f=[],h=function(t){t.length&&!e.isArray(t[0])?f.push(t):f.push.apply(f,t)};e.isArray(p)&&h(p);d&&p.pre&&h(p.pre);h(t.aaSorting);d&&p.post&&h(p.post);for(n=0;n<f.length;n++){l=f[n][0];o=c[l].aDataSort;for(r=0,i=o.length;i>r;r++){s=o[r];a=c[s].sType||"string";u.push({src:l,col:s,dir:f[n][1],index:f[n][2],type:a,formatter:Xt.ext.type.order[a+"-pre"]})}}return u}function At(e){var t,n,r,i,o,s=[],a=Xt.ext.type.order,l=e.aoData,u=(e.aoColumns,0),c=e.aiDisplayMaster;E(e);o=Lt(e);for(t=0,n=o.length;n>t;t++){i=o[t];i.formatter&&u++;_t(e,i.col)}if("ssp"!=Vt(e)&&0!==o.length){for(t=0,r=c.length;r>t;t++)s[c[t]]=t;c.sort(u===o.length?function(e,t){var n,r,i,a,u,c=o.length,p=l[e]._aSortData,d=l[t]._aSortData;for(i=0;c>i;i++){u=o[i];n=p[u.col];r=d[u.col];a=r>n?-1:n>r?1:0;if(0!==a)return"asc"===u.dir?a:-a}n=s[e];r=s[t];return r>n?-1:n>r?1:0}:function(e,t){var n,r,i,u,c,p,d=o.length,f=l[e]._aSortData,h=l[t]._aSortData;for(i=0;d>i;i++){c=o[i];n=f[c.col];r=h[c.col];p=a[c.type+"-"+c.dir]||a["string-"+c.dir];u=p(n,r);if(0!==u)return u}n=s[e];r=s[t];return r>n?-1:n>r?1:0})}e.bSorted=!0}function It(e){for(var t,n,r=e.aoColumns,i=Lt(e),o=e.oLanguage.oAria,s=0,a=r.length;a>s;s++){var l=r[s],u=l.asSorting,c=l.sTitle.replace(/<.*?>/g,""),p=l.nTh;p.removeAttribute("aria-sort");if(l.bSortable){if(i.length>0&&i[0].col==s){p.setAttribute("aria-sort","asc"==i[0].dir?"ascending":"descending");n=u[i[0].index+1]||u[0]}else n=u[0];t=c+("asc"===n?o.sSortAscending:o.sSortDescending)}else t=c;p.setAttribute("aria-label",t)}}function wt(t,n,r,i){var s,a=t.aoColumns[n],l=t.aaSorting,u=a.asSorting,c=function(t){var n=t._idx;n===o&&(n=e.inArray(t[1],u));return n+1>=u.length?0:n+1};"number"==typeof l[0]&&(l=t.aaSorting=[l]);if(r&&t.oFeatures.bSortMulti){var p=e.inArray(n,fn(l,"0"));if(-1!==p){s=c(l[p]);l[p][1]=u[s];l[p]._idx=s}else{l.push([n,u[0],0]);l[l.length-1]._idx=0}}else if(l.length&&l[0][0]==n){s=c(l[0]);l.length=1;l[0][1]=u[s];l[0]._idx=s}else{l.length=0;l.push([n,u[0]]);l[0]._idx=0}G(t);"function"==typeof i&&i(t)}function Rt(e,t,n,r){var i=e.aoColumns[n];Gt(t,{},function(t){if(i.bSortable!==!1)if(e.oFeatures.bProcessing){ht(e,!0);setTimeout(function(){wt(e,n,t.shiftKey,r);"ssp"!==Vt(e)&&ht(e,!1)},0)}else wt(e,n,t.shiftKey,r)})}function Ot(t){var n,r,i,o=t.aLastSort,s=t.oClasses.sSortColumn,a=Lt(t),l=t.oFeatures;if(l.bSort&&l.bSortClasses){for(n=0,r=o.length;r>n;n++){i=o[n].src;e(fn(t.aoData,"anCells",i)).removeClass(s+(2>n?n+1:3))}for(n=0,r=a.length;r>n;n++){i=a[n].src;e(fn(t.aoData,"anCells",i)).addClass(s+(2>n?n+1:3))}}t.aLastSort=a}function _t(e,t){var n,r=e.aoColumns[t],i=Xt.ext.order[r.sSortDataType];i&&(n=i.call(e.oInstance,e,t,g(e,t)));for(var o,s,a=Xt.ext.type.order[r.sType+"-pre"],l=0,u=e.aoData.length;u>l;l++){o=e.aoData[l];o._aSortData||(o._aSortData=[]);if(!o._aSortData[t]||i){s=i?n[l]:N(e,l,t,"sort");o._aSortData[t]=a?a(s):s}}}function Dt(t){if(t.oFeatures.bStateSave&&!t.bDestroying){var n={time:+new Date,start:t._iDisplayStart,length:t._iDisplayLength,order:e.extend(!0,[],t.aaSorting),search:nt(t.oPreviousSearch),columns:e.map(t.aoColumns,function(e,n){return{visible:e.bVisible,search:nt(t.aoPreSearchCols[n])}})};Ut(t,"aoStateSaveParams","stateSaveParams",[t,n]);t.oSavedState=n;t.fnStateSaveCallback.call(t.oInstance,t,n)}}function kt(t){var n,r,i=t.aoColumns;if(t.oFeatures.bStateSave){var o=t.fnStateLoadCallback.call(t.oInstance,t);if(o&&o.time){var s=Ut(t,"aoStateLoadParams","stateLoadParams",[t,o]);if(-1===e.inArray(!1,s)){var a=t.iStateDuration;if(!(a>0&&o.time<+new Date-1e3*a)&&i.length===o.columns.length){t.oLoadedState=e.extend(!0,{},o);t._iDisplayStart=o.start;t.iInitDisplayStart=o.start;t._iDisplayLength=o.length;t.aaSorting=[];e.each(o.order,function(e,n){t.aaSorting.push(n[0]>=i.length?[0,n[1]]:n)});e.extend(t.oPreviousSearch,rt(o.search));for(n=0,r=o.columns.length;r>n;n++){var l=o.columns[n];i[n].bVisible=l.visible;e.extend(t.aoPreSearchCols[n],rt(l.search))}Ut(t,"aoStateLoaded","stateLoaded",[t,o])}}}}}function Ft(t){var n=Xt.settings,r=e.inArray(t,fn(n,"nTable"));return-1!==r?n[r]:null}function Pt(e,t,r,i){r="DataTables warning: "+(null!==e?"table id="+e.sTableId+" - ":"")+r;i&&(r+=". For more information about this error, please see http://datatables.net/tn/"+i);if(t)n.console&&console.log&&console.log(r);else{var o=Xt.ext,s=o.sErrMode||o.errMode;if("alert"!=s)throw new Error(r);alert(r)}}function Mt(t,n,r,i){if(e.isArray(r))e.each(r,function(r,i){e.isArray(i)?Mt(t,n,i[0],i[1]):Mt(t,n,i)});else{i===o&&(i=r);n[r]!==o&&(t[i]=n[r])}}function jt(t,n,r){var i;for(var o in n)if(n.hasOwnProperty(o)){i=n[o];if(e.isPlainObject(i)){e.isPlainObject(t[o])||(t[o]={});e.extend(!0,t[o],i)}else t[o]=r&&"data"!==o&&"aaData"!==o&&e.isArray(i)?i.slice():i}return t}function Gt(t,n,r){e(t).bind("click.DT",n,function(e){t.blur();r(e)}).bind("keypress.DT",n,function(e){if(13===e.which){e.preventDefault();r(e)}}).bind("selectstart.DT",function(){return!1})}function Bt(e,t,n,r){n&&e[t].push({fn:n,sName:r})}function Ut(t,n,r,i){var o=[];n&&(o=e.map(t[n].slice().reverse(),function(e){return e.fn.apply(t.oInstance,i)}));null!==r&&e(t.nTable).trigger(r+".dt",i);return o}function qt(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),r=e._iDisplayLength;n===e.fnRecordsDisplay()&&(t=n-r);(-1===r||0>t)&&(t=0);e._iDisplayStart=t}function Ht(t,n){var r=t.renderer,i=Xt.ext.renderer[n];return e.isPlainObject(r)&&r[n]?i[r[n]]||i._:"string"==typeof r?i[r]||i._:i._}function Vt(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}function Wt(e,t){var n=[],r=Wn.numbers_length,i=Math.floor(r/2);if(r>=t)n=gn(0,t);else if(i>=e){n=gn(0,r-2);n.push("ellipsis");n.push(t-1)}else if(e>=t-1-i){n=gn(t-(r-2),t);n.splice(0,0,"ellipsis");n.splice(0,0,0)}else{n=gn(e-1,e+2);n.push("ellipsis");n.push(t-1);n.splice(0,0,"ellipsis");n.splice(0,0,0)}n.DT_el="span";return n}function zt(t){e.each({num:function(e){return zn(e,t)},"num-fmt":function(e){return zn(e,t,sn)},"html-num":function(e){return zn(e,t,tn)},"html-num-fmt":function(e){return zn(e,t,tn,sn)}},function(e,n){Kt.type.order[e+t+"-pre"]=n})}function $t(e){return function(){var t=[Ft(this[Xt.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Xt.ext.internal[e].apply(this,t)}}var Xt,Kt,Yt,Qt,Jt,Zt={},en=/[\r\n]/g,tn=/<.*?>/g,nn=/^[\w\+\-]/,rn=/[\w\+\-]$/,on=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),sn=/[',$£€¥%\u2009\u202F]/g,an=function(e){return e&&e!==!0&&"-"!==e?!1:!0},ln=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},un=function(e,t){Zt[t]||(Zt[t]=new RegExp(et(t),"g"));return"string"==typeof e?e.replace(/\./g,"").replace(Zt[t],"."):e},cn=function(e,t,n){var r="string"==typeof e;t&&r&&(e=un(e,t));n&&r&&(e=e.replace(sn,""));return an(e)||!isNaN(parseFloat(e))&&isFinite(e)},pn=function(e){return an(e)||"string"==typeof e},dn=function(e,t,n){if(an(e))return!0;var r=pn(e);return r&&cn(mn(e),t,n)?!0:null},fn=function(e,t,n){var r=[],i=0,s=e.length;if(n!==o)for(;s>i;i++)e[i]&&e[i][t]&&r.push(e[i][t][n]);else for(;s>i;i++)e[i]&&r.push(e[i][t]);return r},hn=function(e,t,n,r){var i=[],s=0,a=t.length;if(r!==o)for(;a>s;s++)i.push(e[t[s]][n][r]);else for(;a>s;s++)i.push(e[t[s]][n]);return i},gn=function(e,t){var n,r=[];if(t===o){t=0;n=e}else{n=t;t=e}for(var i=t;n>i;i++)r.push(i);return r},mn=function(e){return e.replace(tn,"")},vn=function(e){var t,n,r,i=[],o=e.length,s=0;e:for(n=0;o>n;n++){t=e[n];for(r=0;s>r;r++)if(i[r]===t)continue e;i.push(t);s++}return i},En=function(e,t,n){e[t]!==o&&(e[n]=e[t])},yn=/\[.*?\]$/,xn=/\(\)$/,bn=e("<div>")[0],Tn=bn.textContent!==o,Sn=/<.*?>/g;Xt=function(t){this.$=function(e,t){return this.api(!0).$(e,t)};this._=function(e,t){return this.api(!0).rows(e,t).data()};this.api=function(e){return new Yt(e?Ft(this[Kt.iApiIndex]):this)};this.fnAddData=function(t,n){var r=this.api(!0),i=e.isArray(t)&&(e.isArray(t[0])||e.isPlainObject(t[0]))?r.rows.add(t):r.row.add(t);(n===o||n)&&r.draw();return i.flatten().toArray()};this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],r=n.oScroll;e===o||e?t.draw(!1):(""!==r.sX||""!==r.sY)&&mt(n)};this.fnClearTable=function(e){var t=this.api(!0).clear();(e===o||e)&&t.draw()};this.fnClose=function(e){this.api(!0).row(e).child.hide()};this.fnDeleteRow=function(e,t,n){var r=this.api(!0),i=r.rows(e),s=i.settings()[0],a=s.aoData[i[0][0]];i.remove();t&&t.call(this,s,a);(n===o||n)&&r.draw();return a};this.fnDestroy=function(e){this.api(!0).destroy(e)};this.fnDraw=function(e){this.api(!0).draw(!e)};this.fnFilter=function(e,t,n,r,i,s){var a=this.api(!0);null===t||t===o?a.search(e,n,r,s):a.column(t).search(e,n,r,s);a.draw()};this.fnGetData=function(e,t){var n=this.api(!0);if(e!==o){var r=e.nodeName?e.nodeName.toLowerCase():"";return t!==o||"td"==r||"th"==r?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()};this.fnGetNodes=function(e){var t=this.api(!0);return e!==o?t.row(e).node():t.rows().nodes().flatten().toArray()};this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"==n||"TH"==n){var r=t.cell(e).index();return[r.row,r.columnVisible,r.column]}return null};this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()};this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]};this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===o||t)&&n.draw(!1)};this.fnSetColumnVis=function(e,t,n){var r=this.api(!0).column(e).visible(t);(n===o||n)&&r.columns.adjust().draw()};this.fnSettings=function(){return Ft(this[Kt.iApiIndex])};this.fnSort=function(e){this.api(!0).order(e).draw()};this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)};this.fnUpdate=function(e,t,n,r,i){var s=this.api(!0);n===o||null===n?s.row(t).data(e):s.cell(t,n).data(e);(i===o||i)&&s.columns.adjust();(r===o||r)&&s.draw();return 0};this.fnVersionCheck=Kt.fnVersionCheck;var n=this,i=t===o,c=this.length;i&&(t={});this.oApi=this.internal=Kt.internal;for(var f in Xt.ext.internal)f&&(this[f]=$t(f));this.each(function(){var f,h={},g=c>1?jt(h,t,!0):t,m=0,v=this.getAttribute("id"),E=!1,T=Xt.defaults;if("table"==this.nodeName.toLowerCase()){a(T);l(T.column);r(T,T,!0);r(T.column,T.column,!0);r(T,g);var S=Xt.settings;for(m=0,f=S.length;f>m;m++){if(S[m].nTable==this){var N=g.bRetrieve!==o?g.bRetrieve:T.bRetrieve,C=g.bDestroy!==o?g.bDestroy:T.bDestroy;if(i||N)return S[m].oInstance;if(C){S[m].oInstance.fnDestroy();break}Pt(S[m],0,"Cannot reinitialise DataTable",3);return}if(S[m].sTableId==this.id){S.splice(m,1);break}}if(null===v||""===v){v="DataTables_Table_"+Xt.ext._unique++;this.id=v}var L=e.extend(!0,{},Xt.models.oSettings,{nTable:this,oApi:n.internal,oInit:g,sDestroyWidth:e(this)[0].style.width,sInstance:v,sTableId:v});S.push(L);L.oInstance=1===n.length?n:e(this).dataTable();a(g);g.oLanguage&&s(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=e.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=jt(e.extend(!0,{},T),g);Mt(L.oFeatures,g,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]);Mt(L,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]);Mt(L.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);Mt(L.oLanguage,g,"fnInfoCallback");Bt(L,"aoDrawCallback",g.fnDrawCallback,"user");Bt(L,"aoServerParams",g.fnServerParams,"user");Bt(L,"aoStateSaveParams",g.fnStateSaveParams,"user");Bt(L,"aoStateLoadParams",g.fnStateLoadParams,"user");Bt(L,"aoStateLoaded",g.fnStateLoaded,"user");Bt(L,"aoRowCallback",g.fnRowCallback,"user");Bt(L,"aoRowCreatedCallback",g.fnCreatedRow,"user");Bt(L,"aoHeaderCallback",g.fnHeaderCallback,"user");Bt(L,"aoFooterCallback",g.fnFooterCallback,"user");Bt(L,"aoInitComplete",g.fnInitComplete,"user");Bt(L,"aoPreDrawCallback",g.fnPreDrawCallback,"user");var A=L.oClasses;if(g.bJQueryUI){e.extend(A,Xt.ext.oJUIClasses,g.oClasses);g.sDom===T.sDom&&"lfrtip"===T.sDom&&(L.sDom='<"H"lfr>t<"F"ip>');L.renderer?e.isPlainObject(L.renderer)&&!L.renderer.header&&(L.renderer.header="jqueryui"):L.renderer="jqueryui"}else e.extend(A,Xt.ext.classes,g.oClasses);e(this).addClass(A.sTable);(""!==L.oScroll.sX||""!==L.oScroll.sY)&&(L.oScroll.iBarWidth=Ct());L.oScroll.sX===!0&&(L.oScroll.sX="100%");if(L.iInitDisplayStart===o){L.iInitDisplayStart=g.iDisplayStart;L._iDisplayStart=g.iDisplayStart}if(null!==g.iDeferLoading){L.bDeferLoading=!0;var I=e.isArray(g.iDeferLoading);L._iRecordsDisplay=I?g.iDeferLoading[0]:g.iDeferLoading;L._iRecordsTotal=I?g.iDeferLoading[1]:g.iDeferLoading}if(""!==g.oLanguage.sUrl){L.oLanguage.sUrl=g.oLanguage.sUrl;e.getJSON(L.oLanguage.sUrl,null,function(t){s(t);r(T.oLanguage,t);e.extend(!0,L.oLanguage,g.oLanguage,t);at(L)});E=!0}else e.extend(!0,L.oLanguage,g.oLanguage);null===g.asStripeClasses&&(L.asStripeClasses=[A.sStripeOdd,A.sStripeEven]);var w=L.asStripeClasses,R=e("tbody tr:eq(0)",this);if(-1!==e.inArray(!0,e.map(w,function(e){return R.hasClass(e)}))){e("tbody tr",this).removeClass(w.join(" "));L.asDestroyStripes=w.slice()}var O,_=[],k=this.getElementsByTagName("thead");if(0!==k.length){U(L.aoHeader,k[0]);_=q(L)}if(null===g.aoColumns){O=[];for(m=0,f=_.length;f>m;m++)O.push(null)}else O=g.aoColumns;for(m=0,f=O.length;f>m;m++)p(L,_?_[m]:null);y(L,g.aoColumnDefs,O,function(e,t){d(L,e,t)});if(R.length){var F=function(e,t){return e.getAttribute("data-"+t)?t:null};e.each(D(L,R[0]).cells,function(e,t){var n=L.aoColumns[e];if(n.mData===e){var r=F(t,"sort")||F(t,"order"),i=F(t,"filter")||F(t,"search");if(null!==r||null!==i){n.mData={_:e+".display",sort:null!==r?e+".@data-"+r:o,type:null!==r?e+".@data-"+r:o,filter:null!==i?e+".@data-"+i:o};d(L,e)}}})}var P=L.oFeatures;if(g.bStateSave){P.bStateSave=!0;kt(L,g);Bt(L,"aoDrawCallback",Dt,"state_save")}if(g.aaSorting===o){var M=L.aaSorting;for(m=0,f=M.length;f>m;m++)M[m][1]=L.aoColumns[m].asSorting[0]}Ot(L);P.bSort&&Bt(L,"aoDrawCallback",function(){if(L.bSorted){var t=Lt(L),n={};e.each(t,function(e,t){n[t.src]=t.dir});Ut(L,null,"order",[L,t,n]);It(L)}});Bt(L,"aoDrawCallback",function(){(L.bSorted||"ssp"===Vt(L)||P.bDeferRender)&&Ot(L)},"sc");u(L);var j=e(this).children("caption").each(function(){this._captionSide=e(this).css("caption-side")}),G=e(this).children("thead");0===G.length&&(G=e("<thead/>").appendTo(this));L.nTHead=G[0];var B=e(this).children("tbody");0===B.length&&(B=e("<tbody/>").appendTo(this));L.nTBody=B[0];var H=e(this).children("tfoot");0===H.length&&j.length>0&&(""!==L.oScroll.sX||""!==L.oScroll.sY)&&(H=e("<tfoot/>").appendTo(this));if(0===H.length||0===H.children().length)e(this).addClass(A.sNoFooter);else if(H.length>0){L.nTFoot=H[0];U(L.aoFooter,L.nTFoot)}if(g.aaData)for(m=0;m<g.aaData.length;m++)x(L,g.aaData[m]);else(L.bDeferLoading||"dom"==Vt(L))&&b(L,e(L.nTBody).children("tr"));L.aiDisplay=L.aiDisplayMaster.slice();L.bInitialised=!0;E===!1&&at(L)}else Pt(null,0,"Non-table node initialisation ("+this.nodeName+")",2)});n=null;return this};var Nn=[],Cn=Array.prototype,Ln=function(t){var n,r,i=Xt.settings,o=e.map(i,function(e){return e.nTable});if(!t)return[];if(t.nTable&&t.oApi)return[t];if(t.nodeName&&"table"===t.nodeName.toLowerCase()){n=e.inArray(t,o);return-1!==n?[i[n]]:null}if(t&&"function"==typeof t.settings)return t.settings().toArray();"string"==typeof t?r=e(t):t instanceof e&&(r=t);return r?r.map(function(){n=e.inArray(this,o);return-1!==n?i[n]:null}).toArray():void 0};Yt=function(t,n){if(!this instanceof Yt)throw"DT API must be constructed as a new object";var r=[],i=function(e){var t=Ln(e);t&&r.push.apply(r,t)};if(e.isArray(t))for(var o=0,s=t.length;s>o;o++)i(t[o]);else i(t);this.context=vn(r);n&&this.push.apply(this,n.toArray?n.toArray():n);this.selector={rows:null,cols:null,opts:null};Yt.extend(this,this,Nn)};Xt.Api=Yt;Yt.prototype={concat:Cn.concat,context:[],each:function(e){for(var t=0,n=this.length;n>t;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new Yt(t[e],this[e]):null},filter:function(e){var t=[];if(Cn.filter)t=Cn.filter.call(this,e,this);else for(var n=0,r=this.length;r>n;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new Yt(this.context,t)},flatten:function(){var e=[];return new Yt(this.context,e.concat.apply(e,this.toArray()))},join:Cn.join,indexOf:Cn.indexOf||function(e,t){for(var n=t||0,r=this.length;r>n;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n){var r,i,s,a,l,u,c,p,d=[],f=this.context,h=this.selector;if("string"==typeof e){n=t;t=e;e=!1}for(i=0,s=f.length;s>i;i++)if("table"===t){r=n(f[i],i);r!==o&&d.push(r)}else if("columns"===t||"rows"===t){r=n(f[i],this[i],i);r!==o&&d.push(r)}else if("column"===t||"column-rows"===t||"row"===t||"cell"===t){c=this[i];"column-rows"===t&&(u=_n(f[i],h.opts));for(a=0,l=c.length;l>a;a++){p=c[a];r="cell"===t?n(f[i],p.row,p.column,i,a):n(f[i],p,i,a,u);r!==o&&d.push(r)}}if(d.length){var g=new Yt(f,e?d.concat.apply([],d):d),m=g.selector;m.rows=h.rows;m.cols=h.cols;m.opts=h.opts;return g}return this},lastIndexOf:Cn.lastIndexOf||function(){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(Cn.map)t=Cn.map.call(this,e,this);else for(var n=0,r=this.length;r>n;n++)t.push(e.call(this,this[n],n));return new Yt(this.context,t)},pluck:function(e){return this.map(function(t){return t[e]})},pop:Cn.pop,push:Cn.push,reduce:Cn.reduce||function(e,t){return c(this,e,t,0,this.length,1)},reduceRight:Cn.reduceRight||function(e,t){return c(this,e,t,this.length-1,-1,-1)},reverse:Cn.reverse,selector:null,shift:Cn.shift,sort:Cn.sort,splice:Cn.splice,toArray:function(){return Cn.slice.call(this)},to$:function(){return e(this)},toJQuery:function(){return e(this)},unique:function(){return new Yt(this.context,vn(this))},unshift:Cn.unshift};Yt.extend=function(t,n,r){if(n&&(n instanceof Yt||n.__dt_wrapper)){var i,o,s,a=function(e,t,n){return function(){var r=t.apply(e,arguments);Yt.extend(r,r,n.methodExt);return r}};for(i=0,o=r.length;o>i;i++){s=r[i];n[s.name]="function"==typeof s.val?a(t,s.val,s):e.isPlainObject(s.val)?{}:s.val;n[s.name].__dt_wrapper=!0;Yt.extend(t,n[s.name],s.propExt)}}};Yt.register=Qt=function(t,n){if(e.isArray(t))for(var r=0,i=t.length;i>r;r++)Yt.register(t[r],n);else{var o,s,a,l,u=t.split("."),c=Nn,p=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n].name===t)return e[n];return null};for(o=0,s=u.length;s>o;o++){l=-1!==u[o].indexOf("()");a=l?u[o].replace("()",""):u[o];var d=p(c,a);if(!d){d={name:a,val:{},methodExt:[],propExt:[]};c.push(d)}o===s-1?d.val=n:c=l?d.methodExt:d.propExt}}};Yt.registerPlural=Jt=function(t,n,r){Yt.register(t,r);Yt.register(n,function(){var t=r.apply(this,arguments);return t===this?this:t instanceof Yt?t.length?e.isArray(t[0])?new Yt(t.context,t[0]):t[0]:o:t})};var An=function(t,n){if("number"==typeof t)return[n[t]];var r=e.map(n,function(e){return e.nTable});return e(r).filter(t).map(function(){var t=e.inArray(this,r);return n[t]}).toArray()};Qt("tables()",function(e){return e?new Yt(An(e,this.context)):this});Qt("table()",function(e){var t=this.tables(e),n=t.context;return n.length?new Yt(n[0]):t});Jt("tables().nodes()","table().node()",function(){return this.iterator("table",function(e){return e.nTable})});Jt("tables().body()","table().body()",function(){return this.iterator("table",function(e){return e.nTBody})});Jt("tables().header()","table().header()",function(){return this.iterator("table",function(e){return e.nTHead})});Jt("tables().footer()","table().footer()",function(){return this.iterator("table",function(e){return e.nTFoot })});Jt("tables().containers()","table().container()",function(){return this.iterator("table",function(e){return e.nTableWrapper})});Qt("draw()",function(e){return this.iterator("table",function(t){G(t,e===!1)})});Qt("page()",function(e){return e===o?this.page.info().page:this.iterator("table",function(t){dt(t,e)})});Qt("page.info()",function(){if(0===this.context.length)return o;var e=this.context[0],t=e._iDisplayStart,n=e._iDisplayLength,r=e.fnRecordsDisplay(),i=-1===n;return{page:i?0:Math.floor(t/n),pages:i?1:Math.ceil(r/n),start:t,end:e.fnDisplayEnd(),length:n,recordsTotal:e.fnRecordsTotal(),recordsDisplay:r}});Qt("page.len()",function(e){return e===o?0!==this.context.length?this.context[0]._iDisplayLength:o:this.iterator("table",function(t){ut(t,e)})});var In=function(e,t,n){if("ssp"==Vt(e))G(e,t);else{ht(e,!0);H(e,[],function(n){R(e);for(var r=$(e,n),i=0,o=r.length;o>i;i++)x(e,r[i]);G(e,t);ht(e,!1)})}if(n){var r=new Yt(e);r.one("draw",function(){n(r.ajax.json())})}};Qt("ajax.json()",function(){var e=this.context;return e.length>0?e[0].json:void 0});Qt("ajax.params()",function(){var e=this.context;return e.length>0?e[0].oAjaxData:void 0});Qt("ajax.reload()",function(e,t){return this.iterator("table",function(n){In(n,t===!1,e)})});Qt("ajax.url()",function(t){var n=this.context;if(t===o){if(0===n.length)return o;n=n[0];return n.ajax?e.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource}return this.iterator("table",function(n){e.isPlainObject(n.ajax)?n.ajax.url=t:n.ajax=t})});Qt("ajax.url().load()",function(e,t){return this.iterator("table",function(n){In(n,t===!1,e)})});var wn=function(t,n){var r,i,s,a,l,u,c=[];t&&"string"!=typeof t&&t.length!==o||(t=[t]);for(s=0,a=t.length;a>s;s++){i=t[s]&&t[s].split?t[s].split(","):[t[s]];for(l=0,u=i.length;u>l;l++){r=n("string"==typeof i[l]?e.trim(i[l]):i[l]);r&&r.length&&c.push.apply(c,r)}}return c},Rn=function(e){e||(e={});e.filter&&!e.search&&(e.search=e.filter);return{search:e.search||"none",order:e.order||"current",page:e.page||"all"}},On=function(e){for(var t=0,n=e.length;n>t;t++)if(e[t].length>0){e[0]=e[t];e.length=1;e.context=[e.context[t]];return e}e.length=0;return e},_n=function(t,n){var r,i,o,s=[],a=t.aiDisplay,l=t.aiDisplayMaster,u=n.search,c=n.order,p=n.page;if("ssp"==Vt(t))return"removed"===u?[]:gn(0,l.length);if("current"==p)for(r=t._iDisplayStart,i=t.fnDisplayEnd();i>r;r++)s.push(a[r]);else if("current"==c||"applied"==c)s="none"==u?l.slice():"applied"==u?a.slice():e.map(l,function(t){return-1===e.inArray(t,a)?t:null});else if("index"==c||"original"==c)for(r=0,i=t.aoData.length;i>r;r++)if("none"==u)s.push(r);else{o=e.inArray(r,a);(-1===o&&"removed"==u||o>=0&&"applied"==u)&&s.push(r)}return s},Dn=function(t,n,r){return wn(n,function(n){var i=ln(n);if(null!==i&&!r)return[i];var o=_n(t,r);if(null!==i&&-1!==e.inArray(i,o))return[i];if(!n)return o;for(var s=[],a=0,l=o.length;l>a;a++)s.push(t.aoData[o[a]].nTr);return n.nodeName&&-1!==e.inArray(n,s)?[n._DT_RowIndex]:e(s).filter(n).map(function(){return this._DT_RowIndex}).toArray()})};Qt("rows()",function(t,n){if(t===o)t="";else if(e.isPlainObject(t)){n=t;t=""}n=Rn(n);var r=this.iterator("table",function(e){return Dn(e,t,n)});r.selector.rows=t;r.selector.opts=n;return r});Qt("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||o})});Qt("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return hn(e.aoData,t,"_aData")})});Jt("rows().cache()","row().cache()",function(e){return this.iterator("row",function(t,n){var r=t.aoData[n];return"search"===e?r._aFilterData:r._aSortData})});Jt("rows().invalidate()","row().invalidate()",function(e){return this.iterator("row",function(t,n){_(t,n,e)})});Jt("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){return t})});Jt("rows().remove()","row().remove()",function(){var t=this;return this.iterator("row",function(n,r,i){var o=n.aoData;o.splice(r,1);for(var s=0,a=o.length;a>s;s++)null!==o[s].nTr&&(o[s].nTr._DT_RowIndex=s);e.inArray(r,n.aiDisplay);O(n.aiDisplayMaster,r);O(n.aiDisplay,r);O(t[i],r,!1);qt(n)})});Qt("rows.add()",function(e){var t=this.iterator("table",function(t){var n,r,i,o=[];for(r=0,i=e.length;i>r;r++){n=e[r];o.push(n.nodeName&&"TR"===n.nodeName.toUpperCase()?b(t,n)[0]:x(t,n))}return o}),n=this.rows(-1);n.pop();n.push.apply(n,t.toArray());return n});Qt("row()",function(e,t){return On(this.rows(e,t))});Qt("row().data()",function(e){var t=this.context;if(e===o)return t.length&&this.length?t[0].aoData[this[0]]._aData:o;t[0].aoData[this[0]]._aData=e;_(t[0],this[0],"data");return this});Qt("row().node()",function(){var e=this.context;return e.length&&this.length?e[0].aoData[this[0]].nTr||null:null});Qt("row.add()",function(t){t instanceof e&&t.length&&(t=t[0]);var n=this.iterator("table",function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?b(e,t)[0]:x(e,t)});return this.row(n[0])});var kn=function(t,n,r,i){var o=[],s=function(n,r){if(n.nodeName&&"tr"===n.nodeName.toLowerCase())o.push(n);else{var i=e("<tr><td/></tr>").addClass(r);e("td",i).addClass(r).html(n)[0].colSpan=m(t);o.push(i[0])}};if(e.isArray(r)||r instanceof e)for(var a=0,l=r.length;l>a;a++)s(r[a],i);else s(r,i);n._details&&n._details.remove();n._details=e(o);n._detailsShow&&n._details.insertAfter(n.nTr)},Fn=function(e){var t=e.context;if(t.length&&e.length){var n=t[0].aoData[e[0]];if(n._details){n._details.remove();n._detailsShow=o;n._details=o}}},Pn=function(e,t){var n=e.context;if(n.length&&e.length){var r=n[0].aoData[e[0]];if(r._details){r._detailsShow=t;t?r._details.insertAfter(r.nTr):r._details.detach();Mn(n[0])}}},Mn=function(e){var t=new Yt(e),n=".dt.DT_details",r="draw"+n,i="column-visibility"+n,o="destroy"+n,s=e.aoData;t.off(r+" "+i+" "+o);if(fn(s,"_details").length>0){t.on(r,function(n,r){e===r&&t.rows({page:"current"}).eq(0).each(function(e){var t=s[e];t._detailsShow&&t._details.insertAfter(t.nTr)})});t.on(i,function(t,n){if(e===n)for(var r,i=m(n),o=0,a=s.length;a>o;o++){r=s[o];r._details&&r._details.children("td[colspan]").attr("colspan",i)}});t.on(o,function(t,n){if(e===n)for(var r=0,i=s.length;i>r;r++)s[r]._details&&Fn(s[r])})}},jn="",Gn=jn+"row().child",Bn=Gn+"()";Qt(Bn,function(e,t){var n=this.context;if(e===o)return n.length&&this.length?n[0].aoData[this[0]]._details:o;e===!0?this.child.show():e===!1?Fn(this):n.length&&this.length&&kn(n[0],n[0].aoData[this[0]],e,t);return this});Qt([Gn+".show()",Bn+".show()"],function(){Pn(this,!0);return this});Qt([Gn+".hide()",Bn+".hide()"],function(){Pn(this,!1);return this});Qt([Gn+".remove()",Bn+".remove()"],function(){Fn(this);return this});Qt(Gn+".isShown()",function(){var e=this.context;return e.length&&this.length?e[0].aoData[this[0]]._detailsShow||!1:!1});var Un=/^(.+):(name|visIdx|visible)$/,qn=function(t,n){var r=t.aoColumns,i=fn(r,"sName"),o=fn(r,"nTh");return wn(n,function(n){var s=ln(n);if(""===n)return gn(r.length);if(null!==s)return[s>=0?s:r.length+s];var a="string"==typeof n?n.match(Un):"";if(!a)return e(o).filter(n).map(function(){return e.inArray(this,o)}).toArray();switch(a[2]){case"visIdx":case"visible":var l=parseInt(a[1],10);if(0>l){var u=e.map(r,function(e,t){return e.bVisible?t:null});return[u[u.length+l]]}return[h(t,l)];case"name":return e.map(i,function(e,t){return e===a[1]?t:null})}})},Hn=function(t,n,r,i){var s,a,l,u,c=t.aoColumns,p=c[n],d=t.aoData;if(r===o)return p.bVisible;if(p.bVisible!==r){if(r){var h=e.inArray(!0,fn(c,"bVisible"),n+1);for(a=0,l=d.length;l>a;a++){u=d[a].nTr;s=d[a].anCells;u&&u.insertBefore(s[n],s[h]||null)}}else e(fn(t.aoData,"anCells",n)).detach();p.bVisible=r;M(t,t.aoHeader);M(t,t.aoFooter);if(i===o||i){f(t);(t.oScroll.sX||t.oScroll.sY)&&mt(t)}Ut(t,null,"column-visibility",[t,n,r]);Dt(t)}};Qt("columns()",function(t,n){if(t===o)t="";else if(e.isPlainObject(t)){n=t;t=""}n=Rn(n);var r=this.iterator("table",function(e){return qn(e,t,n)});r.selector.cols=t;r.selector.opts=n;return r});Jt("columns().header()","column().header()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].nTh})});Jt("columns().footer()","column().footer()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].nTf})});Jt("columns().data()","column().data()",function(){return this.iterator("column-rows",function(e,t,n,r,i){for(var o=[],s=0,a=i.length;a>s;s++)o.push(N(e,i[s],t,""));return o})});Jt("columns().cache()","column().cache()",function(e){return this.iterator("column-rows",function(t,n,r,i,o){return hn(t.aoData,o,"search"===e?"_aFilterData":"_aSortData",n)})});Jt("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(e,t,n,r,i){return hn(e.aoData,i,"anCells",t)})});Jt("columns().visible()","column().visible()",function(e,t){return this.iterator("column",function(n,r){return e===o?n.aoColumns[r].bVisible:Hn(n,r,e,t)})});Jt("columns().indexes()","column().index()",function(e){return this.iterator("column",function(t,n){return"visible"===e?g(t,n):n})});Qt("columns.adjust()",function(){return this.iterator("table",function(e){f(e)})});Qt("column.index()",function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return h(n,t);if("fromData"===e||"toVisible"===e)return g(n,t)}});Qt("column()",function(e,t){return On(this.columns(e,t))});var Vn=function(t,n,r){var i,s,a,l,u,c=t.aoData,p=_n(t,r),d=hn(c,p,"anCells"),f=e([].concat.apply([],d)),h=t.aoColumns.length;return wn(n,function(t){if(null===t||t===o){s=[];for(a=0,l=p.length;l>a;a++){i=p[a];for(u=0;h>u;u++)s.push({row:i,column:u})}return s}return e.isPlainObject(t)?[t]:f.filter(t).map(function(t,n){i=n.parentNode._DT_RowIndex;return{row:i,column:e.inArray(n,c[i].anCells)}}).toArray()})};Qt("cells()",function(t,n,r){if(e.isPlainObject(t))if(typeof t.row!==o){r=n;n=null}else{r=t;t=null}if(e.isPlainObject(n)){r=n;n=null}if(null===n||n===o)return this.iterator("table",function(e){return Vn(e,t,Rn(r))});var i,s,a,l,u,c=this.columns(n,r),p=this.rows(t,r),d=this.iterator("table",function(e,t){i=[];for(s=0,a=p[t].length;a>s;s++)for(l=0,u=c[t].length;u>l;l++)i.push({row:p[t][s],column:c[t][l]});return i});e.extend(d.selector,{cols:n,rows:t,opts:r});return d});Jt("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(e,t,n){return e.aoData[t].anCells[n]})});Qt("cells().data()",function(){return this.iterator("cell",function(e,t,n){return N(e,t,n)})});Jt("cells().cache()","cell().cache()",function(e){e="search"===e?"_aFilterData":"_aSortData";return this.iterator("cell",function(t,n,r){return t.aoData[n][e][r]})});Jt("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(e,t,n){return{row:t,column:n,columnVisible:g(e,n)}})});Qt(["cells().invalidate()","cell().invalidate()"],function(e){var t=this.selector;this.rows(t.rows,t.opts).invalidate(e);return this});Qt("cell()",function(e,t,n){return On(this.cells(e,t,n))});Qt("cell().data()",function(e){var t=this.context,n=this[0];if(e===o)return t.length&&n.length?N(t[0],n[0].row,n[0].column):o;C(t[0],n[0].row,n[0].column,e);_(t[0],n[0].row,"data",n[0].column);return this});Qt("order()",function(t,n){var r=this.context;if(t===o)return 0!==r.length?r[0].aaSorting:o;"number"==typeof t?t=[[t,n]]:e.isArray(t[0])||(t=Array.prototype.slice.call(arguments));return this.iterator("table",function(e){e.aaSorting=t.slice()})});Qt("order.listener()",function(e,t,n){return this.iterator("table",function(r){Rt(r,e,t,n)})});Qt(["columns().order()","column().order()"],function(t){var n=this;return this.iterator("table",function(r,i){var o=[];e.each(n[i],function(e,n){o.push([n,t])});r.aaSorting=o})});Qt("search()",function(t,n,r,i){var s=this.context;return t===o?0!==s.length?s[0].oPreviousSearch.sSearch:o:this.iterator("table",function(o){o.oFeatures.bFilter&&K(o,e.extend({},o.oPreviousSearch,{sSearch:t+"",bRegex:null===n?!1:n,bSmart:null===r?!0:r,bCaseInsensitive:null===i?!0:i}),1)})});Jt("columns().search()","column().search()",function(t,n,r,i){return this.iterator("column",function(s,a){var l=s.aoPreSearchCols;if(t===o)return l[a].sSearch;if(s.oFeatures.bFilter){e.extend(l[a],{sSearch:t+"",bRegex:null===n?!1:n,bSmart:null===r?!0:r,bCaseInsensitive:null===i?!0:i});K(s,s.oPreviousSearch,1)}})});Qt("state()",function(){return this.context.length?this.context[0].oSavedState:null});Qt("state.clear()",function(){return this.iterator("table",function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})})});Qt("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});Qt("state.save()",function(){return this.iterator("table",function(e){Dt(e)})});Xt.versionCheck=Xt.fnVersionCheck=function(e){for(var t,n,r=Xt.version.split("."),i=e.split("."),o=0,s=i.length;s>o;o++){t=parseInt(r[o],10)||0;n=parseInt(i[o],10)||0;if(t!==n)return t>n}return!0};Xt.isDataTable=Xt.fnIsDataTable=function(t){var n=e(t).get(0),r=!1;e.each(Xt.settings,function(e,t){(t.nTable===n||t.nScrollHead===n||t.nScrollFoot===n)&&(r=!0)});return r};Xt.tables=Xt.fnTables=function(t){return jQuery.map(Xt.settings,function(n){return!t||t&&e(n.nTable).is(":visible")?n.nTable:void 0})};Xt.camelToHungarian=r;Qt("$()",function(t,n){var r=this.rows(n).nodes(),i=e(r);return e([].concat(i.filter(t).toArray(),i.find(t).toArray()))});e.each(["on","one","off"],function(t,n){Qt(n+"()",function(){var t=Array.prototype.slice.call(arguments);t[0].match(/\.dt\b/)||(t[0]+=".dt");var r=e(this.tables().nodes());r[n].apply(r,t);return this})});Qt("clear()",function(){return this.iterator("table",function(e){R(e)})});Qt("settings()",function(){return new Yt(this.context,this.context)});Qt("data()",function(){return this.iterator("table",function(e){return fn(e.aoData,"_aData")}).flatten()});Qt("destroy()",function(t){t=t||!1;return this.iterator("table",function(r){var i,o=r.nTableWrapper.parentNode,s=r.oClasses,a=r.nTable,l=r.nTBody,u=r.nTHead,c=r.nTFoot,p=e(a),d=e(l),f=e(r.nTableWrapper),h=e.map(r.aoData,function(e){return e.nTr});r.bDestroying=!0;Ut(r,"aoDestroyCallback","destroy",[r]);t||new Yt(r).columns().visible(!0);f.unbind(".DT").find(":not(tbody *)").unbind(".DT");e(n).unbind(".DT-"+r.sInstance);if(a!=u.parentNode){p.children("thead").detach();p.append(u)}if(c&&a!=c.parentNode){p.children("tfoot").detach();p.append(c)}p.detach();f.detach();r.aaSorting=[];r.aaSortingFixed=[];Ot(r);e(h).removeClass(r.asStripeClasses.join(" "));e("th, td",u).removeClass(s.sSortable+" "+s.sSortableAsc+" "+s.sSortableDesc+" "+s.sSortableNone);if(r.bJUI){e("th span."+s.sSortIcon+", td span."+s.sSortIcon,u).detach();e("th, td",u).each(function(){var t=e("div."+s.sSortJUIWrapper,this);e(this).append(t.contents());t.detach()})}!t&&o&&o.insertBefore(a,r.nTableReinsertBefore);d.children().detach();d.append(h);p.css("width",r.sDestroyWidth).removeClass(s.sTable);i=r.asDestroyStripes.length;i&&d.children().each(function(t){e(this).addClass(r.asDestroyStripes[t%i])});var g=e.inArray(r,Xt.settings);-1!==g&&Xt.settings.splice(g,1)})});Xt.version="1.10.2";Xt.settings=[];Xt.models={};Xt.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};Xt.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null};Xt.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};Xt.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(t){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(n){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:e.extend({},Xt.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null};t(Xt.defaults);Xt.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};t(Xt.defaults.column);Xt.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:o,oAjaxData:o,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Vt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Vt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,r=this.aiDisplay.length,i=this.oFeatures,o=i.bPaginate;return i.bServerSide?o===!1||-1===e?t+r:Math.min(t+e,this._iRecordsDisplay):!o||n>r||-1===e?r:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{}};Xt.ext=Kt={classes:{},errMode:"alert",feature:[],search:[],internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Xt.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Xt.version};e.extend(Kt,{afnFiltering:Kt.search,aTypes:Kt.type.detect,ofnSearch:Kt.type.search,oSort:Kt.type.order,afnSortData:Kt.order,aoFeatures:Kt.feature,oApi:Kt.internal,oStdClasses:Kt.classes,oPagination:Kt.pager});e.extend(Xt.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});(function(){var t="";t="";var n=t+"ui-state-default",r=t+"css_right ui-icon ui-icon-",i=t+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";e.extend(Xt.ext.oJUIClasses,Xt.ext.classes,{sPageButton:"fg-button ui-button "+n,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:n+" sorting_asc",sSortDesc:n+" sorting_desc",sSortable:n+" sorting",sSortableAsc:n+" sorting_asc_disabled",sSortableDesc:n+" sorting_desc_disabled",sSortableNone:n+" sorting_disabled",sSortJUIAsc:r+"triangle-1-n",sSortJUIDesc:r+"triangle-1-s",sSortJUI:r+"carat-2-n-s",sSortJUIAscAllowed:r+"carat-1-n",sSortJUIDescAllowed:r+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+n,sScrollFoot:"dataTables_scrollFoot "+n,sHeaderTH:n,sFooterTH:n,sJUIHeader:i+" ui-corner-tl ui-corner-tr",sJUIFooter:i+" ui-corner-bl ui-corner-br"})})();var Wn=Xt.ext.pager;e.extend(Wn,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},simple_numbers:function(e,t){return["previous",Wt(e,t),"next"]},full_numbers:function(e,t){return["first","previous",Wt(e,t),"next","last"]},_numbers:Wt,numbers_length:7});e.extend(!0,Xt.ext.renderer,{pageButton:{_:function(t,n,r,o,s,a){var l,u,c=t.oClasses,p=t.oLanguage.oPaginate,d=0,f=function(n,i){var o,h,g,m,v=function(e){dt(t,e.data.action,!0)};for(o=0,h=i.length;h>o;o++){m=i[o];if(e.isArray(m)){var E=e("<"+(m.DT_el||"div")+"/>").appendTo(n);f(E,m)}else{l="";u="";switch(m){case"ellipsis":n.append("<span>&hellip;</span>");break;case"first":l=p.sFirst;u=m+(s>0?"":" "+c.sPageButtonDisabled);break;case"previous":l=p.sPrevious;u=m+(s>0?"":" "+c.sPageButtonDisabled);break;case"next":l=p.sNext;u=m+(a-1>s?"":" "+c.sPageButtonDisabled);break;case"last":l=p.sLast;u=m+(a-1>s?"":" "+c.sPageButtonDisabled);break;default:l=m+1;u=s===m?c.sPageButtonActive:""}if(l){g=e("<a>",{"class":c.sPageButton+" "+u,"aria-controls":t.sTableId,"data-dt-idx":d,tabindex:t.iTabIndex,id:0===r&&"string"==typeof m?t.sTableId+"_"+m:null}).html(l).appendTo(n);Gt(g,{action:m},v);d++}}}};try{var h=e(i.activeElement).data("dt-idx");f(e(n).empty(),o);null!==h&&e(n).find("[data-dt-idx="+h+"]").focus()}catch(g){}}}});var zn=function(e,t,n,r){if(!e||"-"===e)return-1/0;t&&(e=un(e,t));if(e.replace){n&&(e=e.replace(n,""));r&&(e=e.replace(r,""))}return 1*e};e.extend(Kt.type.order,{"date-pre":function(e){return Date.parse(e)||0},"html-pre":function(e){return an(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return an(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return t>e?-1:e>t?1:0},"string-desc":function(e,t){return t>e?1:e>t?-1:0}});zt("");e.extend(Xt.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return cn(e,n)?"num"+n:null},function(e){if(e&&(!nn.test(e)||!rn.test(e)))return null;var t=Date.parse(e);return null!==t&&!isNaN(t)||an(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return cn(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return dn(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return dn(e,n,!0)?"html-num-fmt"+n:null},function(e){return an(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]);e.extend(Xt.ext.type.search,{html:function(e){return an(e)?e:"string"==typeof e?e.replace(en," ").replace(tn,""):""},string:function(e){return an(e)?e:"string"==typeof e?e.replace(en," "):e}});e.extend(!0,Xt.ext.renderer,{header:{_:function(t,n,r,i){e(t.nTable).on("order.dt.DT",function(e,o,s,a){if(t===o){var l=r.idx;n.removeClass(r.sSortingClass+" "+i.sSortAsc+" "+i.sSortDesc).addClass("asc"==a[l]?i.sSortAsc:"desc"==a[l]?i.sSortDesc:r.sSortingClass)}})},jqueryui:function(t,n,r,i){var o=r.idx;e("<div/>").addClass(i.sSortJUIWrapper).append(n.contents()).append(e("<span/>").addClass(i.sSortIcon+" "+r.sSortingClassJUI)).appendTo(n);e(t.nTable).on("order.dt.DT",function(e,s,a,l){if(t===s){n.removeClass(i.sSortAsc+" "+i.sSortDesc).addClass("asc"==l[o]?i.sSortAsc:"desc"==l[o]?i.sSortDesc:r.sSortingClass);n.find("span."+i.sSortIcon).removeClass(i.sSortJUIAsc+" "+i.sSortJUIDesc+" "+i.sSortJUI+" "+i.sSortJUIAscAllowed+" "+i.sSortJUIDescAllowed).addClass("asc"==l[o]?i.sSortJUIAsc:"desc"==l[o]?i.sSortJUIDesc:r.sSortingClassJUI)}})}}});Xt.render={number:function(e,t,n,r){return{display:function(i){var o=0>i?"-":"";i=Math.abs(parseFloat(i));var s=parseInt(i,10),a=n?t+(i-s).toFixed(n).substring(2):"";return o+(r||"")+s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+a}}}};e.extend(Xt.ext.internal,{_fnExternApiFunc:$t,_fnBuildAjax:H,_fnAjaxUpdate:V,_fnAjaxParameters:W,_fnAjaxUpdateDraw:z,_fnAjaxDataSrc:$,_fnAddColumn:p,_fnColumnOptions:d,_fnAdjustColumnSizing:f,_fnVisibleToColumnIndex:h,_fnColumnIndexToVisible:g,_fnVisbleColumns:m,_fnGetColumns:v,_fnColumnTypes:E,_fnApplyColumnDefs:y,_fnHungarianMap:t,_fnCamelToHungarian:r,_fnLanguageCompat:s,_fnBrowserDetect:u,_fnAddData:x,_fnAddTr:b,_fnNodeToDataIndex:T,_fnNodeToColumnIndex:S,_fnGetCellData:N,_fnSetCellData:C,_fnSplitObjNotation:L,_fnGetObjectDataFn:A,_fnSetObjectDataFn:I,_fnGetDataMaster:w,_fnClearTable:R,_fnDeleteIndex:O,_fnInvalidateRow:_,_fnGetRowElements:D,_fnCreateTr:k,_fnBuildHead:P,_fnDrawHead:M,_fnDraw:j,_fnReDraw:G,_fnAddOptionsHtml:B,_fnDetectHeader:U,_fnGetUniqueThs:q,_fnFeatureHtmlFilter:X,_fnFilterComplete:K,_fnFilterCustom:Y,_fnFilterColumn:Q,_fnFilter:J,_fnFilterCreateSearch:Z,_fnEscapeRegex:et,_fnFilterData:tt,_fnFeatureHtmlInfo:it,_fnUpdateInfo:ot,_fnInfoMacros:st,_fnInitialise:at,_fnInitComplete:lt,_fnLengthChange:ut,_fnFeatureHtmlLength:ct,_fnFeatureHtmlPaginate:pt,_fnPageChange:dt,_fnFeatureHtmlProcessing:ft,_fnProcessingDisplay:ht,_fnFeatureHtmlTable:gt,_fnScrollDraw:mt,_fnApplyToChildren:vt,_fnCalculateColumnWidths:Et,_fnThrottle:yt,_fnConvertToWidth:xt,_fnScrollingWidthAdjust:bt,_fnGetWidestNode:Tt,_fnGetMaxLenString:St,_fnStringToCss:Nt,_fnScrollBarWidth:Ct,_fnSortFlatten:Lt,_fnSort:At,_fnSortAria:It,_fnSortListener:wt,_fnSortAttachListener:Rt,_fnSortingClasses:Ot,_fnSortData:_t,_fnSaveState:Dt,_fnLoadState:kt,_fnSettingsFromNode:Ft,_fnLog:Pt,_fnMap:Mt,_fnBindAction:Gt,_fnCallbackReg:Bt,_fnCallbackFire:Ut,_fnLengthOverflow:qt,_fnRenderer:Ht,_fnDataSource:Vt,_fnRowAttributes:F,_fnCalculateEnd:function(){}});e.fn.dataTable=Xt;e.fn.dataTableSettings=Xt.settings;e.fn.dataTableExt=Xt.ext;e.fn.DataTable=function(t){return e(this).dataTable(t).api()};e.each(Xt,function(t,n){e.fn.DataTable[t]=n});return e.fn.dataTable})})(window,document)},{jquery:63}],48:[function(e){var t,n=e("jquery"),r=n(document),i=n("head"),o=null,s=[],a=0,l="id",u="px",c="JColResizer",p=parseInt,d=Math,f=navigator.userAgent.indexOf("Trident/4.0")>0;try{t=sessionStorage}catch(h){}i.append("<style type='text/css'> .JColResizer{table-layout:fixed;} .JColResizer td, .JColResizer th{overflow:hidden;padding-left:0!important; padding-right:0!important;} .JCLRgrips{ height:0px; position:relative;} .JCLRgrip{margin-left:-5px; position:absolute; z-index:5; } .JCLRgrip .JColResizer{position:absolute;background-color:red;filter:alpha(opacity=1);opacity:0;width:10px;height:100%;top:0px} .JCLRLastGrip{position:absolute; width:1px; } .JCLRgripDrag{ border-left:1px dotted black; }</style>");var g=function(e,t){var r=n(e);if(t.disable)return m(r);var i=r.id=r.attr(l)||c+a++;r.p=t.postbackSafe;if(r.is("table")&&!s[i]){r.addClass(c).attr(l,i).before('<div class="JCLRgrips"/>');r.opt=t;r.g=[];r.c=[];r.w=r.width();r.gc=r.prev();t.marginLeft&&r.gc.css("marginLeft",t.marginLeft);t.marginRight&&r.gc.css("marginRight",t.marginRight);r.cs=p(f?e.cellSpacing||e.currentStyle.borderSpacing:r.css("border-spacing"))||2;r.b=p(f?e.border||e.currentStyle.borderLeftWidth:r.css("border-left-width"))||1;s[i]=r;v(r)}},m=function(e){var t=e.attr(l),e=s[t];if(e&&e.is("table")){e.removeClass(c).gc.remove();delete s[t]}},v=function(e){var r=e.find(">thead>tr>th,>thead>tr>td");r.length||(r=e.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td"));e.cg=e.find("col");e.ln=r.length;e.p&&t&&t[e.id]&&E(e,r);r.each(function(t){var r=n(this),i=n(e.gc.append('<div class="JCLRgrip"></div>')[0].lastChild);i.t=e;i.i=t;i.c=r;r.w=r.width();e.g.push(i);e.c.push(r);r.width(r.w).removeAttr("width");t<e.ln-1?i.bind("touchstart mousedown",S).append(e.opt.gripInnerHtml).append('<div class="'+c+'" style="cursor:'+e.opt.hoverCursor+'"></div>'):i.addClass("JCLRLastGrip").removeClass("JCLRgrip");i.data(c,{i:t,t:e.attr(l)})});e.cg.removeAttr("width");y(e);e.find("td, th").not(r).not("table th, table td").each(function(){n(this).removeAttr("width")})},E=function(e,n){var r,i=0,o=0,s=[];if(n){e.cg.removeAttr("width");if(e.opt.flush){t[e.id]="";return}r=t[e.id].split(";");for(;o<e.ln;o++){s.push(100*r[o]/r[e.ln]+"%");n.eq(o).css("width",s[o])}for(o=0;o<e.ln;o++)e.cg.eq(o).css("width",s[o])}else{t[e.id]="";for(;o<e.c.length;o++){r=e.c[o].width();t[e.id]+=r+";";i+=r}t[e.id]+=i}},y=function(e){e.gc.width(e.w);for(var t=0;t<e.ln;t++){var n=e.c[t];e.g[t].css({left:n.offset().left-e.offset().left+n.outerWidth(!1)+e.cs/2+u,height:e.opt.headerOnly?e.c[0].outerHeight(!1):e.outerHeight(!1)})}},x=function(e,t,n){var r=o.x-o.l,i=e.c[t],s=e.c[t+1],a=i.w+r,l=s.w-r;i.width(a+u);s.width(l+u);e.cg.eq(t).width(a+u);e.cg.eq(t+1).width(l+u);if(n){i.w=a;s.w=l}},b=function(e){if(o){var t=o.t;if(e.originalEvent.touches)var n=e.originalEvent.touches[0].pageX-o.ox+o.l;else var n=e.pageX-o.ox+o.l;var r=t.opt.minWidth,i=o.i,s=1.5*t.cs+r+t.b,a=i==t.ln-1?t.w-s:t.g[i+1].position().left-t.cs-r,l=i?t.g[i-1].position().left+t.cs+r:s;n=d.max(l,d.min(a,n));o.x=n;o.css("left",n+u);if(t.opt.liveDrag){x(t,i);y(t);var c=t.opt.onDrag;if(c){e.currentTarget=t[0];c(e)}}return!1}},T=function(e){r.unbind("touchend."+c+" mouseup."+c).unbind("touchmove."+c+" mousemove."+c);n("head :last-child").remove();if(o){o.removeClass(o.t.opt.draggingClass);var i=o.t,s=i.opt.onResize;if(o.x){x(i,o.i,!0);y(i);if(s){e.currentTarget=i[0];s(e)}}i.p&&t&&E(i);o=null}},S=function(e){var t=n(this).data(c),a=s[t.t],l=a.g[t.i];l.ox=e.originalEvent.touches?e.originalEvent.touches[0].pageX:e.pageX;l.l=l.position().left;r.bind("touchmove."+c+" mousemove."+c,b).bind("touchend."+c+" mouseup."+c,T);i.append("<style type='text/css'>*{cursor:"+a.opt.dragCursor+"!important}</style>");l.addClass(a.opt.draggingClass);o=l;if(a.c[t.i].l)for(var u,p=0;p<a.ln;p++){u=a.c[p];u.l=!1;u.w=u.width() }return!1},N=function(){for(t in s){var e,t=s[t],n=0;t.removeClass(c);if(t.w!=t.width()){t.w=t.width();for(e=0;e<t.ln;e++)n+=t.c[e].w;for(e=0;e<t.ln;e++)t.c[e].css("width",d.round(1e3*t.c[e].w/n)/10+"%").l=!0}y(t.addClass(c))}};n(window).bind("resize."+c,N);n.fn.extend({colResizable:function(e){var t={draggingClass:"JCLRgripDrag",gripInnerHtml:"",liveDrag:!1,minWidth:15,headerOnly:!1,hoverCursor:"e-resize",dragCursor:"e-resize",postbackSafe:!1,flush:!1,marginLeft:null,marginRight:null,disable:!1,onDrag:null,onResize:null},e=n.extend(t,e);return this.each(function(){g(this,e)})}})},{jquery:63}],49:[function(e){RegExp.escape=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};var t=e("jquery");t.csv={defaults:{separator:",",delimiter:'"',headers:!0},hooks:{castToScalar:function(e){var t=/\./;if(isNaN(e))return e;if(t.test(e))return parseFloat(e);var n=parseInt(e);return isNaN(n)?null:n}},parsers:{parse:function(e,t){function n(){l=0;u="";if(t.start&&t.state.rowNum<t.start){a=[];t.state.rowNum++;t.state.colNum=1}else{if(void 0===t.onParseEntry)s.push(a);else{var e=t.onParseEntry(a,t.state);e!==!1&&s.push(e)}a=[];t.end&&t.state.rowNum>=t.end&&(c=!0);t.state.rowNum++;t.state.colNum=1}}function r(){if(void 0===t.onParseValue)a.push(u);else{var e=t.onParseValue(u,t.state);e!==!1&&a.push(e)}u="";l=0;t.state.colNum++}var i=t.separator,o=t.delimiter;t.state.rowNum||(t.state.rowNum=1);t.state.colNum||(t.state.colNum=1);var s=[],a=[],l=0,u="",c=!1,p=RegExp.escape(i),d=RegExp.escape(o),f=/(D|S|\n|\r|[^DS\r\n]+)/,h=f.source;h=h.replace(/S/g,p);h=h.replace(/D/g,d);f=RegExp(h,"gm");e.replace(f,function(e){if(!c)switch(l){case 0:if(e===i){u+="";r();break}if(e===o){l=1;break}if("\n"===e){r();n();break}if(/^\r$/.test(e))break;u+=e;l=3;break;case 1:if(e===o){l=2;break}u+=e;l=1;break;case 2:if(e===o){u+=e;l=1;break}if(e===i){r();break}if("\n"===e){r();n();break}if(/^\r$/.test(e))break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===i){r();break}if("\n"===e){r();n();break}if(/^\r$/.test(e))break;if(e===o)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}});if(0!==a.length){r();n()}return s},splitLines:function(e,t){function n(){s=0;if(t.start&&t.state.rowNum<t.start){a="";t.state.rowNum++}else{if(void 0===t.onParseEntry)o.push(a);else{var e=t.onParseEntry(a,t.state);e!==!1&&o.push(e)}a="";t.end&&t.state.rowNum>=t.end&&(l=!0);t.state.rowNum++}}var r=t.separator,i=t.delimiter;t.state.rowNum||(t.state.rowNum=1);var o=[],s=0,a="",l=!1,u=RegExp.escape(r),c=RegExp.escape(i),p=/(D|S|\n|\r|[^DS\r\n]+)/,d=p.source;d=d.replace(/S/g,u);d=d.replace(/D/g,c);p=RegExp(d,"gm");e.replace(p,function(e){if(!l)switch(s){case 0:if(e===r){a+=e;s=0;break}if(e===i){a+=e;s=1;break}if("\n"===e){n();break}if(/^\r$/.test(e))break;a+=e;s=3;break;case 1:if(e===i){a+=e;s=2;break}a+=e;s=1;break;case 2:var o=a.substr(a.length-1);if(e===i&&o===i){a+=e;s=1;break}if(e===r){a+=e;s=0;break}if("\n"===e){n();break}if("\r"===e)break;throw new Error("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");case 3:if(e===r){a+=e;s=0;break}if("\n"===e){n();break}if("\r"===e)break;if(e===i)throw new Error("CSVDataError: Illegal quote [Row:"+t.state.rowNum+"]");throw new Error("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");default:throw new Error("CSVDataError: Unknown state [Row:"+t.state.rowNum+"]")}});""!==a&&n();return o},parseEntry:function(e,t){function n(){if(void 0===t.onParseValue)o.push(a);else{var e=t.onParseValue(a,t.state);e!==!1&&o.push(e)}a="";s=0;t.state.colNum++}var r=t.separator,i=t.delimiter;t.state.rowNum||(t.state.rowNum=1);t.state.colNum||(t.state.colNum=1);var o=[],s=0,a="";if(!t.match){var l=RegExp.escape(r),u=RegExp.escape(i),c=/(D|S|\n|\r|[^DS\r\n]+)/,p=c.source;p=p.replace(/S/g,l);p=p.replace(/D/g,u);t.match=RegExp(p,"gm")}e.replace(t.match,function(e){switch(s){case 0:if(e===r){a+="";n();break}if(e===i){s=1;break}if("\n"===e||"\r"===e)break;a+=e;s=3;break;case 1:if(e===i){s=2;break}a+=e;s=1;break;case 2:if(e===i){a+=e;s=1;break}if(e===r){n();break}if("\n"===e||"\r"===e)break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===r){n();break}if("\n"===e||"\r"===e)break;if(e===i)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}});n();return o}},toArray:function(e,n,r){var n=void 0!==n?n:{},i={};i.callback=void 0!==r&&"function"==typeof r?r:!1;i.separator="separator"in n?n.separator:t.csv.defaults.separator;i.delimiter="delimiter"in n?n.delimiter:t.csv.defaults.delimiter;var o=void 0!==n.state?n.state:{},n={delimiter:i.delimiter,separator:i.separator,onParseEntry:n.onParseEntry,onParseValue:n.onParseValue,state:o},s=t.csv.parsers.parseEntry(e,n);if(!i.callback)return s;i.callback("",s);return void 0},toArrays:function(e,n,r){var n=void 0!==n?n:{},i={};i.callback=void 0!==r&&"function"==typeof r?r:!1;i.separator="separator"in n?n.separator:t.csv.defaults.separator;i.delimiter="delimiter"in n?n.delimiter:t.csv.defaults.delimiter;var o=[],n={delimiter:i.delimiter,separator:i.separator,onParseEntry:n.onParseEntry,onParseValue:n.onParseValue,start:n.start,end:n.end,state:{rowNum:1,colNum:1}};o=t.csv.parsers.parse(e,n);if(!i.callback)return o;i.callback("",o);return void 0},toObjects:function(e,n,r){var n=void 0!==n?n:{},i={};i.callback=void 0!==r&&"function"==typeof r?r:!1;i.separator="separator"in n?n.separator:t.csv.defaults.separator;i.delimiter="delimiter"in n?n.delimiter:t.csv.defaults.delimiter;i.headers="headers"in n?n.headers:t.csv.defaults.headers;n.start="start"in n?n.start:1;i.headers&&n.start++;n.end&&i.headers&&n.end++;var o=[],s=[],n={delimiter:i.delimiter,separator:i.separator,onParseEntry:n.onParseEntry,onParseValue:n.onParseValue,start:n.start,end:n.end,state:{rowNum:1,colNum:1},match:!1},a={delimiter:i.delimiter,separator:i.separator,start:1,end:1,state:{rowNum:1,colNum:1}},l=t.csv.parsers.splitLines(e,a),u=t.csv.toArray(l[0],n),o=t.csv.parsers.splitLines(e,n);n.state.colNum=1;n.state.rowNum=u?2:1;for(var c=0,p=o.length;p>c;c++){var d=t.csv.toArray(o[c],n),f={};for(var h in u)f[u[h]]=d[h];s.push(f);n.state.rowNum++}if(!i.callback)return s;i.callback("",s);return void 0},fromArrays:function(e,n,r){var n=void 0!==n?n:{},o={};o.callback=void 0!==r&&"function"==typeof r?r:!1;o.separator="separator"in n?n.separator:t.csv.defaults.separator;o.delimiter="delimiter"in n?n.delimiter:t.csv.defaults.delimiter;o.escaper="escaper"in n?n.escaper:t.csv.defaults.escaper;o.experimental="experimental"in n?n.experimental:!1;if(!o.experimental)throw new Error("not implemented");var s=[];for(i in e)s.push(e[i]);if(!o.callback)return s;o.callback("",s);return void 0},fromObjects2CSV:function(e,n,r){var n=void 0!==n?n:{},o={};o.callback=void 0!==r&&"function"==typeof r?r:!1;o.separator="separator"in n?n.separator:t.csv.defaults.separator;o.delimiter="delimiter"in n?n.delimiter:t.csv.defaults.delimiter;o.experimental="experimental"in n?n.experimental:!1;if(!o.experimental)throw new Error("not implemented");var s=[];for(i in e)s.push(arrays[i]);if(!o.callback)return s;o.callback("",s);return void 0}};t.csvEntry2Array=t.csv.toArray;t.csv2Array=t.csv.toArrays;t.csv2Dictionary=t.csv.toObjects},{jquery:63}],50:[function(e,t){t.exports=e(17)},{"../../lib/codemirror":55,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/edit/matchbrackets.js":17}],51:[function(e,t){t.exports=e(18)},{"../../lib/codemirror":55,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/fold/brace-fold.js":18}],52:[function(e,t){t.exports=e(19)},{"../../lib/codemirror":55,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/fold/foldcode.js":19}],53:[function(e,t){t.exports=e(20)},{"../../lib/codemirror":55,"./foldcode":52,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/fold/foldgutter.js":20}],54:[function(e,t){t.exports=e(21)},{"../../lib/codemirror":55,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/fold/xml-fold.js":21}],55:[function(e,t){t.exports=e(25)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/lib/codemirror.js":25}],56:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.defineMode("javascript",function(t,n){function r(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function i(e,t,n){gt=e;mt=n;return t}function o(e,t){var n=e.next();if('"'==n||"'"==n){t.tokenize=s(n);return t.tokenize(e,t)}if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==n&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return i(n);if("="==n&&e.eat(">"))return i("=>","operator");if("0"==n&&e.eat(/x/i)){e.eatWhile(/[\da-f]/i);return i("number","number")}if(/\d/.test(n)){e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return i("number","number")}if("/"==n){if(e.eat("*")){t.tokenize=a;return a(e,t)}if(e.eat("/")){e.skipToEnd();return i("comment","comment")}if("operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)){r(e);e.eatWhile(/[gimy]/);return i("regexp","string-2")}e.eatWhile(Nt);return i("operator","operator",e.current())}if("`"==n){t.tokenize=l;return l(e,t)}if("#"==n){e.skipToEnd();return i("error","error")}if(Nt.test(n)){e.eatWhile(Nt);return i("operator","operator",e.current())}if(Tt.test(n)){e.eatWhile(Tt);var o=e.current(),u=St.propertyIsEnumerable(o)&&St[o];return u&&"."!=t.lastType?i(u.type,u.style,o):i("variable","variable",o)}}function s(e){return function(t,n){var r,s=!1;if(yt&&"@"==t.peek()&&t.match(Ct)){n.tokenize=o;return i("jsonld-keyword","meta")}for(;null!=(r=t.next())&&(r!=e||s);)s=!s&&"\\"==r;s||(n.tokenize=o);return i("string","string")}}function a(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),a=Lt.indexOf(s);if(a>=0&&3>a){if(!r){++o;break}if(0==--r)break}else if(a>=3&&6>a)++r;else if(Tt.test(s))i=!0;else{if(/["'\/]/.test(s))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function c(e,t,n,r,i,o){this.indented=e;this.column=t;this.type=n;this.prev=i;this.info=o;null!=r&&(this.align=r)}function p(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;It.state=e;It.stream=i;It.marked=null,It.cc=o;It.style=t;e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);for(;;){var s=o.length?o.pop():xt?T:b;if(s(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return It.marked?It.marked:"variable"==n&&p(e,r)?"variable-2":t}}}function f(){for(var e=arguments.length-1;e>=0;e--)It.cc.push(arguments[e])}function h(){f.apply(null,arguments);return!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=It.state;if(r.context){It.marked="def";if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function m(){It.state.context={prev:It.state.context,vars:It.state.localVars};It.state.localVars=wt}function v(){It.state.localVars=It.state.context.vars;It.state.context=It.state.context.prev}function E(e,t){var n=function(){var n=It.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new c(r,It.stream.column(),e,null,n.lexical,t)};n.lex=!0;return n}function y(){var e=It.state;if(e.lexical.prev){")"==e.lexical.type&&(e.indented=e.lexical.indented);e.lexical=e.lexical.prev}}function x(e){function t(n){return n==e?h():";"==e?f():h(t)}return t}function b(e,t){if("var"==e)return h(E("vardef",t.length),H,x(";"),y);if("keyword a"==e)return h(E("form"),T,b,y);if("keyword b"==e)return h(E("form"),b,y);if("{"==e)return h(E("}"),B,y);if(";"==e)return h();if("if"==e){"else"==It.state.lexical.info&&It.state.cc[It.state.cc.length-1]==y&&It.state.cc.pop()();return h(E("form"),T,b,y,X)}return"function"==e?h(et):"for"==e?h(E("form"),K,b,y):"variable"==e?h(E("stat"),D):"switch"==e?h(E("form"),T,E("}","switch"),x("{"),B,y,y):"case"==e?h(T,x(":")):"default"==e?h(x(":")):"catch"==e?h(E("form"),m,x("("),tt,x(")"),b,y,v):"module"==e?h(E("form"),m,st,v,y):"class"==e?h(E("form"),nt,y):"export"==e?h(E("form"),at,y):"import"==e?h(E("form"),lt,y):f(E("stat"),T,x(";"),y)}function T(e){return N(e,!1)}function S(e){return N(e,!0)}function N(e,t){if(It.state.fatArrowAt==It.stream.start){var n=t?_:O;if("("==e)return h(m,E(")"),j(V,")"),y,x("=>"),n,v);if("variable"==e)return f(m,V,x("=>"),n,v)}var r=t?I:A;return At.hasOwnProperty(e)?h(r):"function"==e?h(et,r):"keyword c"==e?h(t?L:C):"("==e?h(E(")"),C,ft,x(")"),y,r):"operator"==e||"spread"==e?h(t?S:T):"["==e?h(E("]"),pt,y,r):"{"==e?G(F,"}",null,r):"quasi"==e?f(w,r):h()}function C(e){return e.match(/[;\}\)\],]/)?f():f(T)}function L(e){return e.match(/[;\}\)\],]/)?f():f(S)}function A(e,t){return","==e?h(T):I(e,t,!1)}function I(e,t,n){var r=0==n?A:I,i=0==n?T:S;return"=>"==e?h(m,n?_:O,v):"operator"==e?/\+\+|--/.test(t)?h(r):"?"==t?h(T,x(":"),i):h(i):"quasi"==e?f(w,r):";"!=e?"("==e?G(S,")","call",r):"."==e?h(k,r):"["==e?h(E("]"),C,x("]"),y,r):void 0:void 0}function w(e,t){return"quasi"!=e?f():"${"!=t.slice(t.length-2)?h(w):h(T,R)}function R(e){if("}"==e){It.marked="string-2";It.state.tokenize=l;return h(w)}}function O(e){u(It.stream,It.state);return f("{"==e?b:T)}function _(e){u(It.stream,It.state);return f("{"==e?b:S)}function D(e){return":"==e?h(y,b):f(A,x(";"),y)}function k(e){if("variable"==e){It.marked="property";return h()}}function F(e,t){if("variable"==e||"keyword"==It.style){It.marked="property";return h("get"==t||"set"==t?P:M)}if("number"==e||"string"==e){It.marked=yt?"property":It.style+" property";return h(M)}return"jsonld-keyword"==e?h(M):"["==e?h(T,x("]"),M):void 0}function P(e){if("variable"!=e)return f(M);It.marked="property";return h(et)}function M(e){return":"==e?h(S):"("==e?f(et):void 0}function j(e,t){function n(r){if(","==r){var i=It.state.lexical;"call"==i.info&&(i.pos=(i.pos||0)+1);return h(e,n)}return r==t?h():h(x(t))}return function(r){return r==t?h():f(e,n)}}function G(e,t,n){for(var r=3;r<arguments.length;r++)It.cc.push(arguments[r]);return h(E(t,n),j(e,t),y)}function B(e){return"}"==e?h():f(b,B)}function U(e){return bt&&":"==e?h(q):void 0}function q(e){if("variable"==e){It.marked="variable-3";return h()}}function H(){return f(V,U,z,$)}function V(e,t){if("variable"==e){g(t);return h()}return"["==e?G(V,"]"):"{"==e?G(W,"}"):void 0}function W(e,t){if("variable"==e&&!It.stream.match(/^\s*:/,!1)){g(t);return h(z)}"variable"==e&&(It.marked="property");return h(x(":"),V,z)}function z(e,t){return"="==t?h(S):void 0}function $(e){return","==e?h(H):void 0}function X(e,t){return"keyword b"==e&&"else"==t?h(E("form","else"),b,y):void 0}function K(e){return"("==e?h(E(")"),Y,x(")"),y):void 0}function Y(e){return"var"==e?h(H,x(";"),J):";"==e?h(J):"variable"==e?h(Q):f(T,x(";"),J)}function Q(e,t){if("in"==t||"of"==t){It.marked="keyword";return h(T)}return h(A,J)}function J(e,t){if(";"==e)return h(Z);if("in"==t||"of"==t){It.marked="keyword";return h(T)}return f(T,x(";"),Z)}function Z(e){")"!=e&&h(T)}function et(e,t){if("*"==t){It.marked="keyword";return h(et)}if("variable"==e){g(t);return h(et)}return"("==e?h(m,E(")"),j(tt,")"),y,b,v):void 0}function tt(e){return"spread"==e?h(tt):f(V,U)}function nt(e,t){if("variable"==e){g(t);return h(rt)}}function rt(e,t){return"extends"==t?h(T,rt):"{"==e?h(E("}"),it,y):void 0}function it(e,t){if("variable"==e||"keyword"==It.style){It.marked="property";return"get"==t||"set"==t?h(ot,et,it):h(et,it)}if("*"==t){It.marked="keyword";return h(it)}return";"==e?h(it):"}"==e?h():void 0}function ot(e){if("variable"!=e)return f();It.marked="property";return h()}function st(e,t){if("string"==e)return h(b);if("variable"==e){g(t);return h(ct)}}function at(e,t){if("*"==t){It.marked="keyword";return h(ct,x(";"))}if("default"==t){It.marked="keyword";return h(T,x(";"))}return f(b)}function lt(e){return"string"==e?h():f(ut,ct)}function ut(e,t){if("{"==e)return G(ut,"}");"variable"==e&&g(t);return h()}function ct(e,t){if("from"==t){It.marked="keyword";return h(T)}}function pt(e){return"]"==e?h():f(S,dt)}function dt(e){return"for"==e?f(ft,x("]")):","==e?h(j(L,"]")):f(j(S,"]"))}function ft(e){return"for"==e?h(K,ft):"if"==e?h(T,ft):void 0}function ht(e,t){return"operator"==e.lastType||","==e.lastType||Nt.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var gt,mt,vt=t.indentUnit,Et=n.statementIndent,yt=n.jsonld,xt=n.json||yt,bt=n.typescript,Tt=n.wordCharacters||/[\w$\xa1-\uffff]/,St=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},s={"if":e("if"),"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":r,"break":r,"continue":r,"new":r,"delete":r,"throw":r,"debugger":r,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),module:e("module"),"class":e("class"),"super":e("atom"),"yield":r,"export":e("export"),"import":e("import"),"extends":r};if(bt){var a={type:"variable",style:"variable-3"},l={"interface":e("interface"),"extends":e("extends"),constructor:e("constructor"),"public":e("public"),"private":e("private"),"protected":e("protected"),"static":e("static"),string:a,number:a,bool:a,any:a};for(var u in l)s[u]=l[u]}return s}(),Nt=/[+\-*&%=<>!?|~^]/,Ct=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Lt="([{}])",At={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},It={state:null,column:null,marked:null,cc:null},wt={name:"this",next:{name:"arguments"}};y.lex=!0;return{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new c((e||0)-vt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars);return t},token:function(e,t){if(e.sol()){t.lexical.hasOwnProperty("align")||(t.lexical.align=!1);t.indented=e.indentation();u(e,t)}if(t.tokenize!=a&&e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==gt)return n;t.lastType="operator"!=gt||"++"!=mt&&"--"!=mt?gt:"incdec";return d(t,n,gt,mt,e)},indent:function(t,r){if(t.tokenize==a)return e.Pass;if(t.tokenize!=o)return 0;var i=r&&r.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==y)s=s.prev;else if(u!=X)break}"stat"==s.type&&"}"==i&&(s=s.prev);Et&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var c=s.type,p=i==c;return"vardef"==c?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==c&&"{"==i?s.indented:"form"==c?s.indented+vt:"stat"==c?s.indented+(ht(t,r)?Et||vt:0):"switch"!=s.info||p||0==n.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:vt):s.indented+(/^(?:case|default)\b/.test(r)?vt:2*vt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:xt?null:"/*",blockCommentEnd:xt?null:"*/",lineComment:xt?null:"//",fold:"brace",helperType:xt?"json":"javascript",jsonldMode:yt,jsonMode:xt}});e.registerHelper("wordChars","javascript",/[\w$]/);e.defineMIME("text/javascript","javascript");e.defineMIME("text/ecmascript","javascript");e.defineMIME("application/javascript","javascript");e.defineMIME("application/x-javascript","javascript");e.defineMIME("application/ecmascript","javascript");e.defineMIME("application/json",{name:"javascript",json:!0});e.defineMIME("application/x-json",{name:"javascript",json:!0});e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0});e.defineMIME("text/typescript",{name:"javascript",typescript:!0});e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{"../../lib/codemirror":55}],57:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.defineMode("xml",function(t,n){function r(e,t){function n(n){t.tokenize=n;return n(e,t)}var r=e.next();if("<"==r){if(e.eat("!")){if(e.eat("["))return e.match("CDATA[")?n(s("atom","]]>")):null;if(e.match("--"))return n(s("comment","-->"));if(e.match("DOCTYPE",!0,!0)){e.eatWhile(/[\w\._\-]/);return n(a(1))}return null}if(e.eat("?")){e.eatWhile(/[\w\._\-]/);t.tokenize=s("meta","?>");return"meta"}S=e.eat("/")?"closeTag":"openTag";t.tokenize=i;return"tag bracket"}if("&"==r){var o;o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";");return o?"atom":"error"}e.eatWhile(/[^&<]/);return null}function i(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">")){t.tokenize=r;S=">"==n?"endTag":"selfcloseTag";return"tag bracket"}if("="==n){S="equals";return null}if("<"==n){t.tokenize=r;t.state=p;t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}if(/[\'\"]/.test(n)){t.tokenize=o(n);t.stringStartCol=e.column();return t.tokenize(e,t)}e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}function o(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=i;break}return"string"};t.isInAttribute=!0;return t}function s(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=r;break}n.next()}return e}}function a(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i){n.tokenize=a(e+1);return n.tokenize(t,n)}if(">"==i){if(1==e){n.tokenize=r;break}n.tokenize=a(e-1);return n.tokenize(t,n)}}return"meta"}}function l(e,t,n){this.prev=e.context;this.tagName=t;this.indent=e.indented;this.startOfLine=n;(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function c(e,t){for(var n;;){if(!e.context)return;n=e.context.tagName;if(!C.contextGrabbers.hasOwnProperty(n)||!C.contextGrabbers[n].hasOwnProperty(t))return;u(e)}}function p(e,t,n){if("openTag"==e){n.tagStart=t.column();return d}return"closeTag"==e?f:p}function d(e,t,n){if("word"==e){n.tagName=t.current();N="tag";return m}N="error";return d}function f(e,t,n){if("word"==e){var r=t.current();n.context&&n.context.tagName!=r&&C.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n);if(n.context&&n.context.tagName==r){N="tag";return h}N="tag error";return g}N="error";return g}function h(e,t,n){if("endTag"!=e){N="error";return h}u(n);return p}function g(e,t,n){N="error";return h(e,t,n)}function m(e,t,n){if("word"==e){N="attribute";return v}if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;n.tagName=n.tagStart=null;if("selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(r))c(n,r);else{c(n,r);n.context=new l(n,r,i==n.indented)}return p}N="error";return m}function v(e,t,n){if("equals"==e)return E;C.allowMissing||(N="error");return m(e,t,n)}function E(e,t,n){if("string"==e)return y;if("word"==e&&C.allowUnquoted){N="string";return m}N="error";return m(e,t,n)}function y(e,t,n){return"string"==e?y:m(e,t,n)}var x=t.indentUnit,b=n.multilineTagIndentFactor||1,T=n.multilineTagIndentPastTag;null==T&&(T=!0);var S,N,C=n.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},L=n.alignCDATA;return{startState:function(){return{tokenize:r,state:p,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){!t.tagName&&e.sol()&&(t.indented=e.indentation());if(e.eatSpace())return null;S=null;var n=t.tokenize(e,t);if((n||S)&&"comment"!=n){N=null;t.state=t.state(S||n,e,t);N&&(n="error"==N?n+" error":N)}return n},indent:function(t,n,o){var s=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+x;if(s&&s.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=r)return o?o.match(/^(\s*)/)[0].length:0;if(t.tagName)return T?t.tagStart+t.tagName.length+2:t.tagStart+x*b;if(L&&/<!\[CDATA\[/.test(n))return 0;var a=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(a&&a[1])for(;s;){if(s.tagName==a[2]){s=s.prev;break}if(!C.implicitlyClosed.hasOwnProperty(s.tagName))break;s=s.prev}else if(a)for(;s;){var l=C.contextGrabbers[s.tagName];if(!l||!l.hasOwnProperty(a[2]))break;s=s.prev}for(;s&&!s.startOfLine;)s=s.prev;return s?s.indent+x:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:n.htmlMode?"html":"xml",helperType:n.htmlMode?"html":"xml"}});e.defineMIME("text/xml","xml");e.defineMIME("application/xml","xml");e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":55}],58:[function(t,n){!function(){function t(e,t){return t>e?-1:e>t?1:e>=t?0:0/0}function r(e){return null===e?0/0:+e}function i(e){return!isNaN(e)}function o(e){return{left:function(t,n,r,i){arguments.length<3&&(r=0);arguments.length<4&&(i=t.length);for(;i>r;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){arguments.length<3&&(r=0);arguments.length<4&&(i=t.length);for(;i>r;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function s(e){return e.length}function a(e){for(var t=1;e*t%1;)t*=10;return t}function l(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function u(){this._=Object.create(null)}function c(e){return(e+="")===ya||e[0]===xa?xa+e:e}function p(e){return(e+="")[0]===xa?e.slice(1):e}function d(e){return c(e)in this._}function f(e){return(e=c(e))in this._&&delete this._[e]}function h(){var e=[];for(var t in this._)e.push(p(t));return e}function g(){var e=0;for(var t in this._)++e;return e}function m(){for(var e in this._)return!1;return!0}function v(){this._=Object.create(null)}function E(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function y(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=ba.length;r>n;++n){var i=ba[n]+t;if(i in e)return i}}function x(){}function b(){}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 u;t.on=function(t,i){var o,s=r.get(t);if(arguments.length<2)return s&&s.on;if(s){s.on=null;n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1));r.remove(t)}i&&n.push(r.set(t,{on:i}));return e};return t}function S(){ia.event.preventDefault()}function N(){for(var e,t=ia.event;e=t.sourceEvent;)t=e;return t}function C(e){for(var t=new b,n=0,r=arguments.length;++n<r;)t[arguments[n]]=T(t);t.of=function(n,r){return function(i){try{var o=i.sourceEvent=ia.event;i.target=e;ia.event=i;t[i.type].apply(n,r)}finally{ia.event=o}}};return t}function L(e){Sa(e,Ia);return e}function A(e){return"function"==typeof e?e:function(){return Na(e,this)}}function I(e){return"function"==typeof e?e:function(){return Ca(e,this)}}function w(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 s(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}function a(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}e=ia.ns.qualify(e);return null==t?e.local?r:n:"function"==typeof t?e.local?a:s:e.local?o:i}function R(e){return e.trim().replace(/\s+/g," ")}function O(e){return new RegExp("(?:^|\\s+)"+ia.requote(e)+"(?:\\s+|$)","g")}function _(e){return(e+"").trim().split(/^|\s+/)}function D(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=_(e).map(k);var i=e.length;return"function"==typeof t?r:n}function k(e){var t=O(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";if(r){t.lastIndex=0;t.test(i)||n.setAttribute("class",R(i+" "+e))}else n.setAttribute("class",R(i.replace(t," ")))}}function F(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 P(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 M(e){return"function"==typeof e?e:(e=ia.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,e)}}function j(){var e=this.parentNode;e&&e.removeChild(this)}function G(e){return{__data__:e}}function B(e){return function(){return Aa(this,e)}}function U(e){arguments.length||(e=t);return function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function q(e,t){for(var n=0,r=e.length;r>n;n++)for(var i,o=e[n],s=0,a=o.length;a>s;s++)(i=o[s])&&t(i,s,n);return e}function H(e){Sa(e,Ra);return e}function V(e){var t,n;return function(r,i,o){var s,a=e[o].update,l=a.length;o!=n&&(n=o,t=0);i>=t&&(t=i+1);for(;!(s=a[t])&&++t<l;);return s}}function W(e,t,n){function r(){var t=this[s];if(t){this.removeEventListener(e,t,t.$);delete this[s]}}function i(){var i=l(t,sa(arguments));r.call(this);this.addEventListener(e,this[s]=i,i.$=n);i._=t}function o(){var t,n=new RegExp("^__on([^.]+)"+ia.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 s="__on"+e,a=e.indexOf("."),l=z;a>0&&(e=e.slice(0,a));var u=_a.get(e);u&&(e=u,l=$);return a?t?i:r:t?x:o}function z(e,t){return function(n){var r=ia.event;ia.event=n;t[0]=this.__data__;try{e.apply(this,t)}finally{ia.event=r}}}function $(e,t){var n=z(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function X(){var e=".dragsuppress-"+ ++ka,t="click"+e,n=ia.select(ua).on("touchmove"+e,S).on("dragstart"+e,S).on("selectstart"+e,S);if(Da){var r=la.style,i=r[Da]; r[Da]="none"}return function(o){n.on(e,null);Da&&(r[Da]=i);if(o){var s=function(){n.on(t,null)};n.on(t,function(){S();s()},!0);setTimeout(s,0)}}}function K(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Fa&&(ua.scrollX||ua.scrollY)){n=ia.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=n[0][0].getScreenCTM();Fa=!(i.f||i.e);n.remove()}Fa?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY);r=r.matrixTransform(e.getScreenCTM().inverse());return[r.x,r.y]}var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}function Y(){return ia.event.changedTouches[0].identifier}function Q(){return ia.event.target}function J(){return ua}function Z(e){return e>0?1:0>e?-1:0}function et(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function tt(e){return e>1?0:-1>e?ja:Math.acos(e)}function nt(e){return e>1?Ua:-1>e?-Ua:Math.asin(e)}function rt(e){return((e=Math.exp(e))-1/e)/2}function it(e){return((e=Math.exp(e))+1/e)/2}function ot(e){return((e=Math.exp(2*e))-1)/(e+1)}function st(e){return(e=Math.sin(e/2))*e}function at(){}function lt(e,t,n){return this instanceof lt?void(this.h=+e,this.s=+t,this.l=+n):arguments.length<2?e instanceof lt?new lt(e.h,e.s,e.l):Tt(""+e,St,lt):new lt(e,t,n)}function ut(e,t,n){function r(e){e>360?e-=360:0>e&&(e+=360);return 60>e?o+(s-o)*e/60:180>e?s:240>e?o+(s-o)*(240-e)/60:o}function i(e){return Math.round(255*r(e))}var o,s;e=isNaN(e)?0:(e%=360)<0?e+360:e;t=isNaN(t)?0:0>t?0:t>1?1:t;n=0>n?0:n>1?1:n;s=.5>=n?n*(1+t):n+t-n*t;o=2*n-s;return new Et(i(e+120),i(e),i(e-120))}function ct(e,t,n){return this instanceof ct?void(this.h=+e,this.c=+t,this.l=+n):arguments.length<2?e instanceof ct?new ct(e.h,e.c,e.l):e instanceof dt?ht(e.l,e.a,e.b):ht((e=Nt((e=ia.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new ct(e,t,n)}function pt(e,t,n){isNaN(e)&&(e=0);isNaN(t)&&(t=0);return new dt(n,Math.cos(e*=qa)*t,Math.sin(e)*t)}function dt(e,t,n){return this instanceof dt?void(this.l=+e,this.a=+t,this.b=+n):arguments.length<2?e instanceof dt?new dt(e.l,e.a,e.b):e instanceof ct?pt(e.h,e.c,e.l):Nt((e=Et(e)).r,e.g,e.b):new dt(e,t,n)}function ft(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;i=gt(i)*Za;r=gt(r)*el;o=gt(o)*tl;return new Et(vt(3.2404542*i-1.5371385*r-.4985314*o),vt(-.969266*i+1.8760108*r+.041556*o),vt(.0556434*i-.2040259*r+1.0572252*o))}function ht(e,t,n){return e>0?new ct(Math.atan2(n,t)*Ha,Math.sqrt(t*t+n*n),e):new ct(0/0,0/0,e)}function gt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function mt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function vt(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function Et(e,t,n){return this instanceof Et?void(this.r=~~e,this.g=~~t,this.b=~~n):arguments.length<2?e instanceof Et?new Et(e.r,e.g,e.b):Tt(""+e,Et,ut):new Et(e,t,n)}function yt(e){return new Et(e>>16,e>>8&255,255&e)}function xt(e){return yt(e)+""}function bt(e){return 16>e?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function Tt(e,t,n){var r,i,o,s=0,a=0,l=0;r=/([a-z]+)\((.*)\)/i.exec(e);if(r){i=r[2].split(",");switch(r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Lt(i[0]),Lt(i[1]),Lt(i[2]))}}if(o=il.get(e))return t(o.r,o.g,o.b);if(null!=e&&"#"===e.charAt(0)&&!isNaN(o=parseInt(e.slice(1),16)))if(4===e.length){s=(3840&o)>>4;s=s>>4|s;a=240&o;a=a>>4|a;l=15&o;l=l<<4|l}else if(7===e.length){s=(16711680&o)>>16;a=(65280&o)>>8;l=255&o}return t(s,a,l)}function St(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),s=Math.max(e,t,n),a=s-o,l=(s+o)/2;if(a){i=.5>l?a/(s+o):a/(2-s-o);r=e==s?(t-n)/a+(n>t?6:0):t==s?(n-e)/a+2:(e-t)/a+4;r*=60}else{r=0/0;i=l>0&&1>l?0:r}return new lt(r,i,l)}function Nt(e,t,n){e=Ct(e);t=Ct(t);n=Ct(n);var r=mt((.4124564*e+.3575761*t+.1804375*n)/Za),i=mt((.2126729*e+.7151522*t+.072175*n)/el),o=mt((.0193339*e+.119192*t+.9503041*n)/tl);return dt(116*i-16,500*(r-i),200*(i-o))}function Ct(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Lt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function At(e){return"function"==typeof e?e:function(){return e}}function It(e){return e}function wt(e){return function(t,n,r){2===arguments.length&&"function"==typeof n&&(r=n,n=null);return Rt(t,n,e,r)}}function Rt(e,t,n,r){function i(){var e,t=l.status;if(!t&&_t(l)||t>=200&&300>t||304===t){try{e=n.call(o,l)}catch(r){s.error.call(o,r);return}s.load.call(o,e)}else s.error.call(o,l)}var o={},s=ia.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,u=null;!ua.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=ia.event;ia.event=e;try{s.progress.call(o,l)}finally{ia.event=t}};o.header=function(e,t){e=(e+"").toLowerCase();if(arguments.length<2)return a[e];null==t?delete a[e]:a[e]=t+"";return o};o.mimeType=function(e){if(!arguments.length)return t;t=null==e?null:e+"";return o};o.responseType=function(e){if(!arguments.length)return u;u=e;return o};o.response=function(e){n=e;return o};["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(sa(arguments)))}});o.send=function(n,r,i){2===arguments.length&&"function"==typeof r&&(i=r,r=null);l.open(n,e,!0);null==t||"accept"in a||(a.accept=t+",*/*");if(l.setRequestHeader)for(var c in a)l.setRequestHeader(c,a[c]);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)});s.beforesend.call(o,l);l.send(null==r?null:r);return o};o.abort=function(){l.abort();return o};ia.rebind(o,s,"on");return null==r?o:o.get(Ot(r))}function Ot(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function _t(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Dt(){var e=kt(),t=Ft()-e;if(t>24){if(isFinite(t)){clearTimeout(ll);ll=setTimeout(Dt,t)}al=0}else{al=1;cl(Dt)}}function kt(){var e=Date.now();ul=ol;for(;ul;){e>=ul.t&&(ul.f=ul.c(e-ul.t));ul=ul.n}return e}function Ft(){for(var e,t=ol,n=1/0;t;)if(t.f)t=e?e.n=t.n:ol=t.n;else{t.t<n&&(n=t.t);t=(e=t).n}sl=e;return n}function Pt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Mt(e,t){var n=Math.pow(10,3*Ea(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function jt(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=[],s=0,a=r[0],l=0;i>0&&a>0;){l+a+1>t&&(a=Math.max(1,t-l));o.push(e.substring(i-=a,i+a));if((l+=a+1)>t)break;a=r[s=(s+1)%r.length]}return o.reverse().join(n)}:It;return function(e){var n=dl.exec(e),r=n[1]||" ",s=n[2]||">",a=n[3]||"-",l=n[4]||"",u=n[5],c=+n[6],p=n[7],d=n[8],f=n[9],h=1,g="",m="",v=!1,E=!0;d&&(d=+d.substring(1));if(u||"0"===r&&"="===s){u=r="0";s="="}switch(f){case"n":p=!0;f="g";break;case"%":h=100;m="%";f="f";break;case"p":h=100;m="%";f="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+f.toLowerCase());case"c":E=!1;case"d":v=!0;d=0;break;case"s":h=-1;f="r"}"$"===l&&(g=i[0],m=i[1]);"r"!=f||d||(f="g");null!=d&&("g"==f?d=Math.max(1,Math.min(21,d)):("e"==f||"f"==f)&&(d=Math.max(0,Math.min(20,d))));f=fl.get(f)||Gt;var y=u&&p;return function(e){var n=m;if(v&&e%1)return"";var i=0>e||0===e&&0>1/e?(e=-e,"-"):"-"===a?"":a;if(0>h){var l=ia.formatPrefix(e,d);e=l.scale(e);n=l.symbol+m}else e*=h;e=f(e,d);var x,b,T=e.lastIndexOf(".");if(0>T){var S=E?e.lastIndexOf("e"):-1;0>S?(x=e,b=""):(x=e.substring(0,S),b=e.substring(S))}else{x=e.substring(0,T);b=t+e.substring(T+1)}!u&&p&&(x=o(x,1/0));var N=g.length+x.length+b.length+(y?0:i.length),C=c>N?new Array(N=c-N+1).join(r):"";y&&(x=o(C+x,C.length?c-b.length:1/0));i+=g;e=x+b;return("<"===s?i+e+C:">"===s?C+i+e:"^"===s?C.substring(0,N>>=1)+i+e+C.substring(N):i+(y?e:C+e))+n}}}function Gt(e){return e+""}function Bt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ut(e,t,n){function r(t){var n=e(t),r=o(n,1);return r-t>t-n?n:r}function i(n){t(n=e(new gl(n-1)),1);return n}function o(e,n){t(e=new gl(+e),n);return e}function s(e,r,o){var s=i(e),a=[];if(o>1)for(;r>s;){n(s)%o||a.push(new Date(+s));t(s,1)}else for(;r>s;)a.push(new Date(+s)),t(s,1);return a}function a(e,t,n){try{gl=Bt;var r=new Bt;r._=e;return s(r,t,n)}finally{gl=Date}}e.floor=e;e.round=r;e.ceil=i;e.offset=o;e.range=s;var l=e.utc=qt(e);l.floor=l;l.round=qt(r);l.ceil=qt(i);l.offset=qt(o);l.range=a;return e}function qt(e){return function(t,n){try{gl=Bt;var r=new Bt;r._=t;return e(r,n)._}finally{gl=Date}}}function Ht(e){function t(e){function t(t){for(var n,i,o,s=[],a=-1,l=0;++a<r;)if(37===e.charCodeAt(a)){s.push(e.slice(l,a));null!=(i=vl[n=e.charAt(++a)])&&(n=e.charAt(++a));(o=I[n])&&(n=o(t,null==i?"e"===n?" ":"0":i));s.push(n);l=a+1}s.push(e.slice(l,a));return s.join("")}var r=e.length;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&&gl!==Bt,s=new(o?Bt:gl);if("j"in r)s.setFullYear(r.y,0,r.j);else if("w"in r&&("W"in r||"U"in r)){s.setFullYear(r.y,0,1);s.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(s.getDay()+5)%7:r.w+7*r.U-(s.getDay()+6)%7)}else s.setFullYear(r.y,r.m,r.d);s.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L);return o?s._:s};t.toString=function(){return e};return t}function n(e,t,n,r){for(var i,o,s,a=0,l=t.length,u=n.length;l>a;){if(r>=u)return-1;i=t.charCodeAt(a++);if(37===i){s=t.charAt(a++);o=w[s in vl?t.charAt(a++):s];if(!o||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){T.lastIndex=0;var r=T.exec(t.slice(n));return r?(e.w=S.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){x.lastIndex=0;var r=x.exec(t.slice(n));return r?(e.w=b.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){L.lastIndex=0;var r=L.exec(t.slice(n));return r?(e.m=A.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,n){N.lastIndex=0;var r=N.exec(t.slice(n));return r?(e.m=C.get(r[0].toLowerCase()),n+r[0].length):-1}function a(e,t,r){return n(e,I.c.toString(),t,r)}function l(e,t,r){return n(e,I.x.toString(),t,r)}function u(e,t,r){return n(e,I.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 p=e.dateTime,d=e.date,f=e.time,h=e.periods,g=e.days,m=e.shortDays,v=e.months,E=e.shortMonths;t.utc=function(e){function n(e){try{gl=Bt;var t=new gl;t._=e;return r(t)}finally{gl=Date}}var r=t(e);n.parse=function(e){try{gl=Bt;var t=r.parse(e);return t&&t._}finally{gl=Date}};n.toString=r.toString;return n};t.multi=t.utc.multi=cn;var y=ia.map(),x=Wt(g),b=zt(g),T=Wt(m),S=zt(m),N=Wt(v),C=zt(v),L=Wt(E),A=zt(E);h.forEach(function(e,t){y.set(e.toLowerCase(),t)});var I={a:function(e){return m[e.getDay()]},A:function(e){return g[e.getDay()]},b:function(e){return E[e.getMonth()]},B:function(e){return v[e.getMonth()]},c:t(p),d:function(e,t){return Vt(e.getDate(),t,2)},e:function(e,t){return Vt(e.getDate(),t,2)},H:function(e,t){return Vt(e.getHours(),t,2)},I:function(e,t){return Vt(e.getHours()%12||12,t,2)},j:function(e,t){return Vt(1+hl.dayOfYear(e),t,3)},L:function(e,t){return Vt(e.getMilliseconds(),t,3)},m:function(e,t){return Vt(e.getMonth()+1,t,2)},M:function(e,t){return Vt(e.getMinutes(),t,2)},p:function(e){return h[+(e.getHours()>=12)]},S:function(e,t){return Vt(e.getSeconds(),t,2)},U:function(e,t){return Vt(hl.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Vt(hl.mondayOfYear(e),t,2)},x:t(d),X:t(f),y:function(e,t){return Vt(e.getFullYear()%100,t,2)},Y:function(e,t){return Vt(e.getFullYear()%1e4,t,4)},Z:ln,"%":function(){return"%"}},w={a:r,A:i,b:o,B:s,c:a,d:tn,e:tn,H:rn,I:rn,j:nn,L:an,m:en,M:on,p:c,S:sn,U:Xt,w:$t,W:Kt,x:l,X:u,y:Qt,Y:Yt,Z:Jt,"%":un};return t}function Vt(e,t,n){var r=0>e?"-":"",i=(r?-e:e)+"",o=i.length;return r+(n>o?new Array(n-o+1).join(t)+i:i)}function Wt(e){return new RegExp("^(?:"+e.map(ia.requote).join("|")+")","i")}function zt(e){for(var t=new u,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function $t(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Xt(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n));return r?(e.U=+r[0],n+r[0].length):-1}function Kt(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n));return r?(e.W=+r[0],n+r[0].length):-1}function Yt(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Qt(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+2));return r?(e.y=Zt(+r[0]),n+r[0].length):-1}function Jt(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function Zt(e){return e+(e>68?1900:2e3)}function en(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function tn(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function nn(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function rn(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function on(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sn(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function an(e,t,n){El.lastIndex=0;var r=El.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ln(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=Ea(t)/60|0,i=Ea(t)%60;return n+Vt(r,"0",2)+Vt(i,"0",2)}function un(e,t,n){yl.lastIndex=0;var r=yl.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function cn(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 pn(){}function dn(e,t,n){var r=n.s=e+t,i=r-e,o=r-i;n.t=e-o+(t-i)}function fn(e,t){e&&Sl.hasOwnProperty(e.type)&&Sl[e.type](e,t)}function hn(e,t,n){var r,i=-1,o=e.length-n;t.lineStart();for(;++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function gn(e,t){var n=-1,r=e.length;t.polygonStart();for(;++n<r;)hn(e[n],t,1);t.polygonEnd()}function mn(){function e(e,t){e*=qa;t=t*qa/2+ja/4;var n=e-r,s=n>=0?1:-1,a=s*n,l=Math.cos(t),u=Math.sin(t),c=o*u,p=i*l+c*Math.cos(a),d=c*s*Math.sin(a);Cl.add(Math.atan2(d,p));r=e,i=l,o=u}var t,n,r,i,o;Ll.point=function(s,a){Ll.point=e;r=(t=s)*qa,i=Math.cos(a=(n=a)*qa/2+ja/4),o=Math.sin(a)};Ll.lineEnd=function(){e(t,n)}}function vn(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 En(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function yn(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 xn(e,t){e[0]+=t[0];e[1]+=t[1];e[2]+=t[2]}function bn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Tn(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 Sn(e){return[Math.atan2(e[1],e[0]),nt(e[2])]}function Nn(e,t){return Ea(e[0]-t[0])<Pa&&Ea(e[1]-t[1])<Pa}function Cn(e,t){e*=qa;var n=Math.cos(t*=qa);Ln(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function Ln(e,t,n){++Al;wl+=(e-wl)/Al;Rl+=(t-Rl)/Al;Ol+=(n-Ol)/Al}function An(){function e(e,i){e*=qa;var o=Math.cos(i*=qa),s=o*Math.cos(e),a=o*Math.sin(e),l=Math.sin(i),u=Math.atan2(Math.sqrt((u=n*l-r*a)*u+(u=r*s-t*l)*u+(u=t*a-n*s)*u),t*s+n*a+r*l);Il+=u;_l+=u*(t+(t=s));Dl+=u*(n+(n=a));kl+=u*(r+(r=l));Ln(t,n,r)}var t,n,r;jl.point=function(i,o){i*=qa;var s=Math.cos(o*=qa);t=s*Math.cos(i);n=s*Math.sin(i);r=Math.sin(o);jl.point=e;Ln(t,n,r)}}function In(){jl.point=Cn}function wn(){function e(e,t){e*=qa;var n=Math.cos(t*=qa),s=n*Math.cos(e),a=n*Math.sin(e),l=Math.sin(t),u=i*l-o*a,c=o*s-r*l,p=r*a-i*s,d=Math.sqrt(u*u+c*c+p*p),f=r*s+i*a+o*l,h=d&&-tt(f)/d,g=Math.atan2(d,f);Fl+=h*u;Pl+=h*c;Ml+=h*p;Il+=g;_l+=g*(r+(r=s));Dl+=g*(i+(i=a));kl+=g*(o+(o=l));Ln(r,i,o)}var t,n,r,i,o;jl.point=function(s,a){t=s,n=a;jl.point=e;s*=qa;var l=Math.cos(a*=qa);r=l*Math.cos(s);i=l*Math.sin(s);o=Math.sin(a);Ln(r,i,o)};jl.lineEnd=function(){e(t,n);jl.lineEnd=In;jl.point=Cn}}function Rn(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])});return n}function On(){return!0}function _n(e,t,n,r,i){var o=[],s=[];e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(Nn(n,r)){i.lineStart();for(var a=0;t>a;++a)i.point((n=e[a])[0],n[1]);i.lineEnd()}else{var l=new kn(n,e,null,!0),u=new kn(n,null,l,!1);l.o=u;o.push(l);s.push(u);l=new kn(r,e,null,!1);u=new kn(r,null,l,!0);l.o=u;o.push(l);s.push(u)}}});s.sort(t);Dn(o);Dn(s);if(o.length){for(var a=0,l=n,u=s.length;u>a;++a)s[a].e=l=!l;for(var c,p,d=o[0];;){for(var f=d,h=!0;f.v;)if((f=f.n)===d)return;c=f.z;i.lineStart();do{f.v=f.o.v=!0;if(f.e){if(h)for(var a=0,u=c.length;u>a;++a)i.point((p=c[a])[0],p[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(h){c=f.p.z;for(var a=c.length-1;a>=0;--a)i.point((p=c[a])[0],p[1])}else r(f.x,f.p.x,-1,i);f=f.p}f=f.o;c=f.z;h=!h}while(!f.v);i.lineEnd()}}}function Dn(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 kn(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 Fn(e,t,n,r){return function(i,o){function s(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&o.point(t,n)}function a(e,t){var n=i(e,t);m.point(n[0],n[1])}function l(){E.point=a;m.lineStart()}function u(){E.point=s;m.lineEnd()}function c(e,t){g.push([e,t]);var n=i(e,t);x.point(n[0],n[1])}function p(){x.lineStart();g=[]}function d(){c(g[0][0],g[0][1]);x.lineEnd();var e,t=x.clean(),n=y.buffer(),r=n.length;g.pop();h.push(g);g=null;if(r)if(1&t){e=n[0];var i,r=e.length-1,s=-1;if(r>0){b||(o.polygonStart(),b=!0);o.lineStart();for(;++s<r;)o.point((i=e[s])[0],i[1]);o.lineEnd()}}else{r>1&&2&t&&n.push(n.pop().concat(n.shift()));f.push(n.filter(Pn))}}var f,h,g,m=t(o),v=i.invert(r[0],r[1]),E={point:s,lineStart:l,lineEnd:u,polygonStart:function(){E.point=c;E.lineStart=p;E.lineEnd=d;f=[];h=[]},polygonEnd:function(){E.point=s;E.lineStart=l;E.lineEnd=u;f=ia.merge(f);var e=qn(v,h);if(f.length){b||(o.polygonStart(),b=!0);_n(f,jn,e,n,o)}else if(e){b||(o.polygonStart(),b=!0);o.lineStart();n(null,null,1,o);o.lineEnd()}b&&(o.polygonEnd(),b=!1);f=h=null},sphere:function(){o.polygonStart();o.lineStart();n(null,null,1,o);o.lineEnd();o.polygonEnd()}},y=Mn(),x=t(y),b=!1;return E}}function Pn(e){return e.length>1}function Mn(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:x,buffer:function(){var n=t;t=[];e=null;return n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function jn(e,t){return((e=e.x)[0]<0?e[1]-Ua-Pa:Ua-e[1])-((t=t.x)[0]<0?t[1]-Ua-Pa:Ua-t[1])}function Gn(e){var t,n=0/0,r=0/0,i=0/0;return{lineStart:function(){e.lineStart();t=1},point:function(o,s){var a=o>0?ja:-ja,l=Ea(o-n);if(Ea(l-ja)<Pa){e.point(n,r=(r+s)/2>0?Ua:-Ua);e.point(i,r);e.lineEnd();e.lineStart();e.point(a,r);e.point(o,r);t=0}else if(i!==a&&l>=ja){Ea(n-i)<Pa&&(n-=i*Pa);Ea(o-a)<Pa&&(o-=a*Pa);r=Bn(n,r,o,s);e.point(i,r);e.lineEnd();e.lineStart();e.point(a,r);t=0}e.point(n=o,r=s);i=a},lineEnd:function(){e.lineEnd();n=r=0/0},clean:function(){return 2-t}}}function Bn(e,t,n,r){var i,o,s=Math.sin(e-n);return Ea(s)>Pa?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*s)):(t+r)/2}function Un(e,t,n,r){var i;if(null==e){i=n*Ua;r.point(-ja,i);r.point(0,i);r.point(ja,i);r.point(ja,0);r.point(ja,-i);r.point(0,-i);r.point(-ja,-i);r.point(-ja,0);r.point(-ja,i)}else if(Ea(e[0]-t[0])>Pa){var o=e[0]<t[0]?ja:-ja;i=n*o/2;r.point(-o,i);r.point(0,i);r.point(o,i)}else r.point(t[0],t[1])}function qn(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],o=0,s=0;Cl.reset();for(var a=0,l=t.length;l>a;++a){var u=t[a],c=u.length;if(c)for(var p=u[0],d=p[0],f=p[1]/2+ja/4,h=Math.sin(f),g=Math.cos(f),m=1;;){m===c&&(m=0);e=u[m];var v=e[0],E=e[1]/2+ja/4,y=Math.sin(E),x=Math.cos(E),b=v-d,T=b>=0?1:-1,S=T*b,N=S>ja,C=h*y;Cl.add(Math.atan2(C*T*Math.sin(S),g*x+C*Math.cos(S)));o+=N?b+T*Ga:b;if(N^d>=n^v>=n){var L=yn(vn(p),vn(e));Tn(L);var A=yn(i,L);Tn(A);var I=(N^b>=0?-1:1)*nt(A[2]);(r>I||r===I&&(L[0]||L[1]))&&(s+=N^b>=0?1:-1)}if(!m++)break;d=v,h=y,g=x,p=e}}return(-Pa>o||Pa>o&&0>Cl)^1&s}function Hn(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(p,d){var f,h=[p,d],g=t(p,d),m=s?g?0:i(p,d):g?i(p+(0>p?ja:-ja),d):0;!n&&(u=l=g)&&e.lineStart();if(g!==l){f=r(n,h);if(Nn(n,f)||Nn(h,f)){h[0]+=Pa;h[1]+=Pa;g=t(h[0],h[1])}}if(g!==l){c=0;if(g){e.lineStart();f=r(h,n);e.point(f[0],f[1])}else{f=r(n,h);e.point(f[0],f[1]);e.lineEnd()}n=f}else if(a&&n&&s^g){var v;if(!(m&o)&&(v=r(h,n,!0))){c=0;if(s){e.lineStart();e.point(v[0][0],v[0][1]);e.point(v[1][0],v[1][1]);e.lineEnd()}else{e.point(v[1][0],v[1][1]);e.lineEnd();e.lineStart();e.point(v[0][0],v[0][1])}}}!g||n&&Nn(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=vn(e),i=vn(t),s=[1,0,0],a=yn(r,i),l=En(a,a),u=a[0],c=l-u*u;if(!c)return!n&&e;var p=o*l/c,d=-o*u/c,f=yn(s,a),h=bn(s,p),g=bn(a,d);xn(h,g);var m=f,v=En(h,m),E=En(m,m),y=v*v-E*(En(h,h)-1);if(!(0>y)){var x=Math.sqrt(y),b=bn(m,(-v-x)/E);xn(b,h);b=Sn(b);if(!n)return b;var T,S=e[0],N=t[0],C=e[1],L=t[1];S>N&&(T=S,S=N,N=T);var A=N-S,I=Ea(A-ja)<Pa,w=I||Pa>A;!I&&C>L&&(T=C,C=L,L=T);if(w?I?C+L>0^b[1]<(Ea(b[0]-S)<Pa?C:L):C<=b[1]&&b[1]<=L:A>ja^(S<=b[0]&&b[0]<=N)){var R=bn(m,(-v+x)/E);xn(R,h);return[b,Sn(R)]}}}function i(t,n){var r=s?e:ja-e,i=0;-r>t?i|=1:t>r&&(i|=2);-r>n?i|=4:n>r&&(i|=8);return i}var o=Math.cos(e),s=o>0,a=Ea(o)>Pa,l=mr(e,6*qa);return Fn(t,n,l,s?[0,-e]:[-ja,e-ja])}function Vn(e,t,n,r){return function(i){var o,s=i.a,a=i.b,l=s.x,u=s.y,c=a.x,p=a.y,d=0,f=1,h=c-l,g=p-u;o=e-l;if(h||!(o>0)){o/=h;if(0>h){if(d>o)return;f>o&&(f=o)}else if(h>0){if(o>f)return;o>d&&(d=o)}o=n-l;if(h||!(0>o)){o/=h;if(0>h){if(o>f)return;o>d&&(d=o)}else if(h>0){if(d>o)return;f>o&&(f=o)}o=t-u;if(g||!(o>0)){o/=g;if(0>g){if(d>o)return;f>o&&(f=o)}else if(g>0){if(o>f)return;o>d&&(d=o)}o=r-u;if(g||!(0>o)){o/=g;if(0>g){if(o>f)return;o>d&&(d=o)}else if(g>0){if(d>o)return;f>o&&(f=o)}d>0&&(i.a={x:l+d*h,y:u+d*g});1>f&&(i.b={x:l+f*h,y:u+f*g});return i}}}}}}function Wn(e,t,n,r){function i(r,i){return Ea(r[0]-e)<Pa?i>0?0:3:Ea(r[0]-n)<Pa?i>0?2:1:Ea(r[1]-t)<Pa?i>0?1:0:i>0?3:2}function o(e,t){return s(e.x,t.x)}function s(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(a){function l(e){for(var t=0,n=m.length,r=e[1],i=0;n>i;++i)for(var o,s=1,a=m[i],l=a.length,u=a[0];l>s;++s){o=a[s];u[1]<=r?o[1]>r&&et(u,o,e)>0&&++t:o[1]<=r&&et(u,o,e)<0&&--t;u=o}return 0!==t}function u(o,a,l,u){var c=0,p=0;if(null==o||(c=i(o,l))!==(p=i(a,l))||s(o,a)<0^l>0){do u.point(0===c||3===c?e:n,c>1?r:t);while((c=(c+l+4)%4)!==p)}else u.point(a[0],a[1])}function c(i,o){return i>=e&&n>=i&&o>=t&&r>=o}function p(e,t){c(e,t)&&a.point(e,t)}function d(){w.point=h;m&&m.push(v=[]);N=!0;S=!1;b=T=0/0}function f(){if(g){h(E,y);x&&S&&A.rejoin();g.push(A.buffer())}w.point=p;S&&a.lineEnd()}function h(e,t){e=Math.max(-Bl,Math.min(Bl,e));t=Math.max(-Bl,Math.min(Bl,t));var n=c(e,t);m&&v.push([e,t]);if(N){E=e,y=t,x=n;N=!1;if(n){a.lineStart();a.point(e,t)}}else if(n&&S)a.point(e,t);else{var r={a:{x:b,y:T},b:{x:e,y:t}};if(I(r)){if(!S){a.lineStart();a.point(r.a.x,r.a.y)}a.point(r.b.x,r.b.y);n||a.lineEnd();C=!1}else if(n){a.lineStart();a.point(e,t);C=!1}}b=e,T=t,S=n}var g,m,v,E,y,x,b,T,S,N,C,L=a,A=Mn(),I=Vn(e,t,n,r),w={point:p,lineStart:d,lineEnd:f,polygonStart:function(){a=A;g=[];m=[];C=!0},polygonEnd:function(){a=L;g=ia.merge(g);var t=l([e,r]),n=C&&t,i=g.length;if(n||i){a.polygonStart();if(n){a.lineStart();u(null,null,1,a);a.lineEnd()}i&&_n(g,o,t,u,a);a.polygonEnd()}g=m=v=null}};return w}}function zn(e){var t=0,n=ja/3,r=lr(e),i=r(t,n);i.parallels=function(e){return arguments.length?r(t=e[0]*ja/180,n=e[1]*ja/180):[t/ja*180,n/ja*180]};return i}function $n(e,t){function n(e,t){var n=Math.sqrt(o-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),s-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),s=Math.sqrt(o)/i;n.invert=function(e,t){var n=s-t;return[Math.atan2(e,n)/i,nt((o-(e*e+n*n)*i*i)/(2*i))]};return n}function Xn(){function e(e,t){ql+=i*e-r*t;r=e,i=t}var t,n,r,i;$l.point=function(o,s){$l.point=e;t=r=o,n=i=s};$l.lineEnd=function(){e(t,n)}}function Kn(e,t){Hl>e&&(Hl=e);e>Wl&&(Wl=e);Vl>t&&(Vl=t);t>zl&&(zl=t)}function Yn(){function e(e,t){s.push("M",e,",",t,o)}function t(e,t){s.push("M",e,",",t);a.point=n}function n(e,t){s.push("L",e,",",t)}function r(){a.point=e}function i(){s.push("Z")}var o=Qn(4.5),s=[],a={point:e,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r;a.point=e},pointRadius:function(e){o=Qn(e);return a},result:function(){if(s.length){var e=s.join("");s=[];return e}}};return a}function Qn(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Jn(e,t){wl+=e;Rl+=t;++Ol}function Zn(){function e(e,r){var i=e-t,o=r-n,s=Math.sqrt(i*i+o*o);_l+=s*(t+e)/2;Dl+=s*(n+r)/2;kl+=s;Jn(t=e,n=r)}var t,n;Kl.point=function(r,i){Kl.point=e;Jn(t=r,n=i)}}function er(){Kl.point=Jn}function tr(){function e(e,t){var n=e-r,o=t-i,s=Math.sqrt(n*n+o*o);_l+=s*(r+e)/2;Dl+=s*(i+t)/2;kl+=s;s=i*e-r*t;Fl+=s*(r+e);Pl+=s*(i+t);Ml+=3*s;Jn(r=e,i=t)}var t,n,r,i;Kl.point=function(o,s){Kl.point=e;Jn(t=r=o,n=i=s)};Kl.lineEnd=function(){e(t,n)}}function nr(e){function t(t,n){e.moveTo(t+s,n);e.arc(t,n,s,0,Ga)}function n(t,n){e.moveTo(t,n);a.point=r}function r(t,n){e.lineTo(t,n)}function i(){a.point=t}function o(){e.closePath()}var s=4.5,a={point:t,lineStart:function(){a.point=n},lineEnd:i,polygonStart:function(){a.lineEnd=o},polygonEnd:function(){a.lineEnd=i;a.point=t},pointRadius:function(e){s=e;return a},result:x};return a}function rr(e){function t(e){return(a?r:n)(e)}function n(t){return sr(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=0/0;N.point=o;t.lineStart()}function o(n,r){var o=vn([n,r]),s=e(n,r);i(y,x,E,b,T,S,y=s[0],x=s[1],E=n,b=o[0],T=o[1],S=o[2],a,t);t.point(y,x)}function s(){N.point=n;t.lineEnd()}function l(){r();N.point=u;N.lineEnd=c}function u(e,t){o(p=e,d=t),f=y,h=x,g=b,m=T,v=S;N.point=o}function c(){i(y,x,E,b,T,S,f,h,p,g,m,v,a,t);N.lineEnd=s;s()}var p,d,f,h,g,m,v,E,y,x,b,T,S,N={point:n,lineStart:r,lineEnd:s,polygonStart:function(){t.polygonStart();N.lineStart=l},polygonEnd:function(){t.polygonEnd();N.lineStart=r}};return N}function i(t,n,r,a,l,u,c,p,d,f,h,g,m,v){var E=c-t,y=p-n,x=E*E+y*y;if(x>4*o&&m--){var b=a+f,T=l+h,S=u+g,N=Math.sqrt(b*b+T*T+S*S),C=Math.asin(S/=N),L=Ea(Ea(S)-1)<Pa||Ea(r-d)<Pa?(r+d)/2:Math.atan2(T,b),A=e(L,C),I=A[0],w=A[1],R=I-t,O=w-n,_=y*R-E*O;if(_*_/x>o||Ea((E*R+y*O)/x-.5)>.3||s>a*f+l*h+u*g){i(t,n,r,a,l,u,I,w,L,b/=N,T/=N,S,m,v);v.point(I,w);i(I,w,L,b,T,S,c,p,d,f,h,g,m,v)}}}var o=.5,s=Math.cos(30*qa),a=16;t.precision=function(e){if(!arguments.length)return Math.sqrt(o);a=(o=e*e)>0&&16;return t};return t}function ir(e){var t=rr(function(t,n){return e([t*Ha,n*Ha])});return function(e){return ur(t(e))}}function or(e){this.stream=e}function sr(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 ar(e){return lr(function(){return e})()}function lr(e){function t(e){e=a(e[0]*qa,e[1]*qa);return[e[0]*d+l,u-e[1]*d]}function n(e){e=a.invert((e[0]-l)/d,(u-e[1])/d);return e&&[e[0]*Ha,e[1]*Ha]}function r(){a=Rn(s=dr(v,E,y),o);var e=o(g,m);l=f-e[0]*d;u=h+e[1]*d;return i()}function i(){c&&(c.valid=!1,c=null);return t}var o,s,a,l,u,c,p=rr(function(e,t){e=o(e,t);return[e[0]*d+l,u-e[1]*d]}),d=150,f=480,h=250,g=0,m=0,v=0,E=0,y=0,x=Gl,b=It,T=null,S=null;t.stream=function(e){c&&(c.valid=!1);c=ur(x(s,p(b(e))));c.valid=!0;return c};t.clipAngle=function(e){if(!arguments.length)return T;x=null==e?(T=e,Gl):Hn((T=+e)*qa);return i()};t.clipExtent=function(e){if(!arguments.length)return S;S=e;b=e?Wn(e[0][0],e[0][1],e[1][0],e[1][1]):It;return i()};t.scale=function(e){if(!arguments.length)return d;d=+e;return r()};t.translate=function(e){if(!arguments.length)return[f,h];f=+e[0];h=+e[1];return r()};t.center=function(e){if(!arguments.length)return[g*Ha,m*Ha];g=e[0]%360*qa;m=e[1]%360*qa;return r()};t.rotate=function(e){if(!arguments.length)return[v*Ha,E*Ha,y*Ha];v=e[0]%360*qa;E=e[1]%360*qa;y=e.length>2?e[2]%360*qa:0;return r()};ia.rebind(t,p,"precision");return function(){o=e.apply(this,arguments);t.invert=o.invert&&n;return r()}}function ur(e){return sr(e,function(t,n){e.point(t*qa,n*qa)})}function cr(e,t){return[e,t]}function pr(e,t){return[e>ja?e-Ga:-ja>e?e+Ga:e,t]}function dr(e,t,n){return e?t||n?Rn(hr(e),gr(t,n)):hr(e):t||n?gr(t,n):pr}function fr(e){return function(t,n){return t+=e,[t>ja?t-Ga:-ja>t?t+Ga:t,n]}}function hr(e){var t=fr(e);t.invert=fr(-e);return t}function gr(e,t){function n(e,t){var n=Math.cos(t),a=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*r+a*i;return[Math.atan2(l*o-c*s,a*r-u*i),nt(c*o+l*s)]}var r=Math.cos(e),i=Math.sin(e),o=Math.cos(t),s=Math.sin(t);n.invert=function(e,t){var n=Math.cos(t),a=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*o-l*s;return[Math.atan2(l*o+u*s,a*r+c*i),nt(c*r-a*i)]};return n}function mr(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,s,a){var l=s*t;if(null!=i){i=vr(n,i);o=vr(n,o);(s>0?o>i:i>o)&&(i+=s*Ga)}else{i=e+s*Ga;o=e-.5*l}for(var u,c=i;s>0?c>o:o>c;c-=l)a.point((u=Sn([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],u[1])}}function vr(e,t){var n=vn(t);n[0]-=e;Tn(n);var r=tt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function Er(e,t,n){var r=ia.range(e,t-Pa,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function yr(e,t,n){var r=ia.range(e,t-Pa,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function xr(e){return e.source}function br(e){return e.target}function Tr(e,t,n,r){var i=Math.cos(t),o=Math.sin(t),s=Math.cos(r),a=Math.sin(r),l=i*Math.cos(e),u=i*Math.sin(e),c=s*Math.cos(n),p=s*Math.sin(n),d=2*Math.asin(Math.sqrt(st(r-t)+i*s*st(n-e))),f=1/Math.sin(d),h=d?function(e){var t=Math.sin(e*=d)*f,n=Math.sin(d-e)*f,r=n*l+t*c,i=n*u+t*p,s=n*o+t*a;return[Math.atan2(i,r)*Ha,Math.atan2(s,Math.sqrt(r*r+i*i))*Ha]}:function(){return[e*Ha,t*Ha]};h.distance=d;return h}function Sr(){function e(e,i){var o=Math.sin(i*=qa),s=Math.cos(i),a=Ea((e*=qa)-t),l=Math.cos(a);Yl+=Math.atan2(Math.sqrt((a=s*Math.sin(a))*a+(a=r*o-n*s*l)*a),n*o+r*s*l);t=e,n=o,r=s}var t,n,r;Ql.point=function(i,o){t=i*qa,n=Math.sin(o*=qa),r=Math.cos(o);Ql.point=e};Ql.lineEnd=function(){Ql.point=Ql.lineEnd=x}}function Nr(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)]}n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),o=Math.sin(i),s=Math.cos(i);return[Math.atan2(e*o,r*s),Math.asin(r&&n*o/r)]};return n}function Cr(e,t){function n(e,t){s>0?-Ua+Pa>t&&(t=-Ua+Pa):t>Ua-Pa&&(t=Ua-Pa);var n=s/Math.pow(i(t),o);return[n*Math.sin(o*e),s-n*Math.cos(o*e)]}var r=Math.cos(e),i=function(e){return Math.tan(ja/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),s=r*Math.pow(i(e),o)/o;if(!o)return Ar;n.invert=function(e,t){var n=s-t,r=Z(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(s/r,1/o))-Ua]};return n}function Lr(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;if(Ea(i)<Pa)return cr;n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/i,o-Z(i)*Math.sqrt(e*e+n*n)]};return n}function Ar(e,t){return[e,Math.log(Math.tan(ja/4+t/2))]}function Ir(e){var t,n=ar(e),r=n.scale,i=n.translate,o=n.clipExtent;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 s=o.apply(n,arguments);if(s===n){if(t=null==e){var a=ja*r(),l=i();o([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else t&&(s=null);return s};return n.clipExtent(null)}function wr(e,t){return[Math.log(Math.tan(ja/4+t/2)),-e]}function Rr(e){return e[0]}function Or(e){return e[1]}function _r(e){for(var t=e.length,n=[0,1],r=2,i=2;t>i;i++){for(;r>1&&et(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Dr(e,t){return e[0]-t[0]||e[1]-t[1]}function kr(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Fr(e,t,n,r){var i=e[0],o=n[0],s=t[0]-i,a=r[0]-o,l=e[1],u=n[1],c=t[1]-l,p=r[1]-u,d=(a*(l-u)-p*(i-o))/(p*s-a*c);return[i+d*s,l+d*c]}function Pr(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function Mr(){ii(this);this.edge=this.site=this.circle=null}function jr(e){var t=uu.pop()||new Mr;t.site=e;return t}function Gr(e){Kr(e);su.remove(e);uu.push(e);ii(e)}function Br(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,s=e.N,a=[e];Gr(e);for(var l=o;l.circle&&Ea(n-l.circle.x)<Pa&&Ea(r-l.circle.cy)<Pa;){o=l.P;a.unshift(l);Gr(l);l=o}a.unshift(l);Kr(l);for(var u=s;u.circle&&Ea(n-u.circle.x)<Pa&&Ea(r-u.circle.cy)<Pa;){s=u.N;a.push(u);Gr(u);u=s}a.push(u);Kr(u);var c,p=a.length;for(c=1;p>c;++c){u=a[c];l=a[c-1];ti(u.edge,l.site,u.site,i)}l=a[0];u=a[p-1];u.edge=Zr(l.site,u.site,null,i);Xr(l);Xr(u)}function Ur(e){for(var t,n,r,i,o=e.x,s=e.y,a=su._;a;){r=qr(a,s)-o;if(r>Pa)a=a.L;else{i=o-Hr(a,s);if(!(i>Pa)){if(r>-Pa){t=a.P;n=a}else if(i>-Pa){t=a;n=a.N}else t=n=a;break}if(!a.R){t=a;break}a=a.R}}var l=jr(e);su.insert(t,l);if(t||n)if(t!==n)if(n){Kr(t);Kr(n);var u=t.site,c=u.x,p=u.y,d=e.x-c,f=e.y-p,h=n.site,g=h.x-c,m=h.y-p,v=2*(d*m-f*g),E=d*d+f*f,y=g*g+m*m,x={x:(m*E-f*y)/v+c,y:(d*y-g*E)/v+p};ti(n.edge,u,h,x);l.edge=Zr(u,e,null,x);n.edge=Zr(e,h,null,x);Xr(t);Xr(n)}else l.edge=Zr(t.site,l.site);else{Kr(t);n=jr(t.site);su.insert(l,n);l.edge=n.edge=Zr(t.site,l.site);Xr(t);Xr(n)}}function qr(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var s=e.P;if(!s)return-1/0;n=s.site;var a=n.x,l=n.y,u=l-t;if(!u)return a;var c=a-r,p=1/o-1/u,d=c/u;return p?(-d+Math.sqrt(d*d-2*p*(c*c/(-2*u)-l+u/2+i-o/2)))/p+r:(r+a)/2}function Hr(e,t){var n=e.N;if(n)return qr(n,t);var r=e.site;return r.y===t?r.x:1/0}function Vr(e){this.site=e;this.edges=[]}function Wr(e){for(var t,n,r,i,o,s,a,l,u,c,p=e[0][0],d=e[1][0],f=e[0][1],h=e[1][1],g=ou,m=g.length;m--;){o=g[m];if(o&&o.prepare()){a=o.edges;l=a.length;s=0;for(;l>s;){c=a[s].end(),r=c.x,i=c.y;u=a[++s%l].start(),t=u.x,n=u.y;if(Ea(r-t)>Pa||Ea(i-n)>Pa){a.splice(s,0,new ni(ei(o.site,c,Ea(r-p)<Pa&&h-i>Pa?{x:p,y:Ea(t-p)<Pa?n:h}:Ea(i-h)<Pa&&d-r>Pa?{x:Ea(n-h)<Pa?t:d,y:h}:Ea(r-d)<Pa&&i-f>Pa?{x:d,y:Ea(t-d)<Pa?n:f}:Ea(i-f)<Pa&&r-p>Pa?{x:Ea(n-f)<Pa?t:p,y:f}:null),o.site,null));++l}}}}}function zr(e,t){return t.angle-e.angle}function $r(){ii(this);this.x=this.y=this.arc=this.site=this.cy=null}function Xr(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 s=i.x,a=i.y,l=r.x-s,u=r.y-a,c=o.x-s,p=o.y-a,d=2*(l*p-u*c);if(!(d>=-Ma)){var f=l*l+u*u,h=c*c+p*p,g=(p*f-u*h)/d,m=(l*h-c*f)/d,p=m+a,v=cu.pop()||new $r;v.arc=e;v.site=i;v.x=g+s;v.y=p+Math.sqrt(g*g+m*m);v.cy=p;e.circle=v;for(var E=null,y=lu._;y;)if(v.y<y.y||v.y===y.y&&v.x<=y.x){if(!y.L){E=y.P;break}y=y.L}else{if(!y.R){E=y;break}y=y.R}lu.insert(E,v);E||(au=v)}}}}function Kr(e){var t=e.circle;if(t){t.P||(au=t.N);lu.remove(t);cu.push(t);ii(t);e.circle=null}}function Yr(e){for(var t,n=iu,r=Vn(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;){t=n[i];if(!Qr(t,e)||!r(t)||Ea(t.a.x-t.b.x)<Pa&&Ea(t.a.y-t.b.y)<Pa){t.a=t.b=null;n.splice(i,1)}}}function Qr(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,s=t[0][0],a=t[1][0],l=t[0][1],u=t[1][1],c=e.l,p=e.r,d=c.x,f=c.y,h=p.x,g=p.y,m=(d+h)/2,v=(f+g)/2;if(g===f){if(s>m||m>=a)return;if(d>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{r=(d-h)/(g-f);i=v-r*m;if(-1>r||r>1)if(d>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(g>f){if(o){if(o.x>=a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}else{if(o){if(o.x<s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}}e.a=o;e.b=n;return!0}function Jr(e,t){this.l=e;this.r=t;this.a=this.b=null}function Zr(e,t,n,r){var i=new Jr(e,t);iu.push(i);n&&ti(i,e,t,n);r&&ti(i,t,e,r);ou[e.i].edges.push(new ni(i,e,t));ou[t.i].edges.push(new ni(i,t,e));return i}function ei(e,t,n){var r=new Jr(e,null);r.a=t;r.b=n;iu.push(r);return r}function ti(e,t,n,r){if(e.a||e.b)e.l===n?e.b=r:e.a=r;else{e.a=r;e.l=t;e.r=n}}function ni(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 ri(){this._=null}function ii(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function oi(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 si(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 ai(e){for(;e.L;)e=e.L;return e}function li(e,t){var n,r,i,o=e.sort(ui).pop();iu=[];ou=new Array(e.length);su=new ri;lu=new ri;for(;;){i=au;if(o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x)){if(o.x!==n||o.y!==r){ou[o.i]=new Vr(o);Ur(o);n=o.x,r=o.y}o=e.pop()}else{if(!i)break;Br(i.arc)}}t&&(Yr(t),Wr(t));var s={cells:ou,edges:iu};su=lu=iu=ou=null;return s}function ui(e,t){return t.y-e.y||t.x-e.x}function ci(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function pi(e){return e.x}function di(e){return e.y}function fi(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hi(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var s=.5*(n+i),a=.5*(r+o),l=t.nodes;l[0]&&hi(e,l[0],n,r,s,a);l[1]&&hi(e,l[1],s,r,i,a);l[2]&&hi(e,l[2],n,a,s,o);l[3]&&hi(e,l[3],s,a,i,o)}}function gi(e,t,n,r,i,o,s){var a,l=1/0;(function u(e,c,p,d,f){if(!(c>o||p>s||r>d||i>f)){if(h=e.point){var h,g=t-h[0],m=n-h[1],v=g*g+m*m;if(l>v){var E=Math.sqrt(l=v);r=t-E,i=n-E;o=t+E,s=n+E;a=h}}for(var y=e.nodes,x=.5*(c+d),b=.5*(p+f),T=t>=x,S=n>=b,N=S<<1|T,C=N+4;C>N;++N)if(e=y[3&N])switch(3&N){case 0:u(e,c,p,x,b);break;case 1:u(e,x,p,d,b);break;case 2:u(e,c,b,x,f);break;case 3:u(e,x,b,d,f)}}})(e,r,i,o,s);return a}function mi(e,t){e=ia.rgb(e);t=ia.rgb(t);var n=e.r,r=e.g,i=e.b,o=t.r-n,s=t.g-r,a=t.b-i;return function(e){return"#"+bt(Math.round(n+o*e))+bt(Math.round(r+s*e))+bt(Math.round(i+a*e))}}function vi(e,t){var n,r={},i={};for(n in e)n in t?r[n]=xi(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 Ei(e,t){e=+e,t=+t;return function(n){return e*(1-n)+t*n}}function yi(e,t){var n,r,i,o=du.lastIndex=fu.lastIndex=0,s=-1,a=[],l=[];e+="",t+="";for(;(n=du.exec(e))&&(r=fu.exec(t));){if((i=r.index)>o){i=t.slice(o,i);a[s]?a[s]+=i:a[++s]=i}if((n=n[0])===(r=r[0]))a[s]?a[s]+=r:a[++s]=r;else{a[++s]=null;l.push({i:s,x:Ei(n,r)})}o=fu.lastIndex}if(o<t.length){i=t.slice(o);a[s]?a[s]+=i:a[++s]=i}return a.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;t>r;++r)a[(n=l[r]).i]=n.x(e);return a.join("")})}function xi(e,t){for(var n,r=ia.interpolators.length;--r>=0&&!(n=ia.interpolators[r](e,t)););return n}function bi(e,t){var n,r=[],i=[],o=e.length,s=t.length,a=Math.min(e.length,t.length);for(n=0;a>n;++n)r.push(xi(e[n],t[n]));for(;o>n;++n)i[n]=e[n];for(;s>n;++n)i[n]=t[n];return function(e){for(n=0;a>n;++n)i[n]=r[n](e);return i}}function Ti(e){return function(t){return 0>=t?0:t>=1?1:e(t)}}function Si(e){return function(t){return 1-e(1-t)}}function Ni(e){return function(t){return.5*(.5>t?e(2*t):2-e(2-2*t))}}function Ci(e){return e*e}function Li(e){return e*e*e}function Ai(e){if(0>=e)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(.5>e?n:3*(e-t)+n-.75)}function Ii(e){return function(t){return Math.pow(t,e)}}function wi(e){return 1-Math.cos(e*Ua)}function Ri(e){return Math.pow(2,10*(e-1))}function Oi(e){return 1-Math.sqrt(1-e*e)}function _i(e,t){var n;arguments.length<2&&(t=.45);arguments.length?n=t/Ga*Math.asin(1/e):(e=1,n=t/4);return function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ga/t)}}function Di(e){e||(e=1.70158);return function(t){return t*t*((e+1)*t-e)}}function ki(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Fi(e,t){e=ia.hcl(e);t=ia.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,s=t.c-r,a=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.c:r);isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360);return function(e){return pt(n+o*e,r+s*e,i+a*e)+""}}function Pi(e,t){e=ia.hsl(e);t=ia.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,s=t.s-r,a=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.s:r);isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360);return function(e){return ut(n+o*e,r+s*e,i+a*e)+""}}function Mi(e,t){e=ia.lab(e);t=ia.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,s=t.a-r,a=t.b-i;return function(e){return ft(n+o*e,r+s*e,i+a*e)+""}}function ji(e,t){t-=e;return function(n){return Math.round(e+t*n)}}function Gi(e){var t=[e.a,e.b],n=[e.c,e.d],r=Ui(t),i=Bi(t,n),o=Ui(qi(n,t,-i))||0;if(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]))*Ha;this.translate=[e.e,e.f];this.scale=[r,o];this.skew=o?Math.atan2(i,o)*Ha:0}function Bi(e,t){return e[0]*t[0]+e[1]*t[1]}function Ui(e){var t=Math.sqrt(Bi(e,e));if(t){e[0]/=t;e[1]/=t}return t}function qi(e,t,n){e[0]+=n*t[0];e[1]+=n*t[1];return e}function Hi(e,t){var n,r=[],i=[],o=ia.transform(e),s=ia.transform(t),a=o.translate,l=s.translate,u=o.rotate,c=s.rotate,p=o.skew,d=s.skew,f=o.scale,h=s.scale;if(a[0]!=l[0]||a[1]!=l[1]){r.push("translate(",null,",",null,")");i.push({i:1,x:Ei(a[0],l[0])},{i:3,x:Ei(a[1],l[1])})}else r.push(l[0]||l[1]?"translate("+l+")":"");if(u!=c){u-c>180?c+=360:c-u>180&&(u+=360);i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:Ei(u,c)})}else c&&r.push(r.pop()+"rotate("+c+")");p!=d?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:Ei(p,d)}):d&&r.push(r.pop()+"skewX("+d+")");if(f[0]!=h[0]||f[1]!=h[1]){n=r.push(r.pop()+"scale(",null,",",null,")");i.push({i:n-4,x:Ei(f[0],h[0])},{i:n-2,x:Ei(f[1],h[1])})}else(1!=h[0]||1!=h[1])&&r.push(r.pop()+"scale("+h+")");n=i.length;return function(e){for(var t,o=-1;++o<n;)r[(t=i[o]).i]=t.x(e);return r.join("")}}function Vi(e,t){t=(t-=e=+e)||1/t;return function(n){return(n-e)/t}}function Wi(e,t){t=(t-=e=+e)||1/t;return function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function zi(e){for(var t=e.source,n=e.target,r=Xi(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 $i(e){for(var t=[],n=e.parent;null!=n;){t.push(e);e=n;n=n.parent}t.push(e);return t}function Xi(e,t){if(e===t)return e;for(var n=$i(e),r=$i(t),i=n.pop(),o=r.pop(),s=null;i===o;){s=i;i=n.pop();o=r.pop()}return s}function Ki(e){e.fixed|=2}function Yi(e){e.fixed&=-7}function Qi(e){e.fixed|=4;e.px=e.x,e.py=e.y}function Ji(e){e.fixed&=-5}function Zi(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf)for(var o,s=e.nodes,a=s.length,l=-1;++l<a;){o=s[l];if(null!=o){Zi(o,t,n);e.charge+=o.charge;r+=o.charge*o.cx;i+=o.charge*o.cy}}if(e.point){if(!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 eo(e,t){ia.rebind(e,t,"sort","children","value");e.nodes=e;e.links=so;return e}function to(e,t){for(var n=[e];null!=(e=n.pop());){t(e);if((i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}}function no(e,t){for(var n=[e],r=[];null!=(e=n.pop());){r.push(e);if((o=e.children)&&(i=o.length))for(var i,o,s=-1;++s<i;)n.push(o[s])}for(;null!=(e=r.pop());)t(e)}function ro(e){return e.children}function io(e){return e.value}function oo(e,t){return t.value-e.value}function so(e){return ia.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function ao(e){return e.x}function lo(e){return e.y}function uo(e,t,n){e.y0=t;e.y=n}function co(e){return ia.range(e.length)}function po(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function fo(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;o>n;++n)if((t=e[n][1])>i){r=n;i=t}return r}function ho(e){return e.reduce(go,0)}function go(e,t){return e+t[1]}function mo(e,t){return vo(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function vo(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 Eo(e){return[ia.min(e),ia.max(e)]}function yo(e,t){return e.value-t.value}function xo(e,t){var n=e._pack_next;e._pack_next=t;t._pack_prev=e;t._pack_next=n;n._pack_prev=t}function bo(e,t){e._pack_next=t;t._pack_prev=e}function To(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 So(e){function t(e){c=Math.min(e.x-e.r,c);p=Math.max(e.x+e.r,p);d=Math.min(e.y-e.r,d);f=Math.max(e.y+e.r,f)}if((n=e.children)&&(u=n.length)){var n,r,i,o,s,a,l,u,c=1/0,p=-1/0,d=1/0,f=-1/0;n.forEach(No);r=n[0];r.x=-r.r;r.y=0;t(r);if(u>1){i=n[1];i.x=i.r;i.y=0;t(i);if(u>2){o=n[2];Ao(r,i,o);t(o);xo(r,o);r._pack_prev=o;xo(o,i);i=r._pack_next;for(s=3;u>s;s++){Ao(r,i,o=n[s]);var h=0,g=1,m=1;for(a=i._pack_next;a!==i;a=a._pack_next,g++)if(To(a,o)){h=1;break}if(1==h)for(l=r._pack_prev;l!==a._pack_prev&&!To(l,o);l=l._pack_prev,m++);if(h){m>g||g==m&&i.r<r.r?bo(r,i=a):bo(r=l,i);s--}else{xo(r,o);i=o;t(o)}}}}var v=(c+p)/2,E=(d+f)/2,y=0;for(s=0;u>s;s++){o=n[s];o.x-=v;o.y-=E;y=Math.max(y,o.r+Math.sqrt(o.x*o.x+o.y*o.y))}e.r=y;n.forEach(Co)}}function No(e){e._pack_next=e._pack_prev=e}function Co(e){delete e._pack_next;delete e._pack_prev}function Lo(e,t,n,r){var i=e.children;e.x=t+=r*e.x;e.y=n+=r*e.y;e.r*=r;if(i)for(var o=-1,s=i.length;++o<s;)Lo(i[o],t,n,r)}function Ao(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var s=t.r+n.r,a=i*i+o*o;s*=s;r*=r;var l=.5+(r-s)/(2*a),u=Math.sqrt(Math.max(0,2*s*(r+a)-(r-=a)*r-s*s))/(2*a);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 Io(e,t){return e.parent==t.parent?1:2}function wo(e){var t=e.children;return t.length?t[0]:e.t}function Ro(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function Oo(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 _o(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 Do(e,t,n){return e.a.parent===t.parent?e.a:n}function ko(e){return 1+ia.max(e,function(e){return e.y})}function Fo(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Po(e){var t=e.children;return t&&t.length?Po(t[0]):e}function Mo(e){var t,n=e.children;return n&&(t=n.length)?Mo(n[t-1]):e}function jo(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Go(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];if(0>i){n+=i/2;i=0}if(0>o){r+=o/2;o=0}return{x:n,y:r,dx:i,dy:o}}function Bo(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function Uo(e){return e.rangeExtent?e.rangeExtent():Bo(e.range())}function qo(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 Ho(e,t){var n,r=0,i=e.length-1,o=e[r],s=e[i];if(o>s){n=r,r=i,i=n;n=o,o=s,s=n}e[r]=t.floor(o);e[i]=t.ceil(s);return e}function Vo(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Nu}function Wo(e,t,n,r){var i=[],o=[],s=0,a=Math.min(e.length,t.length)-1;if(e[a]<e[0]){e=e.slice().reverse();t=t.slice().reverse()}for(;++s<=a;){i.push(n(e[s-1],e[s]));o.push(r(t[s-1],t[s]))}return function(t){var n=ia.bisect(e,t,1,a)-1;return o[n](i[n](t))}}function zo(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?Wo:qo,l=r?Wi:Vi;s=i(e,t,l,n);a=i(t,e,l,xi);return o}function o(e){return s(e)}var s,a;o.invert=function(e){return a(e)};o.domain=function(t){if(!arguments.length)return e;e=t.map(Number);return i()};o.range=function(e){if(!arguments.length)return t;t=e;return i()};o.rangeRound=function(e){return o.range(e).interpolate(ji)};o.clamp=function(e){if(!arguments.length)return r;r=e;return i()};o.interpolate=function(e){if(!arguments.length)return n;n=e;return i()};o.ticks=function(t){return Yo(e,t)};o.tickFormat=function(t,n){return Qo(e,t,n)};o.nice=function(t){Xo(e,t);return i()};o.copy=function(){return zo(e,t,n,r)};return i()}function $o(e,t){return ia.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Xo(e,t){return Ho(e,Vo(Ko(e,t)[2]))}function Ko(e,t){null==t&&(t=10);var n=Bo(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(i*=2);n[0]=Math.ceil(n[0]/i)*i;n[1]=Math.floor(n[1]/i)*i+.5*i;n[2]=i;return n}function Yo(e,t){return ia.range.apply(ia,Ko(e,t))}function Qo(e,t,n){var r=Ko(e,t);if(n){var i=dl.exec(n);i.shift();if("s"===i[8]){var o=ia.formatPrefix(Math.max(Ea(r[0]),Ea(r[1])));i[7]||(i[7]="."+Jo(o.scale(r[2])));i[8]="f";n=ia.format(i.join(""));return function(e){return n(o.scale(e))+o.symbol}}i[7]||(i[7]="."+Zo(i[8],r));n=i.join("")}else n=",."+Jo(r[2])+"f";return ia.format(n)}function Jo(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function Zo(e,t){var n=Jo(t[2]);return e in Cu?Math.abs(n-Jo(Math.max(Ea(t[0]),Ea(t[1]))))+ +("e"!==e):n-2*("%"===e)}function es(e,t,n,r){function i(e){return(n?Math.log(0>e?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 s(t){return e(i(t))}s.invert=function(t){return o(e.invert(t))};s.domain=function(t){if(!arguments.length)return r;n=t[0]>=0;e.domain((r=t.map(Number)).map(i));return s};s.base=function(n){if(!arguments.length)return t;t=+n;e.domain(r.map(i));return s};s.nice=function(){var t=Ho(r.map(i),n?Math:Au);e.domain(t);r=t.map(o);return s};s.ticks=function(){var e=Bo(r),s=[],a=e[0],l=e[1],u=Math.floor(i(a)),c=Math.ceil(i(l)),p=t%1?2:t;if(isFinite(c-u)){if(n){for(;c>u;u++)for(var d=1;p>d;d++)s.push(o(u)*d);s.push(o(u))}else{s.push(o(u));for(;u++<c;)for(var d=p-1;d>0;d--)s.push(o(u)*d)}for(u=0;s[u]<a;u++);for(c=s.length;s[c-1]>l;c--);s=s.slice(u,c)}return s};s.tickFormat=function(e,t){if(!arguments.length)return Lu;arguments.length<2?t=Lu:"function"!=typeof t&&(t=ia.format(t));var r,a=Math.max(.1,e/s.ticks().length),l=n?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(e){return e/o(l(i(e)+r))<=a?t(e):""}};s.copy=function(){return es(e.copy(),t,n,r)};return $o(s,e)}function ts(e,t,n){function r(t){return e(i(t))}var i=ns(t),o=ns(1/t);r.invert=function(t){return o(e.invert(t))};r.domain=function(t){if(!arguments.length)return n;e.domain((n=t.map(Number)).map(i));return r};r.ticks=function(e){return Yo(n,e)};r.tickFormat=function(e,t){return Qo(n,e,t)};r.nice=function(e){return r.domain(Xo(n,e))};r.exponent=function(s){if(!arguments.length)return t;i=ns(t=s);o=ns(1/t);e.domain(n.map(i));return r};r.copy=function(){return ts(e.copy(),t,n)};return $o(r,e)}function ns(e){return function(t){return 0>t?-Math.pow(-t,e):Math.pow(t,e)}}function rs(e,t){function n(n){return o[((i.get(n)||("range"===t.t?i.set(n,e.push(n)):0/0))-1)%o.length]}function r(t,n){return ia.range(e.length).map(function(e){return t+n*e})}var i,o,s;n.domain=function(r){if(!arguments.length)return e;e=[];i=new u;for(var o,s=-1,a=r.length;++s<a;)i.has(o=r[s])||i.set(o,e.push(o));return n[t.t].apply(n,t.a)};n.range=function(e){if(!arguments.length)return o;o=e;s=0;t={t:"range",a:arguments};return n};n.rangePoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],u=i[1],c=e.length<2?(l=(l+u)/2,0):(u-l)/(e.length-1+a);o=r(l+c*a/2,c);s=0;t={t:"rangePoints",a:arguments};return n};n.rangeRoundPoints=function(i,a){arguments.length<2&&(a=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+a)|0;o=r(l+Math.round(c*a/2+(u-l-(e.length-1+a)*c)/2),c);s=0;t={t:"rangeRoundPoints",a:arguments};return n};n.rangeBands=function(i,a,l){arguments.length<2&&(a=0);arguments.length<3&&(l=a);var u=i[1]<i[0],c=i[u-0],p=i[1-u],d=(p-c)/(e.length-a+2*l);o=r(c+d*l,d);u&&o.reverse();s=d*(1-a);t={t:"rangeBands",a:arguments};return n};n.rangeRoundBands=function(i,a,l){arguments.length<2&&(a=0);arguments.length<3&&(l=a);var u=i[1]<i[0],c=i[u-0],p=i[1-u],d=Math.floor((p-c)/(e.length-a+2*l));o=r(c+Math.round((p-c-(e.length-a)*d)/2),d);u&&o.reverse();s=Math.round(d*(1-a));t={t:"rangeRoundBands",a:arguments};return n};n.rangeBand=function(){return s};n.rangeExtent=function(){return Bo(t.a[0])};n.copy=function(){return rs(e,t)};return n.domain(e)}function is(e,n){function o(){var t=0,r=n.length;a=[];for(;++t<r;)a[t-1]=ia.quantile(e,t/r);return s}function s(e){return isNaN(e=+e)?void 0:n[ia.bisect(a,e)]}var a;s.domain=function(n){if(!arguments.length)return e;e=n.map(r).filter(i).sort(t);return o()};s.range=function(e){if(!arguments.length)return n;n=e;return o()};s.quantiles=function(){return a};s.invertExtent=function(t){t=n.indexOf(t);return 0>t?[0/0,0/0]:[t>0?a[t-1]:e[0],t<a.length?a[t]:e[e.length-1]]};s.copy=function(){return is(e,n)};return o()}function os(e,t,n){function r(t){return n[Math.max(0,Math.min(s,Math.floor(o*(t-e))))]}function i(){o=n.length/(t-e);s=n.length-1;return r}var o,s;r.domain=function(n){if(!arguments.length)return[e,t];e=+n[0];t=+n[n.length-1];return i()};r.range=function(e){if(!arguments.length)return n;n=e;return i()};r.invertExtent=function(t){t=n.indexOf(t);t=0>t?0/0:t/o+e;return[t,t+1/o]};r.copy=function(){return os(e,t,n)};return i()}function ss(e,t){function n(n){return n>=n?t[ia.bisect(e,n)]:void 0}n.domain=function(t){if(!arguments.length)return e;e=t;return n};n.range=function(e){if(!arguments.length)return t;t=e;return n};n.invertExtent=function(n){n=t.indexOf(n);return[e[n-1],e[n]]};n.copy=function(){return ss(e,t)};return n}function as(e){function t(e){return+e}t.invert=t;t.domain=t.range=function(n){if(!arguments.length)return e;e=n.map(t);return t};t.ticks=function(t){return Yo(e,t)};t.tickFormat=function(t,n){return Qo(e,t,n)};t.copy=function(){return as(e)};return t}function ls(){return 0}function us(e){return e.innerRadius}function cs(e){return e.outerRadius}function ps(e){return e.startAngle}function ds(e){return e.endAngle}function fs(e){return e&&e.padAngle}function hs(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function gs(e,t,n,r,i){var o=e[0]-t[0],s=e[1]-t[1],a=(i?r:-r)/Math.sqrt(o*o+s*s),l=a*s,u=-a*o,c=e[0]+l,p=e[1]+u,d=t[0]+l,f=t[1]+u,h=(c+d)/2,g=(p+f)/2,m=d-c,v=f-p,E=m*m+v*v,y=n-r,x=c*f-d*p,b=(0>v?-1:1)*Math.sqrt(y*y*E-x*x),T=(x*v-m*b)/E,S=(-x*m-v*b)/E,N=(x*v+m*b)/E,C=(-x*m+v*b)/E,L=T-h,A=S-g,I=N-h,w=C-g;L*L+A*A>I*I+w*w&&(T=N,S=C);return[[T-l,S-u],[T*n/y,S*n/y]]}function ms(e){function t(t){function s(){u.push("M",o(e(c),a))}for(var l,u=[],c=[],p=-1,d=t.length,f=At(n),h=At(r);++p<d;)if(i.call(this,l=t[p],p))c.push([+f.call(this,l,p),+h.call(this,l,p)]);else if(c.length){s();c=[]}c.length&&s();return u.length?u.join(""):null}var n=Rr,r=Or,i=On,o=vs,s=o.key,a=.7;t.x=function(e){if(!arguments.length)return n;n=e;return t};t.y=function(e){if(!arguments.length)return r;r=e;return t};t.defined=function(e){if(!arguments.length)return i;i=e;return t};t.interpolate=function(e){if(!arguments.length)return s;s="function"==typeof e?o=e:(o=Du.get(e)||vs).key;return t};t.tension=function(e){if(!arguments.length)return a;a=e;return t};return t}function vs(e){return e.join("L")}function Es(e){return vs(e)+"Z"}function ys(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]);n>1&&i.push("H",r[0]);return i.join("")}function xs(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 bs(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 Ts(e,t){return e.length<4?vs(e):e[1]+Cs(e.slice(1,-1),Ls(e,t))}function Ss(e,t){return e.length<3?vs(e):e[0]+Cs((e.push(e[0]),e),Ls([e[e.length-2]].concat(e,[e[1]]),t))}function Ns(e,t){return e.length<3?vs(e):e[0]+Cs(e,Ls(e,t))}function Cs(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return vs(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],s=t[0],a=s,l=1;if(n){r+="Q"+(o[0]-2*s[0]/3)+","+(o[1]-2*s[1]/3)+","+o[0]+","+o[1];i=e[1];l=2}if(t.length>1){a=t[1];o=e[l];l++;r+="C"+(i[0]+s[0])+","+(i[1]+s[1])+","+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1];for(var u=2;u<t.length;u++,l++){o=e[l];a=t[u];r+="S"+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1]}}if(n){var c=e[l];r+="Q"+(o[0]+2*a[0]/3)+","+(o[1]+2*a[1]/3)+","+c[0]+","+c[1]}return r}function Ls(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],s=e[1],a=1,l=e.length;++a<l;){n=o;o=s;s=e[a];r.push([i*(s[0]-n[0]),i*(s[1]-n[1])])}return r}function As(e){if(e.length<3)return vs(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],s=[i,i,i,(r=e[1])[0]],a=[o,o,o,r[1]],l=[i,",",o,"L",Os(Pu,s),",",Os(Pu,a)];e.push(e[n-1]);for(;++t<=n;){r=e[t];s.shift();s.push(r[0]);a.shift();a.push(r[1]);_s(l,s,a)}e.pop();l.push("L",r);return l.join("")}function Is(e){if(e.length<4)return vs(e);for(var t,n=[],r=-1,i=e.length,o=[0],s=[0];++r<3;){t=e[r];o.push(t[0]);s.push(t[1])}n.push(Os(Pu,o)+","+Os(Pu,s));--r;for(;++r<i;){t=e[r];o.shift();o.push(t[0]);s.shift();s.push(t[1]);_s(n,o,s)}return n.join("")}function ws(e){for(var t,n,r=-1,i=e.length,o=i+4,s=[],a=[];++r<4;){n=e[r%i];s.push(n[0]);a.push(n[1])}t=[Os(Pu,s),",",Os(Pu,a)];--r;for(;++r<o;){n=e[r%i];s.shift();s.push(n[0]);a.shift();a.push(n[1]);_s(t,s,a)}return t.join("")}function Rs(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],s=e[0][1],a=e[n][0]-o,l=e[n][1]-s,u=-1;++u<=n;){r=e[u];i=u/n;r[0]=t*r[0]+(1-t)*(o+i*a);r[1]=t*r[1]+(1-t)*(s+i*l)}return As(e)}function Os(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _s(e,t,n){e.push("C",Os(ku,t),",",Os(ku,n),",",Os(Fu,t),",",Os(Fu,n),",",Os(Pu,t),",",Os(Pu,n))}function Ds(e,t){return(t[1]-e[1])/(t[0]-e[0])}function ks(e){for(var t=0,n=e.length-1,r=[],i=e[0],o=e[1],s=r[0]=Ds(i,o);++t<n;)r[t]=(s+(s=Ds(i=o,o=e[t+1])))/2;r[t]=s;return r}function Fs(e){for(var t,n,r,i,o=[],s=ks(e),a=-1,l=e.length-1;++a<l;){t=Ds(e[a],e[a+1]);if(Ea(t)<Pa)s[a]=s[a+1]=0;else{n=s[a]/t;r=s[a+1]/t;i=n*n+r*r;if(i>9){i=3*t/Math.sqrt(i);s[a]=i*n;s[a+1]=i*r}}}a=-1;for(;++a<=l;){i=(e[Math.min(l,a+1)][0]-e[Math.max(0,a-1)][0])/(6*(1+s[a]*s[a]));o.push([i||0,s[a]*i||0])}return o}function Ps(e){return e.length<3?vs(e):e[0]+Cs(e,Fs(e))}function Ms(e){for(var t,n,r,i=-1,o=e.length;++i<o;){t=e[i];n=t[0];r=t[1]-Ua;t[0]=n*Math.cos(r);t[1]=n*Math.sin(r)}return e}function js(e){function t(t){function l(){g.push("M",a(e(v),p),c,u(e(m.reverse()),p),"Z")}for(var d,f,h,g=[],m=[],v=[],E=-1,y=t.length,x=At(n),b=At(i),T=n===r?function(){return f}:At(r),S=i===o?function(){return h}:At(o);++E<y;)if(s.call(this,d=t[E],E)){m.push([f=+x.call(this,d,E),h=+b.call(this,d,E)]);v.push([+T.call(this,d,E),+S.call(this,d,E)])}else if(m.length){l();m=[];v=[]}m.length&&l();return g.length?g.join(""):null}var n=Rr,r=Rr,i=0,o=Or,s=On,a=vs,l=a.key,u=a,c="L",p=.7;t.x=function(e){if(!arguments.length)return r;n=r=e;return t};t.x0=function(e){if(!arguments.length)return n;n=e;return t};t.x1=function(e){if(!arguments.length)return r;r=e;return t};t.y=function(e){if(!arguments.length)return o;i=o=e;return t};t.y0=function(e){if(!arguments.length)return i;i=e;return t};t.y1=function(e){if(!arguments.length)return o;o=e;return t};t.defined=function(e){if(!arguments.length)return s;s=e;return t};t.interpolate=function(e){if(!arguments.length)return l;l="function"==typeof e?a=e:(a=Du.get(e)||vs).key;u=a.reverse||a;c=a.closed?"M":"L";return t};t.tension=function(e){if(!arguments.length)return p;p=e;return t};return t}function Gs(e){return e.radius}function Bs(e){return[e.x,e.y]}function Us(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Ua;return[n*Math.cos(r),n*Math.sin(r)]}}function qs(){return 64}function Hs(){return"circle"}function Vs(e){var t=Math.sqrt(e/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Ws(e){return function(){var t,n;if((t=this[e])&&(n=t[t.active])){--t.count?delete t[t.active]:delete this[e];t.active+=.5;n.event&&n.event.interrupt.call(this,this.__data__,n.index)}}}function zs(e,t,n){Sa(e,Hu);e.namespace=t;e.id=n;return e}function $s(e,t,n,r){var i=e.id,o=e.namespace;return q(e,"function"==typeof n?function(e,s,a){e[o][i].tween.set(t,r(n.call(e,e.__data__,s,a)))}:(n=r(n),function(e){e[o][i].tween.set(t,n)}))}function Xs(e){null==e&&(e="");return function(){this.textContent=e}}function Ks(e){return null==e?"__transition__":"__transition_"+e+"__"}function Ys(e,t,n,r,i){var o=e[n]||(e[n]={active:0,count:0}),s=o[r];if(!s){var a=i.time;s=o[r]={tween:new u,time:a,delay:i.delay,duration:i.duration,ease:i.ease,index:t};i=null;++o.count;ia.timer(function(i){function l(n){if(o.active>r)return c();var i=o[o.active];if(i){--o.count;delete o[o.active];i.event&&i.event.interrupt.call(e,e.__data__,i.index)}o.active=r;s.event&&s.event.start.call(e,e.__data__,t);s.tween.forEach(function(n,r){(r=r.call(e,e.__data__,t))&&g.push(r)});d=s.ease;p=s.duration;ia.timer(function(){h.c=u(n||1)?On:u;return 1},0,a)}function u(n){if(o.active!==r)return 1;for(var i=n/p,a=d(i),l=g.length;l>0;)g[--l].call(e,a);if(i>=1){s.event&&s.event.end.call(e,e.__data__,t);return c()}}function c(){--o.count?delete o[r]:delete e[n];return 1}var p,d,f=s.delay,h=ul,g=[];h.t=f+a;if(i>=f)return l(i-f);h.c=l;return void 0},0,a)}}function Qs(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"})}function Js(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"})}function Zs(e){return e.toISOString()}function ea(e,t,n){function r(t){return e(t)}function i(e,n){var r=e[1]-e[0],i=r/n,o=ia.bisect(Ju,i);return o==Ju.length?[t.year,Ko(e.map(function(e){return e/31536e6}),n)[2]]:o?t[i/Ju[o-1]<Ju[o]/i?o-1:o]:[tc,Ko(e,n)[2]]}r.invert=function(t){return ta(e.invert(t))};r.domain=function(t){if(!arguments.length)return e.domain().map(ta);e.domain(t);return r};r.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,ta(+n+1),t).length}var o=r.domain(),s=Bo(o),a=null==e?i(s,10):"number"==typeof e&&i(s,e);a&&(e=a[0],t=a[1]);return r.domain(Ho(o,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=ta(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=ta(+t+1);return t}}:e))};r.ticks=function(e,t){var n=Bo(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];o&&(e=o[0],t=o[1]);return e.range(n[0],ta(+n[1]+1),1>t?1:t)};r.tickFormat=function(){return n};r.copy=function(){return ea(e.copy(),t,n)};return $o(r,e)}function ta(e){return new Date(e)}function na(e){return JSON.parse(e.responseText)}function ra(e){var t=aa.createRange();t.selectNode(aa.body);return t.createContextualFragment(e.responseText)}var ia={version:"3.5.3"};Date.now||(Date.now=function(){return+new Date});var oa=[].slice,sa=function(e){return oa.call(e)},aa=document,la=aa.documentElement,ua=window;try{sa(la.childNodes)[0].nodeType}catch(ca){sa=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}try{aa.createElement("div").style.setProperty("opacity",0,"")}catch(pa){var da=ua.Element.prototype,fa=da.setAttribute,ha=da.setAttributeNS,ga=ua.CSSStyleDeclaration.prototype,ma=ga.setProperty;da.setAttribute=function(e,t){fa.call(this,e,t+"")};da.setAttributeNS=function(e,t,n){ha.call(this,e,t,n+"")};ga.setProperty=function(e,t,n){ma.call(this,e,t+"",n)}}ia.ascending=t;ia.descending=function(e,t){return e>t?-1:t>e?1:t>=e?0:0/0};ia.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};ia.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};ia.extent=function(e,t){var n,r,i,o=-1,s=e.length; if(1===arguments.length){for(;++o<s;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<s;)if(null!=(r=e[o])){n>r&&(n=r);r>i&&(i=r)}}else{for(;++o<s;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<s;)if(null!=(r=t.call(e,e[o],o))){n>r&&(n=r);r>i&&(i=r)}}return[n,i]};ia.sum=function(e,t){var n,r=0,o=e.length,s=-1;if(1===arguments.length)for(;++s<o;)i(n=+e[s])&&(r+=n);else for(;++s<o;)i(n=+t.call(e,e[s],s))&&(r+=n);return r};ia.mean=function(e,t){var n,o=0,s=e.length,a=-1,l=s;if(1===arguments.length)for(;++a<s;)i(n=r(e[a]))?o+=n:--l;else for(;++a<s;)i(n=r(t.call(e,e[a],a)))?o+=n:--l;return l?o/l:void 0};ia.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};ia.median=function(e,n){var o,s=[],a=e.length,l=-1;if(1===arguments.length)for(;++l<a;)i(o=r(e[l]))&&s.push(o);else for(;++l<a;)i(o=r(n.call(e,e[l],l)))&&s.push(o);return s.length?ia.quantile(s.sort(t),.5):void 0};ia.variance=function(e,t){var n,o,s=e.length,a=0,l=0,u=-1,c=0;if(1===arguments.length){for(;++u<s;)if(i(n=r(e[u]))){o=n-a;a+=o/++c;l+=o*(n-a)}}else for(;++u<s;)if(i(n=r(t.call(e,e[u],u)))){o=n-a;a+=o/++c;l+=o*(n-a)}return c>1?l/(c-1):void 0};ia.deviation=function(){var e=ia.variance.apply(this,arguments);return e?Math.sqrt(e):e};var va=o(t);ia.bisectLeft=va.left;ia.bisect=ia.bisectRight=va.right;ia.bisector=function(e){return o(1===e.length?function(n,r){return t(e(n),r)}:e)};ia.shuffle=function(e,t,n){if((o=arguments.length)<3){n=e.length;2>o&&(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};ia.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r};ia.pairs=function(e){for(var t,n=0,r=e.length-1,i=e[0],o=new Array(0>r?0:r);r>n;)o[n]=[t=i,i=e[++n]];return o};ia.zip=function(){if(!(r=arguments.length))return[];for(var e=-1,t=ia.min(arguments,s),n=new Array(t);++e<t;)for(var r,i=-1,o=n[e]=new Array(r);++i<r;)o[i]=arguments[i][e];return n};ia.transpose=function(e){return ia.zip.apply(ia,e)};ia.keys=function(e){var t=[];for(var n in e)t.push(n);return t};ia.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t};ia.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t};ia.merge=function(e){for(var t,n,r,i=e.length,o=-1,s=0;++o<i;)s+=e[o].length;n=new Array(s);for(;--i>=0;){r=e[i];t=r.length;for(;--t>=0;)n[--s]=r[t]}return n};var Ea=Math.abs;ia.range=function(e,t,n){if(arguments.length<3){n=1;if(arguments.length<2){t=e;e=0}}if((t-e)/n===1/0)throw new Error("infinite range");var r,i=[],o=a(Ea(n)),s=-1;e*=o,t*=o,n*=o;if(0>n)for(;(r=e+n*++s)>t;)i.push(r/o);else for(;(r=e+n*++s)<t;)i.push(r/o);return i};ia.map=function(e,t){var n=new u;if(e instanceof u)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 s in e)n.set(s,e[s]);return n};var ya="__proto__",xa="\x00";l(u,{has:d,get:function(e){return this._[c(e)]},set:function(e,t){return this._[c(e)]=t},remove:f,keys:h,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:p(t),value:this._[t]});return e},size:g,empty:m,forEach:function(e){for(var t in this._)e.call(this,p(t),this._[t])}});ia.nest=function(){function e(t,s,a){if(a>=o.length)return r?r.call(i,s):n?s.sort(n):s;for(var l,c,p,d,f=-1,h=s.length,g=o[a++],m=new u;++f<h;)(d=m.get(l=g(c=s[f])))?d.push(c):m.set(l,[c]);if(t){c=t();p=function(n,r){c.set(n,e(t,r,a))}}else{c={};p=function(n,r){c[n]=e(t,r,a)}}m.forEach(p);return c}function t(e,n){if(n>=o.length)return e;var r=[],i=s[n++];e.forEach(function(e,i){r.push({key:e,values:t(i,n)})});return i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,i={},o=[],s=[];i.map=function(t,n){return e(n,t,0)};i.entries=function(n){return t(e(ia.map,n,0),0)};i.key=function(e){o.push(e);return i};i.sortKeys=function(e){s[o.length-1]=e;return i};i.sortValues=function(e){n=e;return i};i.rollup=function(e){r=e;return i};return i};ia.set=function(e){var t=new v;if(e)for(var n=0,r=e.length;r>n;++n)t.add(e[n]);return t};l(v,{has:d,add:function(e){this._[c(e+="")]=!0;return e},remove:f,values:h,size:g,empty:m,forEach:function(e){for(var t in this._)e.call(this,p(t))}});ia.behavior={};ia.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=E(e,t,t[n]);return e};var ba=["webkit","ms","moz","Moz","o","O"];ia.dispatch=function(){for(var e=new b,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=T(e);return e};b.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0){r=e.slice(n+1);e=e.slice(0,n)}if(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}};ia.event=null;ia.requote=function(e){return e.replace(Ta,"\\$&")};var Ta=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Sa={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},Na=function(e,t){return t.querySelector(e)},Ca=function(e,t){return t.querySelectorAll(e)},La=la.matches||la[y(la,"matchesSelector")],Aa=function(e,t){return La.call(e,t)};if("function"==typeof Sizzle){Na=function(e,t){return Sizzle(e,t)[0]||null};Ca=Sizzle;Aa=Sizzle.matchesSelector}ia.selection=function(){return Oa};var Ia=ia.selection.prototype=[];Ia.select=function(e){var t,n,r,i,o=[];e=A(e);for(var s=-1,a=this.length;++s<a;){o.push(t=[]);t.parentNode=(r=this[s]).parentNode;for(var l=-1,u=r.length;++l<u;)if(i=r[l]){t.push(n=e.call(i,i.__data__,l,s));n&&"__data__"in i&&(n.__data__=i.__data__)}else t.push(null)}return L(o)};Ia.selectAll=function(e){var t,n,r=[];e=I(e);for(var i=-1,o=this.length;++i<o;)for(var s=this[i],a=-1,l=s.length;++a<l;)if(n=s[a]){r.push(t=sa(e.call(n,n.__data__,a,i)));t.parentNode=n}return L(r)};var wa={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ia.ns={prefix:wa,qualify:function(e){var t=e.indexOf(":"),n=e;if(t>=0){n=e.slice(0,t);e=e.slice(t+1)}return wa.hasOwnProperty(n)?{space:wa[n],local:e}:e}};Ia.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();e=ia.ns.qualify(e);return e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(w(t,e[t]));return this}return this.each(w(e,t))};Ia.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=_(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else{t=n.getAttribute("class");for(;++i<r;)if(!O(e[i]).test(t))return!1}return!0}for(t in e)this.each(D(t,e[t]));return this}return this.each(D(e,t))};Ia.style=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){2>r&&(t="");for(n in e)this.each(F(n,e[n],t));return this}if(2>r)return ua.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(F(e,t,n))};Ia.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(P(t,e[t]));return this}return this.each(P(e,t))};Ia.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};Ia.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};Ia.append=function(e){e=M(e);return this.select(function(){return this.appendChild(e.apply(this,arguments))})};Ia.insert=function(e,t){e=M(e);t=A(t);return this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})};Ia.remove=function(){return this.each(j)};Ia.data=function(e,t){function n(e,n){var r,i,o,s=e.length,p=n.length,d=Math.min(s,p),f=new Array(p),h=new Array(p),g=new Array(s);if(t){var m,v=new u,E=new Array(s);for(r=-1;++r<s;){v.has(m=t.call(i=e[r],i.__data__,r))?g[r]=i:v.set(m,i);E[r]=m}for(r=-1;++r<p;){if(i=v.get(m=t.call(n,o=n[r],r))){if(i!==!0){f[r]=i;i.__data__=o}}else h[r]=G(o);v.set(m,!0)}for(r=-1;++r<s;)v.get(E[r])!==!0&&(g[r]=e[r])}else{for(r=-1;++r<d;){i=e[r];o=n[r];if(i){i.__data__=o;f[r]=i}else h[r]=G(o)}for(;p>r;++r)h[r]=G(n[r]);for(;s>r;++r)g[r]=e[r]}h.update=f;h.parentNode=f.parentNode=g.parentNode=e.parentNode;a.push(h);l.push(f);c.push(g)}var r,i,o=-1,s=this.length;if(!arguments.length){e=new Array(s=(r=this[0]).length);for(;++o<s;)(i=r[o])&&(e[o]=i.__data__);return e}var a=H([]),l=L([]),c=L([]);if("function"==typeof e)for(;++o<s;)n(r=this[o],e.call(r,r.parentNode.__data__,o));else for(;++o<s;)n(r=this[o],e);l.enter=function(){return a};l.exit=function(){return c};return l};Ia.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")};Ia.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=B(e));for(var o=0,s=this.length;s>o;o++){i.push(t=[]);t.parentNode=(n=this[o]).parentNode;for(var a=0,l=n.length;l>a;a++)(r=n[a])&&e.call(r,r.__data__,a,o)&&t.push(r)}return L(i)};Ia.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;)if(n=r[i]){o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o);o=n}return this};Ia.sort=function(e){e=U.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()};Ia.each=function(e){return q(this,function(t,n,r){e.call(t,t.__data__,n,r)})};Ia.call=function(e){var t=sa(arguments);e.apply(t[0]=this,t);return this};Ia.empty=function(){return!this.node()};Ia.node=function(){for(var e=0,t=this.length;t>e;e++)for(var n=this[e],r=0,i=n.length;i>r;r++){var o=n[r];if(o)return o}return null};Ia.size=function(){var e=0;q(this,function(){++e});return e};var Ra=[];ia.selection.enter=H;ia.selection.enter.prototype=Ra;Ra.append=Ia.append;Ra.empty=Ia.empty;Ra.node=Ia.node;Ra.call=Ia.call;Ra.size=Ia.size;Ra.select=function(e){for(var t,n,r,i,o,s=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update;s.push(t=[]);t.parentNode=i.parentNode;for(var u=-1,c=i.length;++u<c;)if(o=i[u]){t.push(r[u]=n=e.call(i.parentNode,o.__data__,u,a));n.__data__=o.__data__}else t.push(null)}return L(s)};Ra.insert=function(e,t){arguments.length<2&&(t=V(this));return Ia.insert.call(this,e,t)};ia.select=function(e){var t=["string"==typeof e?Na(e,aa):e];t.parentNode=la;return L([t])};ia.selectAll=function(e){var t=sa("string"==typeof e?Ca(e,aa):e);t.parentNode=la;return L([t])};var Oa=ia.select(la);Ia.on=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){2>r&&(t=!1);for(n in e)this.each(W(n,e[n],t));return this}if(2>r)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(W(e,t,n))};var _a=ia.map({mouseenter:"mouseover",mouseleave:"mouseout"});_a.forEach(function(e){"on"+e in aa&&_a.remove(e)});var Da="onselectstart"in aa?null:y(la.style,"userSelect"),ka=0;ia.mouse=function(e){return K(e,N())};var Fa=/WebKit/.test(ua.navigator.userAgent)?-1:0;ia.touch=function(e,t,n){arguments.length<3&&(n=t,t=N().changedTouches);if(t)for(var r,i=0,o=t.length;o>i;++i)if((r=t[i]).identifier===n)return K(e,r)};ia.behavior.drag=function(){function e(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function t(e,t,i,o,s){return function(){function a(){var e,n,r=t(d,g);if(r){e=r[0]-y[0];n=r[1]-y[1];h|=e|n;y=r;f({type:"drag",x:r[0]+u[0],y:r[1]+u[1],dx:e,dy:n})}}function l(){if(t(d,g)){v.on(o+m,null).on(s+m,null);E(h&&ia.event.target===p);f({type:"dragend"})}}var u,c=this,p=ia.event.target,d=c.parentNode,f=n.of(c,arguments),h=0,g=e(),m=".drag"+(null==g?"":"-"+g),v=ia.select(i()).on(o+m,a).on(s+m,l),E=X(),y=t(d,g);if(r){u=r.apply(c,arguments);u=[u.x-y[0],u.y-y[1]]}else u=[0,0];f({type:"dragstart"})}}var n=C(e,"drag","dragstart","dragend"),r=null,i=t(x,ia.mouse,J,"mousemove","mouseup"),o=t(Y,ia.touch,Q,"touchmove","touchend");e.origin=function(t){if(!arguments.length)return r;r=t;return e};return ia.rebind(e,n,"on")};ia.touches=function(e,t){arguments.length<2&&(t=N().touches);return t?sa(t).map(function(t){var n=K(e,t);n.identifier=t.identifier;return n}):[]};var Pa=1e-6,Ma=Pa*Pa,ja=Math.PI,Ga=2*ja,Ba=Ga-Pa,Ua=ja/2,qa=ja/180,Ha=180/ja,Va=Math.SQRT2,Wa=2,za=4;ia.interpolateZoom=function(e,t){function n(e){var t=e*E;if(v){var n=it(g),s=o/(Wa*d)*(n*ot(Va*t+g)-rt(g));return[r+s*u,i+s*c,o*n/it(Va*t+g)]}return[r+e*u,i+e*c,o*Math.exp(Va*t)]}var r=e[0],i=e[1],o=e[2],s=t[0],a=t[1],l=t[2],u=s-r,c=a-i,p=u*u+c*c,d=Math.sqrt(p),f=(l*l-o*o+za*p)/(2*o*Wa*d),h=(l*l-o*o-za*p)/(2*l*Wa*d),g=Math.log(Math.sqrt(f*f+1)-f),m=Math.log(Math.sqrt(h*h+1)-h),v=m-g,E=(v||Math.log(l/o))/Va;n.duration=1e3*E;return n};ia.behavior.zoom=function(){function e(e){e.on(R,c).on(Ka+".zoom",d).on("dblclick.zoom",f).on(D,p)}function t(e){return[(e[0]-N.x)/N.k,(e[1]-N.y)/N.k]}function n(e){return[e[0]*N.k+N.x,e[1]*N.k+N.y]}function r(e){N.k=Math.max(A[0],Math.min(A[1],e))}function i(e,t){t=n(t);N.x+=e[0]-t[0];N.y+=e[1]-t[1]}function o(t,n,o,s){t.__chart__={x:N.x,y:N.y,k:N.k};r(Math.pow(2,s));i(g=n,o);t=ia.select(t);I>0&&(t=t.transition().duration(I));t.call(e.event)}function s(){x&&x.domain(y.range().map(function(e){return(e-N.x)/N.k}).map(y.invert));T&&T.domain(b.range().map(function(e){return(e-N.y)/N.k}).map(b.invert))}function a(e){w++||e({type:"zoomstart"})}function l(e){s();e({type:"zoom",scale:N.k,translate:[N.x,N.y]})}function u(e){--w||e({type:"zoomend"});g=null}function c(){function e(){c=1;i(ia.mouse(r),d);l(s)}function n(){p.on(O,null).on(_,null);f(c&&ia.event.target===o);u(s)}var r=this,o=ia.event.target,s=k.of(r,arguments),c=0,p=ia.select(ua).on(O,e).on(_,n),d=t(ia.mouse(r)),f=X();qu.call(r);a(s)}function p(){function e(){var e=ia.touches(h);f=N.k;e.forEach(function(e){e.identifier in m&&(m[e.identifier]=t(e))});return e}function n(){var t=ia.event.target;ia.select(t).on(x,s).on(b,d);T.push(t);for(var n=ia.event.changedTouches,r=0,i=n.length;i>r;++r)m[n[r].identifier]=null;var a=e(),l=Date.now();if(1===a.length){if(500>l-E){var u=a[0];o(h,u,m[u.identifier],Math.floor(Math.log(N.k)/Math.LN2)+1);S()}E=l}else if(a.length>1){var u=a[0],c=a[1],p=u[0]-c[0],f=u[1]-c[1];v=p*p+f*f}}function s(){var e,t,n,o,s=ia.touches(h);qu.call(h);for(var a=0,u=s.length;u>a;++a,o=null){n=s[a];if(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,p=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(p*f)}E=null;i(e,t);l(g)}function d(){if(ia.event.touches.length){for(var t=ia.event.changedTouches,n=0,r=t.length;r>n;++n)delete m[t[n].identifier];for(var i in m)return void e()}ia.selectAll(T).on(y,null);C.on(R,c).on(D,p);L();u(g)}var f,h=this,g=k.of(h,arguments),m={},v=0,y=".zoom-"+ia.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,T=[],C=ia.select(h),L=X();n();a(g);C.on(R,null).on(D,n)}function d(){var e=k.of(this,arguments);v?clearTimeout(v):(h=t(g=m||ia.mouse(this)),qu.call(this),a(e));v=setTimeout(function(){v=null;u(e)},50);S();r(Math.pow(2,.002*$a())*N.k);i(g,h);l(e)}function f(){var e=ia.mouse(this),n=Math.log(N.k)/Math.LN2;o(this,e,t(e),ia.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var h,g,m,v,E,y,x,b,T,N={x:0,y:0,k:1},L=[960,500],A=Xa,I=250,w=0,R="mousedown.zoom",O="mousemove.zoom",_="mouseup.zoom",D="touchstart.zoom",k=C(e,"zoomstart","zoom","zoomend");e.event=function(e){e.each(function(){var e=k.of(this,arguments),t=N;if(Bu)ia.select(this).transition().each("start.zoom",function(){N=this.__chart__||{x:0,y:0,k:1};a(e)}).tween("zoom:zoom",function(){var n=L[0],r=L[1],i=g?g[0]:n/2,o=g?g[1]:r/2,s=ia.interpolateZoom([(i-N.x)/N.k,(o-N.y)/N.k,n/N.k],[(i-t.x)/t.k,(o-t.y)/t.k,n/t.k]);return function(t){var r=s(t),a=n/r[2];this.__chart__=N={x:i-r[0]*a,y:o-r[1]*a,k:a};l(e)}}).each("interrupt.zoom",function(){u(e)}).each("end.zoom",function(){u(e)});else{this.__chart__=N;a(e);l(e);u(e)}})};e.translate=function(t){if(!arguments.length)return[N.x,N.y];N={x:+t[0],y:+t[1],k:N.k};s();return e};e.scale=function(t){if(!arguments.length)return N.k;N={x:N.x,y:N.y,k:+t};s();return e};e.scaleExtent=function(t){if(!arguments.length)return A;A=null==t?Xa:[+t[0],+t[1]];return e};e.center=function(t){if(!arguments.length)return m;m=t&&[+t[0],+t[1]];return e};e.size=function(t){if(!arguments.length)return L;L=t&&[+t[0],+t[1]];return e};e.duration=function(t){if(!arguments.length)return I;I=+t;return e};e.x=function(t){if(!arguments.length)return x;x=t;y=t.copy();N={x:0,y:0,k:1};return e};e.y=function(t){if(!arguments.length)return T;T=t;b=t.copy();N={x:0,y:0,k:1};return e};return ia.rebind(e,k,"on")};var $a,Xa=[0,1/0],Ka="onwheel"in aa?($a=function(){return-ia.event.deltaY*(ia.event.deltaMode?120:1)},"wheel"):"onmousewheel"in aa?($a=function(){return ia.event.wheelDelta},"mousewheel"):($a=function(){return-ia.event.detail},"MozMousePixelScroll");ia.color=at;at.prototype.toString=function(){return this.rgb()+""};ia.hsl=lt;var Ya=lt.prototype=new at;Ya.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);return new lt(this.h,this.s,this.l/e)};Ya.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return new lt(this.h,this.s,e*this.l)};Ya.rgb=function(){return ut(this.h,this.s,this.l)};ia.hcl=ct;var Qa=ct.prototype=new at;Qa.brighter=function(e){return new ct(this.h,this.c,Math.min(100,this.l+Ja*(arguments.length?e:1)))};Qa.darker=function(e){return new ct(this.h,this.c,Math.max(0,this.l-Ja*(arguments.length?e:1)))};Qa.rgb=function(){return pt(this.h,this.c,this.l).rgb()};ia.lab=dt;var Ja=18,Za=.95047,el=1,tl=1.08883,nl=dt.prototype=new at;nl.brighter=function(e){return new dt(Math.min(100,this.l+Ja*(arguments.length?e:1)),this.a,this.b)};nl.darker=function(e){return new dt(Math.max(0,this.l-Ja*(arguments.length?e:1)),this.a,this.b)};nl.rgb=function(){return ft(this.l,this.a,this.b)};ia.rgb=Et;var rl=Et.prototype=new at;rl.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;if(!t&&!n&&!r)return new Et(i,i,i);t&&i>t&&(t=i);n&&i>n&&(n=i);r&&i>r&&(r=i);return new Et(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))};rl.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return new Et(e*this.r,e*this.g,e*this.b)};rl.hsl=function(){return St(this.r,this.g,this.b)};rl.toString=function(){return"#"+bt(this.r)+bt(this.g)+bt(this.b)};var il=ia.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,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});il.forEach(function(e,t){il.set(e,yt(t))});ia.functor=At;ia.xhr=wt(It);ia.dsv=function(e,t){function n(e,n,o){arguments.length<3&&(o=n,n=null);var s=Rt(e,t,null==n?r:i(n),o);s.row=function(e){return arguments.length?s.response(null==(n=e)?r:i(e)):n};return s}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(s).join(e)}function s(e){return a.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var a=new RegExp('["'+e+"\n]"),l=e.charCodeAt(0);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 s;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);if(13===r){i=!0;10===e.charCodeAt(n+2)&&++c}else 10===r&&(i=!0);return e.slice(t+1,n).replace(/""/g,'"')}for(;u>c;){var r=e.charCodeAt(c++),a=1;if(10===r)i=!0;else if(13===r){i=!0;10===e.charCodeAt(c)&&(++c,++a)}else if(r!==l)continue;return e.slice(t,c-a)}return e.slice(t)}for(var r,i,o={},s={},a=[],u=e.length,c=0,p=0;(r=n())!==s;){for(var d=[];r!==o&&r!==s;){d.push(r);r=n()}t&&null==(d=t(d,p++))||a.push(d)}return a};n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var r=new v,i=[];t.forEach(function(e){for(var t in e)r.has(t)||i.push(r.add(t))});return[i.map(s).join(e)].concat(t.map(function(t){return i.map(function(e){return s(t[e])}).join(e)})).join("\n")};n.formatRows=function(e){return e.map(o).join("\n")};return n};ia.csv=ia.dsv(",","text/csv");ia.tsv=ia.dsv(" ","text/tab-separated-values");var ol,sl,al,ll,ul,cl=ua[y(ua,"requestAnimationFrame")]||function(e){setTimeout(e,17)};ia.timer=function(e,t,n){var r=arguments.length;2>r&&(t=0);3>r&&(n=Date.now());var i=n+t,o={c:e,t:i,f:!1,n:null};sl?sl.n=o:ol=o;sl=o;if(!al){ll=clearTimeout(ll);al=1;cl(Dt)}};ia.timer.flush=function(){kt();Ft()};ia.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var pl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Mt);ia.formatPrefix=function(e,t){var n=0;if(e){0>e&&(e*=-1);t&&(e=ia.round(e,Pt(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)))}return pl[8+n/3]};var dl=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fl=ia.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=ia.round(e,Pt(e,t))).toFixed(Math.max(0,Math.min(20,Pt(e*(1+1e-15),t))))}}),hl=ia.time={},gl=Date;Bt.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(){ml.setUTCDate.apply(this._,arguments)},setDay:function(){ml.setUTCDay.apply(this._,arguments)},setFullYear:function(){ml.setUTCFullYear.apply(this._,arguments)},setHours:function(){ml.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ml.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ml.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ml.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ml.setUTCSeconds.apply(this._,arguments)},setTime:function(){ml.setTime.apply(this._,arguments)}};var ml=Date.prototype;hl.year=Ut(function(e){e=hl.day(e);e.setMonth(0,1);return e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()});hl.years=hl.year.range;hl.years.utc=hl.year.utc.range;hl.day=Ut(function(e){var t=new gl(2e3,0);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate());return t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1});hl.days=hl.day.range;hl.days.utc=hl.day.utc.range;hl.dayOfYear=function(e){var t=hl.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=hl[e]=Ut(function(e){(e=hl.day(e)).setDate(e.getDate()-(e.getDay()+t)%7);return e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=hl.year(e).getDay();return Math.floor((hl.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});hl[e+"s"]=n.range;hl[e+"s"].utc=n.utc.range;hl[e+"OfYear"]=function(e){var n=hl.year(e).getDay();return Math.floor((hl.dayOfYear(e)+(n+t)%7)/7)}});hl.week=hl.sunday;hl.weeks=hl.sunday.range;hl.weeks.utc=hl.sunday.utc.range;hl.weekOfYear=hl.sundayOfYear;var vl={"-":"",_:" ",0:"0"},El=/^\s*\d+/,yl=/^%/;ia.locale=function(e){return{numberFormat:jt(e),timeFormat:Ht(e)}};var xl=ia.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"]});ia.format=xl.numberFormat;ia.geo={};pn.prototype={s:0,t:0,add:function(e){dn(e,this.t,bl);dn(bl.s,this.s,this);this.s?this.t+=bl.t:this.s=bl.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bl=new pn;ia.geo.stream=function(e,t){e&&Tl.hasOwnProperty(e.type)?Tl[e.type](e,t):fn(e,t)};var Tl={Feature:function(e,t){fn(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)fn(n[r].geometry,t)}},Sl={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){hn(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)hn(n[r],t,0)},Polygon:function(e,t){gn(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)gn(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)fn(n[r],t)}};ia.geo.area=function(e){Nl=0;ia.geo.stream(e,Ll);return Nl};var Nl,Cl=new pn,Ll={sphere:function(){Nl+=4*ja},point:x,lineStart:x,lineEnd:x,polygonStart:function(){Cl.reset();Ll.lineStart=mn},polygonEnd:function(){var e=2*Cl;Nl+=0>e?4*ja+e:e;Ll.lineStart=Ll.lineEnd=Ll.point=x}};ia.geo.bounds=function(){function e(e,t){y.push(x=[c=e,d=e]);p>t&&(p=t);t>f&&(f=t)}function t(t,n){var r=vn([t*qa,n*qa]);if(v){var i=yn(v,r),o=[i[1],-i[0],0],s=yn(o,i);Tn(s);s=Sn(s);var l=t-h,u=l>0?1:-1,g=s[0]*Ha*u,m=Ea(l)>180;if(m^(g>u*h&&u*t>g)){var E=s[1]*Ha;E>f&&(f=E)}else if(g=(g+360)%360-180,m^(g>u*h&&u*t>g)){var E=-s[1]*Ha;p>E&&(p=E)}else{p>n&&(p=n);n>f&&(f=n)}if(m)h>t?a(c,t)>a(c,d)&&(d=t):a(t,d)>a(c,d)&&(c=t);else if(d>=c){c>t&&(c=t);t>d&&(d=t)}else t>h?a(c,t)>a(c,d)&&(d=t):a(t,d)>a(c,d)&&(c=t)}else e(t,n);v=r,h=t}function n(){b.point=t}function r(){x[0]=c,x[1]=d;b.point=e;v=null}function i(e,n){if(v){var r=e-h;E+=Ea(r)>180?r+(r>0?360:-360):r}else g=e,m=n;Ll.point(e,n);t(e,n)}function o(){Ll.lineStart()}function s(){i(g,m);Ll.lineEnd();Ea(E)>Pa&&(c=-(d=180));x[0]=c,x[1]=d;v=null}function a(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,p,d,f,h,g,m,v,E,y,x,b={point:e,lineStart:n,lineEnd:r,polygonStart:function(){b.point=i;b.lineStart=o;b.lineEnd=s;E=0;Ll.polygonStart()},polygonEnd:function(){Ll.polygonEnd();b.point=e;b.lineStart=n;b.lineEnd=r;0>Cl?(c=-(d=180),p=-(f=90)):E>Pa?f=90:-Pa>E&&(p=-90);x[0]=c,x[1]=d}};return function(e){f=d=-(c=p=1/0);y=[];ia.geo.stream(e,b);var t=y.length;if(t){y.sort(l);for(var n,r=1,i=y[0],o=[i];t>r;++r){n=y[r];if(u(n[0],i)||u(n[1],i)){a(i[0],n[1])>a(i[0],i[1])&&(i[1]=n[1]);a(n[0],i[1])>a(i[0],i[1])&&(i[0]=n[0])}else o.push(i=n)}for(var s,n,h=-1/0,t=o.length-1,r=0,i=o[t];t>=r;i=n,++r){n=o[r];(s=a(i[1],n[0]))>h&&(h=s,c=n[0],d=i[1])}}y=x=null;return 1/0===c||1/0===p?[[0/0,0/0],[0/0,0/0]]:[[c,p],[d,f]]}}();ia.geo.centroid=function(e){Al=Il=wl=Rl=Ol=_l=Dl=kl=Fl=Pl=Ml=0;ia.geo.stream(e,jl);var t=Fl,n=Pl,r=Ml,i=t*t+n*n+r*r;if(Ma>i){t=_l,n=Dl,r=kl;Pa>Il&&(t=wl,n=Rl,r=Ol);i=t*t+n*n+r*r;if(Ma>i)return[0/0,0/0]}return[Math.atan2(n,t)*Ha,nt(r/Math.sqrt(i))*Ha]};var Al,Il,wl,Rl,Ol,_l,Dl,kl,Fl,Pl,Ml,jl={sphere:x,point:Cn,lineStart:An,lineEnd:In,polygonStart:function(){jl.lineStart=wn},polygonEnd:function(){jl.lineStart=An}},Gl=Fn(On,Gn,Un,[-ja,-ja/2]),Bl=1e9;ia.geo.clipExtent=function(){var e,t,n,r,i,o,s={stream:function(e){i&&(i.valid=!1);i=o(e);i.valid=!0;return i},extent:function(a){if(!arguments.length)return[[e,t],[n,r]];o=Wn(e=+a[0][0],t=+a[0][1],n=+a[1][0],r=+a[1][1]);i&&(i.valid=!1,i=null);return s}};return s.extent([[0,0],[960,500]])};(ia.geo.conicEqualArea=function(){return zn($n)}).raw=$n;ia.geo.albers=function(){return ia.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)};ia.geo.albersUsa=function(){function e(e){var o=e[0],s=e[1];t=null;(n(o,s),t)||(r(o,s),t)||i(o,s);return t}var t,n,r,i,o=ia.geo.albers(),s=ia.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ia.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};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&&.234>i&&r>=-.425&&-.214>r?s:i>=.166&&.234>i&&r>=-.214&&-.115>r?a:o).invert(e)};e.stream=function(e){var t=o.stream(e),n=s.stream(e),r=a.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){if(!arguments.length)return o.precision();o.precision(t);s.precision(t);a.precision(t);return e};e.scale=function(t){if(!arguments.length)return o.scale(); o.scale(t);s.scale(.35*t);a.scale(t);return e.translate(o.translate())};e.translate=function(t){if(!arguments.length)return o.translate();var u=o.scale(),c=+t[0],p=+t[1];n=o.translate(t).clipExtent([[c-.455*u,p-.238*u],[c+.455*u,p+.238*u]]).stream(l).point;r=s.translate([c-.307*u,p+.201*u]).clipExtent([[c-.425*u+Pa,p+.12*u+Pa],[c-.214*u-Pa,p+.234*u-Pa]]).stream(l).point;i=a.translate([c-.205*u,p+.212*u]).clipExtent([[c-.214*u+Pa,p+.166*u+Pa],[c-.115*u-Pa,p+.234*u-Pa]]).stream(l).point;return e};return e.scale(1070)};var Ul,ql,Hl,Vl,Wl,zl,$l={point:x,lineStart:x,lineEnd:x,polygonStart:function(){ql=0;$l.lineStart=Xn},polygonEnd:function(){$l.lineStart=$l.lineEnd=$l.point=x;Ul+=Ea(ql/2)}},Xl={point:Kn,lineStart:x,lineEnd:x,polygonStart:x,polygonEnd:x},Kl={point:Jn,lineStart:Zn,lineEnd:er,polygonStart:function(){Kl.lineStart=tr},polygonEnd:function(){Kl.point=Jn;Kl.lineStart=Zn;Kl.lineEnd=er}};ia.geo.path=function(){function e(e){if(e){"function"==typeof a&&o.pointRadius(+a.apply(this,arguments));s&&s.valid||(s=i(o));ia.geo.stream(e,s)}return o.result()}function t(){s=null;return e}var n,r,i,o,s,a=4.5;e.area=function(e){Ul=0;ia.geo.stream(e,i($l));return Ul};e.centroid=function(e){wl=Rl=Ol=_l=Dl=kl=Fl=Pl=Ml=0;ia.geo.stream(e,i(Kl));return Ml?[Fl/Ml,Pl/Ml]:kl?[_l/kl,Dl/kl]:Ol?[wl/Ol,Rl/Ol]:[0/0,0/0]};e.bounds=function(e){Wl=zl=-(Hl=Vl=1/0);ia.geo.stream(e,i(Xl));return[[Hl,Vl],[Wl,zl]]};e.projection=function(e){if(!arguments.length)return n;i=(n=e)?e.stream||ir(e):It;return t()};e.context=function(e){if(!arguments.length)return r;o=null==(r=e)?new Yn:new nr(e);"function"!=typeof a&&o.pointRadius(a);return t()};e.pointRadius=function(t){if(!arguments.length)return a;a="function"==typeof t?t:(o.pointRadius(+t),+t);return e};return e.projection(ia.geo.albersUsa()).context(null)};ia.geo.transform=function(e){return{stream:function(t){var n=new or(t);for(var r in e)n[r]=e[r];return n}}};or.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()}};ia.geo.projection=ar;ia.geo.projectionMutator=lr;(ia.geo.equirectangular=function(){return ar(cr)}).raw=cr.invert=cr;ia.geo.rotation=function(e){function t(t){t=e(t[0]*qa,t[1]*qa);return t[0]*=Ha,t[1]*=Ha,t}e=dr(e[0]%360*qa,e[1]*qa,e.length>2?e[2]*qa:0);t.invert=function(t){t=e.invert(t[0]*qa,t[1]*qa);return t[0]*=Ha,t[1]*=Ha,t};return t};pr.invert=cr;ia.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=dr(-e[0]*qa,-e[1]*qa,0).invert,i=[];n(null,null,1,{point:function(e,n){i.push(e=t(e,n));e[0]*=Ha,e[1]*=Ha}});return{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;e.origin=function(t){if(!arguments.length)return r;r=t;return e};e.angle=function(r){if(!arguments.length)return t;n=mr((t=+r)*qa,i*qa);return e};e.precision=function(r){if(!arguments.length)return i;n=mr(t*qa,(i=+r)*qa);return e};return e.angle(90)};ia.geo.distance=function(e,t){var n,r=(t[0]-e[0])*qa,i=e[1]*qa,o=t[1]*qa,s=Math.sin(r),a=Math.cos(r),l=Math.sin(i),u=Math.cos(i),c=Math.sin(o),p=Math.cos(o);return Math.atan2(Math.sqrt((n=p*s)*n+(n=u*c-l*p*a)*n),l*c+u*p*a)};ia.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return ia.range(Math.ceil(o/m)*m,i,m).map(d).concat(ia.range(Math.ceil(u/v)*v,l,v).map(f)).concat(ia.range(Math.ceil(r/h)*h,n,h).filter(function(e){return Ea(e%m)>Pa}).map(c)).concat(ia.range(Math.ceil(a/g)*g,s,g).filter(function(e){return Ea(e%v)>Pa}).map(p))}var n,r,i,o,s,a,l,u,c,p,d,f,h=10,g=h,m=90,v=360,E=2.5;e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})};e.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(f(l).slice(1),d(i).reverse().slice(1),f(u).reverse().slice(1))]}};e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()};e.majorExtent=function(t){if(!arguments.length)return[[o,u],[i,l]];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);return e.precision(E)};e.minorExtent=function(t){if(!arguments.length)return[[r,a],[n,s]];r=+t[0][0],n=+t[1][0];a=+t[0][1],s=+t[1][1];r>n&&(t=r,r=n,n=t);a>s&&(t=a,a=s,s=t);return e.precision(E)};e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()};e.majorStep=function(t){if(!arguments.length)return[m,v];m=+t[0],v=+t[1];return e};e.minorStep=function(t){if(!arguments.length)return[h,g];h=+t[0],g=+t[1];return e};e.precision=function(t){if(!arguments.length)return E;E=+t;c=Er(a,s,90);p=yr(r,n,E);d=Er(u,l,90);f=yr(o,i,E);return e};return e.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])};ia.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=xr,i=br;e.distance=function(){return ia.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))};e.source=function(n){if(!arguments.length)return r;r=n,t="function"==typeof n?null:n;return e};e.target=function(t){if(!arguments.length)return i;i=t,n="function"==typeof t?null:t;return e};e.precision=function(){return arguments.length?e:0};return e};ia.geo.interpolate=function(e,t){return Tr(e[0]*qa,e[1]*qa,t[0]*qa,t[1]*qa)};ia.geo.length=function(e){Yl=0;ia.geo.stream(e,Ql);return Yl};var Yl,Ql={sphere:x,point:x,lineStart:Sr,lineEnd:x,polygonStart:x,polygonEnd:x},Jl=Nr(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(ia.geo.azimuthalEqualArea=function(){return ar(Jl)}).raw=Jl;var Zl=Nr(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},It);(ia.geo.azimuthalEquidistant=function(){return ar(Zl)}).raw=Zl;(ia.geo.conicConformal=function(){return zn(Cr)}).raw=Cr;(ia.geo.conicEquidistant=function(){return zn(Lr)}).raw=Lr;var eu=Nr(function(e){return 1/e},Math.atan);(ia.geo.gnomonic=function(){return ar(eu)}).raw=eu;Ar.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Ua]};(ia.geo.mercator=function(){return Ir(Ar)}).raw=Ar;var tu=Nr(function(){return 1},Math.asin);(ia.geo.orthographic=function(){return ar(tu)}).raw=tu;var nu=Nr(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(ia.geo.stereographic=function(){return ar(nu)}).raw=nu;wr.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Ua]};(ia.geo.transverseMercator=function(){var e=Ir(wr),t=e.center,n=e.rotate;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])};return n([0,0,90])}).raw=wr;ia.geom={};ia.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=At(n),o=At(r),s=e.length,a=[],l=[];for(t=0;s>t;t++)a.push([+i.call(this,e[t],t),+o.call(this,e[t],t),t]);a.sort(Dr);for(t=0;s>t;t++)l.push([a[t][0],-a[t][1]]);var u=_r(a),c=_r(l),p=c[0]===u[0],d=c[c.length-1]===u[u.length-1],f=[];for(t=u.length-1;t>=0;--t)f.push(e[a[u[t]][2]]);for(t=+p;t<c.length-d;++t)f.push(e[a[c[t]][2]]);return f}var n=Rr,r=Or;if(arguments.length)return t(e);t.x=function(e){return arguments.length?(n=e,t):n};t.y=function(e){return arguments.length?(r=e,t):r};return t};ia.geom.polygon=function(e){Sa(e,ru);return e};var ru=ia.geom.polygon.prototype=[];ru.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};ru.centroid=function(e){var t,n,r=-1,i=this.length,o=0,s=0,a=this[i-1];arguments.length||(e=-1/(6*this.area()));for(;++r<i;){t=a;a=this[r];n=t[0]*a[1]-a[0]*t[1];o+=(t[0]+a[0])*n;s+=(t[1]+a[1])*n}return[o*e,s*e]};ru.clip=function(e){for(var t,n,r,i,o,s,a=Pr(e),l=-1,u=this.length-Pr(this),c=this[u-1];++l<u;){t=e.slice();e.length=0;i=this[l];o=t[(r=t.length-a)-1];n=-1;for(;++n<r;){s=t[n];if(kr(s,c,i)){kr(o,c,i)||e.push(Fr(o,s,c,i));e.push(s)}else kr(o,c,i)&&e.push(Fr(o,s,c,i));o=s}a&&e.push(e[0]);c=i}return e};var iu,ou,su,au,lu,uu=[],cu=[];Vr.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)}t.sort(zr);return t.length};ni.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}};ri.prototype={insert:function(e,t){var n,r,i;if(e){t.P=e;t.N=e.N;e.N&&(e.N.P=t);e.N=t;if(e.R){e=e.R;for(;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else if(this._){e=ai(this._);t.P=null;t.N=e;e.P=e.L=t;n=e}else{t.P=t.N=null;this._=t;n=null}t.L=t.R=null;t.U=n;t.C=!0;e=t;for(;n&&n.C;){r=n.U;if(n===r.L){i=r.R;if(i&&i.C){n.C=i.C=!1;r.C=!0;e=r}else{if(e===n.R){oi(this,n);e=n;n=e.U}n.C=!1;r.C=!0;si(this,r)}}else{i=r.L;if(i&&i.C){n.C=i.C=!1;r.C=!0;e=r}else{if(e===n.L){si(this,n);e=n;n=e.U}n.C=!1;r.C=!0;oi(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,s=e.R;n=o?s?ai(s):o:s;i?i.L===e?i.L=n:i.R=n:this._=n;if(o&&s){r=n.C;n.C=e.C;n.L=o;o.U=n;if(n!==s){i=n.U;n.U=e.U;e=n.R;i.L=e;n.R=s;s.U=n}else{n.U=i;i=n;e=n.R}}else{r=e.C;e=n}e&&(e.U=i);if(!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){t=i.R;if(t.C){t.C=!1;i.C=!0;oi(this,i);t=i.R}if(t.L&&t.L.C||t.R&&t.R.C){if(!t.R||!t.R.C){t.L.C=!1;t.C=!0;si(this,t);t=i.R}t.C=i.C;i.C=t.R.C=!1;oi(this,i);e=this._;break}}else{t=i.L;if(t.C){t.C=!1;i.C=!0;si(this,i);t=i.L}if(t.L&&t.L.C||t.R&&t.R.C){if(!t.L||!t.L.C){t.R.C=!1;t.C=!0;oi(this,t);t=i.L}t.C=i.C;i.C=t.L.C=!1;si(this,i);e=this._;break}}t.C=!0;e=i;i=i.U}while(!e.C);e&&(e.C=!1)}}};ia.geom.voronoi=function(e){function t(e){var t=new Array(e.length),r=a[0][0],i=a[0][1],o=a[1][0],s=a[1][1];li(n(e),a).cells.forEach(function(n,a){var l=n.edges,u=n.site,c=t[a]=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<=s?[[r,s],[o,s],[o,i],[r,i]]:[];c.point=e[a]});return t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/Pa)*Pa,y:Math.round(s(e,t)/Pa)*Pa,i:t}})}var r=Rr,i=Or,o=r,s=i,a=pu;if(e)return t(e);t.links=function(e){return li(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=[];li(n(e)).cells.forEach(function(n,r){for(var i,o,s=n.site,a=n.edges.sort(zr),l=-1,u=a.length,c=a[u-1].edge,p=c.l===s?c.r:c.l;++l<u;){i=c;o=p;c=a[l].edge;p=c.l===s?c.r:c.l;r<o.i&&r<p.i&&ci(s,o,p)<0&&t.push([e[r],e[o.i],e[p.i]])}});return t};t.x=function(e){return arguments.length?(o=At(r=e),t):r};t.y=function(e){return arguments.length?(s=At(i=e),t):i};t.clipExtent=function(e){if(!arguments.length)return a===pu?null:a;a=null==e?pu:e;return t};t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):a===pu?null:a&&a[1]};return t};var pu=[[-1e6,-1e6],[1e6,1e6]];ia.geom.delaunay=function(e){return ia.geom.voronoi().triangles(e)};ia.geom.quadtree=function(e,t,n,r,i){function o(e){function o(e,t,n,r,i,o,s,a){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(Ea(l-n)+Ea(c-r)<.01)u(e,t,n,r,i,o,s,a);else{var p=e.point;e.x=e.y=e.point=null;u(e,p,l,c,i,o,s,a);u(e,t,n,r,i,o,s,a)}else e.x=n,e.y=r,e.point=t}else u(e,t,n,r,i,o,s,a)}function u(e,t,n,r,i,s,a,l){var u=.5*(i+a),c=.5*(s+l),p=n>=u,d=r>=c,f=d<<1|p;e.leaf=!1;e=e.nodes[f]||(e.nodes[f]=fi());p?i=u:a=u;d?s=c:l=c;o(e,t,n,r,i,s,a,l)}var c,p,d,f,h,g,m,v,E,y=At(a),x=At(l);if(null!=t)g=t,m=n,v=r,E=i;else{v=E=-(g=m=1/0);p=[],d=[];h=e.length;if(s)for(f=0;h>f;++f){c=e[f];c.x<g&&(g=c.x);c.y<m&&(m=c.y);c.x>v&&(v=c.x);c.y>E&&(E=c.y);p.push(c.x);d.push(c.y)}else for(f=0;h>f;++f){var b=+y(c=e[f],f),T=+x(c,f);g>b&&(g=b);m>T&&(m=T);b>v&&(v=b);T>E&&(E=T);p.push(b);d.push(T)}}var S=v-g,N=E-m;S>N?E=m+S:v=g+N;var C=fi();C.add=function(e){o(C,e,+y(e,++f),+x(e,f),g,m,v,E)};C.visit=function(e){hi(e,C,g,m,v,E)};C.find=function(e){return gi(C,e[0],e[1],g,m,v,E)};f=-1;if(null==t){for(;++f<h;)o(C,e[f],p[f],d[f],g,m,v,E);--f}else e.forEach(C.add);p=d=e=c=null;return C}var s,a=Rr,l=Or;if(s=arguments.length){a=pi;l=di;if(3===s){i=n;r=t;n=t=0}return o(e)}o.x=function(e){return arguments.length?(a=e,o):a};o.y=function(e){return arguments.length?(l=e,o):l};o.extent=function(e){if(!arguments.length)return null==t?null:[[t,n],[r,i]];null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]);return o};o.size=function(e){if(!arguments.length)return null==t?null:[r-t,i-n];null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]);return o};return o};ia.interpolateRgb=mi;ia.interpolateObject=vi;ia.interpolateNumber=Ei;ia.interpolateString=yi;var du=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fu=new RegExp(du.source,"g");ia.interpolate=xi;ia.interpolators=[function(e,t){var n=typeof t;return("string"===n?il.has(t)||/^(#|rgb\(|hsl\()/.test(t)?mi:yi:t instanceof at?mi:Array.isArray(t)?bi:"object"===n&&isNaN(t)?vi:Ei)(e,t)}];ia.interpolateArray=bi;var hu=function(){return It},gu=ia.map({linear:hu,poly:Ii,quad:function(){return Ci},cubic:function(){return Li},sin:function(){return wi},exp:function(){return Ri},circle:function(){return Oi},elastic:_i,back:Di,bounce:function(){return ki}}),mu=ia.map({"in":It,out:Si,"in-out":Ni,"out-in":function(e){return Ni(Si(e))}});ia.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";n=gu.get(n)||hu;r=mu.get(r)||It;return Ti(r(n.apply(null,oa.call(arguments,1))))};ia.interpolateHcl=Fi;ia.interpolateHsl=Pi;ia.interpolateLab=Mi;ia.interpolateRound=ji;ia.transform=function(e){var t=aa.createElementNS(ia.ns.prefix.svg,"g");return(ia.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Gi(n?n.matrix:vu)})(e)};Gi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var vu={a:1,b:0,c:0,d:1,e:0,f:0};ia.interpolateTransform=Hi;ia.layout={};ia.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(zi(e[n]));return t}};ia.layout.chord=function(){function e(){var e,u,p,d,f,h={},g=[],m=ia.range(o),v=[];n=[];r=[];e=0,d=-1;for(;++d<o;){u=0,f=-1;for(;++f<o;)u+=i[d][f];g.push(u);v.push(ia.range(o));e+=u}s&&m.sort(function(e,t){return s(g[e],g[t])});a&&v.forEach(function(e,t){e.sort(function(e,n){return a(i[t][e],i[t][n])})});e=(Ga-c*o)/e;u=0,d=-1;for(;++d<o;){p=u,f=-1;for(;++f<o;){var E=m[d],y=v[E][f],x=i[E][y],b=u,T=u+=x*e;h[E+"-"+y]={index:E,subindex:y,startAngle:b,endAngle:T,value:x}}r[E]={index:E,startAngle:p,endAngle:u,value:(u-p)/e};u+=c}d=-1;for(;++d<o;){f=d-1;for(;++f<o;){var S=h[d+"-"+f],N=h[f+"-"+d];(S.value||N.value)&&n.push(S.value<N.value?{source:N,target:S}:{source:S,target:N})}}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,s,a,l,u={},c=0;u.matrix=function(e){if(!arguments.length)return i;o=(i=e)&&i.length;n=r=null;return u};u.padding=function(e){if(!arguments.length)return c;c=e;n=r=null;return u};u.sortGroups=function(e){if(!arguments.length)return s;s=e;n=r=null;return u};u.sortSubgroups=function(e){if(!arguments.length)return a;a=e;n=null;return u};u.sortChords=function(e){if(!arguments.length)return l;l=e;n&&t();return u};u.chords=function(){n||e();return n};u.groups=function(){r||e();return r};return u};ia.layout.force=function(){function e(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,s=t.cy-e.y,a=i-n,l=o*o+s*s;if(l>a*a/m){if(h>l){var u=t.charge/l;e.px-=o*u;e.py-=s*u}return!0}if(t.point&&l&&h>l){var u=t.pointCharge/l;e.px-=o*u;e.py-=s*u}}return!t.charge}}function t(e){e.px=ia.event.x,e.py=ia.event.y;a.resume()}var n,r,i,o,s,a={},l=ia.dispatch("start","tick","end"),u=[1,1],c=.9,p=Eu,d=yu,f=-30,h=xu,g=.1,m=.64,v=[],E=[];a.tick=function(){if((r*=.99)<.005){l.end({type:"end",alpha:r=0});return!0}var t,n,a,p,d,h,m,y,x,b=v.length,T=E.length;for(n=0;T>n;++n){a=E[n];p=a.source;d=a.target;y=d.x-p.x;x=d.y-p.y;if(h=y*y+x*x){h=r*o[n]*((h=Math.sqrt(h))-i[n])/h;y*=h;x*=h;d.x-=y*(m=p.weight/(d.weight+p.weight));d.y-=x*m;p.x+=y*(m=1-m);p.y+=x*m}}if(m=r*g){y=u[0]/2;x=u[1]/2;n=-1;if(m)for(;++n<b;){a=v[n];a.x+=(y-a.x)*m;a.y+=(x-a.y)*m}}if(f){Zi(t=ia.geom.quadtree(v),r,s);n=-1;for(;++n<b;)(a=v[n]).fixed||t.visit(e(a))}n=-1;for(;++n<b;){a=v[n];if(a.fixed){a.x=a.px;a.y=a.py}else{a.x-=(a.px-(a.px=a.x))*c;a.y-=(a.py-(a.py=a.y))*c}}l.tick({type:"tick",alpha:r})};a.nodes=function(e){if(!arguments.length)return v;v=e;return a};a.links=function(e){if(!arguments.length)return E;E=e;return a};a.size=function(e){if(!arguments.length)return u;u=e;return a};a.linkDistance=function(e){if(!arguments.length)return p;p="function"==typeof e?e:+e;return a};a.distance=a.linkDistance;a.linkStrength=function(e){if(!arguments.length)return d;d="function"==typeof e?e:+e;return a};a.friction=function(e){if(!arguments.length)return c;c=+e;return a};a.charge=function(e){if(!arguments.length)return f;f="function"==typeof e?e:+e;return a};a.chargeDistance=function(e){if(!arguments.length)return Math.sqrt(h);h=e*e;return a};a.gravity=function(e){if(!arguments.length)return g;g=+e;return a};a.theta=function(e){if(!arguments.length)return Math.sqrt(m);m=e*e;return a};a.alpha=function(e){if(!arguments.length)return r;e=+e;if(r)r=e>0?e:0;else if(e>0){l.start({type:"start",alpha:r=e});ia.timer(a.tick)}return a};a.start=function(){function e(e,r){if(!n){n=new Array(l);for(a=0;l>a;++a)n[a]=[];for(a=0;u>a;++a){var i=E[a];n[i.source.index].push(i.target);n[i.target.index].push(i.source)}}for(var o,s=n[t],a=-1,u=s.length;++a<u;)if(!isNaN(o=s[a][e]))return o;return Math.random()*r}var t,n,r,l=v.length,c=E.length,h=u[0],g=u[1];for(t=0;l>t;++t){(r=v[t]).index=t;r.weight=0}for(t=0;c>t;++t){r=E[t];"number"==typeof r.source&&(r.source=v[r.source]);"number"==typeof r.target&&(r.target=v[r.target]);++r.source.weight;++r.target.weight}for(t=0;l>t;++t){r=v[t];isNaN(r.x)&&(r.x=e("x",h));isNaN(r.y)&&(r.y=e("y",g));isNaN(r.px)&&(r.px=r.x);isNaN(r.py)&&(r.py=r.y)}i=[];if("function"==typeof p)for(t=0;c>t;++t)i[t]=+p.call(this,E[t],t);else for(t=0;c>t;++t)i[t]=p;o=[];if("function"==typeof d)for(t=0;c>t;++t)o[t]=+d.call(this,E[t],t);else for(t=0;c>t;++t)o[t]=d;s=[];if("function"==typeof f)for(t=0;l>t;++t)s[t]=+f.call(this,v[t],t);else for(t=0;l>t;++t)s[t]=f;return a.resume()};a.resume=function(){return a.alpha(.1)};a.stop=function(){return a.alpha(0)};a.drag=function(){n||(n=ia.behavior.drag().origin(It).on("dragstart.force",Ki).on("drag.force",t).on("dragend.force",Yi));if(!arguments.length)return n;this.on("mouseover.force",Qi).on("mouseout.force",Ji).call(n);return void 0};return ia.rebind(a,l,"on")};var Eu=20,yu=1,xu=1/0;ia.layout.hierarchy=function(){function e(i){var o,s=[i],a=[];i.depth=0;for(;null!=(o=s.pop());){a.push(o);if((u=n.call(e,o,o.depth))&&(l=u.length)){for(var l,u,c;--l>=0;){s.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}}no(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t);r&&(i=e.parent)&&(i.value+=e.value)});return a}var t=oo,n=ro,r=io;e.sort=function(n){if(!arguments.length)return t;t=n;return e};e.children=function(t){if(!arguments.length)return n;n=t;return e};e.value=function(t){if(!arguments.length)return r;r=t;return e};e.revalue=function(t){if(r){to(t,function(e){e.children&&(e.value=0)});no(t,function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0);(n=t.parent)&&(n.value+=t.value)})}return t};return e};ia.layout.partition=function(){function e(t,n,r,i){var o=t.children;t.x=n;t.y=t.depth*i;t.dx=r;t.dy=i;if(o&&(s=o.length)){var s,a,l,u=-1;r=t.value?r/t.value:0;for(;++u<s;){e(a=o[u],n,l=a.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 s=r.call(this,n,o);e(s[0],0,i[0],i[1]/t(s[0]));return s}var r=ia.layout.hierarchy(),i=[1,1];n.size=function(e){if(!arguments.length)return i;i=e;return n};return eo(n,r)};ia.layout.pie=function(){function e(s){var a,l=s.length,u=s.map(function(n,r){return+t.call(e,n,r)}),c=+("function"==typeof r?r.apply(this,arguments):r),p=("function"==typeof i?i.apply(this,arguments):i)-c,d=Math.min(Math.abs(p)/l,+("function"==typeof o?o.apply(this,arguments):o)),f=d*(0>p?-1:1),h=(p-l*f)/ia.sum(u),g=ia.range(l),m=[];null!=n&&g.sort(n===bu?function(e,t){return u[t]-u[e]}:function(e,t){return n(s[e],s[t])});g.forEach(function(e){m[e]={data:s[e],value:a=u[e],startAngle:c,endAngle:c+=a*h+f,padAngle:d}});return m}var t=Number,n=bu,r=0,i=Ga,o=0;e.value=function(n){if(!arguments.length)return t;t=n;return e};e.sort=function(t){if(!arguments.length)return n;n=t;return e};e.startAngle=function(t){if(!arguments.length)return r;r=t;return e};e.endAngle=function(t){if(!arguments.length)return i;i=t;return e};e.padAngle=function(t){if(!arguments.length)return o;o=t;return e};return e};var bu={};ia.layout.stack=function(){function e(a,l){if(!(d=a.length))return a;var u=a.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),s.call(e,t,n)]})}),p=n.call(e,c,l);u=ia.permute(u,p);c=ia.permute(c,p);var d,f,h,g,m=r.call(e,c,l),v=u[0].length;for(h=0;v>h;++h){i.call(e,u[0][h],g=m[h],c[0][h][1]);for(f=1;d>f;++f)i.call(e,u[f][h],g+=c[f-1][h][1],c[f][h][1])}return a}var t=It,n=co,r=po,i=uo,o=ao,s=lo;e.values=function(n){if(!arguments.length)return t;t=n;return e};e.order=function(t){if(!arguments.length)return n;n="function"==typeof t?t:Tu.get(t)||co;return e};e.offset=function(t){if(!arguments.length)return r;r="function"==typeof t?t:Su.get(t)||po;return e};e.x=function(t){if(!arguments.length)return o;o=t;return e};e.y=function(t){if(!arguments.length)return s;s=t;return e};e.out=function(t){if(!arguments.length)return i;i=t;return e};return e};var Tu=ia.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(fo),o=e.map(ho),s=ia.range(r).sort(function(e,t){return i[e]-i[t]}),a=0,l=0,u=[],c=[];for(t=0;r>t;++t){n=s[t];if(l>a){a+=o[n];u.push(n)}else{l+=o[n];c.push(n)}}return c.reverse().concat(u)},reverse:function(e){return ia.range(e.length).reverse()},"default":co}),Su=ia.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,s=[],a=0,l=[];for(n=0;o>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][n][1];r>a&&(a=r);s.push(r)}for(n=0;o>n;++n)l[n]=(a-s[n])/2;return l},wiggle:function(e){var t,n,r,i,o,s,a,l,u,c=e.length,p=e[0],d=p.length,f=[];f[0]=l=u=0;for(n=1;d>n;++n){for(t=0,i=0;c>t;++t)i+=e[t][n][1];for(t=0,o=0,a=p[n][0]-p[n-1][0];c>t;++t){for(r=0,s=(e[t][n][1]-e[t][n-1][1])/(2*a);t>r;++r)s+=(e[r][n][1]-e[r][n-1][1])/a;o+=s*e[t][n][1]}f[n]=l-=i?o/i*a:0;u>l&&(u=l)}for(n=0;d>n;++n)f[n]-=u;return f},expand:function(e){var t,n,r,i=e.length,o=e[0].length,s=1/i,a=[];for(n=0;o>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][n][1];if(r)for(t=0;i>t;t++)e[t][n][1]/=r;else for(t=0;i>t;t++)e[t][n][1]=s}for(n=0;o>n;++n)a[n]=0;return a},zero:po});ia.layout.histogram=function(){function e(e,o){for(var s,a,l=[],u=e.map(n,this),c=r.call(this,u,o),p=i.call(this,c,u,o),o=-1,d=u.length,f=p.length-1,h=t?1:1/d;++o<f;){s=l[o]=[];s.dx=p[o+1]-(s.x=p[o]);s.y=0}if(f>0){o=-1;for(;++o<d;){a=u[o];if(a>=c[0]&&a<=c[1]){s=l[ia.bisect(p,a,1,f)-1];s.y+=h;s.push(e[o])}}}return l}var t=!0,n=Number,r=Eo,i=mo;e.value=function(t){if(!arguments.length)return n;n=t;return e};e.range=function(t){if(!arguments.length)return r;r=At(t);return e};e.bins=function(t){if(!arguments.length)return i;i="number"==typeof t?function(e){return vo(e,t)}:At(t);return e};e.frequency=function(n){if(!arguments.length)return t;t=!!n;return e};return e};ia.layout.pack=function(){function e(e,o){var s=n.call(this,e,o),a=s[0],l=i[0],u=i[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};a.x=a.y=0;no(a,function(e){e.r=+c(e.value)});no(a,So);if(r){var p=r*(t?1:Math.max(2*a.r/l,2*a.r/u))/2;no(a,function(e){e.r+=p});no(a,So);no(a,function(e){e.r-=p})}Lo(a,l/2,u/2,t?1:1/Math.max(2*a.r/l,2*a.r/u));return s}var t,n=ia.layout.hierarchy().sort(yo),r=0,i=[1,1];e.size=function(t){if(!arguments.length)return i;i=t;return e};e.radius=function(n){if(!arguments.length)return t;t=null==n||"function"==typeof n?n:+n;return e};e.padding=function(t){if(!arguments.length)return r;r=+t;return e};return eo(e,n)};ia.layout.tree=function(){function e(e,i){var c=s.call(this,e,i),p=c[0],d=t(p);no(d,n),d.parent.m=-d.z;to(d,r);if(u)to(p,o);else{var f=p,h=p,g=p;to(p,function(e){e.x<f.x&&(f=e);e.x>h.x&&(h=e);e.depth>g.depth&&(g=e)});var m=a(f,h)/2-f.x,v=l[0]/(h.x+a(h,f)/2+m),E=l[1]/(g.depth||1);to(p,function(e){e.x=(e.x+m)*v;e.y=e.depth*E})}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,s=0,a=o.length;a>s;++s)r.push((o[s]=i={_:o[s],parent:t,children:(i=o[s].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:s}).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){_o(e);var o=(t[0].z+t[t.length-1].z)/2;if(r){e.z=r.z+a(e._,r._);e.m=e.z-o}else e.z=o}else r&&(e.z=r.z+a(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,s=t,l=i.parent.children[0],u=i.m,c=o.m,p=s.m,d=l.m;s=Ro(s),i=wo(i),s&&i;){l=wo(l);o=Ro(o);o.a=e;r=s.z+p-i.z-u+a(s._,i._);if(r>0){Oo(Do(s,e,n),e,r);u+=r;c+=r}p+=s.m;u+=i.m;d+=l.m;c+=o.m}if(s&&!Ro(o)){o.t=s;o.m+=p-c}if(i&&!wo(l)){l.t=i;l.m+=u-d;n=e}}return n}function o(e){e.x*=l[0];e.y=e.depth*l[1]}var s=ia.layout.hierarchy().sort(null).value(null),a=Io,l=[1,1],u=null;e.separation=function(t){if(!arguments.length)return a;a=t;return e};e.size=function(t){if(!arguments.length)return u?null:l;u=null==(l=t)?o:null;return e};e.nodeSize=function(t){if(!arguments.length)return u?l:null;u=null==(l=t)?null:o;return e};return eo(e,s)};ia.layout.cluster=function(){function e(e,o){var s,a=t.call(this,e,o),l=a[0],u=0;no(l,function(e){var t=e.children;if(t&&t.length){e.x=Fo(t);e.y=ko(t)}else{e.x=s?u+=n(e,s):0;e.y=0;s=e}});var c=Po(l),p=Mo(l),d=c.x-n(c,p)/2,f=p.x+n(p,c)/2;no(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-d)/(f-d)*r[0];e.y=(1-(l.y?e.y/l.y:1))*r[1]});return a}var t=ia.layout.hierarchy().sort(null).value(null),n=Io,r=[1,1],i=!1;e.separation=function(t){if(!arguments.length)return n;n=t;return e};e.size=function(t){if(!arguments.length)return i?null:r;i=null==(r=t);return e};e.nodeSize=function(t){if(!arguments.length)return i?r:null;i=null!=(r=t);return e};return eo(e,t)};ia.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,o=e.length;++i<o;){r=(n=e[i]).value*(0>t?0:t);n.area=isNaN(r)||0>=r?0:r}}function t(n){var o=n.children;if(o&&o.length){var s,a,l,u=p(n),c=[],d=o.slice(),h=1/0,g="slice"===f?u.dx:"dice"===f?u.dy:"slice-dice"===f?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);e(d,u.dx*u.dy/n.value);c.area=0;for(;(l=d.length)>0;){c.push(s=d[l-1]);c.area+=s.area;if("squarify"!==f||(a=r(c,g))<=h){d.pop();h=a}else{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}}if(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,s=p(t),a=r.slice(),l=[];e(a,s.dx*s.dy/t.value);l.area=0;for(;o=a.pop();){l.push(o);l.area+=o.area;if(null!=o.z){i(l,o.z?s.dx:s.dy,s,!a.length);l.length=l.area=0}}r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,o=1/0,s=-1,a=e.length;++s<a;)if(n=e[s].area){o>n&&(o=n);n>i&&(i=n)}r*=r;t*=t;return r?Math.max(t*i*h/r,r/(t*o*h)):1/0}function i(e,t,n,r){var i,o=-1,s=e.length,a=n.x,u=n.y,c=t?l(e.area/t):0;if(t==n.dx){(r||c>n.dy)&&(c=n.dy);for(;++o<s;){i=e[o];i.x=a;i.y=u;i.dy=c;a+=i.dx=Math.min(n.x+n.dx-a,c?l(i.area/c):0)}i.z=!0;i.dx+=n.x+n.dx-a;n.y+=c;n.dy-=c}else{(r||c>n.dx)&&(c=n.dx);for(;++o<s;){i=e[o];i.x=a;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=s||a(r),o=i[0];o.x=0;o.y=0;o.dx=u[0];o.dy=u[1];s&&a.revalue(o);e([o],o.dx*o.dy/o.value);(s?n:t)(o);d&&(s=i);return i}var s,a=ia.layout.hierarchy(),l=Math.round,u=[1,1],c=null,p=jo,d=!1,f="squarify",h=.5*(1+Math.sqrt(5));o.size=function(e){if(!arguments.length)return u;u=e;return o};o.padding=function(e){function t(t){var n=e.call(o,t,t.depth);return null==n?jo(t):Go(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Go(t,e)}if(!arguments.length)return c;var r;p=null==(c=e)?jo:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n;return o};o.round=function(e){if(!arguments.length)return l!=Number;l=e?Math.round:Number;return o};o.sticky=function(e){if(!arguments.length)return d;d=e;s=null;return o};o.ratio=function(e){if(!arguments.length)return h;h=e;return o};o.mode=function(e){if(!arguments.length)return f;f=e+"";return o};return eo(o,a)};ia.random={normal:function(e,t){var n=arguments.length;2>n&&(t=1);1>n&&(e=0);return 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=ia.random.normal.apply(ia,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=ia.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;e>n;n++)t+=Math.random();return t}}};ia.scale={};var Nu={floor:It,ceil:It};ia.scale.linear=function(){return zo([0,1],[0,1],xi,!1)};var Cu={s:1,g:1,p:1,r:1,e:1};ia.scale.log=function(){return es(ia.scale.linear().domain([0,1]),10,!0,[1,10])};var Lu=ia.format(".0e"),Au={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};ia.scale.pow=function(){return ts(ia.scale.linear(),1,[0,1])};ia.scale.sqrt=function(){return ia.scale.pow().exponent(.5)};ia.scale.ordinal=function(){return rs([],{t:"range",a:[[]]})};ia.scale.category10=function(){return ia.scale.ordinal().range(Iu)};ia.scale.category20=function(){return ia.scale.ordinal().range(wu)};ia.scale.category20b=function(){return ia.scale.ordinal().range(Ru)};ia.scale.category20c=function(){return ia.scale.ordinal().range(Ou)};var Iu=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xt),wu=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xt),Ru=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xt),Ou=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xt);ia.scale.quantile=function(){return is([],[])};ia.scale.quantize=function(){return os(0,1,[0,1])};ia.scale.threshold=function(){return ss([.5],[0,1])};ia.scale.identity=function(){return as([0,1])};ia.svg={};ia.svg.arc=function(){function e(){var e=Math.max(0,+n.apply(this,arguments)),u=Math.max(0,+r.apply(this,arguments)),c=s.apply(this,arguments)-Ua,p=a.apply(this,arguments)-Ua,d=Math.abs(p-c),f=c>p?0:1;e>u&&(h=u,u=e,e=h);if(d>=Ba)return t(u,f)+(e?t(e,1-f):"")+"Z";var h,g,m,v,E,y,x,b,T,S,N,C,L=0,A=0,I=[];if(v=(+l.apply(this,arguments)||0)/2){m=o===_u?Math.sqrt(e*e+u*u):+o.apply(this,arguments);f||(A*=-1);u&&(A=nt(m/u*Math.sin(v)));e&&(L=nt(m/e*Math.sin(v)))}if(u){E=u*Math.cos(c+A);y=u*Math.sin(c+A);x=u*Math.cos(p-A);b=u*Math.sin(p-A);var w=Math.abs(p-c-2*A)<=ja?0:1;if(A&&hs(E,y,x,b)===f^w){var R=(c+p)/2;E=u*Math.cos(R);y=u*Math.sin(R);x=b=null}}else E=y=0;if(e){T=e*Math.cos(p-L);S=e*Math.sin(p-L);N=e*Math.cos(c+L);C=e*Math.sin(c+L);var O=Math.abs(c-p+2*L)<=ja?0:1;if(L&&hs(T,S,N,C)===1-f^O){var _=(c+p)/2;T=e*Math.cos(_);S=e*Math.sin(_);N=C=null}}else T=S=0;if((h=Math.min(Math.abs(u-e)/2,+i.apply(this,arguments)))>.001){g=u>e^f?0:1;var D=null==N?[T,S]:null==x?[E,y]:Fr([E,y],[N,C],[x,b],[T,S]),k=E-D[0],F=y-D[1],P=x-D[0],M=b-D[1],j=1/Math.sin(Math.acos((k*P+F*M)/(Math.sqrt(k*k+F*F)*Math.sqrt(P*P+M*M)))/2),G=Math.sqrt(D[0]*D[0]+D[1]*D[1]);if(null!=x){var B=Math.min(h,(u-G)/(j+1)),U=gs(null==N?[T,S]:[N,C],[E,y],u,B,f),q=gs([x,b],[T,S],u,B,f); h===B?I.push("M",U[0],"A",B,",",B," 0 0,",g," ",U[1],"A",u,",",u," 0 ",1-f^hs(U[1][0],U[1][1],q[1][0],q[1][1]),",",f," ",q[1],"A",B,",",B," 0 0,",g," ",q[0]):I.push("M",U[0],"A",B,",",B," 0 1,",g," ",q[0])}else I.push("M",E,",",y);if(null!=N){var H=Math.min(h,(e-G)/(j-1)),V=gs([E,y],[N,C],e,-H,f),W=gs([T,S],null==x?[E,y]:[x,b],e,-H,f);h===H?I.push("L",W[0],"A",H,",",H," 0 0,",g," ",W[1],"A",e,",",e," 0 ",f^hs(W[1][0],W[1][1],V[1][0],V[1][1]),",",1-f," ",V[1],"A",H,",",H," 0 0,",g," ",V[0]):I.push("L",W[0],"A",H,",",H," 0 0,",g," ",V[0])}else I.push("L",T,",",S)}else{I.push("M",E,",",y);null!=x&&I.push("A",u,",",u," 0 ",w,",",f," ",x,",",b);I.push("L",T,",",S);null!=N&&I.push("A",e,",",e," 0 ",O,",",1-f," ",N,",",C)}I.push("Z");return I.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=us,r=cs,i=ls,o=_u,s=ps,a=ds,l=fs;e.innerRadius=function(t){if(!arguments.length)return n;n=At(t);return e};e.outerRadius=function(t){if(!arguments.length)return r;r=At(t);return e};e.cornerRadius=function(t){if(!arguments.length)return i;i=At(t);return e};e.padRadius=function(t){if(!arguments.length)return o;o=t==_u?_u:At(t);return e};e.startAngle=function(t){if(!arguments.length)return s;s=At(t);return e};e.endAngle=function(t){if(!arguments.length)return a;a=At(t);return e};e.padAngle=function(t){if(!arguments.length)return l;l=At(t);return e};e.centroid=function(){var e=(+n.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+s.apply(this,arguments)+ +a.apply(this,arguments))/2-Ua;return[Math.cos(t)*e,Math.sin(t)*e]};return e};var _u="auto";ia.svg.line=function(){return ms(It)};var Du=ia.map({linear:vs,"linear-closed":Es,step:ys,"step-before":xs,"step-after":bs,basis:As,"basis-open":Is,"basis-closed":ws,bundle:Rs,cardinal:Ns,"cardinal-open":Ts,"cardinal-closed":Ss,monotone:Ps});Du.forEach(function(e,t){t.key=e;t.closed=/-closed$/.test(e)});var ku=[0,2/3,1/3,0],Fu=[0,1/3,2/3,0],Pu=[0,1/6,2/3,1/6];ia.svg.line.radial=function(){var e=ms(Ms);e.radius=e.x,delete e.x;e.angle=e.y,delete e.y;return e};xs.reverse=bs;bs.reverse=xs;ia.svg.area=function(){return js(It)};ia.svg.area.radial=function(){var e=js(Ms);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;return e};ia.svg.chord=function(){function e(e,a){var l=t(this,o,e,a),u=t(this,s,e,a);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=a.call(e,i,r),s=l.call(e,i,r)-Ua,c=u.call(e,i,r)-Ua;return{r:o,a0:s,a1:c,p0:[o*Math.cos(s),o*Math.sin(s)],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>ja)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var o=xr,s=br,a=Gs,l=ps,u=ds;e.radius=function(t){if(!arguments.length)return a;a=At(t);return e};e.source=function(t){if(!arguments.length)return o;o=At(t);return e};e.target=function(t){if(!arguments.length)return s;s=At(t);return e};e.startAngle=function(t){if(!arguments.length)return l;l=At(t);return e};e.endAngle=function(t){if(!arguments.length)return u;u=At(t);return e};return e};ia.svg.diagonal=function(){function e(e,i){var o=t.call(this,e,i),s=n.call(this,e,i),a=(o.y+s.y)/2,l=[o,{x:o.x,y:a},{x:s.x,y:a},s];l=l.map(r);return"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=xr,n=br,r=Bs;e.source=function(n){if(!arguments.length)return t;t=At(n);return e};e.target=function(t){if(!arguments.length)return n;n=At(t);return e};e.projection=function(t){if(!arguments.length)return r;r=t;return e};return e};ia.svg.diagonal.radial=function(){var e=ia.svg.diagonal(),t=Bs,n=e.projection;e.projection=function(e){return arguments.length?n(Us(t=e)):t};return e};ia.svg.symbol=function(){function e(e,r){return(Mu.get(t.call(this,e,r))||Vs)(n.call(this,e,r))}var t=Hs,n=qs;e.type=function(n){if(!arguments.length)return t;t=At(n);return e};e.size=function(t){if(!arguments.length)return n;n=At(t);return e};return e};var Mu=ia.map({circle:Vs,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*Gu)),n=t*Gu;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/ju),n=t*ju/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/ju),n=t*ju/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});ia.svg.symbolTypes=Mu.keys();var ju=Math.sqrt(3),Gu=Math.tan(30*qa);Ia.transition=function(e){for(var t,n,r=Bu||++Vu,i=Ks(e),o=[],s=Uu||{time:Date.now(),ease:Ai,delay:0,duration:250},a=-1,l=this.length;++a<l;){o.push(t=[]);for(var u=this[a],c=-1,p=u.length;++c<p;){(n=u[c])&&Ys(n,c,i,r,s);t.push(n)}}return zs(o,i,r)};Ia.interrupt=function(e){return this.each(null==e?qu:Ws(Ks(e)))};var Bu,Uu,qu=Ws(Ks()),Hu=[],Vu=0;Hu.call=Ia.call;Hu.empty=Ia.empty;Hu.node=Ia.node;Hu.size=Ia.size;ia.transition=function(e,t){return e&&e.transition?Bu?e.transition(t):e:Oa.transition(e)};ia.transition.prototype=Hu;Hu.select=function(e){var t,n,r,i=this.id,o=this.namespace,s=[];e=A(e);for(var a=-1,l=this.length;++a<l;){s.push(t=[]);for(var u=this[a],c=-1,p=u.length;++c<p;)if((r=u[c])&&(n=e.call(r,r.__data__,c,a))){"__data__"in r&&(n.__data__=r.__data__);Ys(n,c,o,i,r[o][i]);t.push(n)}else t.push(null)}return zs(s,o,i)};Hu.selectAll=function(e){var t,n,r,i,o,s=this.id,a=this.namespace,l=[];e=I(e);for(var u=-1,c=this.length;++u<c;)for(var p=this[u],d=-1,f=p.length;++d<f;)if(r=p[d]){o=r[a][s];n=e.call(r,r.__data__,d,u);l.push(t=[]);for(var h=-1,g=n.length;++h<g;){(i=n[h])&&Ys(i,h,a,s,o);t.push(i)}}return zs(l,a,s)};Hu.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=B(e));for(var o=0,s=this.length;s>o;o++){i.push(t=[]);for(var n=this[o],a=0,l=n.length;l>a;a++)(r=n[a])&&e.call(r,r.__data__,a,o)&&t.push(r)}return zs(i,this.namespace,this.id)};Hu.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):q(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})};Hu.attr=function(e,t){function n(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(a);return n!==e&&(t=s(n,e),function(e){this.setAttribute(a,t(e))})})}function o(e){return null==e?r:(e+="",function(){var t,n=this.getAttributeNS(a.space,a.local);return n!==e&&(t=s(n,e),function(e){this.setAttributeNS(a.space,a.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var s="transform"==e?Hi:xi,a=ia.ns.qualify(e);return $s(this,"attr."+e,t,a.local?o:i)};Hu.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=ia.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)};Hu.style=function(e,t,n){function r(){this.style.removeProperty(e)}function i(t){return null==t?r:(t+="",function(){var r,i=ua.getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=xi(i,t),function(t){this.style.setProperty(e,r(t),n)})})}var o=arguments.length;if(3>o){if("string"!=typeof e){2>o&&(t="");for(n in e)this.style(n,e[n],t);return this}n=""}return $s(this,"style."+e,t,i)};Hu.styleTween=function(e,t,n){function r(r,i){var o=t.call(this,r,i,ua.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}arguments.length<3&&(n="");return this.tween("style."+e,r)};Hu.text=function(e){return $s(this,"text",e,Xs)};Hu.remove=function(){var e=this.namespace;return this.each("end.transition",function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)})};Hu.ease=function(e){var t=this.id,n=this.namespace;if(arguments.length<1)return this.node()[n][t].ease;"function"!=typeof e&&(e=ia.ease.apply(ia,arguments));return q(this,function(r){r[n][t].ease=e})};Hu.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:q(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}))};Hu.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:q(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}))};Hu.each=function(e,t){var n=this.id,r=this.namespace;if(arguments.length<2){var i=Uu,o=Bu;try{Bu=n;q(this,function(t,i,o){Uu=t[r][n];e.call(t,t.__data__,i,o)})}finally{Uu=i;Bu=o}}else q(this,function(i){var o=i[r][n];(o.event||(o.event=ia.dispatch("start","end","interrupt"))).on(e,t)});return this};Hu.transition=function(){for(var e,t,n,r,i=this.id,o=++Vu,s=this.namespace,a=[],l=0,u=this.length;u>l;l++){a.push(e=[]);for(var t=this[l],c=0,p=t.length;p>c;c++){if(n=t[c]){r=n[s][i];Ys(n,c,s,o,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})}e.push(n)}}return zs(a,s,o)};ia.svg.axis=function(){function e(e){e.each(function(){var e,u=ia.select(this),c=this.__chart__||n,p=this.__chart__=n.copy(),d=null==l?p.ticks?p.ticks.apply(p,a):p.domain():l,f=null==t?p.tickFormat?p.tickFormat.apply(p,a):It:t,h=u.selectAll(".tick").data(d,p),g=h.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),m=ia.transition(h.exit()).style("opacity",Pa).remove(),v=ia.transition(h.order()).style("opacity",1),E=Math.max(i,0)+s,y=Uo(p),x=u.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),ia.transition(x));g.append("line");g.append("text");var T,S,N,C,L=g.select("line"),A=v.select("line"),I=h.select("text").text(f),w=g.select("text"),R=v.select("text"),O="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r){e=Qs,T="x",N="y",S="x2",C="y2";I.attr("dy",0>O?"0em":".71em").style("text-anchor","middle");b.attr("d","M"+y[0]+","+O*o+"V0H"+y[1]+"V"+O*o)}else{e=Js,T="y",N="x",S="y2",C="x2";I.attr("dy",".32em").style("text-anchor",0>O?"end":"start");b.attr("d","M"+O*o+","+y[0]+"H0V"+y[1]+"H"+O*o)}L.attr(C,O*i);w.attr(N,O*E);A.attr(S,0).attr(C,O*i);R.attr(T,0).attr(N,O*E);if(p.rangeBand){var _=p,D=_.rangeBand()/2;c=p=function(e){return _(e)+D}}else c.rangeBand?c=p:m.call(e,p,c);g.call(e,c,p);v.call(e,p,p)})}var t,n=ia.scale.linear(),r=Wu,i=6,o=6,s=3,a=[10],l=null;e.scale=function(t){if(!arguments.length)return n;n=t;return e};e.orient=function(t){if(!arguments.length)return r;r=t in zu?t+"":Wu;return e};e.ticks=function(){if(!arguments.length)return a;a=arguments;return e};e.tickValues=function(t){if(!arguments.length)return l;l=t;return e};e.tickFormat=function(n){if(!arguments.length)return t;t=n;return e};e.tickSize=function(t){var n=arguments.length;if(!n)return i;i=+t;o=+arguments[n-1];return e};e.innerTickSize=function(t){if(!arguments.length)return i;i=+t;return e};e.outerTickSize=function(t){if(!arguments.length)return o;o=+t;return e};e.tickPadding=function(t){if(!arguments.length)return s;s=+t;return e};e.tickSubdivide=function(){return arguments.length&&e};return e};var Wu="bottom",zu={top:1,right:1,bottom:1,left:1};ia.svg.brush=function(){function e(o){o.each(function(){var o=ia.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),s=o.selectAll(".background").data([0]);s.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 a=o.selectAll(".resize").data(h,It);a.exit().remove();a.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return $u[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");a.style("display",e.empty()?"none":null);var c,p=ia.transition(o),d=ia.transition(s);if(l){c=Uo(l);d.attr("x",c[0]).attr("width",c[1]-c[0]);n(p)}if(u){c=Uo(u);d.attr("y",c[0]).attr("height",c[1]-c[0]);r(p)}t(p)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+c[+/e$/.test(e)]+","+p[+/^s/.test(e)]+")"})}function n(e){e.select(".extent").attr("x",c[0]);e.selectAll(".extent,.n>rect,.s>rect").attr("width",c[1]-c[0])}function r(e){e.select(".extent").attr("y",p[0]);e.selectAll(".extent,.e>rect,.w>rect").attr("height",p[1]-p[0])}function i(){function i(){if(32==ia.event.keyCode){if(!I){E=null;R[0]-=c[1];R[1]-=p[1];I=2}S()}}function h(){if(32==ia.event.keyCode&&2==I){R[0]+=c[1];R[1]+=p[1];I=0;S()}}function g(){var e=ia.mouse(x),i=!1;if(y){e[0]+=y[0];e[1]+=y[1]}if(!I)if(ia.event.altKey){E||(E=[(c[0]+c[1])/2,(p[0]+p[1])/2]);R[0]=c[+(e[0]<E[0])];R[1]=p[+(e[1]<E[1])]}else E=null;if(L&&m(e,l,0)){n(N);i=!0}if(A&&m(e,u,1)){r(N);i=!0}if(i){t(N);T({type:"brush",mode:I?"move":"resize"})}}function m(e,t,n){var r,i,a=Uo(t),l=a[0],u=a[1],h=R[n],g=n?p:c,m=g[1]-g[0];if(I){l-=h;u-=m+h}r=(n?f:d)?Math.max(l,Math.min(u,e[n])):e[n];if(I)i=(r+=h)+m;else{E&&(h=Math.max(l,Math.min(u,2*E[n]-r)));if(r>h){i=r;r=h}else i=h}if(g[0]!=r||g[1]!=i){n?s=null:o=null;g[0]=r;g[1]=i;return!0}}function v(){g();N.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null);ia.select("body").style("cursor",null);O.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null);w();T({type:"brushend"})}var E,y,x=this,b=ia.select(ia.event.target),T=a.of(x,arguments),N=ia.select(x),C=b.datum(),L=!/^(n|s)$/.test(C)&&l,A=!/^(e|w)$/.test(C)&&u,I=b.classed("extent"),w=X(),R=ia.mouse(x),O=ia.select(ua).on("keydown.brush",i).on("keyup.brush",h);ia.event.changedTouches?O.on("touchmove.brush",g).on("touchend.brush",v):O.on("mousemove.brush",g).on("mouseup.brush",v);N.interrupt().selectAll("*").interrupt();if(I){R[0]=c[0]-R[0];R[1]=p[0]-R[1]}else if(C){var _=+/w$/.test(C),D=+/^n/.test(C);y=[c[1-_]-R[0],p[1-D]-R[1]];R[0]=c[_];R[1]=p[D]}else ia.event.altKey&&(E=R.slice());N.style("pointer-events","none").selectAll(".resize").style("display",null);ia.select("body").style("cursor",b.style("cursor"));T({type:"brushstart"});g()}var o,s,a=C(e,"brushstart","brush","brushend"),l=null,u=null,c=[0,0],p=[0,0],d=!0,f=!0,h=Xu[0];e.event=function(e){e.each(function(){var e=a.of(this,arguments),t={x:c,y:p,i:o,j:s},n=this.__chart__||t;this.__chart__=t;if(Bu)ia.select(this).transition().each("start.brush",function(){o=n.i;s=n.j;c=n.x;p=n.y;e({type:"brushstart"})}).tween("brush:brush",function(){var n=bi(c,t.x),r=bi(p,t.y);o=s=null;return function(i){c=t.x=n(i);p=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"})});else{e({type:"brushstart"});e({type:"brush",mode:"resize"});e({type:"brushend"})}})};e.x=function(t){if(!arguments.length)return l;l=t;h=Xu[!l<<1|!u];return e};e.y=function(t){if(!arguments.length)return u;u=t;h=Xu[!l<<1|!u];return e};e.clamp=function(t){if(!arguments.length)return l&&u?[d,f]:l?d:u?f:null;l&&u?(d=!!t[0],f=!!t[1]):l?d=!!t:u&&(f=!!t);return e};e.extent=function(t){var n,r,i,a,d;if(!arguments.length){if(l)if(o)n=o[0],r=o[1];else{n=c[0],r=c[1];l.invert&&(n=l.invert(n),r=l.invert(r));n>r&&(d=n,n=r,r=d)}if(u)if(s)i=s[0],a=s[1];else{i=p[0],a=p[1];u.invert&&(i=u.invert(i),a=u.invert(a));i>a&&(d=i,i=a,a=d)}return l&&u?[[n,i],[r,a]]:l?[n,r]:u&&[i,a]}if(l){n=t[0],r=t[1];u&&(n=n[0],r=r[0]);o=[n,r];l.invert&&(n=l(n),r=l(r));n>r&&(d=n,n=r,r=d);(n!=c[0]||r!=c[1])&&(c=[n,r])}if(u){i=t[0],a=t[1];l&&(i=i[1],a=a[1]);s=[i,a];u.invert&&(i=u(i),a=u(a));i>a&&(d=i,i=a,a=d);(i!=p[0]||a!=p[1])&&(p=[i,a])}return e};e.clear=function(){if(!e.empty()){c=[0,0],p=[0,0];o=s=null}return e};e.empty=function(){return!!l&&c[0]==c[1]||!!u&&p[0]==p[1]};return ia.rebind(e,a,"on")};var $u={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Xu=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ku=hl.format=xl.timeFormat,Yu=Ku.utc,Qu=Yu("%Y-%m-%dT%H:%M:%S.%LZ");Ku.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Zs:Qu;Zs.parse=function(e){var t=new Date(e);return isNaN(t)?null:t};Zs.toString=Qu.toString;hl.second=Ut(function(e){return new gl(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()});hl.seconds=hl.second.range;hl.seconds.utc=hl.second.utc.range;hl.minute=Ut(function(e){return new gl(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()});hl.minutes=hl.minute.range;hl.minutes.utc=hl.minute.utc.range;hl.hour=Ut(function(e){var t=e.getTimezoneOffset()/60;return new gl(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()});hl.hours=hl.hour.range;hl.hours.utc=hl.hour.utc.range;hl.month=Ut(function(e){e=hl.day(e);e.setDate(1);return e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()});hl.months=hl.month.range;hl.months.utc=hl.month.utc.range;var Ju=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Zu=[[hl.second,1],[hl.second,5],[hl.second,15],[hl.second,30],[hl.minute,1],[hl.minute,5],[hl.minute,15],[hl.minute,30],[hl.hour,1],[hl.hour,3],[hl.hour,6],[hl.hour,12],[hl.day,1],[hl.day,2],[hl.week,1],[hl.month,1],[hl.month,3],[hl.year,1]],ec=Ku.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",On]]),tc={range:function(e,t,n){return ia.range(Math.ceil(e/n)*n,+t,n).map(ta)},floor:It,ceil:It};Zu.year=hl.year;hl.scale=function(){return ea(ia.scale.linear(),Zu,ec)};var nc=Zu.map(function(e){return[e[0].utc,e[1]]}),rc=Yu.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",On]]);nc.year=hl.year.utc;hl.scale.utc=function(){return ea(ia.scale.linear(),nc,rc)};ia.text=wt(function(e){return e.responseText});ia.json=function(e,t){return Rt(e,"application/json",na,t)};ia.html=function(e,t){return Rt(e,"text/html",ra,t)};ia.xml=wt(function(e){return e.responseXML});"function"==typeof e&&e.amd?e(ia):"object"==typeof n&&n.exports&&(n.exports=ia);this.d3=ia}()},{}],59:[function(e){var t=e("jquery");(function(e,t){function n(t,n){var i,o,s,a=t.nodeName.toLowerCase();if("area"===a){i=t.parentNode;o=i.name;if(!t.href||!o||"map"!==i.nodeName.toLowerCase())return!1;s=e("img[usemap=#"+o+"]")[0];return!!s&&r(s)}return(/input|select|textarea|button|object/.test(a)?!t.disabled:"a"===a?t.href||n:n)&&r(t)}function r(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var i=0,o=/^ui-id-\d+$/;e.ui=e.ui||{};e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});e.fn.extend({focus:function(t){return function(n,r){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus();r&&r.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0);return/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length)for(var r,i,o=e(this[0]);o.length&&o[0]!==document;){r=o.css("position");if("absolute"===r||"relative"===r||"fixed"===r){i=parseInt(o.css("zIndex"),10);if(!isNaN(i)&&0!==i)return i}o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++i)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&e(this).removeAttr("id")})}});e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var r=e.attr(t,"tabindex"),i=isNaN(r);return(i||r>=0)&&n(t,!i)}});e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function i(t,n,r,i){e.each(o,function(){n-=parseFloat(e.css(t,"padding"+this))||0;r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0);i&&(n-=parseFloat(e.css(t,"margin"+this))||0)});return n}var o="Width"===r?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?a["inner"+r].call(this):this.each(function(){e(this).css(s,i(this,n)+"px")})};e.fn["outer"+r]=function(t,n){return"number"!=typeof t?a["outer"+r].call(this,t):this.each(function(){e(this).css(s,i(this,t,!0,n)+"px")})}});e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))});e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData));e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());e.support.selectstart="onselectstart"in document.createElement("div");e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});e.extend(e.ui,{plugin:{add:function(t,n,r){var i,o=e.ui[t].prototype;for(i in r){o.plugins[i]=o.plugins[i]||[];o.plugins[i].push([n,r[i]])}},call:function(e,t,n){var r,i=e.plugins[t];if(i&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var r=n&&"left"===n?"scrollLeft":"scrollTop",i=!1;if(t[r]>0)return!0;t[r]=1;i=t[r]>0;t[r]=0;return i}})})(t)},{jquery:63}],60:[function(e){var t=e("jquery");e("./widget");(function(e){var t=!1;e(document).mouseup(function(){t=!1});e.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent")){e.removeData(n.target,t.widgetName+".preventClickEvent");n.stopImmediatePropagation();return!1}});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseStarted&&this._mouseUp(n);this._mouseDownEvent=n;var r=this,i=1===n.which,o="string"==typeof this.options.cancel&&n.target.nodeName?e(n.target).closest(this.options.cancel).length:!1;if(!i||o||!this._mouseCapture(n))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(n)&&this._mouseDelayMet(n)){this._mouseStarted=this._mouseStart(n)!==!1;if(!this._mouseStarted){n.preventDefault();return!0}}!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(e){return r._mouseMove(e)};this._mouseUpDelegate=function(e){return r._mouseUp(e)};e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);n.preventDefault();t=!0;return!0}},_mouseMove:function(t){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(this._mouseStarted){this._mouseDrag(t);return t.preventDefault()}if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1;this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)}return!this._mouseStarted},_mouseUp:function(t){e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=!1;t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0);this._mouseStop(t)}return!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(t)},{"./widget":62,jquery:63}],61:[function(e){var t=e("jquery");e("./core");e("./mouse");e("./widget");(function(e){function t(e,t,n){return e>t&&t+n>e}function n(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))}e.widget("ui.sortable",e.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?"x"===e.axis||n(this.items[0].item):!1;this.offset=this.element.offset();this._mouseInit();this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){if("disabled"===t){this.options[t]=n;this.widget().toggleClass("ui-sortable-disabled",!!n)}else e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=null,i=!1,o=this;if(this.reverting)return!1;if(this.options.disabled||"static"===this.options.type)return!1;this._refreshItems(t);e(t.target).parents().each(function(){if(e.data(this,o.widgetName+"-item")===o){r=e(this);return!1}});e.data(t.target,o.widgetName+"-item")===o&&(r=e(t.target));if(!r)return!1;if(this.options.handle&&!n){e(this.options.handle,r).find("*").addBack().each(function(){this===t.target&&(i=!0)});if(!i)return!1}this.currentItem=r;this._removeCurrentsFromItems();return!0},_mouseStart:function(t,n,r){var i,o,s=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(t);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(t);this.originalPageX=t.pageX;this.originalPageY=t.pageY;s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!==this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();s.containment&&this._setContainment();if(s.cursor&&"auto"!==s.cursor){o=this.document.find("body");this.storedCursor=o.css("cursor");o.css("cursor",s.cursor);this.storedStylesheet=e("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)}if(s.opacity){this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity"));this.helper.css("opacity",s.opacity)}if(s.zIndex){this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex"));this.helper.css("zIndex",s.zIndex)}this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",t,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",t,this._uiHash(this));e.ui.ddmanager&&(e.ui.ddmanager.current=this);e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(t);return!0},_mouseDrag:function(t){var n,r,i,o,s=this.options,a=!1;this.position=this._generatePosition(t);this.positionAbs=this._convertPositionTo("absolute");this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){if(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName){this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed);this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)}else{t.pageY-e(document).scrollTop()<s.scrollSensitivity?a=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(a=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed));t.pageX-e(document).scrollLeft()<s.scrollSensitivity?a=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(a=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed))}a!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}this.positionAbs=this._convertPositionTo("absolute");this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px");this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(n=this.items.length-1;n>=0;n--){r=this.items[n]; i=r.item[0];o=this._intersectsWithPointer(r);if(o&&r.instance===this.currentContainer&&i!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==i&&!e.contains(this.placeholder[0],i)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],i):!0)){this.direction=1===o?"down":"up";if("pointer"!==this.options.tolerance&&!this._intersectsWithSides(r))break;this._rearrange(t,r);this._trigger("change",t,this._uiHash());break}}this._contactContainers(t);e.ui.ddmanager&&e.ui.ddmanager.drag(this,t);this._trigger("sort",t,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(t,n){if(t){e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this,i=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft));o&&"y"!==o||(s.top=i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop));this.reverting=!0;e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--){this.containers[t]._trigger("deactivate",null,this._uiHash(this));if(this.containers[t].containerCache.over){this.containers[t]._trigger("out",null,this._uiHash(this));this.containers[t].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove();e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null});this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];t=t||{};e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))});!r.length&&t.key&&r.push(t.key+"=");return r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];t=t||{};n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")});return r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,o=e.left,s=o+e.width,a=e.top,l=a+e.height,u=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||r+u>a&&l>r+u,d="y"===this.options.axis||t+c>o&&s>t+c,f=p&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var n="x"===this.options.axis||t(this.positionAbs.top+this.offset.click.top,e.top,e.height),r="y"===this.options.axis||t(this.positionAbs.left+this.offset.click.left,e.left,e.width),i=n&&r,o=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return i?this.floating?s&&"right"===s||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(e){var n=t(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),r=t(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&r||"left"===o&&!r:i&&("down"===i&&n||"up"===i&&!n)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){this._refreshItems(e);this.refreshPositions();return this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){a.push(this)}var r,i,o,s,a=[],l=[],u=this._connectWith();if(u&&t)for(r=u.length-1;r>=0;r--){o=e(u[r]);for(i=o.length-1;i>=0;i--){s=e.data(o[i],this.widgetFullName);s&&s!==this&&!s.options.disabled&&l.push([e.isFunction(s.options.items)?s.options.items.call(s.element):e(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s])}}l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(r=l.length-1;r>=0;r--)l[r][0].each(n);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[];this.containers=[this];var n,r,i,o,s,a,l,u,c=this.items,p=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(n=d.length-1;n>=0;n--){i=e(d[n]);for(r=i.length-1;r>=0;r--){o=e.data(i[r],this.widgetFullName);if(o&&o!==this&&!o.options.disabled){p.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]);this.containers.push(o)}}}for(n=p.length-1;n>=0;n--){s=p[n][1];a=p[n][0];for(r=0,u=a.length;u>r;r++){l=e(a[r]);l.data(this.widgetName+"-item",s);c.push({item:l,instance:s,width:0,height:0,left:0,top:0})}}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,r,i,o;for(n=this.items.length-1;n>=0;n--){r=this.items[n];if(r.instance===this.currentContainer||!this.currentContainer||r.item[0]===this.currentItem[0]){i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;if(!t){r.width=i.outerWidth();r.height=i.outerHeight()}o=i.offset();r.left=o.left;r.top=o.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--){o=this.containers[n].element.offset();this.containers[n].containerCache.left=o.left;this.containers[n].containerCache.top=o.top;this.containers[n].containerCache.width=this.containers[n].element.outerWidth();this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var n,r=t.options;if(!r.placeholder||r.placeholder.constructor===String){n=r.placeholder;r.placeholder={element:function(){var r=t.currentItem[0].nodeName.toLowerCase(),i=e("<"+r+">",t.document[0]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");"tr"===r?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)}):"img"===r&&i.attr("src",t.currentItem.attr("src"));n||i.css("visibility","hidden");return i},update:function(e,i){if(!n||r.forcePlaceholderSize){i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10));i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10))}}}}t.placeholder=e(r.placeholder.element.call(t.element,t.currentItem));t.currentItem.after(t.placeholder);r.placeholder.update(t,t.placeholder)},_contactContainers:function(r){var i,o,s,a,l,u,c,p,d,f,h=null,g=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(h&&e.contains(this.containers[i].element[0],h.element[0]))continue;h=this.containers[i];g=i}else if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",r,this._uiHash(this));this.containers[i].containerCache.over=0}if(h)if(1===this.containers.length){if(!this.containers[g].containerCache.over){this.containers[g]._trigger("over",r,this._uiHash(this));this.containers[g].containerCache.over=1}}else{s=1e4;a=null;f=h.floating||n(this.currentItem);l=f?"left":"top";u=f?"width":"height";c=this.positionAbs[l]+this.offset.click[l];for(o=this.items.length-1;o>=0;o--)if(e.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!f||t(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))){p=this.items[o].item.offset()[l];d=!1;if(Math.abs(p-c)>Math.abs(p+this.items[o][u]-c)){d=!0;p+=this.items[o][u]}if(Math.abs(p-c)<s){s=Math.abs(p-c);a=this.items[o];this.direction=d?"up":"down"}}if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;a?this._rearrange(r,a,null,!0):this._rearrange(r,null,this.containers[g].element,!0);this._trigger("change",r,this._uiHash());this.containers[g]._trigger("change",r,this._uiHash(this));this.currentContainer=this.containers[g];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[g]._trigger("over",r,this._uiHash(this));this.containers[g].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;r.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]);r[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")});(!r[0].style.width||n.forceHelperSize)&&r.width(this.currentItem.width());(!r[0].style.height||n.forceHelperSize)&&r.height(this.currentItem.height());return r},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" "));e.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();if("absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])){t.left+=this.scrollParent.scrollLeft();t.top+=this.scrollParent.scrollTop()}(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0});return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,r,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode);("document"===i.containment||"window"===i.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===i.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===i.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]);if(!/^(document|window|parent)$/.test(i.containment)){t=e(i.containment)[0];n=e(i.containment).offset();r="hidden"!==e(t).css("overflow");this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(r?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(r?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,n){n||(n=this.position);var r="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(i[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:i.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:i.scrollLeft())*r}},_generatePosition:function(t){var n,r,i=this.options,o=t.pageX,s=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());if(this.originalPosition){if(this.containment){t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left);t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top);t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left);t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)}if(i.grid){n=this.originalPageY+Math.round((s-this.originalPageY)/i.grid[1])*i.grid[1];s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-i.grid[1]:n+i.grid[1]:n;r=this.originalPageX+Math.round((o-this.originalPageX)/i.grid[0])*i.grid[0];o=this.containment?r-this.offset.click.left>=this.containment[0]&&r-this.offset.click.left<=this.containment[2]?r:r-this.offset.click.left>=this.containment[0]?r-i.grid[0]:r+i.grid[0]:r}}return{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay(function(){i===this.counter&&this.refreshPositions(!r)})},_clear:function(e,t){function n(e,t,n){return function(r){n._trigger(e,r,t._uiHash(t))}}this.reverting=!1;var r,i=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(r in this._storedCSS)("auto"===this._storedCSS[r]||"static"===this._storedCSS[r])&&(this._storedCSS[r]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!t&&i.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))});!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||i.push(function(e){this._trigger("update",e,this._uiHash())});if(this!==this.currentContainer&&!t){i.push(function(e){this._trigger("remove",e,this._uiHash())});i.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer));i.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))}for(r=this.containers.length-1;r>=0;r--){t||i.push(n("deactivate",this,this.containers[r]));if(this.containers[r].containerCache.over){i.push(n("out",this,this.containers[r]));this.containers[r].containerCache.over=0}}if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()}this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex);this.dragging=!1;if(this.cancelHelperRemoval){if(!t){this._trigger("beforeStop",e,this._uiHash());for(r=0;r<i.length;r++)i[r].call(this,e);this._trigger("stop",e,this._uiHash())}this.fromOutside=!1;return!1}t||this._trigger("beforeStop",e,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!==this.currentItem[0]&&this.helper.remove();this.helper=null;if(!t){for(r=0;r<i.length;r++)i[r].call(this,e);this._trigger("stop",e,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})})(t)},{"./core":59,"./mouse":60,"./widget":62,jquery:63}],62:[function(e){var t=e("jquery");(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n,r=0;null!=(n=t[r]);r++)try{e(n).triggerHandler("remove")}catch(o){}i(t)};e.widget=function(t,n,r){var i,o,s,a,l={},u=t.split(".")[0];t=t.split(".")[1];i=u+"-"+t;if(!r){r=n;n=e.Widget}e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)};e[u]=e[u]||{};o=e[u][t];s=e[u][t]=function(e,t){if(!this._createWidget)return new s(e,t);arguments.length&&this._createWidget(e,t);return void 0};e.extend(s,o,{version:r.version,_proto:e.extend({},r),_childConstructors:[]});a=new n;a.options=e.widget.extend({},a.options);e.each(r,function(t,r){l[t]=e.isFunction(r)?function(){var e=function(){return n.prototype[t].apply(this,arguments)},i=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,o=this._superApply;this._super=e;this._superApply=i;t=r.apply(this,arguments);this._super=n;this._superApply=o;return t}}():r});s.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:s,namespace:u,widgetName:t,widgetFullName:i});if(o){e.each(o._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,s,n._proto)});delete o._childConstructors}else n._childConstructors.push(s);e.widget.bridge(t,s)};e.widget.extend=function(n){for(var i,o,s=r.call(arguments,1),a=0,l=s.length;l>a;a++)for(i in s[a]){o=s[a][i];s[a].hasOwnProperty(i)&&o!==t&&(n[i]=e.isPlainObject(o)?e.isPlainObject(n[i])?e.widget.extend({},n[i],o):e.widget.extend({},o):o)}return n};e.widget.bridge=function(n,i){var o=i.prototype.widgetFullName||n;e.fn[n]=function(s){var a="string"==typeof s,l=r.call(arguments,1),u=this;s=!a&&l.length?e.widget.extend.apply(null,[s].concat(l)):s;this.each(a?function(){var r,i=e.data(this,o);if(!i)return e.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+s+"'");if(!e.isFunction(i[s])||"_"===s.charAt(0))return e.error("no such method '"+s+"' for "+n+" widget instance");r=i[s].apply(i,l);if(r!==i&&r!==t){u=r&&r.jquery?u.pushStack(r.get()):r;return!1}}:function(){var t=e.data(this,o);t?t.option(s||{})._init():e.data(this,o,new i(s,this))});return u}};e.Widget=function(){};e.Widget._childConstructors=[];e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0];this.element=e(r);this.uuid=n++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=e.widget.extend({},this.options,this._getCreateOptions(),t);this.bindings=e();this.hoverable=e();this.focusable=e();if(r!==this){e.data(r,this.widgetFullName,this);this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}});this.document=e(r.style?r.ownerDocument:r.document||r);this.window=e(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i,o,s,a=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n){a={};i=n.split(".");n=i.shift();if(i.length){o=a[n]=e.widget.extend({},this.options[n]);for(s=0;s<i.length-1;s++){o[i[s]]=o[i[s]]||{};o=o[i[s]]}n=i.pop();if(1===arguments.length)return o[n]===t?null:o[n];o[n]=r}else{if(1===arguments.length)return this.options[n]===t?null:this.options[n];a[n]=r}}this._setOptions(a);return this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){this.options[e]=t;if("disabled"===e){this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")}return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,o=this;if("boolean"!=typeof t){r=n;n=t;t=!1}if(r){n=i=e(n);this.bindings=this.bindings.add(n)}else{r=n;n=this.element;i=this.widget()}e.each(r,function(r,s){function a(){return t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof s?o[s]:s).apply(o,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=r.match(/^(\w+)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?i.delegate(c,u,a):n.bind(u,a)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return("string"==typeof e?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,o,s=this.options[t];r=r||{};n=e.Event(n);n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase();n.target=this.element[0];o=n.originalEvent;if(o)for(i in o)i in n||(n[i]=o[i]);this.element.trigger(n,r);return!(e.isFunction(s)&&s.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}};e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,o){"string"==typeof i&&(i={effect:i});var s,a=i?i===!0||"number"==typeof i?n:i.effect||n:t;i=i||{};"number"==typeof i&&(i={duration:i});s=!e.isEmptyObject(i);i.complete=o;i.delay&&r.delay(i.delay);s&&e.effects&&e.effects.effect[a]?r[t](i):a!==t&&r[a]?r[a](i.duration,i.easing,o):r.queue(function(n){e(this)[t]();o&&o.call(r[0]);n()})}})})(t)},{jquery:63}],63:[function(e,t){t.exports=e(4)},{"/home/lrd900/yasgui/yasgui/node_modules/jquery/dist/jquery.js":4}],64:[function(t,n,r){(function(){var i;i=function(i){return"object"==typeof r&&"object"==typeof n?i(t("jquery")):"function"==typeof e&&e.amd?e(["jquery"],i):i(jQuery)};i(function(e){return e.pivotUtilities.d3_renderers={Treemap:function(t,n){var r,i,o,s,a,l,u,c,p,d,f,h,g,m;o={localeStrings:{}};n=e.extend(o,n);l=e("<div style='width: 100%; height: 100%;'>");c={name:"All",children:[]};r=function(e,t,n){var i,o,s,a,l,u;if(0!==t.length){null==e.children&&(e.children=[]);s=t.shift();u=e.children;for(a=0,l=u.length;l>a;a++){i=u[a];if(i.name===s){r(i,t,n);return}}o={name:s};r(o,t,n);return e.children.push(o)}e.value=n};m=t.getRowKeys();for(h=0,g=m.length;g>h;h++){u=m[h];d=t.getAggregator(u,[]).value();null!=d&&r(c,u,d)}i=d3.scale.category10();f=e(window).width()/1.4;s=e(window).height()/1.4;a=10;p=d3.layout.treemap().size([f,s]).sticky(!0).value(function(e){return e.size});d3.select(l[0]).append("div").style("position","relative").style("width",f+2*a+"px").style("height",s+2*a+"px").style("left",a+"px").style("top",a+"px").datum(c).selectAll(".node").data(p.padding([15,0,0,0]).value(function(e){return e.value}).nodes).enter().append("div").attr("class","node").style("background",function(e){return null!=e.children?"lightgrey":i(e.name)}).text(function(e){return e.name}).call(function(){this.style("left",function(e){return e.x+"px"}).style("top",function(e){return e.y+"px"}).style("width",function(e){return Math.max(0,e.dx-1)+"px"}).style("height",function(e){return Math.max(0,e.dy-1)+"px"})});return l}}})}).call(this)},{jquery:63}],65:[function(t,n,r){(function(){var i;i=function(i){return"object"==typeof r&&"object"==typeof n?i(t("jquery")):"function"==typeof e&&e.amd?e(["jquery"],i):i(jQuery)};i(function(e){var t;t=function(t,n){return function(r,i){var o,s,a,l,u,c,p,d,f,h,g,m,v,E,y,x,b,T,S,N,C,L,A,I,w;c={localeStrings:{vs:"vs",by:"by"}};i=e.extend(c,i);b=r.getRowKeys();0===b.length&&b.push([]);a=r.getColKeys();0===a.length&&a.push([]);h=function(){var e,t,n;n=[];for(e=0,t=b.length;t>e;e++){d=b[e];n.push(d.join("-"))}return n}();h.unshift("");m=0;l=[h];for(L=0,I=a.length;I>L;L++){s=a[L];y=[s.join("-")];m+=y[0].length;for(A=0,w=b.length;w>A;A++){x=b[A];o=r.getAggregator(x,s);y.push(null!=o.value()?o.value():null)}l.push(y)}T=N=r.aggregatorName+(r.valAttrs.length?"("+r.valAttrs.join(", ")+")":"");f=r.colAttrs.join("-");""!==f&&(T+=" "+i.localeStrings.vs+" "+f);p=r.rowAttrs.join("-");""!==p&&(T+=" "+i.localeStrings.by+" "+p);v={width:e(window).width()/1.4,height:e(window).height()/1.4,title:T,hAxis:{title:f,slantedText:m>50},vAxis:{title:N}};2===l[0].length&&""===l[0][1]&&(v.legend={position:"none"});for(g in n){S=n[g];v[g]=S}u=google.visualization.arrayToDataTable(l);E=e("<div style='width: 100%; height: 100%;'>");C=new google.visualization.ChartWrapper({dataTable:u,chartType:t,options:v});C.draw(E[0]);E.bind("dblclick",function(){var e;e=new google.visualization.ChartEditor;google.visualization.events.addListener(e,"ok",function(){return e.getChartWrapper().draw(E[0])});return e.openDialog(C)});return E}};return e.pivotUtilities.gchart_renderers={"Line Chart":t("LineChart"),"Bar Chart":t("ColumnChart"),"Stacked Bar Chart":t("ColumnChart",{isStacked:!0}),"Area Chart":t("AreaChart",{isStacked:!0})}})}).call(this)},{jquery:63}],66:[function(t,n,r){(function(){var i,o=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},s=[].slice,a=function(e,t){return function(){return e.apply(t,arguments)}},l={}.hasOwnProperty;i=function(i){return"object"==typeof r&&"object"==typeof n?i(t("jquery")):"function"==typeof e&&e.amd?e(["jquery"],i):i(jQuery)};i(function(e){var t,n,r,i,u,c,p,d,f,h,g,m,v,E,y,x;n=function(e,t,n){var r,i,o,s;e+="";i=e.split(".");o=i[0];s=i.length>1?n+i[1]:"";r=/(\d+)(\d{3})/;for(;r.test(o);)o=o.replace(r,"$1"+t+"$2");return o+s};h=function(t){var r;r={digitsAfterDecimal:2,scaler:1,thousandsSep:",",decimalSep:".",prefix:"",suffix:"",showZero:!1};t=e.extend(r,t);return function(e){var r;if(isNaN(e)||!isFinite(e))return"";if(0===e&&!t.showZero)return"";r=n((t.scaler*e).toFixed(t.digitsAfterDecimal),t.thousandsSep,t.decimalSep);return""+t.prefix+r+t.suffix}};v=h();E=h({digitsAfterDecimal:0});y=h({digitsAfterDecimal:1,scaler:100,suffix:"%"});r={count:function(e){null==e&&(e=E);return function(){return function(){return{count:0,push:function(){return this.count++},value:function(){return this.count},format:e}}}},countUnique:function(e){null==e&&(e=E);return function(t){var n;n=t[0];return function(){return{uniq:[],push:function(e){var t;return t=e[n],o.call(this.uniq,t)<0?this.uniq.push(e[n]):void 0},value:function(){return this.uniq.length},format:e,numInputs:null!=n?0:1}}}},listUnique:function(e){return function(t){var n;n=t[0];return function(){return{uniq:[],push:function(e){var t;return t=e[n],o.call(this.uniq,t)<0?this.uniq.push(e[n]):void 0},value:function(){return this.uniq.join(e)},format:function(e){return e},numInputs:null!=n?0:1}}}},sum:function(e){null==e&&(e=v);return function(t){var n;n=t[0];return function(){return{sum:0,push:function(e){return isNaN(parseFloat(e[n]))?void 0:this.sum+=parseFloat(e[n])},value:function(){return this.sum},format:e,numInputs:null!=n?0:1}}}},average:function(e){null==e&&(e=v);return function(t){var n;n=t[0];return function(){return{sum:0,len:0,push:function(e){if(!isNaN(parseFloat(e[n]))){this.sum+=parseFloat(e[n]);return this.len++}},value:function(){return this.sum/this.len},format:e,numInputs:null!=n?0:1}}}},sumOverSum:function(e){null==e&&(e=v);return function(t){var n,r;r=t[0],n=t[1];return function(){return{sumNum:0,sumDenom:0,push:function(e){isNaN(parseFloat(e[r]))||(this.sumNum+=parseFloat(e[r]));return isNaN(parseFloat(e[n]))?void 0:this.sumDenom+=parseFloat(e[n])},value:function(){return this.sumNum/this.sumDenom},format:e,numInputs:null!=r&&null!=n?0:2}}}},sumOverSumBound80:function(e,t){null==e&&(e=!0);null==t&&(t=v);return function(n){var r,i;i=n[0],r=n[1];return function(){return{sumNum:0,sumDenom:0,push:function(e){isNaN(parseFloat(e[i]))||(this.sumNum+=parseFloat(e[i]));return isNaN(parseFloat(e[r]))?void 0:this.sumDenom+=parseFloat(e[r])},value:function(){var t;t=e?1:-1;return(.821187207574908/this.sumDenom+this.sumNum/this.sumDenom+1.2815515655446004*t*Math.sqrt(.410593603787454/(this.sumDenom*this.sumDenom)+this.sumNum*(1-this.sumNum/this.sumDenom)/(this.sumDenom*this.sumDenom)))/(1+1.642374415149816/this.sumDenom)},format:t,numInputs:null!=i&&null!=r?0:2}}}},fractionOf:function(e,t,n){null==t&&(t="total");null==n&&(n=y);return function(){var r;r=1<=arguments.length?s.call(arguments,0):[];return function(i,o,s){return{selector:{total:[[],[]],row:[o,[]],col:[[],s]}[t],inner:e.apply(null,r)(i,o,s),push:function(e){return this.inner.push(e)},format:n,value:function(){return this.inner.value()/i.getAggregator.apply(i,this.selector).inner.value()},numInputs:e.apply(null,r)().numInputs}}}}};i=function(e){return{Count:e.count(E),"Count Unique Values":e.countUnique(E),"List Unique Values":e.listUnique(", "),Sum:e.sum(v),"Integer Sum":e.sum(E),Average:e.average(v),"Sum over Sum":e.sumOverSum(v),"80% Upper Bound":e.sumOverSumBound80(!0,v),"80% Lower Bound":e.sumOverSumBound80(!1,v),"Sum as Fraction of Total":e.fractionOf(e.sum(),"total",y),"Sum as Fraction of Rows":e.fractionOf(e.sum(),"row",y),"Sum as Fraction of Columns":e.fractionOf(e.sum(),"col",y),"Count as Fraction of Total":e.fractionOf(e.count(),"total",y),"Count as Fraction of Rows":e.fractionOf(e.count(),"row",y),"Count as Fraction of Columns":e.fractionOf(e.count(),"col",y)} }(r);m={Table:function(e,t){return g(e,t)},"Table Barchart":function(t,n){return e(g(t,n)).barchart()},Heatmap:function(t,n){return e(g(t,n)).heatmap()},"Row Heatmap":function(t,n){return e(g(t,n)).heatmap("rowheatmap")},"Col Heatmap":function(t,n){return e(g(t,n)).heatmap("colheatmap")}};p={en:{aggregators:i,renderers:m,localeStrings:{renderError:"An error occurred rendering the PivotTable results.",computeError:"An error occurred computing the PivotTable results.",uiRenderError:"An error occurred rendering the PivotTable UI.",selectAll:"Select All",selectNone:"Select None",tooMany:"(too many to list)",filterResults:"Filter results",totals:"Totals",vs:"vs",by:"by"}}};d=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];x=function(e){return("0"+e).substr(-2,2)};c={bin:function(e,t){return function(n){return n[e]-n[e]%t}},dateFormat:function(e,t,n,r){null==n&&(n=d);null==r&&(r=u);return function(i){var o;o=new Date(Date.parse(i[e]));return isNaN(o)?"":t.replace(/%(.)/g,function(e,t){switch(t){case"y":return o.getFullYear();case"m":return x(o.getMonth()+1);case"n":return n[o.getMonth()];case"d":return x(o.getDate());case"w":return r[o.getDay()];case"x":return o.getDay();case"H":return x(o.getHours());case"M":return x(o.getMinutes());case"S":return x(o.getSeconds());default:return"%"+t}})}}};f=function(){return function(e,t){var n,r,i,o,s,a,l;a=/(\d+)|(\D+)/g;s=/\d/;l=/^0/;if("number"==typeof e||"number"==typeof t)return isNaN(e)?1:isNaN(t)?-1:e-t;n=String(e).toLowerCase();i=String(t).toLowerCase();if(n===i)return 0;if(!s.test(n)||!s.test(i))return n>i?1:-1;n=n.match(a);i=i.match(a);for(;n.length&&i.length;){r=n.shift();o=i.shift();if(r!==o)return s.test(r)&&s.test(o)?r.replace(l,".0")-o.replace(l,".0"):r>o?1:-1}return n.length-i.length}}(this);e.pivotUtilities={aggregatorTemplates:r,aggregators:i,renderers:m,derivers:c,locales:p,naturalSort:f,numberFormat:h};t=function(){function t(e,n){this.getAggregator=a(this.getAggregator,this);this.getRowKeys=a(this.getRowKeys,this);this.getColKeys=a(this.getColKeys,this);this.sortKeys=a(this.sortKeys,this);this.arrSort=a(this.arrSort,this);this.natSort=a(this.natSort,this);this.aggregator=n.aggregator;this.aggregatorName=n.aggregatorName;this.colAttrs=n.cols;this.rowAttrs=n.rows;this.valAttrs=n.vals;this.tree={};this.rowKeys=[];this.colKeys=[];this.rowTotals={};this.colTotals={};this.allTotal=this.aggregator(this,[],[]);this.sorted=!1;t.forEachRecord(e,n.derivedAttributes,function(e){return function(t){return n.filter(t)?e.processRecord(t):void 0}}(this))}t.forEachRecord=function(t,n,r){var i,o,s,a,u,c,p,d,f,h,g,m;i=e.isEmptyObject(n)?r:function(e){var t,i,o;for(t in n){i=n[t];e[t]=null!=(o=i(e))?o:e[t]}return r(e)};if(e.isFunction(t))return t(i);if(e.isArray(t)){if(e.isArray(t[0])){g=[];for(s in t)if(l.call(t,s)){o=t[s];if(s>0){c={};h=t[0];for(a in h)if(l.call(h,a)){u=h[a];c[u]=o[a]}g.push(i(c))}}return g}m=[];for(d=0,f=t.length;f>d;d++){c=t[d];m.push(i(c))}return m}if(t instanceof jQuery){p=[];e("thead > tr > th",t).each(function(){return p.push(e(this).text())});return e("tbody > tr",t).each(function(){c={};e("td",this).each(function(t){return c[p[t]]=e(this).text()});return i(c)})}throw new Error("unknown input format")};t.convertToArray=function(e){var n;n=[];t.forEachRecord(e,{},function(e){return n.push(e)});return n};t.prototype.natSort=function(e,t){return f(e,t)};t.prototype.arrSort=function(e,t){return this.natSort(e.join(),t.join())};t.prototype.sortKeys=function(){if(!this.sorted){this.rowKeys.sort(this.arrSort);this.colKeys.sort(this.arrSort)}return this.sorted=!0};t.prototype.getColKeys=function(){this.sortKeys();return this.colKeys};t.prototype.getRowKeys=function(){this.sortKeys();return this.rowKeys};t.prototype.processRecord=function(e){var t,n,r,i,o,s,a,l,u,c,p,d,f;t=[];i=[];c=this.colAttrs;for(s=0,l=c.length;l>s;s++){o=c[s];t.push(null!=(p=e[o])?p:"null")}d=this.rowAttrs;for(a=0,u=d.length;u>a;a++){o=d[a];i.push(null!=(f=e[o])?f:"null")}r=i.join(String.fromCharCode(0));n=t.join(String.fromCharCode(0));this.allTotal.push(e);if(0!==i.length){if(!this.rowTotals[r]){this.rowKeys.push(i);this.rowTotals[r]=this.aggregator(this,i,[])}this.rowTotals[r].push(e)}if(0!==t.length){if(!this.colTotals[n]){this.colKeys.push(t);this.colTotals[n]=this.aggregator(this,[],t)}this.colTotals[n].push(e)}if(0!==t.length&&0!==i.length){this.tree[r]||(this.tree[r]={});this.tree[r][n]||(this.tree[r][n]=this.aggregator(this,i,t));return this.tree[r][n].push(e)}};t.prototype.getAggregator=function(e,t){var n,r,i;i=e.join(String.fromCharCode(0));r=t.join(String.fromCharCode(0));n=0===e.length&&0===t.length?this.allTotal:0===e.length?this.colTotals[r]:0===t.length?this.rowTotals[i]:this.tree[i][r];return null!=n?n:{value:function(){return null},format:function(){return""}}};return t}();g=function(t,n){var r,i,o,s,a,u,c,p,d,f,h,g,m,v,E,y,x,b,T,S,N;u={localeStrings:{totals:"Totals"}};n=e.extend(u,n);o=t.colAttrs;h=t.rowAttrs;m=t.getRowKeys();a=t.getColKeys();f=document.createElement("table");f.className="pvtTable";v=function(e,t,n){var r,i,o,s,a,l;if(0!==t){i=!0;for(s=a=0;n>=0?n>=a:a>=n;s=n>=0?++a:--a)e[t-1][s]!==e[t][s]&&(i=!1);if(i)return-1}r=0;for(;t+r<e.length;){o=!1;for(s=l=0;n>=0?n>=l:l>=n;s=n>=0?++l:--l)e[t][s]!==e[t+r][s]&&(o=!0);if(o)break;r++}return r};for(p in o)if(l.call(o,p)){i=o[p];b=document.createElement("tr");if(0===parseInt(p)&&0!==h.length){y=document.createElement("th");y.setAttribute("colspan",h.length);y.setAttribute("rowspan",o.length);b.appendChild(y)}y=document.createElement("th");y.className="pvtAxisLabel";y.textContent=i;b.appendChild(y);for(c in a)if(l.call(a,c)){s=a[c];N=v(a,parseInt(c),parseInt(p));if(-1!==N){y=document.createElement("th");y.className="pvtColLabel";y.textContent=s[p];y.setAttribute("colspan",N);parseInt(p)===o.length-1&&0!==h.length&&y.setAttribute("rowspan",2);b.appendChild(y)}}if(0===parseInt(p)){y=document.createElement("th");y.className="pvtTotalLabel";y.innerHTML=n.localeStrings.totals;y.setAttribute("rowspan",o.length+(0===h.length?0:1));b.appendChild(y)}f.appendChild(b)}if(0!==h.length){b=document.createElement("tr");for(c in h)if(l.call(h,c)){d=h[c];y=document.createElement("th");y.className="pvtAxisLabel";y.textContent=d;b.appendChild(y)}y=document.createElement("th");if(0===o.length){y.className="pvtTotalLabel";y.innerHTML=n.localeStrings.totals}b.appendChild(y);f.appendChild(b)}for(c in m)if(l.call(m,c)){g=m[c];b=document.createElement("tr");for(p in g)if(l.call(g,p)){T=g[p];N=v(m,parseInt(c),parseInt(p));if(-1!==N){y=document.createElement("th");y.className="pvtRowLabel";y.textContent=T;y.setAttribute("rowspan",N);parseInt(p)===h.length-1&&0!==o.length&&y.setAttribute("colspan",2);b.appendChild(y)}}for(p in a)if(l.call(a,p)){s=a[p];r=t.getAggregator(g,s);S=r.value();E=document.createElement("td");E.className="pvtVal row"+c+" col"+p;E.innerHTML=r.format(S);E.setAttribute("data-value",S);b.appendChild(E)}x=t.getAggregator(g,[]);S=x.value();E=document.createElement("td");E.className="pvtTotal rowTotal";E.innerHTML=x.format(S);E.setAttribute("data-value",S);E.setAttribute("data-for","row"+c);b.appendChild(E);f.appendChild(b)}b=document.createElement("tr");y=document.createElement("th");y.className="pvtTotalLabel";y.innerHTML=n.localeStrings.totals;y.setAttribute("colspan",h.length+(0===o.length?0:1));b.appendChild(y);for(p in a)if(l.call(a,p)){s=a[p];x=t.getAggregator([],s);S=x.value();E=document.createElement("td");E.className="pvtTotal colTotal";E.innerHTML=x.format(S);E.setAttribute("data-value",S);E.setAttribute("data-for","col"+p);b.appendChild(E)}x=t.getAggregator([],[]);S=x.value();E=document.createElement("td");E.className="pvtGrandTotal";E.innerHTML=x.format(S);E.setAttribute("data-value",S);b.appendChild(E);f.appendChild(b);f.setAttribute("data-numrows",m.length);f.setAttribute("data-numcols",a.length);return f};e.fn.pivot=function(n,i){var o,s,a,l,u;o={cols:[],rows:[],filter:function(){return!0},aggregator:r.count()(),aggregatorName:"Count",derivedAttributes:{},renderer:g,rendererOptions:null,localeStrings:p.en.localeStrings};i=e.extend(o,i);l=null;try{a=new t(n,i);try{l=i.renderer(a,i.rendererOptions)}catch(c){s=c;"undefined"!=typeof console&&null!==console&&console.error(s.stack);l=e("<span>").html(i.localeStrings.renderError)}}catch(c){s=c;"undefined"!=typeof console&&null!==console&&console.error(s.stack);l=e("<span>").html(i.localeStrings.computeError)}u=this[0];for(;u.hasChildNodes();)u.removeChild(u.lastChild);return this.append(l)};e.fn.pivotUI=function(n,r,i,s){var a,u,c,d,h,g,m,v,E,y,x,b,T,S,N,C,L,A,I,w,R,O,_,D,k,F,P,M,j,G,B,U,q,H,V,W,z,$,X;null==i&&(i=!1);null==s&&(s="en");m={derivedAttributes:{},aggregators:p[s].aggregators,renderers:p[s].renderers,hiddenAttributes:[],menuLimit:200,cols:[],rows:[],vals:[],exclusions:{},unusedAttrsVertical:"auto",autoSortUnusedAttrs:!1,rendererOptions:{localeStrings:p[s].localeStrings},onRefresh:null,filter:function(){return!0},localeStrings:p[s].localeStrings};E=this.data("pivotUIOptions");T=null==E||i?e.extend(m,r):E;try{n=t.convertToArray(n);w=function(){var e,t;e=n[0];t=[];for(b in e)l.call(e,b)&&t.push(b);return t}();V=T.derivedAttributes;for(h in V)l.call(V,h)&&o.call(w,h)<0&&w.push(h);d={};for(P=0,B=w.length;B>P;P++){k=w[P];d[k]={}}t.forEachRecord(n,T.derivedAttributes,function(e){var t,n,r;r=[];for(b in e)if(l.call(e,b)){t=e[b];if(T.filter(e)){null==t&&(t="null");null==(n=d[b])[t]&&(n[t]=0);r.push(d[b][t]++)}}return r});_=e("<table cellpadding='5'>");A=e("<td>");L=e("<select class='pvtRenderer'>").appendTo(A).bind("change",function(){return N()});W=T.renderers;for(k in W)l.call(W,k)&&e("<option>").val(k).html(k).appendTo(L);g=e("<td class='pvtAxisContainer pvtUnused'>");I=function(){var e,t,n;n=[];for(e=0,t=w.length;t>e;e++){h=w[e];o.call(T.hiddenAttributes,h)<0&&n.push(h)}return n}();D=!1;if("auto"===T.unusedAttrsVertical){c=0;for(M=0,U=I.length;U>M;M++){a=I[M];c+=a.length}D=c>120}g.addClass(T.unusedAttrsVertical===!0||D?"pvtVertList":"pvtHorizList");F=function(t){var n,r,i,s,a,l,u,c,p,h,m,v,E,x,S;u=function(){var e;e=[];for(b in d[t])e.push(b);return e}();l=!1;v=e("<div>").addClass("pvtFilterBox").hide();v.append(e("<h4>").text(""+t+" ("+u.length+")"));if(u.length>T.menuLimit)v.append(e("<p>").html(T.localeStrings.tooMany));else{r=e("<p>").appendTo(v);r.append(e("<button>").html(T.localeStrings.selectAll).bind("click",function(){return v.find("input:visible").prop("checked",!0)}));r.append(e("<button>").html(T.localeStrings.selectNone).bind("click",function(){return v.find("input:visible").prop("checked",!1)}));r.append(e("<input>").addClass("pvtSearch").attr("placeholder",T.localeStrings.filterResults).bind("keyup",function(){var t;t=e(this).val().toLowerCase();return e(this).parents(".pvtFilterBox").find("label span").each(function(){var n;n=e(this).text().toLowerCase().indexOf(t);return-1!==n?e(this).parent().show():e(this).parent().hide()})}));i=e("<div>").addClass("pvtCheckContainer").appendTo(v);S=u.sort(f);for(E=0,x=S.length;x>E;E++){b=S[E];m=d[t][b];s=e("<label>");a=T.exclusions[t]?o.call(T.exclusions[t],b)>=0:!1;l||(l=a);e("<input type='checkbox' class='pvtFilter'>").attr("checked",!a).data("filter",[t,b]).appendTo(s);s.append(e("<span>").text(""+b+" ("+m+")"));i.append(e("<p>").append(s))}}h=function(){var t;t=e(v).find("[type='checkbox']").length-e(v).find("[type='checkbox']:checked").length;t>0?n.addClass("pvtFilteredAttribute"):n.removeClass("pvtFilteredAttribute");return u.length>T.menuLimit?v.toggle():v.toggle(0,N)};e("<p>").appendTo(v).append(e("<button>").text("OK").bind("click",h));c=function(t){v.css({left:t.pageX,top:t.pageY}).toggle();e(".pvtSearch").val("");return e("label").show()};p=e("<span class='pvtTriangle'>").html(" &#x25BE;").bind("click",c);n=e("<li class='axis_"+y+"'>").append(e("<span class='pvtAttr'>").text(t).data("attrName",t).append(p));l&&n.addClass("pvtFilteredAttribute");g.append(n).append(v);return n.bind("dblclick",c)};for(y in I){h=I[y];F(h)}R=e("<tr>").appendTo(_);u=e("<select class='pvtAggregator'>").bind("change",function(){return N()});z=T.aggregators;for(k in z)l.call(z,k)&&u.append(e("<option>").val(k).html(k));e("<td class='pvtVals'>").appendTo(R).append(u).append(e("<br>"));e("<td class='pvtAxisContainer pvtHorizList pvtCols'>").appendTo(R);O=e("<tr>").appendTo(_);O.append(e("<td valign='top' class='pvtAxisContainer pvtRows'>"));S=e("<td valign='top' class='pvtRendererArea'>").appendTo(O);if(T.unusedAttrsVertical===!0||D){_.find("tr:nth-child(1)").prepend(A);_.find("tr:nth-child(2)").prepend(g)}else _.prepend(e("<tr>").append(A).append(g));this.html(_);$=T.cols;for(j=0,q=$.length;q>j;j++){k=$[j];this.find(".pvtCols").append(this.find(".axis_"+I.indexOf(k)))}X=T.rows;for(G=0,H=X.length;H>G;G++){k=X[G];this.find(".pvtRows").append(this.find(".axis_"+I.indexOf(k)))}null!=T.aggregatorName&&this.find(".pvtAggregator").val(T.aggregatorName);null!=T.rendererName&&this.find(".pvtRenderer").val(T.rendererName);x=!0;C=function(t){return function(){var r,i,s,a,l,c,p,d,f,h,g,m,v,E;d={derivedAttributes:T.derivedAttributes,localeStrings:T.localeStrings,rendererOptions:T.rendererOptions,cols:[],rows:[]};l=null!=(E=T.aggregators[u.val()]([])().numInputs)?E:0;h=[];t.find(".pvtRows li span.pvtAttr").each(function(){return d.rows.push(e(this).data("attrName"))});t.find(".pvtCols li span.pvtAttr").each(function(){return d.cols.push(e(this).data("attrName"))});t.find(".pvtVals select.pvtAttrDropdown").each(function(){if(0===l)return e(this).remove();l--;return""!==e(this).val()?h.push(e(this).val()):void 0});if(0!==l){p=t.find(".pvtVals");for(k=m=0;l>=0?l>m:m>l;k=l>=0?++m:--m){a=e("<select class='pvtAttrDropdown'>").append(e("<option>")).bind("change",function(){return N()});for(v=0,g=I.length;g>v;v++){r=I[v];a.append(e("<option>").val(r).text(r))}p.append(a)}}if(x){h=T.vals;y=0;t.find(".pvtVals select.pvtAttrDropdown").each(function(){e(this).val(h[y]);return y++});x=!1}d.aggregatorName=u.val();d.vals=h;d.aggregator=T.aggregators[u.val()](h);d.renderer=T.renderers[L.val()];i={};t.find("input.pvtFilter").not(":checked").each(function(){var t;t=e(this).data("filter");return null!=i[t[0]]?i[t[0]].push(t[1]):i[t[0]]=[t[1]]});d.filter=function(e){var t,n;if(!T.filter(e))return!1;for(b in i){t=i[b];if(n=""+e[b],o.call(t,n)>=0)return!1}return!0};S.pivot(n,d);c=e.extend(T,{cols:d.cols,rows:d.rows,vals:h,exclusions:i,aggregatorName:u.val(),rendererName:L.val()});t.data("pivotUIOptions",c);if(T.autoSortUnusedAttrs){s=e.pivotUtilities.naturalSort;f=t.find("td.pvtUnused.pvtAxisContainer");e(f).children("li").sort(function(t,n){return s(e(t).text(),e(n).text())}).appendTo(f)}S.css("opacity",1);return null!=T.onRefresh?T.onRefresh(c):void 0}}(this);N=function(){return function(){S.css("opacity",.5);return setTimeout(C,10)}}(this);N();this.find(".pvtAxisContainer").sortable({update:function(e,t){return null==t.sender?N():void 0},connectWith:this.find(".pvtAxisContainer"),items:"li",placeholder:"pvtPlaceholder"})}catch(K){v=K;"undefined"!=typeof console&&null!==console&&console.error(v.stack);this.html(T.localeStrings.uiRenderError)}return this};e.fn.heatmap=function(t){var n,r,i,o,s,a,l,u;null==t&&(t="heatmap");a=this.data("numrows");s=this.data("numcols");n=function(e,t,n){var r;r=function(){switch(e){case"red":return function(e){return"ff"+e+e};case"green":return function(e){return""+e+"ff"+e};case"blue":return function(e){return""+e+e+"ff"}}}();return function(e){var i,o;o=255-Math.round(255*(e-t)/(n-t));i=o.toString(16).split(".")[0];1===i.length&&(i=0+i);return r(i)}};r=function(t){return function(r,i){var o,s,a;s=function(n){return t.find(r).each(function(){var t;t=e(this).data("value");return null!=t&&isFinite(t)?n(t,e(this)):void 0})};a=[];s(function(e){return a.push(e)});o=n(i,Math.min.apply(Math,a),Math.max.apply(Math,a));return s(function(e,t){return t.css("background-color","#"+o(e))})}}(this);switch(t){case"heatmap":r(".pvtVal","red");break;case"rowheatmap":for(i=l=0;a>=0?a>l:l>a;i=a>=0?++l:--l)r(".pvtVal.row"+i,"red");break;case"colheatmap":for(o=u=0;s>=0?s>u:u>s;o=s>=0?++u:--u)r(".pvtVal.col"+o,"red")}r(".pvtTotal.rowTotal","red");r(".pvtTotal.colTotal","red");return this};return e.fn.barchart=function(){var t,n,r,i,o;i=this.data("numrows");r=this.data("numcols");t=function(t){return function(n){var r,i,o,s;r=function(r){return t.find(n).each(function(){var t;t=e(this).data("value");return null!=t&&isFinite(t)?r(t,e(this)):void 0})};s=[];r(function(e){return s.push(e)});i=Math.max.apply(Math,s);o=function(e){return 100*e/(1.4*i)};return r(function(t,n){var r,i;r=n.text();i=e("<div>").css({position:"relative",height:"55px"});i.append(e("<div>").css({position:"absolute",bottom:0,left:0,right:0,height:o(t)+"%","background-color":"gray"}));i.append(e("<div>").text(r).css({position:"relative","padding-left":"5px","padding-right":"5px"}));return n.css({padding:0,"padding-top":"5px","text-align":"center"}).html(i)})}}(this);for(n=o=0;i>=0?i>o:o>i;n=i>=0?++o:--o)t(".pvtVal.row"+n);t(".pvtTotal.colTotal");return this}})}).call(this)},{jquery:63}],67:[function(e,t){t.exports=e(8)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/node_modules/store/store.js":8}],68:[function(e,t){t.exports=e(9)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/package.json":9}],69:[function(e,t){t.exports=e(10)},{"../package.json":68,"./storage.js":70,"./svg.js":71,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/main.js":10}],70:[function(e,t){t.exports=e(11)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/storage.js":11,store:67}],71:[function(e,t){t.exports=e(12)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/svg.js":12}],72:[function(e,t){t.exports={name:"yasgui-yasr",description:"Yet Another SPARQL Resultset GUI",version:"2.4.8",main:"src/main.js",licenses:[{type:"MIT",url:"http://yasr.yasgui.org/license.txt"}],author:"Laurens Rietveld",homepage:"http://yasr.yasgui.org",devDependencies:{browserify:"^6.1.0",gulp:"~3.6.0","gulp-bump":"^0.1.11","gulp-concat":"^2.4.1","gulp-connect":"^2.0.5","gulp-embedlr":"^0.5.2","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jsvalidate":"^0.2.0","gulp-livereload":"^1.3.1","gulp-minify-css":"^0.3.11","gulp-notify":"^2.0.1","gulp-rename":"^1.2.0","gulp-streamify":"0.0.5","gulp-tag-version":"^1.1.0","gulp-uglify":"^1.0.1","require-dir":"^0.1.0","run-sequence":"^1.0.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~0.1.1",watchify:"^0.6.4","gulp-sourcemaps":"^1.2.8",exorcist:"^0.1.6","vinyl-transform":"0.0.1","gulp-sass":"^1.2.2","bootstrap-sass":"^3.3.1","browserify-transform-tools":"^1.2.1","gulp-cssimport":"^1.3.1","gulp-html-replace":"^1.4.1","browserify-shim":"^3.8.1"},bugs:"https://github.com/YASGUI/YASR/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASR.git"},dependencies:{jquery:"~ 1.11.0",codemirror:"^4.7.0","yasgui-utils":"^1.4.1",pivottable:"^1.2.2","jquery-ui":"^1.10.5",d3:"^3.4.13"},"browserify-shim":{google:"global:google"},browserify:{transform:["browserify-shim"]},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"},"../lib/DataTables/media/js/jquery.dataTables.js":{require:"datatables",global:"jQuery"},datatables:{require:"datatables",global:"jQuery"},d3:{require:"d3",global:"d3"},"jquery-ui/sortable":{require:"jquery-ui/sortable",global:"jQuery"},pivottable:{require:"pivottable",global:"jQuery"}}}},{}],73:[function(e,t){"use strict";t.exports=function(e){var t='"',n=",",r="\n",i=e.head.vars,o=e.results.bindings,s=function(){for(var e=0;e<i.length;e++)u(i[e]);p+=r},a=function(){for(var e=0;e<o.length;e++){l(o[e]);p+=r}},l=function(e){for(var t=0;t<i.length;t++){var n=i[t];u(e.hasOwnProperty(n)?e[n].value:"")}},u=function(e){e.replace(t,t+t);c(e)&&(e=t+e+t);p+=" "+e+" "+n},c=function(e){var r=!1;e.match("[\\w|"+n+"|"+t+"]")&&(r=!0);return r},p="";s();a();return p}},{}],74:[function(e,t){"use strict";var n=e("jquery"),r=t.exports=function(t){var r=n("<div class='booleanResult'></div>"),i=function(){r.empty().appendTo(t.resultsContainer);var i=t.results.getBoolean(),o=null,s=null;if(i===!0){o="check";s="True"}else if(i===!1){o="cross";s="False"}else{r.width("140");s="Could not find boolean value in response"}o&&e("yasgui-utils").svg.draw(r,e("./imgs.js")[o]);n("<span></span>").text(s).appendTo(r)},o=function(){return t.results.getBoolean&&(t.results.getBoolean()===!0||0==t.results.getBoolean())};return{name:null,draw:i,hideFromSelection:!0,getPriority:10,canHandleResults:o}};r.version={"YASR-boolean":e("../package.json").version,jquery:n.fn.jquery}},{"../package.json":72,"./imgs.js":80,jquery:63,"yasgui-utils":69}],75:[function(e,t){"use strict";var n=e("jquery");t.exports={output:"table",useGoogleCharts:!0,outputPlugins:["table","error","boolean","rawResponse"],drawOutputSelector:!0,drawDownloadIcon:!0,getUsedPrefixes:null,persistency:{prefix:function(e){return"yasr_"+n(e.container).closest("[id]").attr("id")+"_"},outputSelector:function(){return"selector"},results:{id:function(e){return"results_"+n(e.container).closest("[id]").attr("id")},key:"results",maxSize:1e5}}}},{jquery:63}],76:[function(e,t){"use strict";var n=e("jquery"),r=t.exports=function(e){var t=n("<div class='errorResult'></div>"),i=n.extend(!0,{},r.defaults),o=function(){var e=null;if(i.tryQueryLink){var t=i.tryQueryLink();e=n("<button>",{"class":"yasr_btn yasr_tryQuery"}).text("Try query in new browser window").click(function(){window.open(t,"_blank");n(this).blur()})}return e},s=function(){var r=e.results.getException();t.empty().appendTo(e.resultsContainer);var s=n("<div>",{"class":"errorHeader"}).appendTo(t);if(0!==r.status){var a="Error";r.statusText&&r.statusText.length<100&&(a=r.statusText);a+=" (#"+r.status+")";s.append(n("<span>",{"class":"exception"}).text(a)).append(o());var l=null;r.responseText?l=r.responseText:"string"==typeof r&&(l=r);l&&t.append(n("<pre>").text(l))}else{s.append(o());t.append(n("<div>",{"class":"corsMessage"}).append(i.corsMessage))}},a=function(e){return e.results.getException()||!1};return{name:null,draw:s,getPriority:20,hideFromSelection:!0,canHandleResults:a}};r.defaults={corsMessage:"Unable to get response from endpoint",tryQueryLink:null}},{jquery:63}],77:[function(e,t){t.exports={GoogleTypeException:function(e,t){this.foundTypes=e;this.varName=t;this.toString=function(){var e="Conflicting data types found for variable "+this.varName+'. Assuming all values of this variable are "string".';e+=" To avoid this issue, cast the values in your SPARQL query to the intended xsd datatype";return e};this.toHtml=function(){var e="Conflicting data types found for variable <i>"+this.varName+'</i>. Assuming all values of this variable are "string".';e+=" As a result, several Google Charts will not render values of this particular variable.";e+=" To avoid this issue, cast the values in your SPARQL query to the intended xsd datatype";return e}}}},{}],78:[function(e,t){(function(n){var r=e("events").EventEmitter,i=(e("jquery"),!1),o=!1,s=function(){r.call(this);var e=this;this.init=function(){if(o||("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null)||i)("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null)?e.emit("initDone"):o&&e.emit("initError");else{i=!0;a("//google.com/jsapi",function(){i=!1;e.emit("initDone")});var t=100,r=6e3,s=+new Date,l=function(){if(!("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null))if(+new Date-s>r){o=!0;i=!1;e.emit("initError")}else setTimeout(l,t)};l()}};this.googleLoad=function(){var t=function(){("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null).load("visualization","1",{packages:["corechart","charteditor"],callback:function(){e.emit("done")}})};if(i){e.once("initDone",t);e.once("initError",function(){e.emit("error","Could not load google loader")})}else if("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null)t();else if(o)e.emit("error","Could not load google loader");else{e.once("initDone",t);e.once("initError",function(){e.emit("error","Could not load google loader")})}}},a=function(e,t){var n=document.createElement("script");n.type="text/javascript";n.readyState?n.onreadystatechange=function(){if("loaded"==n.readyState||"complete"==n.readyState){n.onreadystatechange=null;t()}}:n.onload=function(){t()};n.src=e;document.body.appendChild(n)};s.prototype=new r;t.exports=new s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{events:2,jquery:63}],79:[function(e,t){(function(n){"use strict";function r(e,t,n){function r(e,t,o){var l,u,c,p,d,f,h,g;if(null==e||null==t)return e===t;if(e.__placeholder__||t.__placeholder__)return!0;if(e===t)return 0!==e||1/e==1/t;l=i.call(e);if(i.call(t)!=l)return!1;switch(l){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;u=o.length;for(;u--;)if(o[u]==e)return!0;o.push(e);c=0;p=!0;if("[object Array]"==l){d=e.length;f=t.length;if(a){switch(n){case"===":p=d===f;break;case"<==":p=f>=d;break;case"<<=":p=f>d}c=d;a=!1}else{p=d===f;c=d}if(p)for(;c--&&(p=c in e==c in t&&r(e[c],t[c],o)););}else{if("constructor"in e!="constructor"in t||e.constructor!=t.constructor)return!1;for(h in e)if(s(e,h)){c++;if(!(p=s(t,h)&&r(e[h],t[h],o)))break}if(p){g=0;for(h in t)s(t,h)&&++g;if(a)p="<<="===n?g>c:"<=="===n?g>=c:c===g;else{a=!1;p=c===g}}}o.pop();return p}var i={}.toString,o={}.hasOwnProperty,s=function(e,t){return o.call(e,t)},a=!0;return r(e,t,[])}var i=e("jquery"),o=e("./utils.js"),s=e("yasgui-utils"),a=t.exports=function(t){var l=i.extend(!0,{},a.defaults),u=t.container.closest("[id]").attr("id");null==t.options.gchart&&(t.options.gchart={});var c=t.getPersistencyId("motionchart"),p=t.getPersistencyId("chartConfig");null==t.options.gchart.motionChartState&&(t.options.gchart.motionChartState=s.storage.get(c));null==t.options.gchart.chartConfig&&(t.options.gchart.chartConfig=s.storage.get(p));var d=null,f=function(e){var i="undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null;d=new i.visualization.ChartEditor;i.visualization.events.addListener(d,"ok",function(){var e,n;e=d.getChartWrapper();if(!r(e.getChartType,"MotionChart","===")){t.options.gchart.motionChartState=e.n;s.storage.set(c,t.options.gchart.motionChartState);e.setOption("state",t.options.gchart.motionChartState);i.visualization.events.addListener(e,"ready",function(){var n;n=e.getChart();i.visualization.events.addListener(n,"statechange",function(){t.options.gchart.motionChartState=n.getState();s.storage.set(c,t.options.gchart.motionChartState)})})}n=e.getDataTable();e.setDataTable(null);t.options.gchart.chartConfig=e.toJSON();s.storage.set(p,t.options.gchart.chartConfig);e.setDataTable(n);e.draw()});e&&e()};return{name:"Google Chart",hideFromSelection:!1,priority:7,canHandleResults:function(e){var t,n;return null!=(t=e.results)&&(n=t.getVariables())&&n.length>0},getDownloadInfo:function(){if(!t.results)return null;var e=t.resultsContainer.find("svg");return 0==e.length?null:{getContent:function(){return e[0].outerHTML},filename:"queryResults.svg",contentType:"image/svg+xml",buttonTitle:"Download SVG Image"}},draw:function(){var r=function(){t.resultsContainer.empty();var n=u+"_gchartWrapper",r=null;t.resultsContainer.append(i("<button>",{"class":"openGchartBtn yasr_btn"}).text("Chart Config").click(function(){d.openDialog(r)})).append(i("<div>",{id:n,"class":"gchartWrapper"}));var a=new google.visualization.DataTable,p=t.results.getAsJson();p.head.vars.forEach(function(n){var r="string";try{r=o.getGoogleTypeForBindings(p.results.bindings,n)}catch(i){if(!(i instanceof e("./exceptions.js").GoogleTypeException))throw i;t.warn(i.toHtml())}a.addColumn(r,n)});var f=null;t.options.getUsedPrefixes&&(f="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes);p.results.bindings.forEach(function(e){var t=[];p.head.vars.forEach(function(n,r){t.push(o.castGoogleType(e[n],f,a.getColumnType(r)))});a.addRow(t)});if(t.options.gchart.chartConfig){r=new google.visualization.ChartWrapper(t.options.gchart.chartConfig);if("MotionChart"===r.getChartType()&&null!=t.options.gchart.motionChartState){r.setOption("state",t.options.gchart.motionChartState);google.visualization.events.addListener(r,"ready",function(){var e;e=r.getChart();google.visualization.events.addListener(e,"statechange",function(){t.options.gchart.motionChartState=e.getState();s.storage.set(c,t.options.gchart.motionChartState)})})}r.setDataTable(a)}else r=new google.visualization.ChartWrapper({chartType:"Table",dataTable:a,containerId:n});r.setOption("width",l.width);r.setOption("height",l.height);r.draw();t.updateHeader()};("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null)&&("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null).visualization&&d?r():e("./gChartLoader.js").on("done",function(){f();r()}).on("error",function(){console.log("errorrr")}).googleLoad()}}};a.defaults={height:"600px",width:"100%",persistencyId:"gchart"}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./exceptions.js":77,"./gChartLoader.js":78,"./utils.js":91,jquery:63,"yasgui-utils":69}],80:[function(e,t){"use strict";t.exports={cross:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g> <path d="M83.288,88.13c-2.114,2.112-5.575,2.112-7.689,0L53.659,66.188c-2.114-2.112-5.573-2.112-7.687,0L24.251,87.907 c-2.113,2.114-5.571,2.114-7.686,0l-4.693-4.691c-2.114-2.114-2.114-5.573,0-7.688l21.719-21.721c2.113-2.114,2.113-5.573,0-7.686 L11.872,24.4c-2.114-2.113-2.114-5.571,0-7.686l4.842-4.842c2.113-2.114,5.571-2.114,7.686,0L46.12,33.591 c2.114,2.114,5.572,2.114,7.688,0l21.721-21.719c2.114-2.114,5.573-2.114,7.687,0l4.695,4.695c2.111,2.113,2.111,5.571-0.003,7.686 L66.188,45.973c-2.112,2.114-2.112,5.573,0,7.686L88.13,75.602c2.112,2.111,2.112,5.572,0,7.687L83.288,88.13z"/></g></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><path fill="#000000" d="M14.301,49.982l22.606,17.047L84.361,4.903c2.614-3.733,7.76-4.64,11.493-2.026l0.627,0.462 c3.732,2.614,4.64,7.758,2.025,11.492l-51.783,79.77c-1.955,2.791-3.896,3.762-7.301,3.988c-3.405,0.225-5.464-1.039-7.508-3.084 L2.447,61.814c-3.263-3.262-3.263-8.553,0-11.814l0.041-0.019C5.75,46.718,11.039,46.718,14.301,49.982z"/></svg>',unsorted:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path7-9" d="m 8.8748339,52.571766 16.9382111,-0.222584 4.050851,-0.06665 15.719154,-0.222166 0.27778,-0.04246 0.43276,0.0017 0.41632,-0.06121 0.37532,-0.0611 0.47132,-0.119342 0.27767,-0.08206 0.55244,-0.198047 0.19707,-0.08043 0.61095,-0.259721 0.0988,-0.05825 0.019,-0.01914 0.59303,-0.356548 0.11787,-0.0788 0.49125,-0.337892 0.17994,-0.139779 0.37317,-0.336871 0.21862,-0.219786 0.31311,-0.31479 0.21993,-0.259387 c 0.92402,-1.126057 1.55249,-2.512251 1.78961,-4.016904 l 0.0573,-0.25754 0.0195,-0.374113 0.0179,-0.454719 0.0175,-0.05874 -0.0169,-0.258049 -0.0225,-0.493503 -0.0398,-0.355569 -0.0619,-0.414201 -0.098,-0.414812 -0.083,-0.353334 L 53.23955,41.1484 53.14185,40.850967 52.93977,40.377742 52.84157,40.161628 34.38021,4.2507375 C 33.211567,1.9401875 31.035446,0.48226552 28.639484,0.11316952 l -0.01843,-0.01834 -0.671963,-0.07882 -0.236871,0.0042 L 27.335984,-4.7826577e-7 27.220736,0.00379952 l -0.398804,0.0025 -0.313848,0.04043 -0.594474,0.07724 -0.09611,0.02147 C 23.424549,0.60716252 21.216017,2.1142355 20.013025,4.4296865 L 0.93967491,40.894479 c -2.08310801,3.997178 -0.588125,8.835482 3.35080799,10.819749 1.165535,0.613495 2.43199,0.88731 3.675026,0.864202 l 0.49845,-0.02325 0.410875,0.01658 z M 9.1502369,43.934401 9.0136999,43.910011 27.164145,9.2564625 44.70942,43.42818 l -14.765289,0.214677 -4.031106,0.0468 -16.7627881,0.244744 z" /></svg>',sortDesc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,0.12823506 0.09753,0.02006 c 2.39093,0.458209 4.599455,1.96811104 5.80244,4.28639004 L 52.785897,40.894525 c 2.088044,4.002139 0.590949,8.836902 -3.348692,10.821875 -1.329078,0.688721 -2.766603,0.943695 -4.133174,0.841768 l -0.454018,0.02 L 27.910392,52.354171 23.855313,52.281851 8.14393,52.061827 7.862608,52.021477 7.429856,52.021738 7.014241,51.959818 6.638216,51.900838 6.164776,51.779369 5.889216,51.699439 5.338907,51.500691 5.139719,51.419551 4.545064,51.145023 4.430618,51.105123 4.410168,51.084563 3.817138,50.730843 3.693615,50.647783 3.207314,50.310611 3.028071,50.174369 2.652795,49.833957 2.433471,49.613462 2.140099,49.318523 1.901127,49.041407 C 0.97781,47.916059 0.347935,46.528448 0.11153,45.021676 L 0.05352,44.766255 0.05172,44.371683 0.01894,43.936017 0,43.877277 0.01836,43.62206 0.03666,43.122889 0.0765,42.765905 0.13912,42.352413 0.23568,41.940425 0.32288,41.588517 0.481021,41.151945 0.579391,40.853806 0.77369,40.381268 0.876097,40.162336 19.338869,4.2542801 c 1.172169,-2.308419 3.34759,-3.76846504 5.740829,-4.17716604 l 0.01975,0.01985 0.69605,-0.09573 0.218437,0.0225 0.490791,-0.02132 0.39809,0.0046 0.315972,0.03973 0.594462,0.08149 z" /></svg>',sortAsc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,0.70898699,-0.70898699,-0.70522156,97.988199,58.704807)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,113.65778 0.09753,-0.0201 c 2.39093,-0.45821 4.599455,-1.96811 5.80244,-4.28639 L 52.785897,72.891487 c 2.088044,-4.002139 0.590949,-8.836902 -3.348692,-10.821875 -1.329078,-0.688721 -2.766603,-0.943695 -4.133174,-0.841768 l -0.454018,-0.02 -16.939621,0.223997 -4.055079,0.07232 -15.711383,0.220024 -0.281322,0.04035 -0.432752,-2.61e-4 -0.415615,0.06192 -0.376025,0.05898 -0.47344,0.121469 -0.27556,0.07993 -0.550309,0.198748 -0.199188,0.08114 -0.594655,0.274528 -0.114446,0.0399 -0.02045,0.02056 -0.59303,0.35372 -0.123523,0.08306 -0.486301,0.337172 -0.179243,0.136242 -0.375276,0.340412 -0.219324,0.220495 -0.293372,0.294939 -0.238972,0.277116 C 0.97781,65.869953 0.347935,67.257564 0.11153,68.764336 L 0.05352,69.019757 0.05172,69.414329 0.01894,69.849995 0,69.908735 l 0.01836,0.255217 0.0183,0.499171 0.03984,0.356984 0.06262,0.413492 0.09656,0.411988 0.0872,0.351908 0.158141,0.436572 0.09837,0.298139 0.194299,0.472538 0.102407,0.218932 18.462772,35.908054 c 1.172169,2.30842 3.34759,3.76847 5.740829,4.17717 l 0.01975,-0.0199 0.69605,0.0957 0.218437,-0.0225 0.490791,0.0213 0.39809,-0.005 0.315972,-0.0397 0.594462,-0.0815 z" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g id="Captions"></g><g id="Your_Icon"> <path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',move:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_11656_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="753" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="287" inkscape:window-y="249" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><polygon points="33,83 50,100 67,83 54,83 54,17 67,17 50,0 33,17 46,17 46,83 " transform="translate(-7.962963,-10)" /><polygon points="83,67 100,50 83,33 83,46 17,46 17,33 0,50 17,67 17,54 83,54 " transform="translate(-7.962963,-10)" /></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'} },{}],81:[function(e,t){"use strict";var n=e("jquery"),r=e("yasgui-utils");console=console||{log:function(){}};var i=t.exports=function(t,o,s){var a={};a.options=n.extend(!0,{},i.defaults,o);a.container=n("<div class='yasr'></div>").appendTo(t);a.header=n("<div class='yasr_header'></div>").appendTo(a.container);a.resultsContainer=n("<div class='yasr_results'></div>").appendTo(a.container);a.storage=r.storage;var l=null;a.getPersistencyId=function(e){null===l&&(l=a.options.persistency&&a.options.persistency.prefix?"string"==typeof a.options.persistency.prefix?a.options.persistency.prefix:a.options.persistency.prefix(a):!1);return l&&e?l+("string"==typeof e?e:e(a)):null};a.options.useGoogleCharts&&e("./gChartLoader.js").once("initError",function(){a.options.useGoogleCharts=!1}).init();a.plugins={};for(var u in i.plugins)(a.options.useGoogleCharts||"gchart"!=u)&&(a.plugins[u]=new i.plugins[u](a));a.updateHeader=function(){var e=a.header.find(".yasr_downloadIcon").removeAttr("title"),t=a.plugins[a.options.output];if(t){var n=t.getDownloadInfo?t.getDownloadInfo():null;if(n){n.buttonTitle&&e.attr("title",n.buttonTitle);e.prop("disabled",!1);e.find("path").each(function(){this.style.fill="black"})}else{e.prop("disabled",!0).prop("title","Download not supported for this result representation");e.find("path").each(function(){this.style.fill="gray"})}}};a.draw=function(e){if(!a.results)return!1;e||(e=a.options.output);var t=null,r=-1,i=[];for(var o in a.plugins)if(a.plugins[o].canHandleResults(a)){var s=a.plugins[o].getPriority;"function"==typeof s&&(s=s(a));if(null!=s&&void 0!=s&&s>r){r=s;t=o}}else i.push(o);c(i);if(e in a.plugins&&a.plugins[e].canHandleResults(a)){n(a.resultsContainer).empty();a.plugins[e].draw();return!0}if(t){n(a.resultsContainer).empty();a.plugins[t].draw();return!0}return!1};var c=function(e){a.header.find(".yasr_btnGroup .yasr_btn").removeClass("disabled");e.forEach(function(e){a.header.find(".yasr_btnGroup .select_"+e).addClass("disabled")})};a.somethingDrawn=function(){return!a.resultsContainer.is(":empty")};a.setResponse=function(t,n,i){try{a.results=e("./parsers/wrapper.js")(t,n,i)}catch(o){a.results={getException:function(){return o}}}a.draw();var s=a.getPersistencyId(a.options.persistency.results.key);s&&(a.results.getOriginalResponseAsString&&a.results.getOriginalResponseAsString().length<a.options.persistency.results.maxSize?r.storage.set(s,a.results.getAsStoreObject(),"month"):r.storage.remove(s))};var p=null,d=null,f=null;a.warn=function(e){if(!p){p=n("<div>",{"class":"toggableWarning"}).prependTo(a.container).hide();d=n("<span>",{"class":"toggleWarning"}).html("&times;").click(function(){p.hide(400)}).appendTo(p);f=n("<span>",{"class":"toggableMsg"}).appendTo(p)}f.empty();e instanceof n?f.append(e):f.html(e);p.show(400)};var h=function(t){var i=function(){var e=n('<div class="yasr_btnGroup"></div>');n.each(t.plugins,function(i,o){if(!o.hideFromSelection){var s=o.name||i,a=n("<button class='yasr_btn'></button>").text(s).addClass("select_"+i).click(function(){e.find("button.selected").removeClass("selected");n(this).addClass("selected");t.options.output=i;var o=t.getPersistencyId(t.options.persistency.outputSelector);o&&r.storage.set(o,t.options.output,"month");p&&p.hide(400);t.draw();t.updateHeader()}).appendTo(e);t.options.output==i&&a.addClass("selected")}});e.children().length>1&&t.header.append(e)},o=function(){var r=function(e,t){var n=null,r=window.URL||window.webkitURL||window.mozURL||window.msURL;if(r&&Blob){var i=new Blob([e],{type:t});n=r.createObjectURL(i)}return n},i=n("<button class='yasr_btn yasr_downloadIcon btn_icon'></button>").append(e("yasgui-utils").svg.getElement(e("./imgs.js").download)).click(function(){var i=t.plugins[t.options.output];if(i&&i.getDownloadInfo){var o=i.getDownloadInfo(),s=r(o.getContent(),o.contentType?o.contentType:"text/plain"),a=n("<a></a>",{href:s,download:o.filename});e("./utils.js").fireClick(a)}});t.header.append(i)},s=function(){var r=n("<button class='yasr_btn btn_fullscreen btn_icon'></button>").append(e("yasgui-utils").svg.getElement(e("./imgs.js").fullscreen)).click(function(){t.container.addClass("yasr_fullscreen")});t.header.append(r)},a=function(){var r=n("<button class='yasr_btn btn_smallscreen btn_icon'></button>").append(e("yasgui-utils").svg.getElement(e("./imgs.js").smallscreen)).click(function(){t.container.removeClass("yasr_fullscreen")});t.header.append(r)};s();a();t.options.drawOutputSelector&&i();t.options.drawDownloadIcon&&o()},g=a.getPersistencyId(a.options.persistency.outputSelector);if(g){var m=r.storage.get(g);m&&(a.options.output=m)}h(a);if(!s&&a.options.persistency&&a.options.persistency.results){var v,E=a.getPersistencyId(a.options.persistency.results.key);E&&(v=r.storage.get(E));if(!v&&a.options.persistency.results.id){var y="string"==typeof a.options.persistency.results.id?a.options.persistency.results.id:a.options.persistency.results.id(a);if(y){v=r.storage.get(y);v&&r.storage.remove(y)}}v&&(n.isArray(v)?a.setResponse.apply(this,v):a.setResponse(v))}s&&a.setResponse(s);a.updateHeader();return a};i.plugins={};i.registerOutput=function(e,t){i.plugins[e]=t};i.defaults=e("./defaults.js");i.version={YASR:e("../package.json").version,jquery:n.fn.jquery,"yasgui-utils":e("yasgui-utils").version};i.$=n;try{i.registerOutput("boolean",e("./boolean.js"))}catch(o){}try{i.registerOutput("rawResponse",e("./rawResponse.js"))}catch(o){}try{i.registerOutput("table",e("./table.js"))}catch(o){}try{i.registerOutput("error",e("./error.js"))}catch(o){}try{i.registerOutput("pivot",e("./pivot.js"))}catch(o){}try{i.registerOutput("gchart",e("./gchart.js"))}catch(o){}},{"../package.json":72,"./boolean.js":74,"./defaults.js":75,"./error.js":76,"./gChartLoader.js":78,"./gchart.js":79,"./imgs.js":80,"./parsers/wrapper.js":86,"./pivot.js":88,"./rawResponse.js":89,"./table.js":90,"./utils.js":91,jquery:63,"yasgui-utils":69}],82:[function(e,t){"use strict";e("jquery"),t.exports=function(t){return e("./dlv.js")(t,",")}},{"./dlv.js":83,jquery:63}],83:[function(e,t){"use strict";var n=e("jquery");e("../../lib/jquery.csv-0.71.js");t.exports=function(e,t){var r={},i=n.csv.toArrays(e,{separator:t}),o=function(e){return 0==e.indexOf("http")?"uri":null},s=function(){if(2==i.length&&1==i[0].length&&1==i[1].length&&"boolean"==i[0][0]&&("1"==i[1][0]||"0"==i[1][0])){r["boolean"]="1"==i[1][0]?!0:!1;return!0}return!1},a=function(){if(i.length>0&&i[0].length>0){r.head={vars:i[0]};return!0}return!1},l=function(){if(i.length>1){r.results={bindings:[]};for(var e=1;e<i.length;e++){for(var t={},n=0;n<i[e].length;n++){var s=r.head.vars[n];if(s){var a=i[e][n],l=o(a);t[s]={value:a};l&&(t[s].type=l)}}r.results.bindings.push(t)}r.head={vars:i[0]};return!0}return!1},u=s();if(!u){var c=a();c&&l()}return r}},{"../../lib/jquery.csv-0.71.js":49,jquery:63}],84:[function(e,t){"use strict";e("jquery"),t.exports=function(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return!1}return"object"==typeof e&&e.constructor==={}.constructor?e:!1}},{jquery:63}],85:[function(e,t){"use strict";e("jquery"),t.exports=function(t){return e("./dlv.js")(t," ")}},{"./dlv.js":83,jquery:63}],86:[function(e,t){"use strict";e("jquery"),t.exports=function(t,n,r){var i={xml:e("./xml.js"),json:e("./json.js"),tsv:e("./tsv.js"),csv:e("./csv.js")},o=null,s=null,a=null,l=null,u=null,c=function(){if("object"==typeof t){if(t.exception)u=t.exception;else if(void 0!=t.status&&(t.status>=300||0===t.status)){u={status:t.status};"string"==typeof r&&(u.errorString=r);t.responseText&&(u.responseText=t.responseText);t.statusText&&(u.statusText=t.statusText)}if(t.contentType)o=t.contentType.toLowerCase();else if(t.getResponseHeader&&t.getResponseHeader("content-type")){var e=t.getResponseHeader("content-type").trim().toLowerCase();e.length>0&&(o=e)}t.response?s=t.response:n||r||(s=t)}u||s||(s=t.responseText?t.responseText:t)},p=function(){if(a)return a;if(a===!1||u)return!1;var e=function(){if(o)if(o.indexOf("json")>-1){try{a=i.json(s)}catch(e){u=e}l="json"}else if(o.indexOf("xml")>-1){try{a=i.xml(s)}catch(e){u=e}l="xml"}else if(o.indexOf("csv")>-1){try{a=i.csv(s)}catch(e){u=e}l="csv"}else if(o.indexOf("tab-separated")>-1){try{a=i.tsv(s)}catch(e){u=e}l="tsv"}},t=function(){a=i.json(s);if(a)l="json";else try{a=i.xml(s);a&&(l="xml")}catch(e){}};e();a||t();a||(a=!1);return a},d=function(){var e=p();return e&&"head"in e?e.head.vars:null},f=function(){var e=p();return e&&"results"in e?e.results.bindings:null},h=function(){var e=p();return e&&"boolean"in e?e["boolean"]:null},g=function(){return s},m=function(){var e="";"string"==typeof s?e=s:"json"==l?e=JSON.stringify(s,void 0,2):"xml"==l&&(e=(new XMLSerializer).serializeToString(s));return e},v=function(){return u},E=function(){null==l&&p();return l},y=function(){var e={};if(t.status){e.status=t.status;e.responseText=t.responseText;e.statusText=t.statusText;e.contentType=o}else e=t;var i=n,s=void 0;"string"==typeof r&&(s=r);return[e,i,s]};c();a=p();return{getAsStoreObject:y,getAsJson:p,getOriginalResponse:g,getOriginalResponseAsString:m,getOriginalContentType:function(){return o},getVariables:d,getBindings:f,getBoolean:h,getType:E,getException:v}}},{"./csv.js":82,"./json.js":84,"./tsv.js":85,"./xml.js":87,jquery:63}],87:[function(e,t){"use strict";{var n=e("jquery");t.exports=function(e){var t=function(e){s.head={};for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];if("variable"==n.nodeName){s.head.vars||(s.head.vars=[]);var r=n.getAttribute("name");r&&s.head.vars.push(r)}}},r=function(e){s.results={};s.results.bindings=[];for(var t=0;t<e.childNodes.length;t++){for(var n=e.childNodes[t],r=null,i=0;i<n.childNodes.length;i++){var o=n.childNodes[i];if("binding"==o.nodeName){var a=o.getAttribute("name");if(a){r=r||{};r[a]={};for(var l=0;l<o.childNodes.length;l++){var u=o.childNodes[l],c=u.nodeName;if("#text"!=c){r[a].type=c;r[a].value=u.innerHTML;var p=u.getAttribute("datatype");p&&(r[a].datatype=p)}}}}}r&&s.results.bindings.push(r)}},i=function(e){s["boolean"]="true"==e.innerHTML?!0:!1},o=null;"string"==typeof e?o=n.parseXML(e):n.isXMLDoc(e)&&(o=e);var e=null;if(!(o.childNodes.length>0))return null;e=o.childNodes[0];for(var s={},a=0;a<e.childNodes.length;a++){var l=e.childNodes[a];"head"==l.nodeName&&t(l);"results"==l.nodeName&&r(l);"boolean"==l.nodeName&&i(l)}return s}}},{jquery:63}],88:[function(e,t){"use strict";var n=e("jquery"),r=e("./utils.js"),i=e("yasgui-utils"),o=e("./imgs.js");e("jquery-ui/sortable");e("pivottable");if(!n.fn.pivotUI)throw new Error("Pivot lib not loaded");var s=t.exports=function(t){var a=n.extend(!0,{},s.defaults);if(a.useD3Chart){try{var l=e("d3");l&&e("../node_modules/pivottable/dist/d3_renderers.js")}catch(u){}n.pivotUtilities.d3_renderers&&n.extend(!0,n.pivotUtilities.renderers,n.pivotUtilities.d3_renderers)}var c,p=null,d=function(){var e=t.results.getVariables();if(!a.mergeLabelsWithUris)return e;var n=[];p="string"==typeof a.mergeLabelsWithUris?a.mergeLabelsWithUris:"Label";e.forEach(function(t){-1!==t.indexOf(p,t.length-p.length)&&e.indexOf(t.substring(0,t.length-p.length))>=0||n.push(t)});return n},f=function(e){var n=d(),i=null;t.options.getUsedPrefixes&&(i="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes);t.results.getBindings().forEach(function(t){var o={};n.forEach(function(e){if(e in t){var n=t[e].value;p&&t[e+p]?n=t[e+p].value:"uri"==t[e].type&&(n=r.uriToPrefixed(i,n));o[e]=n}else o[e]=null});e(o)})},h=t.getPersistencyId(a.persistencyId),g=function(){var e=i.storage.get(h);if(e){var r=t.results.getVariables(),o=!0;e.cols.forEach(function(e){r.indexOf(e)<0&&(o=!1)});o&&e.rows.forEach(function(e){r.indexOf(e)<0&&(o=!1)});if(!o){e.cols=[];e.rows=[]}n.pivotUtilities.renderers[e.rendererName]||delete e.rendererName}else e={};return e},m=function(){var r=function(){var e=function(e){if(h){var n={cols:e.cols,rows:e.rows,rendererName:e.rendererName,aggregatorName:e.aggregatorName,vals:e.vals};i.storage.set(h,n,"month")}e.rendererName.toLowerCase().indexOf(" chart")>=0?r.show():r.hide();t.updateHeader()},r=n("<button>",{"class":"openPivotGchart yasr_btn"}).text("Chart Config").click(function(){c.find('div[dir="ltr"]').dblclick()}).appendTo(t.resultsContainer);c=n("<div>",{"class":"pivotTable"}).appendTo(n(t.resultsContainer));var a=n.extend(!0,{},g(),s.defaults.pivotTable);a.onRefresh=function(){var t=a.onRefresh;return function(n){e(n);t&&t(n)}}();window.pivot=c.pivotUI(f,a);var l=n(i.svg.getElement(o.move));c.find(".pvtTriangle").replaceWith(l);n(".pvtCols").prepend(n("<div>",{"class":"containerHeader"}).text("Columns"));n(".pvtRows").prepend(n("<div>",{"class":"containerHeader"}).text("Rows"));n(".pvtUnused").prepend(n("<div>",{"class":"containerHeader"}).text("Available Variables"));n(".pvtVals").prepend(n("<div>",{"class":"containerHeader"}).text("Cells"));setTimeout(t.updateHeader,400)};t.options.useGoogleCharts&&a.useGoogleCharts&&!n.pivotUtilities.gchart_renderers?e("./gChartLoader.js").on("done",function(){try{e("../node_modules/pivottable/dist/gchart_renderers.js");n.extend(!0,n.pivotUtilities.renderers,n.pivotUtilities.gchart_renderers)}catch(t){a.useGoogleCharts=!1}r()}).on("error",function(){console.log("could not load gchart");a.useGoogleCharts=!1;r()}).googleLoad():r()},v=function(){return t.results&&t.results.getVariables&&t.results.getVariables()&&t.results.getVariables().length>0},E=function(){if(!t.results)return null;var e=t.resultsContainer.find(".pvtRendererArea svg");return 0==e.length?null:{getContent:function(){return e[0].outerHTML},filename:"queryResults.svg",contentType:"image/svg+xml",buttonTitle:"Download SVG Image"}};return{getDownloadInfo:E,options:a,draw:m,name:"Pivot Table",canHandleResults:v,getPriority:4}};s.defaults={mergeLabelsWithUris:!1,useGoogleCharts:!0,useD3Chart:!0,persistencyId:"pivot",pivotTable:{}};s.version={"YASR-rawResponse":e("../package.json").version,jquery:n.fn.jquery}},{"../node_modules/pivottable/dist/d3_renderers.js":64,"../node_modules/pivottable/dist/gchart_renderers.js":65,"../package.json":72,"./gChartLoader.js":78,"./imgs.js":80,"./utils.js":91,d3:58,jquery:63,"jquery-ui/sortable":61,pivottable:66,"yasgui-utils":69}],89:[function(e,t){"use strict";var n=e("jquery"),r=e("codemirror");e("codemirror/addon/fold/foldcode.js");e("codemirror/addon/fold/foldgutter.js");e("codemirror/addon/fold/xml-fold.js");e("codemirror/addon/fold/brace-fold.js");e("codemirror/addon/edit/matchbrackets.js");e("codemirror/mode/xml/xml.js");e("codemirror/mode/javascript/javascript.js");var i=t.exports=function(e){var t=n.extend(!0,{},i.defaults),o=null,s=function(){var n=t.CodeMirror;n.value=e.results.getOriginalResponseAsString();var i=e.results.getType();if(i){"json"==i&&(i={name:"javascript",json:!0});n.mode=i}o=r(e.resultsContainer.get()[0],n);o.on("fold",function(){o.refresh()});o.on("unfold",function(){o.refresh()})},a=function(){if(!e.results)return!1;if(!e.results.getOriginalResponseAsString)return!1;var t=e.results.getOriginalResponseAsString();return t&&0!=t.length||!e.results.getException()?!0:!1},l=function(){if(!e.results)return null;var t=e.results.getOriginalContentType(),n=e.results.getType();return{getContent:function(){return e.results.getOriginalResponse()},filename:"queryResults"+(n?"."+n:""),contentType:t?t:"text/plain",buttonTitle:"Download raw response"}};return{draw:s,name:"Raw Response",canHandleResults:a,getPriority:2,getDownloadInfo:l}};i.defaults={CodeMirror:{readOnly:!0,lineNumbers:!0,lineWrapping:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}};i.version={"YASR-rawResponse":e("../package.json").version,jquery:n.fn.jquery,CodeMirror:r.version}},{"../package.json":72,codemirror:55,"codemirror/addon/edit/matchbrackets.js":50,"codemirror/addon/fold/brace-fold.js":51,"codemirror/addon/fold/foldcode.js":52,"codemirror/addon/fold/foldgutter.js":53,"codemirror/addon/fold/xml-fold.js":54,"codemirror/mode/javascript/javascript.js":56,"codemirror/mode/xml/xml.js":57,jquery:63}],90:[function(e,t){"use strict";var n=e("jquery"),r=e("yasgui-utils"),i=e("./utils.js"),o=e("./imgs.js");e("../lib/DataTables/media/js/jquery.dataTables.js");e("../lib/colResizable-1.4.js");var s=t.exports=function(t){var i=null,a={name:"Table",getPriority:10},l=a.options=n.extend(!0,{},s.defaults),c=l.persistency?t.getPersistencyId(l.persistency.tableLength):null,p=function(){var e=[],n=t.results.getBindings(),r=t.results.getVariables(),i=null;t.options.getUsedPrefixes&&(i="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes);for(var o=0;o<n.length;o++){var s=[];s.push("");for(var u=n[o],c=0;c<r.length;c++){var p=r[c];s.push(p in u?l.getCellContent?l.getCellContent(t,a,u,p,{rowId:o,colId:c,usedPrefixes:i}):"":"")}e.push(s)}return e},d=t.getPersistencyId("eventId")||"",f=function(){i.on("order.dt",function(){h()});c&&i.on("length.dt",function(e,t,n){r.storage.set(c,n,"month")});n.extend(!0,l.callbacks,l.handlers);i.delegate("td","click",function(e){if(l.callbacks&&l.callbacks.onCellClick){var t=l.callbacks.onCellClick(this,e);if(t===!1)return!1}}).delegate("td","mouseenter",function(e){l.callbacks&&l.callbacks.onCellMouseEnter&&l.callbacks.onCellMouseEnter(this,e);var t=n(this);l.fetchTitlesFromPreflabel&&void 0===t.attr("title")&&0==t.text().trim().indexOf("http")&&u(t)}).delegate("td","mouseleave",function(e){l.callbacks&&l.callbacks.onCellMouseLeave&&l.callbacks.onCellMouseLeave(this,e)});n(window).off("resize."+d);n(window).on("resize."+d,g);g()};a.draw=function(){i=n('<table cellpadding="0" cellspacing="0" border="0" class="resultsTable"></table>');n(t.resultsContainer).html(i);var e=l.datatable;e.data=p();e.columns=l.getColumns(t,a);var o=r.storage.get(c);o&&(e.pageLength=o);i.DataTable(n.extend(!0,{},e));h();f();i.colResizable();i.find("thead").outerHeight();n(t.resultsContainer).find(".JCLRgrip").height(i.find("thead").outerHeight());var s=t.header.outerHeight()-5;if(s>0){t.resultsContainer.find(".dataTables_wrapper").css("position","relative").css("top","-"+s+"px").css("margin-bottom","-"+s+"px");n(t.resultsContainer).find(".JCLRgrip").css("marginTop",s+"px")}};var h=function(){var e={sorting:"unsorted",sorting_asc:"sortAsc",sorting_desc:"sortDesc"};i.find(".sortIcons").remove();for(var t in e){var s=n("<div class='sortIcons'></div>");r.svg.draw(s,o[e[t]]);i.find("th."+t).append(s)}};a.canHandleResults=function(){return t.results&&t.results.getVariables&&t.results.getVariables()&&t.results.getVariables().length>0};a.getDownloadInfo=function(){return t.results?{getContent:function(){return e("./bindingsToCsv.js")(t.results.getAsJson())},filename:"queryResults.csv",contentType:"text/csv",buttonTitle:"Download as CSV"}:null};var g=function(){var e=!0,n=t.container.find(".yasr_downloadIcon"),r=t.container.find(".dataTables_filter"),i=n.offset().left;if(i>0){var o=i+n.outerWidth(),s=r.offset().left;s>0&&o>s&&(e=!1)}e?r.css("visibility","visible"):r.css("visibility","hidden")};return a},a=function(e,t,n){var r=i.escapeHtmlEntities(n.value);if(n["xml:lang"])r='"'+r+'"<sup>@'+n["xml:lang"]+"</sup>";else if(n.datatype){var o="http://www.w3.org/2001/XMLSchema#",s=n.datatype;s=0===s.indexOf(o)?"xsd:"+s.substring(o.length):"&lt;"+s+"&gt;";r='"'+r+'"<sup>^^'+s+"</sup>"}return r},l=function(e,t,n,r,i){var o=n[r],s=null;if("uri"==o.type){var l=null,u=o.value,c=u;if(i.usedPrefixes)for(var p in i.usedPrefixes)if(0==c.indexOf(i.usedPrefixes[p])){c=p+":"+u.substring(i.usedPrefixes[p].length);break}if(t.options.mergeLabelsWithUris){var d="string"==typeof t.options.mergeLabelsWithUris?t.options.mergeLabelsWithUris:"Label";if(n[r+d]){c=a(e,t,n[r+d]);l=u}}s="<a "+(l?"title='"+u+"' ":"")+"class='uri' target='_blank' href='"+u+"'>"+c+"</a>"}else s="<span class='nonUri'>"+a(e,t,o)+"</span>";return"<div>"+s+"</div>"},u=function(e){var t=function(){e.attr("title","")};n.get("http://preflabel.org/api/v1/label/"+encodeURIComponent(e.text())+"?silent=true").success(function(n){"object"==typeof n&&n.label?e.attr("title",n.label):"string"==typeof n&&n.length>0?e.attr("title",n):t()}).fail(t)};s.defaults={getCellContent:l,persistency:{tableLength:"tableLength"},getColumns:function(e,t){var n=function(n){if(!t.options.mergeLabelsWithUris)return!0;var r="string"==typeof t.options.mergeLabelsWithUris?t.options.mergeLabelsWithUris:"Label";return-1!==n.indexOf(r,n.length-r.length)&&e.results.getVariables().indexOf(n.substring(0,n.length-r.length))>=0?!1:!0},r=[];r.push({title:""});e.results.getVariables().forEach(function(e){r.push({title:"<span>"+e+"</span>",visible:n(e)})});return r},fetchTitlesFromPreflabel:!0,mergeLabelsWithUris:!1,callbacks:{onCellMouseEnter:null,onCellMouseLeave:null,onCellClick:null},datatable:{autoWidth:!1,order:[],pageLength:50,lengthMenu:[[10,50,100,1e3,-1],[10,50,100,1e3,"All"]],lengthChange:!0,pagingType:"full_numbers",drawCallback:function(e){for(var t=0;t<e.aiDisplay.length;t++)n("td:eq(0)",e.aoData[e.aiDisplay[t]].nTr).html(t+1);var r=!1;n(e.nTableWrapper).find(".paginate_button").each(function(){-1==n(this).attr("class").indexOf("current")&&-1==n(this).attr("class").indexOf("disabled")&&(r=!0)});r?n(e.nTableWrapper).find(".dataTables_paginate").show():n(e.nTableWrapper).find(".dataTables_paginate").hide()},columnDefs:[{width:"32px",orderable:!1,targets:0}]}};s.version={"YASR-table":e("../package.json").version,jquery:n.fn.jquery,"jquery-datatables":n.fn.DataTable.version}},{"../lib/DataTables/media/js/jquery.dataTables.js":47,"../lib/colResizable-1.4.js":48,"../package.json":72,"./bindingsToCsv.js":73,"./imgs.js":80,"./utils.js":91,jquery:63,"yasgui-utils":69}],91:[function(e,t){"use strict";var n=e("jquery"),r=e("./exceptions.js").GoogleTypeException;t.exports={escapeHtmlEntities:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},uriToPrefixed:function(e,t){if(e)for(var n in e)if(0==t.indexOf(e[n])){t=n+":"+t.substring(e[n].length);break}return t},getGoogleTypeForBinding:function(e){if(null==e)return null;if(null==e.type||"typed-literal"!==e.type&&"literal"!==e.type)return"string";switch(e.datatype){case"http://www.w3.org/2001/XMLSchema#float":case"http://www.w3.org/2001/XMLSchema#decimal":case"http://www.w3.org/2001/XMLSchema#int":case"http://www.w3.org/2001/XMLSchema#integer":case"http://www.w3.org/2001/XMLSchema#long":case"http://www.w3.org/2001/XMLSchema#gYearMonth":case"http://www.w3.org/2001/XMLSchema#gYear":case"http://www.w3.org/2001/XMLSchema#gMonthDay":case"http://www.w3.org/2001/XMLSchema#gDay":case"http://www.w3.org/2001/XMLSchema#gMonth":return"number";case"http://www.w3.org/2001/XMLSchema#date":return"date";case"http://www.w3.org/2001/XMLSchema#dateTime":return"datetime";case"http://www.w3.org/2001/XMLSchema#time":return"timeofday";default:return"string"}},getGoogleTypeForBindings:function(e,n){var i={},o=0;e.forEach(function(e){var r=t.exports.getGoogleTypeForBinding(e[n]);if(null!=r){if(!(r in i)){i[r]=0;o++}i[r]++}});if(0==o)return"string";if(1!=o)throw new r(i,n);for(var s in i)return s},castGoogleType:function(e,n,r){if(null==e)return null;if("string"==r||null==e.type||"typed-literal"!==e.type&&"literal"!==e.type)return(e.type="uri")?t.exports.uriToPrefixed(n,e.value):e.value;switch(e.datatype){case"http://www.w3.org/2001/XMLSchema#float":case"http://www.w3.org/2001/XMLSchema#decimal":case"http://www.w3.org/2001/XMLSchema#int":case"http://www.w3.org/2001/XMLSchema#integer":case"http://www.w3.org/2001/XMLSchema#long":case"http://www.w3.org/2001/XMLSchema#gYearMonth":case"http://www.w3.org/2001/XMLSchema#gYear":case"http://www.w3.org/2001/XMLSchema#gMonthDay":case"http://www.w3.org/2001/XMLSchema#gDay":case"http://www.w3.org/2001/XMLSchema#gMonth":return Number(e.value);case"http://www.w3.org/2001/XMLSchema#date":var o=i(e.value);if(o)return o;case"http://www.w3.org/2001/XMLSchema#dateTime":case"http://www.w3.org/2001/XMLSchema#time":return new Date(e.value);default:return e.value}},fireClick:function(e){e&&e.each(function(e,t){var r=n(t);if(document.dispatchEvent){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,1,1,1,1,1,!1,!1,!1,!1,0,r[0]);r[0].dispatchEvent(i)}else document.fireEvent&&r[0].click()})}};var i=function(e){var t=new Date(e.replace(/(\d)([\+-]\d{2}:\d{2})/,"$1Z$2"));return isNaN(t)?null:t}},{"./exceptions.js":77,jquery:63}],92:[function(e,t){"use strict";var n=e("jquery");t.exports={persistencyPrefix:function(e){return"yasgui_"+n(e.wrapperElement).closest("[id]").attr("id")+"_"},api:{corsProxy:null,collections:null},tracker:{googleAnalyticsId:null,askConsent:!0}}},{jquery:4}],93:[function(e,t){"use strict";t.exports={yasgui:'<svg xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="0 0 603.99 522.51" width="100%" height="100%" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="test.svg"> <defs > <linearGradient osb:paint="solid"> <stop style="stop-color:#3b3b3b;stop-opacity:1;" offset="0" /> </linearGradient> <inkscape:path-effect effect="skeletal" is_visible="true" pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 z" copytype="single_stretched" prop_scale="1" scale_y_rel="false" spacing="0" normal_offset="0" tang_offset="0" prop_units="false" vertical_pattern="false" fuse_tolerance="0" /> <inkscape:path-effect effect="spiro" is_visible="true" /> <inkscape:path-effect effect="skeletal" is_visible="true" pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 z" copytype="single_stretched" prop_scale="1" scale_y_rel="false" spacing="0" normal_offset="0" tang_offset="0" prop_units="false" vertical_pattern="false" fuse_tolerance="0" /> <inkscape:path-effect effect="spiro" is_visible="true" /> </defs> <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.35" inkscape:cx="-469.55507" inkscape:cy="840.5292" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1855" inkscape:window-height="1056" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" /> <metadata > <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" transform="translate(-50.966817,-280.33262)"> <rect style="fill:#3b3b3b;fill-opacity:1;stroke:none" width="40.000004" height="478.57324" x="-374.48849" y="103.99496" transform="matrix(-2.679181e-4,-0.99999996,0.99999993,-3.6684387e-4,0,0)" /> <rect style="fill:#3b3b3b;fill-opacity:1;stroke:none" width="40.000004" height="560" x="651.37634" y="-132.06581" transform="matrix(0.74639582,0.66550228,-0.66550228,0.74639582,0,0)" /> <path sodipodi:type="arc" style="fill:#ffffff;fill-opacity:1;stroke:#3b3b3b;stroke-width:61.04665375;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:cx="455.71429" sodipodi:cy="513.79077" sodipodi:rx="144.28572" sodipodi:ry="161.42857" d="m 600.00002,513.79077 c 0,89.15454 -64.59892,161.42858 -144.28573,161.42858 -79.6868,0 -144.28572,-72.27404 -144.28572,-161.42858 0,-89.15454 64.59892,-161.42857 144.28572,-161.42857 79.68681,0 144.28573,72.27403 144.28573,161.42857 z" transform="matrix(0.28877887,0,0,0.25811209,92.132758,620.67568)" /> <path sodipodi:type="arc" style="fill:#ffffff;fill-opacity:1;stroke:#3b3b3b;stroke-width:61.04665375;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:cx="455.71429" sodipodi:cy="513.79077" sodipodi:rx="144.28572" sodipodi:ry="161.42857" d="m 600.00002,513.79077 c 0,89.15454 -64.59892,161.42858 -144.28573,161.42858 -79.6868,0 -144.28572,-72.27404 -144.28572,-161.42858 0,-89.15454 64.59892,-161.42857 144.28572,-161.42857 79.68681,0 144.28573,72.27403 144.28573,161.42857 z" transform="matrix(0.28877887,0,0,0.25811209,457.84706,214.96137)" /> <path sodipodi:type="arc" style="fill:#ffffff;fill-opacity:1;stroke:#3b3b3b;stroke-width:61.04665375;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:cx="455.71429" sodipodi:cy="513.79077" sodipodi:rx="144.28572" sodipodi:ry="161.42857" d="m 600.00002,513.79077 c 0,89.15454 -64.59892,161.42858 -144.28573,161.42858 -79.6868,0 -144.28572,-72.27404 -144.28572,-161.42858 0,-89.15454 64.59892,-161.42857 144.28572,-161.42857 79.68681,0 144.28573,72.27403 144.28573,161.42857 z" transform="matrix(0.28877887,0,0,0.25811209,-30.152972,219.81853)" /> <g transform="matrix(0.68747304,-0.7262099,0.7262099,0.68747304,0,0)" inkscape:transform-center-x="239.86342" inkscape:transform-center-y="-26.958107" style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#3b3b3b;fill-opacity:1;stroke:none;font-family:Sans" > <path d="m -320.16655,490.61871 33.2,0 -32.4,75.4 0,64.6 -32.2,0 0,-64.6 -32.4,-75.4 33.2,0 15.2,43 15.4,-43 0,0" style="font-size:200px;font-variant:normal;font-stretch:normal;letter-spacing:20px;fill:#3b3b3b;font-family:RR Beaver;-inkscape-font-specification:RR Beaver" /> <path d="m -177.4603,630.61871 -32.2,0 -21.6,-80.4 -21.6,80.4 -32.2,0 37.4,-140 0.4,0 32,0 0.4,0 37.4,140 0,0" style="font-size:200px;font-variant:normal;font-stretch:normal;letter-spacing:20px;fill:#3b3b3b;font-family:RR Beaver;-inkscape-font-specification:RR Beaver" /> <path d="m -84.835303,544.41871 c 5.999926,9e-5 11.59992,1.13342 16.8,3.4 5.19991,2.26675 9.733238,5.40008 13.6,9.4 3.866564,3.86674 6.933228,8.40007 9.2,13.6 2.266556,5.20006 3.399889,10.80005 3.4,16.8 -1.11e-4,6.00004 -1.133444,11.60003 -3.4,16.8 -2.266772,5.20002 -5.333436,9.73335 -9.2,13.6 -3.866762,3.86668 -8.40009,6.93334 -13.6,9.2 -5.20008,2.26667 -10.800074,3.4 -16.8,3.4 l -64.599997,0 0,-32.2 64.599997,0 c 3.066595,-0.1333 5.599926,-1.19996 7.6,-3.2 2.133255,-2.13329 3.199921,-4.66662 3.2,-7.6 -7.9e-5,-3.06662 -1.066745,-5.59995 -3.2,-7.6 -2.000074,-2.13328 -4.533405,-3.19994 -7.6,-3.2 l -21.599997,0 c -6.00004,6e-5 -11.60004,-1.13328 -16.8,-3.4 -5.20003,-2.2666 -9.73336,-5.33327 -13.6,-9.2 -3.86668,-3.99993 -6.93335,-8.59992 -9.2,-13.8 -2.26667,-5.19991 -3.40001,-10.79991 -3.4,-16.8 -10e-6,-5.99989 1.13333,-11.59989 3.4,-16.8 2.26665,-5.19988 5.33332,-9.73321 9.2,-13.6 3.86664,-3.86653 8.39997,-6.9332 13.6,-9.2 5.19996,-2.26652 10.79996,-3.39986 16.8,-3.4 l 42.999997,0 0,32.4 -42.999997,0 c -3.06671,1.1e-4 -5.66671,1.06678 -7.8,3.2 -2.00004,2.00011 -3.00004,4.46677 -3,7.4 -4e-5,3.06676 0.99996,5.66676 3,7.8 2.13329,2.00009 4.73329,3.00009 7.8,3 l 21.599997,0 0,0" style="font-size:200px;font-variant:normal;font-stretch:normal;letter-spacing:20px;fill:#3b3b3b;font-family:RR Beaver;-inkscape-font-specification:RR Beaver" /> </g> <g style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Theorem NBP;-inkscape-font-specification:Theorem NBP" > <path d="m 422.17683,677.02126 36.55,0 -5.44,27.54 -1.87,9.18 c -1.0201,5.10003 -2.94677,9.86003 -5.78,14.28 -2.83343,4.42002 -6.23343,8.27335 -10.2,11.56 -3.85342,3.28667 -8.21675,5.89334 -13.09,7.82 -4.76007,1.92667 -9.69007,2.89 -14.79,2.89 l -18.36,0 c -5.10004,0 -9.69003,-0.96333 -13.77,-2.89 -3.96669,-1.92666 -7.31002,-4.53333 -10.03,-7.82 -2.60668,-3.28665 -4.42002,-7.13998 -5.44,-11.56 -1.02001,-4.41997 -1.02001,-9.17997 0,-14.28 l 9.18,-45.9 c 1.01998,-5.09991 2.94664,-9.85991 5.78,-14.28 2.8333,-4.4199 6.17663,-8.27323 10.03,-11.56 3.96662,-3.28656 8.32995,-5.89322 13.09,-7.82 4.87328,-1.92655 9.85994,-2.88988 14.96,-2.89 l 18.36,0 c 5.09991,1.2e-4 9.63324,0.96345 13.6,2.89 4.0799,1.92678 7.42323,4.53344 10.03,7.82 2.71989,3.28677 4.58989,7.1401 5.61,11.56 1.01988,4.42009 1.01988,9.18009 0,14.28 l -27.37,0 c 0.45325,-2.49325 -9e-5,-4.58991 -1.36,-6.29 -1.36009,-1.81324 -3.34342,-2.71991 -5.95,-2.72 l -18.36,0 c -2.60673,9e-5 -4.98672,0.90676 -7.14,2.72 -2.15339,1.70009 -3.45672,3.79675 -3.91,6.29 l -9.18,45.9 c -0.45337,2.49337 -4e-5,4.6467 1.36,6.46 1.35996,1.81336 3.34329,2.72003 5.95,2.72 l 18.36,0 c 2.6066,3e-5 4.98659,-0.90664 7.14,-2.72 2.15326,-1.8133 3.45659,-3.96663 3.91,-6.46 l 1.87,-9.18 -9.18,0 5.44,-27.54" style="font-size:170px;font-style:italic;font-weight:bold;letter-spacing:20px;fill:#c80000;font-family:RR Beaver;-inkscape-font-specification:RR Beaver Bold Italic" /> <path d="m 569.69808,713.74126 c -1.0201,5.10003 -2.94677,9.86003 -5.78,14.28 -2.83343,4.42002 -6.23343,8.27335 -10.2,11.56 -3.85342,3.28667 -8.21675,5.89334 -13.09,7.82 -4.76007,1.92667 -9.69007,2.89 -14.79,2.89 l -18.36,0 c -5.10004,0 -9.69003,-0.96333 -13.77,-2.89 -3.96669,-1.92666 -7.31002,-4.53333 -10.03,-7.82 -2.60668,-3.28665 -4.42002,-7.13998 -5.44,-11.56 -1.02001,-4.41997 -1.02001,-9.17997 0,-14.28 l 16.49,-82.45 27.37,0 -16.49,82.45 c -0.45337,2.49337 -4e-5,4.6467 1.36,6.46 1.35996,1.81336 3.34329,2.72003 5.95,2.72 l 18.36,0 c 2.6066,3e-5 4.98659,-0.90664 7.14,-2.72 2.15326,-1.8133 3.45659,-3.96663 3.91,-6.46 l 16.49,-82.45 27.37,0 -16.49,82.45" style="font-size:170px;font-style:italic;font-weight:bold;letter-spacing:20px;fill:#c80000;font-family:RR Beaver;-inkscape-font-specification:RR Beaver Bold Italic" /> <path d="m 613.00933,631.29126 27.37,0 -23.8,119 -27.37,0 23.8,-119 0,0" style="font-size:170px;font-style:italic;font-weight:bold;letter-spacing:20px;fill:#c80000;font-family:RR Beaver;-inkscape-font-specification:RR Beaver Bold Italic" /> </g> <path sodipodi:type="arc" style="fill:#ffffff;fill-opacity:1;stroke:#3b3b3b;stroke-width:61.04665375;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:cx="455.71429" sodipodi:cy="513.79077" sodipodi:rx="144.28572" sodipodi:ry="161.42857" d="m 600.00002,513.79077 c 0,89.15454 -64.59892,161.42858 -144.28573,161.42858 -79.6868,0 -144.28572,-72.27404 -144.28572,-161.42858 0,-89.15454 64.59892,-161.42857 144.28572,-161.42857 79.68681,0 144.28573,72.27403 144.28573,161.42857 z" transform="matrix(0.4331683,0,0,0.38716814,381.83246,155.72497)" /> </g></svg>',cross:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g> <path d="M83.288,88.13c-2.114,2.112-5.575,2.112-7.689,0L53.659,66.188c-2.114-2.112-5.573-2.112-7.687,0L24.251,87.907 c-2.113,2.114-5.571,2.114-7.686,0l-4.693-4.691c-2.114-2.114-2.114-5.573,0-7.688l21.719-21.721c2.113-2.114,2.113-5.573,0-7.686 L11.872,24.4c-2.114-2.113-2.114-5.571,0-7.686l4.842-4.842c2.113-2.114,5.571-2.114,7.686,0L46.12,33.591 c2.114,2.114,5.572,2.114,7.688,0l21.721-21.719c2.114-2.114,5.573-2.114,7.687,0l4.695,4.695c2.111,2.113,2.111,5.571-0.003,7.686 L66.188,45.973c-2.112,2.114-2.112,5.573,0,7.686L88.13,75.602c2.112,2.111,2.112,5.572,0,7.687L83.288,88.13z"/></g></svg>',plus:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="5 -10 59.259258 79.999999" enable-background="new 0 0 100 100" xml:space="preserve" height="100%" width="100%" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_79066_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="6.675088" inkscape:cx="46.670641" inkscape:cy="16.037704" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Your_Icon" /><g transform="translate(-23.47037,-20)"><g ><g ><g /></g><g /></g></g><path d="M 67.12963,22.5 H 42.129629 v -25 c 0,-4.142 -3.357,-7.5 -7.5,-7.5 -4.141999,0 -7.5,3.358 -7.5,7.5 v 25 H 2.1296295 c -4.142,0 -7.5,3.358 -7.5,7.5 0,4.143 3.358,7.5 7.5,7.5 H 27.129629 v 25 c 0,4.143 3.358001,7.5 7.5,7.5 4.143,0 7.5,-3.357 7.5,-7.5 v -25 H 67.12963 c 4.143,0 7.5,-3.357 7.5,-7.5 0,-4.142 -3.357,-7.5 -7.5,-7.5 z" inkscape:connector-curvature="0" style="fill:#000000" /></svg>',crossMark:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="3.75 -7.5 43.041089 57.023436" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_96505_cc.svg"> <metadata > <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <defs /> <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="37.14799" inkscape:cy="24.652776" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" /> <g transform="translate(-13.01266,-18.5625)"> <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" d="M 67.335938,21.40625 60.320312,11.0625 C 50.757812,17.542969 43.875,22.636719 38.28125,27.542969 32.691406,22.636719 25.808594,17.546875 16.242188,11.0625 L 9.230469,21.40625 C 18.03125,27.375 24.3125,31.953125 29.398438,36.351562 23.574219,42.90625 18.523438,50.332031 11.339844,61.183594 l 10.421875,6.902344 C 28.515625,57.886719 33.144531,51.046875 38.28125,45.160156 c 5.140625,5.886719 9.765625,12.726563 16.523438,22.925782 L 65.226562,61.183594 C 58.039062,50.335938 52.988281,42.90625 47.167969,36.351562 52.25,31.953125 58.53125,27.375 67.335938,21.40625 z m 0,0" inkscape:connector-curvature="0" /> </g></svg>',checkMark:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="3.75 -7.5 48.269674 56.308594" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_96848_cc.svg"> <metadata > <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <defs /> <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="40.78518" inkscape:cy="24.259259" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" /> <g transform="translate(-9.3300051,-18.878906)"> <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" d="M 27.160156,67.6875 4.632812,45.976562 l 8.675782,-9 11.503906,11.089844 c 7.25,-10.328125 22.84375,-29.992187 40.570312,-36.6875 l 4.414063,11.695313 C 49.894531,30.59375 31.398438,60.710938 31.214844,61.015625 z m 0,0" inkscape:connector-curvature="0" /> </g></svg>',checkCrossMark:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="3.75 -7.5 49.752653 49.990111" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_96848_cc.svg"> <metadata > <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <defs /> <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="41.024355" inkscape:cy="53.698163" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" /> <g transform="matrix(0.59034297,0,0,0.59034297,12.298561,2.5312719)" > <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" d="M 27.160156,67.6875 4.632812,45.976562 l 8.675782,-9 11.503906,11.089844 c 7.25,-10.328125 22.84375,-29.992187 40.570312,-36.6875 l 4.414063,11.695313 C 49.894531,30.59375 31.398438,60.710938 31.214844,61.015625 z m 0,0" inkscape:connector-curvature="0" /> </g> <g transform="matrix(0.46036177,0,0,0.46036177,-0.49935505,-12.592753)" > <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" d="M 67.335938,21.40625 60.320312,11.0625 C 50.757812,17.542969 43.875,22.636719 38.28125,27.542969 32.691406,22.636719 25.808594,17.546875 16.242188,11.0625 L 9.230469,21.40625 C 18.03125,27.375 24.3125,31.953125 29.398438,36.351562 23.574219,42.90625 18.523438,50.332031 11.339844,61.183594 l 10.421875,6.902344 C 28.515625,57.886719 33.144531,51.046875 38.28125,45.160156 c 5.140625,5.886719 9.765625,12.726563 16.523438,22.925782 L 65.226562,61.183594 C 58.039062,50.335938 52.988281,42.90625 47.167969,36.351562 52.25,31.953125 58.53125,27.375 67.335938,21.40625 z m 0,0" inkscape:connector-curvature="0" /> </g></svg>'} },{}],94:[function(e){"use strict";var t=e("jquery"),n=e("selectize"),r=e("yasgui-utils");n.define("allowRegularTextInput",function(){var e=this;this.onMouseDown=function(){var t=e.onMouseDown;return function(n){if(e.$dropdown.is(":visible")){n.stopPropagation();n.preventDefault()}else{t.apply(this,arguments);var r=this.getValue();this.clear(!0);this.setTextboxValue(r);this.refreshOptions(!0)}}}()});t.fn.endpointCombi=function(e,n){var o=function(n){e.corsEnabled||(e.corsEnabled={});n in e.corsEnabled||t.ajax({url:n,data:{query:"ASK {?x ?y ?z}"},complete:function(t){e.corsEnabled[n]=t.status>0}})},s=function(t){var n=null;e.persistencyPrefix&&(n=e.persistencyPrefix+"endpoint_"+t);var i=[];for(var o in l[0].selectize.options){var s=l[0].selectize.options[o];if(s.optgroup==t){var a={endpoint:s.endpoint};s.text&&(a.label=s.text);i.push(a)}}r.storage.set(n,i)},a=function(t,n){var o=null;e.persistencyPrefix&&(o=e.persistencyPrefix+"endpoint_"+n);var s=r.storage.get(o);if(!s&&"catalogue"==n){s=i();r.storage.set(o,s)}t(s,n)},l=this,u={selectize:{plugins:["allowRegularTextInput"],create:function(e,t){t({endpoint:e,optgroup:"own"})},createOnBlur:!0,onItemAdd:function(t){n.onChange&&n.onChange(t);e.options.api.corsProxy&&o(t)},onOptionRemove:function(){s("own");s("catalogue")},optgroups:[{value:"own",label:"History"},{value:"catalogue",label:"Catalogue"}],optgroupOrder:["own","catalogue"],sortField:"endpoint",valueField:"endpoint",labelField:"endpoint",searchField:["endpoint","text"],render:{option:function(e,t){var n='<a href="javascript:void(0)" class="close pull-right" tabindex="-1" title="Remove from '+("own"==e.optgroup?"history":"catalogue")+'">&times;</a>',r='<div class="endpointUrl">'+t(e.endpoint)+"</div>",i="";e.text&&(i='<div class="endpointTitle">'+t(e.text)+"</div>");return'<div class="endpointOptionRow">'+n+r+i+"</div>"}}}};n=n?t.extend(!0,{},u,n):u;this.addClass("endpointText form-control");this.selectize(n.selectize);l[0].selectize.$dropdown.off("mousedown","[data-selectable]");l[0].selectize.$dropdown.on("mousedown","[data-selectable]",function(e){var n,r,i=l[0].selectize;if(e.preventDefault){e.preventDefault();e.stopPropagation()}r=t(e.currentTarget);if(t(e.target).hasClass("close")){l[0].selectize.removeOption(r.attr("data-value"));l[0].selectize.refreshOptions()}else if(r.hasClass("create"))i.createItem();else{n=r.attr("data-value");if("undefined"!=typeof n){i.lastQuery=null;i.setTextboxValue("");i.addItem(n);!i.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&i.setActiveOption(i.getOption(n))}}});var c=function(e,t){t.optgroup&&s(t.optgroup)},p=function(e,t){if(e){l[0].selectize.off("option_add",c);e.forEach(function(e){l[0].selectize.addOption({endpoint:e.endpoint,text:e.title,optgroup:t})});l[0].selectize.on("option_add",c)}};a(p,"catalogue");a(p,"own");if(n.value){n.value in l[0].selectize.options||l[0].selectize.addOption({endpoint:n.value,optgroup:"own"});l[0].selectize.addItem(n.value)}return this};var i=function(){var e=[{endpoint:"http%3A%2F%2Fvisualdataweb.infor.uva.es%2Fsparql"},{endpoint:"http%3A%2F%2Fbiolit.rkbexplorer.com%2Fsparql",title:"A Short Biographical Dictionary of English Literature (RKBExplorer)"},{endpoint:"http%3A%2F%2Faemet.linkeddata.es%2Fsparql",title:"AEMET metereological dataset"},{endpoint:"http%3A%2F%2Fsparql.jesandco.org%3A8890%2Fsparql",title:"ASN:US"},{endpoint:"http%3A%2F%2Fdata.allie.dbcls.jp%2Fsparql",title:"Allie Abbreviation And Long Form Database in Life Science"},{endpoint:"http%3A%2F%2Fvocabulary.semantic-web.at%2FPoolParty%2Fsparql%2FAustrianSkiTeam",title:"Alpine Ski Racers of Austria"},{endpoint:"http%3A%2F%2Fsemanticweb.cs.vu.nl%2Feuropeana%2Fsparql%2F",title:"Amsterdam Museum as Linked Open Data in the Europeana Data Model"},{endpoint:"http%3A%2F%2Fopendata.aragon.es%2Fsparql",title:"AragoDBPedia"},{endpoint:"http%3A%2F%2Fdata.archiveshub.ac.uk%2Fsparql",title:"Archives Hub Linked Data"},{endpoint:"http%3A%2F%2Fwww.auth.gr%2Fsparql",title:"Aristotle University"},{endpoint:"http%3A%2F%2Facm.rkbexplorer.com%2Fsparql%2F",title:"Association for Computing Machinery (ACM) (RKBExplorer)"},{endpoint:"http%3A%2F%2Fabs.270a.info%2Fsparql",title:"Australian Bureau of Statistics (ABS) Linked Data"},{endpoint:"http%3A%2F%2Flab.environment.data.gov.au%2Fsparql",title:"Australian Climate Observations Reference Network - Surface Air Temperature Dataset"},{endpoint:"http%3A%2F%2Flod.b3kat.de%2Fsparql",title:"B3Kat - Library Union Catalogues of Bavaria, Berlin and Brandenburg"},{endpoint:"http%3A%2F%2Fdati.camera.it%2Fsparql"},{endpoint:"http%3A%2F%2Fbis.270a.info%2Fsparql",title:"Bank for International Settlements (BIS) Linked Data"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Fbdgp_20081030",title:"Bdgp"},{endpoint:"http%3A%2F%2Faffymetrix.bio2rdf.org%2Fsparql",title:"Bio2RDF::Affymetrix"},{endpoint:"http%3A%2F%2Fbiomodels.bio2rdf.org%2Fsparql",title:"Bio2RDF::Biomodels"},{endpoint:"http%3A%2F%2Fbioportal.bio2rdf.org%2Fsparql",title:"Bio2RDF::Bioportal"},{endpoint:"http%3A%2F%2Fclinicaltrials.bio2rdf.org%2Fsparql",title:"Bio2RDF::Clinicaltrials"},{endpoint:"http%3A%2F%2Fctd.bio2rdf.org%2Fsparql",title:"Bio2RDF::Ctd"},{endpoint:"http%3A%2F%2Fdbsnp.bio2rdf.org%2Fsparql",title:"Bio2RDF::Dbsnp"},{endpoint:"http%3A%2F%2Fdrugbank.bio2rdf.org%2Fsparql",title:"Bio2RDF::Drugbank"},{endpoint:"http%3A%2F%2Fgenage.bio2rdf.org%2Fsparql",title:"Bio2RDF::Genage"},{endpoint:"http%3A%2F%2Fgendr.bio2rdf.org%2Fsparql",title:"Bio2RDF::Gendr"},{endpoint:"http%3A%2F%2Fgoa.bio2rdf.org%2Fsparql",title:"Bio2RDF::Goa"},{endpoint:"http%3A%2F%2Fhgnc.bio2rdf.org%2Fsparql",title:"Bio2RDF::Hgnc"},{endpoint:"http%3A%2F%2Fhomologene.bio2rdf.org%2Fsparql",title:"Bio2RDF::Homologene"},{endpoint:"http%3A%2F%2Finoh.bio2rdf.org%2Fsparql",title:"Bio2RDF::INOH"},{endpoint:"http%3A%2F%2Finterpro.bio2rdf.org%2Fsparql",title:"Bio2RDF::Interpro"},{endpoint:"http%3A%2F%2Fiproclass.bio2rdf.org%2Fsparql",title:"Bio2RDF::Iproclass"},{endpoint:"http%3A%2F%2Firefindex.bio2rdf.org%2Fsparql",title:"Bio2RDF::Irefindex"},{endpoint:"http%3A%2F%2Fbiopax.kegg.bio2rdf.org%2Fsparql",title:"Bio2RDF::KEGG::BioPAX"},{endpoint:"http%3A%2F%2Flinkedspl.bio2rdf.org%2Fsparql",title:"Bio2RDF::Linkedspl"},{endpoint:"http%3A%2F%2Flsr.bio2rdf.org%2Fsparql",title:"Bio2RDF::Lsr"},{endpoint:"http%3A%2F%2Fmesh.bio2rdf.org%2Fsparql",title:"Bio2RDF::Mesh"},{endpoint:"http%3A%2F%2Fmgi.bio2rdf.org%2Fsparql",title:"Bio2RDF::Mgi"},{endpoint:"http%3A%2F%2Fncbigene.bio2rdf.org%2Fsparql",title:"Bio2RDF::Ncbigene"},{endpoint:"http%3A%2F%2Fndc.bio2rdf.org%2Fsparql",title:"Bio2RDF::Ndc"},{endpoint:"http%3A%2F%2Fnetpath.bio2rdf.org%2Fsparql",title:"Bio2RDF::NetPath"},{endpoint:"http%3A%2F%2Fomim.bio2rdf.org%2Fsparql",title:"Bio2RDF::Omim"},{endpoint:"http%3A%2F%2Forphanet.bio2rdf.org%2Fsparql",title:"Bio2RDF::Orphanet"},{endpoint:"http%3A%2F%2Fpid.bio2rdf.org%2Fsparql",title:"Bio2RDF::PID"},{endpoint:"http%3A%2F%2Fbiopax.pharmgkb.bio2rdf.org%2Fsparql",title:"Bio2RDF::PharmGKB::BioPAX"},{endpoint:"http%3A%2F%2Fpharmgkb.bio2rdf.org%2Fsparql",title:"Bio2RDF::Pharmgkb"},{endpoint:"http%3A%2F%2Fpubchem.bio2rdf.org%2Fsparql",title:"Bio2RDF::PubChem"},{endpoint:"http%3A%2F%2Frhea.bio2rdf.org%2Fsparql",title:"Bio2RDF::Rhea"},{endpoint:"http%3A%2F%2Fspike.bio2rdf.org%2Fsparql",title:"Bio2RDF::SPIKE"},{endpoint:"http%3A%2F%2Fsabiork.bio2rdf.org%2Fsparql",title:"Bio2RDF::Sabiork"},{endpoint:"http%3A%2F%2Fsgd.bio2rdf.org%2Fsparql",title:"Bio2RDF::Sgd"},{endpoint:"http%3A%2F%2Fsider.bio2rdf.org%2Fsparql",title:"Bio2RDF::Sider"},{endpoint:"http%3A%2F%2Ftaxonomy.bio2rdf.org%2Fsparql",title:"Bio2RDF::Taxonomy"},{endpoint:"http%3A%2F%2Fwikipathways.bio2rdf.org%2Fsparql",title:"Bio2RDF::Wikipathways"},{endpoint:"http%3A%2F%2Fwormbase.bio2rdf.org%2Fsparql",title:"Bio2RDF::Wormbase"},{endpoint:"https%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fbiomodels%2Fsparql",title:"BioModels RDF"},{endpoint:"https%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fbiosamples%2Fsparql",title:"BioSamples RDF"},{endpoint:"http%3A%2F%2Fhelheim.deusto.es%2Fbizkaisense%2Fsparql",title:"BizkaiSense"},{endpoint:"http%3A%2F%2Fbnb.data.bl.uk%2Fsparql"},{endpoint:"http%3A%2F%2Fbudapest.rkbexplorer.com%2Fsparql%2F",title:"Budapest University of Technology and Economics (RKBExplorer)"},{endpoint:"http%3A%2F%2Fbfs.270a.info%2Fsparql",title:"Bundesamt für Statistik (BFS) - Swiss Federal Statistical Office (FSO) Linked Data"},{endpoint:"http%3A%2F%2Fopendata-bundestag.de%2Fsparql",title:"BundestagNebeneinkuenfte"},{endpoint:"http%3A%2F%2Fdata.colinda.org%2Fendpoint.php",title:"COLINDA - Conference Linked Data"},{endpoint:"http%3A%2F%2Fcrtm.linkeddata.es%2Fsparql",title:"CRTM"},{endpoint:"http%3A%2F%2Fdata.fundacionctic.org%2Fsparql",title:"CTIC Public Dataset Catalogs"},{endpoint:"https%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fchembl%2Fsparql",title:"ChEMBL RDF"},{endpoint:"http%3A%2F%2Fchebi.bio2rdf.org%2Fsparql",title:"Chemical Entities of Biological Interest (ChEBI)"},{endpoint:"http%3A%2F%2Fciteseer.rkbexplorer.com%2Fsparql%2F",title:"CiteSeer (Research Index) (RKBExplorer)"},{endpoint:"http%3A%2F%2Fcordis.rkbexplorer.com%2Fsparql%2F",title:"Community R&amp;D Information Service (CORDIS) (RKBExplorer)"},{endpoint:"http%3A%2F%2Fsemantic.ckan.net%2Fsparql%2F",title:"Comprehensive Knowledge Archive Network"},{endpoint:"http%3A%2F%2Fvocabulary.wolterskluwer.de%2FPoolParty%2Fsparql%2Fcourt",title:"Courts thesaurus"},{endpoint:"http%3A%2F%2Fcultura.linkeddata.es%2Fsparql",title:"CulturaLinkedData"},{endpoint:"http%3A%2F%2Fdblp.rkbexplorer.com%2Fsparql%2F",title:"DBLP Computer Science Bibliography (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdblp.l3s.de%2Fd2r%2Fsparql",title:"DBLP in RDF (L3S)"},{endpoint:"http%3A%2F%2Fdbtune.org%2Fmusicbrainz%2Fsparql",title:"DBTune.org Musicbrainz D2R Server"},{endpoint:"http%3A%2F%2Fdbpedia.org%2Fsparql",title:"DBpedia"},{endpoint:"http%3A%2F%2Feu.dbpedia.org%2Fsparql",title:"DBpedia in Basque"},{endpoint:"http%3A%2F%2Fnl.dbpedia.org%2Fsparql",title:"DBpedia in Dutch"},{endpoint:"http%3A%2F%2Ffr.dbpedia.org%2Fsparql",title:"DBpedia in French"},{endpoint:"http%3A%2F%2Fde.dbpedia.org%2Fsparql",title:"DBpedia in German"},{endpoint:"http%3A%2F%2Fja.dbpedia.org%2Fsparql",title:"DBpedia in Japanese"},{endpoint:"http%3A%2F%2Fpt.dbpedia.org%2Fsparql",title:"DBpedia in Portuguese"},{endpoint:"http%3A%2F%2Fes.dbpedia.org%2Fsparql",title:"DBpedia in Spanish"},{endpoint:"http%3A%2F%2Flive.dbpedia.org%2Fsparql",title:"DBpedia-Live"},{endpoint:"http%3A%2F%2Fdeploy.rkbexplorer.com%2Fsparql%2F",title:"DEPLOY (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdata.ox.ac.uk%2Fsparql%2F"},{endpoint:"http%3A%2F%2Fdatos.bcn.cl%2Fsparql",title:"Datos.bcn.cl"},{endpoint:"http%3A%2F%2Fdeepblue.rkbexplorer.com%2Fsparql%2F",title:"Deep Blue (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdewey.info%2Fsparql.php",title:"Dewey Decimal Classification (DDC)"},{endpoint:"http%3A%2F%2Frdf.disgenet.org%2Fsparql%2F",title:"DisGeNET"},{endpoint:"http%3A%2F%2Fitaly.rkbexplorer.com%2Fsparql",title:"Diverse Italian ReSIST Partner Institutions (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdutchshipsandsailors.nl%2Fdata%2Fsparql%2F",title:"Dutch Ships and Sailors "},{endpoint:"http%3A%2F%2Fsemanticweb.cs.vu.nl%2Fdss%2Fsparql%2F",title:"Dutch Ships and Sailors "},{endpoint:"http%3A%2F%2Fwww.eclap.eu%2Fsparql",title:"ECLAP"},{endpoint:"http%3A%2F%2Fcr.eionet.europa.eu%2Fsparql"},{endpoint:"http%3A%2F%2Fera.rkbexplorer.com%2Fsparql%2F",title:"ERA - Australian Research Council publication ratings (RKBExplorer)"},{endpoint:"http%3A%2F%2Fkent.zpr.fer.hr%3A8080%2FeducationalProgram%2Fsparql",title:"Educational programs - SISVU"},{endpoint:"http%3A%2F%2Fwebenemasuno.linkeddata.es%2Fsparql",title:"El Viajero's tourism dataset"},{endpoint:"http%3A%2F%2Fwww.ida.liu.se%2Fprojects%2Fsemtech%2Fopenrdf-sesame%2Frepositories%2Fenergy",title:"Energy efficiency assessments and improvements"},{endpoint:"http%3A%2F%2Fheritagedata.org%2Flive%2Fsparql"},{endpoint:"http%3A%2F%2Fenipedia.tudelft.nl%2Fsparql",title:"Enipedia - Energy Industry Data"},{endpoint:"http%3A%2F%2Fenvironment.data.gov.uk%2Fsparql%2Fbwq%2Fquery",title:"Environment Agency Bathing Water Quality"},{endpoint:"http%3A%2F%2Fecb.270a.info%2Fsparql",title:"European Central Bank (ECB) Linked Data"},{endpoint:"http%3A%2F%2Fsemantic.eea.europa.eu%2Fsparql"},{endpoint:"http%3A%2F%2Feuropeana.ontotext.com%2Fsparql"},{endpoint:"http%3A%2F%2Feventmedia.eurecom.fr%2Fsparql",title:"EventMedia"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fforge%2Fquery",title:"FORGE Course information"},{endpoint:"http%3A%2F%2Ffactforge.net%2Fsparql",title:"Fact Forge"},{endpoint:"http%3A%2F%2Flogd.tw.rpi.edu%2Fsparql"},{endpoint:"http%3A%2F%2Ffrb.270a.info%2Fsparql",title:"Federal Reserve Board (FRB) Linked Data"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Fflybase",title:"Flybase"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Fflyted",title:"Flyted"},{endpoint:"http%3A%2F%2Ffao.270a.info%2Fsparql",title:"Food and Agriculture Organization of the United Nations (FAO) Linked Data"},{endpoint:"http%3A%2F%2Fft.rkbexplorer.com%2Fsparql%2F",title:"France Telecom Recherche et Développement (RKBExplorer)"},{endpoint:"http%3A%2F%2Flisbon.rkbexplorer.com%2Fsparql",title:"Fundação da Faculdade de Ciencas da Universidade de Lisboa (RKBExplorer)"},{endpoint:"http%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fatlas%2Fsparql",title:"Gene Expression Atlas RDF"},{endpoint:"http%3A%2F%2Fgeo.linkeddata.es%2Fsparql",title:"GeoLinkedData"},{endpoint:"http%3A%2F%2Fresource.geolba.ac.at%2FPoolParty%2Fsparql%2FGeologicTimeScale",title:"Geological Survey of Austria (GBA) - Thesaurus"},{endpoint:"http%3A%2F%2Fresource.geolba.ac.at%2FPoolParty%2Fsparql%2FGeologicUnit",title:"Geological Survey of Austria (GBA) - Thesaurus"},{endpoint:"http%3A%2F%2Fresource.geolba.ac.at%2FPoolParty%2Fsparql%2Flithology",title:"Geological Survey of Austria (GBA) - Thesaurus"},{endpoint:"http%3A%2F%2Fresource.geolba.ac.at%2FPoolParty%2Fsparql%2Ftectonicunit",title:"Geological Survey of Austria (GBA) - Thesaurus"},{endpoint:"http%3A%2F%2Fvocabulary.wolterskluwer.de%2FPoolParty%2Fsparql%2Farbeitsrecht",title:"German labor law thesaurus"},{endpoint:"http%3A%2F%2Fdata.globalchange.gov%2Fsparql",title:"Global Change Information System"},{endpoint:"http%3A%2F%2Fwordnet.okfn.gr%3A8890%2Fsparql%2F",title:"Greek Wordnet"},{endpoint:"http%3A%2F%2Flod.hebis.de%2Fsparql",title:"HeBIS - Bibliographic Resources of the Library Union Catalogues of Hessen and parts of the Rhineland Palatinate"},{endpoint:"http%3A%2F%2Fhealthdata.tw.rpi.edu%2Fsparql",title:"HealthData.gov Platform (HDP) on the Semantic Web"},{endpoint:"http%3A%2F%2Fhelheim.deusto.es%2Fhedatuz%2Fsparql",title:"Hedatuz"},{endpoint:"http%3A%2F%2Fgreek-lod.auth.gr%2Ffire-brigade%2Fsparql",title:"Hellenic Fire Brigade"},{endpoint:"http%3A%2F%2Fgreek-lod.auth.gr%2Fpolice%2Fsparql",title:"Hellenic Police"},{endpoint:"http%3A%2F%2Fsetaria.oszk.hu%2Fsparql",title:"Hungarian National Library (NSZL) catalog"},{endpoint:"http%3A%2F%2Fsemanticweb.cs.vu.nl%2Fiati%2Fsparql%2F",title:"IATI as Linked Data"},{endpoint:"http%3A%2F%2Fibm.rkbexplorer.com%2Fsparql%2F",title:"IBM Research GmbH (RKBExplorer)"},{endpoint:"http%3A%2F%2Fwww.icane.es%2Fopendata%2Fsparql",title:"ICANE"},{endpoint:"http%3A%2F%2Fieee.rkbexplorer.com%2Fsparql%2F",title:"IEEE Papers (RKBExplorer)"},{endpoint:"http%3A%2F%2Fieeevis.tw.rpi.edu%2Fsparql",title:"IEEE VIS Source Data"},{endpoint:"http%3A%2F%2Fwww.imagesnippets.com%2Fsparql%2Fimages",title:"Imagesnippets Image Descriptions"},{endpoint:"http%3A%2F%2Fopendatacommunities.org%2Fsparql"},{endpoint:"http%3A%2F%2Fpurl.org%2Ftwc%2Fhub%2Fsparql",title:"Instance Hub (all)"},{endpoint:"http%3A%2F%2Feurecom.rkbexplorer.com%2Fsparql%2F",title:"Institut Eurécom (RKBExplorer)"},{endpoint:"http%3A%2F%2Fimf.270a.info%2Fsparql",title:"International Monetary Fund (IMF) Linked Data"},{endpoint:"http%3A%2F%2Fwww.rechercheisidore.fr%2Fsparql",title:"Isidore"},{endpoint:"http%3A%2F%2Fsparql.kupkb.org%2Fsparql",title:"Kidney and Urinary Pathway Knowledge Base"},{endpoint:"http%3A%2F%2Fkisti.rkbexplorer.com%2Fsparql%2F",title:"Korean Institute of Science Technology and Information (RKBExplorer)"},{endpoint:"http%3A%2F%2Flod.kaist.ac.kr%2Fsparql",title:"Korean Traditional Recipes"},{endpoint:"http%3A%2F%2Flaas.rkbexplorer.com%2Fsparql%2F",title:"LAAS-CNRS (RKBExplorer)"},{endpoint:"http%3A%2F%2Fsmartcity.linkeddata.es%2Fsparql",title:"LCC (Leeds City Council Energy Consumption Linked Data)"},{endpoint:"http%3A%2F%2Flod.ac%2Fbdls%2Fsparql",title:"LODAC BDLS"},{endpoint:"http%3A%2F%2Fdata.linkededucation.org%2Frequest%2Flak-conference%2Fsparql",title:"Learning Analytics and Knowledge (LAK) Dataset"},{endpoint:"http%3A%2F%2Fwww.linklion.org%3A8890%2Fsparql",title:"LinkLion - A Link Repository for the Web of Data"},{endpoint:"http%3A%2F%2Fsparql.reegle.info%2F",title:"Linked Clean Energy Data (reegle.info)"},{endpoint:"http%3A%2F%2Fsparql.contextdatacloud.org",title:"Linked Crowdsourced Data"},{endpoint:"http%3A%2F%2Flinkedlifedata.com%2Fsparql",title:"Linked Life Data"},{endpoint:"http%3A%2F%2Fdata.logainm.ie%2Fsparql",title:"Linked Logainm"},{endpoint:"http%3A%2F%2Fdata.linkedmdb.org%2Fsparql",title:"Linked Movie DataBase"},{endpoint:"http%3A%2F%2Fdata.aalto.fi%2Fsparql",title:"Linked Open Aalto Data Service"},{endpoint:"http%3A%2F%2Fdbmi-icode-01.dbmi.pitt.edu%2FlinkedSPLs%2Fsparql",title:"Linked Structured Product Labels"},{endpoint:"http%3A%2F%2Flinkedgeodata.org%2Fsparql%2F",title:"LinkedGeoData"},{endpoint:"http%3A%2F%2Flinkedspending.aksw.org%2Fsparql",title:"LinkedSpending: OpenSpending becomes Linked Open Data"},{endpoint:"http%3A%2F%2Fhelheim.deusto.es%2Flinkedstats%2Fsparql",title:"LinkedStats"},{endpoint:"http%3A%2F%2Flinkedu.eu%2Fcatalogue%2Fsparql%2F",title:"LinkedUp Catalogue of Educational Datasets"},{endpoint:"http%3A%2F%2Fid.sgcb.mcu.es%2Fsparql",title:"Lista de Encabezamientos de Materia as Linked Open Data"},{endpoint:"http%3A%2F%2Fonto.mondis.cz%2Fopenrdf-sesame%2Frepositories%2Fmondis-record-owlim",title:"MONDIS"},{endpoint:"http%3A%2F%2Fapps.morelab.deusto.es%2Flabman%2Fsparql",title:"MORElab"},{endpoint:"http%3A%2F%2Fsparql.msc2010.org",title:"Mathematics Subject Classification"},{endpoint:"http%3A%2F%2Fdoc.metalex.eu%3A8000%2Fsparql%2F",title:"MetaLex Document Server"},{endpoint:"http%3A%2F%2Frdf.muninn-project.org%2Fsparql",title:"Muninn World War I"},{endpoint:"http%3A%2F%2Flod.sztaki.hu%2Fsparql",title:"National Digital Data Archive of Hungary (partial)"},{endpoint:"http%3A%2F%2Fnsf.rkbexplorer.com%2Fsparql%2F",title:"National Science Foundation (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdata.nobelprize.org%2Fsparql",title:"Nobel Prizes"},{endpoint:"http%3A%2F%2Fdata.lenka.no%2Fsparql",title:"Norwegian geo-divisions"},{endpoint:"http%3A%2F%2Fspatial.ucd.ie%2Flod%2Fsparql",title:"OSM Semantic Network"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fdon%2Fquery",title:"OUNL DSpace in RDF"},{endpoint:"http%3A%2F%2Fdata.oceandrilling.org%2Fsparql"},{endpoint:"http%3A%2F%2Fonto.beef.org.pl%2Fsparql",title:"OntoBeef"},{endpoint:"http%3A%2F%2Foai.rkbexplorer.com%2Fsparql%2F",title:"Open Archive Initiative Harvest over OAI-PMH (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Focw%2Fquery",title:"Open Courseware Consortium metadata in RDF"},{endpoint:"http%3A%2F%2Fopendata.ccd.uniroma2.it%2FLMF%2Fsparql%2Fselect",title:"Open Data @ Tor Vergata"},{endpoint:"http%3A%2F%2Fvocabulary.semantic-web.at%2FPoolParty%2Fsparql%2FOpenData",title:"Open Data Thesaurus"},{endpoint:"http%3A%2F%2Fdata.cnr.it%2Fsparql-proxy%2F",title:"Open Data from the Italian National Research Council"},{endpoint:"http%3A%2F%2Fdata.utpl.edu.ec%2Fecuadorresearch%2Flod%2Fsparql",title:"Open Data of Ecuador"},{endpoint:"http%3A%2F%2Fen.openei.org%2Fsparql",title:"OpenEI - Open Energy Info"},{endpoint:"http%3A%2F%2Flod.openlinksw.com%2Fsparql",title:"OpenLink Software LOD Cache"},{endpoint:"http%3A%2F%2Fsparql.openmobilenetwork.org",title:"OpenMobileNetwork"},{endpoint:"http%3A%2F%2Fapps.ideaconsult.net%3A8080%2Fontology",title:"OpenTox"},{endpoint:"http%3A%2F%2Fgov.tso.co.uk%2Fcoins%2Fsparql",title:"OpenUpLabs COINS"},{endpoint:"http%3A%2F%2Fgov.tso.co.uk%2Fdclg%2Fsparql",title:"OpenUpLabs DCLG"},{endpoint:"http%3A%2F%2Fos.services.tso.co.uk%2Fgeo%2Fsparql",title:"OpenUpLabs Geographic"},{endpoint:"http%3A%2F%2Fgov.tso.co.uk%2Flegislation%2Fsparql",title:"OpenUpLabs Legislation"},{endpoint:"http%3A%2F%2Fgov.tso.co.uk%2Ftransport%2Fsparql",title:"OpenUpLabs Transport"},{endpoint:"http%3A%2F%2Fos.rkbexplorer.com%2Fsparql%2F",title:"Ordnance Survey (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdata.organic-edunet.eu%2Fsparql",title:"Organic Edunet Linked Open Data"},{endpoint:"http%3A%2F%2Foecd.270a.info%2Fsparql",title:"Organisation for Economic Co-operation and Development (OECD) Linked Data"},{endpoint:"https%3A%2F%2Fdata.ox.ac.uk%2Fsparql%2F",title:"OxPoints (University of Oxford)"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fprod%2Fquery",title:"PROD - JISC Project Directory in RDF"},{endpoint:"http%3A%2F%2Fld.panlex.org%2Fsparql",title:"PanLex"},{endpoint:"http%3A%2F%2Flinked-data.org%2Fsparql",title:"Phonetics Information Base and Lexicon (PHOIBLE)"},{endpoint:"http%3A%2F%2Flinked.opendata.cz%2Fsparql",title:"Publications of Charles University in Prague"},{endpoint:"http%3A%2F%2Flinkeddata4.dia.fi.upm.es%3A8907%2Fsparql",title:"RDFLicense"},{endpoint:"http%3A%2F%2Frisks.rkbexplorer.com%2Fsparql%2F",title:"RISKS Digest (RKBExplorer)"},{endpoint:"http%3A%2F%2Fruian.linked.opendata.cz%2Fsparql",title:"RUIAN - Register of territorial identification, addresses and real estates of the Czech Republic"},{endpoint:"http%3A%2F%2Fcurriculum.rkbexplorer.com%2Fsparql%2F",title:"ReSIST MSc in Resilient Computing Curriculum (RKBExplorer)"},{endpoint:"http%3A%2F%2Fwiki.rkbexplorer.com%2Fsparql%2F",title:"ReSIST Project Wiki (RKBExplorer)"},{endpoint:"http%3A%2F%2Fresex.rkbexplorer.com%2Fsparql%2F",title:"ReSIST Resilience Mechanisms (RKBExplorer.com)"},{endpoint:"https%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Freactome%2Fsparql",title:"Reactome RDF"},{endpoint:"http%3A%2F%2Flod.xdams.org%2Fsparql"},{endpoint:"http%3A%2F%2Frae2001.rkbexplorer.com%2Fsparql%2F",title:"Research Assessment Exercise 2001 (RKBExplorer)"},{endpoint:"http%3A%2F%2Fcourseware.rkbexplorer.com%2Fsparql%2F",title:"Resilient Computing Courseware (RKBExplorer)"},{endpoint:"http%3A%2F%2Flink.informatics.stonybrook.edu%2Fsparql%2F",title:"RxNorm"},{endpoint:"http%3A%2F%2Fdata.rism.info%2Fsparql"},{endpoint:"http%3A%2F%2Fbiordf.net%2Fsparql",title:"SADI Semantic Web Services framework registry"},{endpoint:"http%3A%2F%2Fseek.rkbexplorer.com%2Fsparql%2F",title:"SEEK-AT-WD ICT tools for education - Web-Share"},{endpoint:"http%3A%2F%2Fzbw.eu%2Fbeta%2Fsparql%2Fstw%2Fquery",title:"STW Thesaurus for Economics"},{endpoint:"http%3A%2F%2Fsouthampton.rkbexplorer.com%2Fsparql%2F",title:"School of Electronics and Computer Science, University of Southampton (RKBExplorer)"},{endpoint:"http%3A%2F%2Fserendipity.utpl.edu.ec%2Flod%2Fsparql",title:"Serendipity"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fslidewiki%2Fquery",title:"Slidewiki (RDF/SPARQL)"},{endpoint:"http%3A%2F%2Fsmartlink.open.ac.uk%2Fsmartlink%2Fsparql",title:"SmartLink: Linked Services Non-Functional Properties"},{endpoint:"http%3A%2F%2Fsocialarchive.iath.virginia.edu%2Fsparql%2Feac",title:"Social Networks and Archival Context Fall 2011"},{endpoint:"http%3A%2F%2Fsocialarchive.iath.virginia.edu%2Fsparql%2Fsnac-viaf",title:"Social Networks and Archival Context Fall 2011"},{endpoint:"http%3A%2F%2Fvocabulary.semantic-web.at%2FPoolParty%2Fsparql%2Fsemweb",title:"Social Semantic Web Thesaurus"},{endpoint:"http%3A%2F%2Flinguistic.linkeddata.es%2Fsparql",title:"Spanish Linguistic Datasets"},{endpoint:"http%3A%2F%2Fcrashmap.okfn.gr%3A8890%2Fsparql",title:"Statistics on Fatal Traffic Accidents in greek roads"},{endpoint:"http%3A%2F%2Fcrime.rkbexplorer.com%2Fsparql%2F",title:"Street level crime reports for England and Wales"},{endpoint:"http%3A%2F%2Fsymbolicdata.org%3A8890%2Fsparql",title:"SymbolicData"},{endpoint:"http%3A%2F%2Fagalpha.mathbiol.org%2Frepositories%2Ftcga",title:"TCGA Roadmap"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Ftcm",title:"TCMGeneDIT Dataset"},{endpoint:"http%3A%2F%2Fdata.linkededucation.org%2Frequest%2Fted%2Fsparql",title:"TED Talks"},{endpoint:"http%3A%2F%2Fdarmstadt.rkbexplorer.com%2Fsparql%2F",title:"Technische Universität Darmstadt (RKBExplorer)"},{endpoint:"http%3A%2F%2Flinguistic.linkeddata.es%2Fterminesp%2Fsparql-editor",title:"Terminesp Linked Data"},{endpoint:"http%3A%2F%2Facademia6.poolparty.biz%2FPoolParty%2Fsparql%2FTesauro-Materias-BUPM",title:"Tesauro materias BUPM"},{endpoint:"http%3A%2F%2Fapps.morelab.deusto.es%2Fteseo%2Fsparql",title:"Teseo"},{endpoint:"http%3A%2F%2Flinkeddata.ge.imati.cnr.it%3A8890%2Fsparql",title:"ThIST"},{endpoint:"http%3A%2F%2Fring.ciard.net%2Fsparql1",title:"The CIARD RING"},{endpoint:"http%3A%2F%2Fvocab.getty.edu%2Fsparql"},{endpoint:"http%3A%2F%2Flod.gesis.org%2Fthesoz%2Fsparql",title:"TheSoz Thesaurus for the Social Sciences (GESIS)"},{endpoint:"http%3A%2F%2Fdigitale.bncf.firenze.sbn.it%2Fopenrdf-workbench%2Frepositories%2FNS%2Fquery",title:"Thesaurus BNCF"},{endpoint:"http%3A%2F%2Ftour-pedia.org%2Fsparql",title:"Tourpedia"},{endpoint:"http%3A%2F%2Ftkm.kiom.re.kr%2Fontology%2Fsparql",title:"Traditional Korean Medicine Ontology"},{endpoint:"http%3A%2F%2Ftransparency.270a.info%2Fsparql",title:"Transparency International Linked Data"},{endpoint:"http%3A%2F%2Fjisc.rkbexplorer.com%2Fsparql%2F",title:"UK JISC (RKBExplorer)"},{endpoint:"http%3A%2F%2Funlocode.rkbexplorer.com%2Fsparql%2F",title:"UN/LOCODE (RKBExplorer)"},{endpoint:"http%3A%2F%2Fuis.270a.info%2Fsparql",title:"UNESCO Institute for Statistics (UIS) Linked Data"},{endpoint:"http%3A%2F%2Fskos.um.es%2Fsparql%2F",title:"UNESCO Thesaurus"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fkis1112%2Fquery",title:"UNISTAT-KIS 2011/2012 in RDF (Key Information Set - UK Universities)"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fkis%2Fquery",title:"UNISTAT-KIS in RDF (Key Information Set - UK Universities)"},{endpoint:"http%3A%2F%2Flinkeddata.uriburner.com%2Fsparql",title:"URIBurner"},{endpoint:"http%3A%2F%2Fbeta.sparql.uniprot.org"},{endpoint:"http%3A%2F%2Fdata.utpl.edu.ec%2Futpl%2Flod%2Fsparql",title:"Universidad Técnica Particular de Loja - Linked Open Data"},{endpoint:"http%3A%2F%2Fresrev.ilrt.bris.ac.uk%2Fdata-server-workshop%2Fsparql",title:"University of Bristol"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fhud%2Fquery",title:"University of Huddersfield -- Circulation and Recommendation Data"},{endpoint:"http%3A%2F%2Fnewcastle.rkbexplorer.com%2Fsparql%2F",title:"University of Newcastle upon Tyne (RKBExplorer)"},{endpoint:"http%3A%2F%2Froma.rkbexplorer.com%2Fsparql%2F",title:'Università degli studi di Roma "La Sapienza" (RKBExplorer)'},{endpoint:"http%3A%2F%2Fpisa.rkbexplorer.com%2Fsparql%2F",title:"Università di Pisa (RKBExplorer)"},{endpoint:"http%3A%2F%2Fulm.rkbexplorer.com%2Fsparql%2F",title:"Universität Ulm (RKBExplorer)"},{endpoint:"http%3A%2F%2Firit.rkbexplorer.com%2Fsparql%2F",title:"Université Paul Sabatier - Toulouse 3 (RKB Explorer)"},{endpoint:"http%3A%2F%2Fsemanticweb.cs.vu.nl%2Fverrijktkoninkrijk%2Fsparql%2F",title:"Verrijkt Koninkrijk"},{endpoint:"http%3A%2F%2Fkaunas.rkbexplorer.com%2Fsparql",title:"Vytautas Magnus University, Kaunas (RKBExplorer)"},{endpoint:"http%3A%2F%2Fwebscience.rkbexplorer.com%2Fsparql",title:"Web Science Conference (RKBExplorer)"},{endpoint:"http%3A%2F%2Fsparql.wikipathways.org%2F",title:"WikiPathways"},{endpoint:"http%3A%2F%2Fwww.opmw.org%2Fsparql",title:"Wings workflow provenance dataset"},{endpoint:"http%3A%2F%2Fwordnet.rkbexplorer.com%2Fsparql%2F",title:"WordNet (RKBExplorer)"},{endpoint:"http%3A%2F%2Fworldbank.270a.info%2Fsparql",title:"World Bank Linked Data"},{endpoint:"http%3A%2F%2Fmlode.nlp2rdf.org%2Fsparql"},{endpoint:"http%3A%2F%2Fldf.fi%2Fww1lod%2Fsparql",title:"World War 1 as Linked Open Data"},{endpoint:"http%3A%2F%2Faksw.org%2Fsparql",title:"aksw.org Research Group dataset"},{endpoint:"http%3A%2F%2Fcrm.rkbexplorer.com%2Fsparql",title:"crm"},{endpoint:"http%3A%2F%2Fdata.open.ac.uk%2Fquery",title:"data.open.ac.uk, Linked Data from the Open University"},{endpoint:"http%3A%2F%2Fsparql.data.southampton.ac.uk%2F"},{endpoint:"http%3A%2F%2Fdatos.bne.es%2Fsparql",title:"datos.bne.es"},{endpoint:"http%3A%2F%2Fkaiko.getalp.org%2Fsparql",title:"dbnary"},{endpoint:"http%3A%2F%2Fdigitaleconomy.rkbexplorer.com%2Fsparql",title:"digitaleconomy"},{endpoint:"http%3A%2F%2Fdotac.rkbexplorer.com%2Fsparql%2F",title:"dotAC (RKBExplorer)"},{endpoint:"http%3A%2F%2Fforeign.rkbexplorer.com%2Fsparql%2F",title:"ePrints Harvest (RKBExplorer)"},{endpoint:"http%3A%2F%2Feprints.rkbexplorer.com%2Fsparql%2F",title:"ePrints3 Institutional Archive Collection (RKBExplorer)"},{endpoint:"http%3A%2F%2Fservices.data.gov.uk%2Feducation%2Fsparql",title:"education.data.gov.uk"},{endpoint:"http%3A%2F%2Fepsrc.rkbexplorer.com%2Fsparql",title:"epsrc"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Fflyatlas",title:"flyatlas"},{endpoint:"http%3A%2F%2Fiserve.kmi.open.ac.uk%2Fiserve%2Fsparql",title:"iServe: Linked Services Registry"},{endpoint:"http%3A%2F%2Fichoose.tw.rpi.edu%2Fsparql",title:"ichoose"},{endpoint:"http%3A%2F%2Fkdata.kr%2Fsparql%2Fendpoint.jsp",title:"kdata"},{endpoint:"http%3A%2F%2Flofd.tw.rpi.edu%2Fsparql",title:"lofd"},{endpoint:"http%3A%2F%2Fprovenanceweb.org%2Fsparql",title:"provenanceweb"},{endpoint:"http%3A%2F%2Fservices.data.gov.uk%2Freference%2Fsparql",title:"reference.data.gov.uk"},{endpoint:"http%3A%2F%2Fforeign.rkbexplorer.com%2Fsparql",title:"rkb-explorer-foreign"},{endpoint:"http%3A%2F%2Fservices.data.gov.uk%2Fstatistics%2Fsparql",title:"statistics.data.gov.uk"},{endpoint:"http%3A%2F%2Fservices.data.gov.uk%2Ftransport%2Fsparql",title:"transport.data.gov.uk"},{endpoint:"http%3A%2F%2Fopendap.tw.rpi.edu%2Fsparql",title:"twc-opendap"},{endpoint:"http%3A%2F%2Fwebconf.rkbexplorer.com%2Fsparql",title:"webconf"},{endpoint:"http%3A%2F%2Fwiktionary.dbpedia.org%2Fsparql",title:"wiktionary.dbpedia.org"},{endpoint:"http%3A%2F%2Fdiwis.imis.athena-innovation.gr%3A8181%2Fsparql",title:"xxxxx"}];e.forEach(function(t,n){e[n].endpoint=decodeURIComponent(t.endpoint)});e.sort(function(e,t){var n=e.title||e.endpoint,r=t.title||t.endpoint;return n.toUpperCase().localeCompare(r.toUpperCase())});return e}},{jquery:4,selectize:6,"yasgui-utils":10}],95:[function(e){e("./outsideclick.js");e("./tab.js");e("./endpointCombi.js")},{"./endpointCombi.js":94,"./outsideclick.js":96,"./tab.js":97}],96:[function(e){"use strict";var t=e("jquery");t.fn.onOutsideClick=function(e,n){n=t.extend({skipFirst:!1,allowedElements:t()},n);var r=t(this),i=function(o){var s=function(e){return!e.is(o.target)&&0===e.has(o.target).length};if(s(r)&&s(n.allowedElements))if(n.skipFirst)n.skipFirst=!1;else{e();t(document).off("mouseup",i)}};t(document).mouseup(i);return this}},{jquery:4}],97:[function(e){function t(e){return this.each(function(){var t=n(this),i=t.data("bs.tab");i||t.data("bs.tab",i=new r(this));"string"==typeof e&&i[e]()})}var n=e("jquery"),r=function(e){this.element=n(e)};r.VERSION="3.3.1";r.TRANSITION_DURATION=150;r.prototype.show=function(){var e=this.element,t=e.closest("ul:not(.dropdown-menu)"),r=e.data("target");if(!r){r=e.attr("href");r=r&&r.replace(/.*(?=#[^\s]*$)/,"")}if(!e.parent("li").hasClass("active")){var i=t.find(".active:last a"),o=n.Event("hide.bs.tab",{relatedTarget:e[0]}),s=n.Event("show.bs.tab",{relatedTarget:i[0]});i.trigger(o);e.trigger(s);if(!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=n(r);this.activate(e.closest("li"),t);this.activate(a,a.parent(),function(){i.trigger({type:"hidden.bs.tab",relatedTarget:e[0]});e.trigger({type:"shown.bs.tab",relatedTarget:i[0]})})}}};r.prototype.activate=function(e,t,i){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1); e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);if(a){e[0].offsetWidth;e.addClass("in")}else e.removeClass("fade");e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);i&&i()}var s=t.find("> .active"),a=i&&n.support.transition&&(s.length&&s.hasClass("fade")||!!t.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(r.TRANSITION_DURATION):o();s.removeClass("in")};var i=n.fn.tab;n.fn.tab=t;n.fn.tab.Constructor=r;n.fn.tab.noConflict=function(){n.fn.tab=i;return this};var o=function(e){e.preventDefault();t.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)},{jquery:4}],98:[function(e,t){"use strict";var n=e("jquery"),r=e("yasgui-utils");e("./jquery/extendJquery.js");var i=function(e){var t='Endpoint is not <a href="http://enable-cors.org/" target="_blank">CORS-enabled</a>';e.api.corsProxy&&(t='Endpoint is not accessible from the YASGUI server and website, and the endpoint is not <a href="http://enable-cors.org/" target="_blank">CORS-enabled</a>');YASGUI.YASR.plugins.error.defaults.corsMessage=n("<div>").append(n("<p>").append("Unable to get response from endpoint. Possible reasons:")).append(n("<ul>").append(n("<li>").text("Incorrect endpoint URL")).append(n("<li>").text("Endpoint is down")).append(n("<li>").html(t)))},o=t.exports=function(t,s){var a={};a.wrapperElement=n('<div class="yasgui"></div>').appendTo(n(t));a.options=n.extend(!0,{},o.defaults,s);i(a.options);a.history=[];a.persistencyPrefix=null;a.options.persistencyPrefix&&(a.persistencyPrefix="function"==typeof a.options.persistencyPrefix?a.options.persistencyPrefix(a):a.options.persistencyPrefix);if(a.persistencyPrefix){var l=r.storage.get(a.persistencyPrefix+"history");l&&(a.history=l)}a.store=function(){a.persistentOptions&&r.storage.set(a.persistencyPrefix,a.persistentOptions)};var u=function(){var e=r.storage.get(a.persistencyPrefix);e||(e={});return e};a.persistentOptions=u();a.tabManager=e("./tabManager.js")(a);a.tabManager.init();a.tracker=e("./tracker.js")(a);return a};o.YASQE=e("./yasqe.js");o.YASR=e("./yasr.js");o.$=n;o.defaults=e("./defaults.js")},{"./defaults.js":92,"./jquery/extendJquery.js":95,"./tabManager.js":101,"./tracker.js":103,"./yasqe.js":105,"./yasr.js":106,jquery:4,"yasgui-utils":10}],99:[function(e,t){var n=function(e){var t=[];e||(e=window.location.search.substring(1));if(e.length>0)for(var n=e.split("&"),r=0;r<n.length;r++){var i=n[r].split("="),o=i[0],s=i[1];if(o.length>0&&s&&s.length>0){s=s.replace(/\+/g," ");s=decodeURIComponent(s);t.push({name:i[0],value:s})}}return t};t.exports={getCreateLinkHandler:function(e){return function(){var t=[{name:"outputFormat",value:e.yasr.options.output},{name:"query",value:e.yasqe.getValue()},{name:"contentTypeConstruct",value:e.persistentOptions.yasqe.sparql.acceptHeaderGraph},{name:"contentTypeSelect",value:e.persistentOptions.yasqe.sparql.acceptHeaderSelect},{name:"endpoint",value:e.persistentOptions.yasqe.sparql.endpoint},{name:"requestMethod",value:e.persistentOptions.yasqe.sparql.requestMethod},{name:"tabTitle",value:e.persistentOptions.name}];e.persistentOptions.yasqe.sparql.args.forEach(function(e){t.push(e)});e.persistentOptions.yasqe.sparql.namedGraphs.forEach(function(e){t.push({name:"namedGraph",value:e})});e.persistentOptions.yasqe.sparql.defaultGraphs.forEach(function(e){t.push({name:"defaultGraph",value:e})});var r=[];t.forEach(function(e){r.push(e.name)});var i=n();i.forEach(function(e){-1==r.indexOf(e.name)&&t.push(e)});return t}},getOptionsFromUrl:function(){var e={yasqe:{sparql:{}},yasr:{}},t=n(),r=!1;t.forEach(function(t){if("query"==t.name){r=!0;e.yasqe.value=t.value}else if("outputFormat"==t.name){var n=t.value;"simpleTable"==n&&(n="table");e.yasr.output=n}else if("contentTypeConstruct"==t.name)e.yasqe.sparql.acceptHeaderGraph=t.value;else if("contentTypeSelect"==t.name)e.yasqe.sparql.acceptHeaderSelect=t.value;else if("endpoint"==t.name)e.yasqe.sparql.endpoint=t.value;else if("requestMethod"==t.name)e.yasqe.sparql.requestMethod=t.value;else if("tabTitle"==t.name)e.name=t.value;else if("namedGraph"==t.name){e.yasqe.namedGraphs||(e.yasqe.namedGraphs=[]);e.yasqe.sparql.namedGraphs.push(t)}else if("defaultGraph"==t.name){e.yasqe.defaultGraphs||(e.yasqe.defaultGraphs=[]);e.yasqe.sparql.defaultGraphs.push(t)}else{e.yasqe.args||(e.yasqe.args=[]);e.yasqe.sparql.args.push(t)}});return r?e:null}}},{}],100:[function(e,t){"use strict";var n=e("jquery"),r=(e("./utils.js"),e("yasgui-utils")),i=e("./main.js"),o={yasqe:{sparql:{endpoint:i.YASQE.defaults.sparql.endpoint,acceptHeaderGraph:i.YASQE.defaults.sparql.acceptHeaderGraph,acceptHeaderSelect:i.YASQE.defaults.sparql.acceptHeaderSelect,args:i.YASQE.defaults.sparql.args,defaultGraphs:i.YASQE.defaults.sparql.defaultGraphs,namedGraphs:i.YASQE.defaults.sparql.namedGraphs,requestMethod:i.YASQE.defaults.sparql.requestMethod}}};t.exports=function(t,s,a){t.persistentOptions.tabManager.tabs[s]=t.persistentOptions.tabManager.tabs[s]?n.extend(!0,{},o,t.persistentOptions.tabManager.tabs[s]):n.extend(!0,{id:s,name:a},o);var l,u=t.persistentOptions.tabManager.tabs[s],c={persistentOptions:u},p=e("./tabPaneMenu.js")(t,c),d=n("<div>",{id:u.id,style:"position:relative","class":"tab-pane",role:"tabpanel"}).appendTo(t.tabManager.$tabPanesParent),f=n("<div>",{"class":"wrapper"}).appendTo(d),h=n("<div>",{"class":"controlbar"}).appendTo(f),g=(p.initWrapper().appendTo(d),function(){n("<button>",{type:"button","class":"menuButton btn btn-default"}).on("click",function(){if(d.hasClass("menu-open")){d.removeClass("menu-open");p.store()}else{p.updateWrapper();d.addClass("menu-open");n(".menu-slide,.menuButton").onOutsideClick(function(){d.removeClass("menu-open");p.store()})}}).append(n("<span>",{"class":"icon-bar"})).append(n("<span>",{"class":"icon-bar"})).append(n("<span>",{"class":"icon-bar"})).appendTo(h);l=n("<select>").appendTo(h).endpointCombi(t,{value:u.yasqe.sparql.endpoint,onChange:function(e){u.yasqe.sparql.endpoint=e;c.refreshYasqe();t.store()}})}),m=n("<div>",{id:"yasqe_"+u.id}).appendTo(f),v=n("<div>",{id:"yasq_"+u.id}).appendTo(f),E={createShareLink:e("./shareLink").getCreateLinkHandler(c)},y=function(){u.yasqe.value=c.yasqe.getValue();var e=null;c.yasr.results.getBindings()&&(e=c.yasr.results.getBindings().length);var i={options:n.extend(!0,{},u),resultSize:e};delete i.options.name;t.history.unshift(i);var o=50;t.history.length>o&&(t.history=t.history.slice(0,o));t.persistencyPrefix&&r.storage.set(t.persistencyPrefix+"history",t.history)};c.setPersistentInYasqe=function(){if(c.yasqe){n.extend(!0,c.yasqe.options,u.yasqe);u.yasqe.value&&c.yasqe.setValue(u.yasqe.value)}};n.extend(E,u.yasqe);c.onShow=function(){if(!c.yasqe||!c.yasr){var e=function(){return u.yasqe.sparql.endpoint+"?"+n.param(c.yasqe.getUrlArguments(u.yasqe.sparql))};i.YASR.plugins.error.defaults.tryQueryLink=e;c.yasqe=i.YASQE(m[0],E);c.yasqe.on("blur",function(e){u.yasqe.value=e.getValue();t.store()});c.yasr=i.YASR(v[0],n.extend({getUsedPrefixes:c.yasqe.getPrefixesFromQuery},u.yasr));var r=null;c.yasqe.options.sparql.callbacks.beforeSend=function(){r=+new Date};c.yasqe.options.sparql.callbacks.complete=function(){var e=+new Date;t.tracker.track(u.yasqe.sparql.endpoint,c.yasqe.getValueWithoutComments(),e-r);c.yasr.setResponse.apply(this,arguments);y()};c.yasqe.query=function(){if(t.options.api.corsProxy&&t.corsEnabled)if(t.corsEnabled[u.yasqe.sparql.endpoint])i.YASQE.executeQuery(c.yasqe);else{var e=n.extend(!0,{},c.yasqe.options.sparql);e.args.push({name:"endpoint",value:e.endpoint});e.args.push({name:"requestMethod",value:e.requestMethod});e.requestMethod="POST";e.endpoint=t.options.api.corsProxy;i.YASQE.executeQuery(c.yasqe,e)}else i.YASQE.executeQuery(c.yasqe)};g()}};c.refreshYasqe=function(){n.extend(!0,c.yasqe.options,c.persistentOptions.yasqe);c.persistentOptions.yasqe.value&&c.yasqe.setValue(c.persistentOptions.yasqe.value)};c.destroy=function(){c.yasr||(c.yasr=i.YASR(v[0],{},""));r.storage.remove(c.yasr.getPersistencyId(c.yasr.options.persistency.results.key))};return c}},{"./main.js":98,"./shareLink":99,"./tabPaneMenu.js":102,"./utils.js":104,jquery:4,"yasgui-utils":10}],101:[function(e,t){"use strict";{var n=e("jquery");e("yasgui-utils"),e("./imgs.js")}e("jquery-ui/position");t.exports=function(t){t.persistentOptions.tabManager||(t.persistentOptions.tabManager={});var r=t.persistentOptions.tabManager,i={};i.tabs={};var o,s=null,a=null,l=function(e,t){e||(e="Query");t||(t=0);var n=e+(t>0?" "+t:"");u(n)&&(n=l(e,t+1));return n},u=function(e){for(var t in i.tabs)if(i.tabs[t].persistentOptions.name==e)return!0;return!1},c=function(){return Math.random().toString(36).substring(7)};i.init=function(){s=n("<div>",{role:"tabpanel"}).appendTo(t.wrapperElement);o=n("<ul>",{"class":"nav nav-tabs mainTabs",role:"tablist"}).appendTo(s);var l=n("<a>",{role:"addTab"}).click(function(){f()}).text("+");o.append(n("<li>",{role:"presentation"}).append(l));i.$tabPanesParent=n("<div>",{"class":"tab-content"}).appendTo(s);if(!r||n.isEmptyObject(r)){r.tabOrder=[];r.tabs={};r.selected=null}var u=e("./shareLink.js").getOptionsFromUrl();if(u){var p=c();u.id=p;r.tabs[p]=u;r.tabOrder.push(p);r.selected=p}r.tabOrder.length>0?r.tabOrder.forEach(f):f();o.sortable({placeholder:"tab-sortable-highlight",items:'li:has([data-toggle="tab"])',forcePlaceholderSize:!0,update:function(){var e=[];o.find('a[data-toggle="tab"]').each(function(){e.push(n(this).attr("aria-controls"))});r.tabOrder=e;t.store()}});a=n("<div>",{"class":"tabDropDown"}).appendTo(t.wrapperElement);var h=n("<ul>",{"class":"dropdown-menu",role:"menu"}).appendTo(a),g=function(e,t){var r=n("<li>",{role:"presentation"}).appendTo(h);e?r.append(n("<a>",{role:"menuitem",href:"#"}).text(e)).click(function(){a.hide();event.preventDefault();t&&t(a.attr("target-tab"))}):r.addClass("divider")};g("Rename",function(e){o.find('a[href="#'+e+'"]').dblclick()});g("Copy",function(){console.log("todo")});g();g("Close",d);g("Close others",function(e){o.find('a[role="tab"]').each(function(){var t=n(this).attr("aria-controls");t!=e&&d(t)})});g("Close all",function(){o.find('a[role="tab"]').each(function(){d(n(this).attr("aria-controls"))})})};var p=function(e){o.find('a[aria-controls="'+e+'"]').tab("show");return i.current()},d=function(e){i.tabs[e].destroy();delete i.tabs[e];delete r.tabs[e];var s=r.tabOrder.indexOf(e);s>-1&&r.tabOrder.splice(s,1);var a=null;r.tabOrder[s]?a=s:r.tabOrder[s-1]&&(a=s-1);null!==a&&p(r.tabOrder[a]);o.find('a[href="#'+e+'"]').closest("li").remove();n("#"+e).remove();t.store();return i.current()},f=function(s){var u=!s;s||(s=c());"tabs"in r||(r.tabs={});var p=r.tabs[s]?r.tabs[s].name:l(),f=n("<a>",{href:"#"+s,"aria-controls":s,role:"tab","data-toggle":"tab"}).click(function(e){e.preventDefault();n(this).tab("show");i.tabs[s].yasqe.refresh()}).on("shown.bs.tab",function(){r.selected=n(this).attr("aria-controls");i.tabs[s].onShow();t.store()}).append(n("<span>").text(p)).append(n("<button>",{"class":"close",type:"button"}).text("x").click(function(){d(s)})),h=n('<div><input type="text"></div>').keydown(function(){27==event.which||27==event.keyCode?n(this).closest("li").removeClass("rename"):(13==event.which||13==event.keyCode)&&g(n(this).closest("li"))}),g=function(e){var n=e.find('a[role="tab"]').attr("aria-controls"),i=e.find("input").val();f.find("span").text(e.find("input").val());r.tabs[n].name=i;t.store();e.removeClass("rename")},m=n("<li>",{role:"presentation"}).append(f).append(h).dblclick(function(){var e=n(this),t=e.find("span").text();e.addClass("rename");e.find("input").val(t);e.onOutsideClick(function(){g(e)})}).bind("contextmenu",function(e){e.preventDefault();a.show().onOutsideClick(function(){a.hide()},{allowedElements:n(this).closest("li")}).addClass("open").position({my:"left top-3",at:"left bottom",of:n(this),collision:"fit"}).attr("target-tab",m.find('a[role="tab"]').attr("aria-controls"))});o.find('li:has(a[role="addTab"])').before(m);u&&r.tabOrder.push(s);i.tabs[s]=e("./tab.js")(t,s,p);(u||r.selected==s)&&f.tab("show");return i.tabs[s]};i.current=function(){return i.tabs[r.selected]};return i}},{"./imgs.js":93,"./shareLink.js":99,"./tab.js":100,jquery:4,"jquery-ui/position":3,"yasgui-utils":10}],102:[function(e,t){"use strict";var n=e("jquery"),r=e("./imgs.js"),i=(e("selectize"),e("yasgui-utils"));t.exports=function(e,t){var o,s,a,l,u,c,p,d=null,f=null,h=null,g=null,m=null,v=function(){d=n("<nav>",{"class":"menu-slide",id:"navmenu"});d.append(n(i.svg.getElement(r.yasgui)).addClass("yasguiLogo").attr("title","About YASGUI").click(function(){window.open("http://about.yasgui.org","_blank")}));f=n("<div>",{role:"tabpanel"}).appendTo(d);h=n("<ul>",{"class":"nav nav-pills tabPaneMenuTabs",role:"tablist"}).appendTo(f);g=n("<div>",{"class":"tab-content"}).appendTo(f);var v=n("<li>",{role:"presentation"}).appendTo(h),E="yasgui_reqConfig_"+t.persistentOptions.id;v.append(n("<a>",{href:"#"+E,"aria-controls":E,role:"tab","data-toggle":"tab"}).text("Configure Request").click(function(e){e.preventDefault();n(this).tab("show")}));var y=n("<div>",{id:E,role:"tabpanel","class":"tab-pane requestConfig container-fluid"}).appendTo(g),x=n("<div>",{"class":"reqRow"}).appendTo(y);n("<div>",{"class":"rowLabel"}).appendTo(x).append(n("<span>").text("Request Method"));o=n("<button>",{"class":"btn btn-default ","data-toggle":"button"}).text("POST").click(function(){o.addClass("active");s.removeClass("active")});s=n("<button>",{"class":"btn btn-default","data-toggle":"button"}).text("GET").click(function(){s.addClass("active");o.removeClass("active")});n("<div>",{"class":"btn-group col-md-8",role:"group"}).append(s).append(o).appendTo(x);var b=n("<div>",{"class":"reqRow"}).appendTo(y);n("<div>",{"class":"rowLabel"}).appendTo(b).text("Accept Headers");a=n("<select>",{"class":"acceptHeader"}).append(n("<option>",{value:"application/sparql-results+json"}).text("JSON")).append(n("<option>",{value:"application/sparql-results+xml"}).text("XML")).append(n("<option>",{value:"text/csv"}).text("CSV")).append(n("<option>",{value:"text/tab-separated-values"}).text("TSV"));n("<div>",{"class":"col-md-4",role:"group"}).append(n("<label>").text("SELECT").append(a)).appendTo(b);a.selectize();l=n("<select>",{"class":"acceptHeader"}).append(n("<option>",{value:"text/turtle"}).text("Turtle")).append(n("<option>",{value:"application/rdf+xml"}).text("RDF-XML")).append(n("<option>",{value:"text/csv"}).text("CSV")).append(n("<option>",{value:"text/tab-separated-values"}).text("TSV"));n("<div>",{"class":"col-md-4",role:"group"}).append(n("<label>").text("Graph").append(l)).appendTo(b);l.selectize();var T=n("<div>",{"class":"reqRow"}).appendTo(y);n("<div>",{"class":"rowLabel"}).appendTo(T).text("URL Arguments");u=n("<div>",{"class":"col-md-8",role:"group"}).appendTo(T);var S=n("<div>",{"class":"reqRow"}).appendTo(y);n("<div>",{"class":"rowLabel"}).appendTo(S).text("Default graphs");c=n("<div>",{"class":"col-md-8",role:"group"}).appendTo(S);var N=n("<div>",{"class":"reqRow"}).appendTo(y);n("<div>",{"class":"rowLabel"}).appendTo(N).text("Named graphs");p=n("<div>",{"class":"col-md-8",role:"group"}).appendTo(N);var v=n("<li>",{role:"presentation"}).appendTo(h),C="yasgui_history_"+t.persistentOptions.id;v.append(n("<a>",{href:"#"+C,"aria-controls":C,role:"tab","data-toggle":"tab"}).text("History").click(function(e){e.preventDefault();n(this).tab("show")}));var L=n("<div>",{id:C,role:"tabpanel","class":"tab-pane history container-fluid"}).appendTo(g);m=n("<ul>",{"class":"list-group"}).appendTo(L);if(e.options.api.collections){var v=n("<li>",{role:"presentation"}).appendTo(h),A="yasgui_collections_"+t.persistentOptions.id;v.append(n("<a>",{href:"#"+A,"aria-controls":A,role:"tab","data-toggle":"tab"}).text("Collections").click(function(e){e.preventDefault();n(this).tab("show")}));var y=n("<div>",{id:A,role:"tabpanel","class":"tab-pane collections container-fluid"}).appendTo(g)}return d},E=function(e,t,r,i){for(var o=n("<div>",{"class":"textInputsRow"}),s=0;t>s;s++){var a=i&&i[s]?i[s]:"";n("<input>",{type:"text"}).val(a).keyup(function(){var r=!1;e.find(".textInputsRow:last input").each(function(e,t){n(t).val().trim().length>0&&(r=!0)});r&&E(e,t,!0)}).css("width",92/t+"%").appendTo(o)}o.append(n("<button>",{"class":"close",type:"button"}).text("x").click(function(){n(this).closest(".textInputsRow").remove()}));r?o.hide().appendTo(e).show("fast"):o.appendTo(e)},y=function(){0==d.find(".tabPaneMenuTabs li.active").length&&d.find(".tabPaneMenuTabs a:first").tab("show");var r=t.persistentOptions.yasqe;"POST"==r.sparql.requestMethod.toUpperCase()?o.addClass("active"):s.addClass("active");l[0].selectize.setValue(r.sparql.acceptHeaderGraph);a[0].selectize.setValue(r.sparql.acceptHeaderSelect);u.empty();r.sparql.args&&r.sparql.args.length>0&&r.sparql.args.forEach(function(e){var t=[e.name,e.value];E(u,2,!1,t)});E(u,2,!1);c.empty();r.sparql.defaultGraphs&&r.sparql.defaultGraphs.length>0&&E(c,1,!1,r.sparql.defaultGraphs);E(c,1,!1);p.empty();r.sparql.namedGraphs&&r.sparql.namedGraphs.length>0&&E(p,1,!1,r.sparql.namedGraphs);E(p,1,!1);m.empty();0==e.history.length?m.append(n("<a>",{"class":"list-group-item disabled",href:"#"}).text("No items in history yet").click(function(e){e.preventDefault()})):e.history.forEach(function(t){var r=t.options.yasqe.sparql.endpoint;t.resultSize&&(r+=" ("+t.resultSize+" results)");m.append(n("<a>",{"class":"list-group-item",href:"#",title:t.options.yasqe.value}).text(r).click(function(r){var i=e.tabManager.tabs[t.options.id];n.extend(!0,i.persistentOptions,t.options);i.refreshYasqe();e.store();d.closest(".tab-pane").removeClass("menu-open");r.preventDefault()}))})},x=function(){var r=t.persistentOptions.yasqe.sparql;o.hasClass("active")?r.requestMethod="POST":s.hasClass("active")&&(r.requestMethod="GET");r.acceptHeaderGraph=l[0].selectize.getValue();r.acceptHeaderSelect=a[0].selectize.getValue();var i=[];u.find("div").each(function(e,t){var r=[];n(t).find("input").each(function(e,t){r.push(n(t).val())});r[0]&&r[0].trim().length>0&&i.push({name:r[0],value:r[1]?r[1]:""})});r.args=i;var d=[];c.find("div").each(function(e,t){var r=[];n(t).find("input").each(function(e,t){r.push(n(t).val())});r[0]&&r[0].trim().length>0&&d.push(r[0])});r.defaultGraphs=d;var f=[];p.find("div").each(function(e,t){var r=[];n(t).find("input").each(function(e,t){r.push(n(t).val())});r[0]&&r[0].trim().length>0&&f.push(r[0])});r.namedGraphs=f;e.store();t.setPersistentInYasqe()};return{initWrapper:v,updateWrapper:y,store:x}}},{"./imgs.js":93,jquery:4,selectize:6,"yasgui-utils":10}],103:[function(e,t){var n=e("yasgui-utils"),r=e("./imgs.js"),i=e("jquery");t.exports=function(e){var t=!!e.options.tracker.googleAnalyticsId,o=!0,s="yasgui_"+i(e.wrapperElement).closest("[id]").attr("id")+"_trackerId",a=function(){var r=n.storage.get(s);if(0===r){t=!1;o=!1}else if(1===r){t=!0;o=!1}else if(2==r){t=!0;o=!0}else e.options.tracker.askConsent&&u()},l=function(){if(e.options.tracker.googleAnalyticsId){a();(function(e,t,n,r,i,o,s){e.GoogleAnalyticsObject=i;e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].l=1*new Date;o=t.createElement(n),s=t.getElementsByTagName(n)[0];o.async=1;o.src=r;s.parentNode.insertBefore(o,s)})(window,document,"script","//www.google-analytics.com/analytics.js","ga");window._gaq=window._gaq||[];ga("create",e.options.tracker.googleAnalyticsId,"auto");ga("send","pageview")}},u=function(){var t=i("<div>",{"class":"consentWindow"}).appendTo(e.wrapperElement),o=function(){t.hide(400)},l=function(e){var t="no";1==e?t="yes/no":2==e&&(t="yes");c("consent",t);n.storage.set(s,e);a()};t.append(i("<div>",{"class":"consentMsg"}).html("We track user actions (including used endpoints and queries). This data is solely used for research purposes and to get insight into how users use the site. <i>We would appreciate your consent!</i>"));i("<div>",{"class":"buttons"}).appendTo(t).append(i("<button>",{type:"button","class":"btn btn-default"}).append(i(n.svg.getElement(r.checkMark)).height(11).width(11)).append(i("<span>").text(" Yes, allow")).click(function(){l(2);o()})).append(i("<button>",{type:"button","class":"btn btn-default"}).append(i(n.svg.getElement(r.checkCrossMark)).height(13).width(13)).append(i("<span>").html(" Yes, track site usage, but not<br>the queries/endpoints I use")).click(function(){l(1);o()})).append(i("<button>",{type:"button","class":"btn btn-default"}).append(i(n.svg.getElement(r.crossMark)).height(9).width(9)).append(i("<span>").text(" No, disable tracking")).click(function(){l(0);o()})).append(i("<button>",{type:"button","class":"btn btn-default"}).text("Ask me later").click(function(){o()}))},c=function(e,n,r,i,o){t&&_gaq.push(["_trackEvent",e,n,r,i,o])};l();return{enabled:t,track:c,drawConsentWindow:u}}},{"./imgs.js":93,jquery:4,"yasgui-utils":10}],104:[function(e,t){e("jquery");t.exports={escapeHtmlEntities:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;"},n=function(e){return t[e]||e};return e.replace(/[&<>]/g,n)}}},{jquery:4}],105:[function(e,t){var n=e("jquery"),r=t.exports=e("yasgui-yasqe");r.defaults=n.extend(!0,r.defaults,{persistent:null,consumeShareLink:null,createShareLink:null,sparql:{showQueryButton:!0,acceptHeaderGraph:"text/turtle",acceptHeaderSelect:"application/sparql-results+json"}})},{jquery:4,"yasgui-yasqe":41}],106:[function(e,t){e("jquery"),e("./main.js"),t.exports=e("yasgui-yasr")},{"./main.js":98,jquery:4,"yasgui-yasr":81}]},{},[1])(1)}); //# sourceMappingURL=yasgui.bundled.min.js.map
src/routes/links/index.js
transitlinks/web-app
import { getLog } from '../../core/log'; const log = getLog('routes/links'); import React from 'react'; import ErrorPage from '../../components/common/ErrorPage'; import Links from './Links'; import { createParamString } from '../../core/utils'; import { getActiveTripQuery, getLinksQuery } from '../../data/queries/queries'; export default { path: '/links', async action({ params, query, context }) { const { graphqlRequest } = context.store.helpers; try { const { data } = await graphqlRequest( `query { ${getLinksQuery(query)}, transportTypes { slug }, ${getActiveTripQuery()} }` ); log.info("event=received-transit-links-data", data); return <Links linksResult={data.transitLinks} activeTrip={data.activeTrip} updated={(new Date().getTime())} query={query} transportTypes={data.transportTypes} />; } catch (error) { log.info("error=route-transit-links", error); return <ErrorPage errors={error.errors} /> } } };
app/containers/Store/StoreItem.js
ryanwashburne/react-skeleton
// React import PropTypes from 'prop-types'; import React from 'react'; import { NavLink } from 'react-router-dom'; // Redux import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as storeActions from 'app/reducers/storeReducer'; import * as global from 'app/reducers/globalReducer'; // UI import { Card, CardImage, CardBody, CardTitle, CardText, Fa, Button } from 'mdbreact'; import { SelectField, MenuItem } from 'material-ui'; class StoreItem extends React.Component { state = {}; render() { const { item, count, actions } = this.props; const items = []; for (let i = 0; i <= 10; i++ ) { items.push( <MenuItem value={i} key={i} primaryText={`${i}`} /> ); } const disabled = count && !this.state[item.id]; return ( <Card className="mb-3"> <CardImage className="img-fluid" src={item.img} /> <CardBody> <CardTitle>{item.name}</CardTitle> <CardText>${item.dollars}.{item.cents}</CardText> <CardText>{item.description}</CardText> {count && <SelectField className="w-100" value={this.state[item.id]} onChange={(e, i, v) => { if (v === 0) { this.setState({ [item.id]: null }); } else { this.setState({ [item.id]: v }); } }} floatingLabelText="Qty" maxHeight={200} > {items} </SelectField> } <Button className="w-100 mx-0 px-0" color="success" outline={disabled} disabled={disabled} onTouchTap={() => { actions.Snack(`Added ${item.name} to cart.`, <NavLink to="/cart">View Cart</NavLink>); actions.addToCart(item, count ? this.state[item.id] : 1); actions.saveCart(); }} ><Fa icon="shopping-cart" className={`mr-1 ${disabled ? 'success-text' : 'white-text'}`} /> Add to cart</Button> </CardBody> </Card> ); } } StoreItem.propTypes = { item: PropTypes.object.isRequired, count: PropTypes.bool, actions: PropTypes.object.isRequired }; const mapStateToProps = () => { return {}; }; const mapDispatchToProps = (dispatch) => { return { actions: bindActionCreators({...storeActions, ...global}, dispatch) }; }; StoreItem = connect( mapStateToProps, mapDispatchToProps )(StoreItem); export default StoreItem;
src/components/ResultsBar.js
AdlerPlanetarium/pluto-poll
import React from 'react'; export default class Bar extends React.Component { render() { return ( <div className="bar"> <h5 className="name">{this.props.candidate}</h5> <div className="result-container"> <div id={this.props.candidate} className="result-bar" style={{ height: this.props.percentage }} > <h5 className="percentage">{this.props.votes}</h5> </div> </div> </div> ); } } Bar.propTypes = { candidate: React.PropTypes.string, votes: React.PropTypes.oneOfType([ React.PropTypes.number, React.PropTypes.string, ]), percentage: React.PropTypes.string, };
pages/error/index.js
tomalexing/quiz
/** * React Static Boilerplate * https://github.com/kriasoft/react-static-boilerplate * * Copyright © 2015-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import history from '../../core/history'; import Link from '../../components/Link'; import s from './styles.css'; class ErrorPage extends React.Component { static propTypes = { error: React.PropTypes.object, }; componentDidMount() { document.title = this.props.error && this.props.error.status === 404 ? 'Page Not Found' : this.props.error.status === 404 ? 'Admin area' : 'Error'; } goBack = event => { event.preventDefault(); history.goBack(); }; render() { if (this.props.error) console.error(this.props.error); // eslint-disable-line no-console const [code, title] = this.props.error && this.props.error.status === 404 ? ['404', 'Page not found'] : this.props.error.status === 403 ? ['403', 'Admin area'] : ['Error', 'Oups, something went wrong']; return ( <div className={s.container}> <main className={s.content}> <h1 className={s.code}>{code}</h1> <p className={s.title}>{title}</p> {code === '404' && <p className={s.text}> The page you're looking for does not exist or an another error occurred. </p> } {code === '403' && <p className={s.text}> Please login. </p> } <p className={s.text}> <a href="/" onClick={this.goBack}>Go back</a>, or head over to the&nbsp; <Link to="/">home page</Link> to choose a new direction. </p> </main> </div> ); } } export default ErrorPage;
src/components/Editor/EditorPreviewPane/EditorPreview.js
Aloomaio/netlify-cms
import PropTypes from 'prop-types'; import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; function isVisible(field) { return field.get('widget') !== 'hidden'; } const style = { fontFamily: 'Roboto, "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif', }; /** * Use a stateful component so that child components can effectively utilize * `shouldComponentUpdate`. */ export default class Preview extends React.Component { render() { const { collection, fields, widgetFor } = this.props; if (!collection || !fields) { return null; } return ( <div style={style}> {fields.filter(isVisible).map(field => widgetFor(field.get('name')))} </div> ); } } Preview.propTypes = { collection: ImmutablePropTypes.map.isRequired, entry: ImmutablePropTypes.map.isRequired, fields: ImmutablePropTypes.list.isRequired, getAsset: PropTypes.func.isRequired, widgetFor: PropTypes.func.isRequired, };
frontend/src/App.js
mshenfield/subreddit_algebra
import React, { Component } from 'react'; import ErrorNotification from './components/ErrorNotification'; import Footer from './components/Footer'; import Header from './components/Header'; import OperatorSelector from './components/OperatorSelector'; import SubredditInput from './components/SubredditInput'; import SubredditResultList from './components/SubredditResultList'; import GithubCorner from 'react-github-corners'; import {cachedFetch} from './utils'; import 'react-github-corners/dist/GithubCorner.css'; import './App.css'; class App extends Component { constructor(props) { super(props) this.state = { errorNotification: '', subredditLeft: '', operator: '-', // Default to - subredditRight: '', matches: [] } } canSubmit() { return this.state.subredditLeft && this.state.operator && this.state.subredditRight } handleSubredditLeftChange = (event, value) => { this.setState({subredditLeft: value}) } handleOperatorChange = (event) => { this.setState({operator: event.target.value}, () => { this.tryGetAlgebraResult() }) } handleSubredditRightChange = (event, value) => { this.setState({subredditRight: value}) } setNetworkAvailability = (isAvailable) => { if (isAvailable) { this.setState({'errorNotification': ''}); } else { this.setState({'errorNotification': 'We\'re having trouble connecting, please try again in a bit.'}) } } swapSubreddits = () => { const subredditLeft = this.state.subredditRight const subredditRight = this.state.subredditLeft this.setState({ subredditLeft: subredditLeft, subredditRight: subredditRight }) } tryGetAlgebraResult = (left, right) => { if (!this.canSubmit()) { return } let query = `${this.state.subredditLeft}/${this.state.operator}/${this.state.subredditRight}` cachedFetch(`api/algebra/${query}`) .then((response) => { this.setNetworkAvailability(true) response.json().then((matches) => { // Fail silently for now if (matches['error']) { return; } this.setState({...this.state, matches: matches }) }) }) .catch((err) => this.setNetworkAvailability(false)) } render() { return ( <div> <GithubCorner backgroundColor="#fff" color="#ff4500" url="https://github.com/mshenfield/subreddit_algebra" target="_blank" /> <Header className="Sized"/> <div className="App Sized"> <SubredditInput inputProps={{ id: 'subreddit-input-left', placeholder: 'choose a subreddit', }} onChange={this.handleSubredditLeftChange} onValidValue={this.tryGetAlgebraResult} setNetworkAvailability={this.setNetworkAvailability} value={this.state.subredditLeft} /> <div className="Operators"> <OperatorSelector value={this.state.operator} onChange={this.handleOperatorChange} /> <button className="SubredditAlgebraForm__swapbutton" onClick={this.swapSubreddits} title="Swap subreddits" > ⇵ </button> </div> <SubredditInput inputProps={{ id: 'subreddit-input-right', placeholder: 'add or subtract a subreddit', }} onChange={this.handleSubredditRightChange} onValidValue={this.tryGetAlgebraResult} setNetworkAvailability={this.setNetworkAvailability} value={this.state.subredditRight} /> <hr className="EqualsSeparator"/> <SubredditResultList subreddits={this.state.matches} /> <Footer className="Sized"/> <ErrorNotification message={this.state.errorNotification} /> </div> </div> ); } } export default App;
src/scripts/routes.js
jie/microgate
import cookie from './utils/cookie' import React from 'react' import { Router, Route } from 'react-router' import AccountLoginApp from './containers/account' import { MainApp } from './containers/admin' import { DashboardApp } from './containers/admin' import { ApiCreateApp, ApisListApp } from './containers/admin' import { ApplicationsApp, ApplicationsCreateApp } from './containers/admin' import { ServicesApp, ServicesCreateApp } from './containers/admin' import { UsersApp, UsersCreateApp } from './containers/admin' // account AccountLoginApp.title = 'AccountLoginApp'; AccountLoginApp.path = '/portal/account/login'; // admin MainApp.title = 'MainApp'; MainApp.path = '/portal/admin'; // api ApiCreateApp.title = 'ApiCreateApp'; ApiCreateApp.path = '/portal/admin/apis/create'; ApisListApp.title = 'ApisListApp'; ApisListApp.path = '/portal/admin/apis'; // service ServicesApp.title = 'ServicesApp'; ServicesApp.path = '/portal/admin/services'; ServicesCreateApp.title = 'ServicesCreateApp'; ServicesCreateApp.path = '/portal/admin/services/create'; // dashboard DashboardApp.title = 'DashboardApp'; DashboardApp.path = '/portal/admin/dashboard'; // application ApplicationsApp.title = 'ApplicationsApp'; ApplicationsApp.path = '/portal/admin/applications'; ApplicationsCreateApp.title = 'ApplicationsCreateApp'; ApplicationsCreateApp.path = '/portal/admin/applications/create'; // user UsersApp.title = 'UsersApp'; UsersApp.path = '/portal/admin/users'; UsersCreateApp.title = 'UsersCreateApp'; UsersCreateApp.path = '/portal/admin/users/create'; const authenticate = function(next, replace, callback) { const authenticated = !!cookie.get('microgate') if (!authenticated && next.location.pathname != '/portal/account/login') { replace('/portal/account/login') } callback() } export default ( <Router> <Route path={ MainApp.path } component={ MainApp }> <Route path={ DashboardApp.path } component={ DashboardApp } /> <Route path={ ApiCreateApp.path } component={ ApiCreateApp } /> <Route path={ ApisListApp.path } component={ ApisListApp } /> <Route path={ ServicesApp.path } component={ ServicesApp } /> <Route path={ ServicesCreateApp.path } component={ ServicesCreateApp } /> <Route path={ ApplicationsApp.path } component={ ApplicationsApp } /> <Route path={ ApplicationsCreateApp.path } component={ ApplicationsCreateApp } /> <Route path={ UsersApp.path } component={ UsersApp } /> <Route path={ UsersCreateApp.path } component={ UsersCreateApp } /> </Route> <Route> <Route path={ AccountLoginApp.path } component={ AccountLoginApp } /> </Route> </Router> )
src/client/routes.js
kingisaac95/docmanager
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './components/App'; import HomePage from './components/home/HomePage'; import Dashboard from './components/DashboardPage'; import Documents from './components/document/DocumentPage'; import Users from './components/user/UserPage'; import Document from './components/document/DocumentSingleView'; import EditDocument from './components/document/DocumentEdit'; import EditUser from './components/user/UserEdit'; import requireAuthentication from './utils/requireAuthentication'; export default ( <Route path="/" component={App}> <IndexRoute component={HomePage} /> <Route path="dashboard" component={requireAuthentication(Dashboard)} /> <Route path="documents" component={requireAuthentication(Documents)} /> <Route path="users" component={requireAuthentication(Users)} /> <Route path="documents/:id/view" component={requireAuthentication(Document)} /> <Route path="documents/:id/edit" component={requireAuthentication(EditDocument)} /> <Route path="users/:id/edit" component={requireAuthentication(EditUser)} /> </Route> );
src/desktop/apps/consign/components/thank_you/index.js
kanaabe/force
import Document from '../../../../components/main_layout/public/icons/consignments-doc.svg' import GreenCheck from '../../../../components/main_layout/public/icons/green-check.svg' import PropTypes from 'prop-types' import React from 'react' import Select from '../../../../components/main_layout/public/icons/consignments-select.svg' import SpeechBubble from '../../../../components/main_layout/public/icons/consignments-speech-bubble.svg' import block from 'bem-cn-lite' import get from 'lodash.get' import { connect } from 'react-redux' function ThankYou ({ isMobile, submission, processingImages, uploadedImages }) { const b = block('consignments-submission-thank-you') const uploadedImageSrc = get(uploadedImages, '0.src') const submissionImage = uploadedImageSrc && processingImages.length === 0 ? uploadedImageSrc : '/images/missing_image.png' return ( <div className={b({mobile: isMobile})}> <div className={b('submitted-work')}> <div className={b('submitted-image')}> <img src={submissionImage} /> </div> <div className={b('submitted-message')}> Your work has been submitted </div> <div className={b('icon-check')}> <GreenCheck /> </div> </div> <div className={b('title')}> What’s Next? </div> <div className={b('next-steps')}> <div className={b('review')}> <div className={b('step-icon')}> <Document /> </div> <div className={b('instructions')}> Privately review estimates from our partner network. </div> </div> <div className={b('select')}> <div className={b('step-icon')}> <Select /> </div> <div className={b('instructions')}> Select the offer that is best for you. </div> </div> <div className={b('connect')}> <div className={b('step-icon')}> <SpeechBubble /> </div> <div className={b('instructions')}> We will introduce you to the partner. </div> </div> </div> <a className={b.builder()('personalize-button').mix('avant-garde-button-black')()} href='/personalize'> Personalize My Artsy Account </a> </div> ) } const mapStateToProps = (state) => ({ isMobile: state.submissionFlow.isMobile, processingImages: state.submissionFlow.processingImages, submission: state.submissionFlow.submission, uploadedImages: state.submissionFlow.uploadedImages }) export default connect( mapStateToProps, )(ThankYou) ThankYou.propTypes = { isMobile: PropTypes.bool.isRequired, processingImages: PropTypes.array.isRequired, submission: PropTypes.object.isRequired, uploadedImages: PropTypes.array }
recursos/js/jquery.mobile-1.3.1.js
handark/restacarta
/* * jQuery Mobile 1.3.1 * Git HEAD hash: 74b4bec049fd93e4fe40205e6157de16eb64eb46 <> Date: Wed Apr 10 2013 21:57:23 UTC * http://jquerymobile.com * * Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors * Released under the MIT license. * http://jquery.org/license * */ (function ( root, doc, factory ) { if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. define( [ "jquery" ], function ( $ ) { factory( $, root, doc ); return $.mobile; }); } else { // Browser globals factory( root.jQuery, root, doc ); } }( this, document, function ( jQuery, window, document, undefined ) { (function( $ ) { $.mobile = {}; }( jQuery )); (function( $, window, undefined ) { var nsNormalizeDict = {}; // jQuery.mobile configurable options $.mobile = $.extend($.mobile, { // Version of the jQuery Mobile Framework version: "1.3.1", // Namespace used framework-wide for data-attrs. Default is no namespace ns: "", // Define the url parameter used for referencing widget-generated sub-pages. // Translates to to example.html&ui-page=subpageIdentifier // hash segment before &ui-page= is used to make Ajax request subPageUrlKey: "ui-page", // Class assigned to page currently in view, and during transitions activePageClass: "ui-page-active", // Class used for "active" button state, from CSS framework activeBtnClass: "ui-btn-active", // Class used for "focus" form element state, from CSS framework focusClass: "ui-focus", // Automatically handle clicks and form submissions through Ajax, when same-domain ajaxEnabled: true, // Automatically load and show pages based on location.hash hashListeningEnabled: true, // disable to prevent jquery from bothering with links linkBindingEnabled: true, // Set default page transition - 'none' for no transitions defaultPageTransition: "fade", // Set maximum window width for transitions to apply - 'false' for no limit maxTransitionWidth: false, // Minimum scroll distance that will be remembered when returning to a page minScrollBack: 250, // DEPRECATED: the following property is no longer in use, but defined until 2.0 to prevent conflicts touchOverflowEnabled: false, // Set default dialog transition - 'none' for no transitions defaultDialogTransition: "pop", // Error response message - appears when an Ajax page request fails pageLoadErrorMessage: "Error Loading Page", // For error messages, which theme does the box uses? pageLoadErrorMessageTheme: "e", // replace calls to window.history.back with phonegaps navigation helper // where it is provided on the window object phonegapNavigationEnabled: false, //automatically initialize the DOM when it's ready autoInitializePage: true, pushStateEnabled: true, // allows users to opt in to ignoring content by marking a parent element as // data-ignored ignoreContentEnabled: false, // turn of binding to the native orientationchange due to android orientation behavior orientationChangeEnabled: true, buttonMarkup: { hoverDelay: 200 }, // define the window and the document objects window: $( window ), document: $( document ), // TODO might be useful upstream in jquery itself ? keyCode: { ALT: 18, BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, COMMAND: 91, COMMAND_LEFT: 91, // COMMAND COMMAND_RIGHT: 93, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, MENU: 93, // COMMAND_RIGHT NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38, WINDOWS: 91 // COMMAND }, // Place to store various widget extensions behaviors: {}, // Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value silentScroll: function( ypos ) { if ( $.type( ypos ) !== "number" ) { ypos = $.mobile.defaultHomeScroll; } // prevent scrollstart and scrollstop events $.event.special.scrollstart.enabled = false; setTimeout( function() { window.scrollTo( 0, ypos ); $.mobile.document.trigger( "silentscroll", { x: 0, y: ypos }); }, 20 ); setTimeout( function() { $.event.special.scrollstart.enabled = true; }, 150 ); }, // Expose our cache for testing purposes. nsNormalizeDict: nsNormalizeDict, // Take a data attribute property, prepend the namespace // and then camel case the attribute string. Add the result // to our nsNormalizeDict so we don't have to do this again. nsNormalize: function( prop ) { if ( !prop ) { return; } return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) ); }, // Find the closest parent with a theme class on it. Note that // we are not using $.fn.closest() on purpose here because this // method gets called quite a bit and we need it to be as fast // as possible. getInheritedTheme: function( el, defaultTheme ) { var e = el[ 0 ], ltr = "", re = /ui-(bar|body|overlay)-([a-z])\b/, c, m; while ( e ) { c = e.className || ""; if ( c && ( m = re.exec( c ) ) && ( ltr = m[ 2 ] ) ) { // We found a parent with a theme class // on it so bail from this loop. break; } e = e.parentNode; } // Return the theme letter we found, if none, return the // specified default. return ltr || defaultTheme || "a"; }, // TODO the following $ and $.fn extensions can/probably should be moved into jquery.mobile.core.helpers // // Find the closest javascript page element to gather settings data jsperf test // http://jsperf.com/single-complex-selector-vs-many-complex-selectors/edit // possibly naive, but it shows that the parsing overhead for *just* the page selector vs // the page and dialog selector is negligable. This could probably be speed up by // doing a similar parent node traversal to the one found in the inherited theme code above closestPageData: function( $target ) { return $target .closest( ':jqmData(role="page"), :jqmData(role="dialog")' ) .data( "mobile-page" ); }, enhanceable: function( $set ) { return this.haveParents( $set, "enhance" ); }, hijackable: function( $set ) { return this.haveParents( $set, "ajax" ); }, haveParents: function( $set, attr ) { if ( !$.mobile.ignoreContentEnabled ) { return $set; } var count = $set.length, $newSet = $(), e, $element, excluded; for ( var i = 0; i < count; i++ ) { $element = $set.eq( i ); excluded = false; e = $set[ i ]; while ( e ) { var c = e.getAttribute ? e.getAttribute( "data-" + $.mobile.ns + attr ) : ""; if ( c === "false" ) { excluded = true; break; } e = e.parentNode; } if ( !excluded ) { $newSet = $newSet.add( $element ); } } return $newSet; }, getScreenHeight: function() { // Native innerHeight returns more accurate value for this across platforms, // jQuery version is here as a normalized fallback for platforms like Symbian return window.innerHeight || $.mobile.window.height(); } }, $.mobile ); // Mobile version of data and removeData and hasData methods // ensures all data is set and retrieved using jQuery Mobile's data namespace $.fn.jqmData = function( prop, value ) { var result; if ( typeof prop !== "undefined" ) { if ( prop ) { prop = $.mobile.nsNormalize( prop ); } // undefined is permitted as an explicit input for the second param // in this case it returns the value and does not set it to undefined if( arguments.length < 2 || value === undefined ){ result = this.data( prop ); } else { result = this.data( prop, value ); } } return result; }; $.jqmData = function( elem, prop, value ) { var result; if ( typeof prop !== "undefined" ) { result = $.data( elem, prop ? $.mobile.nsNormalize( prop ) : prop, value ); } return result; }; $.fn.jqmRemoveData = function( prop ) { return this.removeData( $.mobile.nsNormalize( prop ) ); }; $.jqmRemoveData = function( elem, prop ) { return $.removeData( elem, $.mobile.nsNormalize( prop ) ); }; $.fn.removeWithDependents = function() { $.removeWithDependents( this ); }; $.removeWithDependents = function( elem ) { var $elem = $( elem ); ( $elem.jqmData( 'dependents' ) || $() ).remove(); $elem.remove(); }; $.fn.addDependents = function( newDependents ) { $.addDependents( $( this ), newDependents ); }; $.addDependents = function( elem, newDependents ) { var dependents = $( elem ).jqmData( 'dependents' ) || $(); $( elem ).jqmData( 'dependents', $.merge( dependents, newDependents ) ); }; // note that this helper doesn't attempt to handle the callback // or setting of an html element's text, its only purpose is // to return the html encoded version of the text in all cases. (thus the name) $.fn.getEncodedText = function() { return $( "<div/>" ).text( $( this ).text() ).html(); }; // fluent helper function for the mobile namespaced equivalent $.fn.jqmEnhanceable = function() { return $.mobile.enhanceable( this ); }; $.fn.jqmHijackable = function() { return $.mobile.hijackable( this ); }; // Monkey-patching Sizzle to filter the :jqmData selector var oldFind = $.find, jqmDataRE = /:jqmData\(([^)]*)\)/g; $.find = function( selector, context, ret, extra ) { selector = selector.replace( jqmDataRE, "[data-" + ( $.mobile.ns || "" ) + "$1]" ); return oldFind.call( this, selector, context, ret, extra ); }; $.extend( $.find, oldFind ); $.find.matches = function( expr, set ) { return $.find( expr, null, null, set ); }; $.find.matchesSelector = function( node, expr ) { return $.find( expr, null, null, [ node ] ).length > 0; }; })( jQuery, this ); /*! * jQuery UI Widget v1.10.0pre - 2012-11-13 (ff055a0c353c3c8ce6e5bfa07ad7cb03e8885bc5) * http://jqueryui.com * * Copyright 2010, 2013 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/jQuery.widget/ */ (function( $, undefined ) { var uuid = 0, slice = Array.prototype.slice, _cleanData = $.cleanData; $.cleanData = function( elems ) { for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { try { $( elem ).triggerHandler( "remove" ); // http://bugs.jquery.com/ticket/8235 } catch( e ) {} } _cleanData( elems ); }; $.widget = function( name, base, prototype ) { var fullName, existingConstructor, constructor, basePrototype, namespace = name.split( "." )[ 0 ]; name = name.split( "." )[ 1 ]; fullName = namespace + "-" + name; if ( !prototype ) { prototype = base; base = $.Widget; } // create selector for plugin $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { return !!$.data( elem, fullName ); }; $[ namespace ] = $[ namespace ] || {}; existingConstructor = $[ namespace ][ name ]; constructor = $[ namespace ][ name ] = function( options, element ) { // allow instantiation without "new" keyword if ( !this._createWidget ) { return new constructor( options, element ); } // allow instantiation without initializing for simple inheritance // must use "new" keyword (the code above always passes args) if ( arguments.length ) { this._createWidget( options, element ); } }; // extend with the existing constructor to carry over any static properties $.extend( constructor, existingConstructor, { version: prototype.version, // copy the object used to create the prototype in case we need to // redefine the widget later _proto: $.extend( {}, prototype ), // track widgets that inherit from this widget in case this widget is // redefined after a widget inherits from it _childConstructors: [] }); basePrototype = new base(); // we need to make the options hash a property directly on the new instance // otherwise we'll modify the options hash on the prototype that we're // inheriting from basePrototype.options = $.widget.extend( {}, basePrototype.options ); $.each( prototype, function( prop, value ) { if ( $.isFunction( value ) ) { prototype[ prop ] = (function() { var _super = function() { return base.prototype[ prop ].apply( this, arguments ); }, _superApply = function( args ) { return base.prototype[ prop ].apply( this, args ); }; return function() { var __super = this._super, __superApply = this._superApply, returnValue; this._super = _super; this._superApply = _superApply; returnValue = value.apply( this, arguments ); this._super = __super; this._superApply = __superApply; return returnValue; }; })(); } }); constructor.prototype = $.widget.extend( basePrototype, { // TODO: remove support for widgetEventPrefix // always use the name + a colon as the prefix, e.g., draggable:start // don't prefix for widgets that aren't DOM-based widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name }, prototype, { constructor: constructor, namespace: namespace, widgetName: name, widgetFullName: fullName }); // If this widget is being redefined then we need to find all widgets that // are inheriting from it and redefine all of them so that they inherit from // the new version of this widget. We're essentially trying to replace one // level in the prototype chain. if ( existingConstructor ) { $.each( existingConstructor._childConstructors, function( i, child ) { var childPrototype = child.prototype; // redefine the child widget using the same prototype that was // originally used, but inherit from the new version of the base $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); }); // remove the list of existing child constructors from the old constructor // so the old child constructors can be garbage collected delete existingConstructor._childConstructors; } else { base._childConstructors.push( constructor ); } $.widget.bridge( name, constructor ); }; $.widget.extend = function( target ) { var input = slice.call( arguments, 1 ), inputIndex = 0, inputLength = input.length, key, value; for ( ; inputIndex < inputLength; inputIndex++ ) { for ( key in input[ inputIndex ] ) { value = input[ inputIndex ][ key ]; if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { // Clone objects if ( $.isPlainObject( value ) ) { target[ key ] = $.isPlainObject( target[ key ] ) ? $.widget.extend( {}, target[ key ], value ) : // Don't extend strings, arrays, etc. with objects $.widget.extend( {}, value ); // Copy everything else by reference } else { target[ key ] = value; } } } } return target; }; $.widget.bridge = function( name, object ) { var fullName = object.prototype.widgetFullName || name; $.fn[ name ] = function( options ) { var isMethodCall = typeof options === "string", args = slice.call( arguments, 1 ), returnValue = this; // allow multiple hashes to be passed on init options = !isMethodCall && args.length ? $.widget.extend.apply( null, [ options ].concat(args) ) : options; if ( isMethodCall ) { this.each(function() { var methodValue, instance = $.data( this, fullName ); if ( !instance ) { return $.error( "cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'" ); } if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { return $.error( "no such method '" + options + "' for " + name + " widget instance" ); } methodValue = instance[ options ].apply( instance, args ); if ( methodValue !== instance && methodValue !== undefined ) { returnValue = methodValue && methodValue.jquery ? returnValue.pushStack( methodValue.get() ) : methodValue; return false; } }); } else { this.each(function() { var instance = $.data( this, fullName ); if ( instance ) { instance.option( options || {} )._init(); } else { $.data( this, fullName, new object( options, this ) ); } }); } return returnValue; }; }; $.Widget = function( /* options, element */ ) {}; $.Widget._childConstructors = []; $.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { disabled: false, // callbacks create: null }, _createWidget: function( options, element ) { element = $( element || this.defaultElement || this )[ 0 ]; this.element = $( element ); this.uuid = uuid++; this.eventNamespace = "." + this.widgetName + this.uuid; this.options = $.widget.extend( {}, this.options, this._getCreateOptions(), options ); this.bindings = $(); this.hoverable = $(); this.focusable = $(); if ( element !== this ) { $.data( element, this.widgetFullName, this ); this._on( true, this.element, { remove: function( event ) { if ( event.target === element ) { this.destroy(); } } }); this.document = $( element.style ? // element within the document element.ownerDocument : // element is window or document element.document || element ); this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); } this._create(); this._trigger( "create", null, this._getCreateEventData() ); this._init(); }, _getCreateOptions: $.noop, _getCreateEventData: $.noop, _create: $.noop, _init: $.noop, destroy: function() { this._destroy(); // we can probably remove the unbind calls in 2.0 // all event bindings should go through this._on() this.element .unbind( this.eventNamespace ) // 1.9 BC for #7810 // TODO remove dual storage .removeData( this.widgetName ) .removeData( this.widgetFullName ) // support: jquery <1.6.3 // http://bugs.jquery.com/ticket/9413 .removeData( $.camelCase( this.widgetFullName ) ); this.widget() .unbind( this.eventNamespace ) .removeAttr( "aria-disabled" ) .removeClass( this.widgetFullName + "-disabled " + "ui-state-disabled" ); // clean up events and states this.bindings.unbind( this.eventNamespace ); this.hoverable.removeClass( "ui-state-hover" ); this.focusable.removeClass( "ui-state-focus" ); }, _destroy: $.noop, widget: function() { return this.element; }, option: function( key, value ) { var options = key, parts, curOption, i; if ( arguments.length === 0 ) { // don't return a reference to the internal hash return $.widget.extend( {}, this.options ); } if ( typeof key === "string" ) { // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } options = {}; parts = key.split( "." ); key = parts.shift(); if ( parts.length ) { curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); for ( i = 0; i < parts.length - 1; i++ ) { curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; curOption = curOption[ parts[ i ] ]; } key = parts.pop(); if ( value === undefined ) { return curOption[ key ] === undefined ? null : curOption[ key ]; } curOption[ key ] = value; } else { if ( value === undefined ) { return this.options[ key ] === undefined ? null : this.options[ key ]; } options[ key ] = value; } } this._setOptions( options ); return this; }, _setOptions: function( options ) { var key; for ( key in options ) { this._setOption( key, options[ key ] ); } return this; }, _setOption: function( key, value ) { this.options[ key ] = value; if ( key === "disabled" ) { this.widget() .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) .attr( "aria-disabled", value ); this.hoverable.removeClass( "ui-state-hover" ); this.focusable.removeClass( "ui-state-focus" ); } return this; }, enable: function() { return this._setOption( "disabled", false ); }, disable: function() { return this._setOption( "disabled", true ); }, _on: function( suppressDisabledCheck, element, handlers ) { var delegateElement, instance = this; // no suppressDisabledCheck flag, shuffle arguments if ( typeof suppressDisabledCheck !== "boolean" ) { handlers = element; element = suppressDisabledCheck; suppressDisabledCheck = false; } // no element argument, shuffle and use this.element if ( !handlers ) { handlers = element; element = this.element; delegateElement = this.widget(); } else { // accept selectors, DOM elements element = delegateElement = $( element ); this.bindings = this.bindings.add( element ); } $.each( handlers, function( event, handler ) { function handlerProxy() { // allow widgets to customize the disabled handling // - disabled as an array instead of boolean // - disabled class as method for disabling individual parts if ( !suppressDisabledCheck && ( instance.options.disabled === true || $( this ).hasClass( "ui-state-disabled" ) ) ) { return; } return ( typeof handler === "string" ? instance[ handler ] : handler ) .apply( instance, arguments ); } // copy the guid so direct unbinding works if ( typeof handler !== "string" ) { handlerProxy.guid = handler.guid = handler.guid || handlerProxy.guid || $.guid++; } var match = event.match( /^(\w+)\s*(.*)$/ ), eventName = match[1] + instance.eventNamespace, selector = match[2]; if ( selector ) { delegateElement.delegate( selector, eventName, handlerProxy ); } else { element.bind( eventName, handlerProxy ); } }); }, _off: function( element, eventName ) { eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; element.unbind( eventName ).undelegate( eventName ); }, _delay: function( handler, delay ) { function handlerProxy() { return ( typeof handler === "string" ? instance[ handler ] : handler ) .apply( instance, arguments ); } var instance = this; return setTimeout( handlerProxy, delay || 0 ); }, _hoverable: function( element ) { this.hoverable = this.hoverable.add( element ); this._on( element, { mouseenter: function( event ) { $( event.currentTarget ).addClass( "ui-state-hover" ); }, mouseleave: function( event ) { $( event.currentTarget ).removeClass( "ui-state-hover" ); } }); }, _focusable: function( element ) { this.focusable = this.focusable.add( element ); this._on( element, { focusin: function( event ) { $( event.currentTarget ).addClass( "ui-state-focus" ); }, focusout: function( event ) { $( event.currentTarget ).removeClass( "ui-state-focus" ); } }); }, _trigger: function( type, event, data ) { var prop, orig, callback = this.options[ type ]; data = data || {}; event = $.Event( event ); event.type = ( type === this.widgetEventPrefix ? type : this.widgetEventPrefix + type ).toLowerCase(); // the original event may come from any element // so we need to reset the target on the new event event.target = this.element[ 0 ]; // copy original event properties over to the new event orig = event.originalEvent; if ( orig ) { for ( prop in orig ) { if ( !( prop in event ) ) { event[ prop ] = orig[ prop ]; } } } this.element.trigger( event, data ); return !( $.isFunction( callback ) && callback.apply( this.element[0], [ event ].concat( data ) ) === false || event.isDefaultPrevented() ); } }; $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { if ( typeof options === "string" ) { options = { effect: options }; } var hasOptions, effectName = !options ? method : options === true || typeof options === "number" ? defaultEffect : options.effect || defaultEffect; options = options || {}; if ( typeof options === "number" ) { options = { duration: options }; } hasOptions = !$.isEmptyObject( options ); options.complete = callback; if ( options.delay ) { element.delay( options.delay ); } if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { element[ method ]( options ); } else if ( effectName !== method && element[ effectName ] ) { element[ effectName ]( options.duration, options.easing, callback ); } else { element.queue(function( next ) { $( this )[ method ](); if ( callback ) { callback.call( element[ 0 ] ); } next(); }); } }; }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.widget", { // decorate the parent _createWidget to trigger `widgetinit` for users // who wish to do post post `widgetcreate` alterations/additions // // TODO create a pull request for jquery ui to trigger this event // in the original _createWidget _createWidget: function() { $.Widget.prototype._createWidget.apply( this, arguments ); this._trigger( 'init' ); }, _getCreateOptions: function() { var elem = this.element, options = {}; $.each( this.options, function( option ) { var value = elem.jqmData( option.replace( /[A-Z]/g, function( c ) { return "-" + c.toLowerCase(); }) ); if ( value !== undefined ) { options[ option ] = value; } }); return options; }, enhanceWithin: function( target, useKeepNative ) { this.enhance( $( this.options.initSelector, $( target )), useKeepNative ); }, enhance: function( targets, useKeepNative ) { var page, keepNative, $widgetElements = $( targets ), self = this; // if ignoreContentEnabled is set to true the framework should // only enhance the selected elements when they do NOT have a // parent with the data-namespace-ignore attribute $widgetElements = $.mobile.enhanceable( $widgetElements ); if ( useKeepNative && $widgetElements.length ) { // TODO remove dependency on the page widget for the keepNative. // Currently the keepNative value is defined on the page prototype so // the method is as well page = $.mobile.closestPageData( $widgetElements ); keepNative = ( page && page.keepNativeSelector()) || ""; $widgetElements = $widgetElements.not( keepNative ); } $widgetElements[ this.widgetName ](); }, raise: function( msg ) { throw "Widget [" + this.widgetName + "]: " + msg; } }); })( jQuery ); (function( $, window ) { // DEPRECATED // NOTE global mobile object settings $.extend( $.mobile, { // DEPRECATED Should the text be visble in the loading message? loadingMessageTextVisible: undefined, // DEPRECATED When the text is visible, what theme does the loading box use? loadingMessageTheme: undefined, // DEPRECATED default message setting loadingMessage: undefined, // DEPRECATED // Turn on/off page loading message. Theme doubles as an object argument // with the following shape: { theme: '', text: '', html: '', textVisible: '' } // NOTE that the $.mobile.loading* settings and params past the first are deprecated showPageLoadingMsg: function( theme, msgText, textonly ) { $.mobile.loading( 'show', theme, msgText, textonly ); }, // DEPRECATED hidePageLoadingMsg: function() { $.mobile.loading( 'hide' ); }, loading: function() { this.loaderWidget.loader.apply( this.loaderWidget, arguments ); } }); // TODO move loader class down into the widget settings var loaderClass = "ui-loader", $html = $( "html" ), $window = $.mobile.window; $.widget( "mobile.loader", { // NOTE if the global config settings are defined they will override these // options options: { // the theme for the loading message theme: "a", // whether the text in the loading message is shown textVisible: false, // custom html for the inner content of the loading message html: "", // the text to be displayed when the popup is shown text: "loading" }, defaultHtml: "<div class='" + loaderClass + "'>" + "<span class='ui-icon ui-icon-loading'></span>" + "<h1></h1>" + "</div>", // For non-fixed supportin browsers. Position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top fakeFixLoader: function() { var activeBtn = $( "." + $.mobile.activeBtnClass ).first(); this.element .css({ top: $.support.scrollTop && $window.scrollTop() + $window.height() / 2 || activeBtn.length && activeBtn.offset().top || 100 }); }, // check position of loader to see if it appears to be "fixed" to center // if not, use abs positioning checkLoaderPosition: function() { var offset = this.element.offset(), scrollTop = $window.scrollTop(), screenHeight = $.mobile.getScreenHeight(); if ( offset.top < scrollTop || ( offset.top - scrollTop ) > screenHeight ) { this.element.addClass( "ui-loader-fakefix" ); this.fakeFixLoader(); $window .unbind( "scroll", this.checkLoaderPosition ) .bind( "scroll", $.proxy( this.fakeFixLoader, this ) ); } }, resetHtml: function() { this.element.html( $( this.defaultHtml ).html() ); }, // Turn on/off page loading message. Theme doubles as an object argument // with the following shape: { theme: '', text: '', html: '', textVisible: '' } // NOTE that the $.mobile.loading* settings and params past the first are deprecated // TODO sweet jesus we need to break some of this out show: function( theme, msgText, textonly ) { var textVisible, message, $header, loadSettings; this.resetHtml(); // use the prototype options so that people can set them globally at // mobile init. Consistency, it's what's for dinner if ( $.type(theme) === "object" ) { loadSettings = $.extend( {}, this.options, theme ); // prefer object property from the param then the old theme setting theme = loadSettings.theme || $.mobile.loadingMessageTheme; } else { loadSettings = this.options; // here we prefer the them value passed as a string argument, then // we prefer the global option because we can't use undefined default // prototype options, then the prototype option theme = theme || $.mobile.loadingMessageTheme || loadSettings.theme; } // set the message text, prefer the param, then the settings object // then loading message message = msgText || $.mobile.loadingMessage || loadSettings.text; // prepare the dom $html.addClass( "ui-loading" ); if ( $.mobile.loadingMessage !== false || loadSettings.html ) { // boolean values require a bit more work :P, supports object properties // and old settings if ( $.mobile.loadingMessageTextVisible !== undefined ) { textVisible = $.mobile.loadingMessageTextVisible; } else { textVisible = loadSettings.textVisible; } // add the proper css given the options (theme, text, etc) // Force text visibility if the second argument was supplied, or // if the text was explicitly set in the object args this.element.attr("class", loaderClass + " ui-corner-all ui-body-" + theme + " ui-loader-" + ( textVisible || msgText || theme.text ? "verbose" : "default" ) + ( loadSettings.textonly || textonly ? " ui-loader-textonly" : "" ) ); // TODO verify that jquery.fn.html is ok to use in both cases here // this might be overly defensive in preventing unknowing xss // if the html attribute is defined on the loading settings, use that // otherwise use the fallbacks from above if ( loadSettings.html ) { this.element.html( loadSettings.html ); } else { this.element.find( "h1" ).text( message ); } // attach the loader to the DOM this.element.appendTo( $.mobile.pageContainer ); // check that the loader is visible this.checkLoaderPosition(); // on scroll check the loader position $window.bind( "scroll", $.proxy( this.checkLoaderPosition, this ) ); } }, hide: function() { $html.removeClass( "ui-loading" ); if ( $.mobile.loadingMessage ) { this.element.removeClass( "ui-loader-fakefix" ); } $.mobile.window.unbind( "scroll", this.fakeFixLoader ); $.mobile.window.unbind( "scroll", this.checkLoaderPosition ); } }); $window.bind( 'pagecontainercreate', function() { $.mobile.loaderWidget = $.mobile.loaderWidget || $( $.mobile.loader.prototype.defaultHtml ).loader(); }); })(jQuery, this); // Script: jQuery hashchange event // // *Version: 1.3, Last updated: 7/21/2010* // // Project Home - http://benalman.com/projects/jquery-hashchange-plugin/ // GitHub - http://github.com/cowboy/jquery-hashchange/ // Source - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js // (Minified) - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped) // // About: License // // Copyright (c) 2010 "Cowboy" Ben Alman, // Dual licensed under the MIT and GPL licenses. // http://benalman.com/about/license/ // // About: Examples // // These working examples, complete with fully commented code, illustrate a few // ways in which this plugin can be used. // // hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/ // document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/ // // About: Support and Testing // // Information about what version or versions of jQuery this plugin has been // tested with, what browsers it has been tested in, and where the unit tests // reside (so you can test it yourself). // // jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2 // Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5, // Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5. // Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/ // // About: Known issues // // While this jQuery hashchange event implementation is quite stable and // robust, there are a few unfortunate browser bugs surrounding expected // hashchange event-based behaviors, independent of any JavaScript // window.onhashchange abstraction. See the following examples for more // information: // // Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/ // Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/ // WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/ // Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/ // // Also note that should a browser natively support the window.onhashchange // event, but not report that it does, the fallback polling loop will be used. // // About: Release History // // 1.3 - (7/21/2010) Reorganized IE6/7 Iframe code to make it more // "removable" for mobile-only development. Added IE6/7 document.title // support. Attempted to make Iframe as hidden as possible by using // techniques from http://www.paciellogroup.com/blog/?p=604. Added // support for the "shortcut" format $(window).hashchange( fn ) and // $(window).hashchange() like jQuery provides for built-in events. // Renamed jQuery.hashchangeDelay to <jQuery.fn.hashchange.delay> and // lowered its default value to 50. Added <jQuery.fn.hashchange.domain> // and <jQuery.fn.hashchange.src> properties plus document-domain.html // file to address access denied issues when setting document.domain in // IE6/7. // 1.2 - (2/11/2010) Fixed a bug where coming back to a page using this plugin // from a page on another domain would cause an error in Safari 4. Also, // IE6/7 Iframe is now inserted after the body (this actually works), // which prevents the page from scrolling when the event is first bound. // Event can also now be bound before DOM ready, but it won't be usable // before then in IE6/7. // 1.1 - (1/21/2010) Incorporated document.documentMode test to fix IE8 bug // where browser version is incorrectly reported as 8.0, despite // inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag. // 1.0 - (1/9/2010) Initial Release. Broke out the jQuery BBQ event.special // window.onhashchange functionality into a separate plugin for users // who want just the basic event & back button support, without all the // extra awesomeness that BBQ provides. This plugin will be included as // part of jQuery BBQ, but also be available separately. (function( $, window, undefined ) { // Reused string. var str_hashchange = 'hashchange', // Method / object references. doc = document, fake_onhashchange, special = $.event.special, // Does the browser support window.onhashchange? Note that IE8 running in // IE7 compatibility mode reports true for 'onhashchange' in window, even // though the event isn't supported, so also test document.documentMode. doc_mode = doc.documentMode, supports_onhashchange = 'on' + str_hashchange in window && ( doc_mode === undefined || doc_mode > 7 ); // Get location.hash (or what you'd expect location.hash to be) sans any // leading #. Thanks for making this necessary, Firefox! function get_fragment( url ) { url = url || location.href; return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' ); }; // Method: jQuery.fn.hashchange // // Bind a handler to the window.onhashchange event or trigger all bound // window.onhashchange event handlers. This behavior is consistent with // jQuery's built-in event handlers. // // Usage: // // > jQuery(window).hashchange( [ handler ] ); // // Arguments: // // handler - (Function) Optional handler to be bound to the hashchange // event. This is a "shortcut" for the more verbose form: // jQuery(window).bind( 'hashchange', handler ). If handler is omitted, // all bound window.onhashchange event handlers will be triggered. This // is a shortcut for the more verbose // jQuery(window).trigger( 'hashchange' ). These forms are described in // the <hashchange event> section. // // Returns: // // (jQuery) The initial jQuery collection of elements. // Allow the "shortcut" format $(elem).hashchange( fn ) for binding and // $(elem).hashchange() for triggering, like jQuery does for built-in events. $.fn[ str_hashchange ] = function( fn ) { return fn ? this.bind( str_hashchange, fn ) : this.trigger( str_hashchange ); }; // Property: jQuery.fn.hashchange.delay // // The numeric interval (in milliseconds) at which the <hashchange event> // polling loop executes. Defaults to 50. // Property: jQuery.fn.hashchange.domain // // If you're setting document.domain in your JavaScript, and you want hash // history to work in IE6/7, not only must this property be set, but you must // also set document.domain BEFORE jQuery is loaded into the page. This // property is only applicable if you are supporting IE6/7 (or IE8 operating // in "IE7 compatibility" mode). // // In addition, the <jQuery.fn.hashchange.src> property must be set to the // path of the included "document-domain.html" file, which can be renamed or // modified if necessary (note that the document.domain specified must be the // same in both your main JavaScript as well as in this file). // // Usage: // // jQuery.fn.hashchange.domain = document.domain; // Property: jQuery.fn.hashchange.src // // If, for some reason, you need to specify an Iframe src file (for example, // when setting document.domain as in <jQuery.fn.hashchange.domain>), you can // do so using this property. Note that when using this property, history // won't be recorded in IE6/7 until the Iframe src file loads. This property // is only applicable if you are supporting IE6/7 (or IE8 operating in "IE7 // compatibility" mode). // // Usage: // // jQuery.fn.hashchange.src = 'path/to/file.html'; $.fn[ str_hashchange ].delay = 50; /* $.fn[ str_hashchange ].domain = null; $.fn[ str_hashchange ].src = null; */ // Event: hashchange event // // Fired when location.hash changes. In browsers that support it, the native // HTML5 window.onhashchange event is used, otherwise a polling loop is // initialized, running every <jQuery.fn.hashchange.delay> milliseconds to // see if the hash has changed. In IE6/7 (and IE8 operating in "IE7 // compatibility" mode), a hidden Iframe is created to allow the back button // and hash-based history to work. // // Usage as described in <jQuery.fn.hashchange>: // // > // Bind an event handler. // > jQuery(window).hashchange( function(e) { // > var hash = location.hash; // > ... // > }); // > // > // Manually trigger the event handler. // > jQuery(window).hashchange(); // // A more verbose usage that allows for event namespacing: // // > // Bind an event handler. // > jQuery(window).bind( 'hashchange', function(e) { // > var hash = location.hash; // > ... // > }); // > // > // Manually trigger the event handler. // > jQuery(window).trigger( 'hashchange' ); // // Additional Notes: // // * The polling loop and Iframe are not created until at least one handler // is actually bound to the 'hashchange' event. // * If you need the bound handler(s) to execute immediately, in cases where // a location.hash exists on page load, via bookmark or page refresh for // example, use jQuery(window).hashchange() or the more verbose // jQuery(window).trigger( 'hashchange' ). // * The event can be bound before DOM ready, but since it won't be usable // before then in IE6/7 (due to the necessary Iframe), recommended usage is // to bind it inside a DOM ready handler. // Override existing $.event.special.hashchange methods (allowing this plugin // to be defined after jQuery BBQ in BBQ's source code). special[ str_hashchange ] = $.extend( special[ str_hashchange ], { // Called only when the first 'hashchange' event is bound to window. setup: function() { // If window.onhashchange is supported natively, there's nothing to do.. if ( supports_onhashchange ) { return false; } // Otherwise, we need to create our own. And we don't want to call this // until the user binds to the event, just in case they never do, since it // will create a polling loop and possibly even a hidden Iframe. $( fake_onhashchange.start ); }, // Called only when the last 'hashchange' event is unbound from window. teardown: function() { // If window.onhashchange is supported natively, there's nothing to do.. if ( supports_onhashchange ) { return false; } // Otherwise, we need to stop ours (if possible). $( fake_onhashchange.stop ); } }); // fake_onhashchange does all the work of triggering the window.onhashchange // event for browsers that don't natively support it, including creating a // polling loop to watch for hash changes and in IE 6/7 creating a hidden // Iframe to enable back and forward. fake_onhashchange = (function() { var self = {}, timeout_id, // Remember the initial hash so it doesn't get triggered immediately. last_hash = get_fragment(), fn_retval = function( val ) { return val; }, history_set = fn_retval, history_get = fn_retval; // Start the polling loop. self.start = function() { timeout_id || poll(); }; // Stop the polling loop. self.stop = function() { timeout_id && clearTimeout( timeout_id ); timeout_id = undefined; }; // This polling loop checks every $.fn.hashchange.delay milliseconds to see // if location.hash has changed, and triggers the 'hashchange' event on // window when necessary. function poll() { var hash = get_fragment(), history_hash = history_get( last_hash ); if ( hash !== last_hash ) { history_set( last_hash = hash, history_hash ); $(window).trigger( str_hashchange ); } else if ( history_hash !== last_hash ) { location.href = location.href.replace( /#.*/, '' ) + history_hash; } timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay ); }; // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv // vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv window.attachEvent && !window.addEventListener && !supports_onhashchange && (function() { // Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8 // when running in "IE7 compatibility" mode. var iframe, iframe_src; // When the event is bound and polling starts in IE 6/7, create a hidden // Iframe for history handling. self.start = function() { if ( !iframe ) { iframe_src = $.fn[ str_hashchange ].src; iframe_src = iframe_src && iframe_src + get_fragment(); // Create hidden Iframe. Attempt to make Iframe as hidden as possible // by using techniques from http://www.paciellogroup.com/blog/?p=604. iframe = $('<iframe tabindex="-1" title="empty"/>').hide() // When Iframe has completely loaded, initialize the history and // start polling. .one( 'load', function() { iframe_src || history_set( get_fragment() ); poll(); }) // Load Iframe src if specified, otherwise nothing. .attr( 'src', iframe_src || 'javascript:0' ) // Append Iframe after the end of the body to prevent unnecessary // initial page scrolling (yes, this works). .insertAfter( 'body' )[0].contentWindow; // Whenever `document.title` changes, update the Iframe's title to // prettify the back/next history menu entries. Since IE sometimes // errors with "Unspecified error" the very first time this is set // (yes, very useful) wrap this with a try/catch block. doc.onpropertychange = function() { try { if ( event.propertyName === 'title' ) { iframe.document.title = doc.title; } } catch(e) {} }; } }; // Override the "stop" method since an IE6/7 Iframe was created. Even // if there are no longer any bound event handlers, the polling loop // is still necessary for back/next to work at all! self.stop = fn_retval; // Get history by looking at the hidden Iframe's location.hash. history_get = function() { return get_fragment( iframe.location.href ); }; // Set a new history item by opening and then closing the Iframe // document, *then* setting its location.hash. If document.domain has // been set, update that as well. history_set = function( hash, history_hash ) { var iframe_doc = iframe.document, domain = $.fn[ str_hashchange ].domain; if ( hash !== history_hash ) { // Update Iframe with any initial `document.title` that might be set. iframe_doc.title = doc.title; // Opening the Iframe's document after it has been closed is what // actually adds a history entry. iframe_doc.open(); // Set document.domain for the Iframe document as well, if necessary. domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' ); iframe_doc.close(); // Update the Iframe's hash, for great justice. iframe.location.hash = hash; } }; })(); // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // ^^^^^^^^^^^^^^^^^^^ REMOVE IF NOT SUPPORTING IE6/7/8 ^^^^^^^^^^^^^^^^^^^ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return self; })(); })(jQuery,this); (function( $, undefined ) { /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ window.matchMedia = window.matchMedia || (function( doc, undefined ) { var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, // fakeBody required for <FF4 when executed in <head> fakeBody = doc.createElement( "body" ), div = doc.createElement( "div" ); div.id = "mq-test-1"; div.style.cssText = "position:absolute;top:-100em"; fakeBody.style.background = "none"; fakeBody.appendChild(div); return function(q){ div.innerHTML = "&shy;<style media=\"" + q + "\"> #mq-test-1 { width: 42px; }</style>"; docElem.insertBefore( fakeBody, refNode ); bool = div.offsetWidth === 42; docElem.removeChild( fakeBody ); return { matches: bool, media: q }; }; }( document )); // $.mobile.media uses matchMedia to return a boolean. $.mobile.media = function( q ) { return window.matchMedia( q ).matches; }; })(jQuery); (function( $, undefined ) { var support = { touch: "ontouchend" in document }; $.mobile.support = $.mobile.support || {}; $.extend( $.support, support ); $.extend( $.mobile.support, support ); }( jQuery )); (function( $, undefined ) { $.extend( $.support, { orientation: "orientation" in window && "onorientationchange" in window }); }( jQuery )); (function( $, undefined ) { // thx Modernizr function propExists( prop ) { var uc_prop = prop.charAt( 0 ).toUpperCase() + prop.substr( 1 ), props = ( prop + " " + vendors.join( uc_prop + " " ) + uc_prop ).split( " " ); for ( var v in props ) { if ( fbCSS[ props[ v ] ] !== undefined ) { return true; } } } var fakeBody = $( "<body>" ).prependTo( "html" ), fbCSS = fakeBody[ 0 ].style, vendors = [ "Webkit", "Moz", "O" ], webos = "palmGetResource" in window, //only used to rule out scrollTop opera = window.opera, operamini = window.operamini && ({}).toString.call( window.operamini ) === "[object OperaMini]", bb = window.blackberry && !propExists( "-webkit-transform" ); //only used to rule out box shadow, as it's filled opaque on BB 5 and lower function validStyle( prop, value, check_vend ) { var div = document.createElement( 'div' ), uc = function( txt ) { return txt.charAt( 0 ).toUpperCase() + txt.substr( 1 ); }, vend_pref = function( vend ) { if( vend === "" ) { return ""; } else { return "-" + vend.charAt( 0 ).toLowerCase() + vend.substr( 1 ) + "-"; } }, check_style = function( vend ) { var vend_prop = vend_pref( vend ) + prop + ": " + value + ";", uc_vend = uc( vend ), propStyle = uc_vend + ( uc_vend === "" ? prop : uc( prop ) ); div.setAttribute( "style", vend_prop ); if ( !!div.style[ propStyle ] ) { ret = true; } }, check_vends = check_vend ? check_vend : vendors, ret; for( var i = 0; i < check_vends.length; i++ ) { check_style( check_vends[i] ); } return !!ret; } function transform3dTest() { var mqProp = "transform-3d", // Because the `translate3d` test below throws false positives in Android: ret = $.mobile.media( "(-" + vendors.join( "-" + mqProp + "),(-" ) + "-" + mqProp + "),(" + mqProp + ")" ); if( ret ) { return !!ret; } var el = document.createElement( "div" ), transforms = { // We’re omitting Opera for the time being; MS uses unprefixed. 'MozTransform':'-moz-transform', 'transform':'transform' }; fakeBody.append( el ); for ( var t in transforms ) { if( el.style[ t ] !== undefined ){ el.style[ t ] = 'translate3d( 100px, 1px, 1px )'; ret = window.getComputedStyle( el ).getPropertyValue( transforms[ t ] ); } } return ( !!ret && ret !== "none" ); } // Test for dynamic-updating base tag support ( allows us to avoid href,src attr rewriting ) function baseTagTest() { var fauxBase = location.protocol + "//" + location.host + location.pathname + "ui-dir/", base = $( "head base" ), fauxEle = null, href = "", link, rebase; if ( !base.length ) { base = fauxEle = $( "<base>", { "href": fauxBase }).appendTo( "head" ); } else { href = base.attr( "href" ); } link = $( "<a href='testurl' />" ).prependTo( fakeBody ); rebase = link[ 0 ].href; base[ 0 ].href = href || location.pathname; if ( fauxEle ) { fauxEle.remove(); } return rebase.indexOf( fauxBase ) === 0; } // Thanks Modernizr function cssPointerEventsTest() { var element = document.createElement( 'x' ), documentElement = document.documentElement, getComputedStyle = window.getComputedStyle, supports; if ( !( 'pointerEvents' in element.style ) ) { return false; } element.style.pointerEvents = 'auto'; element.style.pointerEvents = 'x'; documentElement.appendChild( element ); supports = getComputedStyle && getComputedStyle( element, '' ).pointerEvents === 'auto'; documentElement.removeChild( element ); return !!supports; } function boundingRect() { var div = document.createElement( "div" ); return typeof div.getBoundingClientRect !== "undefined"; } // non-UA-based IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683 // allows for inclusion of IE 6+, including Windows Mobile 7 $.extend( $.mobile, { browser: {} } ); $.mobile.browser.oldIE = (function() { var v = 3, div = document.createElement( "div" ), a = div.all || []; do { div.innerHTML = "<!--[if gt IE " + ( ++v ) + "]><br><![endif]-->"; } while( a[0] ); return v > 4 ? v : !v; })(); function fixedPosition() { var w = window, ua = navigator.userAgent, platform = navigator.platform, // Rendering engine is Webkit, and capture major version wkmatch = ua.match( /AppleWebKit\/([0-9]+)/ ), wkversion = !!wkmatch && wkmatch[ 1 ], ffmatch = ua.match( /Fennec\/([0-9]+)/ ), ffversion = !!ffmatch && ffmatch[ 1 ], operammobilematch = ua.match( /Opera Mobi\/([0-9]+)/ ), omversion = !!operammobilematch && operammobilematch[ 1 ]; if( // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5) ( ( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1 || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534 ) || // Opera Mini ( w.operamini && ({}).toString.call( w.operamini ) === "[object OperaMini]" ) || ( operammobilematch && omversion < 7458 ) || //Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2) ( ua.indexOf( "Android" ) > -1 && wkversion && wkversion < 533 ) || // Firefox Mobile before 6.0 - ( ffversion && ffversion < 6 ) || // WebOS less than 3 ( "palmGetResource" in window && wkversion && wkversion < 534 ) || // MeeGo ( ua.indexOf( "MeeGo" ) > -1 && ua.indexOf( "NokiaBrowser/8.5.0" ) > -1 ) ) { return false; } return true; } $.extend( $.support, { cssTransitions: "WebKitTransitionEvent" in window || validStyle( 'transition', 'height 100ms linear', [ "Webkit", "Moz", "" ] ) && !$.mobile.browser.oldIE && !opera, // Note, Chrome for iOS has an extremely quirky implementation of popstate. // We've chosen to take the shortest path to a bug fix here for issue #5426 // See the following link for information about the regex chosen // https://developers.google.com/chrome/mobile/docs/user-agent#chrome_for_ios_user-agent pushState: "pushState" in history && "replaceState" in history && // When running inside a FF iframe, calling replaceState causes an error !( window.navigator.userAgent.indexOf( "Firefox" ) >= 0 && window.top !== window ) && ( window.navigator.userAgent.search(/CriOS/) === -1 ), mediaquery: $.mobile.media( "only all" ), cssPseudoElement: !!propExists( "content" ), touchOverflow: !!propExists( "overflowScrolling" ), cssTransform3d: transform3dTest(), boxShadow: !!propExists( "boxShadow" ) && !bb, fixedPosition: fixedPosition(), scrollTop: ("pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[ 0 ]) && !webos && !operamini, dynamicBaseTag: baseTagTest(), cssPointerEvents: cssPointerEventsTest(), boundingRect: boundingRect() }); fakeBody.remove(); // $.mobile.ajaxBlacklist is used to override ajaxEnabled on platforms that have known conflicts with hash history updates (BB5, Symbian) // or that generally work better browsing in regular http for full page refreshes (Opera Mini) // Note: This detection below is used as a last resort. // We recommend only using these detection methods when all other more reliable/forward-looking approaches are not possible var nokiaLTE7_3 = (function() { var ua = window.navigator.userAgent; //The following is an attempt to match Nokia browsers that are running Symbian/s60, with webkit, version 7.3 or older return ua.indexOf( "Nokia" ) > -1 && ( ua.indexOf( "Symbian/3" ) > -1 || ua.indexOf( "Series60/5" ) > -1 ) && ua.indexOf( "AppleWebKit" ) > -1 && ua.match( /(BrowserNG|NokiaBrowser)\/7\.[0-3]/ ); })(); // Support conditions that must be met in order to proceed // default enhanced qualifications are media query support OR IE 7+ $.mobile.gradeA = function() { return ( $.support.mediaquery || $.mobile.browser.oldIE && $.mobile.browser.oldIE >= 7 ) && ( $.support.boundingRect || $.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/) !== null ); }; $.mobile.ajaxBlacklist = // BlackBerry browsers, pre-webkit window.blackberry && !window.WebKitPoint || // Opera Mini operamini || // Symbian webkits pre 7.3 nokiaLTE7_3; // Lastly, this workaround is the only way we've found so far to get pre 7.3 Symbian webkit devices // to render the stylesheets when they're referenced before this script, as we'd recommend doing. // This simply reappends the CSS in place, which for some reason makes it apply if ( nokiaLTE7_3 ) { $(function() { $( "head link[rel='stylesheet']" ).attr( "rel", "alternate stylesheet" ).attr( "rel", "stylesheet" ); }); } // For ruling out shadows via css if ( !$.support.boxShadow ) { $( "html" ).addClass( "ui-mobile-nosupport-boxshadow" ); } })( jQuery ); (function( $, undefined ) { var $win = $.mobile.window, self, history; $.event.special.navigate = self = { bound: false, pushStateEnabled: true, originalEventName: undefined, // If pushstate support is present and push state support is defined to // be true on the mobile namespace. isPushStateEnabled: function() { return $.support.pushState && $.mobile.pushStateEnabled === true && this.isHashChangeEnabled(); }, // !! assumes mobile namespace is present isHashChangeEnabled: function() { return $.mobile.hashListeningEnabled === true; }, // TODO a lot of duplication between popstate and hashchange popstate: function( event ) { var newEvent = new $.Event( "navigate" ), beforeNavigate = new $.Event( "beforenavigate" ), state = event.originalEvent.state || {}, href = location.href; $win.trigger( beforeNavigate ); if( beforeNavigate.isDefaultPrevented() ){ return; } if( event.historyState ){ $.extend(state, event.historyState); } // Make sure the original event is tracked for the end // user to inspect incase they want to do something special newEvent.originalEvent = event; // NOTE we let the current stack unwind because any assignment to // location.hash will stop the world and run this event handler. By // doing this we create a similar behavior to hashchange on hash // assignment setTimeout(function() { $win.trigger( newEvent, { state: state }); }, 0); }, hashchange: function( event, data ) { var newEvent = new $.Event( "navigate" ), beforeNavigate = new $.Event( "beforenavigate" ); $win.trigger( beforeNavigate ); if( beforeNavigate.isDefaultPrevented() ){ return; } // Make sure the original event is tracked for the end // user to inspect incase they want to do something special newEvent.originalEvent = event; // Trigger the hashchange with state provided by the user // that altered the hash $win.trigger( newEvent, { // Users that want to fully normalize the two events // will need to do history management down the stack and // add the state to the event before this binding is fired // TODO consider allowing for the explicit addition of callbacks // to be fired before this value is set to avoid event timing issues state: event.hashchangeState || {} }); }, // TODO We really only want to set this up once // but I'm not clear if there's a beter way to achieve // this with the jQuery special event structure setup: function( data, namespaces ) { if( self.bound ) { return; } self.bound = true; if( self.isPushStateEnabled() ) { self.originalEventName = "popstate"; $win.bind( "popstate.navigate", self.popstate ); } else if ( self.isHashChangeEnabled() ){ self.originalEventName = "hashchange"; $win.bind( "hashchange.navigate", self.hashchange ); } } }; })( jQuery ); (function( $, undefined ) { var path, documentBase, $base, dialogHashKey = "&ui-state=dialog"; $.mobile.path = path = { uiStateKey: "&ui-state", // This scary looking regular expression parses an absolute URL or its relative // variants (protocol, site, document, query, and hash), into the various // components (protocol, host, path, query, fragment, etc that make up the // URL as well as some other commonly used sub-parts. When used with RegExp.exec() // or String.match, it parses the URL into a results array that looks like this: // // [0]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread#msg-content // [1]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread // [2]: http://jblas:password@mycompany.com:8080/mail/inbox // [3]: http://jblas:password@mycompany.com:8080 // [4]: http: // [5]: // // [6]: jblas:password@mycompany.com:8080 // [7]: jblas:password // [8]: jblas // [9]: password // [10]: mycompany.com:8080 // [11]: mycompany.com // [12]: 8080 // [13]: /mail/inbox // [14]: /mail/ // [15]: inbox // [16]: ?msg=1234&type=unread // [17]: #msg-content // urlParseRE: /^\s*(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/, // Abstraction to address xss (Issue #4787) by removing the authority in // browsers that auto decode it. All references to location.href should be // replaced with a call to this method so that it can be dealt with properly here getLocation: function( url ) { var uri = url ? this.parseUrl( url ) : location, hash = this.parseUrl( url || location.href ).hash; // mimic the browser with an empty string when the hash is empty hash = hash === "#" ? "" : hash; // Make sure to parse the url or the location object for the hash because using location.hash // is autodecoded in firefox, the rest of the url should be from the object (location unless // we're testing) to avoid the inclusion of the authority return uri.protocol + "//" + uri.host + uri.pathname + uri.search + hash; }, parseLocation: function() { return this.parseUrl( this.getLocation() ); }, //Parse a URL into a structure that allows easy access to //all of the URL components by name. parseUrl: function( url ) { // If we're passed an object, we'll assume that it is // a parsed url object and just return it back to the caller. if ( $.type( url ) === "object" ) { return url; } var matches = path.urlParseRE.exec( url || "" ) || []; // Create an object that allows the caller to access the sub-matches // by name. Note that IE returns an empty string instead of undefined, // like all other browsers do, so we normalize everything so its consistent // no matter what browser we're running on. return { href: matches[ 0 ] || "", hrefNoHash: matches[ 1 ] || "", hrefNoSearch: matches[ 2 ] || "", domain: matches[ 3 ] || "", protocol: matches[ 4 ] || "", doubleSlash: matches[ 5 ] || "", authority: matches[ 6 ] || "", username: matches[ 8 ] || "", password: matches[ 9 ] || "", host: matches[ 10 ] || "", hostname: matches[ 11 ] || "", port: matches[ 12 ] || "", pathname: matches[ 13 ] || "", directory: matches[ 14 ] || "", filename: matches[ 15 ] || "", search: matches[ 16 ] || "", hash: matches[ 17 ] || "" }; }, //Turn relPath into an asbolute path. absPath is //an optional absolute path which describes what //relPath is relative to. makePathAbsolute: function( relPath, absPath ) { if ( relPath && relPath.charAt( 0 ) === "/" ) { return relPath; } relPath = relPath || ""; absPath = absPath ? absPath.replace( /^\/|(\/[^\/]*|[^\/]+)$/g, "" ) : ""; var absStack = absPath ? absPath.split( "/" ) : [], relStack = relPath.split( "/" ); for ( var i = 0; i < relStack.length; i++ ) { var d = relStack[ i ]; switch ( d ) { case ".": break; case "..": if ( absStack.length ) { absStack.pop(); } break; default: absStack.push( d ); break; } } return "/" + absStack.join( "/" ); }, //Returns true if both urls have the same domain. isSameDomain: function( absUrl1, absUrl2 ) { return path.parseUrl( absUrl1 ).domain === path.parseUrl( absUrl2 ).domain; }, //Returns true for any relative variant. isRelativeUrl: function( url ) { // All relative Url variants have one thing in common, no protocol. return path.parseUrl( url ).protocol === ""; }, //Returns true for an absolute url. isAbsoluteUrl: function( url ) { return path.parseUrl( url ).protocol !== ""; }, //Turn the specified realtive URL into an absolute one. This function //can handle all relative variants (protocol, site, document, query, fragment). makeUrlAbsolute: function( relUrl, absUrl ) { if ( !path.isRelativeUrl( relUrl ) ) { return relUrl; } if ( absUrl === undefined ) { absUrl = this.documentBase; } var relObj = path.parseUrl( relUrl ), absObj = path.parseUrl( absUrl ), protocol = relObj.protocol || absObj.protocol, doubleSlash = relObj.protocol ? relObj.doubleSlash : ( relObj.doubleSlash || absObj.doubleSlash ), authority = relObj.authority || absObj.authority, hasPath = relObj.pathname !== "", pathname = path.makePathAbsolute( relObj.pathname || absObj.filename, absObj.pathname ), search = relObj.search || ( !hasPath && absObj.search ) || "", hash = relObj.hash; return protocol + doubleSlash + authority + pathname + search + hash; }, //Add search (aka query) params to the specified url. addSearchParams: function( url, params ) { var u = path.parseUrl( url ), p = ( typeof params === "object" ) ? $.param( params ) : params, s = u.search || "?"; return u.hrefNoSearch + s + ( s.charAt( s.length - 1 ) !== "?" ? "&" : "" ) + p + ( u.hash || "" ); }, convertUrlToDataUrl: function( absUrl ) { var u = path.parseUrl( absUrl ); if ( path.isEmbeddedPage( u ) ) { // For embedded pages, remove the dialog hash key as in getFilePath(), // and remove otherwise the Data Url won't match the id of the embedded Page. return u.hash .split( dialogHashKey )[0] .replace( /^#/, "" ) .replace( /\?.*$/, "" ); } else if ( path.isSameDomain( u, this.documentBase ) ) { return u.hrefNoHash.replace( this.documentBase.domain, "" ).split( dialogHashKey )[0]; } return window.decodeURIComponent(absUrl); }, //get path from current hash, or from a file path get: function( newPath ) { if ( newPath === undefined ) { newPath = path.parseLocation().hash; } return path.stripHash( newPath ).replace( /[^\/]*\.[^\/*]+$/, '' ); }, //set location hash to path set: function( path ) { location.hash = path; }, //test if a given url (string) is a path //NOTE might be exceptionally naive isPath: function( url ) { return ( /\// ).test( url ); }, //return a url path with the window's location protocol/hostname/pathname removed clean: function( url ) { return url.replace( this.documentBase.domain, "" ); }, //just return the url without an initial # stripHash: function( url ) { return url.replace( /^#/, "" ); }, stripQueryParams: function( url ) { return url.replace( /\?.*$/, "" ); }, //remove the preceding hash, any query params, and dialog notations cleanHash: function( hash ) { return path.stripHash( hash.replace( /\?.*$/, "" ).replace( dialogHashKey, "" ) ); }, isHashValid: function( hash ) { return ( /^#[^#]+$/ ).test( hash ); }, //check whether a url is referencing the same domain, or an external domain or different protocol //could be mailto, etc isExternal: function( url ) { var u = path.parseUrl( url ); return u.protocol && u.domain !== this.documentUrl.domain ? true : false; }, hasProtocol: function( url ) { return ( /^(:?\w+:)/ ).test( url ); }, isEmbeddedPage: function( url ) { var u = path.parseUrl( url ); //if the path is absolute, then we need to compare the url against //both the this.documentUrl and the documentBase. The main reason for this //is that links embedded within external documents will refer to the //application document, whereas links embedded within the application //document will be resolved against the document base. if ( u.protocol !== "" ) { return ( !this.isPath(u.hash) && u.hash && ( u.hrefNoHash === this.documentUrl.hrefNoHash || ( this.documentBaseDiffers && u.hrefNoHash === this.documentBase.hrefNoHash ) ) ); } return ( /^#/ ).test( u.href ); }, squash: function( url, resolutionUrl ) { var state, href, cleanedUrl, search, stateIndex, isPath = this.isPath( url ), uri = this.parseUrl( url ), preservedHash = uri.hash, uiState = ""; // produce a url against which we can resole the provided path resolutionUrl = resolutionUrl || (path.isPath(url) ? path.getLocation() : path.getDocumentUrl()); // If the url is anything but a simple string, remove any preceding hash // eg #foo/bar -> foo/bar // #foo -> #foo cleanedUrl = isPath ? path.stripHash( url ) : url; // If the url is a full url with a hash check if the parsed hash is a path // if it is, strip the #, and use it otherwise continue without change cleanedUrl = path.isPath( uri.hash ) ? path.stripHash( uri.hash ) : cleanedUrl; // Split the UI State keys off the href stateIndex = cleanedUrl.indexOf( this.uiStateKey ); // store the ui state keys for use if( stateIndex > -1 ){ uiState = cleanedUrl.slice( stateIndex ); cleanedUrl = cleanedUrl.slice( 0, stateIndex ); } // make the cleanedUrl absolute relative to the resolution url href = path.makeUrlAbsolute( cleanedUrl, resolutionUrl ); // grab the search from the resolved url since parsing from // the passed url may not yield the correct result search = this.parseUrl( href ).search; // TODO all this crap is terrible, clean it up if ( isPath ) { // reject the hash if it's a path or it's just a dialog key if( path.isPath( preservedHash ) || preservedHash.replace("#", "").indexOf( this.uiStateKey ) === 0) { preservedHash = ""; } // Append the UI State keys where it exists and it's been removed // from the url if( uiState && preservedHash.indexOf( this.uiStateKey ) === -1){ preservedHash += uiState; } // make sure that pound is on the front of the hash if( preservedHash.indexOf( "#" ) === -1 && preservedHash !== "" ){ preservedHash = "#" + preservedHash; } // reconstruct each of the pieces with the new search string and hash href = path.parseUrl( href ); href = href.protocol + "//" + href.host + href.pathname + search + preservedHash; } else { href += href.indexOf( "#" ) > -1 ? uiState : "#" + uiState; } return href; }, isPreservableHash: function( hash ) { return hash.replace( "#", "" ).indexOf( this.uiStateKey ) === 0; } }; path.documentUrl = path.parseLocation(); $base = $( "head" ).find( "base" ); path.documentBase = $base.length ? path.parseUrl( path.makeUrlAbsolute( $base.attr( "href" ), path.documentUrl.href ) ) : path.documentUrl; path.documentBaseDiffers = (path.documentUrl.hrefNoHash !== path.documentBase.hrefNoHash); //return the original document url path.getDocumentUrl = function( asParsedObject ) { return asParsedObject ? $.extend( {}, path.documentUrl ) : path.documentUrl.href; }; //return the original document base url path.getDocumentBase = function( asParsedObject ) { return asParsedObject ? $.extend( {}, path.documentBase ) : path.documentBase.href; }; })( jQuery ); (function( $, undefined ) { var path = $.mobile.path; $.mobile.History = function( stack, index ) { this.stack = stack || []; this.activeIndex = index || 0; }; $.extend($.mobile.History.prototype, { getActive: function() { return this.stack[ this.activeIndex ]; }, getLast: function() { return this.stack[ this.previousIndex ]; }, getNext: function() { return this.stack[ this.activeIndex + 1 ]; }, getPrev: function() { return this.stack[ this.activeIndex - 1 ]; }, // addNew is used whenever a new page is added add: function( url, data ){ data = data || {}; //if there's forward history, wipe it if ( this.getNext() ) { this.clearForward(); } // if the hash is included in the data make sure the shape // is consistent for comparison if( data.hash && data.hash.indexOf( "#" ) === -1) { data.hash = "#" + data.hash; } data.url = url; this.stack.push( data ); this.activeIndex = this.stack.length - 1; }, //wipe urls ahead of active index clearForward: function() { this.stack = this.stack.slice( 0, this.activeIndex + 1 ); }, find: function( url, stack, earlyReturn ) { stack = stack || this.stack; var entry, i, length = stack.length, index; for ( i = 0; i < length; i++ ) { entry = stack[i]; if ( decodeURIComponent(url) === decodeURIComponent(entry.url) || decodeURIComponent(url) === decodeURIComponent(entry.hash) ) { index = i; if( earlyReturn ) { return index; } } } return index; }, closest: function( url ) { var closest, a = this.activeIndex; // First, take the slice of the history stack before the current index and search // for a url match. If one is found, we'll avoid avoid looking through forward history // NOTE the preference for backward history movement is driven by the fact that // most mobile browsers only have a dedicated back button, and users rarely use // the forward button in desktop browser anyhow closest = this.find( url, this.stack.slice(0, a) ); // If nothing was found in backward history check forward. The `true` // value passed as the third parameter causes the find method to break // on the first match in the forward history slice. The starting index // of the slice must then be added to the result to get the element index // in the original history stack :( :( // // TODO this is hyper confusing and should be cleaned up (ugh so bad) if( closest === undefined ) { closest = this.find( url, this.stack.slice(a), true ); closest = closest === undefined ? closest : closest + a; } return closest; }, direct: function( opts ) { var newActiveIndex = this.closest( opts.url ), a = this.activeIndex; // save new page index, null check to prevent falsey 0 result // record the previous index for reference if( newActiveIndex !== undefined ) { this.activeIndex = newActiveIndex; this.previousIndex = a; } // invoke callbacks where appropriate // // TODO this is also convoluted and confusing if ( newActiveIndex < a ) { ( opts.present || opts.back || $.noop )( this.getActive(), 'back' ); } else if ( newActiveIndex > a ) { ( opts.present || opts.forward || $.noop )( this.getActive(), 'forward' ); } else if ( newActiveIndex === undefined && opts.missing ){ opts.missing( this.getActive() ); } } }); })( jQuery ); (function( $, undefined ) { var path = $.mobile.path, initialHref = location.href; $.mobile.Navigator = function( history ) { this.history = history; this.ignoreInitialHashChange = true; $.mobile.window.bind({ "popstate.history": $.proxy( this.popstate, this ), "hashchange.history": $.proxy( this.hashchange, this ) }); }; $.extend($.mobile.Navigator.prototype, { squash: function( url, data ) { var state, href, hash = path.isPath(url) ? path.stripHash(url) : url; href = path.squash( url ); // make sure to provide this information when it isn't explicitly set in the // data object that was passed to the squash method state = $.extend({ hash: hash, url: href }, data); // replace the current url with the new href and store the state // Note that in some cases we might be replacing an url with the // same url. We do this anyways because we need to make sure that // all of our history entries have a state object associated with // them. This allows us to work around the case where $.mobile.back() // is called to transition from an external page to an embedded page. // In that particular case, a hashchange event is *NOT* generated by the browser. // Ensuring each history entry has a state object means that onPopState() // will always trigger our hashchange callback even when a hashchange event // is not fired. window.history.replaceState( state, state.title || document.title, href ); return state; }, hash: function( url, href ) { var parsed, loc, hash; // Grab the hash for recording. If the passed url is a path // we used the parsed version of the squashed url to reconstruct, // otherwise we assume it's a hash and store it directly parsed = path.parseUrl( url ); loc = path.parseLocation(); if( loc.pathname + loc.search === parsed.pathname + parsed.search ) { // If the pathname and search of the passed url is identical to the current loc // then we must use the hash. Otherwise there will be no event // eg, url = "/foo/bar?baz#bang", location.href = "http://example.com/foo/bar?baz" hash = parsed.hash ? parsed.hash : parsed.pathname + parsed.search; } else if ( path.isPath(url) ) { var resolved = path.parseUrl( href ); // If the passed url is a path, make it domain relative and remove any trailing hash hash = resolved.pathname + resolved.search + (path.isPreservableHash( resolved.hash )? resolved.hash.replace( "#", "" ) : ""); } else { hash = url; } return hash; }, // TODO reconsider name go: function( url, data, noEvents ) { var state, href, hash, popstateEvent, isPopStateEvent = $.event.special.navigate.isPushStateEnabled(); // Get the url as it would look squashed on to the current resolution url href = path.squash( url ); // sort out what the hash sould be from the url hash = this.hash( url, href ); // Here we prevent the next hash change or popstate event from doing any // history management. In the case of hashchange we don't swallow it // if there will be no hashchange fired (since that won't reset the value) // and will swallow the following hashchange if( noEvents && hash !== path.stripHash(path.parseLocation().hash) ) { this.preventNextHashChange = noEvents; } // IMPORTANT in the case where popstate is supported the event will be triggered // directly, stopping further execution - ie, interupting the flow of this // method call to fire bindings at this expression. Below the navigate method // there is a binding to catch this event and stop its propagation. // // We then trigger a new popstate event on the window with a null state // so that the navigate events can conclude their work properly // // if the url is a path we want to preserve the query params that are available on // the current url. this.preventHashAssignPopState = true; window.location.hash = hash; // If popstate is enabled and the browser triggers `popstate` events when the hash // is set (this often happens immediately in browsers like Chrome), then the // this flag will be set to false already. If it's a browser that does not trigger // a `popstate` on hash assignement or `replaceState` then we need avoid the branch // that swallows the event created by the popstate generated by the hash assignment // At the time of this writing this happens with Opera 12 and some version of IE this.preventHashAssignPopState = false; state = $.extend({ url: href, hash: hash, title: document.title }, data); if( isPopStateEvent ) { popstateEvent = new $.Event( "popstate" ); popstateEvent.originalEvent = { type: "popstate", state: null }; this.squash( url, state ); // Trigger a new faux popstate event to replace the one that we // caught that was triggered by the hash setting above. if( !noEvents ) { this.ignorePopState = true; $.mobile.window.trigger( popstateEvent ); } } // record the history entry so that the information can be included // in hashchange event driven navigate events in a similar fashion to // the state that's provided by popstate this.history.add( state.url, state ); }, // This binding is intended to catch the popstate events that are fired // when execution of the `$.navigate` method stops at window.location.hash = url; // and completely prevent them from propagating. The popstate event will then be // retriggered after execution resumes // // TODO grab the original event here and use it for the synthetic event in the // second half of the navigate execution that will follow this binding popstate: function( event ) { var active, hash, state, closestIndex; // Partly to support our test suite which manually alters the support // value to test hashchange. Partly to prevent all around weirdness if( !$.event.special.navigate.isPushStateEnabled() ){ return; } // If this is the popstate triggered by the actual alteration of the hash // prevent it completely. History is tracked manually if( this.preventHashAssignPopState ) { this.preventHashAssignPopState = false; event.stopImmediatePropagation(); return; } // if this is the popstate triggered after the `replaceState` call in the go // method, then simply ignore it. The history entry has already been captured if( this.ignorePopState ) { this.ignorePopState = false; return; } // If there is no state, and the history stack length is one were // probably getting the page load popstate fired by browsers like chrome // avoid it and set the one time flag to false. // TODO: Do we really need all these conditions? Comparing location hrefs // should be sufficient. if( !event.originalEvent.state && this.history.stack.length === 1 && this.ignoreInitialHashChange ) { this.ignoreInitialHashChange = false; if ( location.href === initialHref ) { event.preventDefault(); return; } } // account for direct manipulation of the hash. That is, we will receive a popstate // when the hash is changed by assignment, and it won't have a state associated. We // then need to squash the hash. See below for handling of hash assignment that // matches an existing history entry // TODO it might be better to only add to the history stack // when the hash is adjacent to the active history entry hash = path.parseLocation().hash; if( !event.originalEvent.state && hash ) { // squash the hash that's been assigned on the URL with replaceState // also grab the resulting state object for storage state = this.squash( hash ); // record the new hash as an additional history entry // to match the browser's treatment of hash assignment this.history.add( state.url, state ); // pass the newly created state information // along with the event event.historyState = state; // do not alter history, we've added a new history entry // so we know where we are return; } // If all else fails this is a popstate that comes from the back or forward buttons // make sure to set the state of our history stack properly, and record the directionality this.history.direct({ url: (event.originalEvent.state || {}).url || hash, // When the url is either forward or backward in history include the entry // as data on the event object for merging as data in the navigate event present: function( historyEntry, direction ) { // make sure to create a new object to pass down as the navigate event data event.historyState = $.extend({}, historyEntry); event.historyState.direction = direction; } }); }, // NOTE must bind before `navigate` special event hashchange binding otherwise the // navigation data won't be attached to the hashchange event in time for those // bindings to attach it to the `navigate` special event // TODO add a check here that `hashchange.navigate` is bound already otherwise it's // broken (exception?) hashchange: function( event ) { var history, hash; // If hashchange listening is explicitly disabled or pushstate is supported // avoid making use of the hashchange handler. if(!$.event.special.navigate.isHashChangeEnabled() || $.event.special.navigate.isPushStateEnabled() ) { return; } // On occasion explicitly want to prevent the next hash from propogating because we only // with to alter the url to represent the new state do so here if( this.preventNextHashChange ){ this.preventNextHashChange = false; event.stopImmediatePropagation(); return; } history = this.history; hash = path.parseLocation().hash; // If this is a hashchange caused by the back or forward button // make sure to set the state of our history stack properly this.history.direct({ url: hash, // When the url is either forward or backward in history include the entry // as data on the event object for merging as data in the navigate event present: function( historyEntry, direction ) { // make sure to create a new object to pass down as the navigate event data event.hashchangeState = $.extend({}, historyEntry); event.hashchangeState.direction = direction; }, // When we don't find a hash in our history clearly we're aiming to go there // record the entry as new for future traversal // // NOTE it's not entirely clear that this is the right thing to do given that we // can't know the users intention. It might be better to explicitly _not_ // support location.hash assignment in preference to $.navigate calls // TODO first arg to add should be the href, but it causes issues in identifying // embeded pages missing: function() { history.add( hash, { hash: hash, title: document.title }); } }); } }); })( jQuery ); (function( $, undefined ) { // TODO consider queueing navigation activity until previous activities have completed // so that end users don't have to think about it. Punting for now // TODO !! move the event bindings into callbacks on the navigate event $.mobile.navigate = function( url, data, noEvents ) { $.mobile.navigate.navigator.go( url, data, noEvents ); }; // expose the history on the navigate method in anticipation of full integration with // existing navigation functionalty that is tightly coupled to the history information $.mobile.navigate.history = new $.mobile.History(); // instantiate an instance of the navigator for use within the $.navigate method $.mobile.navigate.navigator = new $.mobile.Navigator( $.mobile.navigate.history ); var loc = $.mobile.path.parseLocation(); $.mobile.navigate.history.add( loc.href, {hash: loc.hash} ); })( jQuery ); // This plugin is an experiment for abstracting away the touch and mouse // events so that developers don't have to worry about which method of input // the device their document is loaded on supports. // // The idea here is to allow the developer to register listeners for the // basic mouse events, such as mousedown, mousemove, mouseup, and click, // and the plugin will take care of registering the correct listeners // behind the scenes to invoke the listener at the fastest possible time // for that device, while still retaining the order of event firing in // the traditional mouse environment, should multiple handlers be registered // on the same element for different events. // // The current version exposes the following virtual events to jQuery bind methods: // "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel" (function( $, window, document, undefined ) { var dataPropertyName = "virtualMouseBindings", touchTargetPropertyName = "virtualTouchID", virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ), touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ), mouseHookProps = $.event.mouseHooks ? $.event.mouseHooks.props : [], mouseEventProps = $.event.props.concat( mouseHookProps ), activeDocHandlers = {}, resetTimerID = 0, startX = 0, startY = 0, didScroll = false, clickBlockList = [], blockMouseTriggers = false, blockTouchTriggers = false, eventCaptureSupported = "addEventListener" in document, $document = $( document ), nextTouchID = 1, lastTouchID = 0, threshold; $.vmouse = { moveDistanceThreshold: 10, clickDistanceThreshold: 10, resetTimerDuration: 1500 }; function getNativeEvent( event ) { while ( event && typeof event.originalEvent !== "undefined" ) { event = event.originalEvent; } return event; } function createVirtualEvent( event, eventType ) { var t = event.type, oe, props, ne, prop, ct, touch, i, j, len; event = $.Event( event ); event.type = eventType; oe = event.originalEvent; props = $.event.props; // addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280 // https://github.com/jquery/jquery-mobile/issues/3280 if ( t.search( /^(mouse|click)/ ) > -1 ) { props = mouseEventProps; } // copy original event properties over to the new event // this would happen if we could call $.event.fix instead of $.Event // but we don't have a way to force an event to be fixed multiple times if ( oe ) { for ( i = props.length, prop; i; ) { prop = props[ --i ]; event[ prop ] = oe[ prop ]; } } // make sure that if the mouse and click virtual events are generated // without a .which one is defined if ( t.search(/mouse(down|up)|click/) > -1 && !event.which ) { event.which = 1; } if ( t.search(/^touch/) !== -1 ) { ne = getNativeEvent( oe ); t = ne.touches; ct = ne.changedTouches; touch = ( t && t.length ) ? t[0] : ( ( ct && ct.length ) ? ct[ 0 ] : undefined ); if ( touch ) { for ( j = 0, len = touchEventProps.length; j < len; j++) { prop = touchEventProps[ j ]; event[ prop ] = touch[ prop ]; } } } return event; } function getVirtualBindingFlags( element ) { var flags = {}, b, k; while ( element ) { b = $.data( element, dataPropertyName ); for ( k in b ) { if ( b[ k ] ) { flags[ k ] = flags.hasVirtualBinding = true; } } element = element.parentNode; } return flags; } function getClosestElementWithVirtualBinding( element, eventType ) { var b; while ( element ) { b = $.data( element, dataPropertyName ); if ( b && ( !eventType || b[ eventType ] ) ) { return element; } element = element.parentNode; } return null; } function enableTouchBindings() { blockTouchTriggers = false; } function disableTouchBindings() { blockTouchTriggers = true; } function enableMouseBindings() { lastTouchID = 0; clickBlockList.length = 0; blockMouseTriggers = false; // When mouse bindings are enabled, our // touch bindings are disabled. disableTouchBindings(); } function disableMouseBindings() { // When mouse bindings are disabled, our // touch bindings are enabled. enableTouchBindings(); } function startResetTimer() { clearResetTimer(); resetTimerID = setTimeout( function() { resetTimerID = 0; enableMouseBindings(); }, $.vmouse.resetTimerDuration ); } function clearResetTimer() { if ( resetTimerID ) { clearTimeout( resetTimerID ); resetTimerID = 0; } } function triggerVirtualEvent( eventType, event, flags ) { var ve; if ( ( flags && flags[ eventType ] ) || ( !flags && getClosestElementWithVirtualBinding( event.target, eventType ) ) ) { ve = createVirtualEvent( event, eventType ); $( event.target).trigger( ve ); } return ve; } function mouseEventCallback( event ) { var touchID = $.data( event.target, touchTargetPropertyName ); if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ) { var ve = triggerVirtualEvent( "v" + event.type, event ); if ( ve ) { if ( ve.isDefaultPrevented() ) { event.preventDefault(); } if ( ve.isPropagationStopped() ) { event.stopPropagation(); } if ( ve.isImmediatePropagationStopped() ) { event.stopImmediatePropagation(); } } } } function handleTouchStart( event ) { var touches = getNativeEvent( event ).touches, target, flags; if ( touches && touches.length === 1 ) { target = event.target; flags = getVirtualBindingFlags( target ); if ( flags.hasVirtualBinding ) { lastTouchID = nextTouchID++; $.data( target, touchTargetPropertyName, lastTouchID ); clearResetTimer(); disableMouseBindings(); didScroll = false; var t = getNativeEvent( event ).touches[ 0 ]; startX = t.pageX; startY = t.pageY; triggerVirtualEvent( "vmouseover", event, flags ); triggerVirtualEvent( "vmousedown", event, flags ); } } } function handleScroll( event ) { if ( blockTouchTriggers ) { return; } if ( !didScroll ) { triggerVirtualEvent( "vmousecancel", event, getVirtualBindingFlags( event.target ) ); } didScroll = true; startResetTimer(); } function handleTouchMove( event ) { if ( blockTouchTriggers ) { return; } var t = getNativeEvent( event ).touches[ 0 ], didCancel = didScroll, moveThreshold = $.vmouse.moveDistanceThreshold, flags = getVirtualBindingFlags( event.target ); didScroll = didScroll || ( Math.abs( t.pageX - startX ) > moveThreshold || Math.abs( t.pageY - startY ) > moveThreshold ); if ( didScroll && !didCancel ) { triggerVirtualEvent( "vmousecancel", event, flags ); } triggerVirtualEvent( "vmousemove", event, flags ); startResetTimer(); } function handleTouchEnd( event ) { if ( blockTouchTriggers ) { return; } disableTouchBindings(); var flags = getVirtualBindingFlags( event.target ), t; triggerVirtualEvent( "vmouseup", event, flags ); if ( !didScroll ) { var ve = triggerVirtualEvent( "vclick", event, flags ); if ( ve && ve.isDefaultPrevented() ) { // The target of the mouse events that follow the touchend // event don't necessarily match the target used during the // touch. This means we need to rely on coordinates for blocking // any click that is generated. t = getNativeEvent( event ).changedTouches[ 0 ]; clickBlockList.push({ touchID: lastTouchID, x: t.clientX, y: t.clientY }); // Prevent any mouse events that follow from triggering // virtual event notifications. blockMouseTriggers = true; } } triggerVirtualEvent( "vmouseout", event, flags); didScroll = false; startResetTimer(); } function hasVirtualBindings( ele ) { var bindings = $.data( ele, dataPropertyName ), k; if ( bindings ) { for ( k in bindings ) { if ( bindings[ k ] ) { return true; } } } return false; } function dummyMouseHandler() {} function getSpecialEventObject( eventType ) { var realType = eventType.substr( 1 ); return { setup: function( data, namespace ) { // If this is the first virtual mouse binding for this element, // add a bindings object to its data. if ( !hasVirtualBindings( this ) ) { $.data( this, dataPropertyName, {} ); } // If setup is called, we know it is the first binding for this // eventType, so initialize the count for the eventType to zero. var bindings = $.data( this, dataPropertyName ); bindings[ eventType ] = true; // If this is the first virtual mouse event for this type, // register a global handler on the document. activeDocHandlers[ eventType ] = ( activeDocHandlers[ eventType ] || 0 ) + 1; if ( activeDocHandlers[ eventType ] === 1 ) { $document.bind( realType, mouseEventCallback ); } // Some browsers, like Opera Mini, won't dispatch mouse/click events // for elements unless they actually have handlers registered on them. // To get around this, we register dummy handlers on the elements. $( this ).bind( realType, dummyMouseHandler ); // For now, if event capture is not supported, we rely on mouse handlers. if ( eventCaptureSupported ) { // If this is the first virtual mouse binding for the document, // register our touchstart handler on the document. activeDocHandlers[ "touchstart" ] = ( activeDocHandlers[ "touchstart" ] || 0) + 1; if ( activeDocHandlers[ "touchstart" ] === 1 ) { $document.bind( "touchstart", handleTouchStart ) .bind( "touchend", handleTouchEnd ) // On touch platforms, touching the screen and then dragging your finger // causes the window content to scroll after some distance threshold is // exceeded. On these platforms, a scroll prevents a click event from being // dispatched, and on some platforms, even the touchend is suppressed. To // mimic the suppression of the click event, we need to watch for a scroll // event. Unfortunately, some platforms like iOS don't dispatch scroll // events until *AFTER* the user lifts their finger (touchend). This means // we need to watch both scroll and touchmove events to figure out whether // or not a scroll happenens before the touchend event is fired. .bind( "touchmove", handleTouchMove ) .bind( "scroll", handleScroll ); } } }, teardown: function( data, namespace ) { // If this is the last virtual binding for this eventType, // remove its global handler from the document. --activeDocHandlers[ eventType ]; if ( !activeDocHandlers[ eventType ] ) { $document.unbind( realType, mouseEventCallback ); } if ( eventCaptureSupported ) { // If this is the last virtual mouse binding in existence, // remove our document touchstart listener. --activeDocHandlers[ "touchstart" ]; if ( !activeDocHandlers[ "touchstart" ] ) { $document.unbind( "touchstart", handleTouchStart ) .unbind( "touchmove", handleTouchMove ) .unbind( "touchend", handleTouchEnd ) .unbind( "scroll", handleScroll ); } } var $this = $( this ), bindings = $.data( this, dataPropertyName ); // teardown may be called when an element was // removed from the DOM. If this is the case, // jQuery core may have already stripped the element // of any data bindings so we need to check it before // using it. if ( bindings ) { bindings[ eventType ] = false; } // Unregister the dummy event handler. $this.unbind( realType, dummyMouseHandler ); // If this is the last virtual mouse binding on the // element, remove the binding data from the element. if ( !hasVirtualBindings( this ) ) { $this.removeData( dataPropertyName ); } } }; } // Expose our custom events to the jQuery bind/unbind mechanism. for ( var i = 0; i < virtualEventNames.length; i++ ) { $.event.special[ virtualEventNames[ i ] ] = getSpecialEventObject( virtualEventNames[ i ] ); } // Add a capture click handler to block clicks. // Note that we require event capture support for this so if the device // doesn't support it, we punt for now and rely solely on mouse events. if ( eventCaptureSupported ) { document.addEventListener( "click", function( e ) { var cnt = clickBlockList.length, target = e.target, x, y, ele, i, o, touchID; if ( cnt ) { x = e.clientX; y = e.clientY; threshold = $.vmouse.clickDistanceThreshold; // The idea here is to run through the clickBlockList to see if // the current click event is in the proximity of one of our // vclick events that had preventDefault() called on it. If we find // one, then we block the click. // // Why do we have to rely on proximity? // // Because the target of the touch event that triggered the vclick // can be different from the target of the click event synthesized // by the browser. The target of a mouse/click event that is syntehsized // from a touch event seems to be implementation specific. For example, // some browsers will fire mouse/click events for a link that is near // a touch event, even though the target of the touchstart/touchend event // says the user touched outside the link. Also, it seems that with most // browsers, the target of the mouse/click event is not calculated until the // time it is dispatched, so if you replace an element that you touched // with another element, the target of the mouse/click will be the new // element underneath that point. // // Aside from proximity, we also check to see if the target and any // of its ancestors were the ones that blocked a click. This is necessary // because of the strange mouse/click target calculation done in the // Android 2.1 browser, where if you click on an element, and there is a // mouse/click handler on one of its ancestors, the target will be the // innermost child of the touched element, even if that child is no where // near the point of touch. ele = target; while ( ele ) { for ( i = 0; i < cnt; i++ ) { o = clickBlockList[ i ]; touchID = 0; if ( ( ele === target && Math.abs( o.x - x ) < threshold && Math.abs( o.y - y ) < threshold ) || $.data( ele, touchTargetPropertyName ) === o.touchID ) { // XXX: We may want to consider removing matches from the block list // instead of waiting for the reset timer to fire. e.preventDefault(); e.stopPropagation(); return; } } ele = ele.parentNode; } } }, true); } })( jQuery, window, document ); (function( $, window, undefined ) { var $document = $( document ); // add new event shortcuts $.each( ( "touchstart touchmove touchend " + "tap taphold " + "swipe swipeleft swiperight " + "scrollstart scrollstop" ).split( " " ), function( i, name ) { $.fn[ name ] = function( fn ) { return fn ? this.bind( name, fn ) : this.trigger( name ); }; // jQuery < 1.8 if ( $.attrFn ) { $.attrFn[ name ] = true; } }); var supportTouch = $.mobile.support.touch, scrollEvent = "touchmove scroll", touchStartEvent = supportTouch ? "touchstart" : "mousedown", touchStopEvent = supportTouch ? "touchend" : "mouseup", touchMoveEvent = supportTouch ? "touchmove" : "mousemove"; function triggerCustomEvent( obj, eventType, event ) { var originalType = event.type; event.type = eventType; $.event.dispatch.call( obj, event ); event.type = originalType; } // also handles scrollstop $.event.special.scrollstart = { enabled: true, setup: function() { var thisObject = this, $this = $( thisObject ), scrolling, timer; function trigger( event, state ) { scrolling = state; triggerCustomEvent( thisObject, scrolling ? "scrollstart" : "scrollstop", event ); } // iPhone triggers scroll after a small delay; use touchmove instead $this.bind( scrollEvent, function( event ) { if ( !$.event.special.scrollstart.enabled ) { return; } if ( !scrolling ) { trigger( event, true ); } clearTimeout( timer ); timer = setTimeout( function() { trigger( event, false ); }, 50 ); }); } }; // also handles taphold $.event.special.tap = { tapholdThreshold: 750, setup: function() { var thisObject = this, $this = $( thisObject ); $this.bind( "vmousedown", function( event ) { if ( event.which && event.which !== 1 ) { return false; } var origTarget = event.target, origEvent = event.originalEvent, timer; function clearTapTimer() { clearTimeout( timer ); } function clearTapHandlers() { clearTapTimer(); $this.unbind( "vclick", clickHandler ) .unbind( "vmouseup", clearTapTimer ); $document.unbind( "vmousecancel", clearTapHandlers ); } function clickHandler( event ) { clearTapHandlers(); // ONLY trigger a 'tap' event if the start target is // the same as the stop target. if ( origTarget === event.target ) { triggerCustomEvent( thisObject, "tap", event ); } } $this.bind( "vmouseup", clearTapTimer ) .bind( "vclick", clickHandler ); $document.bind( "vmousecancel", clearTapHandlers ); timer = setTimeout( function() { triggerCustomEvent( thisObject, "taphold", $.Event( "taphold", { target: origTarget } ) ); }, $.event.special.tap.tapholdThreshold ); }); } }; // also handles swipeleft, swiperight $.event.special.swipe = { scrollSupressionThreshold: 30, // More than this horizontal displacement, and we will suppress scrolling. durationThreshold: 1000, // More time than this, and it isn't a swipe. horizontalDistanceThreshold: 30, // Swipe horizontal displacement must be more than this. verticalDistanceThreshold: 75, // Swipe vertical displacement must be less than this. start: function( event ) { var data = event.originalEvent.touches ? event.originalEvent.touches[ 0 ] : event; return { time: ( new Date() ).getTime(), coords: [ data.pageX, data.pageY ], origin: $( event.target ) }; }, stop: function( event ) { var data = event.originalEvent.touches ? event.originalEvent.touches[ 0 ] : event; return { time: ( new Date() ).getTime(), coords: [ data.pageX, data.pageY ] }; }, handleSwipe: function( start, stop ) { if ( stop.time - start.time < $.event.special.swipe.durationThreshold && Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.horizontalDistanceThreshold && Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) { start.origin.trigger( "swipe" ) .trigger( start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight" ); } }, setup: function() { var thisObject = this, $this = $( thisObject ); $this.bind( touchStartEvent, function( event ) { var start = $.event.special.swipe.start( event ), stop; function moveHandler( event ) { if ( !start ) { return; } stop = $.event.special.swipe.stop( event ); // prevent scrolling if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) { event.preventDefault(); } } $this.bind( touchMoveEvent, moveHandler ) .one( touchStopEvent, function() { $this.unbind( touchMoveEvent, moveHandler ); if ( start && stop ) { $.event.special.swipe.handleSwipe( start, stop ); } start = stop = undefined; }); }); } }; $.each({ scrollstop: "scrollstart", taphold: "tap", swipeleft: "swipe", swiperight: "swipe" }, function( event, sourceEvent ) { $.event.special[ event ] = { setup: function() { $( this ).bind( sourceEvent, $.noop ); } }; }); })( jQuery, this ); // throttled resize event (function( $ ) { $.event.special.throttledresize = { setup: function() { $( this ).bind( "resize", handler ); }, teardown: function() { $( this ).unbind( "resize", handler ); } }; var throttle = 250, handler = function() { curr = ( new Date() ).getTime(); diff = curr - lastCall; if ( diff >= throttle ) { lastCall = curr; $( this ).trigger( "throttledresize" ); } else { if ( heldCall ) { clearTimeout( heldCall ); } // Promise a held call will still execute heldCall = setTimeout( handler, throttle - diff ); } }, lastCall = 0, heldCall, curr, diff; })( jQuery ); (function( $, window ) { var win = $( window ), event_name = "orientationchange", special_event, get_orientation, last_orientation, initial_orientation_is_landscape, initial_orientation_is_default, portrait_map = { "0": true, "180": true }; // It seems that some device/browser vendors use window.orientation values 0 and 180 to // denote the "default" orientation. For iOS devices, and most other smart-phones tested, // the default orientation is always "portrait", but in some Android and RIM based tablets, // the default orientation is "landscape". The following code attempts to use the window // dimensions to figure out what the current orientation is, and then makes adjustments // to the to the portrait_map if necessary, so that we can properly decode the // window.orientation value whenever get_orientation() is called. // // Note that we used to use a media query to figure out what the orientation the browser // thinks it is in: // // initial_orientation_is_landscape = $.mobile.media("all and (orientation: landscape)"); // // but there was an iPhone/iPod Touch bug beginning with iOS 4.2, up through iOS 5.1, // where the browser *ALWAYS* applied the landscape media query. This bug does not // happen on iPad. if ( $.support.orientation ) { // Check the window width and height to figure out what the current orientation // of the device is at this moment. Note that we've initialized the portrait map // values to 0 and 180, *AND* we purposely check for landscape so that if we guess // wrong, , we default to the assumption that portrait is the default orientation. // We use a threshold check below because on some platforms like iOS, the iPhone // form-factor can report a larger width than height if the user turns on the // developer console. The actual threshold value is somewhat arbitrary, we just // need to make sure it is large enough to exclude the developer console case. var ww = window.innerWidth || win.width(), wh = window.innerHeight || win.height(), landscape_threshold = 50; initial_orientation_is_landscape = ww > wh && ( ww - wh ) > landscape_threshold; // Now check to see if the current window.orientation is 0 or 180. initial_orientation_is_default = portrait_map[ window.orientation ]; // If the initial orientation is landscape, but window.orientation reports 0 or 180, *OR* // if the initial orientation is portrait, but window.orientation reports 90 or -90, we // need to flip our portrait_map values because landscape is the default orientation for // this device/browser. if ( ( initial_orientation_is_landscape && initial_orientation_is_default ) || ( !initial_orientation_is_landscape && !initial_orientation_is_default ) ) { portrait_map = { "-90": true, "90": true }; } } $.event.special.orientationchange = $.extend( {}, $.event.special.orientationchange, { setup: function() { // If the event is supported natively, return false so that jQuery // will bind to the event using DOM methods. if ( $.support.orientation && !$.event.special.orientationchange.disabled ) { return false; } // Get the current orientation to avoid initial double-triggering. last_orientation = get_orientation(); // Because the orientationchange event doesn't exist, simulate the // event by testing window dimensions on resize. win.bind( "throttledresize", handler ); }, teardown: function() { // If the event is not supported natively, return false so that // jQuery will unbind the event using DOM methods. if ( $.support.orientation && !$.event.special.orientationchange.disabled ) { return false; } // Because the orientationchange event doesn't exist, unbind the // resize event handler. win.unbind( "throttledresize", handler ); }, add: function( handleObj ) { // Save a reference to the bound event handler. var old_handler = handleObj.handler; handleObj.handler = function( event ) { // Modify event object, adding the .orientation property. event.orientation = get_orientation(); // Call the originally-bound event handler and return its result. return old_handler.apply( this, arguments ); }; } }); // If the event is not supported natively, this handler will be bound to // the window resize event to simulate the orientationchange event. function handler() { // Get the current orientation. var orientation = get_orientation(); if ( orientation !== last_orientation ) { // The orientation has changed, so trigger the orientationchange event. last_orientation = orientation; win.trigger( event_name ); } } // Get the current page orientation. This method is exposed publicly, should it // be needed, as jQuery.event.special.orientationchange.orientation() $.event.special.orientationchange.orientation = get_orientation = function() { var isPortrait = true, elem = document.documentElement; // prefer window orientation to the calculation based on screensize as // the actual screen resize takes place before or after the orientation change event // has been fired depending on implementation (eg android 2.3 is before, iphone after). // More testing is required to determine if a more reliable method of determining the new screensize // is possible when orientationchange is fired. (eg, use media queries + element + opacity) if ( $.support.orientation ) { // if the window orientation registers as 0 or 180 degrees report // portrait, otherwise landscape isPortrait = portrait_map[ window.orientation ]; } else { isPortrait = elem && elem.clientWidth / elem.clientHeight < 1.1; } return isPortrait ? "portrait" : "landscape"; }; $.fn[ event_name ] = function( fn ) { return fn ? this.bind( event_name, fn ) : this.trigger( event_name ); }; // jQuery < 1.8 if ( $.attrFn ) { $.attrFn[ event_name ] = true; } }( jQuery, this )); (function( $, undefined ) { $.widget( "mobile.page", $.mobile.widget, { options: { theme: "c", domCache: false, keepNativeDefault: ":jqmData(role='none'), :jqmData(role='nojs')" }, _create: function() { // if false is returned by the callbacks do not create the page if ( this._trigger( "beforecreate" ) === false ) { return false; } this.element .attr( "tabindex", "0" ) .addClass( "ui-page ui-body-" + this.options.theme ); this._on( this.element, { pagebeforehide: "removeContainerBackground", pagebeforeshow: "_handlePageBeforeShow" }); }, _handlePageBeforeShow: function( e ) { this.setContainerBackground(); }, removeContainerBackground: function() { $.mobile.pageContainer.removeClass( "ui-overlay-" + $.mobile.getInheritedTheme( this.element.parent() ) ); }, // set the page container background to the page theme setContainerBackground: function( theme ) { if ( this.options.theme ) { $.mobile.pageContainer.addClass( "ui-overlay-" + ( theme || this.options.theme ) ); } }, keepNativeSelector: function() { var options = this.options, keepNativeDefined = options.keepNative && $.trim( options.keepNative ); if ( keepNativeDefined && options.keepNative !== options.keepNativeDefault ) { return [options.keepNative, options.keepNativeDefault].join( ", " ); } return options.keepNativeDefault; } }); })( jQuery ); (function( $, window, undefined ) { var createHandler = function( sequential ) { // Default to sequential if ( sequential === undefined ) { sequential = true; } return function( name, reverse, $to, $from ) { var deferred = new $.Deferred(), reverseClass = reverse ? " reverse" : "", active = $.mobile.urlHistory.getActive(), toScroll = active.lastScroll || $.mobile.defaultHomeScroll, screenHeight = $.mobile.getScreenHeight(), maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $.mobile.window.width() > $.mobile.maxTransitionWidth, none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none" || Math.max( $.mobile.window.scrollTop(), toScroll ) > $.mobile.getMaxScrollForTransition(), toPreClass = " ui-page-pre-in", toggleViewportClass = function() { $.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name ); }, scrollPage = function() { // By using scrollTo instead of silentScroll, we can keep things better in order // Just to be precautios, disable scrollstart listening like silentScroll would $.event.special.scrollstart.enabled = false; window.scrollTo( 0, toScroll ); // reenable scrollstart listening like silentScroll would setTimeout( function() { $.event.special.scrollstart.enabled = true; }, 150 ); }, cleanFrom = function() { $from .removeClass( $.mobile.activePageClass + " out in reverse " + name ) .height( "" ); }, startOut = function() { // if it's not sequential, call the doneOut transition to start the TO page animating in simultaneously if ( !sequential ) { doneOut(); } else { $from.animationComplete( doneOut ); } // Set the from page's height and start it transitioning out // Note: setting an explicit height helps eliminate tiling in the transitions $from .height( screenHeight + $.mobile.window.scrollTop() ) .addClass( name + " out" + reverseClass ); }, doneOut = function() { if ( $from && sequential ) { cleanFrom(); } startIn(); }, startIn = function() { // Prevent flickering in phonegap container: see comments at #4024 regarding iOS $to.css( "z-index", -10 ); $to.addClass( $.mobile.activePageClass + toPreClass ); // Send focus to page as it is now display: block $.mobile.focusPage( $to ); // Set to page height $to.height( screenHeight + toScroll ); scrollPage(); // Restores visibility of the new page: added together with $to.css( "z-index", -10 ); $to.css( "z-index", "" ); if ( !none ) { $to.animationComplete( doneIn ); } $to .removeClass( toPreClass ) .addClass( name + " in" + reverseClass ); if ( none ) { doneIn(); } }, doneIn = function() { if ( !sequential ) { if ( $from ) { cleanFrom(); } } $to .removeClass( "out in reverse " + name ) .height( "" ); toggleViewportClass(); // In some browsers (iOS5), 3D transitions block the ability to scroll to the desired location during transition // This ensures we jump to that spot after the fact, if we aren't there already. if ( $.mobile.window.scrollTop() !== toScroll ) { scrollPage(); } deferred.resolve( name, reverse, $to, $from, true ); }; toggleViewportClass(); if ( $from && !none ) { startOut(); } else { doneOut(); } return deferred.promise(); }; }; // generate the handlers from the above var sequentialHandler = createHandler(), simultaneousHandler = createHandler( false ), defaultGetMaxScrollForTransition = function() { return $.mobile.getScreenHeight() * 3; }; // Make our transition handler the public default. $.mobile.defaultTransitionHandler = sequentialHandler; //transition handler dictionary for 3rd party transitions $.mobile.transitionHandlers = { "default": $.mobile.defaultTransitionHandler, "sequential": sequentialHandler, "simultaneous": simultaneousHandler }; $.mobile.transitionFallbacks = {}; // If transition is defined, check if css 3D transforms are supported, and if not, if a fallback is specified $.mobile._maybeDegradeTransition = function( transition ) { if ( transition && !$.support.cssTransform3d && $.mobile.transitionFallbacks[ transition ] ) { transition = $.mobile.transitionFallbacks[ transition ]; } return transition; }; // Set the getMaxScrollForTransition to default if no implementation was set by user $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defaultGetMaxScrollForTransition; })( jQuery, this ); (function( $, undefined ) { //define vars for interal use var $window = $.mobile.window, $html = $( 'html' ), $head = $( 'head' ), // NOTE: path extensions dependent on core attributes. Moved here to remove deps from // $.mobile.path definition path = $.extend($.mobile.path, { //return the substring of a filepath before the sub-page key, for making a server request getFilePath: function( path ) { var splitkey = '&' + $.mobile.subPageUrlKey; return path && path.split( splitkey )[0].split( dialogHashKey )[0]; }, //check if the specified url refers to the first page in the main application document. isFirstPageUrl: function( url ) { // We only deal with absolute paths. var u = path.parseUrl( path.makeUrlAbsolute( url, this.documentBase ) ), // Does the url have the same path as the document? samePath = u.hrefNoHash === this.documentUrl.hrefNoHash || ( this.documentBaseDiffers && u.hrefNoHash === this.documentBase.hrefNoHash ), // Get the first page element. fp = $.mobile.firstPage, // Get the id of the first page element if it has one. fpId = fp && fp[0] ? fp[0].id : undefined; // The url refers to the first page if the path matches the document and // it either has no hash value, or the hash is exactly equal to the id of the // first page element. return samePath && ( !u.hash || u.hash === "#" || ( fpId && u.hash.replace( /^#/, "" ) === fpId ) ); }, // Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR // requests if the document doing the request was loaded via the file:// protocol. // This is usually to allow the application to "phone home" and fetch app specific // data. We normally let the browser handle external/cross-domain urls, but if the // allowCrossDomainPages option is true, we will allow cross-domain http/https // requests to go through our page loading logic. isPermittedCrossDomainRequest: function( docUrl, reqUrl ) { return $.mobile.allowCrossDomainPages && docUrl.protocol === "file:" && reqUrl.search( /^https?:/ ) !== -1; } }), // used to track last vclicked element to make sure its value is added to form data $lastVClicked = null, //will be defined when a link is clicked and given an active class $activeClickedLink = null, // resolved on domready domreadyDeferred = $.Deferred(), //urlHistory is purely here to make guesses at whether the back or forward button was clicked //and provide an appropriate transition urlHistory = $.mobile.navigate.history, //define first selector to receive focus when a page is shown focusable = "[tabindex],a,button:visible,select:visible,input", //queue to hold simultanious page transitions pageTransitionQueue = [], //indicates whether or not page is in process of transitioning isPageTransitioning = false, //nonsense hash change key for dialogs, so they create a history entry dialogHashKey = "&ui-state=dialog", //existing base tag? $base = $head.children( "base" ), //tuck away the original document URL minus any fragment. documentUrl = path.documentUrl, //if the document has an embedded base tag, documentBase is set to its //initial value. If a base tag does not exist, then we default to the documentUrl. documentBase = path.documentBase, //cache the comparison once. documentBaseDiffers = path.documentBaseDiffers, getScreenHeight = $.mobile.getScreenHeight; //base element management, defined depending on dynamic base tag support var base = $.support.dynamicBaseTag ? { //define base element, for use in routing asset urls that are referenced in Ajax-requested markup element: ( $base.length ? $base : $( "<base>", { href: documentBase.hrefNoHash } ).prependTo( $head ) ), //set the generated BASE element's href attribute to a new page's base path set: function( href ) { href = path.parseUrl(href).hrefNoHash; base.element.attr( "href", path.makeUrlAbsolute( href, documentBase ) ); }, //set the generated BASE element's href attribute to a new page's base path reset: function() { base.element.attr( "href", documentBase.hrefNoSearch ); } } : undefined; //return the original document url $.mobile.getDocumentUrl = path.getDocumentUrl; //return the original document base url $.mobile.getDocumentBase = path.getDocumentBase; /* internal utility functions */ // NOTE Issue #4950 Android phonegap doesn't navigate back properly // when a full page refresh has taken place. It appears that hashchange // and replacestate history alterations work fine but we need to support // both forms of history traversal in our code that uses backward history // movement $.mobile.back = function() { var nav = window.navigator; // if the setting is on and the navigator object is // available use the phonegap navigation capability if( this.phonegapNavigationEnabled && nav && nav.app && nav.app.backHistory ){ nav.app.backHistory(); } else { window.history.back(); } }; //direct focus to the page title, or otherwise first focusable element $.mobile.focusPage = function ( page ) { var autofocus = page.find( "[autofocus]" ), pageTitle = page.find( ".ui-title:eq(0)" ); if ( autofocus.length ) { autofocus.focus(); return; } if ( pageTitle.length ) { pageTitle.focus(); } else{ page.focus(); } }; //remove active classes after page transition or error function removeActiveLinkClass( forceRemoval ) { if ( !!$activeClickedLink && ( !$activeClickedLink.closest( "." + $.mobile.activePageClass ).length || forceRemoval ) ) { $activeClickedLink.removeClass( $.mobile.activeBtnClass ); } $activeClickedLink = null; } function releasePageTransitionLock() { isPageTransitioning = false; if ( pageTransitionQueue.length > 0 ) { $.mobile.changePage.apply( null, pageTransitionQueue.pop() ); } } // Save the last scroll distance per page, before it is hidden var setLastScrollEnabled = true, setLastScroll, delayedSetLastScroll; setLastScroll = function() { // this barrier prevents setting the scroll value based on the browser // scrolling the window based on a hashchange if ( !setLastScrollEnabled ) { return; } var active = $.mobile.urlHistory.getActive(); if ( active ) { var lastScroll = $window.scrollTop(); // Set active page's lastScroll prop. // If the location we're scrolling to is less than minScrollBack, let it go. active.lastScroll = lastScroll < $.mobile.minScrollBack ? $.mobile.defaultHomeScroll : lastScroll; } }; // bind to scrollstop to gather scroll position. The delay allows for the hashchange // event to fire and disable scroll recording in the case where the browser scrolls // to the hash targets location (sometimes the top of the page). once pagechange fires // getLastScroll is again permitted to operate delayedSetLastScroll = function() { setTimeout( setLastScroll, 100 ); }; // disable an scroll setting when a hashchange has been fired, this only works // because the recording of the scroll position is delayed for 100ms after // the browser might have changed the position because of the hashchange $window.bind( $.support.pushState ? "popstate" : "hashchange", function() { setLastScrollEnabled = false; }); // handle initial hashchange from chrome :( $window.one( $.support.pushState ? "popstate" : "hashchange", function() { setLastScrollEnabled = true; }); // wait until the mobile page container has been determined to bind to pagechange $window.one( "pagecontainercreate", function() { // once the page has changed, re-enable the scroll recording $.mobile.pageContainer.bind( "pagechange", function() { setLastScrollEnabled = true; // remove any binding that previously existed on the get scroll // which may or may not be different than the scroll element determined for // this page previously $window.unbind( "scrollstop", delayedSetLastScroll ); // determine and bind to the current scoll element which may be the window // or in the case of touch overflow the element with touch overflow $window.bind( "scrollstop", delayedSetLastScroll ); }); }); // bind to scrollstop for the first page as "pagechange" won't be fired in that case $window.bind( "scrollstop", delayedSetLastScroll ); // No-op implementation of transition degradation $.mobile._maybeDegradeTransition = $.mobile._maybeDegradeTransition || function( transition ) { return transition; }; //function for transitioning between two existing pages function transitionPages( toPage, fromPage, transition, reverse ) { if ( fromPage ) { //trigger before show/hide events fromPage.data( "mobile-page" )._trigger( "beforehide", null, { nextPage: toPage } ); } toPage.data( "mobile-page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } ); //clear page loader $.mobile.hidePageLoadingMsg(); transition = $.mobile._maybeDegradeTransition( transition ); //find the transition handler for the specified transition. If there //isn't one in our transitionHandlers dictionary, use the default one. //call the handler immediately to kick-off the transition. var th = $.mobile.transitionHandlers[ transition || "default" ] || $.mobile.defaultTransitionHandler, promise = th( transition, reverse, toPage, fromPage ); promise.done(function() { //trigger show/hide events if ( fromPage ) { fromPage.data( "mobile-page" )._trigger( "hide", null, { nextPage: toPage } ); } //trigger pageshow, define prevPage as either fromPage or empty jQuery obj toPage.data( "mobile-page" )._trigger( "show", null, { prevPage: fromPage || $( "" ) } ); }); return promise; } //simply set the active page's minimum height to screen height, depending on orientation $.mobile.resetActivePageHeight = function resetActivePageHeight( height ) { var aPage = $( "." + $.mobile.activePageClass ), aPagePadT = parseFloat( aPage.css( "padding-top" ) ), aPagePadB = parseFloat( aPage.css( "padding-bottom" ) ), aPageBorderT = parseFloat( aPage.css( "border-top-width" ) ), aPageBorderB = parseFloat( aPage.css( "border-bottom-width" ) ); height = ( typeof height === "number" )? height : getScreenHeight(); aPage.css( "min-height", height - aPagePadT - aPagePadB - aPageBorderT - aPageBorderB ); }; //shared page enhancements function enhancePage( $page, role ) { // If a role was specified, make sure the data-role attribute // on the page element is in sync. if ( role ) { $page.attr( "data-" + $.mobile.ns + "role", role ); } //run page plugin $page.page(); } // determine the current base url function findBaseWithDefault() { var closestBase = ( $.mobile.activePage && getClosestBaseUrl( $.mobile.activePage ) ); return closestBase || documentBase.hrefNoHash; } /* exposed $.mobile methods */ //animation complete callback $.fn.animationComplete = function( callback ) { if ( $.support.cssTransitions ) { return $( this ).one( 'webkitAnimationEnd animationend', callback ); } else{ // defer execution for consistency between webkit/non webkit setTimeout( callback, 0 ); return $( this ); } }; //expose path object on $.mobile $.mobile.path = path; //expose base object on $.mobile $.mobile.base = base; //history stack $.mobile.urlHistory = urlHistory; $.mobile.dialogHashKey = dialogHashKey; //enable cross-domain page support $.mobile.allowCrossDomainPages = false; $.mobile._bindPageRemove = function() { var page = $( this ); // when dom caching is not enabled or the page is embedded bind to remove the page on hide if ( !page.data( "mobile-page" ).options.domCache && page.is( ":jqmData(external-page='true')" ) ) { page.bind( 'pagehide.remove', function( e ) { var $this = $( this ), prEvent = new $.Event( "pageremove" ); $this.trigger( prEvent ); if ( !prEvent.isDefaultPrevented() ) { $this.removeWithDependents(); } }); } }; // Load a page into the DOM. $.mobile.loadPage = function( url, options ) { // This function uses deferred notifications to let callers // know when the page is done loading, or if an error has occurred. var deferred = $.Deferred(), // The default loadPage options with overrides specified by // the caller. settings = $.extend( {}, $.mobile.loadPage.defaults, options ), // The DOM element for the page after it has been loaded. page = null, // If the reloadPage option is true, and the page is already // in the DOM, dupCachedPage will be set to the page element // so that it can be removed after the new version of the // page is loaded off the network. dupCachedPage = null, // The absolute version of the URL passed into the function. This // version of the URL may contain dialog/subpage params in it. absUrl = path.makeUrlAbsolute( url, findBaseWithDefault() ); // If the caller provided data, and we're using "get" request, // append the data to the URL. if ( settings.data && settings.type === "get" ) { absUrl = path.addSearchParams( absUrl, settings.data ); settings.data = undefined; } // If the caller is using a "post" request, reloadPage must be true if ( settings.data && settings.type === "post" ) { settings.reloadPage = true; } // The absolute version of the URL minus any dialog/subpage params. // In otherwords the real URL of the page to be loaded. var fileUrl = path.getFilePath( absUrl ), // The version of the Url actually stored in the data-url attribute of // the page. For embedded pages, it is just the id of the page. For pages // within the same domain as the document base, it is the site relative // path. For cross-domain pages (Phone Gap only) the entire absolute Url // used to load the page. dataUrl = path.convertUrlToDataUrl( absUrl ); // Make sure we have a pageContainer to work with. settings.pageContainer = settings.pageContainer || $.mobile.pageContainer; // Check to see if the page already exists in the DOM. // NOTE do _not_ use the :jqmData psuedo selector because parenthesis // are a valid url char and it breaks on the first occurence page = settings.pageContainer.children( "[data-" + $.mobile.ns +"url='" + dataUrl + "']" ); // If we failed to find the page, check to see if the url is a // reference to an embedded page. If so, it may have been dynamically // injected by a developer, in which case it would be lacking a data-url // attribute and in need of enhancement. if ( page.length === 0 && dataUrl && !path.isPath( dataUrl ) ) { page = settings.pageContainer.children( "#" + dataUrl ) .attr( "data-" + $.mobile.ns + "url", dataUrl ) .jqmData( "url", dataUrl ); } // If we failed to find a page in the DOM, check the URL to see if it // refers to the first page in the application. If it isn't a reference // to the first page and refers to non-existent embedded page, error out. if ( page.length === 0 ) { if ( $.mobile.firstPage && path.isFirstPageUrl( fileUrl ) ) { // Check to make sure our cached-first-page is actually // in the DOM. Some user deployed apps are pruning the first // page from the DOM for various reasons, we check for this // case here because we don't want a first-page with an id // falling through to the non-existent embedded page error // case. If the first-page is not in the DOM, then we let // things fall through to the ajax loading code below so // that it gets reloaded. if ( $.mobile.firstPage.parent().length ) { page = $( $.mobile.firstPage ); } } else if ( path.isEmbeddedPage( fileUrl ) ) { deferred.reject( absUrl, options ); return deferred.promise(); } } // If the page we are interested in is already in the DOM, // and the caller did not indicate that we should force a // reload of the file, we are done. Otherwise, track the // existing page as a duplicated. if ( page.length ) { if ( !settings.reloadPage ) { enhancePage( page, settings.role ); deferred.resolve( absUrl, options, page ); //if we are reloading the page make sure we update the base if its not a prefetch if( base && !options.prefetch ){ base.set(url); } return deferred.promise(); } dupCachedPage = page; } var mpc = settings.pageContainer, pblEvent = new $.Event( "pagebeforeload" ), triggerData = { url: url, absUrl: absUrl, dataUrl: dataUrl, deferred: deferred, options: settings }; // Let listeners know we're about to load a page. mpc.trigger( pblEvent, triggerData ); // If the default behavior is prevented, stop here! if ( pblEvent.isDefaultPrevented() ) { return deferred.promise(); } if ( settings.showLoadMsg ) { // This configurable timeout allows cached pages a brief delay to load without showing a message var loadMsgDelay = setTimeout(function() { $.mobile.showPageLoadingMsg(); }, settings.loadMsgDelay ), // Shared logic for clearing timeout and removing message. hideMsg = function() { // Stop message show timer clearTimeout( loadMsgDelay ); // Hide loading message $.mobile.hidePageLoadingMsg(); }; } // Reset base to the default document base. // only reset if we are not prefetching if ( base && typeof options.prefetch === "undefined" ) { base.reset(); } if ( !( $.mobile.allowCrossDomainPages || path.isSameDomain( documentUrl, absUrl ) ) ) { deferred.reject( absUrl, options ); } else { // Load the new page. $.ajax({ url: fileUrl, type: settings.type, data: settings.data, contentType: settings.contentType, dataType: "html", success: function( html, textStatus, xhr ) { //pre-parse html to check for a data-url, //use it as the new fileUrl, base path, etc var all = $( "<div></div>" ), //page title regexp newPageTitle = html.match( /<title[^>]*>([^<]*)/ ) && RegExp.$1, // TODO handle dialogs again pageElemRegex = new RegExp( "(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>)" ), dataUrlRegex = new RegExp( "\\bdata-" + $.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?" ); // data-url must be provided for the base tag so resource requests can be directed to the // correct url. loading into a temprorary element makes these requests immediately if ( pageElemRegex.test( html ) && RegExp.$1 && dataUrlRegex.test( RegExp.$1 ) && RegExp.$1 ) { url = fileUrl = path.getFilePath( $( "<div>" + RegExp.$1 + "</div>" ).text() ); } //dont update the base tag if we are prefetching if ( base && typeof options.prefetch === "undefined") { base.set( fileUrl ); } //workaround to allow scripts to execute when included in page divs all.get( 0 ).innerHTML = html; page = all.find( ":jqmData(role='page'), :jqmData(role='dialog')" ).first(); //if page elem couldn't be found, create one and insert the body element's contents if ( !page.length ) { page = $( "<div data-" + $.mobile.ns + "role='page'>" + ( html.split( /<\/?body[^>]*>/gmi )[1] || "" ) + "</div>" ); } if ( newPageTitle && !page.jqmData( "title" ) ) { if ( ~newPageTitle.indexOf( "&" ) ) { newPageTitle = $( "<div>" + newPageTitle + "</div>" ).text(); } page.jqmData( "title", newPageTitle ); } //rewrite src and href attrs to use a base url if ( !$.support.dynamicBaseTag ) { var newPath = path.get( fileUrl ); page.find( "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]" ).each(function() { var thisAttr = $( this ).is( '[href]' ) ? 'href' : $( this ).is( '[src]' ) ? 'src' : 'action', thisUrl = $( this ).attr( thisAttr ); // XXX_jblas: We need to fix this so that it removes the document // base URL, and then prepends with the new page URL. //if full path exists and is same, chop it - helps IE out thisUrl = thisUrl.replace( location.protocol + '//' + location.host + location.pathname, '' ); if ( !/^(\w+:|#|\/)/.test( thisUrl ) ) { $( this ).attr( thisAttr, newPath + thisUrl ); } }); } //append to page and enhance // TODO taging a page with external to make sure that embedded pages aren't removed // by the various page handling code is bad. Having page handling code in many // places is bad. Solutions post 1.0 page .attr( "data-" + $.mobile.ns + "url", path.convertUrlToDataUrl( fileUrl ) ) .attr( "data-" + $.mobile.ns + "external-page", true ) .appendTo( settings.pageContainer ); // wait for page creation to leverage options defined on widget page.one( 'pagecreate', $.mobile._bindPageRemove ); enhancePage( page, settings.role ); // Enhancing the page may result in new dialogs/sub pages being inserted // into the DOM. If the original absUrl refers to a sub-page, that is the // real page we are interested in. if ( absUrl.indexOf( "&" + $.mobile.subPageUrlKey ) > -1 ) { page = settings.pageContainer.children( "[data-" + $.mobile.ns +"url='" + dataUrl + "']" ); } // Remove loading message. if ( settings.showLoadMsg ) { hideMsg(); } // Add the page reference and xhr to our triggerData. triggerData.xhr = xhr; triggerData.textStatus = textStatus; triggerData.page = page; // Let listeners know the page loaded successfully. settings.pageContainer.trigger( "pageload", triggerData ); deferred.resolve( absUrl, options, page, dupCachedPage ); }, error: function( xhr, textStatus, errorThrown ) { //set base back to current path if ( base ) { base.set( path.get() ); } // Add error info to our triggerData. triggerData.xhr = xhr; triggerData.textStatus = textStatus; triggerData.errorThrown = errorThrown; var plfEvent = new $.Event( "pageloadfailed" ); // Let listeners know the page load failed. settings.pageContainer.trigger( plfEvent, triggerData ); // If the default behavior is prevented, stop here! // Note that it is the responsibility of the listener/handler // that called preventDefault(), to resolve/reject the // deferred object within the triggerData. if ( plfEvent.isDefaultPrevented() ) { return; } // Remove loading message. if ( settings.showLoadMsg ) { // Remove loading message. hideMsg(); // show error message $.mobile.showPageLoadingMsg( $.mobile.pageLoadErrorMessageTheme, $.mobile.pageLoadErrorMessage, true ); // hide after delay setTimeout( $.mobile.hidePageLoadingMsg, 1500 ); } deferred.reject( absUrl, options ); } }); } return deferred.promise(); }; $.mobile.loadPage.defaults = { type: "get", data: undefined, reloadPage: false, role: undefined, // By default we rely on the role defined by the @data-role attribute. showLoadMsg: false, pageContainer: undefined, loadMsgDelay: 50 // This delay allows loads that pull from browser cache to occur without showing the loading message. }; // Show a specific page in the page container. $.mobile.changePage = function( toPage, options ) { // If we are in the midst of a transition, queue the current request. // We'll call changePage() once we're done with the current transition to // service the request. if ( isPageTransitioning ) { pageTransitionQueue.unshift( arguments ); return; } var settings = $.extend( {}, $.mobile.changePage.defaults, options ), isToPageString; // Make sure we have a pageContainer to work with. settings.pageContainer = settings.pageContainer || $.mobile.pageContainer; // Make sure we have a fromPage. settings.fromPage = settings.fromPage || $.mobile.activePage; isToPageString = (typeof toPage === "string"); var mpc = settings.pageContainer, pbcEvent = new $.Event( "pagebeforechange" ), triggerData = { toPage: toPage, options: settings }; // NOTE: preserve the original target as the dataUrl value will be simplified // eg, removing ui-state, and removing query params from the hash // this is so that users who want to use query params have access to them // in the event bindings for the page life cycle See issue #5085 if ( isToPageString ) { // if the toPage is a string simply convert it triggerData.absUrl = path.makeUrlAbsolute( toPage, findBaseWithDefault() ); } else { // if the toPage is a jQuery object grab the absolute url stored // in the loadPage callback where it exists triggerData.absUrl = toPage.data( 'absUrl' ); } // Let listeners know we're about to change the current page. mpc.trigger( pbcEvent, triggerData ); // If the default behavior is prevented, stop here! if ( pbcEvent.isDefaultPrevented() ) { return; } // We allow "pagebeforechange" observers to modify the toPage in the trigger // data to allow for redirects. Make sure our toPage is updated. // // We also need to re-evaluate whether it is a string, because an object can // also be replaced by a string toPage = triggerData.toPage; isToPageString = (typeof toPage === "string"); // Set the isPageTransitioning flag to prevent any requests from // entering this method while we are in the midst of loading a page // or transitioning. isPageTransitioning = true; // If the caller passed us a url, call loadPage() // to make sure it is loaded into the DOM. We'll listen // to the promise object it returns so we know when // it is done loading or if an error ocurred. if ( isToPageString ) { // preserve the original target as the dataUrl value will be simplified // eg, removing ui-state, and removing query params from the hash // this is so that users who want to use query params have access to them // in the event bindings for the page life cycle See issue #5085 settings.target = toPage; $.mobile.loadPage( toPage, settings ) .done(function( url, options, newPage, dupCachedPage ) { isPageTransitioning = false; options.duplicateCachedPage = dupCachedPage; // store the original absolute url so that it can be provided // to events in the triggerData of the subsequent changePage call newPage.data( 'absUrl', triggerData.absUrl ); $.mobile.changePage( newPage, options ); }) .fail(function( url, options ) { //clear out the active button state removeActiveLinkClass( true ); //release transition lock so navigation is free again releasePageTransitionLock(); settings.pageContainer.trigger( "pagechangefailed", triggerData ); }); return; } // If we are going to the first-page of the application, we need to make // sure settings.dataUrl is set to the application document url. This allows // us to avoid generating a document url with an id hash in the case where the // first-page of the document has an id attribute specified. if ( toPage[ 0 ] === $.mobile.firstPage[ 0 ] && !settings.dataUrl ) { settings.dataUrl = documentUrl.hrefNoHash; } // The caller passed us a real page DOM element. Update our // internal state and then trigger a transition to the page. var fromPage = settings.fromPage, url = ( settings.dataUrl && path.convertUrlToDataUrl( settings.dataUrl ) ) || toPage.jqmData( "url" ), // The pageUrl var is usually the same as url, except when url is obscured as a dialog url. pageUrl always contains the file path pageUrl = url, fileUrl = path.getFilePath( url ), active = urlHistory.getActive(), activeIsInitialPage = urlHistory.activeIndex === 0, historyDir = 0, pageTitle = document.title, isDialog = settings.role === "dialog" || toPage.jqmData( "role" ) === "dialog"; // By default, we prevent changePage requests when the fromPage and toPage // are the same element, but folks that generate content manually/dynamically // and reuse pages want to be able to transition to the same page. To allow // this, they will need to change the default value of allowSamePageTransition // to true, *OR*, pass it in as an option when they manually call changePage(). // It should be noted that our default transition animations assume that the // formPage and toPage are different elements, so they may behave unexpectedly. // It is up to the developer that turns on the allowSamePageTransitiona option // to either turn off transition animations, or make sure that an appropriate // animation transition is used. if ( fromPage && fromPage[0] === toPage[0] && !settings.allowSamePageTransition ) { isPageTransitioning = false; mpc.trigger( "pagechange", triggerData ); // Even if there is no page change to be done, we should keep the urlHistory in sync with the hash changes if ( settings.fromHashChange ) { urlHistory.direct({ url: url }); } return; } // We need to make sure the page we are given has already been enhanced. enhancePage( toPage, settings.role ); // If the changePage request was sent from a hashChange event, check to see if the // page is already within the urlHistory stack. If so, we'll assume the user hit // the forward/back button and will try to match the transition accordingly. if ( settings.fromHashChange ) { historyDir = options.direction === "back" ? -1 : 1; } // Kill the keyboard. // XXX_jblas: We need to stop crawling the entire document to kill focus. Instead, // we should be tracking focus with a delegate() handler so we already have // the element in hand at this point. // Wrap this in a try/catch block since IE9 throw "Unspecified error" if document.activeElement // is undefined when we are in an IFrame. try { if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== 'body' ) { $( document.activeElement ).blur(); } else { $( "input:focus, textarea:focus, select:focus" ).blur(); } } catch( e ) {} // Record whether we are at a place in history where a dialog used to be - if so, do not add a new history entry and do not change the hash either var alreadyThere = false; // If we're displaying the page as a dialog, we don't want the url // for the dialog content to be used in the hash. Instead, we want // to append the dialogHashKey to the url of the current page. if ( isDialog && active ) { // on the initial page load active.url is undefined and in that case should // be an empty string. Moving the undefined -> empty string back into // urlHistory.addNew seemed imprudent given undefined better represents // the url state // If we are at a place in history that once belonged to a dialog, reuse // this state without adding to urlHistory and without modifying the hash. // However, if a dialog is already displayed at this point, and we're // about to display another dialog, then we must add another hash and // history entry on top so that one may navigate back to the original dialog if ( active.url && active.url.indexOf( dialogHashKey ) > -1 && $.mobile.activePage && !$.mobile.activePage.is( ".ui-dialog" ) && urlHistory.activeIndex > 0 ) { settings.changeHash = false; alreadyThere = true; } // Normally, we tack on a dialog hash key, but if this is the location of a stale dialog, // we reuse the URL from the entry url = ( active.url || "" ); // account for absolute urls instead of just relative urls use as hashes if( !alreadyThere && url.indexOf("#") > -1 ) { url += dialogHashKey; } else { url += "#" + dialogHashKey; } // tack on another dialogHashKey if this is the same as the initial hash // this makes sure that a history entry is created for this dialog if ( urlHistory.activeIndex === 0 && url === urlHistory.initialDst ) { url += dialogHashKey; } } // if title element wasn't found, try the page div data attr too // If this is a deep-link or a reload ( active === undefined ) then just use pageTitle var newPageTitle = ( !active )? pageTitle : toPage.jqmData( "title" ) || toPage.children( ":jqmData(role='header')" ).find( ".ui-title" ).text(); if ( !!newPageTitle && pageTitle === document.title ) { pageTitle = newPageTitle; } if ( !toPage.jqmData( "title" ) ) { toPage.jqmData( "title", pageTitle ); } // Make sure we have a transition defined. settings.transition = settings.transition || ( ( historyDir && !activeIsInitialPage ) ? active.transition : undefined ) || ( isDialog ? $.mobile.defaultDialogTransition : $.mobile.defaultPageTransition ); //add page to history stack if it's not back or forward if ( !historyDir && alreadyThere ) { urlHistory.getActive().pageUrl = pageUrl; } // Set the location hash. if ( url && !settings.fromHashChange ) { var params; // rebuilding the hash here since we loose it earlier on // TODO preserve the originally passed in path if( !path.isPath( url ) && url.indexOf( "#" ) < 0 ) { url = "#" + url; } // TODO the property names here are just silly params = { transition: settings.transition, title: pageTitle, pageUrl: pageUrl, role: settings.role }; if ( settings.changeHash !== false && $.mobile.hashListeningEnabled ) { $.mobile.navigate( url, params, true); } else if ( toPage[ 0 ] !== $.mobile.firstPage[ 0 ] ) { $.mobile.navigate.history.add( url, params ); } } //set page title document.title = pageTitle; //set "toPage" as activePage $.mobile.activePage = toPage; // If we're navigating back in the URL history, set reverse accordingly. settings.reverse = settings.reverse || historyDir < 0; transitionPages( toPage, fromPage, settings.transition, settings.reverse ) .done(function( name, reverse, $to, $from, alreadyFocused ) { removeActiveLinkClass(); //if there's a duplicateCachedPage, remove it from the DOM now that it's hidden if ( settings.duplicateCachedPage ) { settings.duplicateCachedPage.remove(); } // Send focus to the newly shown page. Moved from promise .done binding in transitionPages // itself to avoid ie bug that reports offsetWidth as > 0 (core check for visibility) // despite visibility: hidden addresses issue #2965 // https://github.com/jquery/jquery-mobile/issues/2965 if ( !alreadyFocused ) { $.mobile.focusPage( toPage ); } releasePageTransitionLock(); mpc.trigger( "pagechange", triggerData ); }); }; $.mobile.changePage.defaults = { transition: undefined, reverse: false, changeHash: true, fromHashChange: false, role: undefined, // By default we rely on the role defined by the @data-role attribute. duplicateCachedPage: undefined, pageContainer: undefined, showLoadMsg: true, //loading message shows by default when pages are being fetched during changePage dataUrl: undefined, fromPage: undefined, allowSamePageTransition: false }; /* Event Bindings - hashchange, submit, and click */ function findClosestLink( ele ) { while ( ele ) { // Look for the closest element with a nodeName of "a". // Note that we are checking if we have a valid nodeName // before attempting to access it. This is because the // node we get called with could have originated from within // an embedded SVG document where some symbol instance elements // don't have nodeName defined on them, or strings are of type // SVGAnimatedString. if ( ( typeof ele.nodeName === "string" ) && ele.nodeName.toLowerCase() === "a" ) { break; } ele = ele.parentNode; } return ele; } // The base URL for any given element depends on the page it resides in. function getClosestBaseUrl( ele ) { // Find the closest page and extract out its url. var url = $( ele ).closest( ".ui-page" ).jqmData( "url" ), base = documentBase.hrefNoHash; if ( !url || !path.isPath( url ) ) { url = base; } return path.makeUrlAbsolute( url, base); } //The following event bindings should be bound after mobileinit has been triggered //the following deferred is resolved in the init file $.mobile.navreadyDeferred = $.Deferred(); $.mobile._registerInternalEvents = function() { var getAjaxFormData = function( $form, calculateOnly ) { var url, ret = true, formData, vclickedName, method; if ( !$.mobile.ajaxEnabled || // test that the form is, itself, ajax false $form.is( ":jqmData(ajax='false')" ) || // test that $.mobile.ignoreContentEnabled is set and // the form or one of it's parents is ajax=false !$form.jqmHijackable().length || $form.attr( "target" ) ) { return false; } url = $form.attr( "action" ); method = ( $form.attr( "method" ) || "get" ).toLowerCase(); // If no action is specified, browsers default to using the // URL of the document containing the form. Since we dynamically // pull in pages from external documents, the form should submit // to the URL for the source document of the page containing // the form. if ( !url ) { // Get the @data-url for the page containing the form. url = getClosestBaseUrl( $form ); // NOTE: If the method is "get", we need to strip off the query string // because it will get replaced with the new form data. See issue #5710. if ( method === "get" ) { url = path.parseUrl( url ).hrefNoSearch; } if ( url === documentBase.hrefNoHash ) { // The url we got back matches the document base, // which means the page must be an internal/embedded page, // so default to using the actual document url as a browser // would. url = documentUrl.hrefNoSearch; } } url = path.makeUrlAbsolute( url, getClosestBaseUrl( $form ) ); if ( ( path.isExternal( url ) && !path.isPermittedCrossDomainRequest( documentUrl, url ) ) ) { return false; } if ( !calculateOnly ) { formData = $form.serializeArray(); if ( $lastVClicked && $lastVClicked[ 0 ].form === $form[ 0 ] ) { vclickedName = $lastVClicked.attr( "name" ); if ( vclickedName ) { // Make sure the last clicked element is included in the form $.each( formData, function( key, value ) { if ( value.name === vclickedName ) { // Unset vclickedName - we've found it in the serialized data already vclickedName = ""; return false; } }); if ( vclickedName ) { formData.push( { name: vclickedName, value: $lastVClicked.attr( "value" ) } ); } } } ret = { url: url, options: { type: method, data: $.param( formData ), transition: $form.jqmData( "transition" ), reverse: $form.jqmData( "direction" ) === "reverse", reloadPage: true } }; } return ret; }; //bind to form submit events, handle with Ajax $.mobile.document.delegate( "form", "submit", function( event ) { var formData = getAjaxFormData( $( this ) ); if ( formData ) { $.mobile.changePage( formData.url, formData.options ); event.preventDefault(); } }); //add active state on vclick $.mobile.document.bind( "vclick", function( event ) { var $btn, btnEls, target = event.target, needClosest = false; // if this isn't a left click we don't care. Its important to note // that when the virtual event is generated it will create the which attr if ( event.which > 1 || !$.mobile.linkBindingEnabled ) { return; } // Record that this element was clicked, in case we need it for correct // form submission during the "submit" handler above $lastVClicked = $( target ); // Try to find a target element to which the active class will be applied if ( $.data( target, "mobile-button" ) ) { // If the form will not be submitted via AJAX, do not add active class if ( !getAjaxFormData( $( target ).closest( "form" ), true ) ) { return; } // We will apply the active state to this button widget - the parent // of the input that was clicked will have the associated data if ( target.parentNode ) { target = target.parentNode; } } else { target = findClosestLink( target ); if ( !( target && path.parseUrl( target.getAttribute( "href" ) || "#" ).hash !== "#" ) ) { return; } // TODO teach $.mobile.hijackable to operate on raw dom elements so the // link wrapping can be avoided if ( !$( target ).jqmHijackable().length ) { return; } } // Avoid calling .closest by using the data set during .buttonMarkup() // List items have the button data in the parent of the element clicked if ( !!~target.className.indexOf( "ui-link-inherit" ) ) { if ( target.parentNode ) { btnEls = $.data( target.parentNode, "buttonElements" ); } // Otherwise, look for the data on the target itself } else { btnEls = $.data( target, "buttonElements" ); } // If found, grab the button's outer element if ( btnEls ) { target = btnEls.outer; } else { needClosest = true; } $btn = $( target ); // If the outer element wasn't found by the our heuristics, use .closest() if ( needClosest ) { $btn = $btn.closest( ".ui-btn" ); } if ( $btn.length > 0 && !$btn.hasClass( "ui-disabled" ) ) { removeActiveLinkClass( true ); $activeClickedLink = $btn; $activeClickedLink.addClass( $.mobile.activeBtnClass ); } }); // click routing - direct to HTTP or Ajax, accordingly $.mobile.document.bind( "click", function( event ) { if ( !$.mobile.linkBindingEnabled || event.isDefaultPrevented() ) { return; } var link = findClosestLink( event.target ), $link = $( link ), httpCleanup; // If there is no link associated with the click or its not a left // click we want to ignore the click // TODO teach $.mobile.hijackable to operate on raw dom elements so the link wrapping // can be avoided if ( !link || event.which > 1 || !$link.jqmHijackable().length ) { return; } //remove active link class if external (then it won't be there if you come back) httpCleanup = function() { window.setTimeout(function() { removeActiveLinkClass( true ); }, 200 ); }; //if there's a data-rel=back attr, go back in history if ( $link.is( ":jqmData(rel='back')" ) ) { $.mobile.back(); return false; } var baseUrl = getClosestBaseUrl( $link ), //get href, if defined, otherwise default to empty hash href = path.makeUrlAbsolute( $link.attr( "href" ) || "#", baseUrl ); //if ajax is disabled, exit early if ( !$.mobile.ajaxEnabled && !path.isEmbeddedPage( href ) ) { httpCleanup(); //use default click handling return; } // XXX_jblas: Ideally links to application pages should be specified as // an url to the application document with a hash that is either // the site relative path or id to the page. But some of the // internal code that dynamically generates sub-pages for nested // lists and select dialogs, just write a hash in the link they // create. This means the actual URL path is based on whatever // the current value of the base tag is at the time this code // is called. For now we are just assuming that any url with a // hash in it is an application page reference. if ( href.search( "#" ) !== -1 ) { href = href.replace( /[^#]*#/, "" ); if ( !href ) { //link was an empty hash meant purely //for interaction, so we ignore it. event.preventDefault(); return; } else if ( path.isPath( href ) ) { //we have apath so make it the href we want to load. href = path.makeUrlAbsolute( href, baseUrl ); } else { //we have a simple id so use the documentUrl as its base. href = path.makeUrlAbsolute( "#" + href, documentUrl.hrefNoHash ); } } // Should we handle this link, or let the browser deal with it? var useDefaultUrlHandling = $link.is( "[rel='external']" ) || $link.is( ":jqmData(ajax='false')" ) || $link.is( "[target]" ), // Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR // requests if the document doing the request was loaded via the file:// protocol. // This is usually to allow the application to "phone home" and fetch app specific // data. We normally let the browser handle external/cross-domain urls, but if the // allowCrossDomainPages option is true, we will allow cross-domain http/https // requests to go through our page loading logic. //check for protocol or rel and its not an embedded page //TODO overlap in logic from isExternal, rel=external check should be // moved into more comprehensive isExternalLink isExternal = useDefaultUrlHandling || ( path.isExternal( href ) && !path.isPermittedCrossDomainRequest( documentUrl, href ) ); if ( isExternal ) { httpCleanup(); //use default click handling return; } //use ajax var transition = $link.jqmData( "transition" ), reverse = $link.jqmData( "direction" ) === "reverse" || // deprecated - remove by 1.0 $link.jqmData( "back" ), //this may need to be more specific as we use data-rel more role = $link.attr( "data-" + $.mobile.ns + "rel" ) || undefined; $.mobile.changePage( href, { transition: transition, reverse: reverse, role: role, link: $link } ); event.preventDefault(); }); //prefetch pages when anchors with data-prefetch are encountered $.mobile.document.delegate( ".ui-page", "pageshow.prefetch", function() { var urls = []; $( this ).find( "a:jqmData(prefetch)" ).each(function() { var $link = $( this ), url = $link.attr( "href" ); if ( url && $.inArray( url, urls ) === -1 ) { urls.push( url ); $.mobile.loadPage( url, { role: $link.attr( "data-" + $.mobile.ns + "rel" ),prefetch: true } ); } }); }); $.mobile._handleHashChange = function( url, data ) { //find first page via hash var to = path.stripHash(url), //transition is false if it's the first page, undefined otherwise (and may be overridden by default) transition = $.mobile.urlHistory.stack.length === 0 ? "none" : undefined, // default options for the changPage calls made after examining the current state // of the page and the hash, NOTE that the transition is derived from the previous // history entry changePageOptions = { changeHash: false, fromHashChange: true, reverse: data.direction === "back" }; $.extend( changePageOptions, data, { transition: (urlHistory.getLast() || {}).transition || transition }); // special case for dialogs if ( urlHistory.activeIndex > 0 && to.indexOf( dialogHashKey ) > -1 && urlHistory.initialDst !== to ) { // If current active page is not a dialog skip the dialog and continue // in the same direction if ( $.mobile.activePage && !$.mobile.activePage.is( ".ui-dialog" ) ) { //determine if we're heading forward or backward and continue accordingly past //the current dialog if( data.direction === "back" ) { $.mobile.back(); } else { window.history.forward(); } // prevent changePage call return; } else { // if the current active page is a dialog and we're navigating // to a dialog use the dialog objected saved in the stack to = data.pageUrl; var active = $.mobile.urlHistory.getActive(); // make sure to set the role, transition and reversal // as most of this is lost by the domCache cleaning $.extend( changePageOptions, { role: active.role, transition: active.transition, reverse: data.direction === "back" }); } } //if to is defined, load it if ( to ) { // At this point, 'to' can be one of 3 things, a cached page element from // a history stack entry, an id, or site-relative/absolute URL. If 'to' is // an id, we need to resolve it against the documentBase, not the location.href, // since the hashchange could've been the result of a forward/backward navigation // that crosses from an external page/dialog to an internal page/dialog. to = !path.isPath( to ) ? ( path.makeUrlAbsolute( '#' + to, documentBase ) ) : to; // If we're about to go to an initial URL that contains a reference to a non-existent // internal page, go to the first page instead. We know that the initial hash refers to a // non-existent page, because the initial hash did not end up in the initial urlHistory entry if ( to === path.makeUrlAbsolute( '#' + urlHistory.initialDst, documentBase ) && urlHistory.stack.length && urlHistory.stack[0].url !== urlHistory.initialDst.replace( dialogHashKey, "" ) ) { to = $.mobile.firstPage; } $.mobile.changePage( to, changePageOptions ); } else { //there's no hash, go to the first page in the dom $.mobile.changePage( $.mobile.firstPage, changePageOptions ); } }; // TODO roll the logic here into the handleHashChange method $window.bind( "navigate", function( e, data ) { var url; if ( e.originalEvent && e.originalEvent.isDefaultPrevented() ) { return; } url = $.event.special.navigate.originalEventName.indexOf( "hashchange" ) > -1 ? data.state.hash : data.state.url; if( !url ) { url = $.mobile.path.parseLocation().hash; } if( !url || url === "#" || url.indexOf( "#" + $.mobile.path.uiStateKey ) === 0 ){ url = location.href; } $.mobile._handleHashChange( url, data.state ); }); //set page min-heights to be device specific $.mobile.document.bind( "pageshow", $.mobile.resetActivePageHeight ); $.mobile.window.bind( "throttledresize", $.mobile.resetActivePageHeight ); };//navreadyDeferred done callback $( function() { domreadyDeferred.resolve(); } ); $.when( domreadyDeferred, $.mobile.navreadyDeferred ).done( function() { $.mobile._registerInternalEvents(); } ); })( jQuery ); /* * fallback transition for flip in non-3D supporting browsers (which tend to handle complex transitions poorly in general */ (function( $, window, undefined ) { $.mobile.transitionFallbacks.flip = "fade"; })( jQuery, this ); /* * fallback transition for flow in non-3D supporting browsers (which tend to handle complex transitions poorly in general */ (function( $, window, undefined ) { $.mobile.transitionFallbacks.flow = "fade"; })( jQuery, this ); /* * fallback transition for pop in non-3D supporting browsers (which tend to handle complex transitions poorly in general */ (function( $, window, undefined ) { $.mobile.transitionFallbacks.pop = "fade"; })( jQuery, this ); /* * fallback transition for slide in non-3D supporting browsers (which tend to handle complex transitions poorly in general */ (function( $, window, undefined ) { // Use the simultaneous transitions handler for slide transitions $.mobile.transitionHandlers.slide = $.mobile.transitionHandlers.simultaneous; // Set the slide transitions's fallback to "fade" $.mobile.transitionFallbacks.slide = "fade"; })( jQuery, this ); /* * fallback transition for slidedown in non-3D supporting browsers (which tend to handle complex transitions poorly in general */ (function( $, window, undefined ) { $.mobile.transitionFallbacks.slidedown = "fade"; })( jQuery, this ); /* * fallback transition for slidefade in non-3D supporting browsers (which tend to handle complex transitions poorly in general */ (function( $, window, undefined ) { // Set the slide transitions's fallback to "fade" $.mobile.transitionFallbacks.slidefade = "fade"; })( jQuery, this ); /* * fallback transition for slideup in non-3D supporting browsers (which tend to handle complex transitions poorly in general */ (function( $, window, undefined ) { $.mobile.transitionFallbacks.slideup = "fade"; })( jQuery, this ); /* * fallback transition for turn in non-3D supporting browsers (which tend to handle complex transitions poorly in general */ (function( $, window, undefined ) { $.mobile.transitionFallbacks.turn = "fade"; })( jQuery, this ); (function( $, undefined ) { $.mobile.page.prototype.options.degradeInputs = { color: false, date: false, datetime: false, "datetime-local": false, email: false, month: false, number: false, range: "number", search: "text", tel: false, time: false, url: false, week: false }; //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { var page = $.mobile.closestPageData( $( e.target ) ), options; if ( !page ) { return; } options = page.options; // degrade inputs to avoid poorly implemented native functionality $( e.target ).find( "input" ).not( page.keepNativeSelector() ).each(function() { var $this = $( this ), type = this.getAttribute( "type" ), optType = options.degradeInputs[ type ] || "text"; if ( options.degradeInputs[ type ] ) { var html = $( "<div>" ).html( $this.clone() ).html(), // In IE browsers, the type sometimes doesn't exist in the cloned markup, so we replace the closing tag instead hasType = html.indexOf( " type=" ) > -1, findstr = hasType ? /\s+type=["']?\w+['"]?/ : /\/?>/, repstr = " type=\"" + optType + "\" data-" + $.mobile.ns + "type=\"" + type + "\"" + ( hasType ? "" : ">" ); $this.replaceWith( html.replace( findstr, repstr ) ); } }); }); })( jQuery ); (function( $, window, undefined ) { $.widget( "mobile.dialog", $.mobile.widget, { options: { closeBtn: "left", closeBtnText: "Close", overlayTheme: "a", corners: true, initSelector: ":jqmData(role='dialog')" }, // Override the theme set by the page plugin on pageshow _handlePageBeforeShow: function() { this._isCloseable = true; if ( this.options.overlayTheme ) { this.element .page( "removeContainerBackground" ) .page( "setContainerBackground", this.options.overlayTheme ); } }, _create: function() { var self = this, $el = this.element, cornerClass = !!this.options.corners ? " ui-corner-all" : "", dialogWrap = $( "<div/>", { "role" : "dialog", "class" : "ui-dialog-contain ui-overlay-shadow" + cornerClass }); $el.addClass( "ui-dialog ui-overlay-" + this.options.overlayTheme ); // Class the markup for dialog styling // Set aria role $el.wrapInner( dialogWrap ); /* bind events - clicks and submits should use the closing transition that the dialog opened with unless a data-transition is specified on the link/form - if the click was on the close button, or the link has a data-rel="back" it'll go back in history naturally */ $el.bind( "vclick submit", function( event ) { var $target = $( event.target ).closest( event.type === "vclick" ? "a" : "form" ), active; if ( $target.length && !$target.jqmData( "transition" ) ) { active = $.mobile.urlHistory.getActive() || {}; $target.attr( "data-" + $.mobile.ns + "transition", ( active.transition || $.mobile.defaultDialogTransition ) ) .attr( "data-" + $.mobile.ns + "direction", "reverse" ); } }); this._on( $el, { pagebeforeshow: "_handlePageBeforeShow" }); $.extend( this, { _createComplete: false }); this._setCloseBtn( this.options.closeBtn ); }, _setCloseBtn: function( value ) { var self = this, btn, location; if ( this._headerCloseButton ) { this._headerCloseButton.remove(); this._headerCloseButton = null; } if ( value !== "none" ) { // Sanitize value location = ( value === "left" ? "left" : "right" ); btn = $( "<a href='#' class='ui-btn-" + location + "' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" ); this.element.children().find( ":jqmData(role='header')" ).first().prepend( btn ); if ( this._createComplete && $.fn.buttonMarkup ) { btn.buttonMarkup(); } this._createComplete = true; // this must be an anonymous function so that select menu dialogs can replace // the close method. This is a change from previously just defining data-rel=back // on the button and letting nav handle it // // Use click rather than vclick in order to prevent the possibility of unintentionally // reopening the dialog if the dialog opening item was directly under the close button. btn.bind( "click", function() { self.close(); }); this._headerCloseButton = btn; } }, _setOption: function( key, value ) { if ( key === "closeBtn" ) { this._setCloseBtn( value ); } this._super( key, value ); }, // Close method goes back in history close: function() { var idx, dst, hist = $.mobile.navigate.history; if ( this._isCloseable ) { this._isCloseable = false; // If the hash listening is enabled and there is at least one preceding history // entry it's ok to go back. Initial pages with the dialog hash state are an example // where the stack check is necessary if ( $.mobile.hashListeningEnabled && hist.activeIndex > 0 ) { $.mobile.back(); } else { idx = Math.max( 0, hist.activeIndex - 1 ); dst = hist.stack[ idx ].pageUrl || hist.stack[ idx ].url; hist.previousIndex = hist.activeIndex; hist.activeIndex = idx; if ( !$.mobile.path.isPath( dst ) ) { dst = $.mobile.path.makeUrlAbsolute( "#" + dst ); } $.mobile.changePage( dst, { direction: "back", changeHash: false, fromHashChange: true } ); } } } }); //auto self-init widgets $.mobile.document.delegate( $.mobile.dialog.prototype.options.initSelector, "pagecreate", function() { $.mobile.dialog.prototype.enhance( this ); }); })( jQuery, this ); (function( $, undefined ) { $.mobile.page.prototype.options.backBtnText = "Back"; $.mobile.page.prototype.options.addBackBtn = false; $.mobile.page.prototype.options.backBtnTheme = null; $.mobile.page.prototype.options.headerTheme = "a"; $.mobile.page.prototype.options.footerTheme = "a"; $.mobile.page.prototype.options.contentTheme = null; // NOTE bind used to force this binding to run before the buttonMarkup binding // which expects .ui-footer top be applied in its gigantic selector // TODO remove the buttonMarkup giant selector and move it to the various modules // on which it depends $.mobile.document.bind( "pagecreate", function( e ) { var $page = $( e.target ), o = $page.data( "mobile-page" ).options, pageRole = $page.jqmData( "role" ), pageTheme = o.theme; $( ":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')", $page ) .jqmEnhanceable() .each(function() { var $this = $( this ), role = $this.jqmData( "role" ), theme = $this.jqmData( "theme" ), contentTheme = theme || o.contentTheme || ( pageRole === "dialog" && pageTheme ), $headeranchors, leftbtn, rightbtn, backBtn; $this.addClass( "ui-" + role ); //apply theming and markup modifications to page,header,content,footer if ( role === "header" || role === "footer" ) { var thisTheme = theme || ( role === "header" ? o.headerTheme : o.footerTheme ) || pageTheme; $this //add theme class .addClass( "ui-bar-" + thisTheme ) // Add ARIA role .attr( "role", role === "header" ? "banner" : "contentinfo" ); if ( role === "header") { // Right,left buttons $headeranchors = $this.children( "a, button" ); leftbtn = $headeranchors.hasClass( "ui-btn-left" ); rightbtn = $headeranchors.hasClass( "ui-btn-right" ); leftbtn = leftbtn || $headeranchors.eq( 0 ).not( ".ui-btn-right" ).addClass( "ui-btn-left" ).length; rightbtn = rightbtn || $headeranchors.eq( 1 ).addClass( "ui-btn-right" ).length; } // Auto-add back btn on pages beyond first view if ( o.addBackBtn && role === "header" && $( ".ui-page" ).length > 1 && $page.jqmData( "url" ) !== $.mobile.path.stripHash( location.hash ) && !leftbtn ) { backBtn = $( "<a href='javascript:void(0);' class='ui-btn-left' data-"+ $.mobile.ns +"rel='back' data-"+ $.mobile.ns +"icon='arrow-l'>"+ o.backBtnText +"</a>" ) // If theme is provided, override default inheritance .attr( "data-"+ $.mobile.ns +"theme", o.backBtnTheme || thisTheme ) .prependTo( $this ); } // Page title $this.children( "h1, h2, h3, h4, h5, h6" ) .addClass( "ui-title" ) // Regardless of h element number in src, it becomes h1 for the enhanced page .attr({ "role": "heading", "aria-level": "1" }); } else if ( role === "content" ) { if ( contentTheme ) { $this.addClass( "ui-body-" + ( contentTheme ) ); } // Add ARIA role $this.attr( "role", "main" ); } }); }); })( jQuery ); (function( $, undefined ) { // This function calls getAttribute, which should be safe for data-* attributes var getAttrFixed = function( e, key ) { var value = e.getAttribute( key ); return value === "true" ? true : value === "false" ? false : value === null ? undefined : value; }; $.fn.buttonMarkup = function( options ) { var $workingSet = this, nsKey = "data-" + $.mobile.ns, key; // Enforce options to be of type string options = ( options && ( $.type( options ) === "object" ) )? options : {}; for ( var i = 0; i < $workingSet.length; i++ ) { var el = $workingSet.eq( i ), e = el[ 0 ], o = $.extend( {}, $.fn.buttonMarkup.defaults, { icon: options.icon !== undefined ? options.icon : getAttrFixed( e, nsKey + "icon" ), iconpos: options.iconpos !== undefined ? options.iconpos : getAttrFixed( e, nsKey + "iconpos" ), theme: options.theme !== undefined ? options.theme : getAttrFixed( e, nsKey + "theme" ) || $.mobile.getInheritedTheme( el, "c" ), inline: options.inline !== undefined ? options.inline : getAttrFixed( e, nsKey + "inline" ), shadow: options.shadow !== undefined ? options.shadow : getAttrFixed( e, nsKey + "shadow" ), corners: options.corners !== undefined ? options.corners : getAttrFixed( e, nsKey + "corners" ), iconshadow: options.iconshadow !== undefined ? options.iconshadow : getAttrFixed( e, nsKey + "iconshadow" ), mini: options.mini !== undefined ? options.mini : getAttrFixed( e, nsKey + "mini" ) }, options ), // Classes Defined innerClass = "ui-btn-inner", textClass = "ui-btn-text", buttonClass, iconClass, hover = false, state = "up", // Button inner markup buttonInner, buttonText, buttonIcon, buttonElements; for ( key in o ) { if ( o[ key ] === undefined || o[ key ] === null ) { el.removeAttr( nsKey + key ); } else { e.setAttribute( nsKey + key, o[ key ] ); } } if ( getAttrFixed( e, nsKey + "rel" ) === "popup" && el.attr( "href" ) ) { e.setAttribute( "aria-haspopup", true ); e.setAttribute( "aria-owns", el.attr( "href" ) ); } // Check if this element is already enhanced buttonElements = $.data( ( ( e.tagName === "INPUT" || e.tagName === "BUTTON" ) ? e.parentNode : e ), "buttonElements" ); if ( buttonElements ) { e = buttonElements.outer; el = $( e ); buttonInner = buttonElements.inner; buttonText = buttonElements.text; // We will recreate this icon below $( buttonElements.icon ).remove(); buttonElements.icon = null; hover = buttonElements.hover; state = buttonElements.state; } else { buttonInner = document.createElement( o.wrapperEls ); buttonText = document.createElement( o.wrapperEls ); } buttonIcon = o.icon ? document.createElement( "span" ) : null; if ( attachEvents && !buttonElements ) { attachEvents(); } // if not, try to find closest theme container if ( !o.theme ) { o.theme = $.mobile.getInheritedTheme( el, "c" ); } buttonClass = "ui-btn "; buttonClass += ( hover ? "ui-btn-hover-" + o.theme : "" ); buttonClass += ( state ? " ui-btn-" + state + "-" + o.theme : "" ); buttonClass += o.shadow ? " ui-shadow" : ""; buttonClass += o.corners ? " ui-btn-corner-all" : ""; if ( o.mini !== undefined ) { // Used to control styling in headers/footers, where buttons default to `mini` style. buttonClass += o.mini === true ? " ui-mini" : " ui-fullsize"; } if ( o.inline !== undefined ) { // Used to control styling in headers/footers, where buttons default to `inline` style. buttonClass += o.inline === true ? " ui-btn-inline" : " ui-btn-block"; } if ( o.icon ) { o.icon = "ui-icon-" + o.icon; o.iconpos = o.iconpos || "left"; iconClass = "ui-icon " + o.icon; if ( o.iconshadow ) { iconClass += " ui-icon-shadow"; } } if ( o.iconpos ) { buttonClass += " ui-btn-icon-" + o.iconpos; if ( o.iconpos === "notext" && !el.attr( "title" ) ) { el.attr( "title", el.getEncodedText() ); } } if ( buttonElements ) { el.removeClass( buttonElements.bcls || "" ); } el.removeClass( "ui-link" ).addClass( buttonClass ); buttonInner.className = innerClass; buttonText.className = textClass; if ( !buttonElements ) { buttonInner.appendChild( buttonText ); } if ( buttonIcon ) { buttonIcon.className = iconClass; if ( !( buttonElements && buttonElements.icon ) ) { buttonIcon.innerHTML = "&#160;"; buttonInner.appendChild( buttonIcon ); } } while ( e.firstChild && !buttonElements ) { buttonText.appendChild( e.firstChild ); } if ( !buttonElements ) { e.appendChild( buttonInner ); } // Assign a structure containing the elements of this button to the elements of this button. This // will allow us to recognize this as an already-enhanced button in future calls to buttonMarkup(). buttonElements = { hover : hover, state : state, bcls : buttonClass, outer : e, inner : buttonInner, text : buttonText, icon : buttonIcon }; $.data( e, 'buttonElements', buttonElements ); $.data( buttonInner, 'buttonElements', buttonElements ); $.data( buttonText, 'buttonElements', buttonElements ); if ( buttonIcon ) { $.data( buttonIcon, 'buttonElements', buttonElements ); } } return this; }; $.fn.buttonMarkup.defaults = { corners: true, shadow: true, iconshadow: true, wrapperEls: "span" }; function closestEnabledButton( element ) { var cname; while ( element ) { // Note that we check for typeof className below because the element we // handed could be in an SVG DOM where className on SVG elements is defined to // be of a different type (SVGAnimatedString). We only operate on HTML DOM // elements, so we look for plain "string". cname = ( typeof element.className === 'string' ) && ( element.className + ' ' ); if ( cname && cname.indexOf( "ui-btn " ) > -1 && cname.indexOf( "ui-disabled " ) < 0 ) { break; } element = element.parentNode; } return element; } function updateButtonClass( $btn, classToRemove, classToAdd, hover, state ) { var buttonElements = $.data( $btn[ 0 ], "buttonElements" ); $btn.removeClass( classToRemove ).addClass( classToAdd ); if ( buttonElements ) { buttonElements.bcls = $( document.createElement( "div" ) ) .addClass( buttonElements.bcls + " " + classToAdd ) .removeClass( classToRemove ) .attr( "class" ); if ( hover !== undefined ) { buttonElements.hover = hover; } buttonElements.state = state; } } var attachEvents = function() { var hoverDelay = $.mobile.buttonMarkup.hoverDelay, hov, foc; $.mobile.document.bind( { "vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart": function( event ) { var theme, $btn = $( closestEnabledButton( event.target ) ), isTouchEvent = event.originalEvent && /^touch/.test( event.originalEvent.type ), evt = event.type; if ( $btn.length ) { theme = $btn.attr( "data-" + $.mobile.ns + "theme" ); if ( evt === "vmousedown" ) { if ( isTouchEvent ) { // Use a short delay to determine if the user is scrolling before highlighting hov = setTimeout( function() { updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-down-" + theme, undefined, "down" ); }, hoverDelay ); } else { updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-down-" + theme, undefined, "down" ); } } else if ( evt === "vmousecancel" || evt === "vmouseup" ) { updateButtonClass( $btn, "ui-btn-down-" + theme, "ui-btn-up-" + theme, undefined, "up" ); } else if ( evt === "vmouseover" || evt === "focus" ) { if ( isTouchEvent ) { // Use a short delay to determine if the user is scrolling before highlighting foc = setTimeout( function() { updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-hover-" + theme, true, "" ); }, hoverDelay ); } else { updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-hover-" + theme, true, "" ); } } else if ( evt === "vmouseout" || evt === "blur" || evt === "scrollstart" ) { updateButtonClass( $btn, "ui-btn-hover-" + theme + " ui-btn-down-" + theme, "ui-btn-up-" + theme, false, "up" ); if ( hov ) { clearTimeout( hov ); } if ( foc ) { clearTimeout( foc ); } } } }, "focusin focus": function( event ) { $( closestEnabledButton( event.target ) ).addClass( $.mobile.focusClass ); }, "focusout blur": function( event ) { $( closestEnabledButton( event.target ) ).removeClass( $.mobile.focusClass ); } }); attachEvents = null; }; //links in bars, or those with data-role become buttons //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $( ":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a", e.target ) .jqmEnhanceable() .not( "button, input, .ui-btn, :jqmData(role='none'), :jqmData(role='nojs')" ) .buttonMarkup(); }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.collapsible", $.mobile.widget, { options: { expandCueText: " click to expand contents", collapseCueText: " click to collapse contents", collapsed: true, heading: "h1,h2,h3,h4,h5,h6,legend", collapsedIcon: "plus", expandedIcon: "minus", iconpos: "left", theme: null, contentTheme: null, inset: true, corners: true, mini: false, initSelector: ":jqmData(role='collapsible')" }, _create: function() { var $el = this.element, o = this.options, collapsible = $el.addClass( "ui-collapsible" ), collapsibleHeading = $el.children( o.heading ).first(), collapsibleContent = collapsible.wrapInner( "<div class='ui-collapsible-content'></div>" ).children( ".ui-collapsible-content" ), collapsibleSet = $el.closest( ":jqmData(role='collapsible-set')" ).addClass( "ui-collapsible-set" ), collapsibleClasses = ""; // Replace collapsibleHeading if it's a legend if ( collapsibleHeading.is( "legend" ) ) { collapsibleHeading = $( "<div role='heading'>"+ collapsibleHeading.html() +"</div>" ).insertBefore( collapsibleHeading ); collapsibleHeading.next().remove(); } // If we are in a collapsible set if ( collapsibleSet.length ) { // Inherit the theme from collapsible-set if ( !o.theme ) { o.theme = collapsibleSet.jqmData( "theme" ) || $.mobile.getInheritedTheme( collapsibleSet, "c" ); } // Inherit the content-theme from collapsible-set if ( !o.contentTheme ) { o.contentTheme = collapsibleSet.jqmData( "content-theme" ); } // Get the preference for collapsed icon in the set, but override with data- attribute on the individual collapsible o.collapsedIcon = $el.jqmData( "collapsed-icon" ) || collapsibleSet.jqmData( "collapsed-icon" ) || o.collapsedIcon; // Get the preference for expanded icon in the set, but override with data- attribute on the individual collapsible o.expandedIcon = $el.jqmData( "expanded-icon" ) || collapsibleSet.jqmData( "expanded-icon" ) || o.expandedIcon; // Gets the preference icon position in the set, but override with data- attribute on the individual collapsible o.iconpos = $el.jqmData( "iconpos" ) || collapsibleSet.jqmData( "iconpos" ) || o.iconpos; // Inherit the preference for inset from collapsible-set or set the default value to ensure equalty within a set if ( collapsibleSet.jqmData( "inset" ) !== undefined ) { o.inset = collapsibleSet.jqmData( "inset" ); } else { o.inset = true; } // Set corners for individual collapsibles to false when in a collapsible-set o.corners = false; // Gets the preference for mini in the set if ( !o.mini ) { o.mini = collapsibleSet.jqmData( "mini" ); } } else { // get inherited theme if not a set and no theme has been set if ( !o.theme ) { o.theme = $.mobile.getInheritedTheme( $el, "c" ); } } if ( !!o.inset ) { collapsibleClasses += " ui-collapsible-inset"; if ( !!o.corners ) { collapsibleClasses += " ui-corner-all" ; } } if ( o.contentTheme ) { collapsibleClasses += " ui-collapsible-themed-content"; collapsibleContent.addClass( "ui-body-" + o.contentTheme ); } if ( collapsibleClasses !== "" ) { collapsible.addClass( collapsibleClasses ); } collapsibleHeading //drop heading in before content .insertBefore( collapsibleContent ) //modify markup & attributes .addClass( "ui-collapsible-heading" ) .append( "<span class='ui-collapsible-heading-status'></span>" ) .wrapInner( "<a href='#' class='ui-collapsible-heading-toggle'></a>" ) .find( "a" ) .first() .buttonMarkup({ shadow: false, corners: false, iconpos: o.iconpos, icon: o.collapsedIcon, mini: o.mini, theme: o.theme }); //events collapsible .bind( "expand collapse", function( event ) { if ( !event.isDefaultPrevented() ) { var $this = $( this ), isCollapse = ( event.type === "collapse" ); event.preventDefault(); collapsibleHeading .toggleClass( "ui-collapsible-heading-collapsed", isCollapse ) .find( ".ui-collapsible-heading-status" ) .text( isCollapse ? o.expandCueText : o.collapseCueText ) .end() .find( ".ui-icon" ) .toggleClass( "ui-icon-" + o.expandedIcon, !isCollapse ) // logic or cause same icon for expanded/collapsed state would remove the ui-icon-class .toggleClass( "ui-icon-" + o.collapsedIcon, ( isCollapse || o.expandedIcon === o.collapsedIcon ) ) .end() .find( "a" ).first().removeClass( $.mobile.activeBtnClass ); $this.toggleClass( "ui-collapsible-collapsed", isCollapse ); collapsibleContent.toggleClass( "ui-collapsible-content-collapsed", isCollapse ).attr( "aria-hidden", isCollapse ); collapsibleContent.trigger( "updatelayout" ); } }) .trigger( o.collapsed ? "collapse" : "expand" ); collapsibleHeading .bind( "tap", function( event ) { collapsibleHeading.find( "a" ).first().addClass( $.mobile.activeBtnClass ); }) .bind( "click", function( event ) { var type = collapsibleHeading.is( ".ui-collapsible-heading-collapsed" ) ? "expand" : "collapse"; collapsible.trigger( type ); event.preventDefault(); event.stopPropagation(); }); } }); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.collapsible.prototype.enhanceWithin( e.target ); }); })( jQuery ); (function( $, undefined ) { $.mobile.behaviors.addFirstLastClasses = { _getVisibles: function( $els, create ) { var visibles; if ( create ) { visibles = $els.not( ".ui-screen-hidden" ); } else { visibles = $els.filter( ":visible" ); if ( visibles.length === 0 ) { visibles = $els.not( ".ui-screen-hidden" ); } } return visibles; }, _addFirstLastClasses: function( $els, $visibles, create ) { $els.removeClass( "ui-first-child ui-last-child" ); $visibles.eq( 0 ).addClass( "ui-first-child" ).end().last().addClass( "ui-last-child" ); if ( !create ) { this.element.trigger( "updatelayout" ); } } }; })( jQuery ); (function( $, undefined ) { $.widget( "mobile.collapsibleset", $.mobile.widget, $.extend( { options: { initSelector: ":jqmData(role='collapsible-set')" }, _create: function() { var $el = this.element.addClass( "ui-collapsible-set" ), o = this.options; // Inherit the theme from collapsible-set if ( !o.theme ) { o.theme = $.mobile.getInheritedTheme( $el, "c" ); } // Inherit the content-theme from collapsible-set if ( !o.contentTheme ) { o.contentTheme = $el.jqmData( "content-theme" ); } // Inherit the corner styling from collapsible-set if ( !o.corners ) { o.corners = $el.jqmData( "corners" ); } if ( $el.jqmData( "inset" ) !== undefined ) { o.inset = $el.jqmData( "inset" ); } o.inset = o.inset !== undefined ? o.inset : true; o.corners = o.corners !== undefined ? o.corners : true; if ( !!o.corners && !!o.inset ) { $el.addClass( "ui-corner-all" ); } // Initialize the collapsible set if it's not already initialized if ( !$el.jqmData( "collapsiblebound" ) ) { $el .jqmData( "collapsiblebound", true ) .bind( "expand", function( event ) { var closestCollapsible = $( event.target ) .closest( ".ui-collapsible" ); if ( closestCollapsible.parent().is( ":jqmData(role='collapsible-set')" ) ) { closestCollapsible .siblings( ".ui-collapsible" ) .trigger( "collapse" ); } }); } }, _init: function() { var $el = this.element, collapsiblesInSet = $el.children( ":jqmData(role='collapsible')" ), expanded = collapsiblesInSet.filter( ":jqmData(collapsed='false')" ); this._refresh( "true" ); // Because the corners are handled by the collapsible itself and the default state is collapsed // That was causing https://github.com/jquery/jquery-mobile/issues/4116 expanded.trigger( "expand" ); }, _refresh: function( create ) { var collapsiblesInSet = this.element.children( ":jqmData(role='collapsible')" ); $.mobile.collapsible.prototype.enhance( collapsiblesInSet.not( ".ui-collapsible" ) ); this._addFirstLastClasses( collapsiblesInSet, this._getVisibles( collapsiblesInSet, create ), create ); }, refresh: function() { this._refresh( false ); } }, $.mobile.behaviors.addFirstLastClasses ) ); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.collapsibleset.prototype.enhanceWithin( e.target ); }); })( jQuery ); (function( $, undefined ) { // filter function removes whitespace between label and form element so we can use inline-block (nodeType 3 = text) $.fn.fieldcontain = function( options ) { return this .addClass( "ui-field-contain ui-body ui-br" ) .contents().filter( function() { return ( this.nodeType === 3 && !/\S/.test( this.nodeValue ) ); }).remove(); }; //auto self-init widgets $( document ).bind( "pagecreate create", function( e ) { $( ":jqmData(role='fieldcontain')", e.target ).jqmEnhanceable().fieldcontain(); }); })( jQuery ); (function( $, undefined ) { $.fn.grid = function( options ) { return this.each(function() { var $this = $( this ), o = $.extend({ grid: null }, options ), $kids = $this.children(), gridCols = { solo:1, a:2, b:3, c:4, d:5 }, grid = o.grid, iterator; if ( !grid ) { if ( $kids.length <= 5 ) { for ( var letter in gridCols ) { if ( gridCols[ letter ] === $kids.length ) { grid = letter; } } } else { grid = "a"; $this.addClass( "ui-grid-duo" ); } } iterator = gridCols[grid]; $this.addClass( "ui-grid-" + grid ); $kids.filter( ":nth-child(" + iterator + "n+1)" ).addClass( "ui-block-a" ); if ( iterator > 1 ) { $kids.filter( ":nth-child(" + iterator + "n+2)" ).addClass( "ui-block-b" ); } if ( iterator > 2 ) { $kids.filter( ":nth-child(" + iterator + "n+3)" ).addClass( "ui-block-c" ); } if ( iterator > 3 ) { $kids.filter( ":nth-child(" + iterator + "n+4)" ).addClass( "ui-block-d" ); } if ( iterator > 4 ) { $kids.filter( ":nth-child(" + iterator + "n+5)" ).addClass( "ui-block-e" ); } }); }; })( jQuery ); (function( $, undefined ) { $.widget( "mobile.navbar", $.mobile.widget, { options: { iconpos: "top", grid: null, initSelector: ":jqmData(role='navbar')" }, _create: function() { var $navbar = this.element, $navbtns = $navbar.find( "a" ), iconpos = $navbtns.filter( ":jqmData(icon)" ).length ? this.options.iconpos : undefined; $navbar.addClass( "ui-navbar ui-mini" ) .attr( "role", "navigation" ) .find( "ul" ) .jqmEnhanceable() .grid({ grid: this.options.grid }); $navbtns.buttonMarkup({ corners: false, shadow: false, inline: true, iconpos: iconpos }); $navbar.delegate( "a", "vclick", function( event ) { // ui-btn-inner is returned as target var target = $( event.target ).is( "a" ) ? $( this ) : $( this ).parent( "a" ); if ( !target.is( ".ui-disabled, .ui-btn-active" ) ) { $navbtns.removeClass( $.mobile.activeBtnClass ); $( this ).addClass( $.mobile.activeBtnClass ); // The code below is a workaround to fix #1181 var activeBtn = $( this ); $( document ).one( "pagehide", function() { activeBtn.removeClass( $.mobile.activeBtnClass ); }); } }); // Buttons in the navbar with ui-state-persist class should regain their active state before page show $navbar.closest( ".ui-page" ).bind( "pagebeforeshow", function() { $navbtns.filter( ".ui-state-persist" ).addClass( $.mobile.activeBtnClass ); }); } }); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.navbar.prototype.enhanceWithin( e.target ); }); })( jQuery ); (function( $, undefined ) { //Keeps track of the number of lists per page UID //This allows support for multiple nested list in the same page //https://github.com/jquery/jquery-mobile/issues/1617 var listCountPerPage = {}; $.widget( "mobile.listview", $.mobile.widget, $.extend( { options: { theme: null, countTheme: "c", headerTheme: "b", dividerTheme: "b", icon: "arrow-r", splitIcon: "arrow-r", splitTheme: "b", corners: true, shadow: true, inset: false, initSelector: ":jqmData(role='listview')" }, _create: function() { var t = this, listviewClasses = ""; listviewClasses += t.options.inset ? " ui-listview-inset" : ""; if ( !!t.options.inset ) { listviewClasses += t.options.corners ? " ui-corner-all" : ""; listviewClasses += t.options.shadow ? " ui-shadow" : ""; } // create listview markup t.element.addClass(function( i, orig ) { return orig + " ui-listview" + listviewClasses; }); t.refresh( true ); }, // This is a generic utility method for finding the first // node with a given nodeName. It uses basic DOM traversal // to be fast and is meant to be a substitute for simple // $.fn.closest() and $.fn.children() calls on a single // element. Note that callers must pass both the lowerCase // and upperCase version of the nodeName they are looking for. // The main reason for this is that this function will be // called many times and we want to avoid having to lowercase // the nodeName from the element every time to ensure we have // a match. Note that this function lives here for now, but may // be moved into $.mobile if other components need a similar method. _findFirstElementByTagName: function( ele, nextProp, lcName, ucName ) { var dict = {}; dict[ lcName ] = dict[ ucName ] = true; while ( ele ) { if ( dict[ ele.nodeName ] ) { return ele; } ele = ele[ nextProp ]; } return null; }, _getChildrenByTagName: function( ele, lcName, ucName ) { var results = [], dict = {}; dict[ lcName ] = dict[ ucName ] = true; ele = ele.firstChild; while ( ele ) { if ( dict[ ele.nodeName ] ) { results.push( ele ); } ele = ele.nextSibling; } return $( results ); }, _addThumbClasses: function( containers ) { var i, img, len = containers.length; for ( i = 0; i < len; i++ ) { img = $( this._findFirstElementByTagName( containers[ i ].firstChild, "nextSibling", "img", "IMG" ) ); if ( img.length ) { img.addClass( "ui-li-thumb" ); $( this._findFirstElementByTagName( img[ 0 ].parentNode, "parentNode", "li", "LI" ) ).addClass( img.is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" ); } } }, refresh: function( create ) { this.parentPage = this.element.closest( ".ui-page" ); this._createSubPages(); var o = this.options, $list = this.element, self = this, dividertheme = $list.jqmData( "dividertheme" ) || o.dividerTheme, listsplittheme = $list.jqmData( "splittheme" ), listspliticon = $list.jqmData( "spliticon" ), listicon = $list.jqmData( "icon" ), li = this._getChildrenByTagName( $list[ 0 ], "li", "LI" ), ol = !!$.nodeName( $list[ 0 ], "ol" ), jsCount = !$.support.cssPseudoElement, start = $list.attr( "start" ), itemClassDict = {}, item, itemClass, itemTheme, a, last, splittheme, counter, startCount, newStartCount, countParent, icon, imgParents, img, linkIcon; if ( ol && jsCount ) { $list.find( ".ui-li-dec" ).remove(); } if ( ol ) { // Check if a start attribute has been set while taking a value of 0 into account if ( start || start === 0 ) { if ( !jsCount ) { startCount = parseInt( start , 10 ) - 1; $list.css( "counter-reset", "listnumbering " + startCount ); } else { counter = parseInt( start , 10 ); } } else if ( jsCount ) { counter = 1; } } if ( !o.theme ) { o.theme = $.mobile.getInheritedTheme( this.element, "c" ); } for ( var pos = 0, numli = li.length; pos < numli; pos++ ) { item = li.eq( pos ); itemClass = "ui-li"; // If we're creating the element, we update it regardless if ( create || !item.hasClass( "ui-li" ) ) { itemTheme = item.jqmData( "theme" ) || o.theme; a = this._getChildrenByTagName( item[ 0 ], "a", "A" ); var isDivider = ( item.jqmData( "role" ) === "list-divider" ); if ( a.length && !isDivider ) { icon = item.jqmData( "icon" ); item.buttonMarkup({ wrapperEls: "div", shadow: false, corners: false, iconpos: "right", icon: a.length > 1 || icon === false ? false : icon || listicon || o.icon, theme: itemTheme }); if ( ( icon !== false ) && ( a.length === 1 ) ) { item.addClass( "ui-li-has-arrow" ); } a.first().removeClass( "ui-link" ).addClass( "ui-link-inherit" ); if ( a.length > 1 ) { itemClass += " ui-li-has-alt"; last = a.last(); splittheme = listsplittheme || last.jqmData( "theme" ) || o.splitTheme; linkIcon = last.jqmData( "icon" ); last.appendTo( item ) .attr( "title", $.trim(last.getEncodedText()) ) .addClass( "ui-li-link-alt" ) .empty() .buttonMarkup({ shadow: false, corners: false, theme: itemTheme, icon: false, iconpos: "notext" }) .find( ".ui-btn-inner" ) .append( $( document.createElement( "span" ) ).buttonMarkup({ shadow: true, corners: true, theme: splittheme, iconpos: "notext", // link icon overrides list item icon overrides ul element overrides options icon: linkIcon || icon || listspliticon || o.splitIcon }) ); } } else if ( isDivider ) { itemClass += " ui-li-divider ui-bar-" + ( item.jqmData( "theme" ) || dividertheme ); item.attr( "role", "heading" ); if ( ol ) { //reset counter when a divider heading is encountered if ( start || start === 0 ) { if ( !jsCount ) { newStartCount = parseInt( start , 10 ) - 1; item.css( "counter-reset", "listnumbering " + newStartCount ); } else { counter = parseInt( start , 10 ); } } else if ( jsCount ) { counter = 1; } } } else { itemClass += " ui-li-static ui-btn-up-" + itemTheme; } } if ( ol && jsCount && itemClass.indexOf( "ui-li-divider" ) < 0 ) { countParent = itemClass.indexOf( "ui-li-static" ) > 0 ? item : item.find( ".ui-link-inherit" ); countParent.addClass( "ui-li-jsnumbering" ) .prepend( "<span class='ui-li-dec'>" + ( counter++ ) + ". </span>" ); } // Instead of setting item class directly on the list item and its // btn-inner at this point in time, push the item into a dictionary // that tells us what class to set on it so we can do this after this // processing loop is finished. if ( !itemClassDict[ itemClass ] ) { itemClassDict[ itemClass ] = []; } itemClassDict[ itemClass ].push( item[ 0 ] ); } // Set the appropriate listview item classes on each list item // and their btn-inner elements. The main reason we didn't do this // in the for-loop above is because we can eliminate per-item function overhead // by calling addClass() and children() once or twice afterwards. This // can give us a significant boost on platforms like WP7.5. for ( itemClass in itemClassDict ) { $( itemClassDict[ itemClass ] ).addClass( itemClass ).children( ".ui-btn-inner" ).addClass( itemClass ); } $list.find( "h1, h2, h3, h4, h5, h6" ).addClass( "ui-li-heading" ) .end() .find( "p, dl" ).addClass( "ui-li-desc" ) .end() .find( ".ui-li-aside" ).each(function() { var $this = $( this ); $this.prependTo( $this.parent() ); //shift aside to front for css float }) .end() .find( ".ui-li-count" ).each(function() { $( this ).closest( "li" ).addClass( "ui-li-has-count" ); }).addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" ); // The idea here is to look at the first image in the list item // itself, and any .ui-link-inherit element it may contain, so we // can place the appropriate classes on the image and list item. // Note that we used to use something like: // // li.find(">img:eq(0), .ui-link-inherit>img:eq(0)").each( ... ); // // But executing a find() like that on Windows Phone 7.5 took a // really long time. Walking things manually with the code below // allows the 400 listview item page to load in about 3 seconds as // opposed to 30 seconds. this._addThumbClasses( li ); this._addThumbClasses( $list.find( ".ui-link-inherit" ) ); this._addFirstLastClasses( li, this._getVisibles( li, create ), create ); // autodividers binds to this to redraw dividers after the listview refresh this._trigger( "afterrefresh" ); }, //create a string for ID/subpage url creation _idStringEscape: function( str ) { return str.replace(/[^a-zA-Z0-9]/g, '-'); }, _createSubPages: function() { var parentList = this.element, parentPage = parentList.closest( ".ui-page" ), parentUrl = parentPage.jqmData( "url" ), parentId = parentUrl || parentPage[ 0 ][ $.expando ], parentListId = parentList.attr( "id" ), o = this.options, dns = "data-" + $.mobile.ns, self = this, persistentFooterID = parentPage.find( ":jqmData(role='footer')" ).jqmData( "id" ), hasSubPages; if ( typeof listCountPerPage[ parentId ] === "undefined" ) { listCountPerPage[ parentId ] = -1; } parentListId = parentListId || ++listCountPerPage[ parentId ]; $( parentList.find( "li>ul, li>ol" ).toArray().reverse() ).each(function( i ) { var self = this, list = $( this ), listId = list.attr( "id" ) || parentListId + "-" + i, parent = list.parent(), nodeElsFull = $( list.prevAll().toArray().reverse() ), nodeEls = nodeElsFull.length ? nodeElsFull : $( "<span>" + $.trim(parent.contents()[ 0 ].nodeValue) + "</span>" ), title = nodeEls.first().getEncodedText(),//url limits to first 30 chars of text id = ( parentUrl || "" ) + "&" + $.mobile.subPageUrlKey + "=" + listId, theme = list.jqmData( "theme" ) || o.theme, countTheme = list.jqmData( "counttheme" ) || parentList.jqmData( "counttheme" ) || o.countTheme, newPage, anchor; //define hasSubPages for use in later removal hasSubPages = true; newPage = list.detach() .wrap( "<div " + dns + "role='page' " + dns + "url='" + id + "' " + dns + "theme='" + theme + "' " + dns + "count-theme='" + countTheme + "'><div " + dns + "role='content'></div></div>" ) .parent() .before( "<div " + dns + "role='header' " + dns + "theme='" + o.headerTheme + "'><div class='ui-title'>" + title + "</div></div>" ) .after( persistentFooterID ? $( "<div " + dns + "role='footer' " + dns + "id='"+ persistentFooterID +"'>" ) : "" ) .parent() .appendTo( $.mobile.pageContainer ); newPage.page(); anchor = parent.find( 'a:first' ); if ( !anchor.length ) { anchor = $( "<a/>" ).html( nodeEls || title ).prependTo( parent.empty() ); } anchor.attr( "href", "#" + id ); }).listview(); // on pagehide, remove any nested pages along with the parent page, as long as they aren't active // and aren't embedded if ( hasSubPages && parentPage.is( ":jqmData(external-page='true')" ) && parentPage.data( "mobile-page" ).options.domCache === false ) { var newRemove = function( e, ui ) { var nextPage = ui.nextPage, npURL, prEvent = new $.Event( "pageremove" ); if ( ui.nextPage ) { npURL = nextPage.jqmData( "url" ); if ( npURL.indexOf( parentUrl + "&" + $.mobile.subPageUrlKey ) !== 0 ) { self.childPages().remove(); parentPage.trigger( prEvent ); if ( !prEvent.isDefaultPrevented() ) { parentPage.removeWithDependents(); } } } }; // unbind the original page remove and replace with our specialized version parentPage .unbind( "pagehide.remove" ) .bind( "pagehide.remove", newRemove); } }, // TODO sort out a better way to track sub pages of the listview this is brittle childPages: function() { var parentUrl = this.parentPage.jqmData( "url" ); return $( ":jqmData(url^='"+ parentUrl + "&" + $.mobile.subPageUrlKey + "')" ); } }, $.mobile.behaviors.addFirstLastClasses ) ); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.listview.prototype.enhanceWithin( e.target ); }); })( jQuery ); (function( $ ) { var meta = $( "meta[name=viewport]" ), initialContent = meta.attr( "content" ), disabledZoom = initialContent + ",maximum-scale=1, user-scalable=no", enabledZoom = initialContent + ",maximum-scale=10, user-scalable=yes", disabledInitially = /(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test( initialContent ); $.mobile.zoom = $.extend( {}, { enabled: !disabledInitially, locked: false, disable: function( lock ) { if ( !disabledInitially && !$.mobile.zoom.locked ) { meta.attr( "content", disabledZoom ); $.mobile.zoom.enabled = false; $.mobile.zoom.locked = lock || false; } }, enable: function( unlock ) { if ( !disabledInitially && ( !$.mobile.zoom.locked || unlock === true ) ) { meta.attr( "content", enabledZoom ); $.mobile.zoom.enabled = true; $.mobile.zoom.locked = false; } }, restore: function() { if ( !disabledInitially ) { meta.attr( "content", initialContent ); $.mobile.zoom.enabled = true; } } }); }( jQuery )); (function( $, undefined ) { $.widget( "mobile.textinput", $.mobile.widget, { options: { theme: null, mini: false, // This option defaults to true on iOS devices. preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1, initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type]), input[type='file']", clearBtn: false, clearSearchButtonText: null, //deprecating for 1.3... clearBtnText: "clear text", disabled: false }, _create: function() { var self = this, input = this.element, o = this.options, theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ), themeclass = " ui-body-" + theme, miniclass = o.mini ? " ui-mini" : "", isSearch = input.is( "[type='search'], :jqmData(type='search')" ), focusedEl, clearbtn, clearBtnText = o.clearSearchButtonText || o.clearBtnText, clearBtnBlacklist = input.is( "textarea, :jqmData(type='range')" ), inputNeedsClearBtn = !!o.clearBtn && !clearBtnBlacklist, inputNeedsWrap = input.is( "input" ) && !input.is( ":jqmData(type='range')" ); function toggleClear() { setTimeout( function() { clearbtn.toggleClass( "ui-input-clear-hidden", !input.val() ); }, 0 ); } $( "label[for='" + input.attr( "id" ) + "']" ).addClass( "ui-input-text" ); focusedEl = input.addClass( "ui-input-text ui-body-"+ theme ); // XXX: Temporary workaround for issue 785 (Apple bug 8910589). // Turn off autocorrect and autocomplete on non-iOS 5 devices // since the popup they use can't be dismissed by the user. Note // that we test for the presence of the feature by looking for // the autocorrect property on the input element. We currently // have no test for iOS 5 or newer so we're temporarily using // the touchOverflow support flag for jQM 1.0. Yes, I feel dirty. - jblas if ( typeof input[0].autocorrect !== "undefined" && !$.support.touchOverflow ) { // Set the attribute instead of the property just in case there // is code that attempts to make modifications via HTML. input[0].setAttribute( "autocorrect", "off" ); input[0].setAttribute( "autocomplete", "off" ); } //"search" and "text" input widgets if ( isSearch ) { focusedEl = input.wrap( "<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield" + themeclass + miniclass + "'></div>" ).parent(); } else if ( inputNeedsWrap ) { focusedEl = input.wrap( "<div class='ui-input-text ui-shadow-inset ui-corner-all ui-btn-shadow" + themeclass + miniclass + "'></div>" ).parent(); } if( inputNeedsClearBtn || isSearch ) { clearbtn = $( "<a href='#' class='ui-input-clear' title='" + clearBtnText + "'>" + clearBtnText + "</a>" ) .bind( "click", function( event ) { input .val( "" ) .focus() .trigger( "change" ); clearbtn.addClass( "ui-input-clear-hidden" ); event.preventDefault(); }) .appendTo( focusedEl ) .buttonMarkup({ icon: "delete", iconpos: "notext", corners: true, shadow: true, mini: o.mini }); if ( !isSearch ) { focusedEl.addClass( "ui-input-has-clear" ); } toggleClear(); input.bind( "paste cut keyup input focus change blur", toggleClear ); } else if ( !inputNeedsWrap && !isSearch ) { input.addClass( "ui-corner-all ui-shadow-inset" + themeclass + miniclass ); } input.focus(function() { // In many situations, iOS will zoom into the input upon tap, this prevents that from happening if ( o.preventFocusZoom ) { $.mobile.zoom.disable( true ); } focusedEl.addClass( $.mobile.focusClass ); }) .blur(function() { focusedEl.removeClass( $.mobile.focusClass ); if ( o.preventFocusZoom ) { $.mobile.zoom.enable( true ); } }); // Autogrow if ( input.is( "textarea" ) ) { var extraLineHeight = 15, keyupTimeoutBuffer = 100, keyupTimeout; this._keyup = function() { var scrollHeight = input[ 0 ].scrollHeight, clientHeight = input[ 0 ].clientHeight; if ( clientHeight < scrollHeight ) { var paddingTop = parseFloat( input.css( "padding-top" ) ), paddingBottom = parseFloat( input.css( "padding-bottom" ) ), paddingHeight = paddingTop + paddingBottom; input.height( scrollHeight - paddingHeight + extraLineHeight ); } }; input.on( "keyup change input paste", function() { clearTimeout( keyupTimeout ); keyupTimeout = setTimeout( self._keyup, keyupTimeoutBuffer ); }); // binding to pagechange here ensures that for pages loaded via // ajax the height is recalculated without user input this._on( true, $.mobile.document, { "pagechange": "_keyup" }); // Issue 509: the browser is not providing scrollHeight properly until the styles load if ( $.trim( input.val() ) ) { // bind to the window load to make sure the height is calculated based on BOTH // the DOM and CSS this._on( true, $.mobile.window, {"load": "_keyup"}); } } if ( input.attr( "disabled" ) ) { this.disable(); } }, disable: function() { var $el, isSearch = this.element.is( "[type='search'], :jqmData(type='search')" ), inputNeedsWrap = this.element.is( "input" ) && !this.element.is( ":jqmData(type='range')" ), parentNeedsDisabled = this.element.attr( "disabled", true ) && ( inputNeedsWrap || isSearch ); if ( parentNeedsDisabled ) { $el = this.element.parent(); } else { $el = this.element; } $el.addClass( "ui-disabled" ); return this._setOption( "disabled", true ); }, enable: function() { var $el, isSearch = this.element.is( "[type='search'], :jqmData(type='search')" ), inputNeedsWrap = this.element.is( "input" ) && !this.element.is( ":jqmData(type='range')" ), parentNeedsEnabled = this.element.attr( "disabled", false ) && ( inputNeedsWrap || isSearch ); if ( parentNeedsEnabled ) { $el = this.element.parent(); } else { $el = this.element; } $el.removeClass( "ui-disabled" ); return this._setOption( "disabled", false ); } }); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.textinput.prototype.enhanceWithin( e.target, true ); }); })( jQuery ); (function( $, undefined ) { $.mobile.listview.prototype.options.filter = false; $.mobile.listview.prototype.options.filterPlaceholder = "Filter items..."; $.mobile.listview.prototype.options.filterTheme = "c"; $.mobile.listview.prototype.options.filterReveal = false; // TODO rename callback/deprecate and default to the item itself as the first argument var defaultFilterCallback = function( text, searchValue, item ) { return text.toString().toLowerCase().indexOf( searchValue ) === -1; }; $.mobile.listview.prototype.options.filterCallback = defaultFilterCallback; $.mobile.document.delegate( "ul, ol", "listviewcreate", function() { var list = $( this ), listview = list.data( "mobile-listview" ); if ( !listview || !listview.options.filter ) { return; } if ( listview.options.filterReveal ) { list.children().addClass( "ui-screen-hidden" ); } var wrapper = $( "<form>", { "class": "ui-listview-filter ui-bar-" + listview.options.filterTheme, "role": "search" }).submit( function( e ) { e.preventDefault(); search.blur(); }), onKeyUp = function( e ) { var $this = $( this ), val = this.value.toLowerCase(), listItems = null, li = list.children(), lastval = $this.jqmData( "lastval" ) + "", childItems = false, itemtext = "", item, // Check if a custom filter callback applies isCustomFilterCallback = listview.options.filterCallback !== defaultFilterCallback; if ( lastval && lastval === val ) { // Execute the handler only once per value change return; } listview._trigger( "beforefilter", "beforefilter", { input: this } ); // Change val as lastval for next execution $this.jqmData( "lastval" , val ); if ( isCustomFilterCallback || val.length < lastval.length || val.indexOf( lastval ) !== 0 ) { // Custom filter callback applies or removed chars or pasted something totally different, check all items listItems = list.children(); } else { // Only chars added, not removed, only use visible subset listItems = list.children( ":not(.ui-screen-hidden)" ); if ( !listItems.length && listview.options.filterReveal ) { listItems = list.children( ".ui-screen-hidden" ); } } if ( val ) { // This handles hiding regular rows without the text we search for // and any list dividers without regular rows shown under it for ( var i = listItems.length - 1; i >= 0; i-- ) { item = $( listItems[ i ] ); itemtext = item.jqmData( "filtertext" ) || item.text(); if ( item.is( "li:jqmData(role=list-divider)" ) ) { item.toggleClass( "ui-filter-hidequeue" , !childItems ); // New bucket! childItems = false; } else if ( listview.options.filterCallback( itemtext, val, item ) ) { //mark to be hidden item.toggleClass( "ui-filter-hidequeue" , true ); } else { // There's a shown item in the bucket childItems = true; } } // Show items, not marked to be hidden listItems .filter( ":not(.ui-filter-hidequeue)" ) .toggleClass( "ui-screen-hidden", false ); // Hide items, marked to be hidden listItems .filter( ".ui-filter-hidequeue" ) .toggleClass( "ui-screen-hidden", true ) .toggleClass( "ui-filter-hidequeue", false ); } else { //filtervalue is empty => show all listItems.toggleClass( "ui-screen-hidden", !!listview.options.filterReveal ); } listview._addFirstLastClasses( li, listview._getVisibles( li, false ), false ); }, search = $( "<input>", { placeholder: listview.options.filterPlaceholder }) .attr( "data-" + $.mobile.ns + "type", "search" ) .jqmData( "lastval", "" ) .bind( "keyup change input", onKeyUp ) .appendTo( wrapper ) .textinput(); if ( listview.options.inset ) { wrapper.addClass( "ui-listview-filter-inset" ); } wrapper.bind( "submit", function() { return false; }) .insertBefore( list ); }); })( jQuery ); (function( $, undefined ) { $.mobile.listview.prototype.options.autodividers = false; $.mobile.listview.prototype.options.autodividersSelector = function( elt ) { // look for the text in the given element var text = $.trim( elt.text() ) || null; if ( !text ) { return null; } // create the text for the divider (first uppercased letter) text = text.slice( 0, 1 ).toUpperCase(); return text; }; $.mobile.document.delegate( "ul,ol", "listviewcreate", function() { var list = $( this ), listview = list.data( "mobile-listview" ); if ( !listview || !listview.options.autodividers ) { return; } var replaceDividers = function () { list.find( "li:jqmData(role='list-divider')" ).remove(); var lis = list.find( 'li' ), lastDividerText = null, li, dividerText; for ( var i = 0; i < lis.length ; i++ ) { li = lis[i]; dividerText = listview.options.autodividersSelector( $( li ) ); if ( dividerText && lastDividerText !== dividerText ) { var divider = document.createElement( 'li' ); divider.appendChild( document.createTextNode( dividerText ) ); divider.setAttribute( 'data-' + $.mobile.ns + 'role', 'list-divider' ); li.parentNode.insertBefore( divider, li ); } lastDividerText = dividerText; } }; var afterListviewRefresh = function () { list.unbind( 'listviewafterrefresh', afterListviewRefresh ); replaceDividers(); listview.refresh(); list.bind( 'listviewafterrefresh', afterListviewRefresh ); }; afterListviewRefresh(); }); })( jQuery ); (function( $, undefined ) { $( document ).bind( "pagecreate create", function( e ) { $( ":jqmData(role='nojs')", e.target ).addClass( "ui-nojs" ); }); })( jQuery ); (function( $, undefined ) { $.mobile.behaviors.formReset = { _handleFormReset: function() { this._on( this.element.closest( "form" ), { reset: function() { this._delay( "_reset" ); } }); } }; })( jQuery ); /* * "checkboxradio" plugin */ (function( $, undefined ) { $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( { options: { theme: null, mini: false, initSelector: "input[type='checkbox'],input[type='radio']" }, _create: function() { var self = this, input = this.element, o = this.options, inheritAttr = function( input, dataAttr ) { return input.jqmData( dataAttr ) || input.closest( "form, fieldset" ).jqmData( dataAttr ); }, // NOTE: Windows Phone could not find the label through a selector // filter works though. parentLabel = $( input ).closest( "label" ), label = parentLabel.length ? parentLabel : $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ).first(), inputtype = input[0].type, mini = inheritAttr( input, "mini" ) || o.mini, checkedState = inputtype + "-on", uncheckedState = inputtype + "-off", iconpos = inheritAttr( input, "iconpos" ), checkedClass = "ui-" + checkedState, uncheckedClass = "ui-" + uncheckedState; if ( inputtype !== "checkbox" && inputtype !== "radio" ) { return; } // Expose for other methods $.extend( this, { label: label, inputtype: inputtype, checkedClass: checkedClass, uncheckedClass: uncheckedClass, checkedicon: checkedState, uncheckedicon: uncheckedState }); // If there's no selected theme check the data attr if ( !o.theme ) { o.theme = $.mobile.getInheritedTheme( this.element, "c" ); } label.buttonMarkup({ theme: o.theme, icon: uncheckedState, shadow: false, mini: mini, iconpos: iconpos }); // Wrap the input + label in a div var wrapper = document.createElement('div'); wrapper.className = 'ui-' + inputtype; input.add( label ).wrapAll( wrapper ); label.bind({ vmouseover: function( event ) { if ( $( this ).parent().is( ".ui-disabled" ) ) { event.stopPropagation(); } }, vclick: function( event ) { if ( input.is( ":disabled" ) ) { event.preventDefault(); return; } self._cacheVals(); input.prop( "checked", inputtype === "radio" && true || !input.prop( "checked" ) ); // trigger click handler's bound directly to the input as a substitute for // how label clicks behave normally in the browsers // TODO: it would be nice to let the browser's handle the clicks and pass them // through to the associate input. we can swallow that click at the parent // wrapper element level input.triggerHandler( 'click' ); // Input set for common radio buttons will contain all the radio // buttons, but will not for checkboxes. clearing the checked status // of other radios ensures the active button state is applied properly self._getInputSet().not( input ).prop( "checked", false ); self._updateAll(); return false; } }); input .bind({ vmousedown: function() { self._cacheVals(); }, vclick: function() { var $this = $( this ); // Adds checked attribute to checked input when keyboard is used if ( $this.is( ":checked" ) ) { $this.prop( "checked", true); self._getInputSet().not( $this ).prop( "checked", false ); } else { $this.prop( "checked", false ); } self._updateAll(); }, focus: function() { label.addClass( $.mobile.focusClass ); }, blur: function() { label.removeClass( $.mobile.focusClass ); } }); this._handleFormReset(); this.refresh(); }, _cacheVals: function() { this._getInputSet().each(function() { $( this ).jqmData( "cacheVal", this.checked ); }); }, //returns either a set of radios with the same name attribute, or a single checkbox _getInputSet: function() { if ( this.inputtype === "checkbox" ) { return this.element; } return this.element.closest( "form, :jqmData(role='page'), :jqmData(role='dialog')" ) .find( "input[name='" + this.element[0].name + "'][type='" + this.inputtype + "']" ); }, _updateAll: function() { var self = this; this._getInputSet().each(function() { var $this = $( this ); if ( this.checked || self.inputtype === "checkbox" ) { $this.trigger( "change" ); } }) .checkboxradio( "refresh" ); }, _reset: function() { this.refresh(); }, refresh: function() { var input = this.element[ 0 ], active = " " + $.mobile.activeBtnClass, checkedClass = this.checkedClass + ( this.element.parents( ".ui-controlgroup-horizontal" ).length ? active : "" ), label = this.label; if ( input.checked ) { label.removeClass( this.uncheckedClass + active ).addClass( checkedClass ).buttonMarkup( { icon: this.checkedicon } ); } else { label.removeClass( checkedClass ).addClass( this.uncheckedClass ).buttonMarkup( { icon: this.uncheckedicon } ); } if ( input.disabled ) { this.disable(); } else { this.enable(); } }, disable: function() { this.element.prop( "disabled", true ).parent().addClass( "ui-disabled" ); }, enable: function() { this.element.prop( "disabled", false ).parent().removeClass( "ui-disabled" ); } }, $.mobile.behaviors.formReset ) ); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.checkboxradio.prototype.enhanceWithin( e.target, true ); }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.button", $.mobile.widget, { options: { theme: null, icon: null, iconpos: null, corners: true, shadow: true, iconshadow: true, inline: null, mini: null, initSelector: "button, [type='button'], [type='submit'], [type='reset']" }, _create: function() { var $el = this.element, $button, // create a copy of this.options we can pass to buttonMarkup o = ( function( tdo ) { var key, ret = {}; for ( key in tdo ) { if ( tdo[ key ] !== null && key !== "initSelector" ) { ret[ key ] = tdo[ key ]; } } return ret; } )( this.options ), classes = "", $buttonPlaceholder; // if this is a link, check if it's been enhanced and, if not, use the right function if ( $el[ 0 ].tagName === "A" ) { if ( !$el.hasClass( "ui-btn" ) ) { $el.buttonMarkup(); } return; } // get the inherited theme // TODO centralize for all widgets if ( !this.options.theme ) { this.options.theme = $.mobile.getInheritedTheme( this.element, "c" ); } // TODO: Post 1.1--once we have time to test thoroughly--any classes manually applied to the original element should be carried over to the enhanced element, with an `-enhanced` suffix. See https://github.com/jquery/jquery-mobile/issues/3577 /* if ( $el[0].className.length ) { classes = $el[0].className; } */ if ( !!~$el[0].className.indexOf( "ui-btn-left" ) ) { classes = "ui-btn-left"; } if ( !!~$el[0].className.indexOf( "ui-btn-right" ) ) { classes = "ui-btn-right"; } if ( $el.attr( "type" ) === "submit" || $el.attr( "type" ) === "reset" ) { if ( classes ) { classes += " ui-submit"; } else { classes = "ui-submit"; } } $( "label[for='" + $el.attr( "id" ) + "']" ).addClass( "ui-submit" ); // Add ARIA role this.button = $( "<div></div>" ) [ $el.html() ? "html" : "text" ]( $el.html() || $el.val() ) .insertBefore( $el ) .buttonMarkup( o ) .addClass( classes ) .append( $el.addClass( "ui-btn-hidden" ) ); $button = this.button; $el.bind({ focus: function() { $button.addClass( $.mobile.focusClass ); }, blur: function() { $button.removeClass( $.mobile.focusClass ); } }); this.refresh(); }, _setOption: function( key, value ) { var op = {}; op[ key ] = value; if ( key !== "initSelector" ) { this.button.buttonMarkup( op ); // Record the option change in the options and in the DOM data-* attributes this.element.attr( "data-" + ( $.mobile.ns || "" ) + ( key.replace( /([A-Z])/, "-$1" ).toLowerCase() ), value ); } this._super( "_setOption", key, value ); }, enable: function() { this.element.attr( "disabled", false ); this.button.removeClass( "ui-disabled" ).attr( "aria-disabled", false ); return this._setOption( "disabled", false ); }, disable: function() { this.element.attr( "disabled", true ); this.button.addClass( "ui-disabled" ).attr( "aria-disabled", true ); return this._setOption( "disabled", true ); }, refresh: function() { var $el = this.element; if ( $el.prop("disabled") ) { this.disable(); } else { this.enable(); } // Grab the button's text element from its implementation-independent data item $( this.button.data( 'buttonElements' ).text )[ $el.html() ? "html" : "text" ]( $el.html() || $el.val() ); } }); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.button.prototype.enhanceWithin( e.target, true ); }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.slider", $.mobile.widget, $.extend( { widgetEventPrefix: "slide", options: { theme: null, trackTheme: null, disabled: false, initSelector: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')", mini: false, highlight: false }, _create: function() { // TODO: Each of these should have comments explain what they're for var self = this, control = this.element, parentTheme = $.mobile.getInheritedTheme( control, "c" ), theme = this.options.theme || parentTheme, trackTheme = this.options.trackTheme || parentTheme, cType = control[ 0 ].nodeName.toLowerCase(), isSelect = this.isToggleSwitch = cType === "select", isRangeslider = control.parent().is( ":jqmData(role='rangeslider')" ), selectClass = ( this.isToggleSwitch ) ? "ui-slider-switch" : "", controlID = control.attr( "id" ), $label = $( "[for='" + controlID + "']" ), labelID = $label.attr( "id" ) || controlID + "-label", label = $label.attr( "id", labelID ), min = !this.isToggleSwitch ? parseFloat( control.attr( "min" ) ) : 0, max = !this.isToggleSwitch ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length-1, step = window.parseFloat( control.attr( "step" ) || 1 ), miniClass = ( this.options.mini || control.jqmData( "mini" ) ) ? " ui-mini" : "", domHandle = document.createElement( "a" ), handle = $( domHandle ), domSlider = document.createElement( "div" ), slider = $( domSlider ), valuebg = this.options.highlight && !this.isToggleSwitch ? (function() { var bg = document.createElement( "div" ); bg.className = "ui-slider-bg " + $.mobile.activeBtnClass + " ui-btn-corner-all"; return $( bg ).prependTo( slider ); })() : false, options, wrapper; domHandle.setAttribute( "href", "#" ); domSlider.setAttribute( "role", "application" ); domSlider.className = [this.isToggleSwitch ? "ui-slider " : "ui-slider-track ",selectClass," ui-btn-down-",trackTheme," ui-btn-corner-all", miniClass].join( "" ); domHandle.className = "ui-slider-handle"; domSlider.appendChild( domHandle ); handle.buttonMarkup({ corners: true, theme: theme, shadow: true }) .attr({ "role": "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": this._value(), "aria-valuetext": this._value(), "title": this._value(), "aria-labelledby": labelID }); $.extend( this, { slider: slider, handle: handle, type: cType, step: step, max: max, min: min, valuebg: valuebg, isRangeslider: isRangeslider, dragging: false, beforeStart: null, userModified: false, mouseMoved: false }); if ( this.isToggleSwitch ) { wrapper = document.createElement( "div" ); wrapper.className = "ui-slider-inneroffset"; for ( var j = 0, length = domSlider.childNodes.length; j < length; j++ ) { wrapper.appendChild( domSlider.childNodes[j] ); } domSlider.appendChild( wrapper ); // slider.wrapInner( "<div class='ui-slider-inneroffset'></div>" ); // make the handle move with a smooth transition handle.addClass( "ui-slider-handle-snapping" ); options = control.find( "option" ); for ( var i = 0, optionsCount = options.length; i < optionsCount; i++ ) { var side = !i ? "b" : "a", sliderTheme = !i ? " ui-btn-down-" + trackTheme : ( " " + $.mobile.activeBtnClass ), sliderLabel = document.createElement( "div" ), sliderImg = document.createElement( "span" ); sliderImg.className = ["ui-slider-label ui-slider-label-", side, sliderTheme, " ui-btn-corner-all"].join( "" ); sliderImg.setAttribute( "role", "img" ); sliderImg.appendChild( document.createTextNode( options[i].innerHTML ) ); $( sliderImg ).prependTo( slider ); } self._labels = $( ".ui-slider-label", slider ); } label.addClass( "ui-slider" ); // monitor the input for updated values control.addClass( this.isToggleSwitch ? "ui-slider-switch" : "ui-slider-input" ); this._on( control, { "change": "_controlChange", "keyup": "_controlKeyup", "blur": "_controlBlur", "vmouseup": "_controlVMouseUp" }); slider.bind( "vmousedown", $.proxy( this._sliderVMouseDown, this ) ) .bind( "vclick", false ); // We have to instantiate a new function object for the unbind to work properly // since the method itself is defined in the prototype (causing it to unbind everything) this._on( document, { "vmousemove": "_preventDocumentDrag" }); this._on( slider.add( document ), { "vmouseup": "_sliderVMouseUp" }); slider.insertAfter( control ); // wrap in a div for styling purposes if ( !this.isToggleSwitch && !isRangeslider ) { wrapper = this.options.mini ? "<div class='ui-slider ui-mini'>" : "<div class='ui-slider'>"; control.add( slider ).wrapAll( wrapper ); } // Only add focus class to toggle switch, sliders get it automatically from ui-btn if ( this.isToggleSwitch ) { this.handle.bind({ focus: function() { slider.addClass( $.mobile.focusClass ); }, blur: function() { slider.removeClass( $.mobile.focusClass ); } }); } // bind the handle event callbacks and set the context to the widget instance this._on( this.handle, { "vmousedown": "_handleVMouseDown", "keydown": "_handleKeydown", "keyup": "_handleKeyup" }); this.handle.bind( "vclick", false ); this._handleFormReset(); this.refresh( undefined, undefined, true ); }, _controlChange: function( event ) { // if the user dragged the handle, the "change" event was triggered from inside refresh(); don't call refresh() again if ( this._trigger( "controlchange", event ) === false ) { return false; } if ( !this.mouseMoved ) { this.refresh( this._value(), true ); } }, _controlKeyup: function( event ) { // necessary? this.refresh( this._value(), true, true ); }, _controlBlur: function( event ) { this.refresh( this._value(), true ); }, // it appears the clicking the up and down buttons in chrome on // range/number inputs doesn't trigger a change until the field is // blurred. Here we check thif the value has changed and refresh _controlVMouseUp: function( event ) { this._checkedRefresh(); }, // NOTE force focus on handle _handleVMouseDown: function( event ) { this.handle.focus(); }, _handleKeydown: function( event ) { var index = this._value(); if ( this.options.disabled ) { return; } // In all cases prevent the default and mark the handle as active switch ( event.keyCode ) { case $.mobile.keyCode.HOME: case $.mobile.keyCode.END: case $.mobile.keyCode.PAGE_UP: case $.mobile.keyCode.PAGE_DOWN: case $.mobile.keyCode.UP: case $.mobile.keyCode.RIGHT: case $.mobile.keyCode.DOWN: case $.mobile.keyCode.LEFT: event.preventDefault(); if ( !this._keySliding ) { this._keySliding = true; this.handle.addClass( "ui-state-active" ); } break; } // move the slider according to the keypress switch ( event.keyCode ) { case $.mobile.keyCode.HOME: this.refresh( this.min ); break; case $.mobile.keyCode.END: this.refresh( this.max ); break; case $.mobile.keyCode.PAGE_UP: case $.mobile.keyCode.UP: case $.mobile.keyCode.RIGHT: this.refresh( index + this.step ); break; case $.mobile.keyCode.PAGE_DOWN: case $.mobile.keyCode.DOWN: case $.mobile.keyCode.LEFT: this.refresh( index - this.step ); break; } }, // remove active mark _handleKeyup: function( event ) { if ( this._keySliding ) { this._keySliding = false; this.handle.removeClass( "ui-state-active" ); } }, _sliderVMouseDown: function( event ) { // NOTE: we don't do this in refresh because we still want to // support programmatic alteration of disabled inputs if ( this.options.disabled || !( event.which === 1 || event.which === 0 ) ) { return false; } if ( this._trigger( "beforestart", event ) === false ) { return false; } this.dragging = true; this.userModified = false; this.mouseMoved = false; if ( this.isToggleSwitch ) { this.beforeStart = this.element[0].selectedIndex; } this.refresh( event ); this._trigger( "start" ); return false; }, _sliderVMouseUp: function() { if ( this.dragging ) { this.dragging = false; if ( this.isToggleSwitch ) { // make the handle move with a smooth transition this.handle.addClass( "ui-slider-handle-snapping" ); if ( this.mouseMoved ) { // this is a drag, change the value only if user dragged enough if ( this.userModified ) { this.refresh( this.beforeStart === 0 ? 1 : 0 ); } else { this.refresh( this.beforeStart ); } } else { // this is just a click, change the value this.refresh( this.beforeStart === 0 ? 1 : 0 ); } } this.mouseMoved = false; this._trigger( "stop" ); return false; } }, _preventDocumentDrag: function( event ) { // NOTE: we don't do this in refresh because we still want to // support programmatic alteration of disabled inputs if ( this._trigger( "drag", event ) === false) { return false; } if ( this.dragging && !this.options.disabled ) { // this.mouseMoved must be updated before refresh() because it will be used in the control "change" event this.mouseMoved = true; if ( this.isToggleSwitch ) { // make the handle move in sync with the mouse this.handle.removeClass( "ui-slider-handle-snapping" ); } this.refresh( event ); // only after refresh() you can calculate this.userModified this.userModified = this.beforeStart !== this.element[0].selectedIndex; return false; } }, _checkedRefresh: function() { if ( this.value !== this._value() ) { this.refresh( this._value() ); } }, _value: function() { return this.isToggleSwitch ? this.element[0].selectedIndex : parseFloat( this.element.val() ) ; }, _reset: function() { this.refresh( undefined, false, true ); }, refresh: function( val, isfromControl, preventInputUpdate ) { // NOTE: we don't return here because we want to support programmatic // alteration of the input value, which should still update the slider var self = this, parentTheme = $.mobile.getInheritedTheme( this.element, "c" ), theme = this.options.theme || parentTheme, trackTheme = this.options.trackTheme || parentTheme, left, width, data, tol; self.slider[0].className = [ this.isToggleSwitch ? "ui-slider ui-slider-switch" : "ui-slider-track"," ui-btn-down-" + trackTheme,' ui-btn-corner-all', ( this.options.mini ) ? " ui-mini":""].join( "" ); if ( this.options.disabled || this.element.attr( "disabled" ) ) { this.disable(); } // set the stored value for comparison later this.value = this._value(); if ( this.options.highlight && !this.isToggleSwitch && this.slider.find( ".ui-slider-bg" ).length === 0 ) { this.valuebg = (function() { var bg = document.createElement( "div" ); bg.className = "ui-slider-bg " + $.mobile.activeBtnClass + " ui-btn-corner-all"; return $( bg ).prependTo( self.slider ); })(); } this.handle.buttonMarkup({ corners: true, theme: theme, shadow: true }); var pxStep, percent, control = this.element, isInput = !this.isToggleSwitch, optionElements = isInput ? [] : control.find( "option" ), min = isInput ? parseFloat( control.attr( "min" ) ) : 0, max = isInput ? parseFloat( control.attr( "max" ) ) : optionElements.length - 1, step = ( isInput && parseFloat( control.attr( "step" ) ) > 0 ) ? parseFloat( control.attr( "step" ) ) : 1; if ( typeof val === "object" ) { data = val; // a slight tolerance helped get to the ends of the slider tol = 8; left = this.slider.offset().left; width = this.slider.width(); pxStep = width/((max-min)/step); if ( !this.dragging || data.pageX < left - tol || data.pageX > left + width + tol ) { return; } if ( pxStep > 1 ) { percent = ( ( data.pageX - left ) / width ) * 100; } else { percent = Math.round( ( ( data.pageX - left ) / width ) * 100 ); } } else { if ( val == null ) { val = isInput ? parseFloat( control.val() || 0 ) : control[0].selectedIndex; } percent = ( parseFloat( val ) - min ) / ( max - min ) * 100; } if ( isNaN( percent ) ) { return; } var newval = ( percent / 100 ) * ( max - min ) + min; //from jQuery UI slider, the following source will round to the nearest step var valModStep = ( newval - min ) % step; var alignValue = newval - valModStep; if ( Math.abs( valModStep ) * 2 >= step ) { alignValue += ( valModStep > 0 ) ? step : ( -step ); } var percentPerStep = 100/((max-min)/step); // Since JavaScript has problems with large floats, round // the final value to 5 digits after the decimal point (see jQueryUI: #4124) newval = parseFloat( alignValue.toFixed(5) ); if ( typeof pxStep === "undefined" ) { pxStep = width / ( (max-min) / step ); } if ( pxStep > 1 && isInput ) { percent = ( newval - min ) * percentPerStep * ( 1 / step ); } if ( percent < 0 ) { percent = 0; } if ( percent > 100 ) { percent = 100; } if ( newval < min ) { newval = min; } if ( newval > max ) { newval = max; } this.handle.css( "left", percent + "%" ); this.handle[0].setAttribute( "aria-valuenow", isInput ? newval : optionElements.eq( newval ).attr( "value" ) ); this.handle[0].setAttribute( "aria-valuetext", isInput ? newval : optionElements.eq( newval ).getEncodedText() ); this.handle[0].setAttribute( "title", isInput ? newval : optionElements.eq( newval ).getEncodedText() ); if ( this.valuebg ) { this.valuebg.css( "width", percent + "%" ); } // drag the label widths if ( this._labels ) { var handlePercent = this.handle.width() / this.slider.width() * 100, aPercent = percent && handlePercent + ( 100 - handlePercent ) * percent / 100, bPercent = percent === 100 ? 0 : Math.min( handlePercent + 100 - aPercent, 100 ); this._labels.each(function() { var ab = $( this ).is( ".ui-slider-label-a" ); $( this ).width( ( ab ? aPercent : bPercent ) + "%" ); }); } if ( !preventInputUpdate ) { var valueChanged = false; // update control"s value if ( isInput ) { valueChanged = control.val() !== newval; control.val( newval ); } else { valueChanged = control[ 0 ].selectedIndex !== newval; control[ 0 ].selectedIndex = newval; } if ( this._trigger( "beforechange", val ) === false) { return false; } if ( !isfromControl && valueChanged ) { control.trigger( "change" ); } } }, enable: function() { this.element.attr( "disabled", false ); this.slider.removeClass( "ui-disabled" ).attr( "aria-disabled", false ); return this._setOption( "disabled", false ); }, disable: function() { this.element.attr( "disabled", true ); this.slider.addClass( "ui-disabled" ).attr( "aria-disabled", true ); return this._setOption( "disabled", true ); } }, $.mobile.behaviors.formReset ) ); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.slider.prototype.enhanceWithin( e.target, true ); }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.rangeslider", $.mobile.widget, { options: { theme: null, trackTheme: null, disabled: false, initSelector: ":jqmData(role='rangeslider')", mini: false, highlight: true }, _create: function() { var secondLabel, $el = this.element, elClass = this.options.mini ? "ui-rangeslider ui-mini" : "ui-rangeslider", _inputFirst = $el.find( "input" ).first(), _inputLast = $el.find( "input" ).last(), label = $el.find( "label" ).first(), _sliderFirst = $.data( _inputFirst.get(0), "mobileSlider" ).slider, _sliderLast = $.data( _inputLast.get(0), "mobileSlider" ).slider, firstHandle = $.data( _inputFirst.get(0), "mobileSlider" ).handle, _sliders = $( "<div class=\"ui-rangeslider-sliders\" />" ).appendTo( $el ); if ( $el.find( "label" ).length > 1 ) { secondLabel = $el.find( "label" ).last().hide(); } _inputFirst.addClass( "ui-rangeslider-first" ); _inputLast.addClass( "ui-rangeslider-last" ); $el.addClass( elClass ); _sliderFirst.appendTo( _sliders ); _sliderLast.appendTo( _sliders ); label.prependTo( $el ); firstHandle.prependTo( _sliderLast ); $.extend( this, { _inputFirst: _inputFirst, _inputLast: _inputLast, _sliderFirst: _sliderFirst, _sliderLast: _sliderLast, _targetVal: null, _sliderTarget: false, _sliders: _sliders, _proxy: false }); this.refresh(); this._on( this.element.find( "input.ui-slider-input" ), { "slidebeforestart": "_slidebeforestart", "slidestop": "_slidestop", "slidedrag": "_slidedrag", "slidebeforechange": "_change", "blur": "_change", "keyup": "_change" }); this._on({ "mousedown":"_change" }); this._on( this.element.closest( "form" ), { "reset":"_handleReset" }); this._on( firstHandle, { "vmousedown": "_dragFirstHandle" }); }, _handleReset: function(){ var self = this; //we must wait for the stack to unwind before updateing other wise sliders will not have updated yet setTimeout( function(){ self._updateHighlight(); },0); }, _dragFirstHandle: function( event ) { //if the first handle is dragged send the event to the first slider $.data( this._inputFirst.get(0), "mobileSlider" ).dragging = true; $.data( this._inputFirst.get(0), "mobileSlider" ).refresh( event ); return false; }, _slidedrag: function( event ) { var first = $( event.target ).is( this._inputFirst ), otherSlider = ( first ) ? this._inputLast : this._inputFirst; this._sliderTarget = false; //if the drag was initiated on an extreme and the other handle is focused send the events to //the closest handle if ( ( this._proxy === "first" && first ) || ( this._proxy === "last" && !first ) ) { $.data( otherSlider.get(0), "mobileSlider" ).dragging = true; $.data( otherSlider.get(0), "mobileSlider" ).refresh( event ); return false; } }, _slidestop: function( event ) { var first = $( event.target ).is( this._inputFirst ); this._proxy = false; //this stops dragging of the handle and brings the active track to the front //this makes clicks on the track go the the last handle used this.element.find( "input" ).trigger( "vmouseup" ); this._sliderFirst.css( "z-index", first ? 1 : "" ); }, _slidebeforestart: function( event ) { this._sliderTarget = false; //if the track is the target remember this and the original value if ( $( event.originalEvent.target ).hasClass( "ui-slider-track" ) ) { this._sliderTarget = true; this._targetVal = $( event.target ).val(); } }, _setOption: function( options ) { this._superApply( options ); this.refresh(); }, refresh: function() { var $el = this.element, o = this.options; $el.find( "input" ).slider({ theme: o.theme, trackTheme: o.trackTheme, disabled: o.disabled, mini: o.mini, highlight: o.highlight }).slider( "refresh" ); this._updateHighlight(); }, _change: function( event ) { if ( event.type === "keyup" ) { this._updateHighlight(); return false; } var self = this, min = parseFloat( this._inputFirst.val(), 10 ), max = parseFloat( this._inputLast.val(), 10 ), first = $( event.target ).hasClass( "ui-rangeslider-first" ), thisSlider = first ? this._inputFirst : this._inputLast, otherSlider = first ? this._inputLast : this._inputFirst; if( ( this._inputFirst.val() > this._inputLast.val() && event.type === "mousedown" && !$(event.target).hasClass("ui-slider-handle")) ){ thisSlider.blur(); } else if( event.type === "mousedown" ){ return; } if ( min > max && !this._sliderTarget ) { //this prevents min from being greater then max thisSlider.val( first ? max: min ).slider( "refresh" ); this._trigger( "normalize" ); } else if ( min > max ) { //this makes it so clicks on the target on either extreme go to the closest handle thisSlider.val( this._targetVal ).slider( "refresh" ); //You must wait for the stack to unwind so first slider is updated before updating second setTimeout( function() { otherSlider.val( first ? min: max ).slider( "refresh" ); $.data( otherSlider.get(0), "mobileSlider" ).handle.focus(); self._sliderFirst.css( "z-index", first ? "" : 1 ); self._trigger( "normalize" ); }, 0 ); this._proxy = ( first ) ? "first" : "last"; } //fixes issue where when both _sliders are at min they cannot be adjusted if ( min === max ) { $.data( thisSlider.get(0), "mobileSlider" ).handle.css( "z-index", 1 ); $.data( otherSlider.get(0), "mobileSlider" ).handle.css( "z-index", 0 ); } else { $.data( otherSlider.get(0), "mobileSlider" ).handle.css( "z-index", "" ); $.data( thisSlider.get(0), "mobileSlider" ).handle.css( "z-index", "" ); } this._updateHighlight(); if ( min >= max ) { return false; } }, _updateHighlight: function() { var min = parseInt( $.data( this._inputFirst.get(0), "mobileSlider" ).handle.get(0).style.left, 10 ), max = parseInt( $.data( this._inputLast.get(0), "mobileSlider" ).handle.get(0).style.left, 10 ), width = (max - min); this.element.find( ".ui-slider-bg" ).css({ "margin-left": min + "%", "width": width + "%" }); }, _destroy: function() { this.element.removeClass( "ui-rangeslider ui-mini" ).find( "label" ).show(); this._inputFirst.after( this._sliderFirst ); this._inputLast.after( this._sliderLast ); this._sliders.remove(); this.element.find( "input" ).removeClass( "ui-rangeslider-first ui-rangeslider-last" ).slider( "destroy" ); } }); $.widget( "mobile.rangeslider", $.mobile.rangeslider, $.mobile.behaviors.formReset ); //auto self-init widgets $( document ).bind( "pagecreate create", function( e ) { $.mobile.rangeslider.prototype.enhanceWithin( e.target, true ); }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.selectmenu", $.mobile.widget, $.extend( { options: { theme: null, disabled: false, icon: "arrow-d", iconpos: "right", inline: false, corners: true, shadow: true, iconshadow: true, overlayTheme: "a", dividerTheme: "b", hidePlaceholderMenuItems: true, closeText: "Close", nativeMenu: true, // This option defaults to true on iOS devices. preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1, initSelector: "select:not( :jqmData(role='slider') )", mini: false }, _button: function() { return $( "<div/>" ); }, _setDisabled: function( value ) { this.element.attr( "disabled", value ); this.button.attr( "aria-disabled", value ); return this._setOption( "disabled", value ); }, _focusButton : function() { var self = this; setTimeout( function() { self.button.focus(); }, 40); }, _selectOptions: function() { return this.select.find( "option" ); }, // setup items that are generally necessary for select menu extension _preExtension: function() { var classes = ""; // TODO: Post 1.1--once we have time to test thoroughly--any classes manually applied to the original element should be carried over to the enhanced element, with an `-enhanced` suffix. See https://github.com/jquery/jquery-mobile/issues/3577 /* if ( $el[0].className.length ) { classes = $el[0].className; } */ if ( !!~this.element[0].className.indexOf( "ui-btn-left" ) ) { classes = " ui-btn-left"; } if ( !!~this.element[0].className.indexOf( "ui-btn-right" ) ) { classes = " ui-btn-right"; } this.select = this.element.removeClass( "ui-btn-left ui-btn-right" ).wrap( "<div class='ui-select" + classes + "'>" ); this.selectID = this.select.attr( "id" ); this.label = $( "label[for='"+ this.selectID +"']" ).addClass( "ui-select" ); this.isMultiple = this.select[ 0 ].multiple; if ( !this.options.theme ) { this.options.theme = $.mobile.getInheritedTheme( this.select, "c" ); } }, _destroy: function() { var wrapper = this.element.parents( ".ui-select" ); if ( wrapper.length > 0 ) { if ( wrapper.is( ".ui-btn-left, .ui-btn-right" ) ) { this.element.addClass( wrapper.is( ".ui-btn-left" ) ? "ui-btn-left" : "ui-btn-right" ); } this.element.insertAfter( wrapper ); wrapper.remove(); } }, _create: function() { this._preExtension(); // Allows for extension of the native select for custom selects and other plugins // see select.custom for example extension // TODO explore plugin registration this._trigger( "beforeCreate" ); this.button = this._button(); var self = this, options = this.options, inline = options.inline || this.select.jqmData( "inline" ), mini = options.mini || this.select.jqmData( "mini" ), iconpos = options.icon ? ( options.iconpos || this.select.jqmData( "iconpos" ) ) : false, // IE throws an exception at options.item() function when // there is no selected item // select first in this case selectedIndex = this.select[ 0 ].selectedIndex === -1 ? 0 : this.select[ 0 ].selectedIndex, // TODO values buttonId and menuId are undefined here button = this.button .insertBefore( this.select ) .buttonMarkup( { theme: options.theme, icon: options.icon, iconpos: iconpos, inline: inline, corners: options.corners, shadow: options.shadow, iconshadow: options.iconshadow, mini: mini }); this.setButtonText(); // Opera does not properly support opacity on select elements // In Mini, it hides the element, but not its text // On the desktop,it seems to do the opposite // for these reasons, using the nativeMenu option results in a full native select in Opera if ( options.nativeMenu && window.opera && window.opera.version ) { button.addClass( "ui-select-nativeonly" ); } // Add counter for multi selects if ( this.isMultiple ) { this.buttonCount = $( "<span>" ) .addClass( "ui-li-count ui-btn-up-c ui-btn-corner-all" ) .hide() .appendTo( button.addClass('ui-li-has-count') ); } // Disable if specified if ( options.disabled || this.element.attr('disabled')) { this.disable(); } // Events on native select this.select.change(function() { self.refresh(); if ( !!options.nativeMenu ) { this.blur(); } }); this._handleFormReset(); this.build(); }, build: function() { var self = this; this.select .appendTo( self.button ) .bind( "vmousedown", function() { // Add active class to button self.button.addClass( $.mobile.activeBtnClass ); }) .bind( "focus", function() { self.button.addClass( $.mobile.focusClass ); }) .bind( "blur", function() { self.button.removeClass( $.mobile.focusClass ); }) .bind( "focus vmouseover", function() { self.button.trigger( "vmouseover" ); }) .bind( "vmousemove", function() { // Remove active class on scroll/touchmove self.button.removeClass( $.mobile.activeBtnClass ); }) .bind( "change blur vmouseout", function() { self.button.trigger( "vmouseout" ) .removeClass( $.mobile.activeBtnClass ); }) .bind( "change blur", function() { self.button.removeClass( "ui-btn-down-" + self.options.theme ); }); // In many situations, iOS will zoom into the select upon tap, this prevents that from happening self.button.bind( "vmousedown", function() { if ( self.options.preventFocusZoom ) { $.mobile.zoom.disable( true ); } }); self.label.bind( "click focus", function() { if ( self.options.preventFocusZoom ) { $.mobile.zoom.disable( true ); } }); self.select.bind( "focus", function() { if ( self.options.preventFocusZoom ) { $.mobile.zoom.disable( true ); } }); self.button.bind( "mouseup", function() { if ( self.options.preventFocusZoom ) { setTimeout(function() { $.mobile.zoom.enable( true ); }, 0 ); } }); self.select.bind( "blur", function() { if ( self.options.preventFocusZoom ) { $.mobile.zoom.enable( true ); } }); }, selected: function() { return this._selectOptions().filter( ":selected" ); }, selectedIndices: function() { var self = this; return this.selected().map(function() { return self._selectOptions().index( this ); }).get(); }, setButtonText: function() { var self = this, selected = this.selected(), text = this.placeholder, span = $( document.createElement( "span" ) ); this.button.find( ".ui-btn-text" ).html(function() { if ( selected.length ) { text = selected.map(function() { return $( this ).text(); }).get().join( ", " ); } else { text = self.placeholder; } // TODO possibly aggregate multiple select option classes return span.text( text ) .addClass( self.select.attr( "class" ) ) .addClass( selected.attr( "class" ) ); }); }, setButtonCount: function() { var selected = this.selected(); // multiple count inside button if ( this.isMultiple ) { this.buttonCount[ selected.length > 1 ? "show" : "hide" ]().text( selected.length ); } }, _reset: function() { this.refresh(); }, refresh: function() { this.setButtonText(); this.setButtonCount(); }, // open and close preserved in native selects // to simplify users code when looping over selects open: $.noop, close: $.noop, disable: function() { this._setDisabled( true ); this.button.addClass( "ui-disabled" ); }, enable: function() { this._setDisabled( false ); this.button.removeClass( "ui-disabled" ); } }, $.mobile.behaviors.formReset ) ); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.selectmenu.prototype.enhanceWithin( e.target, true ); }); })( jQuery ); (function( $, undefined ) { function fitSegmentInsideSegment( winSize, segSize, offset, desired ) { var ret = desired; if ( winSize < segSize ) { // Center segment if it's bigger than the window ret = offset + ( winSize - segSize ) / 2; } else { // Otherwise center it at the desired coordinate while keeping it completely inside the window ret = Math.min( Math.max( offset, desired - segSize / 2 ), offset + winSize - segSize ); } return ret; } function windowCoords() { var $win = $.mobile.window; return { x: $win.scrollLeft(), y: $win.scrollTop(), cx: ( window.innerWidth || $win.width() ), cy: ( window.innerHeight || $win.height() ) }; } $.widget( "mobile.popup", $.mobile.widget, { options: { theme: null, overlayTheme: null, shadow: true, corners: true, transition: "none", positionTo: "origin", tolerance: null, initSelector: ":jqmData(role='popup')", closeLinkSelector: "a:jqmData(rel='back')", closeLinkEvents: "click.popup", navigateEvents: "navigate.popup", closeEvents: "navigate.popup pagebeforechange.popup", dismissible: true, // NOTE Windows Phone 7 has a scroll position caching issue that // requires us to disable popup history management by default // https://github.com/jquery/jquery-mobile/issues/4784 // // NOTE this option is modified in _create! history: !$.mobile.browser.oldIE }, _eatEventAndClose: function( e ) { e.preventDefault(); e.stopImmediatePropagation(); if ( this.options.dismissible ) { this.close(); } return false; }, // Make sure the screen size is increased beyond the page height if the popup's causes the document to increase in height _resizeScreen: function() { var popupHeight = this._ui.container.outerHeight( true ); this._ui.screen.removeAttr( "style" ); if ( popupHeight > this._ui.screen.height() ) { this._ui.screen.height( popupHeight ); } }, _handleWindowKeyUp: function( e ) { if ( this._isOpen && e.keyCode === $.mobile.keyCode.ESCAPE ) { return this._eatEventAndClose( e ); } }, _expectResizeEvent: function() { var winCoords = windowCoords(); if ( this._resizeData ) { if ( winCoords.x === this._resizeData.winCoords.x && winCoords.y === this._resizeData.winCoords.y && winCoords.cx === this._resizeData.winCoords.cx && winCoords.cy === this._resizeData.winCoords.cy ) { // timeout not refreshed return false; } else { // clear existing timeout - it will be refreshed below clearTimeout( this._resizeData.timeoutId ); } } this._resizeData = { timeoutId: setTimeout( $.proxy( this, "_resizeTimeout" ), 200 ), winCoords: winCoords }; return true; }, _resizeTimeout: function() { if ( this._isOpen ) { if ( !this._expectResizeEvent() ) { if ( this._ui.container.hasClass( "ui-popup-hidden" ) ) { // effectively rapid-open the popup while leaving the screen intact this._ui.container.removeClass( "ui-popup-hidden" ); this.reposition( { positionTo: "window" } ); this._ignoreResizeEvents(); } this._resizeScreen(); this._resizeData = null; this._orientationchangeInProgress = false; } } else { this._resizeData = null; this._orientationchangeInProgress = false; } }, _ignoreResizeEvents: function() { var self = this; if ( this._ignoreResizeTo ) { clearTimeout( this._ignoreResizeTo ); } this._ignoreResizeTo = setTimeout( function() { self._ignoreResizeTo = 0; }, 1000 ); }, _handleWindowResize: function( e ) { if ( this._isOpen && this._ignoreResizeTo === 0 ) { if ( ( this._expectResizeEvent() || this._orientationchangeInProgress ) && !this._ui.container.hasClass( "ui-popup-hidden" ) ) { // effectively rapid-close the popup while leaving the screen intact this._ui.container .addClass( "ui-popup-hidden" ) .removeAttr( "style" ); } } }, _handleWindowOrientationchange: function( e ) { if ( !this._orientationchangeInProgress && this._isOpen && this._ignoreResizeTo === 0 ) { this._expectResizeEvent(); this._orientationchangeInProgress = true; } }, // When the popup is open, attempting to focus on an element that is not a // child of the popup will redirect focus to the popup _handleDocumentFocusIn: function( e ) { var tgt = e.target, $tgt, ui = this._ui; if ( !this._isOpen ) { return; } if ( tgt !== ui.container[ 0 ] ) { $tgt = $( e.target ); if ( 0 === $tgt.parents().filter( ui.container[ 0 ] ).length ) { $( document.activeElement ).one( "focus", function( e ) { $tgt.blur(); }); ui.focusElement.focus(); e.preventDefault(); e.stopImmediatePropagation(); return false; } else if ( ui.focusElement[ 0 ] === ui.container[ 0 ] ) { ui.focusElement = $tgt; } } this._ignoreResizeEvents(); }, _create: function() { var ui = { screen: $( "<div class='ui-screen-hidden ui-popup-screen'></div>" ), placeholder: $( "<div style='display: none;'><!-- placeholder --></div>" ), container: $( "<div class='ui-popup-container ui-popup-hidden'></div>" ) }, thisPage = this.element.closest( ".ui-page" ), myId = this.element.attr( "id" ), self = this; // We need to adjust the history option to be false if there's no AJAX nav. // We can't do it in the option declarations because those are run before // it is determined whether there shall be AJAX nav. this.options.history = this.options.history && $.mobile.ajaxEnabled && $.mobile.hashListeningEnabled; if ( thisPage.length === 0 ) { thisPage = $( "body" ); } // define the container for navigation event bindings // TODO this would be nice at the the mobile widget level this.options.container = this.options.container || $.mobile.pageContainer; // Apply the proto thisPage.append( ui.screen ); ui.container.insertAfter( ui.screen ); // Leave a placeholder where the element used to be ui.placeholder.insertAfter( this.element ); if ( myId ) { ui.screen.attr( "id", myId + "-screen" ); ui.container.attr( "id", myId + "-popup" ); ui.placeholder.html( "<!-- placeholder for " + myId + " -->" ); } ui.container.append( this.element ); ui.focusElement = ui.container; // Add class to popup element this.element.addClass( "ui-popup" ); // Define instance variables $.extend( this, { _scrollTop: 0, _page: thisPage, _ui: ui, _fallbackTransition: "", _currentTransition: false, _prereqs: null, _isOpen: false, _tolerance: null, _resizeData: null, _ignoreResizeTo: 0, _orientationchangeInProgress: false }); $.each( this.options, function( key, value ) { // Cause initial options to be applied by their handler by temporarily setting the option to undefined // - the handler then sets it to the initial value self.options[ key ] = undefined; self._setOption( key, value, true ); }); ui.screen.bind( "vclick", $.proxy( this, "_eatEventAndClose" ) ); this._on( $.mobile.window, { orientationchange: $.proxy( this, "_handleWindowOrientationchange" ), resize: $.proxy( this, "_handleWindowResize" ), keyup: $.proxy( this, "_handleWindowKeyUp" ) }); this._on( $.mobile.document, { focusin: $.proxy( this, "_handleDocumentFocusIn" ) }); }, _applyTheme: function( dst, theme, prefix ) { var classes = ( dst.attr( "class" ) || "").split( " " ), alreadyAdded = true, currentTheme = null, matches, themeStr = String( theme ); while ( classes.length > 0 ) { currentTheme = classes.pop(); matches = ( new RegExp( "^ui-" + prefix + "-([a-z])$" ) ).exec( currentTheme ); if ( matches && matches.length > 1 ) { currentTheme = matches[ 1 ]; break; } else { currentTheme = null; } } if ( theme !== currentTheme ) { dst.removeClass( "ui-" + prefix + "-" + currentTheme ); if ( ! ( theme === null || theme === "none" ) ) { dst.addClass( "ui-" + prefix + "-" + themeStr ); } } }, _setTheme: function( value ) { this._applyTheme( this.element, value, "body" ); }, _setOverlayTheme: function( value ) { this._applyTheme( this._ui.screen, value, "overlay" ); if ( this._isOpen ) { this._ui.screen.addClass( "in" ); } }, _setShadow: function( value ) { this.element.toggleClass( "ui-overlay-shadow", value ); }, _setCorners: function( value ) { this.element.toggleClass( "ui-corner-all", value ); }, _applyTransition: function( value ) { this._ui.container.removeClass( this._fallbackTransition ); if ( value && value !== "none" ) { this._fallbackTransition = $.mobile._maybeDegradeTransition( value ); if ( this._fallbackTransition === "none" ) { this._fallbackTransition = ""; } this._ui.container.addClass( this._fallbackTransition ); } }, _setTransition: function( value ) { if ( !this._currentTransition ) { this._applyTransition( value ); } }, _setTolerance: function( value ) { var tol = { t: 30, r: 15, b: 30, l: 15 }; if ( value !== undefined ) { var ar = String( value ).split( "," ); $.each( ar, function( idx, val ) { ar[ idx ] = parseInt( val, 10 ); } ); switch( ar.length ) { // All values are to be the same case 1: if ( !isNaN( ar[ 0 ] ) ) { tol.t = tol.r = tol.b = tol.l = ar[ 0 ]; } break; // The first value denotes top/bottom tolerance, and the second value denotes left/right tolerance case 2: if ( !isNaN( ar[ 0 ] ) ) { tol.t = tol.b = ar[ 0 ]; } if ( !isNaN( ar[ 1 ] ) ) { tol.l = tol.r = ar[ 1 ]; } break; // The array contains values in the order top, right, bottom, left case 4: if ( !isNaN( ar[ 0 ] ) ) { tol.t = ar[ 0 ]; } if ( !isNaN( ar[ 1 ] ) ) { tol.r = ar[ 1 ]; } if ( !isNaN( ar[ 2 ] ) ) { tol.b = ar[ 2 ]; } if ( !isNaN( ar[ 3 ] ) ) { tol.l = ar[ 3 ]; } break; default: break; } } this._tolerance = tol; }, _setOption: function( key, value ) { var exclusions, setter = "_set" + key.charAt( 0 ).toUpperCase() + key.slice( 1 ); if ( this[ setter ] !== undefined ) { this[ setter ]( value ); } // TODO REMOVE FOR 1.2.1 by moving them out to a default options object exclusions = [ "initSelector", "closeLinkSelector", "closeLinkEvents", "navigateEvents", "closeEvents", "history", "container" ]; $.mobile.widget.prototype._setOption.apply( this, arguments ); if ( $.inArray( key, exclusions ) === -1 ) { // Record the option change in the options and in the DOM data-* attributes this.element.attr( "data-" + ( $.mobile.ns || "" ) + ( key.replace( /([A-Z])/, "-$1" ).toLowerCase() ), value ); } }, // Try and center the overlay over the given coordinates _placementCoords: function( desired ) { // rectangle within which the popup must fit var winCoords = windowCoords(), rc = { x: this._tolerance.l, y: winCoords.y + this._tolerance.t, cx: winCoords.cx - this._tolerance.l - this._tolerance.r, cy: winCoords.cy - this._tolerance.t - this._tolerance.b }, menuSize, ret; // Clamp the width of the menu before grabbing its size this._ui.container.css( "max-width", rc.cx ); menuSize = { cx: this._ui.container.outerWidth( true ), cy: this._ui.container.outerHeight( true ) }; // Center the menu over the desired coordinates, while not going outside // the window tolerances. This will center wrt. the window if the popup is too large. ret = { x: fitSegmentInsideSegment( rc.cx, menuSize.cx, rc.x, desired.x ), y: fitSegmentInsideSegment( rc.cy, menuSize.cy, rc.y, desired.y ) }; // Make sure the top of the menu is visible ret.y = Math.max( 0, ret.y ); // If the height of the menu is smaller than the height of the document // align the bottom with the bottom of the document // fix for $.mobile.document.height() bug in core 1.7.2. var docEl = document.documentElement, docBody = document.body, docHeight = Math.max( docEl.clientHeight, docBody.scrollHeight, docBody.offsetHeight, docEl.scrollHeight, docEl.offsetHeight ); ret.y -= Math.min( ret.y, Math.max( 0, ret.y + menuSize.cy - docHeight ) ); return { left: ret.x, top: ret.y }; }, _createPrereqs: function( screenPrereq, containerPrereq, whenDone ) { var self = this, prereqs; // It is important to maintain both the local variable prereqs and self._prereqs. The local variable remains in // the closure of the functions which call the callbacks passed in. The comparison between the local variable and // self._prereqs is necessary, because once a function has been passed to .animationComplete() it will be called // next time an animation completes, even if that's not the animation whose end the function was supposed to catch // (for example, if an abort happens during the opening animation, the .animationComplete handler is not called for // that animation anymore, but the handler remains attached, so it is called the next time the popup is opened // - making it stale. Comparing the local variable prereqs to the widget-level variable self._prereqs ensures that // callbacks triggered by a stale .animationComplete will be ignored. prereqs = { screen: $.Deferred(), container: $.Deferred() }; prereqs.screen.then( function() { if ( prereqs === self._prereqs ) { screenPrereq(); } }); prereqs.container.then( function() { if ( prereqs === self._prereqs ) { containerPrereq(); } }); $.when( prereqs.screen, prereqs.container ).done( function() { if ( prereqs === self._prereqs ) { self._prereqs = null; whenDone(); } }); self._prereqs = prereqs; }, _animate: function( args ) { // NOTE before removing the default animation of the screen // this had an animate callback that would resolve the deferred // now the deferred is resolved immediately // TODO remove the dependency on the screen deferred this._ui.screen .removeClass( args.classToRemove ) .addClass( args.screenClassToAdd ); args.prereqs.screen.resolve(); if ( args.transition && args.transition !== "none" ) { if ( args.applyTransition ) { this._applyTransition( args.transition ); } if ( this._fallbackTransition ) { this._ui.container .animationComplete( $.proxy( args.prereqs.container, "resolve" ) ) .addClass( args.containerClassToAdd ) .removeClass( args.classToRemove ); return; } } this._ui.container.removeClass( args.classToRemove ); args.prereqs.container.resolve(); }, // The desired coordinates passed in will be returned untouched if no reference element can be identified via // desiredPosition.positionTo. Nevertheless, this function ensures that its return value always contains valid // x and y coordinates by specifying the center middle of the window if the coordinates are absent. // options: { x: coordinate, y: coordinate, positionTo: string: "origin", "window", or jQuery selector _desiredCoords: function( o ) { var dst = null, offset, winCoords = windowCoords(), x = o.x, y = o.y, pTo = o.positionTo; // Establish which element will serve as the reference if ( pTo && pTo !== "origin" ) { if ( pTo === "window" ) { x = winCoords.cx / 2 + winCoords.x; y = winCoords.cy / 2 + winCoords.y; } else { try { dst = $( pTo ); } catch( e ) { dst = null; } if ( dst ) { dst.filter( ":visible" ); if ( dst.length === 0 ) { dst = null; } } } } // If an element was found, center over it if ( dst ) { offset = dst.offset(); x = offset.left + dst.outerWidth() / 2; y = offset.top + dst.outerHeight() / 2; } // Make sure x and y are valid numbers - center over the window if ( $.type( x ) !== "number" || isNaN( x ) ) { x = winCoords.cx / 2 + winCoords.x; } if ( $.type( y ) !== "number" || isNaN( y ) ) { y = winCoords.cy / 2 + winCoords.y; } return { x: x, y: y }; }, _reposition: function( o ) { // We only care about position-related parameters for repositioning o = { x: o.x, y: o.y, positionTo: o.positionTo }; this._trigger( "beforeposition", o ); this._ui.container.offset( this._placementCoords( this._desiredCoords( o ) ) ); }, reposition: function( o ) { if ( this._isOpen ) { this._reposition( o ); } }, _openPrereqsComplete: function() { this._ui.container.addClass( "ui-popup-active" ); this._isOpen = true; this._resizeScreen(); this._ui.container.attr( "tabindex", "0" ).focus(); this._ignoreResizeEvents(); this._trigger( "afteropen" ); }, _open: function( options ) { var o = $.extend( {}, this.options, options ), // TODO move blacklist to private method androidBlacklist = ( function() { var w = window, ua = navigator.userAgent, // Rendering engine is Webkit, and capture major version wkmatch = ua.match( /AppleWebKit\/([0-9\.]+)/ ), wkversion = !!wkmatch && wkmatch[ 1 ], androidmatch = ua.match( /Android (\d+(?:\.\d+))/ ), andversion = !!androidmatch && androidmatch[ 1 ], chromematch = ua.indexOf( "Chrome" ) > -1; // Platform is Android, WebKit version is greater than 534.13 ( Android 3.2.1 ) and not Chrome. if( androidmatch !== null && andversion === "4.0" && wkversion && wkversion > 534.13 && !chromematch ) { return true; } return false; }()); // Count down to triggering "popupafteropen" - we have two prerequisites: // 1. The popup window animation completes (container()) // 2. The screen opacity animation completes (screen()) this._createPrereqs( $.noop, $.noop, $.proxy( this, "_openPrereqsComplete" ) ); this._currentTransition = o.transition; this._applyTransition( o.transition ); if ( !this.options.theme ) { this._setTheme( this._page.jqmData( "theme" ) || $.mobile.getInheritedTheme( this._page, "c" ) ); } this._ui.screen.removeClass( "ui-screen-hidden" ); this._ui.container.removeClass( "ui-popup-hidden" ); // Give applications a chance to modify the contents of the container before it appears this._reposition( o ); if ( this.options.overlayTheme && androidBlacklist ) { /* TODO: The native browser on Android 4.0.X ("Ice Cream Sandwich") suffers from an issue where the popup overlay appears to be z-indexed above the popup itself when certain other styles exist on the same page -- namely, any element set to `position: fixed` and certain types of input. These issues are reminiscent of previously uncovered bugs in older versions of Android's native browser: https://github.com/scottjehl/Device-Bugs/issues/3 This fix closes the following bugs ( I use "closes" with reluctance, and stress that this issue should be revisited as soon as possible ): https://github.com/jquery/jquery-mobile/issues/4816 https://github.com/jquery/jquery-mobile/issues/4844 https://github.com/jquery/jquery-mobile/issues/4874 */ // TODO sort out why this._page isn't working this.element.closest( ".ui-page" ).addClass( "ui-popup-open" ); } this._animate({ additionalCondition: true, transition: o.transition, classToRemove: "", screenClassToAdd: "in", containerClassToAdd: "in", applyTransition: false, prereqs: this._prereqs }); }, _closePrereqScreen: function() { this._ui.screen .removeClass( "out" ) .addClass( "ui-screen-hidden" ); }, _closePrereqContainer: function() { this._ui.container .removeClass( "reverse out" ) .addClass( "ui-popup-hidden" ) .removeAttr( "style" ); }, _closePrereqsDone: function() { var opts = this.options; this._ui.container.removeAttr( "tabindex" ); // remove the global mutex for popups $.mobile.popup.active = undefined; // alert users that the popup is closed this._trigger( "afterclose" ); }, _close: function( immediate ) { this._ui.container.removeClass( "ui-popup-active" ); this._page.removeClass( "ui-popup-open" ); this._isOpen = false; // Count down to triggering "popupafterclose" - we have two prerequisites: // 1. The popup window reverse animation completes (container()) // 2. The screen opacity animation completes (screen()) this._createPrereqs( $.proxy( this, "_closePrereqScreen" ), $.proxy( this, "_closePrereqContainer" ), $.proxy( this, "_closePrereqsDone" ) ); this._animate( { additionalCondition: this._ui.screen.hasClass( "in" ), transition: ( immediate ? "none" : ( this._currentTransition ) ), classToRemove: "in", screenClassToAdd: "out", containerClassToAdd: "reverse out", applyTransition: true, prereqs: this._prereqs }); }, _unenhance: function() { // Put the element back to where the placeholder was and remove the "ui-popup" class this._setTheme( "none" ); this.element // Cannot directly insertAfter() - we need to detach() first, because // insertAfter() will do nothing if the payload div was not attached // to the DOM at the time the widget was created, and so the payload // will remain inside the container even after we call insertAfter(). // If that happens and we remove the container a few lines below, we // will cause an infinite recursion - #5244 .detach() .insertAfter( this._ui.placeholder ) .removeClass( "ui-popup ui-overlay-shadow ui-corner-all" ); this._ui.screen.remove(); this._ui.container.remove(); this._ui.placeholder.remove(); }, _destroy: function() { if ( $.mobile.popup.active === this ) { this.element.one( "popupafterclose", $.proxy( this, "_unenhance" ) ); this.close(); } else { this._unenhance(); } }, _closePopup: function( e, data ) { var parsedDst, toUrl, o = this.options, immediate = false; // restore location on screen window.scrollTo( 0, this._scrollTop ); if ( e && e.type === "pagebeforechange" && data ) { // Determine whether we need to rapid-close the popup, or whether we can // take the time to run the closing transition if ( typeof data.toPage === "string" ) { parsedDst = data.toPage; } else { parsedDst = data.toPage.jqmData( "url" ); } parsedDst = $.mobile.path.parseUrl( parsedDst ); toUrl = parsedDst.pathname + parsedDst.search + parsedDst.hash; if ( this._myUrl !== $.mobile.path.makeUrlAbsolute( toUrl ) ) { // Going to a different page - close immediately immediate = true; } else { e.preventDefault(); } } // remove nav bindings o.container.unbind( o.closeEvents ); // unbind click handlers added when history is disabled this.element.undelegate( o.closeLinkSelector, o.closeLinkEvents ); this._close( immediate ); }, // any navigation event after a popup is opened should close the popup // NOTE the pagebeforechange is bound to catch navigation events that don't // alter the url (eg, dialogs from popups) _bindContainerClose: function() { this.options.container .one( this.options.closeEvents, $.proxy( this, "_closePopup" ) ); }, // TODO no clear deliniation of what should be here and // what should be in _open. Seems to be "visual" vs "history" for now open: function( options ) { var self = this, opts = this.options, url, hashkey, activePage, currentIsDialog, hasHash, urlHistory; // make sure open is idempotent if( $.mobile.popup.active ) { return; } // set the global popup mutex $.mobile.popup.active = this; this._scrollTop = $.mobile.window.scrollTop(); // if history alteration is disabled close on navigate events // and leave the url as is if( !( opts.history ) ) { self._open( options ); self._bindContainerClose(); // When histoy is disabled we have to grab the data-rel // back link clicks so we can close the popup instead of // relying on history to do it for us self.element .delegate( opts.closeLinkSelector, opts.closeLinkEvents, function( e ) { self.close(); e.preventDefault(); }); return; } // cache some values for min/readability urlHistory = $.mobile.urlHistory; hashkey = $.mobile.dialogHashKey; activePage = $.mobile.activePage; currentIsDialog = activePage.is( ".ui-dialog" ); this._myUrl = url = urlHistory.getActive().url; hasHash = ( url.indexOf( hashkey ) > -1 ) && !currentIsDialog && ( urlHistory.activeIndex > 0 ); if ( hasHash ) { self._open( options ); self._bindContainerClose(); return; } // if the current url has no dialog hash key proceed as normal // otherwise, if the page is a dialog simply tack on the hash key if ( url.indexOf( hashkey ) === -1 && !currentIsDialog ){ url = url + (url.indexOf( "#" ) > -1 ? hashkey : "#" + hashkey); } else { url = $.mobile.path.parseLocation().hash + hashkey; } // Tack on an extra hashkey if this is the first page and we've just reconstructed the initial hash if ( urlHistory.activeIndex === 0 && url === urlHistory.initialDst ) { url += hashkey; } // swallow the the initial navigation event, and bind for the next $(window).one( "beforenavigate", function( e ) { e.preventDefault(); self._open( options ); self._bindContainerClose(); }); this.urlAltered = true; $.mobile.navigate( url, {role: "dialog"} ); }, close: function() { // make sure close is idempotent if( $.mobile.popup.active !== this ) { return; } this._scrollTop = $.mobile.window.scrollTop(); if( this.options.history && this.urlAltered ) { $.mobile.back(); this.urlAltered = false; } else { // simulate the nav bindings having fired this._closePopup(); } } }); // TODO this can be moved inside the widget $.mobile.popup.handleLink = function( $link ) { var closestPage = $link.closest( ":jqmData(role='page')" ), scope = ( ( closestPage.length === 0 ) ? $( "body" ) : closestPage ), // NOTE make sure to get only the hash, ie7 (wp7) return the absolute href // in this case ruining the element selection popup = $( $.mobile.path.parseUrl($link.attr( "href" )).hash, scope[0] ), offset; if ( popup.data( "mobile-popup" ) ) { offset = $link.offset(); popup.popup( "open", { x: offset.left + $link.outerWidth() / 2, y: offset.top + $link.outerHeight() / 2, transition: $link.jqmData( "transition" ), positionTo: $link.jqmData( "position-to" ) }); } //remove after delay setTimeout( function() { // Check if we are in a listview var $parent = $link.parent().parent(); if ($parent.hasClass("ui-li")) { $link = $parent.parent(); } $link.removeClass( $.mobile.activeBtnClass ); }, 300 ); }; // TODO move inside _create $.mobile.document.bind( "pagebeforechange", function( e, data ) { if ( data.options.role === "popup" ) { $.mobile.popup.handleLink( data.options.link ); e.preventDefault(); } }); $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.popup.prototype.enhanceWithin( e.target, true ); }); })( jQuery ); /* * custom "selectmenu" plugin */ (function( $, undefined ) { var extendSelect = function( widget ) { var select = widget.select, origDestroy = widget._destroy, selectID = widget.selectID, prefix = ( selectID ? selectID : ( ( $.mobile.ns || "" ) + "uuid-" + widget.uuid ) ), popupID = prefix + "-listbox", dialogID = prefix + "-dialog", label = widget.label, thisPage = widget.select.closest( ".ui-page" ), selectOptions = widget._selectOptions(), isMultiple = widget.isMultiple = widget.select[ 0 ].multiple, buttonId = selectID + "-button", menuId = selectID + "-menu", menuPage = $( "<div data-" + $.mobile.ns + "role='dialog' id='" + dialogID + "' data-" +$.mobile.ns + "theme='"+ widget.options.theme +"' data-" +$.mobile.ns + "overlay-theme='"+ widget.options.overlayTheme +"'>" + "<div data-" + $.mobile.ns + "role='header'>" + "<div class='ui-title'>" + label.getEncodedText() + "</div>"+ "</div>"+ "<div data-" + $.mobile.ns + "role='content'></div>"+ "</div>" ), listbox = $( "<div id='" + popupID + "' class='ui-selectmenu'>" ).insertAfter( widget.select ).popup( { theme: widget.options.overlayTheme } ), list = $( "<ul>", { "class": "ui-selectmenu-list", "id": menuId, "role": "listbox", "aria-labelledby": buttonId }).attr( "data-" + $.mobile.ns + "theme", widget.options.theme ) .attr( "data-" + $.mobile.ns + "divider-theme", widget.options.dividerTheme ) .appendTo( listbox ), header = $( "<div>", { "class": "ui-header ui-bar-" + widget.options.theme }).prependTo( listbox ), headerTitle = $( "<h1>", { "class": "ui-title" }).appendTo( header ), menuPageContent, menuPageClose, headerClose; if ( widget.isMultiple ) { headerClose = $( "<a>", { "text": widget.options.closeText, "href": "#", "class": "ui-btn-left" }).attr( "data-" + $.mobile.ns + "iconpos", "notext" ).attr( "data-" + $.mobile.ns + "icon", "delete" ).appendTo( header ).buttonMarkup(); } $.extend( widget, { select: widget.select, selectID: selectID, buttonId: buttonId, menuId: menuId, popupID: popupID, dialogID: dialogID, thisPage: thisPage, menuPage: menuPage, label: label, selectOptions: selectOptions, isMultiple: isMultiple, theme: widget.options.theme, listbox: listbox, list: list, header: header, headerTitle: headerTitle, headerClose: headerClose, menuPageContent: menuPageContent, menuPageClose: menuPageClose, placeholder: "", build: function() { var self = this; // Create list from select, update state self.refresh(); if ( self._origTabIndex === undefined ) { // Map undefined to false, because self._origTabIndex === undefined // indicates that we have not yet checked whether the select has // originally had a tabindex attribute, whereas false indicates that // we have checked the select for such an attribute, and have found // none present. self._origTabIndex = ( self.select[ 0 ].getAttribute( "tabindex" ) === null ) ? false : self.select.attr( "tabindex" ); } self.select.attr( "tabindex", "-1" ).focus(function() { $( this ).blur(); self.button.focus(); }); // Button events self.button.bind( "vclick keydown" , function( event ) { if ( self.options.disabled || self.isOpen ) { return; } if (event.type === "vclick" || event.keyCode && (event.keyCode === $.mobile.keyCode.ENTER || event.keyCode === $.mobile.keyCode.SPACE)) { self._decideFormat(); if ( self.menuType === "overlay" ) { self.button.attr( "href", "#" + self.popupID ).attr( "data-" + ( $.mobile.ns || "" ) + "rel", "popup" ); } else { self.button.attr( "href", "#" + self.dialogID ).attr( "data-" + ( $.mobile.ns || "" ) + "rel", "dialog" ); } self.isOpen = true; // Do not prevent default, so the navigation may have a chance to actually open the chosen format } }); // Events for list items self.list.attr( "role", "listbox" ) .bind( "focusin", function( e ) { $( e.target ) .attr( "tabindex", "0" ) .trigger( "vmouseover" ); }) .bind( "focusout", function( e ) { $( e.target ) .attr( "tabindex", "-1" ) .trigger( "vmouseout" ); }) .delegate( "li:not(.ui-disabled, .ui-li-divider)", "click", function( event ) { // index of option tag to be selected var oldIndex = self.select[ 0 ].selectedIndex, newIndex = self.list.find( "li:not(.ui-li-divider)" ).index( this ), option = self._selectOptions().eq( newIndex )[ 0 ]; // toggle selected status on the tag for multi selects option.selected = self.isMultiple ? !option.selected : true; // toggle checkbox class for multiple selects if ( self.isMultiple ) { $( this ).find( ".ui-icon" ) .toggleClass( "ui-icon-checkbox-on", option.selected ) .toggleClass( "ui-icon-checkbox-off", !option.selected ); } // trigger change if value changed if ( self.isMultiple || oldIndex !== newIndex ) { self.select.trigger( "change" ); } // hide custom select for single selects only - otherwise focus clicked item // We need to grab the clicked item the hard way, because the list may have been rebuilt if ( self.isMultiple ) { self.list.find( "li:not(.ui-li-divider)" ).eq( newIndex ) .addClass( "ui-btn-down-" + widget.options.theme ).find( "a" ).first().focus(); } else { self.close(); } event.preventDefault(); }) .keydown(function( event ) { //keyboard events for menu items var target = $( event.target ), li = target.closest( "li" ), prev, next; // switch logic based on which key was pressed switch ( event.keyCode ) { // up or left arrow keys case 38: prev = li.prev().not( ".ui-selectmenu-placeholder" ); if ( prev.is( ".ui-li-divider" ) ) { prev = prev.prev(); } // if there's a previous option, focus it if ( prev.length ) { target .blur() .attr( "tabindex", "-1" ); prev.addClass( "ui-btn-down-" + widget.options.theme ).find( "a" ).first().focus(); } return false; // down or right arrow keys case 40: next = li.next(); if ( next.is( ".ui-li-divider" ) ) { next = next.next(); } // if there's a next option, focus it if ( next.length ) { target .blur() .attr( "tabindex", "-1" ); next.addClass( "ui-btn-down-" + widget.options.theme ).find( "a" ).first().focus(); } return false; // If enter or space is pressed, trigger click case 13: case 32: target.trigger( "click" ); return false; } }); // button refocus ensures proper height calculation // by removing the inline style and ensuring page inclusion self.menuPage.bind( "pagehide", function() { // TODO centralize page removal binding / handling in the page plugin. // Suggestion from @jblas to do refcounting // // TODO extremely confusing dependency on the open method where the pagehide.remove // bindings are stripped to prevent the parent page from disappearing. The way // we're keeping pages in the DOM right now sucks // // rebind the page remove that was unbound in the open function // to allow for the parent page removal from actions other than the use // of a dialog sized custom select // // doing this here provides for the back button on the custom select dialog $.mobile._bindPageRemove.call( self.thisPage ); }); // Events on the popup self.listbox.bind( "popupafterclose", function( event ) { self.close(); }); // Close button on small overlays if ( self.isMultiple ) { self.headerClose.click(function() { if ( self.menuType === "overlay" ) { self.close(); return false; } }); } // track this dependency so that when the parent page // is removed on pagehide it will also remove the menupage self.thisPage.addDependents( this.menuPage ); }, _isRebuildRequired: function() { var list = this.list.find( "li" ), options = this._selectOptions(); // TODO exceedingly naive method to determine difference // ignores value changes etc in favor of a forcedRebuild // from the user in the refresh method return options.text() !== list.text(); }, selected: function() { return this._selectOptions().filter( ":selected:not( :jqmData(placeholder='true') )" ); }, refresh: function( forceRebuild , foo ) { var self = this, select = this.element, isMultiple = this.isMultiple, indicies; if ( forceRebuild || this._isRebuildRequired() ) { self._buildList(); } indicies = this.selectedIndices(); self.setButtonText(); self.setButtonCount(); self.list.find( "li:not(.ui-li-divider)" ) .removeClass( $.mobile.activeBtnClass ) .attr( "aria-selected", false ) .each(function( i ) { if ( $.inArray( i, indicies ) > -1 ) { var item = $( this ); // Aria selected attr item.attr( "aria-selected", true ); // Multiple selects: add the "on" checkbox state to the icon if ( self.isMultiple ) { item.find( ".ui-icon" ).removeClass( "ui-icon-checkbox-off" ).addClass( "ui-icon-checkbox-on" ); } else { if ( item.is( ".ui-selectmenu-placeholder" ) ) { item.next().addClass( $.mobile.activeBtnClass ); } else { item.addClass( $.mobile.activeBtnClass ); } } } }); }, close: function() { if ( this.options.disabled || !this.isOpen ) { return; } var self = this; if ( self.menuType === "page" ) { self.menuPage.dialog( "close" ); self.list.appendTo( self.listbox ); } else { self.listbox.popup( "close" ); } self._focusButton(); // allow the dialog to be closed again self.isOpen = false; }, open: function() { this.button.click(); }, _decideFormat: function() { var self = this, $window = $.mobile.window, selfListParent = self.list.parent(), menuHeight = selfListParent.outerHeight(), menuWidth = selfListParent.outerWidth(), activePage = $( "." + $.mobile.activePageClass ), scrollTop = $window.scrollTop(), btnOffset = self.button.offset().top, screenHeight = $window.height(), screenWidth = $window.width(); function focusMenuItem() { var selector = self.list.find( "." + $.mobile.activeBtnClass + " a" ); if ( selector.length === 0 ) { selector = self.list.find( "li.ui-btn:not( :jqmData(placeholder='true') ) a" ); } selector.first().focus().closest( "li" ).addClass( "ui-btn-down-" + widget.options.theme ); } if ( menuHeight > screenHeight - 80 || !$.support.scrollTop ) { self.menuPage.appendTo( $.mobile.pageContainer ).page(); self.menuPageContent = menuPage.find( ".ui-content" ); self.menuPageClose = menuPage.find( ".ui-header a" ); // prevent the parent page from being removed from the DOM, // otherwise the results of selecting a list item in the dialog // fall into a black hole self.thisPage.unbind( "pagehide.remove" ); //for WebOS/Opera Mini (set lastscroll using button offset) if ( scrollTop === 0 && btnOffset > screenHeight ) { self.thisPage.one( "pagehide", function() { $( this ).jqmData( "lastScroll", btnOffset ); }); } self.menuPage .one( "pageshow", function() { focusMenuItem(); }) .one( "pagehide", function() { self.close(); }); self.menuType = "page"; self.menuPageContent.append( self.list ); self.menuPage.find("div .ui-title").text(self.label.text()); } else { self.menuType = "overlay"; self.listbox.one( "popupafteropen", focusMenuItem ); } }, _buildList: function() { var self = this, o = this.options, placeholder = this.placeholder, needPlaceholder = true, optgroups = [], lis = [], dataIcon = self.isMultiple ? "checkbox-off" : "false"; self.list.empty().filter( ".ui-listview" ).listview( "destroy" ); var $options = self.select.find( "option" ), numOptions = $options.length, select = this.select[ 0 ], dataPrefix = 'data-' + $.mobile.ns, dataIndexAttr = dataPrefix + 'option-index', dataIconAttr = dataPrefix + 'icon', dataRoleAttr = dataPrefix + 'role', dataPlaceholderAttr = dataPrefix + 'placeholder', fragment = document.createDocumentFragment(), isPlaceholderItem = false, optGroup; for (var i = 0; i < numOptions;i++, isPlaceholderItem = false) { var option = $options[i], $option = $( option ), parent = option.parentNode, text = $option.text(), anchor = document.createElement( 'a' ), classes = []; anchor.setAttribute( 'href', '#' ); anchor.appendChild( document.createTextNode( text ) ); // Are we inside an optgroup? if ( parent !== select && parent.nodeName.toLowerCase() === "optgroup" ) { var optLabel = parent.getAttribute( 'label' ); if ( optLabel !== optGroup ) { var divider = document.createElement( 'li' ); divider.setAttribute( dataRoleAttr, 'list-divider' ); divider.setAttribute( 'role', 'option' ); divider.setAttribute( 'tabindex', '-1' ); divider.appendChild( document.createTextNode( optLabel ) ); fragment.appendChild( divider ); optGroup = optLabel; } } if ( needPlaceholder && ( !option.getAttribute( "value" ) || text.length === 0 || $option.jqmData( "placeholder" ) ) ) { needPlaceholder = false; isPlaceholderItem = true; // If we have identified a placeholder, record the fact that it was // us who have added the placeholder to the option and mark it // retroactively in the select as well if ( null === option.getAttribute( dataPlaceholderAttr ) ) { this._removePlaceholderAttr = true; } option.setAttribute( dataPlaceholderAttr, true ); if ( o.hidePlaceholderMenuItems ) { classes.push( "ui-selectmenu-placeholder" ); } if ( placeholder !== text ) { placeholder = self.placeholder = text; } } var item = document.createElement('li'); if ( option.disabled ) { classes.push( "ui-disabled" ); item.setAttribute('aria-disabled',true); } item.setAttribute( dataIndexAttr,i ); item.setAttribute( dataIconAttr, dataIcon ); if ( isPlaceholderItem ) { item.setAttribute( dataPlaceholderAttr, true ); } item.className = classes.join( " " ); item.setAttribute( 'role', 'option' ); anchor.setAttribute( 'tabindex', '-1' ); item.appendChild( anchor ); fragment.appendChild( item ); } self.list[0].appendChild( fragment ); // Hide header if it's not a multiselect and there's no placeholder if ( !this.isMultiple && !placeholder.length ) { this.header.hide(); } else { this.headerTitle.text( this.placeholder ); } // Now populated, create listview self.list.listview(); }, _button: function() { return $( "<a>", { "href": "#", "role": "button", // TODO value is undefined at creation "id": this.buttonId, "aria-haspopup": "true", // TODO value is undefined at creation "aria-owns": this.menuId }); }, _destroy: function() { this.close(); // Restore the tabindex attribute to its original value if ( this._origTabIndex !== undefined ) { if ( this._origTabIndex !== false ) { this.select.attr( "tabindex", this._origTabIndex ); } else { this.select.removeAttr( "tabindex" ); } } // Remove the placeholder attribute if we were the ones to add it if ( this._removePlaceholderAttr ) { this._selectOptions().removeAttr( "data-" + $.mobile.ns + "placeholder" ); } // Remove the popup this.listbox.remove(); // Chain up origDestroy.apply( this, arguments ); } }); }; // issue #3894 - core doesn't trigger events on disabled delegates $.mobile.document.bind( "selectmenubeforecreate", function( event ) { var selectmenuWidget = $( event.target ).data( "mobile-selectmenu" ); if ( !selectmenuWidget.options.nativeMenu && selectmenuWidget.element.parents( ":jqmData(role='popup')" ).length === 0 ) { extendSelect( selectmenuWidget ); } }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.controlgroup", $.mobile.widget, $.extend( { options: { shadow: false, corners: true, excludeInvisible: true, type: "vertical", mini: false, initSelector: ":jqmData(role='controlgroup')" }, _create: function() { var $el = this.element, ui = { inner: $( "<div class='ui-controlgroup-controls'></div>" ), legend: $( "<div role='heading' class='ui-controlgroup-label'></div>" ) }, grouplegend = $el.children( "legend" ), self = this; // Apply the proto $el.wrapInner( ui.inner ); if ( grouplegend.length ) { ui.legend.append( grouplegend ).insertBefore( $el.children( 0 ) ); } $el.addClass( "ui-corner-all ui-controlgroup" ); $.extend( this, { _initialRefresh: true }); $.each( this.options, function( key, value ) { // Cause initial options to be applied by their handler by temporarily setting the option to undefined // - the handler then sets it to the initial value self.options[ key ] = undefined; self._setOption( key, value, true ); }); }, _init: function() { this.refresh(); }, _setOption: function( key, value ) { var setter = "_set" + key.charAt( 0 ).toUpperCase() + key.slice( 1 ); if ( this[ setter ] !== undefined ) { this[ setter ]( value ); } this._super( key, value ); this.element.attr( "data-" + ( $.mobile.ns || "" ) + ( key.replace( /([A-Z])/, "-$1" ).toLowerCase() ), value ); }, _setType: function( value ) { this.element .removeClass( "ui-controlgroup-horizontal ui-controlgroup-vertical" ) .addClass( "ui-controlgroup-" + value ); this.refresh(); }, _setCorners: function( value ) { this.element.toggleClass( "ui-corner-all", value ); }, _setShadow: function( value ) { this.element.toggleClass( "ui-shadow", value ); }, _setMini: function( value ) { this.element.toggleClass( "ui-mini", value ); }, container: function() { return this.element.children( ".ui-controlgroup-controls" ); }, refresh: function() { var els = this.element.find( ".ui-btn" ).not( ".ui-slider-handle" ), create = this._initialRefresh; if ( $.mobile.checkboxradio ) { this.element.find( ":mobile-checkboxradio" ).checkboxradio( "refresh" ); } this._addFirstLastClasses( els, this.options.excludeInvisible ? this._getVisibles( els, create ) : els, create ); this._initialRefresh = false; } }, $.mobile.behaviors.addFirstLastClasses ) ); // TODO: Implement a mechanism to allow widgets to become enhanced in the // correct order when their correct enhancement depends on other widgets in // the page being correctly enhanced already. // // For now, we wait until dom-ready to attach the controlgroup's enhancement // hook, because by that time, all the other widgets' enhancement hooks should // already be in place, ensuring that all widgets that need to be grouped will // already have been enhanced by the time the controlgroup is created. $( function() { $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.controlgroup.prototype.enhanceWithin( e.target, true ); }); }); })(jQuery); (function( $, undefined ) { $( document ).bind( "pagecreate create", function( e ) { //links within content areas, tests included with page $( e.target ) .find( "a" ) .jqmEnhanceable() .not( ".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')" ) .addClass( "ui-link" ); }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.fixedtoolbar", $.mobile.widget, { options: { visibleOnPageShow: true, disablePageZoom: true, transition: "slide", //can be none, fade, slide (slide maps to slideup or slidedown) fullscreen: false, tapToggle: true, tapToggleBlacklist: "a, button, input, select, textarea, .ui-header-fixed, .ui-footer-fixed, .ui-popup, .ui-panel, .ui-panel-dismiss-open", hideDuringFocus: "input, textarea, select", updatePagePadding: true, trackPersistentToolbars: true, // Browser detection! Weeee, here we go... // Unfortunately, position:fixed is costly, not to mention probably impossible, to feature-detect accurately. // Some tests exist, but they currently return false results in critical devices and browsers, which could lead to a broken experience. // Testing fixed positioning is also pretty obtrusive to page load, requiring injected elements and scrolling the window // The following function serves to rule out some popular browsers with known fixed-positioning issues // This is a plugin option like any other, so feel free to improve or overwrite it supportBlacklist: function() { return !$.support.fixedPosition; }, initSelector: ":jqmData(position='fixed')" }, _create: function() { var self = this, o = self.options, $el = self.element, tbtype = $el.is( ":jqmData(role='header')" ) ? "header" : "footer", $page = $el.closest( ".ui-page" ); // Feature detecting support for if ( o.supportBlacklist() ) { self.destroy(); return; } $el.addClass( "ui-"+ tbtype +"-fixed" ); // "fullscreen" overlay positioning if ( o.fullscreen ) { $el.addClass( "ui-"+ tbtype +"-fullscreen" ); $page.addClass( "ui-page-" + tbtype + "-fullscreen" ); } // If not fullscreen, add class to page to set top or bottom padding else{ $page.addClass( "ui-page-" + tbtype + "-fixed" ); } $.extend( this, { _thisPage: null }); self._addTransitionClass(); self._bindPageEvents(); self._bindToggleHandlers(); }, _addTransitionClass: function() { var tclass = this.options.transition; if ( tclass && tclass !== "none" ) { // use appropriate slide for header or footer if ( tclass === "slide" ) { tclass = this.element.is( ".ui-header" ) ? "slidedown" : "slideup"; } this.element.addClass( tclass ); } }, _bindPageEvents: function() { this._thisPage = this.element.closest( ".ui-page" ); //page event bindings // Fixed toolbars require page zoom to be disabled, otherwise usability issues crop up // This method is meant to disable zoom while a fixed-positioned toolbar page is visible this._on( this._thisPage, { "pagebeforeshow": "_handlePageBeforeShow", "webkitAnimationStart":"_handleAnimationStart", "animationstart":"_handleAnimationStart", "updatelayout": "_handleAnimationStart", "pageshow": "_handlePageShow", "pagebeforehide": "_handlePageBeforeHide" }); }, _handlePageBeforeShow: function() { var o = this.options; if ( o.disablePageZoom ) { $.mobile.zoom.disable( true ); } if ( !o.visibleOnPageShow ) { this.hide( true ); } }, _handleAnimationStart: function() { if ( this.options.updatePagePadding ) { this.updatePagePadding( this._thisPage ); } }, _handlePageShow: function() { this.updatePagePadding( this._thisPage ); if ( this.options.updatePagePadding ) { this._on( $.mobile.window, { "throttledresize": "updatePagePadding" } ); } }, _handlePageBeforeHide: function( e, ui ) { var o = this.options; if ( o.disablePageZoom ) { $.mobile.zoom.enable( true ); } if ( o.updatePagePadding ) { this._off( $.mobile.window, "throttledresize" ); } if ( o.trackPersistentToolbars ) { var thisFooter = $( ".ui-footer-fixed:jqmData(id)", this._thisPage ), thisHeader = $( ".ui-header-fixed:jqmData(id)", this._thisPage ), nextFooter = thisFooter.length && ui.nextPage && $( ".ui-footer-fixed:jqmData(id='" + thisFooter.jqmData( "id" ) + "')", ui.nextPage ) || $(), nextHeader = thisHeader.length && ui.nextPage && $( ".ui-header-fixed:jqmData(id='" + thisHeader.jqmData( "id" ) + "')", ui.nextPage ) || $(); if ( nextFooter.length || nextHeader.length ) { nextFooter.add( nextHeader ).appendTo( $.mobile.pageContainer ); ui.nextPage.one( "pageshow", function() { nextHeader.prependTo( this ); nextFooter.appendTo( this ); }); } } }, _visible: true, // This will set the content element's top or bottom padding equal to the toolbar's height updatePagePadding: function( tbPage ) { var $el = this.element, header = $el.is( ".ui-header" ), pos = parseFloat( $el.css( header ? "top" : "bottom" ) ); // This behavior only applies to "fixed", not "fullscreen" if ( this.options.fullscreen ) { return; } // tbPage argument can be a Page object or an event, if coming from throttled resize. tbPage = ( tbPage && tbPage.type === undefined && tbPage ) || this._thisPage || $el.closest( ".ui-page" ); $( tbPage ).css( "padding-" + ( header ? "top" : "bottom" ), $el.outerHeight() + pos ); }, _useTransition: function( notransition ) { var $win = $.mobile.window, $el = this.element, scroll = $win.scrollTop(), elHeight = $el.height(), pHeight = $el.closest( ".ui-page" ).height(), viewportHeight = $.mobile.getScreenHeight(), tbtype = $el.is( ":jqmData(role='header')" ) ? "header" : "footer"; return !notransition && ( this.options.transition && this.options.transition !== "none" && ( ( tbtype === "header" && !this.options.fullscreen && scroll > elHeight ) || ( tbtype === "footer" && !this.options.fullscreen && scroll + viewportHeight < pHeight - elHeight ) ) || this.options.fullscreen ); }, show: function( notransition ) { var hideClass = "ui-fixed-hidden", $el = this.element; if ( this._useTransition( notransition ) ) { $el .removeClass( "out " + hideClass ) .addClass( "in" ) .animationComplete(function () { $el.removeClass('in'); }); } else { $el.removeClass( hideClass ); } this._visible = true; }, hide: function( notransition ) { var hideClass = "ui-fixed-hidden", $el = this.element, // if it's a slide transition, our new transitions need the reverse class as well to slide outward outclass = "out" + ( this.options.transition === "slide" ? " reverse" : "" ); if( this._useTransition( notransition ) ) { $el .addClass( outclass ) .removeClass( "in" ) .animationComplete(function() { $el.addClass( hideClass ).removeClass( outclass ); }); } else { $el.addClass( hideClass ).removeClass( outclass ); } this._visible = false; }, toggle: function() { this[ this._visible ? "hide" : "show" ](); }, _bindToggleHandlers: function() { var self = this, o = self.options, $el = self.element, delayShow, delayHide, isVisible = true; // tap toggle $el.closest( ".ui-page" ) .bind( "vclick", function( e ) { if ( o.tapToggle && !$( e.target ).closest( o.tapToggleBlacklist ).length ) { self.toggle(); } }) .bind( "focusin focusout", function( e ) { //this hides the toolbars on a keyboard pop to give more screen room and prevent ios bug which //positions fixed toolbars in the middle of the screen on pop if the input is near the top or //bottom of the screen addresses issues #4410 Footer navbar moves up when clicking on a textbox in an Android environment //and issue #4113 Header and footer change their position after keyboard popup - iOS //and issue #4410 Footer navbar moves up when clicking on a textbox in an Android environment if ( screen.width < 1025 && $( e.target ).is( o.hideDuringFocus ) && !$( e.target ).closest( ".ui-header-fixed, .ui-footer-fixed" ).length ) { //Fix for issue #4724 Moving through form in Mobile Safari with "Next" and "Previous" system //controls causes fixed position, tap-toggle false Header to reveal itself // isVisible instead of self._visible because the focusin and focusout events fire twice at the same time // Also use a delay for hiding the toolbars because on Android native browser focusin is direclty followed // by a focusout when a native selects opens and the other way around when it closes. if ( e.type === "focusout" && !isVisible ) { isVisible = true; //wait for the stack to unwind and see if we have jumped to another input clearTimeout( delayHide ); delayShow = setTimeout( function() { self.show(); }, 0 ); } else if ( e.type === "focusin" && !!isVisible ) { //if we have jumped to another input clear the time out to cancel the show. clearTimeout( delayShow ); isVisible = false; delayHide = setTimeout( function() { self.hide(); }, 0 ); } } }); }, _destroy: function() { var $el = this.element, header = $el.is( ".ui-header" ); $el.closest( ".ui-page" ).css( "padding-" + ( header ? "top" : "bottom" ), "" ); $el.removeClass( "ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden" ); $el.closest( ".ui-page" ).removeClass( "ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen" ); } }); //auto self-init widgets $.mobile.document .bind( "pagecreate create", function( e ) { // DEPRECATED in 1.1: support for data-fullscreen=true|false on the page element. // This line ensures it still works, but we recommend moving the attribute to the toolbars themselves. if ( $( e.target ).jqmData( "fullscreen" ) ) { $( $.mobile.fixedtoolbar.prototype.options.initSelector, e.target ).not( ":jqmData(fullscreen)" ).jqmData( "fullscreen", true ); } $.mobile.fixedtoolbar.prototype.enhanceWithin( e.target ); }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.fixedtoolbar", $.mobile.fixedtoolbar, { _create: function() { this._super(); this._workarounds(); }, //check the browser and version and run needed workarounds _workarounds: function() { var ua = navigator.userAgent, platform = navigator.platform, // Rendering engine is Webkit, and capture major version wkmatch = ua.match( /AppleWebKit\/([0-9]+)/ ), wkversion = !!wkmatch && wkmatch[ 1 ], os = null, self = this; //set the os we are working in if it dosent match one with workarounds return if( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1 || platform.indexOf( "iPod" ) > -1 ){ os = "ios"; } else if( ua.indexOf( "Android" ) > -1 ){ os = "android"; } else { return; } //check os version if it dosent match one with workarounds return if( os === "ios" ) { //iOS workarounds self._bindScrollWorkaround(); } else if( os === "android" && wkversion && wkversion < 534 ) { //Android 2.3 run all Android 2.3 workaround self._bindScrollWorkaround(); self._bindListThumbWorkaround(); } else { return; } }, //Utility class for checking header and footer positions relative to viewport _viewportOffset: function() { var $el = this.element, header = $el.is( ".ui-header" ), offset = Math.abs($el.offset().top - $.mobile.window.scrollTop()); if( !header ) { offset = Math.round(offset - $.mobile.window.height() + $el.outerHeight())-60; } return offset; }, //bind events for _triggerRedraw() function _bindScrollWorkaround: function() { var self = this; //bind to scrollstop and check if the toolbars are correctly positioned this._on( $.mobile.window, { scrollstop: function() { var viewportOffset = self._viewportOffset(); //check if the header is visible and if its in the right place if( viewportOffset > 2 && self._visible) { self._triggerRedraw(); } }}); }, //this addresses issue #4250 Persistent footer instability in v1.1 with long select lists in Android 2.3.3 //and issue #3748 Android 2.x: Page transitions broken when fixed toolbars used //the absolutely positioned thumbnail in a list view causes problems with fixed position buttons above in a nav bar //setting the li's to -webkit-transform:translate3d(0,0,0); solves this problem to avoide potential issues in other //platforms we scope this with the class ui-android-2x-fix _bindListThumbWorkaround: function() { this.element.closest(".ui-page").addClass( "ui-android-2x-fixed" ); }, //this addresses issues #4337 Fixed header problem after scrolling content on iOS and Android //and device bugs project issue #1 Form elements can lose click hit area in position: fixed containers. //this also addresses not on fixed toolbars page in docs //adding 1px of padding to the bottom then removing it causes a "redraw" //which positions the toolbars correctly (they will always be visually correct) _triggerRedraw: function() { var paddingBottom = parseFloat( $( ".ui-page-active" ).css( "padding-bottom" ) ); //trigger page redraw to fix incorrectly positioned fixed elements $( ".ui-page-active" ).css( "padding-bottom", ( paddingBottom + 1 ) +"px" ); //if the padding is reset with out a timeout the reposition will not occure. //this is independant of JQM the browser seems to need the time to react. setTimeout( function() { $( ".ui-page-active" ).css( "padding-bottom", paddingBottom + "px" ); }, 0 ); }, destroy: function() { this._super(); //Remove the class we added to the page previously in android 2.x this.element.closest(".ui-page-active").removeClass( "ui-android-2x-fix" ); } }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.panel", $.mobile.widget, { options: { classes: { panel: "ui-panel", panelOpen: "ui-panel-open", panelClosed: "ui-panel-closed", panelFixed: "ui-panel-fixed", panelInner: "ui-panel-inner", modal: "ui-panel-dismiss", modalOpen: "ui-panel-dismiss-open", pagePanel: "ui-page-panel", pagePanelOpen: "ui-page-panel-open", contentWrap: "ui-panel-content-wrap", contentWrapOpen: "ui-panel-content-wrap-open", contentWrapClosed: "ui-panel-content-wrap-closed", contentFixedToolbar: "ui-panel-content-fixed-toolbar", contentFixedToolbarOpen: "ui-panel-content-fixed-toolbar-open", contentFixedToolbarClosed: "ui-panel-content-fixed-toolbar-closed", animate: "ui-panel-animate" }, animate: true, theme: "c", position: "left", dismissible: true, display: "reveal", //accepts reveal, push, overlay initSelector: ":jqmData(role='panel')", swipeClose: true, positionFixed: false }, _panelID: null, _closeLink: null, _page: null, _modal: null, _panelInner: null, _wrapper: null, _fixedToolbar: null, _create: function() { var self = this, $el = self.element, page = $el.closest( ":jqmData(role='page')" ), _getPageTheme = function() { var $theme = $.data( page[0], "mobilePage" ).options.theme, $pageThemeClass = "ui-body-" + $theme; return $pageThemeClass; }, _getPanelInner = function() { var $panelInner = $el.find( "." + self.options.classes.panelInner ); if ( $panelInner.length === 0 ) { $panelInner = $el.children().wrapAll( '<div class="' + self.options.classes.panelInner + '" />' ).parent(); } return $panelInner; }, _getWrapper = function() { var $wrapper = page.find( "." + self.options.classes.contentWrap ); if ( $wrapper.length === 0 ) { $wrapper = page.children( ".ui-header:not(:jqmData(position='fixed')), .ui-content:not(:jqmData(role='popup')), .ui-footer:not(:jqmData(position='fixed'))" ).wrapAll( '<div class="' + self.options.classes.contentWrap + ' ' + _getPageTheme() + '" />' ).parent(); if ( $.support.cssTransform3d && !!self.options.animate ) { $wrapper.addClass( self.options.classes.animate ); } } return $wrapper; }, _getFixedToolbar = function() { var $fixedToolbar = page.find( "." + self.options.classes.contentFixedToolbar ); if ( $fixedToolbar.length === 0 ) { $fixedToolbar = page.find( ".ui-header:jqmData(position='fixed'), .ui-footer:jqmData(position='fixed')" ).addClass( self.options.classes.contentFixedToolbar ); if ( $.support.cssTransform3d && !!self.options.animate ) { $fixedToolbar.addClass( self.options.classes.animate ); } } return $fixedToolbar; }; // expose some private props to other methods $.extend( this, { _panelID: $el.attr( "id" ), _closeLink: $el.find( ":jqmData(rel='close')" ), _page: $el.closest( ":jqmData(role='page')" ), _pageTheme: _getPageTheme(), _panelInner: _getPanelInner(), _wrapper: _getWrapper(), _fixedToolbar: _getFixedToolbar() }); self._addPanelClasses(); self._wrapper.addClass( this.options.classes.contentWrapClosed ); self._fixedToolbar.addClass( this.options.classes.contentFixedToolbarClosed ); // add class to page so we can set "overflow-x: hidden;" for it to fix Android zoom issue self._page.addClass( self.options.classes.pagePanel ); // if animating, add the class to do so if ( $.support.cssTransform3d && !!self.options.animate ) { this.element.addClass( self.options.classes.animate ); } self._bindUpdateLayout(); self._bindCloseEvents(); self._bindLinkListeners(); self._bindPageEvents(); if ( !!self.options.dismissible ) { self._createModal(); } self._bindSwipeEvents(); }, _createModal: function( options ) { var self = this; self._modal = $( "<div class='" + self.options.classes.modal + "' data-panelid='" + self._panelID + "'></div>" ) .on( "mousedown", function() { self.close(); }) .appendTo( this._page ); }, _getPosDisplayClasses: function( prefix ) { return prefix + "-position-" + this.options.position + " " + prefix + "-display-" + this.options.display; }, _getPanelClasses: function() { var panelClasses = this.options.classes.panel + " " + this._getPosDisplayClasses( this.options.classes.panel ) + " " + this.options.classes.panelClosed; if ( this.options.theme ) { panelClasses += " ui-body-" + this.options.theme; } if ( !!this.options.positionFixed ) { panelClasses += " " + this.options.classes.panelFixed; } return panelClasses; }, _addPanelClasses: function() { this.element.addClass( this._getPanelClasses() ); }, _bindCloseEvents: function() { var self = this; self._closeLink.on( "click.panel" , function( e ) { e.preventDefault(); self.close(); return false; }); self.element.on( "click.panel" , "a:jqmData(ajax='false')", function( e ) { self.close(); }); }, _positionPanel: function() { var self = this, panelInnerHeight = self._panelInner.outerHeight(), expand = panelInnerHeight > $.mobile.getScreenHeight(); if ( expand || !self.options.positionFixed ) { if ( expand ) { self._unfixPanel(); $.mobile.resetActivePageHeight( panelInnerHeight ); } self._scrollIntoView( panelInnerHeight ); } else { self._fixPanel(); } }, _scrollIntoView: function( panelInnerHeight ) { if ( panelInnerHeight < $( window ).scrollTop() ) { window.scrollTo( 0, 0 ); } }, _bindFixListener: function() { this._on( $( window ), { "throttledresize": "_positionPanel" }); }, _unbindFixListener: function() { this._off( $( window ), "throttledresize" ); }, _unfixPanel: function() { if ( !!this.options.positionFixed && $.support.fixedPosition ) { this.element.removeClass( this.options.classes.panelFixed ); } }, _fixPanel: function() { if ( !!this.options.positionFixed && $.support.fixedPosition ) { this.element.addClass( this.options.classes.panelFixed ); } }, _bindUpdateLayout: function() { var self = this; self.element.on( "updatelayout", function( e ) { if ( self._open ) { self._positionPanel(); } }); }, _bindLinkListeners: function() { var self = this; self._page.on( "click.panel" , "a", function( e ) { if ( this.href.split( "#" )[ 1 ] === self._panelID && self._panelID !== undefined ) { e.preventDefault(); var $link = $( this ); if ( ! $link.hasClass( "ui-link" ) ) { $link.addClass( $.mobile.activeBtnClass ); self.element.one( "panelopen panelclose", function() { $link.removeClass( $.mobile.activeBtnClass ); }); } self.toggle(); return false; } }); }, _bindSwipeEvents: function() { var self = this, area = self._modal ? self.element.add( self._modal ) : self.element; // on swipe, close the panel if( !!self.options.swipeClose ) { if ( self.options.position === "left" ) { area.on( "swipeleft.panel", function( e ) { self.close(); }); } else { area.on( "swiperight.panel", function( e ) { self.close(); }); } } }, _bindPageEvents: function() { var self = this; self._page // Close the panel if another panel on the page opens .on( "panelbeforeopen", function( e ) { if ( self._open && e.target !== self.element[ 0 ] ) { self.close(); } }) // clean up open panels after page hide .on( "pagehide", function( e ) { if ( self._open ) { self.close( true ); } }) // on escape, close? might need to have a target check too... .on( "keyup.panel", function( e ) { if ( e.keyCode === 27 && self._open ) { self.close(); } }); }, // state storage of open or closed _open: false, _contentWrapOpenClasses: null, _fixedToolbarOpenClasses: null, _modalOpenClasses: null, open: function( immediate ) { if ( !this._open ) { var self = this, o = self.options, _openPanel = function() { self._page.off( "panelclose" ); self._page.jqmData( "panel", "open" ); if ( !immediate && $.support.cssTransform3d && !!o.animate ) { self.element.add( self._wrapper ).on( self._transitionEndEvents, complete ); } else { setTimeout( complete, 0 ); } if ( self.options.theme && self.options.display !== "overlay" ) { self._page .removeClass( self._pageTheme ) .addClass( "ui-body-" + self.options.theme ); } self.element.removeClass( o.classes.panelClosed ).addClass( o.classes.panelOpen ); self._positionPanel(); // Fix for IE7 min-height bug if ( self.options.theme && self.options.display !== "overlay" ) { self._wrapper.css( "min-height", self._page.css( "min-height" ) ); } self._contentWrapOpenClasses = self._getPosDisplayClasses( o.classes.contentWrap ); self._wrapper .removeClass( o.classes.contentWrapClosed ) .addClass( self._contentWrapOpenClasses + " " + o.classes.contentWrapOpen ); self._fixedToolbarOpenClasses = self._getPosDisplayClasses( o.classes.contentFixedToolbar ); self._fixedToolbar .removeClass( o.classes.contentFixedToolbarClosed ) .addClass( self._fixedToolbarOpenClasses + " " + o.classes.contentFixedToolbarOpen ); self._modalOpenClasses = self._getPosDisplayClasses( o.classes.modal ) + " " + o.classes.modalOpen; if ( self._modal ) { self._modal.addClass( self._modalOpenClasses ); } }, complete = function() { self.element.add( self._wrapper ).off( self._transitionEndEvents, complete ); self._page.addClass( o.classes.pagePanelOpen ); self._bindFixListener(); self._trigger( "open" ); }; if ( this.element.closest( ".ui-page-active" ).length < 0 ) { immediate = true; } self._trigger( "beforeopen" ); if ( self._page.jqmData('panel') === "open" ) { self._page.on( "panelclose", function() { _openPanel(); }); } else { _openPanel(); } self._open = true; } }, close: function( immediate ) { if ( this._open ) { var o = this.options, self = this, _closePanel = function() { if ( !immediate && $.support.cssTransform3d && !!o.animate ) { self.element.add( self._wrapper ).on( self._transitionEndEvents, complete ); } else { setTimeout( complete, 0 ); } self._page.removeClass( o.classes.pagePanelOpen ); self.element.removeClass( o.classes.panelOpen ); self._wrapper.removeClass( o.classes.contentWrapOpen ); self._fixedToolbar.removeClass( o.classes.contentFixedToolbarOpen ); if ( self._modal ) { self._modal.removeClass( self._modalOpenClasses ); } }, complete = function() { if ( self.options.theme && self.options.display !== "overlay" ) { self._page.removeClass( "ui-body-" + self.options.theme ).addClass( self._pageTheme ); // reset fix for IE7 min-height bug self._wrapper.css( "min-height", "" ); } self.element.add( self._wrapper ).off( self._transitionEndEvents, complete ); self.element.addClass( o.classes.panelClosed ); self._wrapper .removeClass( self._contentWrapOpenClasses ) .addClass( o.classes.contentWrapClosed ); self._fixedToolbar .removeClass( self._fixedToolbarOpenClasses ) .addClass( o.classes.contentFixedToolbarClosed ); self._fixPanel(); self._unbindFixListener(); $.mobile.resetActivePageHeight(); self._page.jqmRemoveData( "panel" ); self._trigger( "close" ); }; if ( this.element.closest( ".ui-page-active" ).length < 0 ) { immediate = true; } self._trigger( "beforeclose" ); _closePanel(); self._open = false; } }, toggle: function( options ) { this[ this._open ? "close" : "open" ](); }, _transitionEndEvents: "webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd", _destroy: function() { var classes = this.options.classes, theme = this.options.theme, hasOtherSiblingPanels = this.element.siblings( "." + classes.panel ).length; // create if ( !hasOtherSiblingPanels ) { this._wrapper.children().unwrap(); this._page.find( "a" ).unbind( "panelopen panelclose" ); this._page.removeClass( classes.pagePanel ); if ( this._open ) { this._page.jqmRemoveData( "panel" ); this._page.removeClass( classes.pagePanelOpen ); if ( theme ) { this._page.removeClass( "ui-body-" + theme ).addClass( this._pageTheme ); } $.mobile.resetActivePageHeight(); } } else if ( this._open ) { this._wrapper.removeClass( classes.contentWrapOpen ); this._fixedToolbar.removeClass( classes.contentFixedToolbarOpen ); this._page.jqmRemoveData( "panel" ); this._page.removeClass( classes.pagePanelOpen ); if ( theme ) { this._page.removeClass( "ui-body-" + theme ).addClass( this._pageTheme ); } } this._panelInner.children().unwrap(); this.element.removeClass( [ this._getPanelClasses(), classes.panelAnimate ].join( " " ) ) .off( "swipeleft.panel swiperight.panel" ) .off( "panelbeforeopen" ) .off( "panelhide" ) .off( "keyup.panel" ) .off( "updatelayout" ); this._closeLink.off( "click.panel" ); if ( this._modal ) { this._modal.remove(); } // open and close this.element.off( this._transitionEndEvents ) .removeClass( [ classes.panelUnfixed, classes.panelClosed, classes.panelOpen ].join( " " ) ); } }); //auto self-init widgets $( document ).bind( "pagecreate create", function( e ) { $.mobile.panel.prototype.enhanceWithin( e.target ); }); })( jQuery ); (function( $, undefined ) { $.widget( "mobile.table", $.mobile.widget, { options: { classes: { table: "ui-table" }, initSelector: ":jqmData(role='table')" }, _create: function() { var self = this; self.refresh( true ); }, refresh: function (create) { var self = this, trs = this.element.find( "thead tr" ); if ( create ) { this.element.addClass( this.options.classes.table ); } // Expose headers and allHeaders properties on the widget // headers references the THs within the first TR in the table self.headers = this.element.find( "tr:eq(0)" ).children(); // allHeaders references headers, plus all THs in the thead, which may include several rows, or not self.allHeaders = self.headers.add( trs.children() ); trs.each(function(){ var coltally = 0; $( this ).children().each(function( i ){ var span = parseInt( $( this ).attr( "colspan" ), 10 ), sel = ":nth-child(" + ( coltally + 1 ) + ")"; $( this ) .jqmData( "colstart", coltally + 1 ); if( span ){ for( var j = 0; j < span - 1; j++ ){ coltally++; sel += ", :nth-child(" + ( coltally + 1 ) + ")"; } } if ( create === undefined ) { $(this).jqmData("cells", ""); } // Store "cells" data on header as a reference to all cells in the same column as this TH $( this ) .jqmData( "cells", self.element.find( "tr" ).not( trs.eq(0) ).not( this ).children( sel ) ); coltally++; }); }); // update table modes if ( create === undefined ) { this.element.trigger( 'refresh' ); } } }); //auto self-init widgets $.mobile.document.bind( "pagecreate create", function( e ) { $.mobile.table.prototype.enhanceWithin( e.target ); }); })( jQuery ); (function( $, undefined ) { $.mobile.table.prototype.options.mode = "columntoggle"; $.mobile.table.prototype.options.columnBtnTheme = null; $.mobile.table.prototype.options.columnPopupTheme = null; $.mobile.table.prototype.options.columnBtnText = "Columns..."; $.mobile.table.prototype.options.classes = $.extend( $.mobile.table.prototype.options.classes, { popup: "ui-table-columntoggle-popup", columnBtn: "ui-table-columntoggle-btn", priorityPrefix: "ui-table-priority-", columnToggleTable: "ui-table-columntoggle" } ); $.mobile.document.delegate( ":jqmData(role='table')", "tablecreate refresh", function( e ) { var $table = $( this ), self = $table.data( "mobile-table" ), event = e.type, o = self.options, ns = $.mobile.ns, id = ( $table.attr( "id" ) || o.classes.popup ) + "-popup", /* TODO BETTER FALLBACK ID HERE */ $menuButton, $popup, $menu, $switchboard; if ( o.mode !== "columntoggle" ) { return; } if ( event !== "refresh" ) { self.element.addClass( o.classes.columnToggleTable ); $menuButton = $( "<a href='#" + id + "' class='" + o.classes.columnBtn + "' data-" + ns + "rel='popup' data-" + ns + "mini='true'>" + o.columnBtnText + "</a>" ), $popup = $( "<div data-" + ns + "role='popup' data-" + ns + "role='fieldcontain' class='" + o.classes.popup + "' id='" + id + "'></div>"), $menu = $("<fieldset data-" + ns + "role='controlgroup'></fieldset>"); } // create the hide/show toggles self.headers.not( "td" ).each(function( i ) { var priority = $( this ).jqmData( "priority" ), $cells = $( this ).add( $( this ).jqmData( "cells" ) ); if ( priority ) { $cells.addClass( o.classes.priorityPrefix + priority ); if ( event !== "refresh" ) { $("<label><input type='checkbox' checked />" + $( this ).text() + "</label>" ) .appendTo( $menu ) .children( 0 ) .jqmData( "cells", $cells ) .checkboxradio({ theme: o.columnPopupTheme }); } else { $( '#' + id + ' fieldset div:eq(' + i +')').find('input').jqmData( 'cells', $cells ); } } }); if ( event !== "refresh" ) { $menu.appendTo( $popup ); } // bind change event listeners to inputs - TODO: move to a private method? if ( $menu === undefined ) { $switchboard = $('#' + id + ' fieldset'); } else { $switchboard = $menu; } if ( event !== "refresh" ) { $switchboard.on( "change", "input", function( e ){ if( this.checked ){ $( this ).jqmData( "cells" ).removeClass( "ui-table-cell-hidden" ).addClass( "ui-table-cell-visible" ); } else { $( this ).jqmData( "cells" ).removeClass( "ui-table-cell-visible" ).addClass( "ui-table-cell-hidden" ); } }); $menuButton .insertBefore( $table ) .buttonMarkup({ theme: o.columnBtnTheme }); $popup .insertBefore( $table ) .popup(); } // refresh method self.update = function(){ $switchboard.find( "input" ).each( function(){ if (this.checked) { this.checked = $( this ).jqmData( "cells" ).eq(0).css( "display" ) === "table-cell"; if (event === "refresh") { $( this ).jqmData( "cells" ).addClass('ui-table-cell-visible'); } } else { $( this ).jqmData( "cells" ).addClass('ui-table-cell-hidden'); } $( this ).checkboxradio( "refresh" ); }); }; $.mobile.window.on( "throttledresize", self.update ); self.update(); }); })( jQuery ); (function( $, undefined ) { $.mobile.table.prototype.options.mode = "reflow"; $.mobile.table.prototype.options.classes = $.extend( $.mobile.table.prototype.options.classes, { reflowTable: "ui-table-reflow", cellLabels: "ui-table-cell-label" } ); $.mobile.document.delegate( ":jqmData(role='table')", "tablecreate refresh", function( e ) { var $table = $( this ), event = e.type, self = $table.data( "mobile-table" ), o = self.options; // If it's not reflow mode, return here. if( o.mode !== "reflow" ){ return; } if ( event !== "refresh" ) { self.element.addClass( o.classes.reflowTable ); } // get headers in reverse order so that top-level headers are appended last var reverseHeaders = $( self.allHeaders.get().reverse() ); // create the hide/show toggles reverseHeaders.each(function( i ){ var $cells = $( this ).jqmData( "cells" ), colstart = $( this ).jqmData( "colstart" ), hierarchyClass = $cells.not( this ).filter( "thead th" ).length && " ui-table-cell-label-top", text = $(this).text(); if( text !== "" ){ if( hierarchyClass ){ var iteration = parseInt( $( this ).attr( "colspan" ), 10 ), filter = ""; if( iteration ){ filter = "td:nth-child("+ iteration +"n + " + ( colstart ) +")"; } $cells.filter( filter ).prepend( "<b class='" + o.classes.cellLabels + hierarchyClass + "'>" + text + "</b>" ); } else { $cells.prepend( "<b class='" + o.classes.cellLabels + "'>" + text + "</b>" ); } } }); }); })( jQuery ); (function( $, window ) { $.mobile.iosorientationfixEnabled = true; // This fix addresses an iOS bug, so return early if the UA claims it's something else. var ua = navigator.userAgent; if( !( /iPhone|iPad|iPod/.test( navigator.platform ) && /OS [1-5]_[0-9_]* like Mac OS X/i.test( ua ) && ua.indexOf( "AppleWebKit" ) > -1 ) ){ $.mobile.iosorientationfixEnabled = false; return; } var zoom = $.mobile.zoom, evt, x, y, z, aig; function checkTilt( e ) { evt = e.originalEvent; aig = evt.accelerationIncludingGravity; x = Math.abs( aig.x ); y = Math.abs( aig.y ); z = Math.abs( aig.z ); // If portrait orientation and in one of the danger zones if ( !window.orientation && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ) { if ( zoom.enabled ) { zoom.disable(); } } else if ( !zoom.enabled ) { zoom.enable(); } } $.mobile.document.on( "mobileinit", function(){ if( $.mobile.iosorientationfixEnabled ){ $.mobile.window .bind( "orientationchange.iosorientationfix", zoom.enable ) .bind( "devicemotion.iosorientationfix", checkTilt ); } }); }( jQuery, this )); (function( $, window, undefined ) { var $html = $( "html" ), $head = $( "head" ), $window = $.mobile.window; //remove initial build class (only present on first pageshow) function hideRenderingClass() { $html.removeClass( "ui-mobile-rendering" ); } // trigger mobileinit event - useful hook for configuring $.mobile settings before they're used $( window.document ).trigger( "mobileinit" ); // support conditions // if device support condition(s) aren't met, leave things as they are -> a basic, usable experience, // otherwise, proceed with the enhancements if ( !$.mobile.gradeA() ) { return; } // override ajaxEnabled on platforms that have known conflicts with hash history updates // or generally work better browsing in regular http for full page refreshes (BB5, Opera Mini) if ( $.mobile.ajaxBlacklist ) { $.mobile.ajaxEnabled = false; } // Add mobile, initial load "rendering" classes to docEl $html.addClass( "ui-mobile ui-mobile-rendering" ); // This is a fallback. If anything goes wrong (JS errors, etc), or events don't fire, // this ensures the rendering class is removed after 5 seconds, so content is visible and accessible setTimeout( hideRenderingClass, 5000 ); $.extend( $.mobile, { // find and enhance the pages in the dom and transition to the first page. initializePage: function() { // find present pages var path = $.mobile.path, $pages = $( ":jqmData(role='page'), :jqmData(role='dialog')" ), hash = path.stripHash( path.stripQueryParams(path.parseLocation().hash) ), hashPage = document.getElementById( hash ); // if no pages are found, create one with body's inner html if ( !$pages.length ) { $pages = $( "body" ).wrapInner( "<div data-" + $.mobile.ns + "role='page'></div>" ).children( 0 ); } // add dialogs, set data-url attrs $pages.each(function() { var $this = $( this ); // unless the data url is already set set it to the pathname if ( !$this.jqmData( "url" ) ) { $this.attr( "data-" + $.mobile.ns + "url", $this.attr( "id" ) || location.pathname + location.search ); } }); // define first page in dom case one backs out to the directory root (not always the first page visited, but defined as fallback) $.mobile.firstPage = $pages.first(); // define page container $.mobile.pageContainer = $.mobile.firstPage.parent().addClass( "ui-mobile-viewport" ); // alert listeners that the pagecontainer has been determined for binding // to events triggered on it $window.trigger( "pagecontainercreate" ); // cue page loading message $.mobile.showPageLoadingMsg(); //remove initial build class (only present on first pageshow) hideRenderingClass(); // if hashchange listening is disabled, there's no hash deeplink, // the hash is not valid (contains more than one # or does not start with #) // or there is no page with that hash, change to the first page in the DOM // Remember, however, that the hash can also be a path! if ( ! ( $.mobile.hashListeningEnabled && $.mobile.path.isHashValid( location.hash ) && ( $( hashPage ).is( ':jqmData(role="page")' ) || $.mobile.path.isPath( hash ) || hash === $.mobile.dialogHashKey ) ) ) { // Store the initial destination if ( $.mobile.path.isHashValid( location.hash ) ) { $.mobile.urlHistory.initialDst = hash.replace( "#", "" ); } // make sure to set initial popstate state if it exists // so that navigation back to the initial page works properly if( $.event.special.navigate.isPushStateEnabled() ) { $.mobile.navigate.navigator.squash( path.parseLocation().href ); } $.mobile.changePage( $.mobile.firstPage, { transition: "none", reverse: true, changeHash: false, fromHashChange: true }); } else { // trigger hashchange or navigate to squash and record the correct // history entry for an initial hash path if( !$.event.special.navigate.isPushStateEnabled() ) { $window.trigger( "hashchange", [true] ); } else { // TODO figure out how to simplify this interaction with the initial history entry // at the bottom js/navigate/navigate.js $.mobile.navigate.history.stack = []; $.mobile.navigate( $.mobile.path.isPath( location.hash ) ? location.hash : location.href ); } } } }); // initialize events now, after mobileinit has occurred $.mobile.navreadyDeferred.resolve(); // check which scrollTop value should be used by scrolling to 1 immediately at domready // then check what the scroll top is. Android will report 0... others 1 // note that this initial scroll won't hide the address bar. It's just for the check. $(function() { window.scrollTo( 0, 1 ); // if defaultHomeScroll hasn't been set yet, see if scrollTop is 1 // it should be 1 in most browsers, but android treats 1 as 0 (for hiding addr bar) // so if it's 1, use 0 from now on $.mobile.defaultHomeScroll = ( !$.support.scrollTop || $.mobile.window.scrollTop() === 1 ) ? 0 : 1; //dom-ready inits if ( $.mobile.autoInitializePage ) { $.mobile.initializePage(); } // window load event // hide iOS browser chrome on load $window.load( $.mobile.silentScroll ); if ( !$.support.cssPointerEvents ) { // IE and Opera don't support CSS pointer-events: none that we use to disable link-based buttons // by adding the 'ui-disabled' class to them. Using a JavaScript workaround for those browser. // https://github.com/jquery/jquery-mobile/issues/3558 $.mobile.document.delegate( ".ui-disabled", "vclick", function( e ) { e.preventDefault(); e.stopImmediatePropagation(); } ); } }); }( jQuery, this )); }));
examples/todomvc/containers/App.js
mcanthony/redux-devtools
import React, { Component } from 'react'; import TodoApp from './TodoApp'; import { createStore, combineReducers, compose } from 'redux'; import { devTools, persistState } from 'redux-devtools'; import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react'; import { Provider } from 'react-redux'; import * as reducers from '../reducers'; const finalCreateStore = compose( devTools(), persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)) )(createStore); const reducer = combineReducers(reducers); const store = finalCreateStore(reducer); if (module.hot) { module.hot.accept('../reducers', () => store.replaceReducer(combineReducers(require('../reducers'))) ); } export default class App extends Component { render() { return ( <div> <Provider store={store}> {() => <TodoApp /> } </Provider> <DebugPanel top right bottom> <DevTools store={store} monitor={LogMonitor} visibleOnLoad={true} /> </DebugPanel> </div> ); } }
course/format/amd/src/local/content/actions.js
lameze/moodle
// This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Course state actions dispatcher. * * This module captures all data-dispatch links in the course content and dispatch the proper * state mutation, including any confirmation and modal required. * * @module core_courseformat/local/content/actions * @class core_courseformat/local/content/actions * @copyright 2021 Ferran Recio <ferran@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ import {BaseComponent} from 'core/reactive'; import ModalFactory from 'core/modal_factory'; import ModalEvents from 'core/modal_events'; import Templates from 'core/templates'; import {prefetchStrings} from 'core/prefetch'; import {get_string as getString} from 'core/str'; import {getList} from 'core/normalise'; import * as CourseEvents from 'core_course/events'; import Pending from 'core/pending'; import ContentTree from 'core_courseformat/local/courseeditor/contenttree'; // The jQuery module is only used for interacting with Boostrap 4. It can we removed when MDL-79179 is integrated. import jQuery from 'jquery'; // Load global strings. prefetchStrings('core', ['movecoursesection', 'movecoursemodule', 'confirm', 'delete']); export default class extends BaseComponent { /** * Constructor hook. */ create() { // Optional component name for debugging. this.name = 'content_actions'; // Default query selectors. this.selectors = { ACTIONLINK: `[data-action]`, // Move modal selectors. SECTIONLINK: `[data-for='section']`, CMLINK: `[data-for='cm']`, SECTIONNODE: `[data-for='sectionnode']`, MODALTOGGLER: `[data-toggle='collapse']`, ADDSECTION: `[data-action='addSection']`, CONTENTTREE: `#destination-selector`, ACTIONMENU: `.action-menu`, ACTIONMENUTOGGLER: `[data-toggle="dropdown"]`, }; // Component css classes. this.classes = { DISABLED: `disabled`, }; } /** * Initial state ready method. * * @param {Object} state the state data. * */ stateReady(state) { // Delegate dispatch clicks. this.addEventListener( this.element, 'click', this._dispatchClick ); // Check section limit. this._checkSectionlist({state}); // Add an Event listener to recalculate limits it if a section HTML is altered. this.addEventListener( this.element, CourseEvents.sectionRefreshed, () => this._checkSectionlist({state}) ); } /** * Return the component watchers. * * @returns {Array} of watchers */ getWatchers() { return [ // Check section limit. {watch: `course.sectionlist:updated`, handler: this._checkSectionlist}, ]; } _dispatchClick(event) { const target = event.target.closest(this.selectors.ACTIONLINK); if (!target) { return; } if (target.classList.contains(this.classes.DISABLED)) { event.preventDefault(); return; } // Invoke proper method. const methodName = this._actionMethodName(target.dataset.action); if (this[methodName] !== undefined) { this[methodName](target, event); } } _actionMethodName(name) { const requestName = name.charAt(0).toUpperCase() + name.slice(1); return `_request${requestName}`; } /** * Check the section list and disable some options if needed. * * @param {Object} detail the update details. * @param {Object} detail.state the state object. */ _checkSectionlist({state}) { // Disable "add section" actions if the course max sections has been exceeded. this._setAddSectionLocked(state.course.sectionlist.length > state.course.maxsections); } /** * Handle a move section request. * * @param {Element} target the dispatch action element * @param {Event} event the triggered event */ async _requestMoveSection(target, event) { // Check we have an id. const sectionId = target.dataset.id; if (!sectionId) { return; } const sectionInfo = this.reactive.get('section', sectionId); event.preventDefault(); // The section edit menu to refocus on end. const editTools = this._getClosestActionMenuToogler(target); // Collect section information from the state. const exporter = this.reactive.getExporter(); const data = exporter.course(this.reactive.state); // Add the target section id and title. data.sectionid = sectionInfo.id; data.sectiontitle = sectionInfo.title; // Build the modal parameters from the event data. const modalParams = { title: getString('movecoursesection', 'core'), body: Templates.render('core_courseformat/local/content/movesection', data), }; // Create the modal. const modal = await this._modalBodyRenderedPromise(modalParams); const modalBody = getList(modal.getBody())[0]; // Disable current element and section zero. const currentElement = modalBody.querySelector(`${this.selectors.SECTIONLINK}[data-id='${sectionId}']`); this._disableLink(currentElement); const generalSection = modalBody.querySelector(`${this.selectors.SECTIONLINK}[data-number='0']`); this._disableLink(generalSection); // Setup keyboard navigation. new ContentTree( modalBody.querySelector(this.selectors.CONTENTTREE), { SECTION: this.selectors.SECTIONNODE, TOGGLER: this.selectors.MODALTOGGLER, COLLAPSE: this.selectors.MODALTOGGLER, }, true ); // Capture click. modalBody.addEventListener('click', (event) => { const target = event.target; if (!target.matches('a') || target.dataset.for != 'section' || target.dataset.id === undefined) { return; } if (target.getAttribute('aria-disabled')) { return; } event.preventDefault(); this.reactive.dispatch('sectionMove', [sectionId], target.dataset.id); this._destroyModal(modal, editTools); }); } /** * Handle a move cm request. * * @param {Element} target the dispatch action element * @param {Event} event the triggered event */ async _requestMoveCm(target, event) { // Check we have an id. const cmId = target.dataset.id; if (!cmId) { return; } const cmInfo = this.reactive.get('cm', cmId); event.preventDefault(); // The section edit menu to refocus on end. const editTools = this._getClosestActionMenuToogler(target); // Collect section information from the state. const exporter = this.reactive.getExporter(); const data = exporter.course(this.reactive.state); // Add the target cm info. data.cmid = cmInfo.id; data.cmname = cmInfo.name; // Build the modal parameters from the event data. const modalParams = { title: getString('movecoursemodule', 'core'), body: Templates.render('core_courseformat/local/content/movecm', data), }; // Create the modal. const modal = await this._modalBodyRenderedPromise(modalParams); const modalBody = getList(modal.getBody())[0]; // Disable current element. let currentElement = modalBody.querySelector(`${this.selectors.CMLINK}[data-id='${cmId}']`); this._disableLink(currentElement); // Setup keyboard navigation. new ContentTree( modalBody.querySelector(this.selectors.CONTENTTREE), { SECTION: this.selectors.SECTIONNODE, TOGGLER: this.selectors.MODALTOGGLER, COLLAPSE: this.selectors.MODALTOGGLER, ENTER: this.selectors.SECTIONLINK, } ); // Open the cm section node if possible (Bootstrap 4 uses jQuery to interact with collapsibles). // All jQuery int this code can be replaced when MDL-79179 is integrated. const sectionnode = currentElement.closest(this.selectors.SECTIONNODE); const toggler = jQuery(sectionnode).find(this.selectors.MODALTOGGLER); let collapsibleId = toggler.data('target') ?? toggler.attr('href'); if (collapsibleId) { // We cannot be sure we have # in the id element name. collapsibleId = collapsibleId.replace('#', ''); jQuery(`#${collapsibleId}`).collapse('toggle'); } // Capture click. modalBody.addEventListener('click', (event) => { const target = event.target; if (!target.matches('a') || target.dataset.for === undefined || target.dataset.id === undefined) { return; } if (target.getAttribute('aria-disabled')) { return; } event.preventDefault(); // Get draggable data from cm or section to dispatch. let targetSectionId; let targetCmId; if (target.dataset.for == 'cm') { const dropData = exporter.cmDraggableData(this.reactive.state, target.dataset.id); targetSectionId = dropData.sectionid; targetCmId = dropData.nextcmid; } else { const section = this.reactive.get('section', target.dataset.id); targetSectionId = target.dataset.id; targetCmId = section?.cmlist[0]; } this.reactive.dispatch('cmMove', [cmId], targetSectionId, targetCmId); this._destroyModal(modal, editTools); }); } /** * Handle a create section request. * * @param {Element} target the dispatch action element * @param {Event} event the triggered event */ async _requestAddSection(target, event) { event.preventDefault(); this.reactive.dispatch('addSection', target.dataset.id ?? 0); } /** * Handle a delete section request. * * @param {Element} target the dispatch action element * @param {Event} event the triggered event */ async _requestDeleteSection(target, event) { // Check we have an id. const sectionId = target.dataset.id; if (!sectionId) { return; } const sectionInfo = this.reactive.get('section', sectionId); event.preventDefault(); const cmList = sectionInfo.cmlist ?? []; if (cmList.length || sectionInfo.hassummary || sectionInfo.rawtitle) { // We need confirmation if the section has something. const modalParams = { title: getString('confirm', 'core'), body: getString('confirmdeletesection', 'moodle', sectionInfo.title), saveButtonText: getString('delete', 'core'), type: ModalFactory.types.SAVE_CANCEL, }; const modal = await this._modalBodyRenderedPromise(modalParams); modal.getRoot().on( ModalEvents.save, e => { // Stop the default save button behaviour which is to close the modal. e.preventDefault(); modal.destroy(); this.reactive.dispatch('sectionDelete', [sectionId]); } ); return; } else { // We don't need confirmation to delete empty sections. this.reactive.dispatch('sectionDelete', [sectionId]); } } /** * Disable all add sections actions. * * @param {boolean} locked the new locked value. */ _setAddSectionLocked(locked) { const targets = this.getElements(this.selectors.ADDSECTION); targets.forEach(element => { element.classList.toggle(this.classes.DISABLED, locked); this.setElementLocked(element, locked); }); } /** * Replace an element with a copy with a different tag name. * * @param {Element} element the original element */ _disableLink(element) { if (element) { element.style.pointerEvents = 'none'; element.style.userSelect = 'none'; element.classList.add(this.classes.DISABLED); element.setAttribute('aria-disabled', true); element.addEventListener('click', event => event.preventDefault()); } } /** * Render a modal and return a body ready promise. * * @param {object} modalParams the modal params * @return {Promise} the modal body ready promise */ _modalBodyRenderedPromise(modalParams) { return new Promise((resolve, reject) => { ModalFactory.create(modalParams).then((modal) => { modal.setRemoveOnClose(true); // Handle body loading event. modal.getRoot().on(ModalEvents.bodyRendered, () => { resolve(modal); }); // Configure some extra modal params. if (modalParams.saveButtonText !== undefined) { modal.setSaveButtonText(modalParams.saveButtonText); } modal.show(); return; }).catch(() => { reject(`Cannot load modal content`); }); }); } /** * Hide and later destroy a modal. * * Behat will fail if we remove the modal while some boostrap collapse is executing. * * @param {Modal} modal * @param {HTMLElement} element the dom element to focus on. */ _destroyModal(modal, element) { modal.hide(); const pendingDestroy = new Pending(`courseformat/actions:destroyModal`); if (element) { element.focus(); } setTimeout(() =>{ modal.destroy(); pendingDestroy.resolve(); }, 500); } /** * Get the closest actions menu toggler to an action element. * * @param {HTMLElement} element the action link element * @returns {HTMLElement|undefined} */ _getClosestActionMenuToogler(element) { const actionMenu = element.closest(this.selectors.ACTIONMENU); if (!actionMenu) { return undefined; } return actionMenu.querySelector(this.selectors.ACTIONMENUTOGGLER); } }
js/app/signin/handler.js
monetario/web
'use strict'; import React from 'react'; import {Router, Route, Link} from 'react-router' import Reflux from 'reflux'; import Store from './store'; import SignInForm from './components'; var SignInHandler = React.createClass({ mixins: [ Reflux.listenTo(Store, 'onStoreUpdate') ], getInitialState() { var storeData = Store.getDefaultData(); return { validationErrors: storeData.validationErrors }; }, onStoreUpdate(storeData) { if (storeData.validationErrors !== undefined) { this.setState({validationErrors: storeData.validationErrors}); } }, render() { return ( <SignInForm validationErrors={this.state.validationErrors} location={this.props.location} /> ); } }); export default SignInHandler;
src/entry.js
P3trur0/tinyws-client
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, IndexRoute, browserHistory } from "react-router"; import '../css/app.scss'; import NewCompany from "./components/NewCompany"; import CompaniesBox from "./components/CompaniesBox"; import ModifyCompany from "./components/ModifyCompany"; import AddOwners from "./components/AddOwners"; import Layout from "./components/Layout"; const dataContainer = document.getElementById('dataContainer'); ReactDOM.render( <Router history={browserHistory}> <Route path="/" component={Layout}> <IndexRoute component={CompaniesBox}></IndexRoute> <Route path="new" name="new" component={NewCompany}></Route> <Route path="modify" name="modify" component={ModifyCompany}></Route> <Route path="owners" name="owners" component={AddOwners}></Route> </Route> </Router>, dataContainer);
src/components/Close/Close.js
typical000/paveldavydov
import React from 'react' import PropTypes from 'prop-types' import {rotateZ, translate, multiple} from 'css-functions' import injectSheet from '../../utils/jss' import {transition} from '../../utils/css' const styles = (theme) => { const color = theme.text.default const size = 24 const barWeight = 3 return { close: { transition: transition('800ms'), transformOrigin: ['50%', '50%'], width: size, height: size, opacity: 0.7, position: 'relative', }, hovered: { composes: '$close', transform: rotateZ(-180), }, bar: { position: 'absolute', width: '100%', height: barWeight, top: '50%', left: 0, background: color, }, barFirst: { composes: '$bar', transform: multiple(translate(0, '-50%'), rotateZ(45)), }, barSecond: { composes: '$bar', transform: multiple(translate(0, '-50%'), rotateZ(-45)), }, } } /** * Close icon * @param {boolean} is hovered or not * @param {Object} JSS sheet object */ const Close = ({hovered, classes}) => ( <div className={hovered ? classes.hovered : classes.close}> <span className={classes.barFirst} /> <span className={classes.barSecond} /> </div> ) Close.propTypes = { classes: PropTypes.objectOf(PropTypes.string).isRequired, hovered: PropTypes.bool, } export default injectSheet(styles)(Close)
fields/types/relationship/RelationshipColumn.js
riyadhalnur/keystone
import React from 'react'; import ItemsTableCell from '../../../admin/client/components/ItemsTableCell'; import ItemsTableValue from '../../../admin/client/components/ItemsTableValue'; const moreIndicatorStyle = { color: '#bbb', fontSize: '.8rem', fontWeight: 500, marginLeft: 8, }; var RelationshipColumn = React.createClass({ displayName: 'RelationshipColumn', propTypes: { col: React.PropTypes.object, data: React.PropTypes.object, }, renderMany (value) { if (!value || !value.length) return; let refList = this.props.col.field.refList; let items = []; for (let i = 0; i < 3; i++) { if (!value[i]) break; if (i) { items.push(<span key={'comma' + i}>, </span>); } items.push( <ItemsTableValue interior truncate={false} key={'anchor' + i} href={Keystone.adminPath + '/' + refList.path + '/' + value[i].id}> {value[i].name} </ItemsTableValue> ); } if (value.length > 3) { items.push(<span key="more" style={moreIndicatorStyle}>[...{value.length - 3} more]</span>); } return ( <ItemsTableValue field={this.props.col.type}> {items} </ItemsTableValue> ); }, renderValue (value) { if (!value) return; let refList = this.props.col.field.refList; return ( <ItemsTableValue href={Keystone.adminPath + '/' + refList.path + '/' + value.id} padded interior field={this.props.col.type}> {value.name} </ItemsTableValue> ); }, render () { let value = this.props.data.fields[this.props.col.path]; let many = this.props.col.field.many; return ( <ItemsTableCell> {many ? this.renderMany(value) : this.renderValue(value)} </ItemsTableCell> ); } }); module.exports = RelationshipColumn;
docs/app/Examples/elements/Button/Variations/ButtonExampleVerticallyAttached.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Button, Segment } from 'semantic-ui-react' const ButtonExampleVerticallyAttached = () => ( <div> <Button attached='top'>Top</Button> <Segment attached> <img src='http://semantic-ui.com/images/wireframe/paragraph.png' /> </Segment> <Button attached='bottom'>Bottom</Button> </div> ) export default ButtonExampleVerticallyAttached
packages/material-ui/src/Button/Button.js
Kagami/material-ui
// @inheritedComponent ButtonBase import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { componentPropType, chainPropTypes } from '@material-ui/utils'; import withStyles from '../styles/withStyles'; import { fade } from '../styles/colorManipulator'; import ButtonBase from '../ButtonBase'; import { capitalize } from '../utils/helpers'; export const styles = theme => ({ /* Styles applied to the root element. */ root: { lineHeight: 1.75, // To remove with v4. ...theme.typography.button, boxSizing: 'border-box', minWidth: 64, padding: '6px 16px', borderRadius: theme.shape.borderRadius, color: theme.palette.text.primary, transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], { duration: theme.transitions.duration.short, }), '&:hover': { textDecoration: 'none', backgroundColor: fade(theme.palette.text.primary, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent', }, '&$disabled': { backgroundColor: 'transparent', }, }, '&$disabled': { color: theme.palette.action.disabled, }, }, /* Styles applied to the span element that wraps the children. */ label: { width: '100%', // assure the correct width for iOS Safari display: 'inherit', alignItems: 'inherit', justifyContent: 'inherit', }, /* Styles applied to the root element if `variant="text"`. */ text: { padding: '6px 8px', }, /* Styles applied to the root element if `variant="text"` and `color="primary"`. */ textPrimary: { color: theme.palette.primary.main, '&:hover': { backgroundColor: fade(theme.palette.primary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent', }, }, }, /* Styles applied to the root element if `variant="text"` and `color="secondary"`. */ textSecondary: { color: theme.palette.secondary.main, '&:hover': { backgroundColor: fade(theme.palette.secondary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent', }, }, }, /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ flat: {}, /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ flatPrimary: {}, /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ flatSecondary: {}, /* Styles applied to the root element if `variant="outlined"`. */ outlined: { padding: '5px 16px', border: `1px solid ${ theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)' }`, }, /* Styles applied to the root element if `variant="outlined"` and `color="primary"`. */ outlinedPrimary: { color: theme.palette.primary.main, border: `1px solid ${fade(theme.palette.primary.main, 0.5)}`, '&:hover': { border: `1px solid ${theme.palette.primary.main}`, backgroundColor: fade(theme.palette.primary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent', }, }, '&$disabled': { border: `1px solid ${theme.palette.action.disabled}`, }, }, /* Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */ outlinedSecondary: { color: theme.palette.secondary.main, border: `1px solid ${fade(theme.palette.secondary.main, 0.5)}`, '&:hover': { border: `1px solid ${theme.palette.secondary.main}`, backgroundColor: fade(theme.palette.secondary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent', }, }, '&$disabled': { border: `1px solid ${theme.palette.action.disabled}`, }, }, /* Styles applied to the root element if `variant="[contained | fab]"`. */ contained: { color: theme.palette.getContrastText(theme.palette.grey[300]), backgroundColor: theme.palette.grey[300], boxShadow: theme.shadows[2], '&$focusVisible': { boxShadow: theme.shadows[6], }, '&:active': { boxShadow: theme.shadows[8], }, '&$disabled': { color: theme.palette.action.disabled, boxShadow: theme.shadows[0], backgroundColor: theme.palette.action.disabledBackground, }, '&:hover': { backgroundColor: theme.palette.grey.A100, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: theme.palette.grey[300], }, '&$disabled': { backgroundColor: theme.palette.action.disabledBackground, }, }, }, /* Styles applied to the root element if `variant="[contained | fab]"` and `color="primary"`. */ containedPrimary: { color: theme.palette.primary.contrastText, backgroundColor: theme.palette.primary.main, '&:hover': { backgroundColor: theme.palette.primary.dark, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: theme.palette.primary.main, }, }, }, /* Styles applied to the root element if `variant="[contained | fab]"` and `color="secondary"`. */ containedSecondary: { color: theme.palette.secondary.contrastText, backgroundColor: theme.palette.secondary.main, '&:hover': { backgroundColor: theme.palette.secondary.dark, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: theme.palette.secondary.main, }, }, }, /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ raised: {}, // legacy /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ raisedPrimary: {}, // legacy /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ raisedSecondary: {}, // legacy /* Styles applied to the root element if `variant="[fab | extendedFab]"`. */ fab: { borderRadius: '50%', padding: 0, minWidth: 0, width: 56, height: 56, boxShadow: theme.shadows[6], '&:active': { boxShadow: theme.shadows[12], }, }, /* Styles applied to the root element if `variant="extendedFab"`. */ extendedFab: { borderRadius: 48 / 2, padding: '0 16px', width: 'auto', minWidth: 48, height: 48, }, /* Styles applied to the ButtonBase root element if the button is keyboard focused. */ focusVisible: {}, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `color="inherit"`. */ colorInherit: { color: 'inherit', }, /* Styles applied to the root element if `mini={true}` & `variant="[fab | extendedFab]"`. */ mini: { width: 40, height: 40, }, /* Styles applied to the root element if `size="small"`. */ sizeSmall: { padding: '4px 8px', minWidth: 64, fontSize: theme.typography.pxToRem(13), }, /* Styles applied to the root element if `size="large"`. */ sizeLarge: { padding: '8px 24px', fontSize: theme.typography.pxToRem(15), }, /* Styles applied to the root element if `fullWidth={true}`. */ fullWidth: { width: '100%', }, }); function Button(props) { const { children, classes, className: classNameProp, color, disabled, disableFocusRipple, focusVisibleClassName, fullWidth, mini, size, variant, ...other } = props; const fab = variant === 'fab' || variant === 'extendedFab'; const contained = variant === 'contained' || variant === 'raised'; const text = variant === 'text' || variant === 'flat'; const className = classNames( classes.root, { [classes.fab]: fab, [classes.mini]: fab && mini, [classes.extendedFab]: variant === 'extendedFab', [classes.text]: text, [classes.textPrimary]: text && color === 'primary', [classes.textSecondary]: text && color === 'secondary', [classes.flat]: text, [classes.flatPrimary]: text && color === 'primary', [classes.flatSecondary]: text && color === 'secondary', [classes.contained]: contained || fab, [classes.containedPrimary]: (contained || fab) && color === 'primary', [classes.containedSecondary]: (contained || fab) && color === 'secondary', [classes.raised]: contained || fab, [classes.raisedPrimary]: (contained || fab) && color === 'primary', [classes.raisedSecondary]: (contained || fab) && color === 'secondary', [classes.outlined]: variant === 'outlined', [classes.outlinedPrimary]: variant === 'outlined' && color === 'primary', [classes.outlinedSecondary]: variant === 'outlined' && color === 'secondary', [classes[`size${capitalize(size)}`]]: size !== 'medium', [classes.disabled]: disabled, [classes.fullWidth]: fullWidth, [classes.colorInherit]: color === 'inherit', }, classNameProp, ); return ( <ButtonBase className={className} disabled={disabled} focusRipple={!disableFocusRipple} focusVisibleClassName={classNames(classes.focusVisible, focusVisibleClassName)} {...other} > <span className={classes.label}>{children}</span> </ButtonBase> ); } Button.propTypes = { /** * The content of the button. */ children: PropTypes.node.isRequired, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: PropTypes.object.isRequired, /** * @ignore */ className: PropTypes.string, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']), /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: componentPropType, /** * If `true`, the button will be disabled. */ disabled: PropTypes.bool, /** * If `true`, the keyboard focus ripple will be disabled. * `disableRipple` must also be true. */ disableFocusRipple: PropTypes.bool, /** * If `true`, the ripple effect will be disabled. */ disableRipple: PropTypes.bool, /** * @ignore */ focusVisibleClassName: PropTypes.string, /** * If `true`, the button will take up the full width of its container. */ fullWidth: PropTypes.bool, /** * The URL to link to when the button is clicked. * If defined, an `a` element will be used as the root node. */ href: PropTypes.string, /** * If `true`, and `variant` is `'fab'`, will use mini floating action button styling. */ mini: PropTypes.bool, /** * The size of the button. * `small` is equivalent to the dense button styling. */ size: PropTypes.oneOf(['small', 'medium', 'large']), /** * @ignore */ type: PropTypes.string, /** * The variant to use. * __WARNING__: `flat` and `raised` are deprecated. * Instead use `text` and `contained` respectively. * `fab` and `extendedFab` are deprecated. * Instead use `<Fab>` and `<Fab variant="extended">` */ variant: chainPropTypes( PropTypes.oneOf(['text', 'outlined', 'contained', 'fab', 'extendedFab', 'flat', 'raised']), props => { if (props.variant === 'flat') { return new Error( 'Material-UI: the `flat` variant will be removed in the next major release. ' + '`text` is equivalent and should be used instead.', ); } if (props.variant === 'raised') { return new Error( 'Material-UI: the `raised` variant will be removed in the next major release. ' + '`contained` is equivalent and should be used instead.', ); } if (props.variant === 'fab') { return new Error( 'Material-UI: the `fab` variant will be removed in the next major release. ' + 'The `<Fab>` component is equivalent and should be used instead.', ); } if (props.variant === 'extendedFab') { return new Error( 'Material-UI: the `fab` variant will be removed in the next major release. ' + 'The `<Fab>` component with `variant="extended"` is equivalent ' + 'and should be used instead.', ); } return null; }, ), }; Button.defaultProps = { color: 'default', component: 'button', disabled: false, disableFocusRipple: false, fullWidth: false, mini: false, size: 'medium', type: 'button', variant: 'text', }; export default withStyles(styles, { name: 'MuiButton' })(Button);
test/BootstrapMixinSpec.js
albertojacini/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import BootstrapMixin from '../src/BootstrapMixin'; import styleMaps from '../src/styleMaps'; import { shouldWarn } from './helpers'; let Component; describe('BootstrapMixin', () => { beforeEach(() => { Component = React.createClass({ mixins: [BootstrapMixin], render() { return React.DOM.button(this.props); } }); }); describe('#getBsClassSet', () => { it('should return blank', () => { let instance = ReactTestUtils.renderIntoDocument( <Component> content </Component> ); assert.deepEqual(instance.getBsClassSet(), {}); }); it('maps and validates OK default classes', () => { function instanceClassSet(bsClass) { let instance = ReactTestUtils.renderIntoDocument( <Component bsClass={bsClass}> content </Component> ); return instance.getBsClassSet(); } assert.deepEqual(instanceClassSet('column'), {'col': true}); assert.deepEqual(instanceClassSet('button'), {'btn': true}); assert.deepEqual(instanceClassSet('button-group'), {'btn-group': true}); assert.deepEqual(instanceClassSet('label'), {'label': true}); assert.deepEqual(instanceClassSet('alert'), {'alert': true}); assert.deepEqual(instanceClassSet('input-group'), {'input-group': true}); assert.deepEqual(instanceClassSet('form'), {'form': true}); assert.deepEqual(instanceClassSet('panel'), {'panel': true}); }); describe('Predefined Bootstrap styles', () => { it('maps and validates OK default styles', () => { function instanceClassSet(style) { let instance = ReactTestUtils.renderIntoDocument( <Component bsClass='button' bsStyle={style}> content </Component> ); return instance.getBsClassSet(); } assert.deepEqual(instanceClassSet('default'), {'btn': true, 'btn-default': true}); assert.deepEqual(instanceClassSet('primary'), {'btn': true, 'btn-primary': true}); assert.deepEqual(instanceClassSet('success'), {'btn': true, 'btn-success': true}); assert.deepEqual(instanceClassSet('info'), {'btn': true, 'btn-info': true}); assert.deepEqual(instanceClassSet('link'), {'btn': true, 'btn-link': true}); assert.deepEqual(instanceClassSet('inline'), {'btn': true, 'btn-inline': true}); }); }); describe('Sizes', () => { it('maps english words for sizes to bootstrap sizes constants', () => { function instanceClassSet(size) { let instance = ReactTestUtils.renderIntoDocument( <Component bsClass='button' bsSize={size}> content </Component> ); return instance.getBsClassSet(); } assert.deepEqual(instanceClassSet('large'), {'btn': true, 'btn-lg': true}); assert.deepEqual(instanceClassSet('small'), {'btn': true, 'btn-sm': true}); assert.deepEqual(instanceClassSet('medium'), {'btn': true, 'btn-md': true}); assert.deepEqual(instanceClassSet('xsmall'), {'btn': true, 'btn-xs': true}); }); }); describe('Custom styles', () => { it('should validate OK custom styles added via "addStyle()"', () => { styleMaps.addStyle('wacky'); let instance = ReactTestUtils.renderIntoDocument( <Component bsClass='button' bsStyle='wacky'> content </Component> ); assert.deepEqual(instance.getBsClassSet(), {'btn': true, 'btn-wacky': true}); }); it('should allow custom styles as is but with validation warning', () => { let instance = ReactTestUtils.renderIntoDocument( <Component bsClass='button' bsStyle='my-custom-class'> content </Component> ); assert.deepEqual(instance.getBsClassSet(), {'btn': true, 'my-custom-class': true}); shouldWarn('Invalid prop `bsStyle` of value `my-custom-class`'); }); }); }); // todo: fix bad naming describe('#prefixClass', () => { it('allows custom sub-classes', () => { let instance = ReactTestUtils.renderIntoDocument( <Component bsClass='button'> content </Component> ); assert.equal(instance.prefixClass('title'), 'btn-title'); }); }); });
ajax/libs/react/18.0.0-rc.0-next-790b5246f-20220118/cjs/react-jsx-runtime.development.min.js
cdnjs/cdnjs
"use strict";"production"!==process.env.NODE_ENV&&function(){var e=require("react"),p=require("object-assign"),y=60103,a=60106;exports.Fragment=60107;var r,d=60108,m=60114,g=60109,v=60110,b=60112,h=60113,_=60120,k=60115,w=60116,j=60129,O=60130,R=60131,i=60132;"function"==typeof Symbol&&Symbol.for&&(y=(r=Symbol.for)("react.element"),a=r("react.portal"),exports.Fragment=r("react.fragment"),d=r("react.strict_mode"),m=r("react.profiler"),g=r("react.provider"),v=r("react.context"),b=r("react.forward_ref"),h=r("react.suspense"),_=r("react.suspense_list"),k=r("react.memo"),w=r("react.lazy"),r("react.scope"),j=r("react.debug_trace_mode"),O=r("react.offscreen"),R=r("react.legacy_hidden"),i=r("react.cache"));var c="function"==typeof Symbol&&Symbol.iterator;var o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(e){for(var r=arguments.length,t=new Array(1<r?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];!function(e,r,t){var n=o.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(r+="%s",t=t.concat([n]));t=t.map(function(e){return String(e)});t.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,t)}("error",e,t)}var E=!1,x=!1,P=0;function s(e){return e.displayName||"Context"}function T(e){if(null==e)return null;if("number"==typeof e.tag&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case exports.Fragment:return"Fragment";case a:return"Portal";case m:return"Profiler";case d:return"StrictMode";case h:return"Suspense";case _:return"SuspenseList";case i:return"Cache"}if("object"==typeof e)switch(e.$$typeof){case v:return s(e)+".Consumer";case g:return s(e._context)+".Provider";case b:return n=(t=e).render,o="ForwardRef",(t=t.displayName)?t:""!==(n=n.displayName||n.name||"")?o+"("+n+")":o;case k:var r=e.displayName||null;return null!==r?r:T(e.type)||"Memo";case w:o=e._payload,r=e._init;try{return T(r(o))}catch(e){return null}}var t,n,o;return null}"function"==typeof Symbol&&(P=Symbol.for("react.module.reference"));var $,C,F,N,D,I,W,L=0;function U(){}var t,z=o.ReactCurrentDispatcher;function A(e){if(void 0===t)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);t=r&&r[1]||""}return"\n"+t+e}var M=!(U.__reactDisabledLog=!0),Y=new("function"==typeof WeakMap?WeakMap:Map);function l(r,e){if(!r||M)return"";var t,n=Y.get(r);if(void 0!==n)return n;M=!0;var o,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=z.current,z.current=null,0===L&&($=console.log,C=console.info,F=console.warn,N=console.error,D=console.group,I=console.groupCollapsed,W=console.groupEnd,n={configurable:!0,enumerable:!0,value:U,writable:!0},Object.defineProperties(console,{info:n,log:n,warn:n,error:n,group:n,groupCollapsed:n,groupEnd:n})),L++;try{if(e){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){t=e}Reflect.construct(r,[],i)}else{try{i.call()}catch(e){t=e}r.call(i.prototype)}}else{try{throw Error()}catch(e){t=e}r()}}catch(e){if(e&&t&&"string"==typeof e.stack){for(var c=e.stack.split("\n"),s=t.stack.split("\n"),l=c.length-1,u=s.length-1;1<=l&&0<=u&&c[l]!==s[u];)u--;for(;1<=l&&0<=u;l--,u--)if(c[l]!==s[u]){if(1!==l||1!==u)do{if(l--,--u<0||c[l]!==s[u]){var f="\n"+c[l].replace(" at new "," at ");return r.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",r.displayName)),"function"==typeof r&&Y.set(r,f),f}}while(1<=l&&0<=u);break}}}finally{M=!1,z.current=o,0===--L&&(o={configurable:!0,enumerable:!0,writable:!0},Object.defineProperties(console,{log:p({},o,{value:$}),info:p({},o,{value:C}),warn:p({},o,{value:F}),error:p({},o,{value:N}),group:p({},o,{value:D}),groupCollapsed:p({},o,{value:I}),groupEnd:p({},o,{value:W})})),L<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue."),Error.prepareStackTrace=a}a=r?r.displayName||r.name:"",a=a?A(a):"";return"function"==typeof r&&Y.set(r,a),a}function u(e,r,t){if(null==e)return"";if("function"==typeof e)return l(e,!(!(n=(n=e).prototype)||!n.isReactComponent));var n;if("string"==typeof e)return A(e);switch(e){case h:return A("Suspense");case _:return A("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case b:return l(e.render,!1);case k:return u(e.type,r,t);case w:var o=e._payload,a=e._init;try{return u(a(o),r,t)}catch(e){}}return""}var q=Object.prototype.hasOwnProperty,f={},n=o.ReactDebugCurrentFrame;function B(e){var r;e?(r=e._owner,r=u(e.type,e._source,r?r.type:null),n.setExtraStackFrame(r)):n.setExtraStackFrame(null)}var V=Array.isArray;function H(e){return V(e)}function J(e){return function(){try{return}catch(e){return 1}}()&&(S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",(r=e,"function"==typeof Symbol&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object")),""+e);var r}var X,G,K=o.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,r,t,n,o,a,i){return a={$$typeof:y,type:e,key:r,ref:t,props:i,_owner:a,_store:{}},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a}var ee={};function re(e,r,t,n,o){var a,i,c,s,l,u={},f=null,p=null;for(a in void 0!==t&&(J(t),f=""+t),function(e){if(q.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return}return void 0!==e.key}(r)&&(J(r.key),f=""+r.key),function(e){if(q.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return}return void 0!==e.ref}(r)&&(p=r.ref,l=o,"string"==typeof(t=r).ref&&K.current&&l&&K.current.stateNode!==l&&(l=T(K.current.type),ee[l]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(K.current.type),t.ref),ee[l]=!0))),r)q.call(r,a)&&!Q.hasOwnProperty(a)&&(u[a]=r[a]);if(e&&e.defaultProps){var y=e.defaultProps;for(a in y)void 0===u[a]&&(u[a]=y[a])}return(f||p)&&(l="function"==typeof e?e.displayName||e.name||"Unknown":e,f&&(c=u,s=l,m.isReactWarning=!0,Object.defineProperty(c,"key",{get:m,configurable:!0})),p&&(c=u,i=l,d.isReactWarning=!0,Object.defineProperty(c,"ref",{get:d,configurable:!0}))),Z(e,f,p,o,n,K.current,u);function d(){G||(G=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",i))}function m(){X||(X=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))}}var te=o.ReactCurrentOwner,ne=o.ReactDebugCurrentFrame;function oe(e){var r;e?(r=e._owner,r=u(e.type,e._source,r?r.type:null),ne.setExtraStackFrame(r)):ne.setExtraStackFrame(null)}function ae(e){return"object"==typeof e&&null!==e&&e.$$typeof===y}function ie(){if(te.current){var e=T(te.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var ce=!1,se={};function le(e,r){var t;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=r,(r=ie())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),se[t=r]||(se[t]=!0,r="",e&&e._owner&&e._owner!==te.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),oe(e),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,r),oe(null)))}function ue(e,r){if("object"==typeof e)if(H(e))for(var t=0;t<e.length;t++){var n=e[t];ae(n)&&le(n,r)}else if(ae(e))e._store&&(e._store.validated=!0);else if(e){var o=null!==(o=e)&&"object"==typeof o&&"function"==typeof(o=c&&o[c]||o["@@iterator"])?o:null;if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)ae(a.value)&&le(a.value,r)}}function fe(e){var r,t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)r=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==b&&n.$$typeof!==k)return;r=n.propTypes}r?(t=T(n),function(e,r,t,n,o){var a,i=Function.call.bind(q);for(a in e)if(i(e,a)){var c=void 0;try{if("function"!=typeof e[a]){var s=Error((n||"React class")+": "+t+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}c=e[a](r,a,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){c=e}!c||c instanceof Error||(B(o),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,a,typeof c),B(null)),c instanceof Error&&!(c.message in f)&&(f[c.message]=!0,B(o),S("Failed %s type: %s",t,c.message),B(null))}}(r,e.props,"prop",t,e)):void 0===n.PropTypes||ce||(ce=!0,S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")),"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pe(e,r,t,n,o,a){var i,c,s="string"==typeof(l=e)||"function"==typeof l||(!(l!==exports.Fragment&&l!==m&&l!==j&&l!==d&&l!==h&&l!==_&&l!==R&&l!==O&&!x&&!E)||"object"==typeof l&&null!==l&&(l.$$typeof===w||l.$$typeof===k||l.$$typeof===g||l.$$typeof===v||l.$$typeof===b||l.$$typeof===P||void 0!==l.getModuleId));s||(i="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),i+=(void 0===(l=o)?"":"\n\nCheck your code at "+l.fileName.replace(/^.*[\\\/]/,"")+":"+l.lineNumber+".")||ie(),null===e?c="null":H(e)?c="array":void 0!==e&&e.$$typeof===y?(c="<"+(T(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,i));var l,a=re(e,r,t,o,a);if(null==a)return a;if(s){var u=r.children;if(void 0!==u)if(n)if(H(u)){for(var f=0;f<u.length;f++)ue(u[f],e);Object.freeze&&Object.freeze(u)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ue(u,e)}return(e===exports.Fragment?function(e){for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if("children"!==n&&"key"!==n){oe(e),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),oe(null);break}}null!==e.ref&&(oe(e),S("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}:fe)(a),a}e=function(e,r,t){return pe(e,r,t,!0)};exports.jsx=function(e,r,t){return pe(e,r,t,!1)},exports.jsxs=e}();
ajax/libs/react-native-web/0.17.2/cjs/exports/ScrollView/index.min.js
cdnjs/cdnjs
"use strict";exports.__esModule=!0,exports.default=void 0;var _createReactClass=_interopRequireDefault(require("create-react-class")),_dismissKeyboard=_interopRequireDefault(require("../../modules/dismissKeyboard")),_invariant=_interopRequireDefault(require("fbjs/lib/invariant")),_mergeRefs=_interopRequireDefault(require("../../modules/mergeRefs")),_ScrollResponder=_interopRequireDefault(require("../../modules/ScrollResponder")),_ScrollViewBase=_interopRequireDefault(require("./ScrollViewBase")),_StyleSheet=_interopRequireDefault(require("../StyleSheet")),_View=_interopRequireDefault(require("../View")),_react=_interopRequireDefault(require("react"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ownKeys(r,e){var t,o=Object.keys(r);return Object.getOwnPropertySymbols&&(t=Object.getOwnPropertySymbols(r),e&&(t=t.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),o.push.apply(o,t)),o}function _objectSpread(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(t),!0).forEach(function(e){_defineProperty(r,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})}return r}function _defineProperty(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _extends(){return(_extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t,o=arguments[r];for(t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e}).apply(this,arguments)}function _objectWithoutPropertiesLoose(e,r){if(null==e)return{};for(var t,o={},n=Object.keys(e),l=0;l<n.length;l++)t=n[l],0<=r.indexOf(t)||(o[t]=e[t]);return o}var emptyObject={},ScrollView=(0,_createReactClass.default)({displayName:"ScrollView",mixins:[_ScrollResponder.default.Mixin],getInitialState:function(){return this.scrollResponderMixinGetInitialState()},flashScrollIndicators:function(){this.scrollResponderFlashScrollIndicators()},getScrollResponder:function(){return this},getScrollableNode:function(){return this._scrollNodeRef},getInnerViewRef:function(){return this._innerViewRef},getInnerViewNode:function(){return this._innerViewRef},getNativeScrollRef:function(){return this._scrollNodeRef},scrollTo:function(e,r,t){var o;"number"==typeof e?console.warn("`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead."):(r=(o=e||emptyObject).x,e=o.y,t=o.animated),this.getScrollResponder().scrollResponderScrollTo({x:r||0,y:e||0,animated:!1!==t})},scrollToEnd:function(e){var r=!1!==(e&&e.animated),t=this.props.horizontal,o=this.getScrollResponder(),n=o.scrollResponderGetScrollableNode(),e=t?n.scrollWidth:0,n=t?0:n.scrollHeight;o.scrollResponderScrollTo({x:e,y:n,animated:r})},render:function(){var r,e=this.props,t=e.contentContainerStyle,o=e.horizontal,n=e.onContentSizeChange,l=e.refreshControl,s=e.stickyHeaderIndices,i=e.pagingEnabled,e=(e.forwardedRef,e.keyboardDismissMode,e.onScroll,_objectWithoutPropertiesLoose(e,["contentContainerStyle","horizontal","onContentSizeChange","refreshControl","stickyHeaderIndices","pagingEnabled","forwardedRef","keyboardDismissMode","onScroll"]));"production"!==process.env.NODE_ENV&&this.props.style&&(r=_StyleSheet.default.flatten(this.props.style),a=["alignItems","justifyContent"].filter(function(e){return r&&void 0!==r[e]}),(0,_invariant.default)(0===a.length,"ScrollView child layout ("+JSON.stringify(a)+") must be applied through the contentContainerStyle prop."));var a={};n&&(a={onLayout:this._handleContentOnLayout});var c=!o&&Array.isArray(s),n=c||i?_react.default.Children.map(this.props.children,function(e,r){r=c&&-1<s.indexOf(r);return null!=e&&(r||i)?_react.default.createElement(_View.default,{style:_StyleSheet.default.compose(r&&styles.stickyHeader,i&&styles.pagingEnabledChild)},e):e}):this.props.children,n=_react.default.createElement(_View.default,_extends({},a,{children:n,collapsable:!1,ref:this._setInnerViewRef,style:_StyleSheet.default.compose(o&&styles.contentContainerHorizontal,t)})),t=o?styles.baseHorizontal:styles.baseVertical,o=o?styles.pagingEnabledHorizontal:styles.pagingEnabledVertical,t=_objectSpread(_objectSpread({},e),{},{style:[t,i&&o,this.props.style],onTouchStart:this.scrollResponderHandleTouchStart,onTouchMove:this.scrollResponderHandleTouchMove,onTouchEnd:this.scrollResponderHandleTouchEnd,onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this.scrollResponderHandleScrollEndDrag,onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd,onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture,onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder,onScroll:this._handleScroll,onResponderGrant:this.scrollResponderHandleResponderGrant,onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest,onResponderTerminate:this.scrollResponderHandleTerminate,onResponderRelease:this.scrollResponderHandleResponderRelease,onResponderReject:this.scrollResponderHandleResponderReject}),o=_ScrollViewBase.default;(0,_invariant.default)(void 0!==o,"ScrollViewClass must not be undefined");n=_react.default.createElement(o,_extends({},t,{ref:this._setScrollNodeRef}),n);return l?_react.default.cloneElement(l,{style:t.style},n):n},_handleContentOnLayout:function(e){var r=e.nativeEvent.layout,e=r.width,r=r.height;this.props.onContentSizeChange(e,r)},_handleScroll:function(e){"production"!==process.env.NODE_ENV&&this.props.onScroll&&null==this.props.scrollEventThrottle&&console.log("You specified `onScroll` on a <ScrollView> but not `scrollEventThrottle`. You will only receive one event. Using `16` you get all the events but be aware that it may cause frame drops, use a bigger number if you don't need as much precision."),"on-drag"===this.props.keyboardDismissMode&&(0,_dismissKeyboard.default)(),this.scrollResponderHandleScroll(e)},_setInnerViewRef:function(e){this._innerViewRef=e},_setScrollNodeRef:function(e){null!=(this._scrollNodeRef=e)&&(e.getScrollResponder=this.getScrollResponder,e.getInnerViewNode=this.getInnerViewNode,e.getInnerViewRef=this.getInnerViewRef,e.getNativeScrollRef=this.getNativeScrollRef,e.getScrollableNode=this.getScrollableNode,e.scrollTo=this.scrollTo,e.scrollToEnd=this.scrollToEnd,e.flashScrollIndicators=this.flashScrollIndicators,e.scrollResponderZoomTo=this.scrollResponderZoomTo,e.scrollResponderScrollNativeHandleToKeyboard=this.scrollResponderScrollNativeHandleToKeyboard),(0,_mergeRefs.default)(this.props.forwardedRef)(e)}}),commonStyle={flexGrow:1,flexShrink:1,transform:[{translateZ:0}],WebkitOverflowScrolling:"touch"},styles=_StyleSheet.default.create({baseVertical:_objectSpread(_objectSpread({},commonStyle),{},{flexDirection:"column",overflowX:"hidden",overflowY:"auto"}),baseHorizontal:_objectSpread(_objectSpread({},commonStyle),{},{flexDirection:"row",overflowX:"auto",overflowY:"hidden"}),contentContainerHorizontal:{flexDirection:"row"},stickyHeader:{position:"sticky",top:0,zIndex:10},pagingEnabledHorizontal:{scrollSnapType:"x mandatory"},pagingEnabledVertical:{scrollSnapType:"y mandatory"},pagingEnabledChild:{scrollSnapAlign:"start"}}),ForwardedScrollView=_react.default.forwardRef(function(e,r){return _react.default.createElement(ScrollView,_extends({},e,{forwardedRef:r}))});ForwardedScrollView.displayName="ScrollView";var _default=ForwardedScrollView;exports.default=_default,module.exports=exports.default;
src/App.js
talexand/redux-simple-router-test
import React, { Component } from 'react'; import { NICE, SUPER_NICE } from './colors'; class Counter extends Component { constructor(props) { super(props); this.state = { counter: 0 }; this.interval = setInterval(() => this.tick(), 1000); } tick() { this.setState({ counter: this.state.counter + this.props.increment }); } componentWillUnmount() { clearInterval(this.interval); } render() { return ( <h1 style={{ color: this.props.color }}> Counter ({this.props.increment}): {this.state.counter} </h1> ); } } export class App extends Component { render() { return ( <div> <Counter increment={1} color={NICE} /> <Counter increment={5} color={SUPER_NICE} /> </div> ); } }
src/app/components/SearchEngine/SearchEngine.js
harsh376/Hector
// @flow import React from 'react'; import './SearchEngine.scss'; import CustomImage from '../CustomImage/CustomImage'; import searchHome from '../../static/search_home.png'; import searchAutopredict from '../../static/search_autopredict.png'; import searchHistory from '../../static/search_history.png'; import searchSpellcheck from '../../static/search_spellcheck.png'; import searchSummary from '../../static/search_summary.png'; class SearchEngine extends React.Component { static title: string = 'searchEngine'; render() { return ( <div className="search-engine-container"> <div className="search-engine-overview"> <div> <CustomImage src={searchHome} width="500px" height="250px" /> </div> <div> <h4>Overview</h4> <p> During fall of 2016, I took CSC326 (Programming languages). For my course project, I teamed up with Pushkar Bettadpur to create a basic search engine. We wrote the {' '} <a href="https://github.com/harsh376/search-engine-frontend" target="_blank" > frontend </a> {' '} in Bottle (A lightweight Python Web Framework). In order to build the data pipeline for the search engine, we wrote a {' '} <a href="https://github.com/harsh376/crawler" target="_blank"> web crawler </a> {' '} in Python and used Google's Page rank algorithm to rank documents and store them in a SQLite database. We deployed the application using AWS by writing a {' '} <a href="https://github.com/harsh376/crawler/blob/master/deploy.py" target="_blank" > deploy script </a> {' '} that made use of {' '} <code>boto3</code> {' '} module. Here are some of the features that we implemented: {' '} </p> </div> </div> <br /> <div className="search-engine-autopredict"> <h5>Autopredict</h5> <div> <CustomImage src={searchAutopredict} width="300px" height="320px" /> </div> </div> <br /> <br /> <div className="search-engine-history"> <h5>Google sign-on and search history</h5> <div> <CustomImage src={searchHistory} width="500px" height="310px" /> </div> </div> <br /> <br /> <div className="search-engine-spellcheck"> <h5>Spell check</h5> <div> <CustomImage src={searchSpellcheck} width="600px" height="200px" /> </div> </div> <br /> <br /> <div className="search-engine-summary"> <h5>Summaries for each search result</h5> <div> <CustomImage src={searchSummary} width="600px" height="350px" /> </div> </div> <br /> <br /> <div className="search-engine-takeaway"> <h4>Takeaways</h4> <ul> <li> Learnt about the deployment process of an application by having to write {' '} <a href="https://github.com/harsh376/crawler/blob/master/deploy.py" target="_blank" > deploy </a> {' '} and {' '} <a href="https://github.com/harsh376/crawler/blob/master/terminate.py" target="_blank" > shutdown </a> {' '} scripts. </li> <li> Another takeaway was not making any assumptions about incoming data. While writing the crawler, a lot of the times there would be unexpected data and so it was important not to make any assumptions while parsing data. </li> </ul> </div> </div> ); } } export default SearchEngine;
dist/simple-360-player.min.js
gbentaieb/simple-360-player
/* Modernizr 3.0.0pre (Custom Build) | MIT */ (function(p,k){"object"===typeof exports&&"object"===typeof module?module.exports=k():"function"===typeof define&&define.amd?define([],k):"object"===typeof exports?exports.Simple360Player=k():p.Simple360Player=k()})(this,function(){return function(p){function k(n){if(f[n])return f[n].exports;var b=f[n]={exports:{},id:n,loaded:!1};p[n].call(b.exports,b,b.exports,k);b.loaded=!0;return b.exports}var f={};k.m=p;k.c=f;k.p="";return k(0)}([function(p,k,f){function n(a){return a&&a.__esModule?a:{"default":a}} k.__esModule=!0;p=f(93);var b=n(p);p=f(116);var a=n(p),c=f(7);f(174);f(175);f(177);f(178);f(179);f(176);p=f(115);var e=n(p);p=f(197);var d=n(p);f=f(196);var g=n(f);f=function(){function h(a){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");this.container=a;this.md=new e["default"](window.navigator.userAgent);this.isMobile=!!this.md.phone()||!!this.md.tablet()}h.prototype.addMouseObservable=function(){var a=this;this.downEvents$=c.Observable.fromEvent(this.canvasElement, "mousedown");this.upEvents$=c.Observable.fromEvent(document,"mouseup");this.moveEvents$=c.Observable.fromEvent(document,"mousemove");this.mouseObservable$=this.downEvents$.switchMap(function(c){a.mouse={x:c.clientX,y:c.clientY};return a.moveEvents$.startWith(c).takeUntil(a.upEvents$)});this.mouseObserver=this.mouseObservable$.subscribe(function(c){var b=c.clientX-a.mouse.x,e=a.isMobile?0:c.clientY-a.mouse.y;a.mouse={x:c.clientX,y:c.clientY};a.helper360.rotateScene(-b/300,-e/300)});this.upObserver= this.upEvents$.subscribe(function(){a.mouse=null})};h.prototype.addDeviceObservable=function(){var a=this;window.DeviceMotionEvent&&this.isMobile&&(this.device={orientation:screen.orientation.angle},this.deviceMotionEvent$=c.Observable.fromEvent(window,"deviceorientation"),this.deviceChangeEvent$=c.Observable.fromEvent(window,"orientationchange"),this.deviceMotionObserver=this.deviceMotionEvent$.subscribe(function(c){a.helper360.updateOrientationScene(a.device.orientation,c)}),this.deviceChangeObserver= this.deviceChangeEvent$.subscribe(function(){a.device.orientation=screen.orientation.angle}))};h.prototype.init=function(){var c=this.container,c={width:c.offsetWidth,height:c.offsetHeight,ratio:16/9};this.component=a["default"].render(b["default"].createElement(d["default"],null),this.container);this.videoElement=this.component.refs.videoTag;this.canvasElement=this.component.refs.canvasTag;this.helper360=new g["default"](this.canvasElement,this.videoElement,c)};h.prototype.start=function(){this.helper360.createScene(); this.helper360.renderLoop();this.addMouseObservable();this.addDeviceObservable()};h.prototype.updateSize=function(a,c){this.helper360.updateSceneSize(a,c)};h.prototype.destroy=function(){this.mouseObserver&&this.mouseObserver.unsubscribe();this.upObserver&&this.upObserver.unsubscribe();this.deviceMotionObserver&&this.deviceMotionObserver.unsubscribe();this.deviceChangeObserver&&this.deviceChangeObserver.unsubscribe();this.helper360.stopRenderLoop();a["default"].unmountComponentAtNode(this.container)}; return h}();k["default"]=f},function(p,k,f){p.exports=function(f,b,a,c,e,d,g,h){if(!f){if(void 0===b)f=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[a,c,e,d,g,h],m=0;f=Error(b.replace(/%s/g,function(){return l[m++]}));f.name="Invariant Violation"}f.framesToPop=1;throw f;}}},function(p,k,f){k=f(10);p.exports=k},function(p,k){p.exports=function(f,n){if(null==f)throw new TypeError("Object.assign target cannot be null or undefined"); for(var b=Object(f),a=Object.prototype.hasOwnProperty,c=1;c<arguments.length;c++){var e=arguments[c];if(null!=e){var e=Object(e),d;for(d in e)a.call(e,d)&&(b[d]=e[d])}}return b}},function(p,k){var f=!("undefined"===typeof window||!window.document||!window.document.createElement);p.exports={canUseDOM:f,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:f&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:f&&!!window.screen,isInWorker:!f}},function(p,k,f){function n(a){return a? 9===a.nodeType?a.documentElement:a.firstChild:null}function b(a){return(a=n(a))&&M.getID(a)}function a(a){return a&&a.getAttribute&&a.getAttribute(J)||""}function c(c,b){if(c){a(c)!==b?F(!1):void 0;var e=M.findReactContainerForID(b);if(e&&H(e,c))return!0}return!1}function e(a){var b=K[a];if(b&&c(b,a))P=b;else return!1}function d(a,c,b,e,d,g){t.useCreateElement&&(g=G({},g),g[T]=9===b.nodeType?b:b.ownerDocument);c=B.mountComponent(a,c,e,g);a._renderedComponent._topLevelWrapper=a;M._mountImageIntoNode(c, b,d,e)}function g(a,c,b,e,g){var h=C.ReactReconcileTransaction.getPooled(e);h.perform(d,null,a,c,b,h,e,g);C.ReactReconcileTransaction.release(h)}function h(a,c){B.unmountComponent(a);9===c.nodeType&&(c=c.documentElement);for(;c.lastChild;)c.removeChild(c.lastChild)}function l(a){return(a=b(a))?a!==q.getReactRootIDFromNodeID(a):!1}function m(c){for(;c&&c.parentNode!==c;c=c.parentNode)if(1===c.nodeType){var b=a(c);if(b){var b=q.getReactRootIDFromNodeID(b),e=c,d;do if(d=a(e),e=e.parentNode,null==e)return null; while(d!==b);if(e===S[b])return c}}return null}k=f(17);var r=f(25);f(12);var t=f(72),w=f(6),u=f(79),q=f(18),v=f(22),x=f(82),z=f(8),B=f(15),A=f(42),C=f(9),G=f(3),D=f(19),H=f(60),E=f(49),F=f(1),I=f(32),O=f(52);f(54);f(2);var J=k.ID_ATTRIBUTE_NAME,K={},T="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),U={},S={},L=[],P=null,Q=function(){};Q.prototype.isReactComponent={};Q.prototype.render=function(){return this.props};var M={TopLevelWrapper:Q,_instancesByReactRootID:U,scrollMonitor:function(a, c){c()},_updateRootComponent:function(a,c,b,e){M.scrollMonitor(b,function(){A.enqueueElementInternal(a,c);e&&A.enqueueCallbackInternal(a,e)});return a},_registerComponent:function(a,c){!c||1!==c.nodeType&&9!==c.nodeType&&11!==c.nodeType?F(!1):void 0;r.ensureScrollValueMonitoring();var b=M.registerContainer(c);U[b]=a;return b},_renderNewRootComponent:function(a,c,b,e){void 0;a=E(a,null);var d=M._registerComponent(a,c);C.batchedUpdates(g,a,d,c,b,e);return a},renderSubtreeIntoContainer:function(a,c, b,e){null==a||null==a._reactInternalInstance?F(!1):void 0;return M._renderSubtreeIntoContainer(a,c,b,e)},_renderSubtreeIntoContainer:function(c,e,d,g){w.isValidElement(e)?void 0:F(!1);void 0;var h=new w(Q,null,null,null,null,null,e),m=U[b(d)];if(m){if(O(m._currentElement.props,e)){var r=m._renderedComponent.getPublicInstance();M._updateRootComponent(m,h,d,g&&function(){g.call(r)});return r}M.unmountComponentAtNode(d)}e=(e=n(d))&&!!a(e);var f=l(d);c=M._renderNewRootComponent(h,d,e&&!m&&!f,null!=c? c._reactInternalInstance._processChildContext(c._reactInternalInstance._context):D)._renderedComponent.getPublicInstance();g&&g.call(c);return c},render:function(a,c,b){return M._renderSubtreeIntoContainer(null,a,c,b)},registerContainer:function(a){var c=b(a);c&&(c=q.getReactRootIDFromNodeID(c));c||(c=q.createReactRootID());S[c]=a;return c},unmountComponentAtNode:function(c){void 0;!c||1!==c.nodeType&&9!==c.nodeType&&11!==c.nodeType?F(!1):void 0;var e=b(c),d=U[e];if(!d)return l(c),(c=a(c))&&q.getReactRootIDFromNodeID(c), !1;C.batchedUpdates(h,d,c);delete U[e];delete S[e];return!0},findReactContainerForID:function(a){a=q.getReactRootIDFromNodeID(a);return S[a]},findReactNodeByID:function(a){var c=M.findReactContainerForID(a);return M.findComponentRoot(c,a)},getFirstReactDOM:function(a){return m(a)},findComponentRoot:function(a,c){var b=0;P=null;q.traverseAncestors(c,e);var d=P;P=null;L[0]=(d||a).firstChild;for(L.length=1;b<L.length;){for(var d=L[b++],g;d;){var h=M.getID(d);h?c===h?g=d:q.isAncestorIDOf(h,c)&&(L.length= b=0,L.push(d.firstChild)):L.push(d.firstChild);d=d.nextSibling}if(g)return L.length=0,g}L.length=0;F(!1)},_mountImageIntoNode:function(a,c,b,e){!c||1!==c.nodeType&&9!==c.nodeType&&11!==c.nodeType?F(!1):void 0;if(b){var d=n(c);if(x.canReuseMarkup(a,d))return;var g=d.getAttribute(x.CHECKSUM_ATTR_NAME);d.removeAttribute(x.CHECKSUM_ATTR_NAME);b=d.outerHTML;d.setAttribute(x.CHECKSUM_ATTR_NAME,g);a:{d=Math.min(a.length,b.length);for(g=0;g<d;g++)if(a.charAt(g)!==b.charAt(g)){d=g;break a}d=a.length===b.length? -1:d}a.substring(d-20,d+20);b.substring(d-20,d+20);9===c.nodeType?F(!1):void 0}9===c.nodeType?F(!1):void 0;if(e.useCreateElement){for(;c.lastChild;)c.removeChild(c.lastChild);c.appendChild(a)}else I(c,a)},ownerDocumentContextKey:T,getReactRootID:b,getID:function(b){var e=a(b);if(e)if(K.hasOwnProperty(e)){var d=K[e];d!==b&&(c(d,e)?F(!1):void 0,K[e]=b)}else K[e]=b;return e},setID:function(c,b){var e=a(c);e!==b&&delete K[e];c.setAttribute(J,b);K[b]=c},getNode:function(a){K.hasOwnProperty(a)&&c(K[a], a)||(K[a]=M.findReactNodeByID(a));return K[a]},getNodeFromInstance:function(a){a=v.get(a)._rootNodeID;if(u.isNullComponentID(a))return null;K.hasOwnProperty(a)&&c(K[a],a)||(K[a]=M.findReactNodeByID(a));return K[a]},isValid:c,purgeID:function(a){delete K[a]}};z.measureMethods(M,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"});p.exports=M},function(p,k,f){var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}: function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},b=f(12),a=f(3);f(30);var c="function"===typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,e={key:!0,ref:!0,__self:!0,__source:!0},d=function(a,b,e,d,r,f,w){return{$$typeof:c,type:a,key:b,ref:e,props:w,_owner:f}};d.createElement=function(a,c,l){var m,r={},f=null,w=null,u=null,q=null;if(null!=c)for(m in w=void 0===c.ref?null:c.ref,f=void 0===c.key?null:""+c.key,u=void 0===c.__self?null:c.__self, q=void 0===c.__source?null:c.__source,c)c.hasOwnProperty(m)&&!e.hasOwnProperty(m)&&(r[m]=c[m]);var v=arguments.length-2;if(1===v)r.children=l;else if(1<v){for(var x=Array(v),n=0;n<v;n++)x[n]=arguments[n+2];r.children=x}if(a&&a.defaultProps)for(m in v=a.defaultProps,v)"undefined"===typeof r[m]&&(r[m]=v[m]);return d(a,f,w,u,q,b.current,r)};d.createFactory=function(a){var c=d.createElement.bind(null,a);c.type=a;return c};d.cloneAndReplaceKey=function(a,c){return d(a.type,c,a.ref,a._self,a._source,a._owner, a.props)};d.cloneAndReplaceProps=function(a,c){return d(a.type,a.key,a.ref,a._self,a._source,a._owner,c)};d.cloneElement=function(c,h,l){var m,r=a({},c.props),f=c.key,w=c.ref,u=c._self,q=c._source,v=c._owner;if(null!=h)for(m in void 0!==h.ref&&(w=h.ref,v=b.current),void 0!==h.key&&(f=""+h.key),h)h.hasOwnProperty(m)&&!e.hasOwnProperty(m)&&(r[m]=h[m]);m=arguments.length-2;if(1===m)r.children=l;else if(1<m){for(var x=Array(m),n=0;n<m;n++)x[n]=arguments[n+2];r.children=x}return d(c.type,f,w,u,q,v,r)}; d.isValidElement=function(a){return"object"===("undefined"===typeof a?"undefined":n(a))&&null!==a&&a.$$typeof===c};p.exports=d},function(p,k,f){var n=f(35),b=f(192),a=f(102);p=function(){function c(a){this._isScalar=!1;a&&(this._subscribe=a)}c.prototype.lift=function(a){var b=new c;b.source=this;b.operator=a;return b};c.prototype.subscribe=function(a,c,g){var h=this.operator;a=b.toSubscriber(a,c,g);h?h.call(a,this):a.add(this._subscribe(a));if(a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue; return a};c.prototype.forEach=function(a,c){var b=this;c||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?c=n.root.Rx.config.Promise:n.root.Promise&&(c=n.root.Promise));if(!c)throw Error("no Promise impl found");return new c(function(c,d){var m=b.subscribe(function(c){if(m)try{a(c)}catch(b){d(b),m.unsubscribe()}else a(c)},d,c)})};c.prototype._subscribe=function(a){return this.source.subscribe(a)};c.prototype[a]=function(){return this};c.create=function(a){return new c(a)};return c}();k.Observable= p},function(p,k,f){var n={enableMeasure:!1,storedMeasure:function(b,a,c){return c},measureMethods:function(b,a,c){},measure:function(b,a,c){return c},injection:{injectMeasure:function(b){n.storedMeasure=b}}};p.exports=n},function(p,k,f){function n(){z.ReactReconcileTransaction&&q?void 0:r(!1)}function b(){this.reinitializeTransaction();this.dirtyComponentsLength=null;this.callbackQueue=d.getPooled();this.reconcileTransaction=z.ReactReconcileTransaction.getPooled(!1)}function a(a,c){return a._mountOrder- c._mountOrder}function c(c){var b=c.dirtyComponentsLength;b!==t.length?r(!1):void 0;t.sort(a);for(var e=0;e<b;e++){var d=t[e],g=d._pendingCallbacks;d._pendingCallbacks=null;h.performUpdateIfNecessary(d,c.reconcileTransaction);if(g)for(var l=0;l<g.length;l++)c.callbackQueue.enqueue(g[l],d.getPublicInstance())}}function e(a){n();q.isBatchingUpdates?t.push(a):q.batchedUpdates(e,a)}var d=f(36);k=f(14);var g=f(8),h=f(15),l=f(29),m=f(3),r=f(1),t=[],w=d.getPooled(),u=!1,q=null,v=[{initialize:function(){this.dirtyComponentsLength= t.length},close:function(){this.dirtyComponentsLength!==t.length?(t.splice(0,this.dirtyComponentsLength),x()):t.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];m(b.prototype,l.Mixin,{getTransactionWrappers:function(){return v},destructor:function(){this.dirtyComponentsLength=null;d.release(this.callbackQueue);this.callbackQueue=null;z.ReactReconcileTransaction.release(this.reconcileTransaction);this.reconcileTransaction=null},perform:function(a, c,b){return l.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,a,c,b)}});k.addPoolingTo(b);var x=function(){for(;t.length||u;){if(t.length){var a=b.getPooled();a.perform(c,null,a);b.release(a)}u&&(u=!1,a=w,w=d.getPooled(),a.notifyAll(),d.release(a))}},x=g.measure("ReactUpdates","flushBatchedUpdates",x),z={ReactReconcileTransaction:null,batchedUpdates:function(a,c,b,e,d,g){n();q.batchedUpdates(a,c,b,e,d,g)},enqueueUpdate:e,flushBatchedUpdates:x,injection:{injectReconcileTransaction:function(a){a? void 0:r(!1);z.ReactReconcileTransaction=a},injectBatchingStrategy:function(a){a?void 0:r(!1);"function"!==typeof a.batchedUpdates?r(!1):void 0;"boolean"!==typeof a.isBatchingUpdates?r(!1):void 0;q=a}},asap:function(a,c){q.isBatchingUpdates?void 0:r(!1);w.enqueue(a,c);u=!0}};p.exports=z},function(p,k){function f(b){return function(){return b}}function n(){}n.thatReturns=f;n.thatReturnsFalse=f(!1);n.thatReturnsTrue=f(!0);n.thatReturnsNull=f(null);n.thatReturnsThis=function(){return this};n.thatReturnsArgument= function(b){return b};p.exports=n},function(p,k,f){k=f(24);f=k({bubbled:null,captured:null});k={topLevelTypes:k({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null, topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null, topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),PropagationPhases:f};p.exports=k},function(p,k){p.exports={current:null}},function(p,k){p.exports=function(f){for(var n in f)if(f.hasOwnProperty(n))return n;return null}},function(p,k,f){var n=f(1),b=function(a){if(this.instancePool.length){var b=this.instancePool.pop();this.call(b,a);return b}return new this(a)},a=function(a){a instanceof this?void 0:n(!1);a.destructor();this.instancePool.length<this.poolSize&&this.instancePool.push(a)};p.exports={addPoolingTo:function(c,e){c.instancePool=[];c.getPooled=e||b;c.poolSize||(c.poolSize=10);c.release=a;return c},oneArgumentPooler:b,twoArgumentPooler:function(a,b){if(this.instancePool.length){var d=this.instancePool.pop();this.call(d,a,b);return d}return new this(a,b)},threeArgumentPooler:function(a,b,d){if(this.instancePool.length){var g=this.instancePool.pop();this.call(g,a,b,d);return g}return new this(a, b,d)},fourArgumentPooler:function(a,b,d,g){if(this.instancePool.length){var h=this.instancePool.pop();this.call(h,a,b,d,g);return h}return new this(a,b,d,g)},fiveArgumentPooler:function(a,b,d,g,h){if(this.instancePool.length){var l=this.instancePool.pop();this.call(l,a,b,d,g,h);return l}return new this(a,b,d,g,h)}}},function(p,k,f){function n(){b.attachRefs(this,this._currentElement)}var b=f(147);p.exports={mountComponent:function(a,c,b,d){c=a.mountComponent(c,b,d);a._currentElement&&null!=a._currentElement.ref&& b.getReactMountReady().enqueue(n,a);return c},unmountComponent:function(a){b.detachRefs(a,a._currentElement);a.unmountComponent()},receiveComponent:function(a,c,e,d){var g=a._currentElement;if(c!==g||d!==a._context){var h=b.shouldUpdateRefs(g,c);h&&b.detachRefs(a,g);a.receiveComponent(c,e,d);h&&a._currentElement&&null!=a._currentElement.ref&&e.getReactMountReady().enqueue(n,a)}},performUpdateIfNecessary:function(a,c){a.performUpdateIfNecessary(c)}}},function(p,k,f){function n(a,b,g,h){this.dispatchConfig= a;this.dispatchMarker=b;this.nativeEvent=g;a=this.constructor.Interface;for(var l in a)a.hasOwnProperty(l)&&((b=a[l])?this[l]=b(g):"target"===l?this.target=h:this[l]=g[l]);this.isDefaultPrevented=(null!=g.defaultPrevented?g.defaultPrevented:!1===g.returnValue)?c.thatReturnsTrue:c.thatReturnsFalse;this.isPropagationStopped=c.thatReturnsFalse}var b=f(14),a=f(3),c=f(10);f(2);k={type:null,target:null,currentTarget:c.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp|| Date.now()},defaultPrevented:null,isTrusted:null};a(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1,this.isDefaultPrevented=c.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,this.isPropagationStopped=c.thatReturnsTrue)},persist:function(){this.isPersistent=c.thatReturnsTrue},isPersistent:c.thatReturnsFalse,destructor:function(){var a= this.constructor.Interface,c;for(c in a)this[c]=null;this.nativeEvent=this.dispatchMarker=this.dispatchConfig=null}});n.Interface=k;n.augmentClass=function(c,d){var g=Object.create(this.prototype);a(g,c.prototype);c.prototype=g;c.prototype.constructor=c;c.Interface=a({},this.Interface,d);c.augmentClass=this.augmentClass;b.addPoolingTo(c,b.fourArgumentPooler)};b.addPoolingTo(n,b.fourArgumentPooler);p.exports=n},function(p,k,f){function n(a,c){return(a&c)===c}var b=f(1),a={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2, HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(c){var g=a,h=c.Properties||{},l=c.DOMAttributeNamespaces||{},m=c.DOMAttributeNames||{},r=c.DOMPropertyNames||{},f=c.DOMMutationMethods||{};c.isCustomAttribute&&e._isCustomAttributeFunctions.push(c.isCustomAttribute);for(var w in h){e.properties.hasOwnProperty(w)?b(!1):void 0;c=w.toLowerCase();var u=h[w];c={attributeName:c,attributeNamespace:null, propertyName:w,mutationMethod:null,mustUseAttribute:n(u,g.MUST_USE_ATTRIBUTE),mustUseProperty:n(u,g.MUST_USE_PROPERTY),hasSideEffects:n(u,g.HAS_SIDE_EFFECTS),hasBooleanValue:n(u,g.HAS_BOOLEAN_VALUE),hasNumericValue:n(u,g.HAS_NUMERIC_VALUE),hasPositiveNumericValue:n(u,g.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:n(u,g.HAS_OVERLOADED_BOOLEAN_VALUE)};c.mustUseAttribute&&c.mustUseProperty?b(!1):void 0;!c.mustUseProperty&&c.hasSideEffects?b(!1):void 0;1>=c.hasBooleanValue+c.hasNumericValue+ c.hasOverloadedBooleanValue?void 0:b(!1);m.hasOwnProperty(w)&&(c.attributeName=m[w]);l.hasOwnProperty(w)&&(c.attributeNamespace=l[w]);r.hasOwnProperty(w)&&(c.propertyName=r[w]);f.hasOwnProperty(w)&&(c.mutationMethod=f[w]);e.properties[w]=c}}},c={},e={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(a){for(var c=0;c<e._isCustomAttributeFunctions.length;c++)if((0,e._isCustomAttributeFunctions[c])(a))return!0;return!1}, getDefaultValueForProperty:function(a,b){var e=c[a],l;e||(c[a]=e={});b in e||(l=document.createElement(a),e[b]=l[b]);return e[b]},injection:a};p.exports=e},function(p,k,f){function n(a,c){return"."===a.charAt(c)||c===a.length}function b(a){return""===a||"."===a.charAt(0)&&"."!==a.charAt(a.length-1)}function a(a,c){return 0===c.indexOf(a)&&n(c,a.length)}function c(a){return a?a.substr(0,a.lastIndexOf(".")):""}function e(c,e){b(c)&&b(e)?void 0:l(!1);a(c,e)?void 0:l(!1);if(c===e)return c;var d;for(d= c.length+1;d<e.length&&!n(e,d);d++);return e.substr(0,d)}function d(a,c){var e=Math.min(a.length,c.length);if(0===e)return"";for(var d=0,g=0;g<=e;g++)if(n(a,g)&&n(c,g))d=g;else if(a.charAt(g)!==c.charAt(g))break;e=a.substr(0,d);b(e)?void 0:l(!1);return e}function g(b,d,g,h,f,q){b=b||"";d=d||"";b===d?l(!1):void 0;var v=a(d,b);v||a(b,d)?void 0:l(!1);for(var x=0,n=v?c:e,k=b;;k=n(k,d)){var A;f&&k===b||q&&k===d||(A=g(k,v,h));if(!1===A||k===d)break;1E4>x++?void 0:l(!1)}}var h=f(87),l=f(1);p.exports={createReactRootID:function(){return"."+ h.createReactRootIndex().toString(36)},createReactID:function(a,c){return a+c},getReactRootIDFromNodeID:function(a){if(a&&"."===a.charAt(0)&&1<a.length){var c=a.indexOf(".",1);return-1<c?a.substr(0,c):a}return null},traverseEnterLeave:function(a,c,b,e,h){var l=d(a,c);l!==a&&g(a,l,b,e,!1,!0);l!==c&&g(l,c,b,h,!0,!1)},traverseTwoPhase:function(a,c,b){a&&(g("",a,c,b,!0,!1),g(a,"",c,b,!1,!0))},traverseTwoPhaseSkipTarget:function(a,c,b){a&&(g("",a,c,b,!0,!0),g(a,"",c,b,!0,!0))},traverseAncestors:function(a, c,b){g("",a,c,b,!0,!1)},getFirstCommonAncestorID:d,_getNextDescendantID:e,isAncestorIDOf:a,SEPARATOR:"."}},function(p,k,f){p.exports={}},function(p,k,f){var n=f(67),b=f(125),a=f(80),c=f(89),e=f(90),d=f(1);f(2);var g={},h=null,l=function(a,c){a&&(b.executeDispatchesInOrder(a,c),a.isPersistent()||a.constructor.release(a))},m=function(a){return l(a,!0)},r=function(a){return l(a,!1)},t=null;p.exports={injection:{injectMount:b.injection.injectMount,injectInstanceHandle:function(a){t=a},getInstanceHandle:function(){return t}, injectEventPluginOrder:n.injectEventPluginOrder,injectEventPluginsByName:n.injectEventPluginsByName},eventNameDispatchConfigs:n.eventNameDispatchConfigs,registrationNameModules:n.registrationNameModules,putListener:function(a,c,b){"function"!==typeof b?d(!1):void 0;(g[c]||(g[c]={}))[a]=b;var e=n.registrationNameModules[c];e&&e.didPutListener&&e.didPutListener(a,c,b)},getListener:function(a,c){var b=g[c];return b&&b[a]},deleteListener:function(a,c){var b=n.registrationNameModules[c];b&&b.willDeleteListener&& b.willDeleteListener(a,c);(b=g[c])&&delete b[a]},deleteAllListeners:function(a){for(var c in g)if(g[c][a]){var b=n.registrationNameModules[c];b&&b.willDeleteListener&&b.willDeleteListener(a,c);delete g[c][a]}},extractEvents:function(a,b,e,d,g){for(var h,l=n.plugins,m=0;m<l.length;m++){var r=l[m];r&&(r=r.extractEvents(a,b,e,d,g))&&(h=c(h,r))}return h},enqueueEvents:function(a){a&&(h=c(h,a))},processEventQueue:function(c){var b=h;h=null;c?e(b,m):e(b,r);h?d(!1):void 0;a.rethrowCaughtError()},__purge:function(){g= {}},__getListenerBank:function(){return g}}},function(p,k,f){function n(a,c,b){if(c=m(a,b.dispatchConfig.phasedRegistrationNames[c?l.bubbled:l.captured]))b._dispatchListeners=g(b._dispatchListeners,c),b._dispatchIDs=g(b._dispatchIDs,a)}function b(a){a&&a.dispatchConfig.phasedRegistrationNames&&d.injection.getInstanceHandle().traverseTwoPhase(a.dispatchMarker,n,a)}function a(a){a&&a.dispatchConfig.phasedRegistrationNames&&d.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(a.dispatchMarker, n,a)}function c(a,c,b){b&&b.dispatchConfig.registrationName&&(c=m(a,b.dispatchConfig.registrationName))&&(b._dispatchListeners=g(b._dispatchListeners,c),b._dispatchIDs=g(b._dispatchIDs,a))}function e(a){a&&a.dispatchConfig.registrationName&&c(a.dispatchMarker,null,a)}k=f(11);var d=f(20);f(2);var g=f(89),h=f(90),l=k.PropagationPhases,m=d.getListener;p.exports={accumulateTwoPhaseDispatches:function(a){h(a,b)},accumulateTwoPhaseDispatchesSkipTarget:function(c){h(c,a)},accumulateDirectDispatches:function(a){h(a, e)},accumulateEnterLeaveDispatches:function(a,b,e,g){d.injection.getInstanceHandle().traverseEnterLeave(e,g,c,a,b)}}},function(p,k){p.exports={remove:function(f){f._reactInternalInstance=void 0},get:function(f){return f._reactInternalInstance},has:function(f){return void 0!==f._reactInternalInstance},set:function(f,n){f._reactInternalInstance=n}}},function(p,k,f){function n(a,e,d,g){b.call(this,a,e,d,g)}var b=f(16),a=f(47);b.augmentClass(n,{view:function(c){if(c.view)return c.view;c=a(c);return null!= c&&c.window===c?c:(c=c.ownerDocument)?c.defaultView||c.parentWindow:window},detail:function(a){return a.detail||0}});p.exports=n},function(p,k,f){var n=f(1);p.exports=function(b){var a={},c;b instanceof Object&&!Array.isArray(b)?void 0:n(!1);for(c in b)b.hasOwnProperty(c)&&(a[c]=c);return a}},function(p,k,f){var n=f(11);k=f(20);var b=f(67),a=f(140),c=f(8),e=f(88),d=f(3),g=f(50),h={},l=!1,m=0,r={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change", topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error", topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange", topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},t="_reactListenersID"+String(Math.random()).slice(2),w=d({},a,{ReactEventListener:null,injection:{injectReactEventListener:function(a){a.setHandleTopLevel(w.handleTopLevel);w.ReactEventListener=a}},setEnabled:function(a){w.ReactEventListener&& w.ReactEventListener.setEnabled(a)},isEnabled:function(){return!(!w.ReactEventListener||!w.ReactEventListener.isEnabled())},listenTo:function(a,c){var e;Object.prototype.hasOwnProperty.call(c,t)||(c[t]=m++,h[c[t]]={});e=h[c[t]];for(var d=b.registrationNameDependencies[a],l=n.topLevelTypes,f=0;f<d.length;f++){var k=d[f];e.hasOwnProperty(k)&&e[k]||(k===l.topWheel?g("wheel")?w.ReactEventListener.trapBubbledEvent(l.topWheel,"wheel",c):g("mousewheel")?w.ReactEventListener.trapBubbledEvent(l.topWheel,"mousewheel", c):w.ReactEventListener.trapBubbledEvent(l.topWheel,"DOMMouseScroll",c):k===l.topScroll?g("scroll",!0)?w.ReactEventListener.trapCapturedEvent(l.topScroll,"scroll",c):w.ReactEventListener.trapBubbledEvent(l.topScroll,"scroll",w.ReactEventListener.WINDOW_HANDLE):k===l.topFocus||k===l.topBlur?(g("focus",!0)?(w.ReactEventListener.trapCapturedEvent(l.topFocus,"focus",c),w.ReactEventListener.trapCapturedEvent(l.topBlur,"blur",c)):g("focusin")&&(w.ReactEventListener.trapBubbledEvent(l.topFocus,"focusin", c),w.ReactEventListener.trapBubbledEvent(l.topBlur,"focusout",c)),e[l.topBlur]=!0,e[l.topFocus]=!0):r.hasOwnProperty(k)&&w.ReactEventListener.trapBubbledEvent(k,r[k],c),e[k]=!0)}},trapBubbledEvent:function(a,c,b){return w.ReactEventListener.trapBubbledEvent(a,c,b)},trapCapturedEvent:function(a,c,b){return w.ReactEventListener.trapCapturedEvent(a,c,b)},ensureScrollValueMonitoring:function(){l||(w.ReactEventListener.monitorScrollValue(e.refreshScrollValues),l=!0)},eventNameDispatchConfigs:k.eventNameDispatchConfigs, registrationNameModules:k.registrationNameModules,putListener:k.putListener,getListener:k.getListener,deleteListener:k.deleteListener,deleteAllListeners:k.deleteAllListeners});c.measureMethods(w,"ReactBrowserEventEmitter",{putListener:"putListener",deleteListener:"deleteListener"});p.exports=w},function(p,k,f){p.exports={}},function(p,k,f){k=f(24)({prop:null,context:null,childContext:null});p.exports=k},function(p,k,f){function n(a,e,d,g){b.call(this,a,e,d,g)}var b=f(23),a=f(88);k={screenX:null,screenY:null, clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:f(46),button:function(a){var b=a.button;return"which"in a?b:2===b?2:4===b?1:0},buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},pageX:function(c){return"pageX"in c?c.pageX:c.clientX+a.currentScrollLeft},pageY:function(c){return"pageY"in c?c.pageY:c.clientY+a.currentScrollTop}};b.augmentClass(n,k);p.exports=n},function(p,k,f){var n=f(1), b={Mixin:{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(a,c,b,d,g,h,l,m){this.isInTransaction()?n(!1):void 0;var r,f;try{r=this._isInTransaction=!0,this.initializeAll(0),f=a.call(c,b,d,g,h,l,m),r=!1}finally{try{if(r)try{this.closeAll(0)}catch(w){}else this.closeAll(0)}finally{this._isInTransaction= !1}}return f},initializeAll:function(a){for(var c=this.transactionWrappers;a<c.length;a++){var e=c[a];try{this.wrapperInitData[a]=b.OBSERVED_ERROR,this.wrapperInitData[a]=e.initialize?e.initialize.call(this):null}finally{if(this.wrapperInitData[a]===b.OBSERVED_ERROR)try{this.initializeAll(a+1)}catch(d){}}}},closeAll:function(a){this.isInTransaction()?void 0:n(!1);for(var c=this.transactionWrappers;a<c.length;a++){var e=c[a],d=this.wrapperInitData[a],g;try{g=!0,d!==b.OBSERVED_ERROR&&e.close&&e.close.call(this, d),g=!1}finally{if(g)try{this.closeAll(a+1)}catch(h){}}}this.wrapperInitData.length=0}},OBSERVED_ERROR:{}};p.exports=b},function(p,k,f){p.exports=!1},function(p,k){function f(a){return n[a]}var n={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},b=/[&><"']/g;p.exports=function(a){return(""+a).replace(b,f)}},function(p,k,f){f=f(4);var n=/^[ \r\n\t\f]/,b=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;k=function(a,c){a.innerHTML=c};"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction&& (k=function(a,c){MSApp.execUnsafeLocalFunction(function(){a.innerHTML=c})});f.canUseDOM&&(f=document.createElement("div"),f.innerHTML=" ",""===f.innerHTML&&(k=function(a,c){a.parentNode&&a.parentNode.replaceChild(a,a);if(n.test(c)||"<"===c[0]&&b.test(c)){a.innerHTML=String.fromCharCode(65279)+c;var e=a.firstChild;1===e.data.length?a.removeChild(e):e.deleteData(0,1)}else a.innerHTML=c}));p.exports=k},function(p,k,f){var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}: function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},b=function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)},a=f(100);p=f(94);var c=f(173),e=f(98);f=function(a){function h(b,e,r){a.call(this);this.syncErrorValue=null;this.isStopped=this.syncErrorThrowable=this.syncErrorThrown=!1;switch(arguments.length){case 0:this.destination=c.empty;break;case 1:if(!b){this.destination= c.empty;break}if("object"===("undefined"===typeof b?"undefined":n(b))){b instanceof h?(this.destination=b,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new d(this,b));break}default:this.syncErrorThrowable=!0,this.destination=new d(this,b,e,r)}}b(h,a);h.prototype[e.$$rxSubscriber]=function(){return this};h.create=function(a,c,b){a=new h(a,c,b);a.syncErrorThrowable=!1;return a};h.prototype.next=function(a){this.isStopped||this._next(a)};h.prototype.error=function(a){this.isStopped|| (this.isStopped=!0,this._error(a))};h.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())};h.prototype.unsubscribe=function(){this.isUnsubscribed||(this.isStopped=!0,a.prototype.unsubscribe.call(this))};h.prototype._next=function(a){this.destination.next(a)};h.prototype._error=function(a){this.destination.error(a);this.unsubscribe()};h.prototype._complete=function(){this.destination.complete();this.unsubscribe()};return h}(p.Subscription);k.Subscriber=f;var d=function(c){function e(b, d,h,f){c.call(this);this._parent=b;var w;b=this;a.isFunction(d)?w=d:d&&(b=d,w=d.next,h=d.error,f=d.complete,a.isFunction(b.unsubscribe)&&this.add(b.unsubscribe.bind(b)),b.unsubscribe=this.unsubscribe.bind(this));this._context=b;this._next=w;this._error=h;this._complete=f}b(e,c);e.prototype.next=function(a){if(!this.isStopped&&this._next){var c=this._parent;c.syncErrorThrowable?this.__tryOrSetError(c,this._next,a)&&this.unsubscribe():this.__tryOrUnsub(this._next,a)}};e.prototype.error=function(a){if(!this.isStopped){var c= this._parent;if(this._error)c.syncErrorThrowable?this.__tryOrSetError(c,this._error,a):this.__tryOrUnsub(this._error,a),this.unsubscribe();else if(c.syncErrorThrowable)c.syncErrorValue=a,c.syncErrorThrown=!0,this.unsubscribe();else throw this.unsubscribe(),a;}};e.prototype.complete=function(){if(!this.isStopped){var a=this._parent;this._complete&&(a.syncErrorThrowable?this.__tryOrSetError(a,this._complete):this.__tryOrUnsub(this._complete));this.unsubscribe()}};e.prototype.__tryOrUnsub=function(a, c){try{a.call(this._context,c)}catch(b){throw this.unsubscribe(),b;}};e.prototype.__tryOrSetError=function(a,c,b){try{c.call(this._context,b)}catch(e){return a.syncErrorValue=e,a.syncErrorThrown=!0}return!1};e.prototype._unsubscribe=function(){var a=this._parent;this._parent=this._context=null;a.unsubscribe()};return e}(f)},function(p,k){k.isScheduler=function(f){return f&&"function"===typeof f.schedule}},function(p,k,f){(function(f,b){var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator? function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},c={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};k.root=c["undefined"===typeof self?"undefined":a(self)]&&self||c["undefined"===typeof window?"undefined":a(window)]&&window;a(k);a(f);!(a=c["undefined"===typeof b?"undefined":a(b)]&&b)||a.global!==a&&a.window!==a||(k.root=a)}).call(k,f(195)(p),function(){return this}())},function(p,k,f){function n(){this._contexts= this._callbacks=null}k=f(14);var b=f(3),a=f(1);b(n.prototype,{enqueue:function(a,b){this._callbacks=this._callbacks||[];this._contexts=this._contexts||[];this._callbacks.push(a);this._contexts.push(b)},notifyAll:function(){var c=this._callbacks,b=this._contexts;if(c){c.length!==b.length?a(!1):void 0;this._contexts=this._callbacks=null;for(var d=0;d<c.length;d++)c[d].call(b[d]);c.length=0;b.length=0}},reset:function(){this._contexts=this._callbacks=null},destructor:function(){this.reset()}});k.addPoolingTo(n); p.exports=n},function(p,k,f){function n(a){if(g.hasOwnProperty(a))return!0;if(d.hasOwnProperty(a))return!1;if(e.test(a))return g[a]=!0;d[a]=!0;void 0;return!1}function b(a,c){return null==c||a.hasBooleanValue&&!c||a.hasNumericValue&&isNaN(c)||a.hasPositiveNumericValue&&1>c||a.hasOverloadedBooleanValue&&!1===c}var a=f(17);k=f(8);var c=f(170);f(2);var e=/^[a-zA-Z_][\w\.\-]*$/,d={},g={},h={createMarkupForID:function(b){return a.ID_ATTRIBUTE_NAME+"="+c(b)},setAttributeForID:function(c,b){c.setAttribute(a.ID_ATTRIBUTE_NAME, b)},createMarkupForProperty:function(e,d){var g=a.properties.hasOwnProperty(e)?a.properties[e]:null;if(g){if(b(g,d))return"";var h=g.attributeName;return g.hasBooleanValue||g.hasOverloadedBooleanValue&&!0===d?h+'=""':h+"="+c(d)}return a.isCustomAttribute(e)?null==d?"":e+"="+c(d):null},createMarkupForCustomAttribute:function(a,b){return n(a)&&null!=b?a+"="+c(b):""},setValueForProperty:function(c,e,d){var g=a.properties.hasOwnProperty(e)?a.properties[e]:null;if(g){var f=g.mutationMethod;f?f(c,d):b(g, d)?this.deleteValueForProperty(c,e):g.mustUseAttribute?(e=g.attributeName,(f=g.attributeNamespace)?c.setAttributeNS(f,e,""+d):g.hasBooleanValue||g.hasOverloadedBooleanValue&&!0===d?c.setAttribute(e,""):c.setAttribute(e,""+d)):(e=g.propertyName,g.hasSideEffects&&""+c[e]===""+d||(c[e]=d))}else a.isCustomAttribute(e)&&h.setValueForAttribute(c,e,d)},setValueForAttribute:function(a,c,b){n(c)&&(null==b?a.removeAttribute(c):a.setAttribute(c,""+b))},deleteValueForProperty:function(c,b){var e=a.properties.hasOwnProperty(b)? a.properties[b]:null;if(e){var d=e.mutationMethod;if(d)d(c,void 0);else if(e.mustUseAttribute)c.removeAttribute(e.attributeName);else{var d=e.propertyName,g=a.getDefaultValueForProperty(c.nodeName,d);e.hasSideEffects&&""+c[d]===g||(c[d]=g)}}else a.isCustomAttribute(b)&&c.removeAttribute(b)}};k.measureMethods(h,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"});p.exports=h},function(p,k,f){function n(a){null!= a.checkedLink&&null!=a.valueLink?e(!1):void 0}function b(a){n(a);null!=a.value||null!=a.onChange?e(!1):void 0}function a(a){n(a);null!=a.checked||null!=a.onChange?e(!1):void 0}k=f(86);var c=f(27),e=f(1);f(2);var d={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},g={value:function(a,c,b){return!a[c]||d[a.type]||a.onChange||a.readOnly||a.disabled?null: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(a,c,b){return!a[c]||a.onChange||a.readOnly||a.disabled?null: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:k.func},h={};p.exports={checkPropTypes:function(a,b,e){for(var d in g){if(g.hasOwnProperty(d))var f=g[d](b,d,a,c.prop);f instanceof Error&&!(f.message in h)&&(h[f.message]=!0,e&&e.getName(),void 0)}}, getValue:function(a){return a.valueLink?(b(a),a.valueLink.value):a.value},getChecked:function(c){return c.checkedLink?(a(c),c.checkedLink.value):c.checked},executeOnChange:function(c,e){if(c.valueLink)return b(c),c.valueLink.requestChange(e.target.value);if(c.checkedLink)return a(c),c.checkedLink.requestChange(e.target.checked);if(c.onChange)return c.onChange.call(void 0,e)}}},function(p,k,f){k=f(41);var n=f(5);p.exports={processChildrenUpdates:k.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:k.dangerouslyReplaceNodeWithMarkupByID, unmountIDFromEnvironment:function(b){n.purgeID(b)}}},function(p,k,f){var n=f(1),b=!1,a={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(c){b?n(!1):void 0;a.unmountIDFromEnvironment=c.unmountIDFromEnvironment;a.replaceNodeWithMarkupByID=c.replaceNodeWithMarkupByID;a.processChildrenUpdates=c.processChildrenUpdates;b=!0}}};p.exports=a},function(p,k,f){var n=f(66),b=f(37),a=f(5);k=f(8);var c=f(1),e={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.", style:"`style` must be set using `updateStylesByID()`."};f={updatePropertyByID:function(d,g,h){d=a.getNode(d);e.hasOwnProperty(g)?c(!1):void 0;null!=h?b.setValueForProperty(d,g,h):b.deleteValueForProperty(d,g)},dangerouslyReplaceNodeWithMarkupByID:function(c,b){var e=a.getNode(c);n.dangerouslyReplaceNodeWithMarkup(e,b)},dangerouslyProcessChildrenUpdates:function(c,b){for(var e=0;e<c.length;e++)c[e].parentNode=a.getNode(c[e].parentID);n.processUpdates(c,b)}};k.measureMethods(f,"ReactDOMIDOperations", {dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"});p.exports=f},function(p,k,f){function n(c,b){var e=a.get(c);return e?e:null}f(12);var b=f(6),a=f(22),c=f(9),e=f(3),d=f(1);f(2);var g={isMounted:function(c){return(c=a.get(c))?!!c._renderedComponent:!1},enqueueCallback:function(a,b){"function"!==typeof b?d(!1):void 0;var e=n(a);if(!e)return null;e._pendingCallbacks?e._pendingCallbacks.push(b):e._pendingCallbacks= [b];c.enqueueUpdate(e)},enqueueCallbackInternal:function(a,b){"function"!==typeof b?d(!1):void 0;a._pendingCallbacks?a._pendingCallbacks.push(b):a._pendingCallbacks=[b];c.enqueueUpdate(a)},enqueueForceUpdate:function(a){if(a=n(a,"forceUpdate"))a._pendingForceUpdate=!0,c.enqueueUpdate(a)},enqueueReplaceState:function(a,b){var e=n(a,"replaceState");e&&(e._pendingStateQueue=[b],e._pendingReplaceState=!0,c.enqueueUpdate(e))},enqueueSetState:function(a,b){var e=n(a,"setState");e&&((e._pendingStateQueue|| (e._pendingStateQueue=[])).push(b),c.enqueueUpdate(e))},enqueueSetProps:function(a,c){var b=n(a,"setProps");b&&g.enqueueSetPropsInternal(b,c)},enqueueSetPropsInternal:function(a,g){var m=a._topLevelWrapper;m?void 0:d(!1);var f=m._pendingElement||m._currentElement,t=f.props,w=e({},t.props,g);m._pendingElement=b.cloneAndReplaceProps(f,b.cloneAndReplaceProps(t,w));c.enqueueUpdate(m)},enqueueReplaceProps:function(a,c){var b=n(a,"replaceProps");b&&g.enqueueReplacePropsInternal(b,c)},enqueueReplacePropsInternal:function(a, e){var g=a._topLevelWrapper;g?void 0:d(!1);var f=g._pendingElement||g._currentElement;g._pendingElement=b.cloneAndReplaceProps(f,b.cloneAndReplaceProps(f.props,e));c.enqueueUpdate(g)},enqueueElementInternal:function(a,b){a._pendingElement=b;c.enqueueUpdate(a)}};p.exports=g},function(p,k){p.exports="0.14.8"},function(p,k,f){f(12);var n=f(22),b=f(5),a=f(1);f(2);p.exports=function(c){if(null==c)return null;if(1===c.nodeType)return c;if(n.has(c))return b.getNodeFromInstance(c);null!=c.render&&"function"=== typeof c.render?a(!1):void 0;a(!1)}},function(p,k){p.exports=function(f){var n=f.keyCode;"charCode"in f?(f=f.charCode,0===f&&13===n&&(f=13)):f=n;return 32<=f||13===f?f:0}},function(p,k){function f(b){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(b):(b=n[b])?!!a[b]:!1}var n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};p.exports=function(b){return f}},function(p,k){p.exports=function(f){f=f.target||f.srcElement||window;return 3===f.nodeType?f.parentNode:f}}, function(p,k){var f="function"===typeof Symbol&&Symbol.iterator;p.exports=function(n){n=n&&(f&&n[f]||n["@@iterator"]);if("function"===typeof n)return n}},function(p,k,f){function n(e){var l;null===e||!1===e?l=new a(n):"object"===("undefined"===typeof e?"undefined":b(e))?(!e||"function"!==typeof e.type&&"string"!==typeof e.type?d(!1):void 0,"string"===typeof e.type?l=c.createInternalComponent(e):(l=e.type,l="function"===typeof l&&"undefined"!==typeof l.prototype&&"function"===typeof l.prototype.mountComponent&& "function"===typeof l.prototype.receiveComponent?new e.type(e):new g)):"string"===typeof e||"number"===typeof e?l=c.createInstanceForText(e):d(!1);l.construct(e);l._mountIndex=0;l._mountImage=null;return l}var b="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a};k=f(131);var a=f(78),c=f(84),e=f(3),d=f(1);f(2);var g=function(){};e(g.prototype,k.Mixin,{_instantiateReactComponent:n}); p.exports=n},function(p,k,f){var n=f(4),b;n.canUseDOM&&(b=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));p.exports=function(a,c){if(!n.canUseDOM||c&&!("addEventListener"in document))return!1;var e="on"+a,d=e in document;d||(d=document.createElement("div"),d.setAttribute(e,"return;"),d="function"===typeof d[e]);!d&&b&&"wheel"===a&&(d=document.implementation.hasFeature("Events.wheel","3.0"));return d}},function(p,k,f){k=f(4);var n=f(31), b=f(32);f=function(a,c){a.textContent=c};k.canUseDOM&&("textContent"in document.documentElement||(f=function(a,c){b(a,n(c))}));p.exports=f},function(p,k){var f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"===typeof Symbol&&f.constructor===Symbol?"symbol":typeof f};p.exports=function(n,b){var a=null===n||!1===n,c=null===b||!1===b;if(a||c)return a===c;a="undefined"===typeof n?"undefined":f(n);c="undefined"===typeof b?"undefined": f(b);return"string"===a||"number"===a?"string"===c||"number"===c:"object"===c&&n.type===b.type&&n.key===b.key}},function(p,k,f){function n(a){return l[a]}function b(a,c){return a&&null!=a.key?"$"+(""+a.key).replace(m,n):c.toString(36)}function a(l,f,w,u){var q="undefined"===typeof l?"undefined":c(l);if("undefined"===q||"boolean"===q)l=null;if(null===l||"string"===q||"number"===q||e.isValidElement(l))return w(u,l,""===f?h+b(l,0):f),1;var v,x,k=0;f=""===f?h:f+":";if(Array.isArray(l))for(q=0;q<l.length;q++)v= l[q],x=f+b(v,q),k+=a(v,x,w,u);else if(v=d(l))if(q=v.call(l),v!==l.entries)for(l=0;!(v=q.next()).done;)v=v.value,x=f+b(v,l++),k+=a(v,x,w,u);else for(;!(v=q.next()).done;){if(l=v.value)v=l[1],x=f+("$"+(""+l[0]).replace(m,n))+":"+b(v,0),k+=a(v,x,w,u)}else"object"===q&&g(!1);return k}var c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a};f(12);var e=f(6);k=f(18);var d= f(48),g=f(1);f(2);var h=k.SEPARATOR,l={"=":"=0",".":"=1",":":"=2"},m=/[=.:]/g;p.exports=function(c,b,e){return null==c?0:a(c,"",b,e)}},function(p,k,f){f(3);k=f(10);f(2);p.exports=k},function(p,k,f){var n=function(b,a){function c(){this.constructor=b}for(var e in a)a.hasOwnProperty(e)&&(b[e]=a[e]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)};p=function(b){function a(){b.apply(this,arguments)}n(a,b);a.prototype.notifyNext=function(a,b,d,g,h){this.destination.next(b)};a.prototype.notifyError= function(a,b){this.destination.error(a)};a.prototype.notifyComplete=function(a){this.destination.complete()};return a}(f(33).Subscriber);k.OuterSubscriber=p},function(p,k,f){var n=function(a,c){function b(){this.constructor=a}for(var h in c)c.hasOwnProperty(h)&&(a[h]=c[h]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};p=f(7);var b=f(96),a=f(95),c=f(34);f=function(e){function d(a,c){e.call(this);this.array=a;this.scheduler=c;c||1!==a.length||(this._isScalar=!0,this.value=a[0])} n(d,e);d.create=function(a,c){return new d(a,c)};d.of=function(){for(var e=[],h=0;h<arguments.length;h++)e[h-0]=arguments[h];h=e[e.length-1];c.isScheduler(h)?e.pop():h=null;var l=e.length;return 1<l?new d(e,h):1===l?new b.ScalarObservable(e[0],h):new a.EmptyObservable(h)};d.dispatch=function(a){var c=a.array,b=a.index,e=a.subscriber;b>=a.count?e.complete():(e.next(c[b]),e.isUnsubscribed||(a.index=b+1,this.schedule(a)))};d.prototype._subscribe=function(a){var c=this.array,b=c.length,e=this.scheduler; if(e)return e.schedule(d.dispatch,0,{array:c,index:0,count:b,subscriber:a});for(e=0;e<b&&!a.isUnsubscribed;e++)a.next(c[e]);a.complete()};return d}(p.Observable);k.ArrayObservable=f},function(p,k){k.errorObject={e:{}}},function(p,k,f){var n=f(35),b=f(99),a=f(191),c=f(7),e=f(188),d=f(172),g=f(102);k.subscribeToResult=function(h,l,m,f){var t=new d.InnerSubscriber(h,m,f);if(!t.isUnsubscribed){if(l instanceof c.Observable){if(l._isScalar){t.next(l.value);t.complete();return}return l.subscribe(t)}if(b.isArray(l)){h= 0;for(m=l.length;h<m&&!t.isUnsubscribed;h++)t.next(l[h]);t.isUnsubscribed||t.complete()}else{if(a.isPromise(l))return l.then(function(a){t.isUnsubscribed||(t.next(a),t.complete())},function(a){return t.error(a)}).then(null,function(a){n.root.setTimeout(function(){throw a;})}),t;if("function"===typeof l[e.$$iterator]){for(h=0;h<l.length&&(t.next(l[h]),!t.isUnsubscribed);h++);t.isUnsubscribed||t.complete()}else if("function"===typeof l[g])if(l=l[g](),"function"!==typeof l.subscribe)t.error("invalid observable"); else return l.subscribe(new d.InnerSubscriber(h,m,f));else t.error(new TypeError("unknown type returned"))}}}},function(p,k,f){var n=f(10);p.exports={listen:function(b,a,c){if(b.addEventListener)return b.addEventListener(a,c,!1),{remove:function(){b.removeEventListener(a,c,!1)}};if(b.attachEvent)return b.attachEvent("on"+a,c),{remove:function(){b.detachEvent("on"+a,c)}}},capture:function(b,a,c){return b.addEventListener?(b.addEventListener(a,c,!0),{remove:function(){b.removeEventListener(a,c,!0)}}): {remove:n}},registerDefault:function(){}}},function(p,k,f){var n=f(111);p.exports=function(b,a){var c=!0;for(;c;){var c=b,e=a;if(c&&e){if(c===e)return!0;if(n(c))return!1;if(n(e))b=c,a=e.parentNode,c=!0;else return c.contains?c.contains(e):c.compareDocumentPosition?!!(c.compareDocumentPosition(e)&16):!1}else return!1}}},function(p,k){p.exports=function(f){try{f.focus()}catch(n){}}},function(p,k){p.exports=function(){if("undefined"===typeof document)return null;try{return document.activeElement||document.body}catch(f){return document.body}}}, function(p,k,f){k=f(4);var n=f(1),b=k.canUseDOM?document.createElement("div"):null,a={};f=[1,'<select multiple="true">',"</select>"];k=[1,"<table>","</table>"];var c=[3,"<table><tbody><tr>","</tr></tbody></table>"],e=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],d={"*":[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:f,option:f,caption:k,colgroup:k,tbody:k,tfoot:k,thead:k,td:c,th:c};"circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop text tspan".split(" ").forEach(function(c){d[c]=e;a[c]=!0});p.exports=function(c){b?void 0:n(!1);d.hasOwnProperty(c)||(c="*");a.hasOwnProperty(c)||(b.innerHTML="*"===c?"<link />":"<"+c+"></"+c+">",a[c]=!b.firstChild);return a[c]?d[c]:null}},function(p,k){var f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator? function(b){return typeof b}:function(b){return b&&"function"===typeof Symbol&&b.constructor===Symbol?"symbol":typeof b},n=Object.prototype.hasOwnProperty;p.exports=function(b,a){if(b===a)return!0;if("object"!==("undefined"===typeof b?"undefined":f(b))||null===b||"object"!==("undefined"===typeof a?"undefined":f(a))||null===a)return!1;var c=Object.keys(b),e=Object.keys(a);if(c.length!==e.length)return!1;for(var e=n.bind(a),d=0;d<c.length;d++)if(!e(c[d])||b[c[d]]!==a[c[d]])return!1;return!0}},function(p, k){var f={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},n=["Webkit","ms","Moz","O"];Object.keys(f).forEach(function(b){n.forEach(function(a){a=a+b.charAt(0).toUpperCase()+b.substring(1); f[a]=f[b]})});p.exports={isUnitlessNumber:f,shorthandPropertyExpansions:{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}}}},function(p,k,f){var n=f(122),b=f(83);k=f(8);var a=f(32),c=f(51),e=f(1);f={dangerouslyReplaceNodeWithMarkup:n.dangerouslyReplaceNodeWithMarkup,updateTextContent:c,processUpdates:function(d,g){for(var h,l=null,m=null,f=0;f<d.length;f++)if(h=d[f], h.type===b.MOVE_EXISTING||h.type===b.REMOVE_NODE){var t=h.fromIndex,w=h.parentNode.childNodes[t];h=h.parentID;w?void 0:e(!1);l=l||{};l[h]=l[h]||[];l[h][t]=w;m=m||[];m.push(w)}f=g.length&&"string"===typeof g[0]?n.dangerouslyRenderMarkup(g):g;if(m)for(h=0;h<m.length;h++)m[h].parentNode.removeChild(m[h]);for(m=0;m<d.length;m++)switch(h=d[m],h.type){case b.INSERT_MARKUP:t=h.parentNode;w=f[h.markupIndex];h=h.toIndex;h=h>=t.childNodes.length?null:t.childNodes.item(h);t.insertBefore(w,h);break;case b.MOVE_EXISTING:t= h.parentNode;w=l[h.parentID][h.fromIndex];h=h.toIndex;h=h>=t.childNodes.length?null:t.childNodes.item(h);t.insertBefore(w,h);break;case b.SET_MARKUP:a(h.parentNode,h.content);break;case b.TEXT_CONTENT:c(h.parentNode,h.content)}}};k.measureMethods(f,"DOMChildrenOperations",{updateTextContent:"updateTextContent"});p.exports=f},function(p,k,f){function n(){if(c)for(var g in e){var h=e[g],l=c.indexOf(g);-1<l?void 0:a(!1);if(!d.plugins[l]){h.extractEvents?void 0:a(!1);d.plugins[l]=h;var l=h.eventTypes, m;for(m in l){var f;var t=l[m];f=h;var w=m;d.eventNameDispatchConfigs.hasOwnProperty(w)?a(!1):void 0;d.eventNameDispatchConfigs[w]=t;var u=t.phasedRegistrationNames;if(u){t=void 0;for(t in u)u.hasOwnProperty(t)&&b(u[t],f,w);f=!0}else t.registrationName?(b(t.registrationName,f,w),f=!0):f=!1;f?void 0:a(!1)}}}}function b(c,b,e){d.registrationNameModules[c]?a(!1):void 0;d.registrationNameModules[c]=b;d.registrationNameDependencies[c]=b.eventTypes[e].dependencies}var a=f(1),c=null,e={},d={plugins:[],eventNameDispatchConfigs:{}, registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(b){c?a(!1):void 0;c=Array.prototype.slice.call(b);n()},injectEventPluginsByName:function(c){var b=!1,d;for(d in c)if(c.hasOwnProperty(d)){var m=c[d];e.hasOwnProperty(d)&&e[d]===m||(e[d]?a(!1):void 0,e[d]=m,b=!0)}b&&n()},getPluginModuleForEvent:function(a){a=a.dispatchConfig;if(a.registrationName)return d.registrationNameModules[a.registrationName]||null;for(var c in a.phasedRegistrationNames)if(a.phasedRegistrationNames.hasOwnProperty(c)){var b= d.registrationNameModules[a.phasedRegistrationNames[c]];if(b)return b}return null},_resetEventPlugins:function(){c=null;for(var a in e)e.hasOwnProperty(a)&&delete e[a];d.plugins.length=0;a=d.eventNameDispatchConfigs;for(var b in a)a.hasOwnProperty(b)&&delete a[b];b=d.registrationNameModules;for(var l in b)b.hasOwnProperty(l)&&delete b[l]}};p.exports=d},function(p,k,f){function n(a,c){this.func=a;this.context=c;this.count=0}function b(a,c,b){a.func.call(a.context,c,a.count++)}function a(a,c,b,e){this.result= a;this.keyPrefix=c;this.func=b;this.context=e;this.count=0}function c(a,c,b){var d=a.result,l=a.keyPrefix;a=a.func.call(a.context,c,a.count++);Array.isArray(a)?e(a,d,b,h.thatReturnsArgument):null!=a&&(g.isValidElement(a)&&(a=g.cloneAndReplaceKey(a,l+(a!==c?(""+(a.key||"")).replace(r,"//")+"/":"")+b)),d.push(a))}function e(b,e,d,g,h){var m="";null!=d&&(m=(""+d).replace(r,"//")+"/");e=a.getPooled(e,m,g,h);l(b,c,e);a.release(e)}function d(a,c,b){return null}k=f(14);var g=f(6),h=f(10),l=f(53);f=k.twoArgumentPooler; var m=k.fourArgumentPooler,r=/\/(?!\/)/g;n.prototype.destructor=function(){this.context=this.func=null;this.count=0};k.addPoolingTo(n,f);a.prototype.destructor=function(){this.context=this.func=this.keyPrefix=this.result=null;this.count=0};k.addPoolingTo(a,m);p.exports={forEach:function(a,c,e){if(null==a)return a;c=n.getPooled(c,e);l(a,b,c);n.release(c)},map:function(a,c,b){if(null==a)return a;var d=[];e(a,d,null,c,b);return d},mapIntoWithKeyPrefixInternal:e,count:function(a,c){return l(a,d,null)}, toArray:function(a){var c=[];e(a,c,null,h.thatReturnsArgument);return c}}},function(p,k,f){function n(b,e){if(e){"function"===typeof e?m(!1):void 0;d.isValidElement(e)?m(!1):void 0;var g=b.prototype;e.hasOwnProperty(w)&&x.mixins(b,e.mixins);for(var h in e)if(e.hasOwnProperty(h)&&h!==w){var l=e[h],f=g,r=h,t=v.hasOwnProperty(r)?v[r]:null;z.hasOwnProperty(r)&&(t!==u.OVERRIDE_BASE?m(!1):void 0);f.hasOwnProperty(r)&&(t!==u.DEFINE_MANY&&t!==u.DEFINE_MANY_MERGED?m(!1):void 0);if(x.hasOwnProperty(h))x[h](b, l);else f=v.hasOwnProperty(h),r=g.hasOwnProperty(h),"function"!==typeof l||f||r||!1===e.autobind?r?(r=v[h],!f||r!==u.DEFINE_MANY_MERGED&&r!==u.DEFINE_MANY?m(!1):void 0,r===u.DEFINE_MANY_MERGED?g[h]=a(g[h],l):r===u.DEFINE_MANY&&(g[h]=c(g[h],l))):g[h]=l:(g.__reactAutoBindMap||(g.__reactAutoBindMap={}),g.__reactAutoBindMap[h]=l,g[h]=l)}}}function b(a,c){a&&c&&"object"===("undefined"===typeof a?"undefined":e(a))&&"object"===("undefined"===typeof c?"undefined":e(c))?void 0:m(!1);for(var b in c)c.hasOwnProperty(b)&& (void 0!==a[b]?m(!1):void 0,a[b]=c[b]);return a}function a(a,c){return function(){var e=a.apply(this,arguments),d=c.apply(this,arguments);if(null==e)return d;if(null==d)return e;var g={};b(g,e);b(g,d);return g}}function c(a,c){return function(){a.apply(this,arguments);c.apply(this,arguments)}}var e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a};k=f(70);var d=f(6); f(27);f(26);var g=f(85),h=f(3),l=f(19),m=f(1),r=f(24),t=f(13);f(2);var w=t({mixins:null}),u=r({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),q=[],v={mixins:u.DEFINE_MANY,statics:u.DEFINE_MANY,propTypes:u.DEFINE_MANY,contextTypes:u.DEFINE_MANY,childContextTypes:u.DEFINE_MANY,getDefaultProps:u.DEFINE_MANY_MERGED,getInitialState:u.DEFINE_MANY_MERGED,getChildContext:u.DEFINE_MANY_MERGED,render:u.DEFINE_ONCE,componentWillMount:u.DEFINE_MANY,componentDidMount:u.DEFINE_MANY, componentWillReceiveProps:u.DEFINE_MANY,shouldComponentUpdate:u.DEFINE_ONCE,componentWillUpdate:u.DEFINE_MANY,componentDidUpdate:u.DEFINE_MANY,componentWillUnmount:u.DEFINE_MANY,updateComponent:u.OVERRIDE_BASE},x={displayName:function(a,c){a.displayName=c},mixins:function(a,c){if(c)for(var b=0;b<c.length;b++)n(a,c[b])},childContextTypes:function(a,c){a.childContextTypes=h({},a.childContextTypes,c)},contextTypes:function(a,c){a.contextTypes=h({},a.contextTypes,c)},getDefaultProps:function(c,b){c.getDefaultProps= c.getDefaultProps?a(c.getDefaultProps,b):b},propTypes:function(a,c){a.propTypes=h({},a.propTypes,c)},statics:function(a,c){if(c)for(var b in c){var e=c[b];c.hasOwnProperty(b)&&(b in x?m(!1):void 0,b in a?m(!1):void 0,a[b]=e)}},autobind:function(){}},z={replaceState:function(a,c){this.updater.enqueueReplaceState(this,a);c&&this.updater.enqueueCallback(this,c)},isMounted:function(){return this.updater.isMounted(this)},setProps:function(a,c){this.updater.enqueueSetProps(this,a);c&&this.updater.enqueueCallback(this, c)},replaceProps:function(a,c){this.updater.enqueueReplaceProps(this,a);c&&this.updater.enqueueCallback(this,c)}},B=function(){};h(B.prototype,k.prototype,z);p.exports={createClass:function(a){var c=function(a,c,b){if(this.__reactAutoBindMap)for(var d in this.__reactAutoBindMap)if(this.__reactAutoBindMap.hasOwnProperty(d)){var h=d,f=this.__reactAutoBindMap[d].bind(this);this[h]=f}this.props=a;this.context=c;this.refs=l;this.updater=b||g;this.state=null;a=this.getInitialState?this.getInitialState(): null;"object"!==("undefined"===typeof a?"undefined":e(a))||Array.isArray(a)?m(!1):void 0;this.state=a};c.prototype=new B;c.prototype.constructor=c;q.forEach(n.bind(null,c));n(c,a);c.getDefaultProps&&(c.defaultProps=c.getDefaultProps());c.prototype.render?void 0:m(!1);for(var b in v)c.prototype[b]||(c.prototype[b]=null);return c},injection:{injectMixin:function(a){q.push(a)}}}},function(p,k,f){function n(b,e,h){this.props=b;this.context=e;this.refs=c;this.updater=h||a}var b="function"===typeof Symbol&& "symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},a=f(85);f(30);var c=f(19),e=f(1);f(2);n.prototype.isReactComponent={};n.prototype.setState=function(a,c){"object"!==("undefined"===typeof a?"undefined":b(a))&&"function"!==typeof a&&null!=a?e(!1):void 0;this.updater.enqueueSetState(this,a);c&&this.updater.enqueueCallback(this,c)};n.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this); a&&this.updater.enqueueCallback(this,a)};p.exports=n},function(p,k,f){k=f(12);var n=f(74),b=f(76),a=f(18),c=f(5),e=f(8),d=f(15),g=f(9),h=f(43),l=f(44),m=f(171);f(2);b.inject();f=e.measure("React","render",c.render);f={findDOMNode:l,render:f,unmountComponentAtNode:c.unmountComponentAtNode,version:h,unstable_batchedUpdates:g.batchedUpdates,unstable_renderSubtreeIntoContainer:m};"undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:k, InstanceHandles:a,Mount:c,Reconciler:d,TextComponent:n});p.exports=f},function(p,k){p.exports={useCreateElement:!1}},function(p,k,f){function n(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var a=this._currentElement.props,e=c.getValue(a);null!=e&&b(this,Boolean(a.multiple),e)}}function b(a,c,b){var d;a=e.getNode(a._rootNodeID).options;if(c){c={};for(d=0;d<b.length;d++)c[""+b[d]]=!0;for(d=0;d<a.length;d++)b=c.hasOwnProperty(a[d].value),a[d].selected!== b&&(a[d].selected=b)}else{c=""+b;for(d=0;d<a.length;d++)if(a[d].value===c){a[d].selected=!0;return}a.length&&(a[0].selected=!0)}}function a(a){a=c.executeOnChange(this._currentElement.props,a);this._wrapperState.pendingUpdate=!0;d.asap(n,this);return a}var c=f(38),e=f(5),d=f(9),g=f(3);f(2);var h="__ReactDOMSelect_value$"+Math.random().toString(36).slice(2);p.exports={valueContextKey:h,getNativeProps:function(a,c,b){return g({},c,{onChange:a._wrapperState.onChange,value:void 0})},mountWrapper:function(b, e){var d=c.getValue(e);b._wrapperState={pendingUpdate:!1,initialValue:null!=d?d:e.defaultValue,onChange:a.bind(b),wasMultiple:Boolean(e.multiple)}},processChildContext:function(a,c,b){c=g({},b);c[h]=a._wrapperState.initialValue;return c},postUpdateWrapper:function(a){var e=a._currentElement.props;a._wrapperState.initialValue=void 0;var d=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=Boolean(e.multiple);var g=c.getValue(e);null!=g?(a._wrapperState.pendingUpdate=!1,b(a,Boolean(e.multiple), g)):d!==Boolean(e.multiple)&&(null!=e.defaultValue?b(a,Boolean(e.multiple),e.defaultValue):b(a,Boolean(e.multiple),e.multiple?[]:""))}}},function(p,k,f){var n=f(66),b=f(37),a=f(39),c=f(5);k=f(3);var e=f(31),d=f(51);f(54);f=function(a){};k(f.prototype,{construct:function(a){this._currentElement=a;this._stringText=""+a;this._rootNodeID=null;this._mountIndex=0},mountComponent:function(a,h,l){this._rootNodeID=a;if(h.useCreateElement)return h=l[c.ownerDocumentContextKey].createElement("span"),b.setAttributeForID(h, a),c.getID(h),d(h,this._stringText),h;l=e(this._stringText);return h.renderToStaticMarkup?l:"<span "+b.createMarkupForID(a)+">"+l+"</span>"},receiveComponent:function(a,b){if(a!==this._currentElement){this._currentElement=a;var e=""+a;if(e!==this._stringText){this._stringText=e;var d=c.getNode(this._rootNodeID);n.updateTextContent(d,e)}}},unmountComponent:function(){a.unmountIDFromEnvironment(this._rootNodeID)}});p.exports=f},function(p,k,f){function n(){this.reinitializeTransaction()}k=f(9);var b= f(29),a=f(3);f=f(10);var c={initialize:f,close:function(){g.isBatchingUpdates=!1}},e=[{initialize:f,close:k.flushBatchedUpdates.bind(k)},c];a(n.prototype,b.Mixin,{getTransactionWrappers:function(){return e}});var d=new n,g={isBatchingUpdates:!1,batchedUpdates:function(a,c,b,e,f,w){var u=g.isBatchingUpdates;g.isBatchingUpdates=!0;u?a(c,b,e,f,w):d.perform(a,null,c,b,e,f,w)}};p.exports=g},function(p,k,f){var n=f(118),b=f(120),a=f(121),c=f(123),e=f(124),d=f(4),g=f(127),h=f(129),l=f(39),m=f(75),r=f(133), t=f(74),w=f(141),u=f(142),q=f(18),v=f(5),x=f(146),z=f(152),B=f(153),A=f(154),C=f(151),G=!1;p.exports={inject:function(){G||(G=!0,u.EventEmitter.injectReactEventListener(w),u.EventPluginHub.injectEventPluginOrder(c),u.EventPluginHub.injectInstanceHandle(q),u.EventPluginHub.injectMount(v),u.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:A,EnterLeaveEventPlugin:e,ChangeEventPlugin:b,SelectEventPlugin:z,BeforeInputEventPlugin:n}),u.NativeComponent.injectGenericComponentClass(r),u.NativeComponent.injectTextComponentClass(t), u.Class.injectMixin(h),u.DOMProperty.injectDOMPropertyConfig(g),u.DOMProperty.injectDOMPropertyConfig(C),u.EmptyComponent.injectEmptyComponent("noscript"),u.Updates.injectReconcileTransaction(x),u.Updates.injectBatchingStrategy(m),u.RootIndex.injectCreateReactRootIndex(d.canUseDOM?a.createReactRootIndex:B.createReactRootIndex),u.Component.injectEnvironment(l))}}},function(p,k,f){function n(){if(h.current){var a=h.current.getName();if(a)return" Check the render method of `"+a+"`."}return""}function b(a, c){if(a._store&&!a._store.validated&&null==a.key){a._store.validated=!0;var b;b=n();if(!b){var e="string"===typeof c?c:c.displayName||c.name;e&&(b=" Check the top-level render call using <"+e+">.")}e=r.uniqueKey||(r.uniqueKey={});e[b]?b=null:(e[b]=!0,b={parentOrOwner:b,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null},a&&a._owner&&a._owner!==h.current&&(b.childOwner=" It was passed a child from "+a._owner.getName()+"."));null!==b&&void 0}}function a(a,c){if("object"=== ("undefined"===typeof a?"undefined":e(a)))if(Array.isArray(a))for(var g=0;g<a.length;g++){var h=a[g];d.isValidElement(h)&&b(h,c)}else if(d.isValidElement(a))a._store&&(a._store.validated=!0);else if(a&&(g=l(a))&&g!==a.entries)for(g=g.call(a);!(h=g.next()).done;)d.isValidElement(h.value)&&b(h.value,c)}function c(a){var c=a.type;if("function"===typeof c){var b=c.displayName||c.name;if(c.propTypes){var e=c.propTypes;a=a.props;var d=g.prop,h;for(h in e)if(e.hasOwnProperty(h)){var l;try{"function"!==typeof e[h]? m(!1):void 0,l=e[h](a,h,b,d)}catch(f){l=f}void 0;l instanceof Error&&!(l.message in t)&&(t[l.message]=!0,n(),void 0)}}"function"===typeof c.getDefaultProps&&void 0}}var e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},d=f(6),g=f(27);f(26);var h=f(12);f(30);var l=f(48),m=f(1);f(2);var r={},t={},w={createElement:function(b,e,g){var h="string"===typeof b||"function"=== typeof b;void 0;var l=d.createElement.apply(this,arguments);if(null==l)return l;if(h)for(h=2;h<arguments.length;h++)a(arguments[h],b);c(l);return l},createFactory:function(a){var c=w.createElement.bind(null,a);c.type=a;return c},cloneElement:function(b,e,g){for(var h=d.cloneElement.apply(this,arguments),l=2;l<arguments.length;l++)a(arguments[l],h.type);c(h);return h}};p.exports=w},function(p,k,f){function n(){a.registerNullComponentID(this._rootNodeID)}var b=f(6),a=f(79),c=f(15),e;k=function(a){this._rootNodeID= this._currentElement=null;this._renderedComponent=a(e)};f(3)(k.prototype,{construct:function(a){},mountComponent:function(a,b,e){b.getReactMountReady().enqueue(n,this);this._rootNodeID=a;return c.mountComponent(this._renderedComponent,a,b,e)},receiveComponent:function(){},unmountComponent:function(b,e,h){c.unmountComponent(this._renderedComponent);a.deregisterNullComponentID(this._rootNodeID);this._renderedComponent=this._rootNodeID=null}});k.injection={injectEmptyComponent:function(a){e=b.createElement(a)}}; p.exports=k},function(p,k){var f={};p.exports={isNullComponentID:function(n){return!!f[n]},registerNullComponentID:function(n){f[n]=!0},deregisterNullComponentID:function(n){delete f[n]}}},function(p,k,f){function n(a,c,e,d){try{return c(e,d)}catch(g){null===b&&(b=g)}}var b=null;p.exports={invokeGuardedCallback:n,invokeGuardedCallbackWithCatch:n,rethrowCaughtError:function(){if(b){var a=b;b=null;throw a;}}}},function(p,k,f){var n=f(137),b=f(60),a=f(61),c=f(62),e={hasSelectionCapabilities:function(a){var c= a&&a.nodeName&&a.nodeName.toLowerCase();return c&&("input"===c&&"text"===a.type||"textarea"===c||"true"===a.contentEditable)},getSelectionInformation:function(){var a=c();return{focusedElem:a,selectionRange:e.hasSelectionCapabilities(a)?e.getSelection(a):null}},restoreSelection:function(d){var g=c(),h=d.focusedElem;d=d.selectionRange;g!==h&&b(document.documentElement,h)&&(e.hasSelectionCapabilities(h)&&e.setSelection(h,d),a(h))},getSelection:function(a){var c;if("selectionStart"in a)c={start:a.selectionStart, end:a.selectionEnd};else if(document.selection&&a.nodeName&&"input"===a.nodeName.toLowerCase()){var b=document.selection.createRange();b.parentElement()===a&&(c={start:-b.moveStart("character",-a.value.length),end:-b.moveEnd("character",-a.value.length)})}else c=n.getOffsets(a);return c||{start:0,end:0}},setSelection:function(a,c){var b=c.start,e=c.end;"undefined"===typeof e&&(e=b);if("selectionStart"in a)a.selectionStart=b,a.selectionEnd=Math.min(e,a.value.length);else if(document.selection&&a.nodeName&& "input"===a.nodeName.toLowerCase()){var m=a.createTextRange();m.collapse(!0);m.moveStart("character",b);m.moveEnd("character",e-b);m.select()}else n.setOffsets(a,c)}};p.exports=e},function(p,k,f){var n=f(163),b=/\/?>/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(c){var e=n(c);return c.replace(b," "+a.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(c,b){var d=b.getAttribute(a.CHECKSUM_ATTR_NAME),d=d&&parseInt(d,10);return n(c)===d}};p.exports=a},function(p,k,f){k= f(24)({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});p.exports=k},function(p,k,f){var n=f(3),b=f(1),a=null,c={},e=null;p.exports={getComponentClassForElement:function(a){if("function"===typeof a.type)return a.type;a=a.type;var b=c[a];null==b&&(c[a]=b=null(a));return b},createInternalComponent:function(c){a?void 0:b(!1);return new a(c.type,c.props)},createInstanceForText:function(a){return new e(a)},isTextComponent:function(a){return a instanceof e},injection:{injectGenericComponentClass:function(c){a= c},injectTextComponentClass:function(a){e=a},injectComponentClasses:function(a){n(c,a)}}}},function(p,k,f){f(2);p.exports={isMounted:function(f){return!1},enqueueCallback:function(f,b){},enqueueForceUpdate:function(f){},enqueueReplaceState:function(f,b){},enqueueSetState:function(f,b){},enqueueSetProps:function(f,b){},enqueueReplaceProps:function(f,b){}}},function(p,k,f){function n(a){function c(b,e,d,h,m,f){h=h||"<<anonymous>>";f=f||d;return null==e[d]?(e=g[m],b?Error("Required "+e+" `"+f+"` was not specified in "+ ("`"+h+"`.")):null):a(e,d,h,m,f)}var b=c.bind(null,!1);b.isRequired=c.bind(null,!0);return b}function b(a){return n(function(b,e,d,h,f){b=b[e];if(c(b)!==a){h=g[h];a:{e=c(b);if("object"===e)if(b instanceof Date){b="date";break a}else if(b instanceof RegExp){b="regexp";break a}b=e}return Error("Invalid "+h+" `"+f+"` of type "+("`"+b+"` supplied to `"+d+"`, expected ")+("`"+a+"`."))}return null})}function a(c){switch("undefined"===typeof c?"undefined":e(c)){case "number":case "string":case "undefined":return!0; case "boolean":return!c;case "object":if(Array.isArray(c))return c.every(a);if(null===c||d.isValidElement(c))return!0;var b=h(c);if(b){var g=b.call(c);if(b!==c.entries)for(;!(c=g.next()).done;){if(!a(c.value))return!1}else for(;!(c=g.next()).done;)if((c=c.value)&&!a(c[1]))return!1}else return!1;return!0;default:return!1}}function c(a){var c="undefined"===typeof a?"undefined":e(a);return Array.isArray(a)?"array":a instanceof RegExp?"object":c}var e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator? function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},d=f(6),g=f(26);k=f(10);var h=f(48);f={array:b("array"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),any:n(k.thatReturns(null)),arrayOf:function(a){return n(function(b,e,d,h,f){b=b[e];if(!Array.isArray(b))return h=g[h],b=c(b),Error("Invalid "+h+" `"+f+"` of type "+("`"+b+"` supplied to `"+d+"`, expected an array."));for(e=0;e<b.length;e++){var q= a(b,e,d,h,f+"["+e+"]");if(q instanceof Error)return q}return null})},element:function(){return n(function(a,c,b,e,h){return d.isValidElement(a[c])?null:Error("Invalid "+g[e]+" `"+h+"` supplied to "+("`"+b+"`, expected a single ReactElement."))})}(),instanceOf:function(a){return n(function(c,b,e,d,h){if(!(c[b]instanceof a)){d=g[d];var f=a.name||"<<anonymous>>";c=c[b];c=c.constructor&&c.constructor.name?c.constructor.name:"<<anonymous>>";return Error("Invalid "+d+" `"+h+"` of type "+("`"+c+"` supplied to `"+ e+"`, expected ")+("instance of `"+f+"`."))}return null})},node:function(){return n(function(c,b,e,d,h){return a(c[b])?null:Error("Invalid "+g[d]+" `"+h+"` supplied to "+("`"+e+"`, expected a ReactNode."))})}(),objectOf:function(a){return n(function(b,e,d,h,f){b=b[e];e=c(b);if("object"!==e)return Error("Invalid "+g[h]+" `"+f+"` of type "+("`"+e+"` supplied to `"+d+"`, expected an object."));for(var q in b)if(b.hasOwnProperty(q)&&(e=a(b,q,d,h,f+"."+q),e instanceof Error))return e;return null})},oneOf:function(a){return Array.isArray(a)? n(function(c,b,e,d,h){c=c[b];for(b=0;b<a.length;b++)if(c===a[b])return null;d=g[d];b=JSON.stringify(a);return Error("Invalid "+d+" `"+h+"` of value `"+c+"` "+("supplied to `"+e+"`, expected one of "+b+"."))}):n(function(){return Error("Invalid argument supplied to oneOf, expected an instance of array.")})},oneOfType:function(a){return Array.isArray(a)?n(function(c,b,e,d,h){for(var f=0;f<a.length;f++)if(null==(0,a[f])(c,b,e,d,h))return null;return Error("Invalid "+g[d]+" `"+h+"` supplied to "+("`"+ e+"`."))}):n(function(){return Error("Invalid argument supplied to oneOfType, expected an instance of array.")})},shape:function(a){return n(function(b,e,d,h,f){b=b[e];e=c(b);if("object"!==e)return Error("Invalid "+g[h]+" `"+f+"` of type `"+e+"` "+("supplied to `"+d+"`, expected `object`."));for(var q in a)if(e=a[q])if(e=e(b,q,d,h,f+"."+q))return e;return null})}};p.exports=f},function(p,k){var f={createReactRootIndex:null,injection:{injectCreateReactRootIndex:function(k){f.createReactRootIndex=k}}}; p.exports=f},function(p,k){var f={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(k){f.currentScrollLeft=k.x;f.currentScrollTop=k.y}};p.exports=f},function(p,k,f){var n=f(1);p.exports=function(b,a){null==a?n(!1):void 0;if(null==b)return a;var c=Array.isArray(b),e=Array.isArray(a);return c&&e?(b.push.apply(b,a),b):c?(b.push(a),b):e?[b].concat(a):[b,a]}},function(p,k){p.exports=function(f,k,b){Array.isArray(f)?f.forEach(k,b):f&&k.call(b,f)}},function(p,k,f){var n=f(4),b=null;p.exports= function(){!b&&n.canUseDOM&&(b="textContent"in document.documentElement?"textContent":"innerText");return b}},function(p,k){var f={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};p.exports=function(k){var b=k&&k.nodeName&&k.nodeName.toLowerCase();return b&&("input"===b&&f[k.type]||"textarea"===b)}},function(p,k,f){p.exports=f(128)},function(p,k,f){var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator? function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},b=f(99),a=f(190),c=f(100),e=f(101),d=f(57),g=f(189);p=function(){function h(a){this.isUnsubscribed=!1;a&&(this._unsubscribe=a)}h.prototype.unsubscribe=function(){var h=!1,m;if(!this.isUnsubscribed){this.isUnsubscribed=!0;var f=this._unsubscribe,t=this._subscriptions;this._subscriptions=null;if(c.isFunction(f)){var w=e.tryCatch(f).call(this);w===d.errorObject&&(h=!0,(m=m||[]).push(d.errorObject.e))}if(b.isArray(t))for(var f= -1,u=t.length;++f<u;)w=t[f],a.isObject(w)&&(w=e.tryCatch(w.unsubscribe).call(w),w===d.errorObject&&(h=!0,m=m||[],w=d.errorObject.e,w instanceof g.UnsubscriptionError?m=m.concat(w.errors):m.push(w)));if(h)throw new g.UnsubscriptionError(m);}};h.prototype.add=function(a){if(a&&a!==this&&a!==h.EMPTY){var c=a;switch("undefined"===typeof a?"undefined":n(a)){case "function":c=new h(a);case "object":if(c.isUnsubscribed||"function"!==typeof c.unsubscribe)break;else this.isUnsubscribed?c.unsubscribe():(this._subscriptions|| (this._subscriptions=[])).push(c);break;default:throw Error("Unrecognized teardown "+a+" added to Subscription.");}return c}};h.prototype.remove=function(a){if(null!=a&&a!==this&&a!==h.EMPTY){var c=this._subscriptions;c&&(a=c.indexOf(a),-1!==a&&c.splice(a,1))}};h.EMPTY=function(a){a.isUnsubscribed=!0;return a}(new h);return h}();k.Subscription=p},function(p,k,f){var n=function(b,a){function c(){this.constructor=b}for(var e in a)a.hasOwnProperty(e)&&(b[e]=a[e]);b.prototype=null===a?Object.create(a): (c.prototype=a.prototype,new c)};p=function(b){function a(a){b.call(this);this.scheduler=a}n(a,b);a.create=function(c){return new a(c)};a.dispatch=function(a){a.subscriber.complete()};a.prototype._subscribe=function(c){var b=this.scheduler;if(b)return b.schedule(a.dispatch,0,{subscriber:c});c.complete()};return a}(f(7).Observable);k.EmptyObservable=p},function(p,k,f){var n=function(b,a){function c(){this.constructor=b}for(var e in a)a.hasOwnProperty(e)&&(b[e]=a[e]);b.prototype=null===a?Object.create(a): (c.prototype=a.prototype,new c)};p=function(b){function a(a,e){b.call(this);this.value=a;this.scheduler=e;this._isScalar=!0;e&&(this._isScalar=!1)}n(a,b);a.create=function(c,b){return new a(c,b)};a.dispatch=function(a){var b=a.value,d=a.subscriber;a.done?d.complete():(d.next(b),d.isUnsubscribed||(a.done=!0,this.schedule(a)))};a.prototype._subscribe=function(c){var b=this.value,d=this.scheduler;if(d)return d.schedule(a.dispatch,0,{done:!1,value:b,subscriber:c});c.next(b);c.isUnsubscribed||c.complete()}; return a}(f(7).Observable);k.ScalarObservable=p},function(p,k,f){var n=function(a,c){function b(){this.constructor=a}for(var h in c)c.hasOwnProperty(h)&&(a[h]=c[h]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};p=f(55);var b=f(58);k.mergeAll=function(c){void 0===c&&(c=Number.POSITIVE_INFINITY);return this.lift(new a(c))};var a=function(){function a(c){this.concurrent=c}a.prototype.call=function(a,b){return b._subscribe(new c(a,this.concurrent))};return a}();k.MergeAllOperator= a;var c=function(a){function c(b,d){a.call(this,b);this.concurrent=d;this.hasCompleted=!1;this.buffer=[];this.active=0}n(c,a);c.prototype._next=function(a){this.active<this.concurrent?(this.active++,this.add(b.subscribeToResult(this,a))):this.buffer.push(a)};c.prototype._complete=function(){this.hasCompleted=!0;0===this.active&&0===this.buffer.length&&this.destination.complete()};c.prototype.notifyComplete=function(a){var c=this.buffer;this.remove(a);this.active--;0<c.length?this._next(c.shift()): 0===this.active&&this.hasCompleted&&this.destination.complete()};return c}(p.OuterSubscriber);k.MergeAllSubscriber=c},function(p,k,f){p=f(35).root.Symbol;k.$$rxSubscriber="function"===typeof p&&"function"===typeof p["for"]?p["for"]("rxSubscriber"):"@@rxSubscriber"},function(p,k){k.isArray=Array.isArray||function(f){return f&&"number"===typeof f.length}},function(p,k){k.isFunction=function(f){return"function"===typeof f}},function(p,k,f){function n(){try{return a.apply(this,arguments)}catch(c){return b.errorObject.e= c,b.errorObject}}var b=f(57),a;k.tryCatch=function(c){a=c;return n}},function(p,k,f){(function(k){p.exports=f(193)(k||window||void 0)}).call(k,function(){return this}())},function(p,k){var f=/-(.)/g;p.exports=function(k){return k.replace(f,function(b,a){return a.toUpperCase()})}},function(p,k,f){var n=f(103),b=/^-ms-/;p.exports=function(a){return n(a.replace(b,"ms-"))}},function(p,k,f){var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&& "function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},b=f(114);p.exports=function(a){return!a||"object"!=("undefined"===typeof a?"undefined":n(a))&&"function"!=typeof a||!("length"in a)||"setInterval"in a||"number"==typeof a.nodeType||!(Array.isArray(a)||"callee"in a||"item"in a)?[a]:Array.isArray(a)?a.slice():b(a)}},function(p,k,f){k=f(4);var n=f(105),b=f(63),a=f(1),c=k.canUseDOM?document.createElement("div"):null,e=/^\s*<(\w+)/;p.exports=function(d,g){var h=c;c?void 0:a(!1);var l; if(l=(l=(l=d.match(e))&&l[1].toLowerCase())&&b(l))for(h.innerHTML=l[1]+d+l[2],l=l[0];l--;)h=h.lastChild;else h.innerHTML=d;l=h.getElementsByTagName("script");l.length&&(g?void 0:a(!1),n(l).forEach(g));for(l=n(h.childNodes);h.lastChild;)h.removeChild(h.lastChild);return l}},function(p,k){p.exports=function(f){return f===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:f.scrollLeft,y:f.scrollTop}}},function(p,k){var f=/([A-Z])/g; p.exports=function(k){return k.replace(f,"-$1").toLowerCase()}},function(p,k,f){var n=f(108),b=/^ms-/;p.exports=function(a){return n(a).replace(b,"-ms-")}},function(p,k){var f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"===typeof Symbol&&f.constructor===Symbol?"symbol":typeof f};p.exports=function(k){return!!(k&&("function"===typeof Node?k instanceof Node:"object"===("undefined"===typeof k?"undefined":f(k))&&"number"=== typeof k.nodeType&&"string"===typeof k.nodeName))}},function(p,k,f){var n=f(110);p.exports=function(b){return n(b)&&3==b.nodeType}},function(p,k){var f=Object.prototype.hasOwnProperty;p.exports=function(k,b,a){if(!k)return null;var c={},e;for(e in k)f.call(k,e)&&(c[e]=b.call(a,k[e],e,k));return c}},function(p,k){p.exports=function(f){var k={};return function(b){k.hasOwnProperty(b)||(k[b]=f.call(this,b));return k[b]}}},function(p,k,f){var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator? function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},b=f(1);p.exports=function(a){var c=a.length;Array.isArray(a)||"object"!==("undefined"===typeof a?"undefined":n(a))&&"function"!==typeof a?b(!1):void 0;"number"!==typeof c?b(!1):void 0;0===c||c-1 in a?void 0:b(!1);if(a.hasOwnProperty)try{return Array.prototype.slice.call(a)}catch(g){}for(var e=Array(c),d=0;d<c;d++)e[d]=a[d];return e}},function(p,k,f){(function(f,b){f(function(){function a(a, c){return null!=a&&null!=c&&a.toLowerCase()===c.toLowerCase()}function c(a,c){var b,e,d=a.length;if(!d||!c)return!1;b=c.toLowerCase();for(e=0;e<d;++e)if(b===a[e].toLowerCase())return!0;return!1}function e(a){for(var c in a)h.call(a,c)&&(a[c]=new RegExp(a[c],"i"))}function d(a,c){this.ua=a||"";this._cache={};this.maxPhoneWidth=c||600}var g={mobileDetectRules:{phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m", Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6",Dell:"Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b", Samsung:"Samsung|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350", LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)", Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790", Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b", Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo 3DS",Amoi:"Amoi",INQ:"INQ",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561", Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI)\\b",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K017 |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C", BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b", ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002", LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b", MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b", AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT", CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b", SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris E10)|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100", BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE", PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1", GalapadTablet:"Android.*\\bG1\\b",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b", YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026", PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync", DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042", ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b", ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)", TecnoTablet:"TECNO P9",JXDTablet:"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)", FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a", OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi", OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b", EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382",MpmanTablet:"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b", WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100", UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bJolla\\b|\\bTP750\\b"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino", SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?", Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+",Skyfire:"Skyfire",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",Tizen:"Tizen",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Puffin:"Puffin",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo", NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:"Firefox/[VER]", Fennec:"Fennec/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]","UC Browser":"UC Browser[VER]",MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"], Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]", "Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b", Watch:"SM-V700"}},detectMobileBrowsers:{fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i, tabletPattern:/android|ipad|playbook|silk/i}},h=Object.prototype.hasOwnProperty,l;g.FALLBACK_PHONE="UnknownPhone";g.FALLBACK_TABLET="UnknownTablet";g.FALLBACK_MOBILE="UnknownMobile";l="isArray"in Array?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};(function(){var a,c,b,d,f,q,v=g.mobileDetectRules;for(a in v.props)if(h.call(v.props,a)){c=v.props[a];l(c)||(c=[c]);f=c.length;for(d=0;d<f;++d)b=c[d],q=b.indexOf("[VER]"),0<=q&&(b=b.substring(0,q)+"([\\w._\\+]+)"+ b.substring(q+5)),c[d]=new RegExp(b,"i");v.props[a]=c}e(v.oss);e(v.phones);e(v.tablets);e(v.uas);e(v.utils);v.oss0={WindowsPhoneOS:v.oss.WindowsPhoneOS,WindowsMobileOS:v.oss.WindowsMobileOS}})();g.findMatch=function(a,c){for(var b in a)if(h.call(a,b)&&a[b].test(c))return b;return null};g.findMatches=function(a,c){var b=[],e;for(e in a)h.call(a,e)&&a[e].test(c)&&b.push(e);return b};g.getVersionStr=function(a,c){var b=g.mobileDetectRules.props,e,d,l;if(h.call(b,a))for(b=b[a],d=b.length,e=0;e<d;++e)if(l= b[e].exec(c),null!==l)return l[1];return null};g.getVersion=function(a,c){var b=g.getVersionStr(a,c);return b?g.prepareVersionNo(b):NaN};g.prepareVersionNo=function(a){var c;c=a.split(/[a-z._ \/\-]/i);1===c.length&&(a=c[0]);1<c.length&&(a=c[0]+".",c.shift(),a+=c.join(""));return Number(a)};g.isMobileFallback=function(a){return g.detectMobileBrowsers.fullPattern.test(a)||g.detectMobileBrowsers.shortPattern.test(a.substr(0,4))};g.isTabletFallback=function(a){return g.detectMobileBrowsers.tabletPattern.test(a)}; g.prepareDetectionCache=function(a,c,e){if(a.mobile===b){var h;(h=g.findMatch(g.mobileDetectRules.tablets,c))?(a.mobile=a.tablet=h,a.phone=null):(h=g.findMatch(g.mobileDetectRules.phones,c))?(a.mobile=a.phone=h,a.tablet=null):g.isMobileFallback(c)?(c=d.isPhoneSized(e),c===b?(a.mobile=g.FALLBACK_MOBILE,a.tablet=a.phone=null):c?(a.mobile=a.phone=g.FALLBACK_PHONE,a.tablet=null):(a.mobile=a.tablet=g.FALLBACK_TABLET,a.phone=null)):g.isTabletFallback(c)?(a.mobile=a.tablet=g.FALLBACK_TABLET,a.phone=null): a.mobile=a.tablet=a.phone=null}};g.mobileGrade=function(a){var c=null!==a.mobile();if(a.os("iOS")&&4.3<=a.version("iPad")||a.os("iOS")&&3.1<=a.version("iPhone")||a.os("iOS")&&3.1<=a.version("iPod")||2.1<a.version("Android")&&a.is("Webkit")||7<=a.version("Windows Phone OS")||a.is("BlackBerry")&&6<=a.version("BlackBerry")||a.match("Playbook.*Tablet")||1.4<=a.version("webOS")&&a.match("Palm|Pre|Pixi")||a.match("hp.*TouchPad")||a.is("Firefox")&&12<=a.version("Firefox")||a.is("Chrome")&&a.is("AndroidOS")&& 4<=a.version("Android")||a.is("Skyfire")&&4.1<=a.version("Skyfire")&&a.is("AndroidOS")&&2.3<=a.version("Android")||a.is("Opera")&&11<a.version("Opera Mobi")&&a.is("AndroidOS")||a.is("MeeGoOS")||a.is("Tizen")||a.is("Dolfin")&&2<=a.version("Bada")||(a.is("UC Browser")||a.is("Dolfin"))&&2.3<=a.version("Android")||a.match("Kindle Fire")||a.is("Kindle")&&3<=a.version("Kindle")||a.is("AndroidOS")&&a.is("NookTablet")||11<=a.version("Chrome")&&!c||5<=a.version("Safari")&&!c||4<=a.version("Firefox")&&!c|| 7<=a.version("MSIE")&&!c||10<=a.version("Opera")&&!c)return"A";if(a.os("iOS")&&4.3>a.version("iPad")||a.os("iOS")&&3.1>a.version("iPhone")||a.os("iOS")&&3.1>a.version("iPod")||a.is("Blackberry")&&5<=a.version("BlackBerry")&&6>a.version("BlackBerry")||5<=a.version("Opera Mini")&&6.5>=a.version("Opera Mini")&&(2.3<=a.version("Android")||a.is("iOS"))||a.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||11<=a.version("Opera Mobi")&&a.is("SymbianOS"))return"B";5>a.version("BlackBerry")||a.match("MSIEMobile|Windows CE.*Mobile")|| a.version("Windows Mobile");return"C"};g.detectOS=function(a){return g.findMatch(g.mobileDetectRules.oss0,a)||g.findMatch(g.mobileDetectRules.oss,a)};g.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height};d.prototype={constructor:d,mobile:function(){g.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth);return this._cache.mobile},phone:function(){g.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth);return this._cache.phone}, tablet:function(){g.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth);return this._cache.tablet},userAgent:function(){this._cache.userAgent===b&&(this._cache.userAgent=g.findMatch(g.mobileDetectRules.uas,this.ua));return this._cache.userAgent},userAgents:function(){this._cache.userAgents===b&&(this._cache.userAgents=g.findMatches(g.mobileDetectRules.uas,this.ua));return this._cache.userAgents},os:function(){this._cache.os===b&&(this._cache.os=g.detectOS(this.ua));return this._cache.os}, version:function(a){return g.getVersion(a,this.ua)},versionStr:function(a){return g.getVersionStr(a,this.ua)},is:function(b){return c(this.userAgents(),b)||a(b,this.os())||a(b,this.phone())||a(b,this.tablet())||c(g.findMatches(g.mobileDetectRules.utils,this.ua),b)},match:function(a){a instanceof RegExp||(a=new RegExp(a,"i"));return a.test(this.ua)},isPhoneSized:function(a){return d.isPhoneSized(a||this.maxPhoneWidth)},mobileGrade:function(){this._cache.grade===b&&(this._cache.grade=g.mobileGrade(this)); return this._cache.grade}};d.isPhoneSized="undefined"!==typeof window&&window.screen?function(a){return 0>a?b:g.getDeviceSmallerSide()<=a}:function(){};d._impl=g;return d})})(function(k){return"undefined"!==typeof p&&p.exports?function(b){p.exports=b()}:f(198)}())},function(p,k,f){p.exports=f(71)},function(p,k,f){var n=f(5),b=f(44),a=f(61);p.exports={Mixin:{componentDidMount:function(){this.props.autoFocus&&a(b(this))}},focusDOMComponent:function(){a(n.getNode(this._rootNodeID))}}},function(p,k,f){function n(){var a= window.opera;return"object"===("undefined"===typeof a?"undefined":d(a))&&"function"===typeof a.version&&12>=parseInt(a.version(),10)}function b(a,c){switch(a){case z.topKeyUp:return-1!==t.indexOf(c.keyCode);case z.topKeyDown:return 229!==c.keyCode;case z.topKeyPress:case z.topMouseDown:case z.topBlur:return!0;default:return!1}}function a(a){a=a.detail;return"object"===("undefined"===typeof a?"undefined":d(a))&&"data"in a?a.data:null}function c(c,b){switch(c){case z.topCompositionEnd:return a(b);case z.topKeyPress:if(32!== b.which)return null;A=!0;return x;case z.topTextInput:var e=b.data;return e===x&&A?null:e;default:return null}}function e(a,c){if(C){if(a===z.topCompositionEnd||b(a,c)){var e=C.getData();l.release(C);C=null;return e}return null}switch(a){case z.topPaste:return null;case z.topKeyPress:return c.which&&(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey)?String.fromCharCode(c.which):null;case z.topCompositionEnd:return v?null:c.data;default:return null}}var d="function"===typeof Symbol&&"symbol"=== typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a};k=f(11);var g=f(21),h=f(4),l=f(126),m=f(156),r=f(159);f=f(13);var t=[9,13,27,32],w=h.canUseDOM&&"CompositionEvent"in window,u=null;h.canUseDOM&&"documentMode"in document&&(u=document.documentMode);var q=h.canUseDOM&&"TextEvent"in window&&!u&&!n(),v=h.canUseDOM&&(!w||u&&8<u&&11>=u),x=String.fromCharCode(32),z=k.topLevelTypes,B={beforeInput:{phasedRegistrationNames:{bubbled:f({onBeforeInput:null}), captured:f({onBeforeInputCapture:null})},dependencies:[z.topCompositionEnd,z.topKeyPress,z.topTextInput,z.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:f({onCompositionEnd:null}),captured:f({onCompositionEndCapture:null})},dependencies:[z.topBlur,z.topCompositionEnd,z.topKeyDown,z.topKeyPress,z.topKeyUp,z.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:f({onCompositionStart:null}),captured:f({onCompositionStartCapture:null})},dependencies:[z.topBlur,z.topCompositionStart, z.topKeyDown,z.topKeyPress,z.topKeyUp,z.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:f({onCompositionUpdate:null}),captured:f({onCompositionUpdateCapture:null})},dependencies:[z.topBlur,z.topCompositionUpdate,z.topKeyDown,z.topKeyPress,z.topKeyUp,z.topMouseDown]}},A=!1,C=null;p.exports={eventTypes:B,extractEvents:function(d,h,f,t,u){var k;var x;if(w)b:{switch(d){case z.topCompositionStart:x=B.compositionStart;break b;case z.topCompositionEnd:x=B.compositionEnd;break b;case z.topCompositionUpdate:x= B.compositionUpdate;break b}x=void 0}else C?b(d,t)&&(x=B.compositionEnd):d===z.topKeyDown&&229===t.keyCode&&(x=B.compositionStart);x?(v&&(C||x!==B.compositionStart?x===B.compositionEnd&&C&&(k=C.getData()):C=l.getPooled(h)),h=m.getPooled(x,f,t,u),k?h.data=k:(k=a(t),null!==k&&(h.data=k)),g.accumulateTwoPhaseDispatches(h),k=h):k=null;(d=q?c(d,t):e(d,t))?(f=r.getPooled(B.beforeInput,f,t,u),f.data=d,g.accumulateTwoPhaseDispatches(f)):f=null;return[k,f]}}},function(p,k,f){var n=f(65),b=f(4);k=f(8);f(104); var a=f(164),c=f(109),e=f(113);f(2);var d=e(function(a){return c(a)}),g=!1,h="cssFloat";if(b.canUseDOM){f=document.createElement("div").style;try{f.font=""}catch(l){g=!0}void 0===document.documentElement.style.cssFloat&&(h="styleFloat")}f={createMarkupForStyles:function(c){var b="",e;for(e in c)if(c.hasOwnProperty(e)){var g=c[e];null!=g&&(b+=d(e)+":",b+=a(e,g)+";")}return b||null},setValueForStyles:function(c,b){var e=c.style,d;for(d in b)if(b.hasOwnProperty(d)){var f=a(d,b[d]);"float"===d&&(d=h); if(f)e[d]=f;else if(f=g&&n.shorthandPropertyExpansions[d])for(var u in f)e[u]="";else e[d]=""}}};k.measureMethods(f,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"});p.exports=f},function(p,k,f){function n(a){a=v.getPooled(C.change,D,a,x(a));w.accumulateTwoPhaseDispatches(a);q.batchedUpdates(b,a)}function b(a){t.enqueueEvents(a);t.processEventQueue(!1)}function a(){G&&(G.detachEvent("onchange",n),D=G=null)}function c(a,c,b){if(a===A.topChange)return b}function e(c,b,e){c===A.topFocus? (a(),G=b,D=e,G.attachEvent("onchange",n)):c===A.topBlur&&a()}function d(){G&&(delete G.value,G.detachEvent("onpropertychange",g),E=H=D=G=null)}function g(a){if("value"===a.propertyName){var c=a.srcElement.value;c!==H&&(H=c,n(a))}}function h(a,c,b){if(a===A.topInput)return b}function l(a,c,b){a===A.topFocus?(d(),G=c,D=b,H=c.value,E=Object.getOwnPropertyDescriptor(c.constructor.prototype,"value"),Object.defineProperty(G,"value",O),G.attachEvent("onpropertychange",g)):a===A.topBlur&&d()}function m(a, c,b){if((a===A.topSelectionChange||a===A.topKeyUp||a===A.topKeyDown)&&G&&G.value!==H)return H=G.value,D}function r(a,c,b){if(a===A.topClick)return b}k=f(11);var t=f(20),w=f(21),u=f(4),q=f(9),v=f(16),x=f(47),z=f(50),B=f(92);f=f(13);var A=k.topLevelTypes,C={change:{phasedRegistrationNames:{bubbled:f({onChange:null}),captured:f({onChangeCapture:null})},dependencies:[A.topBlur,A.topChange,A.topClick,A.topFocus,A.topInput,A.topKeyDown,A.topKeyUp,A.topSelectionChange]}},G=null,D=null,H=null,E=null,F=!1; u.canUseDOM&&(F=z("change")&&(!("documentMode"in document)||8<document.documentMode));var I=!1;u.canUseDOM&&(I=z("input")&&(!("documentMode"in document)||9<document.documentMode));var O={get:function(){return E.get.call(this)},set:function(a){H=""+a;E.set.call(this,a)}};p.exports={eventTypes:C,extractEvents:function(a,b,d,g,f){var t,q,u=b.nodeName&&b.nodeName.toLowerCase();"select"===u||"input"===u&&"file"===b.type?F?t=c:q=e:B(b)?I?t=h:(t=m,q=l):!b.nodeName||"input"!==b.nodeName.toLowerCase()||"checkbox"!== b.type&&"radio"!==b.type||(t=r);if(t&&(t=t(a,b,d)))return a=v.getPooled(C.change,t,g,f),a.type="change",w.accumulateTwoPhaseDispatches(a),a;q&&q(a,b,d)}}},function(p,k){var f=0;p.exports={createReactRootIndex:function(){return f++}}},function(p,k,f){var n=f(4),b=f(106),a=f(10),c=f(63),e=f(1),d=/^(<[^ \/>]+)/;p.exports={dangerouslyRenderMarkup:function(g){n.canUseDOM?void 0:e(!1);for(var h,l={},m=0;m<g.length;m++)g[m]?void 0:e(!1),h=g[m],h=h.substring(1,h.indexOf(" ")),h=c(h)?h:"*",l[h]=l[h]||[],l[h][m]= g[m];var m=[],f=0;for(h in l)if(l.hasOwnProperty(h)){var t=l[h],w;for(w in t)t.hasOwnProperty(w)&&(t[w]=t[w].replace(d,'$1 data-danger-index="'+w+'" '));for(var t=b(t.join(""),a),u=0;u<t.length;++u){var q=t[u];q.hasAttribute&&q.hasAttribute("data-danger-index")&&(w=+q.getAttribute("data-danger-index"),q.removeAttribute("data-danger-index"),m.hasOwnProperty(w)?e(!1):void 0,m[w]=q,f+=1)}}f!==m.length?e(!1):void 0;m.length!==g.length?e(!1):void 0;return m},dangerouslyReplaceNodeWithMarkup:function(c, d){n.canUseDOM?void 0:e(!1);d?void 0:e(!1);"html"===c.tagName.toLowerCase()?e(!1):void 0;var l;l="string"===typeof d?b(d,a)[0]:d;c.parentNode.replaceChild(l,c)}}},function(p,k,f){k=f(13);k=[k({ResponderEventPlugin:null}),k({SimpleEventPlugin:null}),k({TapEventPlugin:null}),k({EnterLeaveEventPlugin:null}),k({ChangeEventPlugin:null}),k({SelectEventPlugin:null}),k({BeforeInputEventPlugin:null})];p.exports=k},function(p,k,f){k=f(11);var n=f(21),b=f(28),a=f(5);f=f(13);var c=k.topLevelTypes,e=a.getFirstReactDOM, d={mouseEnter:{registrationName:f({onMouseEnter:null}),dependencies:[c.topMouseOut,c.topMouseOver]},mouseLeave:{registrationName:f({onMouseLeave:null}),dependencies:[c.topMouseOut,c.topMouseOver]}},g=[null,null];p.exports={eventTypes:d,extractEvents:function(h,l,m,f,t){if(h===c.topMouseOver&&(f.relatedTarget||f.fromElement)||h!==c.topMouseOut&&h!==c.topMouseOver)return null;var w;if(l.window===l)w=l;else{var u=l.ownerDocument;w=u?u.defaultView||u.parentWindow:window}var q=u="";h===c.topMouseOut?(h= l,u=m,(l=e(f.relatedTarget||f.toElement))?q=a.getID(l):l=w,l=l||w):(h=w,q=m);if(h===l)return null;m=b.getPooled(d.mouseLeave,u,f,t);m.type="mouseleave";m.target=h;m.relatedTarget=l;f=b.getPooled(d.mouseEnter,q,f,t);f.type="mouseenter";f.target=l;f.relatedTarget=h;n.accumulateEnterLeaveDispatches(m,f,u,q);g[0]=m;g[1]=f;return g}}},function(p,k,f){function n(a,e,h,l){var m=a.type||"unknown-event";a.currentTarget=c.Mount.getNode(l);e?b.invokeGuardedCallbackWithCatch(m,h,a,l):b.invokeGuardedCallback(m, h,a,l);a.currentTarget=null}k=f(11);var b=f(80),a=f(1);f(2);var c={Mount:null,injectMount:function(a){c.Mount=a}},e=k.topLevelTypes;p.exports={isEndish:function(a){return a===e.topMouseUp||a===e.topTouchEnd||a===e.topTouchCancel},isMoveish:function(a){return a===e.topMouseMove||a===e.topTouchMove},isStartish:function(a){return a===e.topMouseDown||a===e.topTouchStart},executeDirectDispatch:function(c){var b=c._dispatchListeners,e=c._dispatchIDs;Array.isArray(b)?a(!1):void 0;b=b?b(c,e):null;c._dispatchListeners= null;c._dispatchIDs=null;return b},executeDispatchesInOrder:function(a,c){var b=a._dispatchListeners,e=a._dispatchIDs;if(Array.isArray(b))for(var m=0;m<b.length&&!a.isPropagationStopped();m++)n(a,c,b[m],e[m]);else b&&n(a,c,b,e);a._dispatchListeners=null;a._dispatchIDs=null},executeDispatchesInOrderStopAtTrue:function(a){var c;a:{c=a._dispatchListeners;var b=a._dispatchIDs;if(Array.isArray(c))for(var e=0;e<c.length&&!a.isPropagationStopped();e++){if(c[e](a,b[e])){c=b[e];break a}}else if(c&&c(a,b)){c= b;break a}c=null}a._dispatchIDs=null;a._dispatchListeners=null;return c},hasDispatches:function(a){return!!a._dispatchListeners},getNode:function(a){return c.Mount.getNode(a)},getID:function(a){return c.Mount.getID(a)},injection:c}},function(p,k,f){function n(a){this._root=a;this._startText=this.getText();this._fallbackText=null}k=f(14);var b=f(3),a=f(91);b(n.prototype,{destructor:function(){this._fallbackText=this._startText=this._root=null},getText:function(){return"value"in this._root?this._root.value: this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var a,b=this._startText,d=b.length,g,h=this.getText(),l=h.length;for(a=0;a<d&&b[a]===h[a];a++);var m=d-a;for(g=1;g<=m&&b[d-g]===h[l-g];g++);return this._fallbackText=h.slice(a,1<g?1-g:void 0)}});k.addPoolingTo(n);p.exports=n},function(p,k,f){var n=f(17),b=f(4);f=n.injection.MUST_USE_ATTRIBUTE;k=n.injection.MUST_USE_PROPERTY;var a=n.injection.HAS_BOOLEAN_VALUE,c=n.injection.HAS_SIDE_EFFECTS,e=n.injection.HAS_NUMERIC_VALUE, d=n.injection.HAS_POSITIVE_NUMERIC_VALUE,n=n.injection.HAS_OVERLOADED_BOOLEAN_VALUE,g;b.canUseDOM&&(g=(g=document.implementation)&&g.hasFeature&&g.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));g={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:f|a,allowTransparency:f,alt:null,async:a,autoComplete:null,autoPlay:a,capture:f|a,cellPadding:null,cellSpacing:null, charSet:f,challenge:f,checked:k|a,classID:f,className:g?f:k,cols:f|d,colSpan:null,content:null,contentEditable:null,contextMenu:f,controls:k|a,coords:null,crossOrigin:null,data:null,dateTime:f,"default":a,defer:a,dir:null,disabled:f|a,download:n,draggable:null,encType:null,form:f,formAction:f,formEncType:f,formMethod:f,formNoValidate:a,formTarget:f,frameBorder:f,headers:null,height:f,hidden:f|a,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:k,inputMode:f,integrity:null, is:f,keyParams:f,keyType:f,kind:null,label:null,lang:null,list:f,loop:k|a,low:null,manifest:f,marginHeight:null,marginWidth:null,max:null,maxLength:f,media:f,mediaGroup:null,method:null,min:null,minLength:f,multiple:k|a,muted:k|a,name:null,nonce:f,noValidate:a,open:a,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:k|a,rel:null,required:a,reversed:a,role:f,rows:f|d,rowSpan:null,sandbox:null,scope:null,scoped:a,scrolling:null,seamless:f|a,selected:k|a,shape:null, size:f|d,sizes:f,span:d,spellCheck:null,src:null,srcDoc:k,srcLang:null,srcSet:f,start:e,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:k|c,width:f,wmode:f,wrap:null,about:f,datatype:f,inlist:f,prefix:f,property:f,resource:f,"typeof":f,vocab:f,autoCapitalize:f,autoCorrect:f,autoSave:null,color:null,itemProp:f,itemScope:f|a,itemType:f,itemID:f,itemRef:f,results:null,security:f,unselectable:f},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class", htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};p.exports=g},function(p,k,f){k=f(71);var n=f(138),b=f(143),a=f(3);f=f(165);var c={};a(c,b);a(c,{findDOMNode:f("findDOMNode","ReactDOM","react-dom",k,k.findDOMNode),render:f("render","ReactDOM","react-dom",k,k.render),unmountComponentAtNode:f("unmountComponentAtNode", "ReactDOM","react-dom",k,k.unmountComponentAtNode),renderToString:f("renderToString","ReactDOMServer","react-dom/server",n,n.renderToString),renderToStaticMarkup:f("renderToStaticMarkup","ReactDOMServer","react-dom/server",n,n.renderToStaticMarkup)});c.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k;c.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=n;p.exports=c},function(p,k,f){f(22);var n=f(44);f(2);p.exports={getDOMNode:function(){void 0;this.constructor._getDOMNodeDidWarn=!0;return n(this)}}}, function(p,k,f){function n(c,b,e){var l=void 0===c[e];null!=b&&l&&(c[e]=a(b,null))}var b=f(15),a=f(49),c=f(52),e=f(53);f(2);p.exports={instantiateChildren:function(a,c,b){if(null==a)return null;c={};e(a,n,c);return c},updateChildren:function(e,g,h,l){if(!g&&!e)return null;for(var m in g)if(g.hasOwnProperty(m)){var f=e&&e[m],t=f&&f._currentElement,w=g[m];null!=f&&c(t,w)?b.receiveComponent(f,w,h,l):(f&&b.unmountComponent(f,m),f=a(w,null));g[m]=f}for(m in e)!e.hasOwnProperty(m)||g&&g.hasOwnProperty(m)|| b.unmountComponent(e[m]);return g},unmountChildren:function(a){for(var c in a)a.hasOwnProperty(c)&&b.unmountComponent(a[c])}}},function(p,k,f){function n(a){}var b="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},a=f(40),c=f(12),e=f(6),d=f(22);k=f(8);f(27);f(26);var g=f(15),h=f(42),l=f(3),m=f(19),r=f(1),t=f(52);f(2);n.prototype.render=function(){var a=d.get(this)._currentElement.type; return a(this.props,this.context,this.updater)};var w=1;f={construct:function(a){this._currentElement=a;this._pendingStateQueue=this._pendingElement=this._instance=this._rootNodeID=null;this._pendingForceUpdate=this._pendingReplaceState=!1;this._context=this._renderedComponent=null;this._mountOrder=0;this._pendingCallbacks=this._topLevelWrapper=null},mountComponent:function(a,c,l){this._context=l;this._mountOrder=w++;this._rootNodeID=a;var f=this._processProps(this._currentElement.props),t=this._processContext(l), k=this._currentElement.type,p,C,G="prototype"in k;G&&(p=new k(f,t,h));if(!G||null===p||!1===p||e.isValidElement(p))C=p,p=new n(k);p.props=f;p.context=t;p.refs=m;p.updater=h;this._instance=p;d.set(p,this);f=p.state;void 0===f&&(p.state=f=null);"object"!==("undefined"===typeof f?"undefined":b(f))||Array.isArray(f)?r(!1):void 0;this._pendingStateQueue=null;this._pendingForceUpdate=this._pendingReplaceState=!1;p.componentWillMount&&(p.componentWillMount(),this._pendingStateQueue&&(p.state=this._processPendingState(p.props, p.context)));void 0===C&&(C=this._renderValidatedComponent());this._renderedComponent=this._instantiateReactComponent(C);a=g.mountComponent(this._renderedComponent,a,c,this._processChildContext(l));p.componentDidMount&&c.getReactMountReady().enqueue(p.componentDidMount,p);return a},unmountComponent:function(){var a=this._instance;a.componentWillUnmount&&a.componentWillUnmount();g.unmountComponent(this._renderedComponent);this._pendingStateQueue=this._instance=this._renderedComponent=null;this._pendingForceUpdate= this._pendingReplaceState=!1;this._topLevelWrapper=this._rootNodeID=this._context=this._pendingElement=this._pendingCallbacks=null;d.remove(a)},_maskContext:function(a){var c=null,b=this._currentElement.type.contextTypes;if(!b)return m;var c={},e;for(e in b)c[e]=a[e];return c},_processContext:function(a){return this._maskContext(a)},_processChildContext:function(a){var c=this._currentElement.type,e=this._instance;if(e=e.getChildContext&&e.getChildContext()){"object"!==b(c.childContextTypes)?r(!1): void 0;for(var d in e)d in c.childContextTypes?void 0:r(!1);return l({},a,e)}return a},_processProps:function(a){return a},_checkPropTypes:function(a,c,b){var e=this.getName(),d;for(d in a)if(a.hasOwnProperty(d)){var g;try{"function"!==typeof a[d]?r(!1):void 0,g=a[d](c,d,e,b)}catch(h){g=h}if(g instanceof Error){var l=this._currentElement._owner||null;l&&l.getName();void 0}}},receiveComponent:function(a,c,b){var e=this._currentElement,d=this._context;this._pendingElement=null;this.updateComponent(c, e,a,d,b)},performUpdateIfNecessary:function(a){null!=this._pendingElement&&g.receiveComponent(this,this._pendingElement||this._currentElement,a,this._context);(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(a,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(a,c,b,e,d){e=this._instance;var g=this._context===d?e.context:this._processContext(d);c===b?c=b.props:(c=this._processProps(b.props),e.componentWillReceiveProps&& e.componentWillReceiveProps(c,g));var h=this._processPendingState(c,g);this._pendingForceUpdate||!e.shouldComponentUpdate||e.shouldComponentUpdate(c,h,g)?(this._pendingForceUpdate=!1,this._performComponentUpdate(b,c,h,g,a,d)):(this._currentElement=b,this._context=d,e.props=c,e.state=h,e.context=g)},_processPendingState:function(a,c){var b=this._instance,e=this._pendingStateQueue,d=this._pendingReplaceState;this._pendingReplaceState=!1;this._pendingStateQueue=null;if(!e)return b.state;if(d&&1===e.length)return e[0]; for(var g=l({},d?e[0]:b.state),d=d?1:0;d<e.length;d++){var h=e[d];l(g,"function"===typeof h?h.call(b,g,a,c):h)}return g},_performComponentUpdate:function(a,c,b,e,d,g){var h=this._instance,l=Boolean(h.componentDidUpdate),m,f,r;l&&(m=h.props,f=h.state,r=h.context);h.componentWillUpdate&&h.componentWillUpdate(c,b,e);this._currentElement=a;this._context=g;h.props=c;h.state=b;h.context=e;this._updateRenderedComponent(d,g);l&&d.getReactMountReady().enqueue(h.componentDidUpdate.bind(h,m,f,r),h)},_updateRenderedComponent:function(a, c){var b=this._renderedComponent,e=b._currentElement,d=this._renderValidatedComponent();if(t(e,d))g.receiveComponent(b,d,a,this._processChildContext(c));else{var h=this._rootNodeID,e=b._rootNodeID;g.unmountComponent(b);this._renderedComponent=this._instantiateReactComponent(d);b=g.mountComponent(this._renderedComponent,h,a,this._processChildContext(c));this._replaceNodeWithMarkupByID(e,b)}},_replaceNodeWithMarkupByID:function(c,b){a.replaceNodeWithMarkupByID(c,b)},_renderValidatedComponentWithoutOwnerOrContext:function(){return this._instance.render()}, _renderValidatedComponent:function(){var a;c.current=this;try{a=this._renderValidatedComponentWithoutOwnerOrContext()}finally{c.current=null}null===a||!1===a||e.isValidElement(a)?void 0:r(!1);return a},attachRef:function(a,c){var b=this.getPublicInstance();null==b?r(!1):void 0;var e=c.getPublicInstance();(b.refs===m?b.refs={}:b.refs)[a]=e},detachRef:function(a){delete this.getPublicInstance().refs[a]},getName:function(){var a=this._currentElement.type,c=this._instance&&this._instance.constructor; return a.displayName||c&&c.displayName||a.name||c&&c.name||null},getPublicInstance:function(){var a=this._instance;return a instanceof n?null:a},_instantiateReactComponent:null};k.measureMethods(f,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});p.exports={Mixin:f}},function(p,k){var f={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0, onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0};p.exports={getNativeProps:function(k,b,a){if(!b.disabled)return b;k={};for(var c in b)b.hasOwnProperty(c)&&!f[c]&&(k[c]=b[c]);return k}}},function(p,k,f){function n(){return this}function b(){return!!this._reactInternalComponent}function a(){}function c(a,c){var b=this._reactInternalComponent;b&&(J.enqueueSetPropsInternal(b,a),c&&J.enqueueCallbackInternal(b,c))}function e(a,c){var b=this._reactInternalComponent;b&&(J.enqueueReplacePropsInternal(b, a),c&&J.enqueueCallbackInternal(b,c))}function d(a,c){c&&(null!=c.dangerouslySetInnerHTML&&(null!=c.children?S(!1):void 0,"object"===u(c.dangerouslySetInnerHTML)&&Z in c.dangerouslySetInnerHTML?void 0:S(!1)),null!=c.style&&"object"!==u(c.style)?S(!1):void 0)}function g(a,c,b,e){var d=I.findReactContainerForID(a);d&&V(c,1===d.nodeType?d.ownerDocument:d);e.getReactMountReady().enqueue(h,{id:a,registrationName:c,listener:b})}function h(){A.putListener(this.id,this.registrationName,this.listener)}function l(){this._rootNodeID? void 0:S(!1);var a=I.getNode(this._rootNodeID);a?void 0:S(!1);switch(this._tag){case "iframe":this._wrapperState.listeners=[A.trapBubbledEvent(B.topLevelTypes.topLoad,"load",a)];break;case "video":case "audio":this._wrapperState.listeners=[];for(var c in da)da.hasOwnProperty(c)&&this._wrapperState.listeners.push(A.trapBubbledEvent(B.topLevelTypes[c],da[c],a));break;case "img":this._wrapperState.listeners=[A.trapBubbledEvent(B.topLevelTypes.topError,"error",a),A.trapBubbledEvent(B.topLevelTypes.topLoad, "load",a)];break;case "form":this._wrapperState.listeners=[A.trapBubbledEvent(B.topLevelTypes.topReset,"reset",a),A.trapBubbledEvent(B.topLevelTypes.topSubmit,"submit",a)]}}function m(){D.mountReadyWrapper(this)}function r(){E.postUpdateWrapper(this)}function t(a,c){return 0<=a.indexOf("-")||null!=c.is}function w(a){fa.call(ja,a)||(na.test(a)?void 0:S(!1),ja[a]=!0);this._tag=a.toLowerCase();this._nodeWithLegacyProperties=this._topLevelWrapper=this._wrapperState=this._rootNodeID=this._previousStyleCopy= this._previousStyle=this._renderedChildren=null}var u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},q=f(117),v=f(119),x=f(17),z=f(37),B=f(11),A=f(25),C=f(39),G=f(132),D=f(135),H=f(136),E=f(73),F=f(139),I=f(5);k=f(144);var O=f(8),J=f(42),K=f(3),T=f(30),U=f(31),S=f(1);f(50);var L=f(13),P=f(32),Q=f(51);f(64);f(54);f(2);var M=A.deleteListener,V=A.listenTo,X=A.registrationNameModules, W={string:!0,number:!0},N=L({children:null}),ga=L({style:null}),Z=L({__html:null}),da={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"},ca={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},ka={listing:!0,pre:!0,textarea:!0};K({menuitem:!0},ca);var na=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ja={},fa={}.hasOwnProperty;w.displayName="ReactDOMComponent";w.Mixin={construct:function(a){this._currentElement=a},mountComponent:function(a,c,b){this._rootNodeID= a;a=this._currentElement.props;switch(this._tag){case "iframe":case "img":case "form":case "video":case "audio":this._wrapperState={listeners:null};c.getReactMountReady().enqueue(l,this);break;case "button":a=G.getNativeProps(this,a,b);break;case "input":D.mountWrapper(this,a,b);a=D.getNativeProps(this,a,b);break;case "option":H.mountWrapper(this,a,b);a=H.getNativeProps(this,a,b);break;case "select":E.mountWrapper(this,a,b);a=E.getNativeProps(this,a,b);b=E.processChildContext(this,a,b);break;case "textarea":F.mountWrapper(this, a,b),a=F.getNativeProps(this,a,b)}d(this,a);if(c.useCreateElement){var e=b[I.ownerDocumentContextKey].createElement(this._currentElement.type);z.setAttributeForID(e,this._rootNodeID);I.getID(e);this._updateDOMProperties({},a,c,e);this._createInitialChildren(c,a,b,e);b=e}else e=this._createOpenTagMarkupAndPutListeners(c,a),b=this._createContentMarkup(c,a,b),b=!b&&ca[this._tag]?e+"/>":e+">"+b+"</"+this._currentElement.type+">";switch(this._tag){case "input":c.getReactMountReady().enqueue(m,this);case "button":case "select":case "textarea":a.autoFocus&& c.getReactMountReady().enqueue(q.focusDOMComponent,this)}return b},_createOpenTagMarkupAndPutListeners:function(a,c){var b="<"+this._currentElement.type,e;for(e in c)if(c.hasOwnProperty(e)){var d=c[e];if(null!=d)if(X.hasOwnProperty(e))d&&g(this._rootNodeID,e,d,a);else{e===ga&&(d&&(d=this._previousStyleCopy=K({},c.style)),d=v.createMarkupForStyles(d));var h=null;null!=this._tag&&t(this._tag,c)?e!==N&&(h=z.createMarkupForCustomAttribute(e,d)):h=z.createMarkupForProperty(e,d);h&&(b+=" "+h)}}if(a.renderToStaticMarkup)return b; e=z.createMarkupForID(this._rootNodeID);return b+" "+e},_createContentMarkup:function(a,c,b){var e="",d=c.dangerouslySetInnerHTML;null!=d?null!=d.__html&&(e=d.__html):(d=W[u(c.children)]?c.children:null,c=null!=d?null:c.children,null!=d?e=U(d):null!=c&&(e=this.mountChildren(c,a,b).join("")));return ka[this._tag]&&"\n"===e.charAt(0)?"\n"+e:e},_createInitialChildren:function(a,c,b,e){var d=c.dangerouslySetInnerHTML;if(null!=d)null!=d.__html&&P(e,d.__html);else if(d=W[u(c.children)]?c.children:null, c=null!=d?null:c.children,null!=d)Q(e,d);else if(null!=c)for(a=this.mountChildren(c,a,b),b=0;b<a.length;b++)e.appendChild(a[b])},receiveComponent:function(a,c,b){var e=this._currentElement;this._currentElement=a;this.updateComponent(c,e,a,b)},updateComponent:function(a,c,b,e){c=c.props;b=this._currentElement.props;switch(this._tag){case "button":c=G.getNativeProps(this,c);b=G.getNativeProps(this,b);break;case "input":D.updateWrapper(this);c=D.getNativeProps(this,c);b=D.getNativeProps(this,b);break; case "option":c=H.getNativeProps(this,c);b=H.getNativeProps(this,b);break;case "select":c=E.getNativeProps(this,c);b=E.getNativeProps(this,b);break;case "textarea":F.updateWrapper(this),c=F.getNativeProps(this,c),b=F.getNativeProps(this,b)}d(this,b);this._updateDOMProperties(c,b,a,null);this._updateDOMChildren(c,b,a,e);!T&&this._nodeWithLegacyProperties&&(this._nodeWithLegacyProperties.props=b);"select"===this._tag&&a.getReactMountReady().enqueue(r,this)},_updateDOMProperties:function(a,c,b,e){var d, h,l;for(d in a)if(!c.hasOwnProperty(d)&&a.hasOwnProperty(d))if(d===ga){var m=this._previousStyleCopy;for(h in m)m.hasOwnProperty(h)&&(l=l||{},l[h]="");this._previousStyleCopy=null}else if(X.hasOwnProperty(d))a[d]&&M(this._rootNodeID,d);else if(x.properties[d]||x.isCustomAttribute(d))e||(e=I.getNode(this._rootNodeID)),z.deleteValueForProperty(e,d);for(d in c){var m=c[d],f=d===ga?this._previousStyleCopy:a[d];if(c.hasOwnProperty(d)&&m!==f)if(d===ga)if(m?m=this._previousStyleCopy=K({},m):this._previousStyleCopy= null,f){for(h in f)!f.hasOwnProperty(h)||m&&m.hasOwnProperty(h)||(l=l||{},l[h]="");for(h in m)m.hasOwnProperty(h)&&f[h]!==m[h]&&(l=l||{},l[h]=m[h])}else l=m;else if(X.hasOwnProperty(d))m?g(this._rootNodeID,d,m,b):f&&M(this._rootNodeID,d);else if(t(this._tag,c))e||(e=I.getNode(this._rootNodeID)),d===N&&(m=null),z.setValueForAttribute(e,d,m);else if(x.properties[d]||x.isCustomAttribute(d))e||(e=I.getNode(this._rootNodeID)),null!=m?z.setValueForProperty(e,d,m):z.deleteValueForProperty(e,d)}l&&(e||(e= I.getNode(this._rootNodeID)),v.setValueForStyles(e,l))},_updateDOMChildren:function(a,c,b,e){var d=W[u(a.children)]?a.children:null,g=W[u(c.children)]?c.children:null,h=a.dangerouslySetInnerHTML&&a.dangerouslySetInnerHTML.__html,l=c.dangerouslySetInnerHTML&&c.dangerouslySetInnerHTML.__html;c=null!=g?null:c.children;var m=null!=d||null!=h,f=null!=g||null!=l;null!=(null!=d?null:a.children)&&null==c?this.updateChildren(null,b,e):m&&!f&&this.updateTextContent("");null!=g?d!==g&&this.updateTextContent(""+ g):null!=l?h!==l&&this.updateMarkup(""+l):null!=c&&this.updateChildren(c,b,e)},unmountComponent:function(){switch(this._tag){case "iframe":case "img":case "form":case "video":case "audio":var a=this._wrapperState.listeners;if(a)for(var c=0;c<a.length;c++)a[c].remove();break;case "input":D.unmountWrapper(this);break;case "html":case "head":case "body":S(!1)}this.unmountChildren();A.deleteAllListeners(this._rootNodeID);C.unmountIDFromEnvironment(this._rootNodeID);this._wrapperState=this._rootNodeID= null;this._nodeWithLegacyProperties&&(this._nodeWithLegacyProperties=this._nodeWithLegacyProperties._reactInternalComponent=null)},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var d=I.getNode(this._rootNodeID);d._reactInternalComponent=this;d.getDOMNode=n;d.isMounted=b;d.setState=a;d.replaceState=a;d.forceUpdate=a;d.setProps=c;d.replaceProps=e;d.props=this._currentElement.props;this._nodeWithLegacyProperties=d}return this._nodeWithLegacyProperties}};O.measureMethods(w,"ReactDOMComponent", {mountComponent:"mountComponent",updateComponent:"updateComponent"});K(w.prototype,w.Mixin,k.Mixin);p.exports=w},function(p,k,f){var n=f(6);f(77);k=f(112)({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"},function(b){return n.createFactory(b)});p.exports=k},function(p,k,f){function n(){this._rootNodeID&&m.updateWrapper(this)}function b(a){var b= this._currentElement.props;a=c.executeOnChange(b,a);d.asap(n,this);var g=b.name;if("radio"===b.type&&null!=g){for(var m=b=e.getNode(this._rootNodeID);m.parentNode;)m=m.parentNode;g=m.querySelectorAll("input[name="+JSON.stringify(""+g)+'][type="radio"]');for(m=0;m<g.length;m++){var f=g[m];f!==b&&f.form===b.form&&((f=e.getID(f))?void 0:h(!1),(f=l[f])?void 0:h(!1),d.asap(n,f))}}return a}var a=f(41),c=f(38),e=f(5),d=f(9),g=f(3),h=f(1),l={},m={getNativeProps:function(a,b,e){e=c.getValue(b);var d=c.getChecked(b); return g({},b,{defaultChecked:void 0,defaultValue:void 0,value:null!=e?e:a._wrapperState.initialValue,checked:null!=d?d:a._wrapperState.initialChecked,onChange:a._wrapperState.onChange})},mountWrapper:function(a,c){var e=c.defaultValue;a._wrapperState={initialChecked:c.defaultChecked||!1,initialValue:null!=e?e:null,onChange:b.bind(a)}},mountReadyWrapper:function(a){l[a._rootNodeID]=a},unmountWrapper:function(a){delete l[a._rootNodeID]},updateWrapper:function(b){var e=b._currentElement.props,d=e.checked; null!=d&&a.updatePropertyByID(b._rootNodeID,"checked",d||!1);e=c.getValue(e);null!=e&&a.updatePropertyByID(b._rootNodeID,"value",""+e)}};p.exports=m},function(p,k,f){var n=f(68);k=f(73);var b=f(3);f(2);var a=k.valueContextKey;p.exports={mountWrapper:function(c,b,d){d=d[a];var g=null;if(null!=d)if(g=!1,Array.isArray(d))for(var h=0;h<d.length;h++){if(""+d[h]===""+b.value){g=!0;break}}else g=""+d===""+b.value;c._wrapperState={selected:g}},getNativeProps:function(a,e,d){d=b({selected:void 0,children:void 0}, e);null!=a._wrapperState.selected&&(d.selected=a._wrapperState.selected);var g="";n.forEach(e.children,function(a){null!=a&&("string"===typeof a||"number"===typeof a?g+=a:void 0)});g&&(d.children=g);return d}}},function(p,k,f){function n(a){var c=document.selection.createRange(),b=c.text.length,e=c.duplicate();e.moveToElementText(a);e.setEndPoint("EndToStart",c);a=e.text.length;return{start:a,end:a+b}}function b(a){var c=window.getSelection&&window.getSelection();if(!c||0===c.rangeCount)return null; var b=c.anchorNode,e=c.anchorOffset,d=c.focusNode,f=c.focusOffset,w=c.getRangeAt(0);try{w.startContainer.nodeType,w.endContainer.nodeType}catch(q){return null}var c=c.anchorNode===c.focusNode&&c.anchorOffset===c.focusOffset?0:w.toString().length,u=w.cloneRange();u.selectNodeContents(a);u.setEnd(w.startContainer,w.startOffset);a=u.startContainer===u.endContainer&&u.startOffset===u.endOffset?0:u.toString().length;w=a+c;c=document.createRange();c.setStart(b,e);c.setEnd(d,f);b=c.collapsed;return{start:b? w:a,end:b?a:w}}function a(a,c){var b=document.selection.createRange().duplicate(),e,d;"undefined"===typeof c.end?d=e=c.start:c.start>c.end?(e=c.end,d=c.start):(e=c.start,d=c.end);b.moveToElementText(a);b.moveStart("character",e);b.setEndPoint("EndToStart",b);b.moveEnd("character",d-e);b.select()}function c(a,c){if(window.getSelection){var b=window.getSelection(),m=a[d()].length,f=Math.min(c.start,m),m="undefined"===typeof c.end?f:Math.min(c.end,m);if(!b.extend&&f>m)var t=m,m=f,f=t;var t=e(a,f),w= e(a,m);if(t&&w){var u=document.createRange();u.setStart(t.node,t.offset);b.removeAllRanges();f>m?(b.addRange(u),b.extend(w.node,w.offset)):(u.setEnd(w.node,w.offset),b.addRange(u))}}}k=f(4);var e=f(168),d=f(91);f=k.canUseDOM&&"selection"in document&&!("getSelection"in window);p.exports={getOffsets:f?n:b,setOffsets:f?a:c}},function(p,k,f){k=f(76);var n=f(149);f=f(43);k.inject();p.exports={renderToString:n.renderToString,renderToStaticMarkup:n.renderToStaticMarkup,version:f}},function(p,k,f){function n(){this._rootNodeID&& h.updateWrapper(this)}function b(c){c=a.executeOnChange(this._currentElement.props,c);e.asap(n,this);return c}var a=f(38),c=f(41),e=f(9),d=f(3),g=f(1);f(2);var h={getNativeProps:function(a,c,b){null!=c.dangerouslySetInnerHTML?g(!1):void 0;return d({},c,{defaultValue:void 0,value:void 0,children:a._wrapperState.initialValue,onChange:a._wrapperState.onChange})},mountWrapper:function(c,e){var d=e.defaultValue,h=e.children;null!=h&&(null!=d?g(!1):void 0,Array.isArray(h)&&(1>=h.length?void 0:g(!1),h=h[0]), d=""+h);null==d&&(d="");h=a.getValue(e);c._wrapperState={initialValue:""+(null!=h?h:d),onChange:b.bind(c)}},updateWrapper:function(b){var e=a.getValue(b._currentElement.props);null!=e&&c.updatePropertyByID(b._rootNodeID,"value",""+e)}};p.exports=h},function(p,k,f){var n=f(20);p.exports={handleTopLevel:function(b,a,c,e,d){b=n.extractEvents(b,a,c,e,d);n.enqueueEvents(b);n.processEventQueue(!1)}}},function(p,k,f){function n(a,c){this.topLevelType=a;this.nativeEvent=c;this.ancestors=[]}function b(a){void 0; for(var c=g.getFirstReactDOM(m(a.nativeEvent))||window;c;)a.ancestors.push(c),c=g.getID(c),c=d.getReactRootIDFromNodeID(c),c=g.findReactContainerForID(c),c=g.getFirstReactDOM(c);for(var b=0;b<a.ancestors.length;b++){var c=a.ancestors[b],e=g.getID(c)||"";t._handleTopLevel(a.topLevelType,c,e,a.nativeEvent,m(a.nativeEvent))}}function a(a){var c=r(window);a(c)}var c=f(59);k=f(4);var e=f(14),d=f(18),g=f(5),h=f(9),l=f(3),m=f(47),r=f(107);l(n.prototype,{destructor:function(){this.nativeEvent=this.topLevelType= null;this.ancestors.length=0}});e.addPoolingTo(n,e.twoArgumentPooler);var t={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:k.canUseDOM?window:null,setHandleTopLevel:function(a){t._handleTopLevel=a},setEnabled:function(a){t._enabled=!!a},isEnabled:function(){return t._enabled},trapBubbledEvent:function(a,b,e){return e?c.listen(e,b,t.dispatchEvent.bind(null,a)):null},trapCapturedEvent:function(a,b,e){return e?c.capture(e,b,t.dispatchEvent.bind(null,a)):null},monitorScrollValue:function(b){b=a.bind(null, b);c.listen(window,"scroll",b)},dispatchEvent:function(a,c){if(t._enabled){var e=n.getPooled(a,c);try{h.batchedUpdates(b,e)}finally{n.release(e)}}}};p.exports=t},function(p,k,f){k=f(17);var n=f(20),b=f(40),a=f(69),c=f(78),e=f(25),d=f(84),g=f(8),h=f(87);f=f(9);p.exports={Component:b.injection,Class:a.injection,DOMProperty:k.injection,EmptyComponent:c.injection,EventPluginHub:n.injection,EventEmitter:e.injection,NativeComponent:d.injection,Perf:g.injection,RootIndex:h.injection,Updates:f.injection}}, function(p,k,f){k=f(68);var n=f(70),b=f(69),a=f(134),c=f(6);f(77);var e=f(86),d=f(43),g=f(3);f=f(169);p.exports={Children:{map:k.map,forEach:k.forEach,count:k.count,toArray:k.toArray,only:f},Component:n,createElement:c.createElement,cloneElement:c.cloneElement,isValidElement:c.isValidElement,PropTypes:e,createClass:b.createClass,createFactory:c.createFactory,createMixin:function(a){return a},DOM:a,version:d,__spread:g}},function(p,k,f){function n(){l.length&&(a.processChildrenUpdates(l,m),b())}function b(){l.length= 0;m.length=0}var a=f(40),c=f(83);f(12);var e=f(15),d=f(130),g=f(166),h=0,l=[],m=[];p.exports={Mixin:{_reconcilerInstantiateChildren:function(a,c,b){return d.instantiateChildren(a,c,b)},_reconcilerUpdateChildren:function(a,c,b,e){c=g(c);return d.updateChildren(a,c,b,e)},mountChildren:function(a,c,b){this._renderedChildren=a=this._reconcilerInstantiateChildren(a,c,b);var d=[],g=0,h;for(h in a)if(a.hasOwnProperty(h)){var l=a[h],f=e.mountComponent(l,this._rootNodeID+h,c,b);l._mountIndex=g++;d.push(f)}return d}, updateTextContent:function(a){h++;var c=!0;try{var e=this._renderedChildren;d.unmountChildren(e);for(var g in e)e.hasOwnProperty(g)&&this._unmountChild(e[g]);this.setTextContent(a);c=!1}finally{h--,h||(c?b():n())}},updateMarkup:function(a){h++;var c=!0;try{var e=this._renderedChildren;d.unmountChildren(e);for(var g in e)e.hasOwnProperty(g)&&this._unmountChildByName(e[g],g);this.setMarkup(a);c=!1}finally{h--,h||(c?b():n())}},updateChildren:function(a,c,e){h++;var d=!0;try{this._updateChildren(a,c, e),d=!1}finally{h--,h||(d?b():n())}},_updateChildren:function(a,c,b){var e=this._renderedChildren;if((this._renderedChildren=a=this._reconcilerUpdateChildren(e,a,c,b))||e){var d,g=0,h=0;for(d in a)if(a.hasOwnProperty(d)){var l=e&&e[d],f=a[d];l===f?(this.moveChild(l,h,g),g=Math.max(l._mountIndex,g),l._mountIndex=h):(l&&(g=Math.max(l._mountIndex,g),this._unmountChild(l)),this._mountChildByNameAtIndex(f,d,h,c,b));h++}for(d in e)!e.hasOwnProperty(d)||a&&a.hasOwnProperty(d)||this._unmountChild(e[d])}}, unmountChildren:function(){d.unmountChildren(this._renderedChildren);this._renderedChildren=null},moveChild:function(a,b,e){a._mountIndex<e&&l.push({parentID:this._rootNodeID,parentNode:null,type:c.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:a._mountIndex,toIndex:b})},createChild:function(a,b){var e=a._mountIndex;l.push({parentID:this._rootNodeID,parentNode:null,type:c.INSERT_MARKUP,markupIndex:m.push(b)-1,content:null,fromIndex:null,toIndex:e})},removeChild:function(a){l.push({parentID:this._rootNodeID, parentNode:null,type:c.REMOVE_NODE,markupIndex:null,content:null,fromIndex:a._mountIndex,toIndex:null})},setTextContent:function(a){l.push({parentID:this._rootNodeID,parentNode:null,type:c.TEXT_CONTENT,markupIndex:null,content:a,fromIndex:null,toIndex:null})},setMarkup:function(a){l.push({parentID:this._rootNodeID,parentNode:null,type:c.SET_MARKUP,markupIndex:null,content:a,fromIndex:null,toIndex:null})},_mountChildByNameAtIndex:function(a,c,b,d,g){c=e.mountComponent(a,this._rootNodeID+c,d,g);a._mountIndex= b;this.createChild(a,c)},_unmountChild:function(a){this.removeChild(a);a._mountIndex=null}}}},function(p,k,f){var n=f(1),b={isValidOwner:function(a){return!(!a||"function"!==typeof a.attachRef||"function"!==typeof a.detachRef)},addComponentAsRefTo:function(a,c,e){b.isValidOwner(e)?void 0:n(!1);e.attachRef(c,a)},removeComponentAsRefFrom:function(a,c,e){b.isValidOwner(e)?void 0:n(!1);e.getPublicInstance().refs[c]===a.getPublicInstance()&&e.detachRef(c)}};p.exports=b},function(p,k,f){function n(a){this.reinitializeTransaction(); this.renderToStaticMarkup=!1;this.reactMountReady=b.getPooled(null);this.useCreateElement=!a&&c.useCreateElement}var b=f(36);k=f(14);var a=f(25),c=f(72),e=f(81),d=f(29);f=f(3);var g=[{initialize:e.getSelectionInformation,close:e.restoreSelection},{initialize:function(){var c=a.isEnabled();a.setEnabled(!1);return c},close:function(c){a.setEnabled(c)}},{initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}}];f(n.prototype,d.Mixin,{getTransactionWrappers:function(){return g}, getReactMountReady:function(){return this.reactMountReady},destructor:function(){b.release(this.reactMountReady);this.reactMountReady=null}});k.addPoolingTo(n);p.exports=n},function(p,k,f){var n=f(145);p.exports={attachRefs:function(b,a){if(null!==a&&!1!==a){var c=a.ref;if(null!=c){var e=a._owner;"function"===typeof c?c(b.getPublicInstance()):n.addComponentAsRefTo(b,c,e)}}},shouldUpdateRefs:function(b,a){return null===b||!1===b||null===a||!1===a||a._owner!==b._owner||a.ref!==b.ref},detachRefs:function(b, a){if(null!==a&&!1!==a){var c=a.ref;if(null!=c){var e=a._owner;"function"===typeof c?c(null):n.removeComponentAsRefFrom(b,c,e)}}}}},function(p,k){p.exports={isBatchingUpdates:!1,batchedUpdates:function(f){}}},function(p,k,f){var n=f(75),b=f(6),a=f(18),c=f(82),e=f(148),d=f(150),g=f(9),h=f(19),l=f(49),m=f(1);p.exports={renderToString:function(f){b.isValidElement(f)?void 0:m(!1);var t;try{g.injection.injectBatchingStrategy(e);var w=a.createReactRootID();t=d.getPooled(!1);return t.perform(function(){var a= l(f,null).mountComponent(w,t,h);return c.addChecksumToMarkup(a)},null)}finally{d.release(t),g.injection.injectBatchingStrategy(n)}},renderToStaticMarkup:function(c){b.isValidElement(c)?void 0:m(!1);var f;try{g.injection.injectBatchingStrategy(e);var w=a.createReactRootID();f=d.getPooled(!0);return f.perform(function(){return l(c,null).mountComponent(w,f,h)},null)}finally{d.release(f),g.injection.injectBatchingStrategy(n)}}}},function(p,k,f){function n(a){this.reinitializeTransaction();this.renderToStaticMarkup= a;this.reactMountReady=b.getPooled(null);this.useCreateElement=!1}k=f(14);var b=f(36),a=f(29),c=f(3),e=[{initialize:function(){this.reactMountReady.reset()},close:f(10)}];c(n.prototype,a.Mixin,{getTransactionWrappers:function(){return e},getReactMountReady:function(){return this.reactMountReady},destructor:function(){b.release(this.reactMountReady);this.reactMountReady=null}});k.addPoolingTo(n);p.exports=n},function(p,k,f){k=f(17).injection.MUST_USE_ATTRIBUTE;p.exports={Properties:{clipPath:k,cx:k, cy:k,d:k,dx:k,dy:k,fill:k,fillOpacity:k,fontFamily:k,fontSize:k,fx:k,fy:k,gradientTransform:k,gradientUnits:k,markerEnd:k,markerMid:k,markerStart:k,offset:k,opacity:k,patternContentUnits:k,patternUnits:k,points:k,preserveAspectRatio:k,r:k,rx:k,ry:k,spreadMethod:k,stopColor:k,stopOpacity:k,stroke:k,strokeDasharray:k,strokeLinecap:k,strokeOpacity:k,strokeWidth:k,textAnchor:k,transform:k,version:k,viewBox:k,x1:k,x2:k,x:k,xlinkActuate:k,xlinkArcrole:k,xlinkHref:k,xlinkRole:k,xlinkShow:k,xlinkTitle:k, xlinkType:k,xmlBase:k,xmlLang:k,xmlSpace:k,y1:k,y2:k,y:k},DOMAttributeNamespaces:{xlinkActuate:"http://www.w3.org/1999/xlink",xlinkArcrole:"http://www.w3.org/1999/xlink",xlinkHref:"http://www.w3.org/1999/xlink",xlinkRole:"http://www.w3.org/1999/xlink",xlinkShow:"http://www.w3.org/1999/xlink",xlinkTitle:"http://www.w3.org/1999/xlink",xlinkType:"http://www.w3.org/1999/xlink",xmlBase:"http://www.w3.org/XML/1998/namespace",xmlLang:"http://www.w3.org/XML/1998/namespace",xmlSpace:"http://www.w3.org/XML/1998/namespace"}, DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap", strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(p,k,f){function n(a,g){if(v||null==w||w!==d())return null;var h;h=w;"selectionStart"in h&&c.hasSelectionCapabilities(h)?h={start:h.selectionStart,end:h.selectionEnd}: window.getSelection?(h=window.getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}):document.selection?(h=document.selection.createRange(),h={parentElement:h.parentElement(),text:h.text,top:h.boundingTop,left:h.boundingLeft}):h=void 0;return q&&l(q,h)?null:(q=h,h=e.getPooled(t.select,u,a,g),h.type="select",h.target=w,b.accumulateTwoPhaseDispatches(h),h)}k=f(11);var b=f(21),a=f(4),c=f(81),e=f(16),d=f(62),g=f(92),h=f(13),l=f(64),m=k.topLevelTypes, r=a.canUseDOM&&"documentMode"in document&&11>=document.documentMode,t={select:{phasedRegistrationNames:{bubbled:h({onSelect:null}),captured:h({onSelectCapture:null})},dependencies:[m.topBlur,m.topContextMenu,m.topFocus,m.topKeyDown,m.topMouseDown,m.topMouseUp,m.topSelectionChange]}},w=null,u=null,q=null,v=!1,x=!1,z=h({onSelect:null});p.exports={eventTypes:t,extractEvents:function(a,c,b,e,d){if(!x)return null;switch(a){case m.topFocus:if(g(c)||"true"===c.contentEditable)w=c,u=b,q=null;break;case m.topBlur:q= u=w=null;break;case m.topMouseDown:v=!0;break;case m.topContextMenu:case m.topMouseUp:return v=!1,n(e,d);case m.topSelectionChange:if(r)break;case m.topKeyDown:case m.topKeyUp:return n(e,d)}return null},didPutListener:function(a,c,b){c===z&&(x=!0)}}},function(p,k){var f=Math.pow(2,53);p.exports={createReactRootIndex:function(){return Math.ceil(Math.random()*f)}}},function(p,k,f){k=f(11);var n=f(59),b=f(21),a=f(5),c=f(155),e=f(16),d=f(158),g=f(160),h=f(28),l=f(157),m=f(161),r=f(23),t=f(162),w=f(10), u=f(45),q=f(1);f=f(13);var v=k.topLevelTypes;k={abort:{phasedRegistrationNames:{bubbled:f({onAbort:!0}),captured:f({onAbortCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:f({onBlur:!0}),captured:f({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:f({onCanPlay:!0}),captured:f({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:f({onCanPlayThrough:!0}),captured:f({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:f({onClick:!0}),captured:f({onClickCapture:!0})}}, contextMenu:{phasedRegistrationNames:{bubbled:f({onContextMenu:!0}),captured:f({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:f({onCopy:!0}),captured:f({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:f({onCut:!0}),captured:f({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:f({onDoubleClick:!0}),captured:f({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:f({onDrag:!0}),captured:f({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:f({onDragEnd:!0}), captured:f({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:f({onDragEnter:!0}),captured:f({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:f({onDragExit:!0}),captured:f({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:f({onDragLeave:!0}),captured:f({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:f({onDragOver:!0}),captured:f({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:f({onDragStart:!0}), captured:f({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:f({onDrop:!0}),captured:f({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:f({onDurationChange:!0}),captured:f({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:f({onEmptied:!0}),captured:f({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:f({onEncrypted:!0}),captured:f({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:f({onEnded:!0}),captured:f({onEndedCapture:!0})}}, error:{phasedRegistrationNames:{bubbled:f({onError:!0}),captured:f({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:f({onFocus:!0}),captured:f({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:f({onInput:!0}),captured:f({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:f({onKeyDown:!0}),captured:f({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:f({onKeyPress:!0}),captured:f({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:f({onKeyUp:!0}), captured:f({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:f({onLoad:!0}),captured:f({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:f({onLoadedData:!0}),captured:f({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:f({onLoadedMetadata:!0}),captured:f({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:f({onLoadStart:!0}),captured:f({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:f({onMouseDown:!0}), captured:f({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:f({onMouseMove:!0}),captured:f({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:f({onMouseOut:!0}),captured:f({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:f({onMouseOver:!0}),captured:f({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:f({onMouseUp:!0}),captured:f({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:f({onPaste:!0}),captured:f({onPasteCapture:!0})}}, pause:{phasedRegistrationNames:{bubbled:f({onPause:!0}),captured:f({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:f({onPlay:!0}),captured:f({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:f({onPlaying:!0}),captured:f({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:f({onProgress:!0}),captured:f({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:f({onRateChange:!0}),captured:f({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:f({onReset:!0}), captured:f({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:f({onScroll:!0}),captured:f({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:f({onSeeked:!0}),captured:f({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:f({onSeeking:!0}),captured:f({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:f({onStalled:!0}),captured:f({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:f({onSubmit:!0}),captured:f({onSubmitCapture:!0})}}, suspend:{phasedRegistrationNames:{bubbled:f({onSuspend:!0}),captured:f({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:f({onTimeUpdate:!0}),captured:f({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:f({onTouchCancel:!0}),captured:f({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:f({onTouchEnd:!0}),captured:f({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:f({onTouchMove:!0}),captured:f({onTouchMoveCapture:!0})}}, touchStart:{phasedRegistrationNames:{bubbled:f({onTouchStart:!0}),captured:f({onTouchStartCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:f({onVolumeChange:!0}),captured:f({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:f({onWaiting:!0}),captured:f({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:f({onWheel:!0}),captured:f({onWheelCapture:!0})}}};var x={topAbort:k.abort,topBlur:k.blur,topCanPlay:k.canPlay,topCanPlayThrough:k.canPlayThrough,topClick:k.click, topContextMenu:k.contextMenu,topCopy:k.copy,topCut:k.cut,topDoubleClick:k.doubleClick,topDrag:k.drag,topDragEnd:k.dragEnd,topDragEnter:k.dragEnter,topDragExit:k.dragExit,topDragLeave:k.dragLeave,topDragOver:k.dragOver,topDragStart:k.dragStart,topDrop:k.drop,topDurationChange:k.durationChange,topEmptied:k.emptied,topEncrypted:k.encrypted,topEnded:k.ended,topError:k.error,topFocus:k.focus,topInput:k.input,topKeyDown:k.keyDown,topKeyPress:k.keyPress,topKeyUp:k.keyUp,topLoad:k.load,topLoadedData:k.loadedData, topLoadedMetadata:k.loadedMetadata,topLoadStart:k.loadStart,topMouseDown:k.mouseDown,topMouseMove:k.mouseMove,topMouseOut:k.mouseOut,topMouseOver:k.mouseOver,topMouseUp:k.mouseUp,topPaste:k.paste,topPause:k.pause,topPlay:k.play,topPlaying:k.playing,topProgress:k.progress,topRateChange:k.rateChange,topReset:k.reset,topScroll:k.scroll,topSeeked:k.seeked,topSeeking:k.seeking,topStalled:k.stalled,topSubmit:k.submit,topSuspend:k.suspend,topTimeUpdate:k.timeUpdate,topTouchCancel:k.touchCancel,topTouchEnd:k.touchEnd, topTouchMove:k.touchMove,topTouchStart:k.touchStart,topVolumeChange:k.volumeChange,topWaiting:k.waiting,topWheel:k.wheel},z;for(z in x)x[z].dependencies=[z];var B=f({onClick:null}),A={};p.exports={eventTypes:k,extractEvents:function(a,f,w,k,n){f=x[a];if(!f)return null;var p;switch(a){case v.topAbort:case v.topCanPlay:case v.topCanPlayThrough:case v.topDurationChange:case v.topEmptied:case v.topEncrypted:case v.topEnded:case v.topError:case v.topInput:case v.topLoad:case v.topLoadedData:case v.topLoadedMetadata:case v.topLoadStart:case v.topPause:case v.topPlay:case v.topPlaying:case v.topProgress:case v.topRateChange:case v.topReset:case v.topSeeked:case v.topSeeking:case v.topStalled:case v.topSubmit:case v.topSuspend:case v.topTimeUpdate:case v.topVolumeChange:case v.topWaiting:p= e;break;case v.topKeyPress:if(0===u(k))return null;case v.topKeyDown:case v.topKeyUp:p=g;break;case v.topBlur:case v.topFocus:p=d;break;case v.topClick:if(2===k.button)return null;case v.topContextMenu:case v.topDoubleClick:case v.topMouseDown:case v.topMouseMove:case v.topMouseOut:case v.topMouseOver:case v.topMouseUp:p=h;break;case v.topDrag:case v.topDragEnd:case v.topDragEnter:case v.topDragExit:case v.topDragLeave:case v.topDragOver:case v.topDragStart:case v.topDrop:p=l;break;case v.topTouchCancel:case v.topTouchEnd:case v.topTouchMove:case v.topTouchStart:p= m;break;case v.topScroll:p=r;break;case v.topWheel:p=t;break;case v.topCopy:case v.topCut:case v.topPaste:p=c}p?void 0:q(!1);a=p.getPooled(f,w,k,n);b.accumulateTwoPhaseDispatches(a);return a},didPutListener:function(c,b,e){b===B&&(b=a.getNode(c),A[c]||(A[c]=n.listen(b,"click",w)))},willDeleteListener:function(a,c){c===B&&(A[a].remove(),delete A[a])}}},function(p,k,f){function n(a,c,e,d){b.call(this,a,c,e,d)}var b=f(16);b.augmentClass(n,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData: window.clipboardData}});p.exports=n},function(p,k,f){function n(a,c,e,d){b.call(this,a,c,e,d)}var b=f(16);b.augmentClass(n,{data:null});p.exports=n},function(p,k,f){function n(a,c,e,d){b.call(this,a,c,e,d)}var b=f(28);b.augmentClass(n,{dataTransfer:null});p.exports=n},function(p,k,f){function n(a,c,e,d){b.call(this,a,c,e,d)}var b=f(23);b.augmentClass(n,{relatedTarget:null});p.exports=n},function(p,k,f){function n(a,c,e,d){b.call(this,a,c,e,d)}var b=f(16);b.augmentClass(n,{data:null});p.exports=n}, function(p,k,f){function n(a,e,d,g){b.call(this,a,e,d,g)}var b=f(23),a=f(45);k=f(167);f=f(46);b.augmentClass(n,{key:k,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:f,charCode:function(c){return"keypress"===c.type?a(c):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(c){return"keypress"===c.type?a(c):"keydown"===c.type||"keyup"===c.type?c.keyCode:0}});p.exports=n},function(p,k,f){function n(a, c,e,d){b.call(this,a,c,e,d)}var b=f(23);k={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:f(46)};b.augmentClass(n,k);p.exports=n},function(p,k,f){function n(a,c,e,d){b.call(this,a,c,e,d)}var b=f(28);b.augmentClass(n,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}); p.exports=n},function(p,k){p.exports=function(f){for(var k=1,b=0,a=0,c=f.length,e=c&-4;a<e;){for(;a<Math.min(a+4096,e);a+=4)b+=(k+=f.charCodeAt(a))+(k+=f.charCodeAt(a+1))+(k+=f.charCodeAt(a+2))+(k+=f.charCodeAt(a+3));k%=65521;b%=65521}for(;a<c;a++)b+=k+=f.charCodeAt(a);return k%65521|b%65521<<16}},function(p,k,f){var n=f(65).isUnitlessNumber;p.exports=function(b,a){if(null==a||"boolean"===typeof a||""===a)return"";if(isNaN(a)||0===a||n.hasOwnProperty(b)&&n[b])return""+a;"string"===typeof a&&(a=a.trim()); return a+"px"}},function(p,k,f){f(3);f(2);p.exports=function(f,b,a,c,e){return e}},function(p,k,f){function n(a,c,b){void 0===a[b]&&null!=c&&(a[b]=c)}var b=f(53);f(2);p.exports=function(a){if(null==a)return a;var c={};b(a,n,c);return c}},function(p,k,f){var n=f(45),b={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"};p.exports=function(c){if(c.key){var e=b[c.key]||c.key;if("Unidentified"!==e)return e}return"keypress"===c.type?(c=n(c),13===c?"Enter": String.fromCharCode(c)):"keydown"===c.type||"keyup"===c.type?a[c.keyCode]||"Unidentified":""}},function(p,k){function f(f){for(;f&&f.firstChild;)f=f.firstChild;return f}p.exports=function(k,b){for(var a=f(k),c=0,e=0;a;){if(3===a.nodeType){e=c+a.textContent.length;if(c<=b&&e>=b)return{node:a,offset:b-c};c=e}a:{for(;a;){if(a.nextSibling){a=a.nextSibling;break a}a=a.parentNode}a=void 0}a=f(a)}}},function(p,k,f){var n=f(6),b=f(1);p.exports=function(a){n.isValidElement(a)?void 0:b(!1);return a}},function(p, k,f){var n=f(31);p.exports=function(b){return'"'+n(b)+'"'}},function(p,k,f){k=f(5);p.exports=k.renderSubtreeIntoContainer},function(p,k,f){var n=function(b,a){function c(){this.constructor=b}for(var e in a)a.hasOwnProperty(e)&&(b[e]=a[e]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)};p=function(b){function a(a,e,d){b.call(this);this.parent=a;this.outerValue=e;this.outerIndex=d;this.index=0}n(a,b);a.prototype._next=function(a){this.parent.notifyNext(this.outerValue,a,this.outerIndex, this.index++,this)};a.prototype._error=function(a){this.parent.notifyError(a,this);this.unsubscribe()};a.prototype._complete=function(){this.parent.notifyComplete(this);this.unsubscribe()};return a}(f(33).Subscriber);k.InnerSubscriber=p},function(p,k){k.empty={isUnsubscribed:!0,next:function(f){},error:function(f){throw f;},complete:function(){}}},function(p,k,f){p=f(7);f=f(181);p.Observable.fromEvent=f.fromEvent},function(p,k,f){p=f(7);f=f(183);p.Observable.prototype.merge=f.merge},function(p,k, f){p=f(7);f=f(184);p.Observable.prototype.skip=f.skip},function(p,k,f){p=f(7);f=f(185);p.Observable.prototype.startWith=f.startWith},function(p,k,f){p=f(7);f=f(186);p.Observable.prototype.switchMap=f.switchMap},function(p,k,f){p=f(7);f=f(187);p.Observable.prototype.takeUntil=f.takeUntil},function(p,k,f){var n=function(a,c){function b(){this.constructor=a}for(var h in c)c.hasOwnProperty(h)&&(a[h]=c[h]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};p=f(7);var b=f(101),a=f(57), c=f(94);f=function(e){function d(a,c,b){e.call(this);this.sourceObj=a;this.eventName=c;this.selector=b}n(d,e);d.create=function(a,c,b){return new d(a,c,b)};d.setupSubscription=function(a,b,e,f){var r;if(a&&"[object NodeList]"===a.toString()||a&&"[object HTMLCollection]"===a.toString())for(var t=0,w=a.length;t<w;t++)d.setupSubscription(a[t],b,e,f);else a&&"function"===typeof a.addEventListener&&"function"===typeof a.removeEventListener?(a.addEventListener(b,e),r=function(){return a.removeEventListener(b, e)}):a&&"function"===typeof a.on&&"function"===typeof a.off?(a.on(b,e),r=function(){return a.off(b,e)}):a&&"function"===typeof a.addListener&&"function"===typeof a.removeListener&&(a.addListener(b,e),r=function(){return a.removeListener(b,e)});f.add(new c.Subscription(r))};d.prototype._subscribe=function(c){var e=this.selector;d.setupSubscription(this.sourceObj,this.eventName,e?function(){for(var d=[],f=0;f<arguments.length;f++)d[f-0]=arguments[f];d=b.tryCatch(e).apply(void 0,d);d===a.errorObject? c.error(a.errorObject.e):c.next(d)}:function(a){return c.next(a)},c)};return d}(p.Observable);k.FromEventObservable=f},function(p,k,f){p=f(180);k.fromEvent=p.FromEventObservable.create},function(p,k,f){function n(){for(var e=[],d=0;d<arguments.length;d++)e[d-0]=arguments[d];d=null;b.isScheduler(e[e.length-1])&&(d=e.pop());return(new a.ArrayObservable(e,d)).lift(new c.MergeAllOperator(1))}var b=f(34),a=f(56),c=f(97);k.concat=function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];return n.apply(void 0, [this].concat(a))};k.concatStatic=n},function(p,k,f){function n(){for(var e=[],d=0;d<arguments.length;d++)e[d-0]=arguments[d];var d=Number.POSITIVE_INFINITY,g=null,h=e[e.length-1];c.isScheduler(h)?(g=e.pop(),1<e.length&&"number"===typeof e[e.length-1]&&(d=e.pop())):"number"===typeof h&&(d=e.pop());return 1===e.length?e[0]:(new b.ArrayObservable(e,g)).lift(new a.MergeAllOperator(d))}var b=f(56),a=f(97),c=f(34);k.merge=function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];a.unshift(this); return n.apply(this,a)};k.mergeStatic=n},function(p,k,f){var n=function(a,b){function d(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};p=f(33);k.skip=function(a){return this.lift(new b(a))};var b=function(){function c(a){this.total=a}c.prototype.call=function(c,b){return b._subscribe(new a(c,this.total))};return c}(),a=function(a){function b(e,g){a.call(this,e);this.total=g;this.count=0}n(b,a);b.prototype._next= function(a){++this.count>this.total&&this.destination.next(a)};return b}(p.Subscriber)},function(p,k,f){var n=f(56),b=f(96),a=f(95),c=f(182),e=f(34);k.startWith=function(){for(var d=[],g=0;g<arguments.length;g++)d[g-0]=arguments[g];g=d[d.length-1];e.isScheduler(g)?d.pop():g=null;var h=d.length;return 1===h?c.concatStatic(new b.ScalarObservable(d[0],g),this):1<h?c.concatStatic(new n.ArrayObservable(d,g),this):c.concatStatic(new a.EmptyObservable(g),this)}},function(p,k,f){var n=function(a,c){function b(){this.constructor= a}for(var h in c)c.hasOwnProperty(h)&&(a[h]=c[h]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};p=f(55);var b=f(58);k.switchMap=function(c,b){return this.lift(new a(c,b))};var a=function(){function a(c,b){this.project=c;this.resultSelector=b}a.prototype.call=function(a,b){return b._subscribe(new c(a,this.project,this.resultSelector))};return a}(),c=function(a){function c(b,d,l){a.call(this,b);this.project=d;this.resultSelector=l;this.index=0}n(c,a);c.prototype._next=function(a){var c, b=this.index++;try{c=this.project(a,b)}catch(e){this.destination.error(e);return}this._innerSub(c,a,b)};c.prototype._innerSub=function(a,c,e){var d=this.innerSubscription;d&&d.unsubscribe();this.add(this.innerSubscription=b.subscribeToResult(this,a,c,e))};c.prototype._complete=function(){var c=this.innerSubscription;c&&!c.isUnsubscribed||a.prototype._complete.call(this)};c.prototype._unsubscribe=function(){this.innerSubscription=null};c.prototype.notifyComplete=function(c){this.remove(c);this.innerSubscription= null;this.isStopped&&a.prototype._complete.call(this)};c.prototype.notifyNext=function(a,c,b,e,d){this.resultSelector?this._tryNotifyNext(a,c,b,e):this.destination.next(c)};c.prototype._tryNotifyNext=function(a,c,b,e){var d;try{d=this.resultSelector(a,c,b,e)}catch(f){this.destination.error(f);return}this.destination.next(d)};return c}(p.OuterSubscriber)},function(p,k,f){var n=function(a,c){function b(){this.constructor=a}for(var h in c)c.hasOwnProperty(h)&&(a[h]=c[h]);a.prototype=null===c?Object.create(c): (b.prototype=c.prototype,new b)};p=f(55);var b=f(58);k.takeUntil=function(c){return this.lift(new a(c))};var a=function(){function a(c){this.notifier=c}a.prototype.call=function(a,b){return b._subscribe(new c(a,this.notifier))};return a}(),c=function(a){function c(d,h){a.call(this,d);this.notifier=h;this.add(b.subscribeToResult(this,h))}n(c,a);c.prototype.notifyNext=function(a,c,b,e,d){this.complete()};c.prototype.notifyComplete=function(){};return c}(p.OuterSubscriber)},function(p,k,f){p=f(35);f= p.root.Symbol;if("function"===typeof f)f.iterator?k.$$iterator=f.iterator:"function"===typeof f["for"]&&(k.$$iterator=f["for"]("iterator"));else if(p.root.Set&&"function"===typeof(new p.root.Set)["@@iterator"])k.$$iterator="@@iterator";else if(p.root.Map){f=Object.getOwnPropertyNames(p.root.Map.prototype);for(var n=0;n<f.length;++n){var b=f[n];if("entries"!==b&&"size"!==b&&p.root.Map.prototype[b]===p.root.Map.prototype.entries){k.$$iterator=b;break}}}else k.$$iterator="@@iterator"},function(p,k){var f= function(b,a){function c(){this.constructor=b}for(var e in a)a.hasOwnProperty(e)&&(b[e]=a[e]);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)},n=function(b){function a(a){b.call(this);this.errors=a;this.name="UnsubscriptionError";this.message=a?a.length+" errors occurred during unsubscription:\n"+a.map(function(a,c){return c+1+") "+a.toString()}).join("\n"):""}f(a,b);return a}(Error);k.UnsubscriptionError=n},function(p,k){var f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator? function(f){return typeof f}:function(f){return f&&"function"===typeof Symbol&&f.constructor===Symbol?"symbol":typeof f};k.isObject=function(k){return null!=k&&"object"===("undefined"===typeof k?"undefined":f(k))}},function(p,k){k.isPromise=function(f){return f&&"function"!==typeof f.subscribe&&"function"===typeof f.then}},function(p,k,f){var n=f(33),b=f(98);k.toSubscriber=function(a,c,e){if(a){if(a instanceof n.Subscriber)return a;if(a[b.$$rxSubscriber])return a[b.$$rxSubscriber]()}return a||c|| e?new n.Subscriber(a,c,e):new n.Subscriber}},function(p,k){p.exports=function(f){var k=f.Symbol;"function"===typeof k?k.observable?f=k.observable:(f=k("observable"),k.observable=f):f="@@observable";return f}},function(p,k,f){var n;"use strict";var b={REVISION:"77"};!(n="function"===typeof b?b.call(k,f,k,p):b,void 0!==n&&(p.exports=n));void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52));void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0<a?1:+a});void 0===Function.prototype.name&&Object.defineProperty(Function.prototype, "name",{get:function(){return this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]}});void 0===Object.assign&&function(){Object.assign=function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),b=1;b<arguments.length;b++){var d=arguments[b];if(void 0!==d&&null!==d)for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(c[g]=d[g])}return c}}();Object.assign(b,{MOUSE:{LEFT:0,MIDDLE:1,RIGHT:2},CullFaceNone:0,CullFaceBack:1,CullFaceFront:2, CullFaceFrontBack:3,FrontFaceDirectionCW:0,FrontFaceDirectionCCW:1,BasicShadowMap:0,PCFShadowMap:1,PCFSoftShadowMap:2,FrontSide:0,BackSide:1,DoubleSide:2,FlatShading:1,SmoothShading:2,NoColors:0,FaceColors:1,VertexColors:2,NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5,AddEquation:100,SubtractEquation:101,ReverseSubtractEquation:102,MinEquation:103,MaxEquation:104,ZeroFactor:200,OneFactor:201,SrcColorFactor:202,OneMinusSrcColorFactor:203, SrcAlphaFactor:204,OneMinusSrcAlphaFactor:205,DstAlphaFactor:206,OneMinusDstAlphaFactor:207,DstColorFactor:208,OneMinusDstColorFactor:209,SrcAlphaSaturateFactor:210,NeverDepth:0,AlwaysDepth:1,LessDepth:2,LessEqualDepth:3,EqualDepth:4,GreaterEqualDepth:5,GreaterDepth:6,NotEqualDepth:7,MultiplyOperation:0,MixOperation:1,AddOperation:2,NoToneMapping:0,LinearToneMapping:1,ReinhardToneMapping:2,Uncharted2ToneMapping:3,CineonToneMapping:4,UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302, EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307,RepeatWrapping:1E3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002,NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008,UnsignedByteType:1009,ByteType:1010,ShortType:1011,UnsignedShortType:1012,IntType:1013,UnsignedIntType:1014, FloatType:1015,HalfFloatType:1025,UnsignedShort4444Type:1016,UnsignedShort5551Type:1017,UnsignedShort565Type:1018,AlphaFormat:1019,RGBFormat:1020,RGBAFormat:1021,LuminanceFormat:1022,LuminanceAlphaFormat:1023,RGBEFormat:b.RGBAFormat,DepthFormat:1026,RGB_S3TC_DXT1_Format:2001,RGBA_S3TC_DXT1_Format:2002,RGBA_S3TC_DXT3_Format:2003,RGBA_S3TC_DXT5_Format:2004,RGB_PVRTC_4BPPV1_Format:2100,RGB_PVRTC_2BPPV1_Format:2101,RGBA_PVRTC_4BPPV1_Format:2102,RGBA_PVRTC_2BPPV1_Format:2103,RGB_ETC1_Format:2151,LoopOnce:2200, LoopRepeat:2201,LoopPingPong:2202,InterpolateDiscrete:2300,InterpolateLinear:2301,InterpolateSmooth:2302,ZeroCurvatureEnding:2400,ZeroSlopeEnding:2401,WrapAroundEnding:2402,TrianglesDrawMode:0,TriangleStripDrawMode:1,TriangleFanDrawMode:2,LinearEncoding:3E3,sRGBEncoding:3001,GammaEncoding:3007,RGBEEncoding:3002,LogLuvEncoding:3003,RGBM7Encoding:3004,RGBM16Encoding:3005,RGBDEncoding:3006,BasicDepthPacking:3200,RGBADepthPacking:3201});b.Color=function(a,c,b){return void 0===c&&void 0===b?this.set(a): this.setRGB(a,c,b)};b.Color.prototype={constructor:b.Color,r:1,g:1,b:1,set:function(a){a instanceof b.Color?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this},setScalar:function(a){this.b=this.g=this.r=a},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,c,b){this.r=a;this.g=c;this.b=b;return this},setHSL:function(){function a(a,b,d){0>d&&(d+=1);1<d&&--d;return d<1/6?a+6* (b-a)*d:.5>d?b:d<2/3?a+6*(b-a)*(2/3-d):a}return function(c,e,d){c=b.Math.euclideanModulo(c,1);e=b.Math.clamp(e,0,1);d=b.Math.clamp(d,0,1);0===e?this.r=this.g=this.b=d:(e=.5>=d?d*(1+e):d+e-d*e,d=2*d-e,this.r=a(d,e,c+1/3),this.g=a(d,e,c),this.b=a(d,e,c-1/3));return this}}(),setStyle:function(a){function c(c){void 0!==c&&1>parseFloat(c)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var e;if(e=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=e[2];switch(e[1]){case "rgb":case "rgba":if(e= /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,c(e[5]),this;if(e=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,c(e[5]),this;break;case "hsl":case "hsla":if(e=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){var d= parseFloat(e[1])/360,g=parseInt(e[2],10)/100,h=parseInt(e[3],10)/100;c(e[5]);return this.setHSL(d,g,h)}}}else if(e=/^\#([A-Fa-f0-9]+)$/.exec(a)){e=e[1];d=e.length;if(3===d)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this}a&&0<a.length&& (e=b.ColorKeywords[a],void 0!==e?this.setHex(e):console.warn("THREE.Color: Unknown color "+a));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a,c){void 0===c&&(c=2);this.r=Math.pow(a.r,c);this.g=Math.pow(a.g,c);this.b=Math.pow(a.b,c);return this},copyLinearToGamma:function(a,c){void 0===c&&(c=2);var b=0<c?1/c:1;this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b, b);return this},convertGammaToLinear:function(){var a=this.r,c=this.g,b=this.b;this.r=a*a;this.g=c*c;this.b=b*b;return this},convertLinearToGamma:function(){this.r=Math.sqrt(this.r);this.g=Math.sqrt(this.g);this.b=Math.sqrt(this.b);return this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(a){a=a||{h:0,s:0,l:0};var c=this.r,b=this.g,d=this.b,g=Math.max(c,b,d),h=Math.min(c,b,d),l,f= (h+g)/2;if(h===g)h=l=0;else{var r=g-h,h=.5>=f?r/(g+h):r/(2-g-h);switch(g){case c:l=(b-d)/r+(b<d?6:0);break;case b:l=(d-c)/r+2;break;case d:l=(c-b)/r+4}l/=6}a.h=l;a.s=h;a.l=f;return a},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(a,c,b){var d=this.getHSL();d.h+=a;d.s+=c;d.l+=b;this.setHSL(d.h,d.s,d.l);return this},add:function(a){this.r+=a.r;this.g+=a.g;this.b+=a.b;return this},addColors:function(a,c){this.r=a.r+c.r;this.g=a.g+c.g;this.b= a.b+c.b;return this},addScalar:function(a){this.r+=a;this.g+=a;this.b+=a;return this},multiply:function(a){this.r*=a.r;this.g*=a.g;this.b*=a.b;return this},multiplyScalar:function(a){this.r*=a;this.g*=a;this.b*=a;return this},lerp:function(a,c){this.r+=(a.r-this.r)*c;this.g+=(a.g-this.g)*c;this.b+=(a.b-this.b)*c;return this},equals:function(a){return a.r===this.r&&a.g===this.g&&a.b===this.b},fromArray:function(a,c){void 0===c&&(c=0);this.r=a[c];this.g=a[c+1];this.b=a[c+2];return this},toArray:function(a, c){void 0===a&&(a=[]);void 0===c&&(c=0);a[c]=this.r;a[c+1]=this.g;a[c+2]=this.b;return a}};b.ColorKeywords={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,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};b.Quaternion=function(a,c,b,d){this._x=a||0;this._y=c||0;this._z=b||0;this._w=void 0!==d?d:1};b.Quaternion.prototype={constructor:b.Quaternion,get x(){return this._x},set x(a){this._x=a;this.onChangeCallback()},get y(){return this._y},set y(a){this._y=a;this.onChangeCallback()},get z(){return this._z}, set z(a){this._z=a;this.onChangeCallback()},get w(){return this._w},set w(a){this._w=a;this.onChangeCallback()},set:function(a,c,b,d){this._x=a;this._y=c;this._z=b;this._w=d;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this.onChangeCallback();return this},setFromEuler:function(a,c){if(!1===a instanceof b.Euler)throw Error("THREE.Quaternion: .setFromEuler() now expects a Euler rotation rather than a Vector3 and order."); var e=Math.cos(a._x/2),d=Math.cos(a._y/2),g=Math.cos(a._z/2),h=Math.sin(a._x/2),l=Math.sin(a._y/2),f=Math.sin(a._z/2),r=a.order;"XYZ"===r?(this._x=h*d*g+e*l*f,this._y=e*l*g-h*d*f,this._z=e*d*f+h*l*g,this._w=e*d*g-h*l*f):"YXZ"===r?(this._x=h*d*g+e*l*f,this._y=e*l*g-h*d*f,this._z=e*d*f-h*l*g,this._w=e*d*g+h*l*f):"ZXY"===r?(this._x=h*d*g-e*l*f,this._y=e*l*g+h*d*f,this._z=e*d*f+h*l*g,this._w=e*d*g-h*l*f):"ZYX"===r?(this._x=h*d*g-e*l*f,this._y=e*l*g+h*d*f,this._z=e*d*f-h*l*g,this._w=e*d*g+h*l*f):"YZX"=== r?(this._x=h*d*g+e*l*f,this._y=e*l*g+h*d*f,this._z=e*d*f-h*l*g,this._w=e*d*g-h*l*f):"XZY"===r&&(this._x=h*d*g-e*l*f,this._y=e*l*g-h*d*f,this._z=e*d*f+h*l*g,this._w=e*d*g+h*l*f);if(!1!==c)this.onChangeCallback();return this},setFromAxisAngle:function(a,c){var b=c/2,d=Math.sin(b);this._x=a.x*d;this._y=a.y*d;this._z=a.z*d;this._w=Math.cos(b);this.onChangeCallback();return this},setFromRotationMatrix:function(a){var c=a.elements,b=c[0];a=c[4];var d=c[8],g=c[1],h=c[5],l=c[9],f=c[2],r=c[6],c=c[10],t=b+ h+c;0<t?(b=.5/Math.sqrt(t+1),this._w=.25/b,this._x=(r-l)*b,this._y=(d-f)*b,this._z=(g-a)*b):b>h&&b>c?(b=2*Math.sqrt(1+b-h-c),this._w=(r-l)/b,this._x=.25*b,this._y=(a+g)/b,this._z=(d+f)/b):h>c?(b=2*Math.sqrt(1+h-b-c),this._w=(d-f)/b,this._x=(a+g)/b,this._y=.25*b,this._z=(l+r)/b):(b=2*Math.sqrt(1+c-b-h),this._w=(g-a)/b,this._x=(d+f)/b,this._y=(l+r)/b,this._z=.25*b);this.onChangeCallback();return this},setFromUnitVectors:function(){var a,c;return function(e,d){void 0===a&&(a=new b.Vector3);c=e.dot(d)+ 1;1E-6>c?(c=0,Math.abs(e.x)>Math.abs(e.z)?a.set(-e.y,e.x,0):a.set(0,-e.z,e.y)):a.crossVectors(e,d);this._x=a.x;this._y=a.y;this._z=a.z;this._w=c;return this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){this._x*=-1;this._y*=-1;this._z*=-1;this.onChangeCallback();return this},dot:function(a){return this._x*a._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x* this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a=this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this.onChangeCallback();return this},multiply:function(a,c){return void 0!==c?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a,c)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a, this)},multiplyQuaternions:function(a,c){var b=a._x,d=a._y,g=a._z,h=a._w,l=c._x,f=c._y,r=c._z,t=c._w;this._x=b*t+h*l+d*r-g*f;this._y=d*t+h*f+g*l-b*r;this._z=g*t+h*r+b*f-d*l;this._w=h*t-b*l-d*f-g*r;this.onChangeCallback();return this},slerp:function(a,c){if(0===c)return this;if(1===c)return this.copy(a);var b=this._x,d=this._y,g=this._z,h=this._w,l=h*a._w+b*a._x+d*a._y+g*a._z;0>l?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,l=-l):this.copy(a);if(1<=l)return this._w=h,this._x=b,this._y= d,this._z=g,this;var f=Math.sqrt(1-l*l);if(.001>Math.abs(f))return this._w=.5*(h+this._w),this._x=.5*(b+this._x),this._y=.5*(d+this._y),this._z=.5*(g+this._z),this;var r=Math.atan2(f,l),l=Math.sin((1-c)*r)/f,f=Math.sin(c*r)/f;this._w=h*l+this._w*f;this._x=b*l+this._x*f;this._y=d*l+this._y*f;this._z=g*l+this._z*f;this.onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,c){void 0===c&&(c=0);this._x=a[c];this._y= a[c+1];this._z=a[c+2];this._w=a[c+3];this.onChangeCallback();return this},toArray:function(a,c){void 0===a&&(a=[]);void 0===c&&(c=0);a[c]=this._x;a[c+1]=this._y;a[c+2]=this._z;a[c+3]=this._w;return a},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}};Object.assign(b.Quaternion,{slerp:function(a,c,b,d){return b.copy(a).slerp(c,d)},slerpFlat:function(a,c,b,d,g,h,l){var f=b[d+0],r=b[d+1],t=b[d+2];b=b[d+3];d=g[h+0];var w=g[h+1],u=g[h+2];g=g[h+3];if(b!==g||f!==d|| r!==w||t!==u){h=1-l;var q=f*d+r*w+t*u+b*g,v=0<=q?1:-1,k=1-q*q;k>Number.EPSILON&&(k=Math.sqrt(k),q=Math.atan2(k,q*v),h=Math.sin(h*q)/k,l=Math.sin(l*q)/k);v*=l;f=f*h+d*v;r=r*h+w*v;t=t*h+u*v;b=b*h+g*v;h===1-l&&(l=1/Math.sqrt(f*f+r*r+t*t+b*b),f*=l,r*=l,t*=l,b*=l)}a[c]=f;a[c+1]=r;a[c+2]=t;a[c+3]=b}});b.Vector2=function(a,c){this.x=a||0;this.y=c||0};b.Vector2.prototype={constructor:b.Vector2,get width(){return this.x},set width(a){this.x=a},get height(){return this.y},set height(a){this.y=a},set:function(a, c){this.x=a;this.y=c;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,c){switch(a){case 0:this.x=c;break;case 1:this.y=c;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x= a.x;this.y=a.y;return this},add:function(a,c){if(void 0!==c)return console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,c);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},addVectors:function(a,c){this.x=a.x+c.x;this.y=a.y+c.y;return this},addScaledVector:function(a,c){this.x+=a.x*c;this.y+=a.y*c;return this},sub:function(a,c){if(void 0!==c)return console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(a,c);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},subVectors:function(a,c){this.x=a.x-c.x;this.y=a.y-c.y;return this},multiply:function(a){this.x*=a.x;this.y*=a.y;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a,this.y*=a):this.y=this.x=0;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y, a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,c){this.x=Math.max(a.x,Math.min(c.x,this.x));this.y=Math.max(a.y,Math.min(c.y,this.y));return this},clampScalar:function(){var a,c;return function(e,d){void 0===a&&(a=new b.Vector2,c=new b.Vector2);a.set(e,e);c.set(d,d);return this.clamp(a,c)}}(),clampLength:function(a,c){var b=this.length();return this.multiplyScalar(Math.max(a,Math.min(c,b))/b)},floor:function(){this.x=Math.floor(this.x); this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},lengthSq:function(){return this.x*this.x+this.y*this.y}, length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var c=this.x-a.x;a=this.y-a.y;return c*c+a*a},setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a, c){this.x+=(a.x-this.x)*c;this.y+=(a.y-this.y)*c;return this},lerpVectors:function(a,c,b){return this.subVectors(c,a).multiplyScalar(b).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,c){void 0===c&&(c=0);this.x=a[c];this.y=a[c+1];return this},toArray:function(a,c){void 0===a&&(a=[]);void 0===c&&(c=0);a[c]=this.x;a[c+1]=this.y;return a},fromAttribute:function(a,c,b){void 0===b&&(b=0);c=c*a.itemSize+b;this.x=a.array[c];this.y=a.array[c+1];return this},rotateAround:function(a, c){var b=Math.cos(c),d=Math.sin(c),g=this.x-a.x,h=this.y-a.y;this.x=g*b-h*d+a.x;this.y=g*d+h*b+a.y;return this}};b.Vector3=function(a,c,b){this.x=a||0;this.y=c||0;this.z=b||0};b.Vector3.prototype={constructor:b.Vector3,set:function(a,c,b){this.x=a;this.y=c;this.z=b;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,c){switch(a){case 0:this.x= c;break;case 1:this.y=c;break;case 2:this.z=c;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,c){if(void 0!==c)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(a,c);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,c){this.x=a.x+c.x;this.y=a.y+c.y;this.z=a.z+c.z;return this},addScaledVector:function(a,c){this.x+=a.x*c;this.y+=a.y*c;this.z+=a.z*c;return this},sub:function(a,c){if(void 0!==c)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,c);this.x-=a.x;this.y-=a.y;this.z-=a.z; return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,c){this.x=a.x-c.x;this.y=a.y-c.y;this.z=a.z-c.z;return this},multiply:function(a,c){if(void 0!==c)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(a,c);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a,this.y*=a,this.z*=a):this.z=this.y=this.x=0;return this},multiplyVectors:function(a, c){this.x=a.x*c.x;this.y=a.y*c.y;this.z=a.z*c.z;return this},applyEuler:function(){var a;return function(c){!1===c instanceof b.Euler&&console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");void 0===a&&(a=new b.Quaternion);return this.applyQuaternion(a.setFromEuler(c))}}(),applyAxisAngle:function(){var a;return function(c,e){void 0===a&&(a=new b.Quaternion);return this.applyQuaternion(a.setFromAxisAngle(c,e))}}(),applyMatrix3:function(a){var c= this.x,b=this.y,d=this.z;a=a.elements;this.x=a[0]*c+a[3]*b+a[6]*d;this.y=a[1]*c+a[4]*b+a[7]*d;this.z=a[2]*c+a[5]*b+a[8]*d;return this},applyMatrix4:function(a){var c=this.x,b=this.y,d=this.z;a=a.elements;this.x=a[0]*c+a[4]*b+a[8]*d+a[12];this.y=a[1]*c+a[5]*b+a[9]*d+a[13];this.z=a[2]*c+a[6]*b+a[10]*d+a[14];return this},applyProjection:function(a){var c=this.x,b=this.y,d=this.z;a=a.elements;var g=1/(a[3]*c+a[7]*b+a[11]*d+a[15]);this.x=(a[0]*c+a[4]*b+a[8]*d+a[12])*g;this.y=(a[1]*c+a[5]*b+a[9]*d+a[13])* g;this.z=(a[2]*c+a[6]*b+a[10]*d+a[14])*g;return this},applyQuaternion:function(a){var c=this.x,b=this.y,d=this.z,g=a.x,h=a.y,l=a.z;a=a.w;var f=a*c+h*d-l*b,r=a*b+l*c-g*d,t=a*d+g*b-h*c,c=-g*c-h*b-l*d;this.x=f*a+c*-g+r*-l-t*-h;this.y=r*a+c*-h+t*-g-f*-l;this.z=t*a+c*-l+f*-h-r*-g;return this},project:function(){var a;return function(c){void 0===a&&(a=new b.Matrix4);a.multiplyMatrices(c.projectionMatrix,a.getInverse(c.matrixWorld));return this.applyProjection(a)}}(),unproject:function(){var a;return function(c){void 0=== a&&(a=new b.Matrix4);a.multiplyMatrices(c.matrixWorld,a.getInverse(c.projectionMatrix));return this.applyProjection(a)}}(),transformDirection:function(a){var c=this.x,b=this.y,d=this.z;a=a.elements;this.x=a[0]*c+a[4]*b+a[8]*d;this.y=a[1]*c+a[5]*b+a[9]*d;this.z=a[2]*c+a[6]*b+a[10]*d;return this.normalize()},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y, a.y);this.z=Math.min(this.z,a.z);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);return this},clamp:function(a,c){this.x=Math.max(a.x,Math.min(c.x,this.x));this.y=Math.max(a.y,Math.min(c.y,this.y));this.z=Math.max(a.z,Math.min(c.z,this.z));return this},clampScalar:function(){var a,c;return function(e,d){void 0===a&&(a=new b.Vector3,c=new b.Vector3);a.set(e,e,e);c.set(d,d,d);return this.clamp(a,c)}}(),clampLength:function(a,c){var b= this.length();return this.multiplyScalar(Math.max(a,Math.min(c,b))/b)},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y): Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())}, setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,c){this.x+=(a.x-this.x)*c;this.y+=(a.y-this.y)*c;this.z+=(a.z-this.z)*c;return this},lerpVectors:function(a,c,b){return this.subVectors(c,a).multiplyScalar(b).add(a)},cross:function(a,c){if(void 0!==c)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(a,c);var b=this.x,d=this.y,g=this.z;this.x=d*a.z-g*a.y;this.y=g*a.x-b*a.z;this.z=b*a.y- d*a.x;return this},crossVectors:function(a,c){var b=a.x,d=a.y,g=a.z,h=c.x,l=c.y,f=c.z;this.x=d*f-g*l;this.y=g*h-b*f;this.z=b*l-d*h;return this},projectOnVector:function(){var a,c;return function(e){void 0===a&&(a=new b.Vector3);a.copy(e).normalize();c=this.dot(a);return this.copy(a).multiplyScalar(c)}}(),projectOnPlane:function(){var a;return function(c){void 0===a&&(a=new b.Vector3);a.copy(this).projectOnVector(c);return this.sub(a)}}(),reflect:function(){var a;return function(c){void 0===a&&(a= new b.Vector3);return this.sub(a.copy(c).multiplyScalar(2*this.dot(c)))}}(),angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(b.Math.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var c=this.x-a.x,b=this.y-a.y;a=this.z-a.z;return c*c+b*b+a*a},setFromSpherical:function(a){var c=Math.sin(a.phi)*a.radius;this.x=c*Math.sin(a.theta);this.y=Math.cos(a.phi)*a.radius;this.z=c*Math.cos(a.theta);return this}, setFromMatrixPosition:function(a){return this.setFromMatrixColumn(a,3)},setFromMatrixScale:function(a){var c=this.setFromMatrixColumn(a,0).length(),b=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=c;this.y=b;this.z=a;return this},setFromMatrixColumn:function(a,c){if("number"===typeof a){console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).");var b=a;a=c;c=b}return this.fromArray(a.elements,4*c)},equals:function(a){return a.x===this.x&& a.y===this.y&&a.z===this.z},fromArray:function(a,c){void 0===c&&(c=0);this.x=a[c];this.y=a[c+1];this.z=a[c+2];return this},toArray:function(a,c){void 0===a&&(a=[]);void 0===c&&(c=0);a[c]=this.x;a[c+1]=this.y;a[c+2]=this.z;return a},fromAttribute:function(a,c,b){void 0===b&&(b=0);c=c*a.itemSize+b;this.x=a.array[c];this.y=a.array[c+1];this.z=a.array[c+2];return this}};b.Vector4=function(a,c,b,d){this.x=a||0;this.y=c||0;this.z=b||0;this.w=void 0!==d?d:1};b.Vector4.prototype={constructor:b.Vector4,set:function(a, c,b,d){this.x=a;this.y=c;this.z=b;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,c){switch(a){case 0:this.x=c;break;case 1:this.y=c;break;case 2:this.z=c;break;case 3:this.w=c;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x; case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,c){if(void 0!==c)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,c);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this}, addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,c){this.x=a.x+c.x;this.y=a.y+c.y;this.z=a.z+c.z;this.w=a.w+c.w;return this},addScaledVector:function(a,c){this.x+=a.x*c;this.y+=a.y*c;this.z+=a.z*c;this.w+=a.w*c;return this},sub:function(a,c){if(void 0!==c)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,c);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-= a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,c){this.x=a.x-c.x;this.y=a.y-c.y;this.z=a.z-c.z;this.w=a.w-c.w;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a,this.y*=a,this.z*=a,this.w*=a):this.w=this.z=this.y=this.x=0;return this},applyMatrix4:function(a){var c=this.x,b=this.y,d=this.z,g=this.w;a=a.elements;this.x=a[0]*c+a[4]*b+a[8]*d+a[12]*g;this.y=a[1]*c+a[5]*b+a[9]*d+a[13]*g;this.z=a[2]*c+a[6]*b+a[10]*d+a[14]*g;this.w=a[3]*c+a[7]*b+a[11]*d+a[15]*g;return this}, divideScalar:function(a){return this.multiplyScalar(1/a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var c=Math.sqrt(1-a.w*a.w);1E-4>c?(this.x=1,this.z=this.y=0):(this.x=a.x/c,this.y=a.y/c,this.z=a.z/c);return this},setAxisAngleFromRotationMatrix:function(a){var c,b,d;a=a.elements;var g=a[0];d=a[4];var h=a[8],l=a[1],f=a[5],r=a[9];b=a[2];c=a[6];var t=a[10];if(.01>Math.abs(d-l)&&.01>Math.abs(h-b)&&.01>Math.abs(r-c)){if(.1>Math.abs(d+l)&&.1>Math.abs(h+b)&&.1>Math.abs(r+c)&&.1>Math.abs(g+ f+t-3))return this.set(1,0,0,0),this;a=Math.PI;g=(g+1)/2;f=(f+1)/2;t=(t+1)/2;d=(d+l)/4;h=(h+b)/4;r=(r+c)/4;g>f&&g>t?.01>g?(c=0,d=b=.707106781):(c=Math.sqrt(g),b=d/c,d=h/c):f>t?.01>f?(c=.707106781,b=0,d=.707106781):(b=Math.sqrt(f),c=d/b,d=r/b):.01>t?(b=c=.707106781,d=0):(d=Math.sqrt(t),c=h/d,b=r/d);this.set(c,b,d,a);return this}a=Math.sqrt((c-r)*(c-r)+(h-b)*(h-b)+(l-d)*(l-d));.001>Math.abs(a)&&(a=1);this.x=(c-r)/a;this.y=(h-b)/a;this.z=(l-d)/a;this.w=Math.acos((g+f+t-1)/2);return this},min:function(a){this.x= Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,c){this.x=Math.max(a.x,Math.min(c.x,this.x));this.y=Math.max(a.y,Math.min(c.y,this.y));this.z=Math.max(a.z,Math.min(c.z,this.z));this.w=Math.max(a.w,Math.min(c.w,this.w));return this},clampScalar:function(){var a,c;return function(e, d){void 0===a&&(a=new b.Vector4,c=new b.Vector4);a.set(e,e,e,e);c.set(d,d,d,d);return this.clamp(a,c)}}(),floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this}, roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x* this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length())},setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,c){this.x+=(a.x-this.x)*c;this.y+=(a.y-this.y)*c;this.z+=(a.z-this.z)*c;this.w+=(a.w-this.w)*c;return this},lerpVectors:function(a,c,b){return this.subVectors(c,a).multiplyScalar(b).add(a)},equals:function(a){return a.x=== this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,c){void 0===c&&(c=0);this.x=a[c];this.y=a[c+1];this.z=a[c+2];this.w=a[c+3];return this},toArray:function(a,c){void 0===a&&(a=[]);void 0===c&&(c=0);a[c]=this.x;a[c+1]=this.y;a[c+2]=this.z;a[c+3]=this.w;return a},fromAttribute:function(a,c,b){void 0===b&&(b=0);c=c*a.itemSize+b;this.x=a.array[c];this.y=a.array[c+1];this.z=a.array[c+2];this.w=a.array[c+3];return this}};b.Euler=function(a,c,e,d){this._x=a||0;this._y=c||0;this._z=e|| 0;this._order=d||b.Euler.DefaultOrder};b.Euler.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" ");b.Euler.DefaultOrder="XYZ";b.Euler.prototype={constructor:b.Euler,get x(){return this._x},set x(a){this._x=a;this.onChangeCallback()},get y(){return this._y},set y(a){this._y=a;this.onChangeCallback()},get z(){return this._z},set z(a){this._z=a;this.onChangeCallback()},get order(){return this._order},set order(a){this._order=a;this.onChangeCallback()},set:function(a,c,b,d){this._x=a;this._y=c;this._z= b;this._order=d||this._order;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(a){this._x=a._x;this._y=a._y;this._z=a._z;this._order=a._order;this.onChangeCallback();return this},setFromRotationMatrix:function(a,c,e){var d=b.Math.clamp,g=a.elements;a=g[0];var h=g[4],l=g[8],f=g[1],r=g[5],t=g[9],w=g[2],u=g[6],g=g[10];c=c||this._order;"XYZ"===c?(this._y=Math.asin(d(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(-t,g), this._z=Math.atan2(-h,a)):(this._x=Math.atan2(u,r),this._z=0)):"YXZ"===c?(this._x=Math.asin(-d(t,-1,1)),.99999>Math.abs(t)?(this._y=Math.atan2(l,g),this._z=Math.atan2(f,r)):(this._y=Math.atan2(-w,a),this._z=0)):"ZXY"===c?(this._x=Math.asin(d(u,-1,1)),.99999>Math.abs(u)?(this._y=Math.atan2(-w,g),this._z=Math.atan2(-h,r)):(this._y=0,this._z=Math.atan2(f,a))):"ZYX"===c?(this._y=Math.asin(-d(w,-1,1)),.99999>Math.abs(w)?(this._x=Math.atan2(u,g),this._z=Math.atan2(f,a)):(this._x=0,this._z=Math.atan2(-h, r))):"YZX"===c?(this._z=Math.asin(d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(-t,r),this._y=Math.atan2(-w,a)):(this._x=0,this._y=Math.atan2(l,g))):"XZY"===c?(this._z=Math.asin(-d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(u,r),this._y=Math.atan2(l,a)):(this._x=Math.atan2(-t,g),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+c);this._order=c;if(!1!==e)this.onChangeCallback();return this},setFromQuaternion:function(){var a;return function(c,e,d){void 0=== a&&(a=new b.Matrix4);a.makeRotationFromQuaternion(c);return this.setFromRotationMatrix(a,e,d)}}(),setFromVector3:function(a,c){return this.set(a.x,a.y,a.z,c||this._order)},reorder:function(){var a=new b.Quaternion;return function(c){a.setFromEuler(this);return this.setFromQuaternion(a,c)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback(); return this},toArray:function(a,c){void 0===a&&(a=[]);void 0===c&&(c=0);a[c]=this._x;a[c+1]=this._y;a[c+2]=this._z;a[c+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new b.Vector3(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}};b.Line3=function(a,c){this.start=void 0!==a?a:new b.Vector3;this.end=void 0!==c?c:new b.Vector3};b.Line3.prototype={constructor:b.Line3,set:function(a,c){this.start.copy(a); this.end.copy(c);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},center:function(a){return(a||new b.Vector3).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){return(a||new b.Vector3).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,c){var e=c||new b.Vector3; return this.delta(e).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new b.Vector3,c=new b.Vector3;return function(e,d){a.subVectors(e,this.start);c.subVectors(this.end,this.start);var g=c.dot(c),g=c.dot(a)/g;d&&(g=b.Math.clamp(g,0,1));return g}}(),closestPointToPoint:function(a,c,e){a=this.closestPointToPointParameter(a,c);e=e||new b.Vector3;return this.delta(e).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a); return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}};b.Box2=function(a,c){this.min=void 0!==a?a:new b.Vector2(Infinity,Infinity);this.max=void 0!==c?c:new b.Vector2(-Infinity,-Infinity)};b.Box2.prototype={constructor:b.Box2,set:function(a,c){this.min.copy(a);this.max.copy(c);return this},setFromPoints:function(a){this.makeEmpty();for(var c=0,b=a.length;c<b;c++)this.expandByPoint(a[c]);return this},setFromCenterAndSize:function(){var a=new b.Vector2;return function(c, b){var d=a.copy(b).multiplyScalar(.5);this.min.copy(c).sub(d);this.max.copy(c).add(d);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},center:function(a){return(a||new b.Vector2).addVectors(this.min,this.max).multiplyScalar(.5)},size:function(a){return(a|| new b.Vector2).subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y?!0:!1},getParameter:function(a, c){return(c||new b.Vector2).set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},clampPoint:function(a,c){return(c||new b.Vector2).copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new b.Vector2;return function(c){return a.copy(c).clamp(this.min,this.max).sub(c).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max); return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}};b.Box3=function(a,c){this.min=void 0!==a?a:new b.Vector3(Infinity,Infinity,Infinity);this.max=void 0!==c?c:new b.Vector3(-Infinity,-Infinity,-Infinity)};b.Box3.prototype={constructor:b.Box3,set:function(a,c){this.min.copy(a);this.max.copy(c);return this},setFromArray:function(a){for(var c= Infinity,b=Infinity,d=Infinity,g=-Infinity,h=-Infinity,l=-Infinity,f=0,r=a.length;f<r;f+=3){var t=a[f],w=a[f+1],u=a[f+2];t<c&&(c=t);w<b&&(b=w);u<d&&(d=u);t>g&&(g=t);w>h&&(h=w);u>l&&(l=u)}this.min.set(c,b,d);this.max.set(g,h,l)},setFromPoints:function(a){this.makeEmpty();for(var c=0,b=a.length;c<b;c++)this.expandByPoint(a[c]);return this},setFromCenterAndSize:function(){var a=new b.Vector3;return function(c,b){var d=a.copy(b).multiplyScalar(.5);this.min.copy(c).sub(d);this.max.copy(c).add(d);return this}}(), setFromObject:function(){var a=new b.Vector3;return function(c){var e=this;c.updateMatrixWorld(!0);this.makeEmpty();c.traverse(function(c){var g=c.geometry;if(void 0!==g)if(g instanceof b.Geometry)for(var h=g.vertices,g=0,l=h.length;g<l;g++)a.copy(h[g]),a.applyMatrix4(c.matrixWorld),e.expandByPoint(a);else if(g instanceof b.BufferGeometry&&void 0!==g.attributes.position)for(h=g.attributes.position.array,g=0,l=h.length;g<l;g+=3)a.fromArray(h,g),a.applyMatrix4(c.matrixWorld),e.expandByPoint(a)});return this}}(), clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=this.min.z=Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},center:function(a){return(a||new b.Vector3).addVectors(this.min,this.max).multiplyScalar(.5)},size:function(a){return(a||new b.Vector3).subVectors(this.max,this.min)}, expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y||a.z<this.min.z||a.z>this.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<= this.max.z?!0:!1},getParameter:function(a,c){return(c||new b.Vector3).set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y||a.max.z<this.min.z||a.min.z>this.max.z?!1:!0},intersectsSphere:function(){var a;return function(c){void 0===a&&(a=new b.Vector3);this.clampPoint(c.center,a);return a.distanceToSquared(c.center)<= c.radius*c.radius}}(),intersectsPlane:function(a){var c,b;0<a.normal.x?(c=a.normal.x*this.min.x,b=a.normal.x*this.max.x):(c=a.normal.x*this.max.x,b=a.normal.x*this.min.x);0<a.normal.y?(c+=a.normal.y*this.min.y,b+=a.normal.y*this.max.y):(c+=a.normal.y*this.max.y,b+=a.normal.y*this.min.y);0<a.normal.z?(c+=a.normal.z*this.min.z,b+=a.normal.z*this.max.z):(c+=a.normal.z*this.max.z,b+=a.normal.z*this.min.z);return c<=a.constant&&b>=a.constant},clampPoint:function(a,c){return(c||new b.Vector3).copy(a).clamp(this.min, this.max)},distanceToPoint:function(){var a=new b.Vector3;return function(c){return a.copy(c).clamp(this.min,this.max).sub(c).length()}}(),getBoundingSphere:function(){var a=new b.Vector3;return function(c){c=c||new b.Sphere;c.center=this.center();c.radius=.5*this.size(a).length();return c}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(){var a= [new b.Vector3,new b.Vector3,new b.Vector3,new b.Vector3,new b.Vector3,new b.Vector3,new b.Vector3,new b.Vector3];return function(c){if(this.isEmpty())return this;a[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(c);a[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(c);a[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(c);a[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(c);a[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(c);a[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(c); a[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(c);a[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(c);this.setFromPoints(a);return this}}(),translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}};b.Matrix3=function(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]);0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")};b.Matrix3.prototype= {constructor:b.Matrix3,set:function(a,c,b,d,g,h,l,f,r){var t=this.elements;t[0]=a;t[1]=d;t[2]=l;t[3]=c;t[4]=g;t[5]=f;t[6]=b;t[7]=h;t[8]=r;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){a=a.elements;this.set(a[0],a[3],a[6],a[1],a[4],a[7],a[2],a[5],a[8]);return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},applyToVector3Array:function(){var a; return function(c,e,d){void 0===a&&(a=new b.Vector3);void 0===e&&(e=0);void 0===d&&(d=c.length);for(var g=0;g<d;g+=3,e+=3)a.fromArray(c,e),a.applyMatrix3(this),a.toArray(c,e);return c}}(),applyToBuffer:function(){var a;return function(c,e,d){void 0===a&&(a=new b.Vector3);void 0===e&&(e=0);void 0===d&&(d=c.length/c.itemSize);for(var g=0;g<d;g++,e++)a.x=c.getX(e),a.y=c.getY(e),a.z=c.getZ(e),a.applyMatrix3(this),c.setXYZ(a.x,a.y,a.z);return c}}(),multiplyScalar:function(a){var c=this.elements;c[0]*= a;c[3]*=a;c[6]*=a;c[1]*=a;c[4]*=a;c[7]*=a;c[2]*=a;c[5]*=a;c[8]*=a;return this},determinant:function(){var a=this.elements,c=a[0],b=a[1],d=a[2],g=a[3],h=a[4],l=a[5],f=a[6],r=a[7],a=a[8];return c*h*a-c*l*r-b*g*a+b*l*f+d*g*r-d*h*f},getInverse:function(a,c){a instanceof b.Matrix4&&console.error("THREE.Matrix3.getInverse no longer takes a Matrix4 argument.");var e=a.elements,d=this.elements,g=e[0],h=e[1],l=e[2],f=e[3],r=e[4],t=e[5],w=e[6],u=e[7],e=e[8],q=e*r-t*u,v=t*w-e*f,k=u*f-r*w,p=g*q+h*v+l*k;if(0=== p){if(c)throw Error("THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0");console.warn("THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0");return this.identity()}p=1/p;d[0]=q*p;d[1]=(l*u-e*h)*p;d[2]=(t*h-l*r)*p;d[3]=v*p;d[4]=(e*g-l*w)*p;d[5]=(l*f-t*g)*p;d[6]=k*p;d[7]=(h*w-u*g)*p;d[8]=(r*g-h*f)*p;return this},transpose:function(){var a,c=this.elements;a=c[1];c[1]=c[3];c[3]=a;a=c[2];c[2]=c[6];c[6]=a;a=c[5];c[5]=c[7];c[7]=a;return this},flattenToArrayOffset:function(a, c){console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead.");return this.toArray(a,c)},getNormalMatrix:function(a){return this.setFromMatrix4(a).getInverse(this).transpose()},transposeIntoArray:function(a){var c=this.elements;a[0]=c[0];a[1]=c[3];a[2]=c[6];a[3]=c[1];a[4]=c[4];a[5]=c[7];a[6]=c[2];a[7]=c[5];a[8]=c[8];return this},fromArray:function(a){this.elements.set(a);return this},toArray:function(a,c){void 0===a&&(a=[]);void 0===c&&(c=0);var b=this.elements; a[c]=b[0];a[c+1]=b[1];a[c+2]=b[2];a[c+3]=b[3];a[c+4]=b[4];a[c+5]=b[5];a[c+6]=b[6];a[c+7]=b[7];a[c+8]=b[8];return a}};b.Matrix4=function(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")};b.Matrix4.prototype={constructor:b.Matrix4,set:function(a,c,b,d,g,h,l,f,r,t,w,u,q,v,k,p){var n=this.elements;n[0]=a;n[4]=c;n[8]=b;n[12]=d;n[1]=g;n[5]=h;n[9]=l;n[13]=f;n[2]=r;n[6]=t; n[10]=w;n[14]=u;n[3]=q;n[7]=v;n[11]=k;n[15]=p;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new b.Matrix4).fromArray(this.elements)},copy:function(a){this.elements.set(a.elements);return this},copyPosition:function(a){var c=this.elements;a=a.elements;c[12]=a[12];c[13]=a[13];c[14]=a[14];return this},extractBasis:function(a,c,b){a.setFromMatrixColumn(this,0);c.setFromMatrixColumn(this,1);b.setFromMatrixColumn(this,2);return this},makeBasis:function(a, c,b){this.set(a.x,c.x,b.x,0,a.y,c.y,b.y,0,a.z,c.z,b.z,0,0,0,0,1);return this},extractRotation:function(){var a;return function(c){void 0===a&&(a=new b.Vector3);var e=this.elements,d=c.elements,g=1/a.setFromMatrixColumn(c,0).length(),h=1/a.setFromMatrixColumn(c,1).length();c=1/a.setFromMatrixColumn(c,2).length();e[0]=d[0]*g;e[1]=d[1]*g;e[2]=d[2]*g;e[4]=d[4]*h;e[5]=d[5]*h;e[6]=d[6]*h;e[8]=d[8]*c;e[9]=d[9]*c;e[10]=d[10]*c;return this}}(),makeRotationFromEuler:function(a){!1===a instanceof b.Euler&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order."); var c=this.elements,e=a.x,d=a.y,g=a.z,h=Math.cos(e),e=Math.sin(e),l=Math.cos(d),d=Math.sin(d),f=Math.cos(g),g=Math.sin(g);if("XYZ"===a.order){a=h*f;var r=h*g,t=e*f,w=e*g;c[0]=l*f;c[4]=-l*g;c[8]=d;c[1]=r+t*d;c[5]=a-w*d;c[9]=-e*l;c[2]=w-a*d;c[6]=t+r*d;c[10]=h*l}else"YXZ"===a.order?(a=l*f,r=l*g,t=d*f,w=d*g,c[0]=a+w*e,c[4]=t*e-r,c[8]=h*d,c[1]=h*g,c[5]=h*f,c[9]=-e,c[2]=r*e-t,c[6]=w+a*e,c[10]=h*l):"ZXY"===a.order?(a=l*f,r=l*g,t=d*f,w=d*g,c[0]=a-w*e,c[4]=-h*g,c[8]=t+r*e,c[1]=r+t*e,c[5]=h*f,c[9]=w-a*e,c[2]= -h*d,c[6]=e,c[10]=h*l):"ZYX"===a.order?(a=h*f,r=h*g,t=e*f,w=e*g,c[0]=l*f,c[4]=t*d-r,c[8]=a*d+w,c[1]=l*g,c[5]=w*d+a,c[9]=r*d-t,c[2]=-d,c[6]=e*l,c[10]=h*l):"YZX"===a.order?(a=h*l,r=h*d,t=e*l,w=e*d,c[0]=l*f,c[4]=w-a*g,c[8]=t*g+r,c[1]=g,c[5]=h*f,c[9]=-e*f,c[2]=-d*f,c[6]=r*g+t,c[10]=a-w*g):"XZY"===a.order&&(a=h*l,r=h*d,t=e*l,w=e*d,c[0]=l*f,c[4]=-g,c[8]=d*f,c[1]=a*g+w,c[5]=h*f,c[9]=r*g-t,c[2]=t*g-r,c[6]=e*f,c[10]=w*g+a);c[3]=0;c[7]=0;c[11]=0;c[12]=0;c[13]=0;c[14]=0;c[15]=1;return this},makeRotationFromQuaternion:function(a){var c= this.elements,b=a.x,d=a.y,g=a.z,h=a.w,l=b+b,f=d+d,r=g+g;a=b*l;var t=b*f,b=b*r,w=d*f,d=d*r,g=g*r,l=h*l,f=h*f,h=h*r;c[0]=1-(w+g);c[4]=t-h;c[8]=b+f;c[1]=t+h;c[5]=1-(a+g);c[9]=d-l;c[2]=b-f;c[6]=d+l;c[10]=1-(a+w);c[3]=0;c[7]=0;c[11]=0;c[12]=0;c[13]=0;c[14]=0;c[15]=1;return this},lookAt:function(){var a,c,e;return function(d,g,h){void 0===a&&(a=new b.Vector3,c=new b.Vector3,e=new b.Vector3);var l=this.elements;e.subVectors(d,g).normalize();0===e.lengthSq()&&(e.z=1);a.crossVectors(h,e).normalize();0===a.lengthSq()&& (e.z+=1E-4,a.crossVectors(h,e).normalize());c.crossVectors(e,a);l[0]=a.x;l[4]=c.x;l[8]=e.x;l[1]=a.y;l[5]=c.y;l[9]=e.y;l[2]=a.z;l[6]=c.z;l[10]=e.z;return this}}(),multiply:function(a,c){return void 0!==c?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a,c)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,c){var b=a.elements,d=c.elements,g= this.elements,h=b[0],l=b[4],f=b[8],r=b[12],t=b[1],w=b[5],u=b[9],q=b[13],v=b[2],k=b[6],p=b[10],n=b[14],A=b[3],C=b[7],G=b[11],b=b[15],D=d[0],H=d[4],E=d[8],F=d[12],I=d[1],O=d[5],J=d[9],K=d[13],T=d[2],U=d[6],S=d[10],L=d[14],P=d[3],Q=d[7],M=d[11],d=d[15];g[0]=h*D+l*I+f*T+r*P;g[4]=h*H+l*O+f*U+r*Q;g[8]=h*E+l*J+f*S+r*M;g[12]=h*F+l*K+f*L+r*d;g[1]=t*D+w*I+u*T+q*P;g[5]=t*H+w*O+u*U+q*Q;g[9]=t*E+w*J+u*S+q*M;g[13]=t*F+w*K+u*L+q*d;g[2]=v*D+k*I+p*T+n*P;g[6]=v*H+k*O+p*U+n*Q;g[10]=v*E+k*J+p*S+n*M;g[14]=v*F+k*K+p*L+ n*d;g[3]=A*D+C*I+G*T+b*P;g[7]=A*H+C*O+G*U+b*Q;g[11]=A*E+C*J+G*S+b*M;g[15]=A*F+C*K+G*L+b*d;return this},multiplyToArray:function(a,c,b){var d=this.elements;this.multiplyMatrices(a,c);b[0]=d[0];b[1]=d[1];b[2]=d[2];b[3]=d[3];b[4]=d[4];b[5]=d[5];b[6]=d[6];b[7]=d[7];b[8]=d[8];b[9]=d[9];b[10]=d[10];b[11]=d[11];b[12]=d[12];b[13]=d[13];b[14]=d[14];b[15]=d[15];return this},multiplyScalar:function(a){var c=this.elements;c[0]*=a;c[4]*=a;c[8]*=a;c[12]*=a;c[1]*=a;c[5]*=a;c[9]*=a;c[13]*=a;c[2]*=a;c[6]*=a;c[10]*= a;c[14]*=a;c[3]*=a;c[7]*=a;c[11]*=a;c[15]*=a;return this},applyToVector3Array:function(){var a;return function(c,e,d){void 0===a&&(a=new b.Vector3);void 0===e&&(e=0);void 0===d&&(d=c.length);for(var g=0;g<d;g+=3,e+=3)a.fromArray(c,e),a.applyMatrix4(this),a.toArray(c,e);return c}}(),applyToBuffer:function(){var a;return function(c,e,d){void 0===a&&(a=new b.Vector3);void 0===e&&(e=0);void 0===d&&(d=c.length/c.itemSize);for(var g=0;g<d;g++,e++)a.x=c.getX(e),a.y=c.getY(e),a.z=c.getZ(e),a.applyMatrix4(this), c.setXYZ(a.x,a.y,a.z);return c}}(),determinant:function(){var a=this.elements,c=a[0],b=a[4],d=a[8],g=a[12],h=a[1],l=a[5],f=a[9],r=a[13],t=a[2],w=a[6],u=a[10],q=a[14];return a[3]*(+g*f*w-d*r*w-g*l*u+b*r*u+d*l*q-b*f*q)+a[7]*(+c*f*q-c*r*u+g*h*u-d*h*q+d*r*t-g*f*t)+a[11]*(+c*r*w-c*l*q-g*h*w+b*h*q+g*l*t-b*r*t)+a[15]*(-d*l*t-c*f*w+c*l*u+d*h*w-b*h*u+b*f*t)},transpose:function(){var a=this.elements,c;c=a[1];a[1]=a[4];a[4]=c;c=a[2];a[2]=a[8];a[8]=c;c=a[6];a[6]=a[9];a[9]=c;c=a[3];a[3]=a[12];a[12]=c;c=a[7];a[7]= a[13];a[13]=c;c=a[11];a[11]=a[14];a[14]=c;return this},flattenToArrayOffset:function(a,c){console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead.");return this.toArray(a,c)},getPosition:function(){var a;return function(){void 0===a&&(a=new b.Vector3);console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");return a.setFromMatrixColumn(this,3)}}(),setPosition:function(a){var c=this.elements;c[12]=a.x; c[13]=a.y;c[14]=a.z;return this},getInverse:function(a,c){var b=this.elements,d=a.elements,g=d[0],h=d[1],l=d[2],f=d[3],r=d[4],t=d[5],w=d[6],u=d[7],q=d[8],k=d[9],x=d[10],p=d[11],n=d[12],A=d[13],C=d[14],d=d[15],G=k*C*u-A*x*u+A*w*p-t*C*p-k*w*d+t*x*d,D=n*x*u-q*C*u-n*w*p+r*C*p+q*w*d-r*x*d,H=q*A*u-n*k*u+n*t*p-r*A*p-q*t*d+r*k*d,E=n*k*w-q*A*w-n*t*x+r*A*x+q*t*C-r*k*C,F=g*G+h*D+l*H+f*E;if(0===F){if(c)throw Error("THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0");console.warn("THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0"); return this.identity()}F=1/F;b[0]=G*F;b[1]=(A*x*f-k*C*f-A*l*p+h*C*p+k*l*d-h*x*d)*F;b[2]=(t*C*f-A*w*f+A*l*u-h*C*u-t*l*d+h*w*d)*F;b[3]=(k*w*f-t*x*f-k*l*u+h*x*u+t*l*p-h*w*p)*F;b[4]=D*F;b[5]=(q*C*f-n*x*f+n*l*p-g*C*p-q*l*d+g*x*d)*F;b[6]=(n*w*f-r*C*f-n*l*u+g*C*u+r*l*d-g*w*d)*F;b[7]=(r*x*f-q*w*f+q*l*u-g*x*u-r*l*p+g*w*p)*F;b[8]=H*F;b[9]=(n*k*f-q*A*f-n*h*p+g*A*p+q*h*d-g*k*d)*F;b[10]=(r*A*f-n*t*f+n*h*u-g*A*u-r*h*d+g*t*d)*F;b[11]=(q*t*f-r*k*f-q*h*u+g*k*u+r*h*p-g*t*p)*F;b[12]=E*F;b[13]=(q*A*l-n*k*l+n*h*x-g*A* x-q*h*C+g*k*C)*F;b[14]=(n*t*l-r*A*l-n*h*w+g*A*w+r*h*C-g*t*C)*F;b[15]=(r*k*l-q*t*l+q*h*w-g*k*w-r*h*x+g*t*x)*F;return this},scale:function(a){var c=this.elements,b=a.x,d=a.y;a=a.z;c[0]*=b;c[4]*=d;c[8]*=a;c[1]*=b;c[5]*=d;c[9]*=a;c[2]*=b;c[6]*=d;c[10]*=a;c[3]*=b;c[7]*=d;c[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6],a[8]*a[8]+a[9]*a[9]+a[10]*a[10]))},makeTranslation:function(a,c,b){this.set(1, 0,0,a,0,1,0,c,0,0,1,b,0,0,0,1);return this},makeRotationX:function(a){var c=Math.cos(a);a=Math.sin(a);this.set(1,0,0,0,0,c,-a,0,0,a,c,0,0,0,0,1);return this},makeRotationY:function(a){var c=Math.cos(a);a=Math.sin(a);this.set(c,0,a,0,0,1,0,0,-a,0,c,0,0,0,0,1);return this},makeRotationZ:function(a){var c=Math.cos(a);a=Math.sin(a);this.set(c,-a,0,0,a,c,0,0,0,0,1,0,0,0,0,1);return this},makeRotationAxis:function(a,c){var b=Math.cos(c),d=Math.sin(c),g=1-b,h=a.x,l=a.y,f=a.z,r=g*h,t=g*l;this.set(r*h+b,r* l-d*f,r*f+d*l,0,r*l+d*f,t*l+b,t*f-d*h,0,r*f-d*l,t*f+d*h,g*f*f+b,0,0,0,0,1);return this},makeScale:function(a,c,b){this.set(a,0,0,0,0,c,0,0,0,0,b,0,0,0,0,1);return this},compose:function(a,c,b){this.makeRotationFromQuaternion(c);this.scale(b);this.setPosition(a);return this},decompose:function(){var a,c;return function(e,d,g){void 0===a&&(a=new b.Vector3,c=new b.Matrix4);var h=this.elements,l=a.set(h[0],h[1],h[2]).length(),f=a.set(h[4],h[5],h[6]).length(),r=a.set(h[8],h[9],h[10]).length();0>this.determinant()&& (l=-l);e.x=h[12];e.y=h[13];e.z=h[14];c.elements.set(this.elements);e=1/l;var h=1/f,t=1/r;c.elements[0]*=e;c.elements[1]*=e;c.elements[2]*=e;c.elements[4]*=h;c.elements[5]*=h;c.elements[6]*=h;c.elements[8]*=t;c.elements[9]*=t;c.elements[10]*=t;d.setFromRotationMatrix(c);g.x=l;g.y=f;g.z=r;return this}}(),makeFrustum:function(a,c,b,d,g,h){var l=this.elements;l[0]=2*g/(c-a);l[4]=0;l[8]=(c+a)/(c-a);l[12]=0;l[1]=0;l[5]=2*g/(d-b);l[9]=(d+b)/(d-b);l[13]=0;l[2]=0;l[6]=0;l[10]=-(h+g)/(h-g);l[14]=-2*h*g/(h- g);l[3]=0;l[7]=0;l[11]=-1;l[15]=0;return this},makePerspective:function(a,c,e,d){a=e*Math.tan(b.Math.DEG2RAD*a*.5);var g=-a;return this.makeFrustum(g*c,a*c,g,a,e,d)},makeOrthographic:function(a,c,b,d,g,h){var l=this.elements,f=1/(c-a),r=1/(b-d),t=1/(h-g);l[0]=2*f;l[4]=0;l[8]=0;l[12]=-((c+a)*f);l[1]=0;l[5]=2*r;l[9]=0;l[13]=-((b+d)*r);l[2]=0;l[6]=0;l[10]=-2*t;l[14]=-((h+g)*t);l[3]=0;l[7]=0;l[11]=0;l[15]=1;return this},equals:function(a){var c=this.elements;a=a.elements;for(var b=0;16>b;b++)if(c[b]!== a[b])return!1;return!0},fromArray:function(a){this.elements.set(a);return this},toArray:function(a,c){void 0===a&&(a=[]);void 0===c&&(c=0);var b=this.elements;a[c]=b[0];a[c+1]=b[1];a[c+2]=b[2];a[c+3]=b[3];a[c+4]=b[4];a[c+5]=b[5];a[c+6]=b[6];a[c+7]=b[7];a[c+8]=b[8];a[c+9]=b[9];a[c+10]=b[10];a[c+11]=b[11];a[c+12]=b[12];a[c+13]=b[13];a[c+14]=b[14];a[c+15]=b[15];return a}};b.Ray=function(a,c){this.origin=void 0!==a?a:new b.Vector3;this.direction=void 0!==c?c:new b.Vector3};b.Ray.prototype={constructor:b.Ray, set:function(a,c){this.origin.copy(a);this.direction.copy(c);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,c){return(c||new b.Vector3).copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(){var a=new b.Vector3;return function(c){this.origin.copy(this.at(c,a));return this}}(), closestPointToPoint:function(a,c){var e=c||new b.Vector3;e.subVectors(a,this.origin);var d=e.dot(this.direction);return 0>d?e.copy(this.origin):e.copy(this.direction).multiplyScalar(d).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new b.Vector3;return function(c){var b=a.subVectors(c,this.origin).dot(this.direction);if(0>b)return this.origin.distanceToSquared(c);a.copy(this.direction).multiplyScalar(b).add(this.origin); return a.distanceToSquared(c)}}(),distanceSqToSegment:function(){var a=new b.Vector3,c=new b.Vector3,e=new b.Vector3;return function(b,g,h,l){a.copy(b).add(g).multiplyScalar(.5);c.copy(g).sub(b).normalize();e.copy(this.origin).sub(a);var f=.5*b.distanceTo(g),r=-this.direction.dot(c),t=e.dot(this.direction),w=-e.dot(c),k=e.lengthSq(),q=Math.abs(1-r*r),v;0<q?(b=r*w-t,g=r*t-w,v=f*q,0<=b?g>=-v?g<=v?(f=1/q,b*=f,g*=f,r=b*(b+r*g+2*t)+g*(r*b+g+2*w)+k):(g=f,b=Math.max(0,-(r*g+t)),r=-b*b+g*(g+2*w)+k):(g=-f, b=Math.max(0,-(r*g+t)),r=-b*b+g*(g+2*w)+k):g<=-v?(b=Math.max(0,-(-r*f+t)),g=0<b?-f:Math.min(Math.max(-f,-w),f),r=-b*b+g*(g+2*w)+k):g<=v?(b=0,g=Math.min(Math.max(-f,-w),f),r=g*(g+2*w)+k):(b=Math.max(0,-(r*f+t)),g=0<b?f:Math.min(Math.max(-f,-w),f),r=-b*b+g*(g+2*w)+k)):(g=0<r?-f:f,b=Math.max(0,-(r*g+t)),r=-b*b+g*(g+2*w)+k);h&&h.copy(this.direction).multiplyScalar(b).add(this.origin);l&&l.copy(c).multiplyScalar(g).add(a);return r}}(),intersectSphere:function(){var a=new b.Vector3;return function(c,b){a.subVectors(c.center, this.origin);var d=a.dot(this.direction),g=a.dot(a)-d*d,h=c.radius*c.radius;if(g>h)return null;h=Math.sqrt(h-g);g=d-h;d+=h;return 0>g&&0>d?null:0>g?this.at(d,b):this.at(g,b)}}(),intersectsSphere:function(a){return this.distanceToPoint(a.center)<=a.radius},distanceToPlane:function(a){var c=a.normal.dot(this.direction);if(0===c)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/c;return 0<=a?a:null},intersectPlane:function(a,c){var b=this.distanceToPlane(a);return null=== b?null:this.at(b,c)},intersectsPlane:function(a){var c=a.distanceToPoint(this.origin);return 0===c||0>a.normal.dot(this.direction)*c?!0:!1},intersectBox:function(a,c){var b,d,g,h,f;d=1/this.direction.x;h=1/this.direction.y;f=1/this.direction.z;var m=this.origin;0<=d?(b=(a.min.x-m.x)*d,d*=a.max.x-m.x):(b=(a.max.x-m.x)*d,d*=a.min.x-m.x);0<=h?(g=(a.min.y-m.y)*h,h*=a.max.y-m.y):(g=(a.max.y-m.y)*h,h*=a.min.y-m.y);if(b>h||g>d)return null;if(g>b||b!==b)b=g;if(h<d||d!==d)d=h;0<=f?(g=(a.min.z-m.z)*f,f*=a.max.z- m.z):(g=(a.max.z-m.z)*f,f*=a.min.z-m.z);if(b>f||g>d)return null;if(g>b||b!==b)b=g;if(f<d||d!==d)d=f;return 0>d?null:this.at(0<=b?b:d,c)},intersectsBox:function(){var a=new b.Vector3;return function(c){return null!==this.intersectBox(c,a)}}(),intersectTriangle:function(){var a=new b.Vector3,c=new b.Vector3,e=new b.Vector3,d=new b.Vector3;return function(b,h,f,m,r){c.subVectors(h,b);e.subVectors(f,b);d.crossVectors(c,e);h=this.direction.dot(d);if(0<h){if(m)return null;m=1}else if(0>h)m=-1,h=-h;else return null; a.subVectors(this.origin,b);b=m*this.direction.dot(e.crossVectors(a,e));if(0>b)return null;f=m*this.direction.dot(c.cross(a));if(0>f||b+f>h)return null;b=-m*a.dot(d);return 0>b?null:this.at(b/h,r)}}(),applyMatrix4:function(a){this.direction.add(this.origin).applyMatrix4(a);this.origin.applyMatrix4(a);this.direction.sub(this.origin);this.direction.normalize();return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}};b.Sphere=function(a,c){this.center= void 0!==a?a:new b.Vector3;this.radius=void 0!==c?c:0};b.Sphere.prototype={constructor:b.Sphere,set:function(a,c){this.center.copy(a);this.radius=c;return this},setFromPoints:function(){var a=new b.Box3;return function(c,b){var d=this.center;void 0!==b?d.copy(b):a.setFromPoints(c).center(d);for(var g=0,h=0,f=c.length;h<f;h++)g=Math.max(g,d.distanceToSquared(c[h]));this.radius=Math.sqrt(g);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.center.copy(a.center); this.radius=a.radius;return this},empty:function(){return 0>=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var c=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=c*c},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(this.center.dot(a.normal)-a.constant)<=this.radius}, clampPoint:function(a,c){var e=this.center.distanceToSquared(a),d=c||new b.Vector3;d.copy(a);e>this.radius*this.radius&&(d.sub(this.center).normalize(),d.multiplyScalar(this.radius).add(this.center));return d},getBoundingBox:function(a){a=a||new b.Box3;a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&& a.radius===this.radius}};b.Frustum=function(a,c,e,d,g,h){this.planes=[void 0!==a?a:new b.Plane,void 0!==c?c:new b.Plane,void 0!==e?e:new b.Plane,void 0!==d?d:new b.Plane,void 0!==g?g:new b.Plane,void 0!==h?h:new b.Plane]};b.Frustum.prototype={constructor:b.Frustum,set:function(a,c,b,d,g,h){var f=this.planes;f[0].copy(a);f[1].copy(c);f[2].copy(b);f[3].copy(d);f[4].copy(g);f[5].copy(h);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var c=this.planes,b=0;6> b;b++)c[b].copy(a.planes[b]);return this},setFromMatrix:function(a){var c=this.planes,b=a.elements;a=b[0];var d=b[1],g=b[2],h=b[3],f=b[4],m=b[5],r=b[6],t=b[7],w=b[8],k=b[9],q=b[10],v=b[11],x=b[12],p=b[13],n=b[14],b=b[15];c[0].setComponents(h-a,t-f,v-w,b-x).normalize();c[1].setComponents(h+a,t+f,v+w,b+x).normalize();c[2].setComponents(h+d,t+m,v+k,b+p).normalize();c[3].setComponents(h-d,t-m,v-k,b-p).normalize();c[4].setComponents(h-g,t-r,v-q,b-n).normalize();c[5].setComponents(h+g,t+r,v+q,b+n).normalize(); return this},intersectsObject:function(){var a=new b.Sphere;return function(c){var b=c.geometry;null===b.boundingSphere&&b.computeBoundingSphere();a.copy(b.boundingSphere).applyMatrix4(c.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new b.Sphere;return function(c){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(c.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSphere:function(a){var c=this.planes,b=a.center;a=-a.radius;for(var d=0;6>d;d++)if(c[d].distanceToPoint(b)< a)return!1;return!0},intersectsBox:function(){var a=new b.Vector3,c=new b.Vector3;return function(b){for(var d=this.planes,g=0;6>g;g++){var h=d[g];a.x=0<h.normal.x?b.min.x:b.max.x;c.x=0<h.normal.x?b.max.x:b.min.x;a.y=0<h.normal.y?b.min.y:b.max.y;c.y=0<h.normal.y?b.max.y:b.min.y;a.z=0<h.normal.z?b.min.z:b.max.z;c.z=0<h.normal.z?b.max.z:b.min.z;var f=h.distanceToPoint(a),h=h.distanceToPoint(c);if(0>f&&0>h)return!1}return!0}}(),containsPoint:function(a){for(var c=this.planes,b=0;6>b;b++)if(0>c[b].distanceToPoint(a))return!1; return!0}};b.Plane=function(a,c){this.normal=void 0!==a?a:new b.Vector3(1,0,0);this.constant=void 0!==c?c:0};b.Plane.prototype={constructor:b.Plane,set:function(a,c){this.normal.copy(a);this.constant=c;return this},setComponents:function(a,c,b,d){this.normal.set(a,c,b);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,c){this.normal.copy(a);this.constant=-c.dot(this.normal);return this},setFromCoplanarPoints:function(){var a=new b.Vector3,c=new b.Vector3;return function(b,d,g){d= a.subVectors(g,d).cross(c.subVectors(b,d)).normalize();this.setFromNormalAndCoplanarPoint(d,b);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)- a.radius},projectPoint:function(a,c){return this.orthoPoint(a,c).sub(a).negate()},orthoPoint:function(a,c){var e=this.distanceToPoint(a);return(c||new b.Vector3).copy(this.normal).multiplyScalar(e)},intersectLine:function(){var a=new b.Vector3;return function(c,e){var d=e||new b.Vector3,g=c.delta(a),h=this.normal.dot(g);if(0===h){if(0===this.distanceToPoint(c.start))return d.copy(c.start)}else return h=-(c.start.dot(this.normal)+this.constant)/h,0>h||1<h?void 0:d.copy(g).multiplyScalar(h).add(c.start)}}(), intersectsLine:function(a){var c=this.distanceToPoint(a.start);a=this.distanceToPoint(a.end);return 0>c&&0<a||0>a&&0<c},intersectsBox:function(a){return a.intersectsPlane(this)},intersectsSphere:function(a){return a.intersectsPlane(this)},coplanarPoint:function(a){return(a||new b.Vector3).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var a=new b.Vector3,c=new b.Matrix3;return function(b,d){var g=this.coplanarPoint(a).applyMatrix4(b),h=d||c.getNormalMatrix(b),h=this.normal.applyMatrix3(h).normalize(); this.constant=-g.dot(h);return this}}(),translate:function(a){this.constant-=a.dot(this.normal);return this},equals:function(a){return a.normal.equals(this.normal)&&a.constant===this.constant}};b.Spherical=function(a,c,b){this.radius=void 0!==a?a:1;this.phi=void 0!==c?c:0;this.theta=void 0!==b?b:0;return this};b.Spherical.prototype={constructor:b.Spherical,set:function(a,c,b){this.radius=a;this.phi=c;this.theta=b;return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.radius.copy(a.radius); this.phi.copy(a.phi);this.theta.copy(a.theta);return this},makeSafe:function(){this.phi=Math.max(1E-6,Math.min(Math.PI-1E-6,this.phi));return this},setFromVector3:function(a){this.radius=a.length();0===this.radius?this.phi=this.theta=0:(this.theta=Math.atan2(a.x,a.z),this.phi=Math.acos(b.Math.clamp(a.y/this.radius,-1,1)));return this}};b.Math={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),c=Array(36), b=0,d;return function(){for(var g=0;36>g;g++)8===g||13===g||18===g||23===g?c[g]="-":14===g?c[g]="4":(2>=b&&(b=33554432+16777216*Math.random()|0),d=b&15,b>>=4,c[g]=a[19===g?d&3|8:d]);return c.join("")}}(),clamp:function(a,c,b){return Math.max(c,Math.min(b,a))},euclideanModulo:function(a,c){return(a%c+c)%c},mapLinear:function(a,c,b,d,g){return d+(a-c)*(g-d)/(b-c)},smoothstep:function(a,c,b){if(a<=c)return 0;if(a>=b)return 1;a=(a-c)/(b-c);return a*a*(3-2*a)},smootherstep:function(a,c,b){if(a<=c)return 0; if(a>=b)return 1;a=(a-c)/(b-c);return a*a*a*(a*(6*a-15)+10)},random16:function(){console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead.");return Math.random()},randInt:function(a,c){return a+Math.floor(Math.random()*(c-a+1))},randFloat:function(a,c){return a+Math.random()*(c-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*b.Math.DEG2RAD},radToDeg:function(a){return a*b.Math.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&& 0!==a},nearestPowerOfTwo:function(a){return Math.pow(2,Math.round(Math.log(a)/Math.LN2))},nextPowerOfTwo:function(a){a--;a|=a>>1;a|=a>>2;a|=a>>4;a|=a>>8;a|=a>>16;a++;return a}};b.Spline=function(a){function c(a,c,b,e,d,g,h){a=.5*(b-a);e=.5*(e-c);return(2*(c-b)+a+e)*h+(-3*(c-b)-2*a-e)*g+a*d+c}this.points=a;var e=[],d={x:0,y:0,z:0},g,h,f,m,r,t,k,u,q;this.initFromArray=function(a){this.points=[];for(var c=0;c<a.length;c++)this.points[c]={x:a[c][0],y:a[c][1],z:a[c][2]}};this.getPoint=function(a){g=(this.points.length- 1)*a;h=Math.floor(g);f=g-h;e[0]=0===h?h:h-1;e[1]=h;e[2]=h>this.points.length-2?this.points.length-1:h+1;e[3]=h>this.points.length-3?this.points.length-1:h+2;t=this.points[e[0]];k=this.points[e[1]];u=this.points[e[2]];q=this.points[e[3]];m=f*f;r=f*m;d.x=c(t.x,k.x,u.x,q.x,f,m,r);d.y=c(t.y,k.y,u.y,q.y,f,m,r);d.z=c(t.z,k.z,u.z,q.z,f,m,r);return d};this.getControlPointsArray=function(){var a,c,b=this.points.length,e=[];for(a=0;a<b;a++)c=this.points[a],e[a]=[c.x,c.y,c.z];return e};this.getLength=function(a){var c, e,d,g=c=c=0,h=new b.Vector3,f=new b.Vector3,l=[],m=0;l[0]=0;a||(a=100);e=this.points.length*a;h.copy(this.points[0]);for(a=1;a<e;a++)c=a/e,d=this.getPoint(c),f.copy(d),m+=f.distanceTo(h),h.copy(d),c*=this.points.length-1,c=Math.floor(c),c!==g&&(l[c]=m,g=c);l[l.length]=m;return{chunks:l,total:m}};this.reparametrizeByArcLength=function(a){var c,e,d,g,h,f,l=[],m=new b.Vector3,r=this.getLength();l.push(m.copy(this.points[0]).clone());for(c=1;c<this.points.length;c++){e=r.chunks[c]-r.chunks[c-1];f=Math.ceil(a* e/r.total);g=(c-1)/(this.points.length-1);h=c/(this.points.length-1);for(e=1;e<f-1;e++)d=g+1/f*e*(h-g),d=this.getPoint(d),l.push(m.copy(d).clone());l.push(m.copy(this.points[c]).clone())}this.points=l}};b.Triangle=function(a,c,e){this.a=void 0!==a?a:new b.Vector3;this.b=void 0!==c?c:new b.Vector3;this.c=void 0!==e?e:new b.Vector3};b.Triangle.normal=function(){var a=new b.Vector3;return function(c,e,d,g){g=g||new b.Vector3;g.subVectors(d,e);a.subVectors(c,e);g.cross(a);c=g.lengthSq();return 0<c?g.multiplyScalar(1/ Math.sqrt(c)):g.set(0,0,0)}}();b.Triangle.barycoordFromPoint=function(){var a=new b.Vector3,c=new b.Vector3,e=new b.Vector3;return function(d,g,h,f,m){a.subVectors(f,g);c.subVectors(h,g);e.subVectors(d,g);d=a.dot(a);g=a.dot(c);h=a.dot(e);var r=c.dot(c);f=c.dot(e);var t=d*r-g*g;m=m||new b.Vector3;if(0===t)return m.set(-2,-1,-1);t=1/t;r=(r*h-g*f)*t;d=(d*f-g*h)*t;return m.set(1-r-d,d,r)}}();b.Triangle.containsPoint=function(){var a=new b.Vector3;return function(c,e,d,g){c=b.Triangle.barycoordFromPoint(c, e,d,g,a);return 0<=c.x&&0<=c.y&&1>=c.x+c.y}}();b.Triangle.prototype={constructor:b.Triangle,set:function(a,c,b){this.a.copy(a);this.b.copy(c);this.c.copy(b);return this},setFromPointsAndIndices:function(a,c,b,d){this.a.copy(a[c]);this.b.copy(a[b]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},area:function(){var a=new b.Vector3,c=new b.Vector3;return function(){a.subVectors(this.c, this.b);c.subVectors(this.a,this.b);return.5*a.cross(c).length()}}(),midpoint:function(a){return(a||new b.Vector3).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(a){return b.Triangle.normal(this.a,this.b,this.c,a)},plane:function(a){return(a||new b.Plane).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(a,c){return b.Triangle.barycoordFromPoint(a,this.a,this.b,this.c,c)},containsPoint:function(a){return b.Triangle.containsPoint(a,this.a,this.b,this.c)}, closestPointToPoint:function(){var a,c,e,d;return function(g,h){void 0===a&&(a=new b.Plane,c=[new b.Line3,new b.Line3,new b.Line3],e=new b.Vector3,d=new b.Vector3);var f=h||new b.Vector3,m=Infinity;a.setFromCoplanarPoints(this.a,this.b,this.c);a.projectPoint(g,e);if(!0===this.containsPoint(e))f.copy(e);else{c[0].set(this.a,this.b);c[1].set(this.b,this.c);c[2].set(this.c,this.a);for(var r=0;r<c.length;r++){c[r].closestPointToPoint(e,!0,d);var t=e.distanceToSquared(d);t<m&&(m=t,f.copy(d))}}return f}}(), equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}};b.Interpolant=function(a,c,b,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new c.constructor(b);this.sampleValues=c;this.valueSize=b};b.Interpolant.prototype={constructor:b.Interpolant,evaluate:function(a){var c=this.parameterPositions,b=this._cachedIndex,d=c[b],g=c[b-1];a:{b:{c:{d:if(!(a<d)){for(var h=b+2;;){if(void 0===d){if(a<g)break d;this._cachedIndex=b=c.length;return this.afterEnd_(b- 1,a,g)}if(b===h)break;g=d;d=c[++b];if(a<d)break b}d=c.length;break c}if(a>=g)break a;else{h=c[1];a<h&&(b=2,g=h);for(h=b-2;;){if(void 0===g)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(b===h)break;d=g;g=c[--b-1];if(a>=g)break b}d=b;b=0}}for(;b<d;)g=b+d>>>1,a<c[g]?d=g:b=g+1;d=c[b];g=c[b-1];if(void 0===g)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(void 0===d)return this._cachedIndex=b=c.length,this.afterEnd_(b-1,g,a)}this._cachedIndex=b;this.intervalChanged_(b,g,d)}return this.interpolate_(b, g,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var c=this.resultBuffer,b=this.sampleValues,d=this.valueSize;a*=d;for(var g=0;g!==d;++g)c[g]=b[a+g];return c},interpolate_:function(a,c,b,d){throw Error("call to abstract method");},intervalChanged_:function(a,c,b){}};Object.assign(b.Interpolant.prototype,{beforeStart_:b.Interpolant.prototype.copySampleValue_,afterEnd_:b.Interpolant.prototype.copySampleValue_}); b.CubicInterpolant=function(a,c,e,d){b.Interpolant.call(this,a,c,e,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0};b.CubicInterpolant.prototype=Object.assign(Object.create(b.Interpolant.prototype),{constructor:b.CubicInterpolant,DefaultSettings_:{endingStart:b.ZeroCurvatureEnding,endingEnd:b.ZeroCurvatureEnding},intervalChanged_:function(a,c,e){var d=this.parameterPositions,g=a-2,h=a+1,f=d[g],m=d[h];if(void 0===f)switch(this.getSettings_().endingStart){case b.ZeroSlopeEnding:g= a;f=2*c-e;break;case b.WrapAroundEnding:g=d.length-2;f=c+d[g]-d[g+1];break;default:g=a,f=e}if(void 0===m)switch(this.getSettings_().endingEnd){case b.ZeroSlopeEnding:h=a;m=2*e-c;break;case b.WrapAroundEnding:h=1;m=e+d[1]-d[0];break;default:h=a-1,m=c}a=.5*(e-c);d=this.valueSize;this._weightPrev=a/(c-f);this._weightNext=a/(m-e);this._offsetPrev=g*d;this._offsetNext=h*d},interpolate_:function(a,c,b,d){var g=this.resultBuffer,h=this.sampleValues,f=this.valueSize;a*=f;var m=a-f,r=this._offsetPrev,t=this._offsetNext, k=this._weightPrev,u=this._weightNext,q=(b-c)/(d-c);b=q*q;d=b*q;c=-k*d+2*k*b-k*q;k=(1+k)*d+(-1.5-2*k)*b+(-.5+k)*q+1;q=(-1-u)*d+(1.5+u)*b+.5*q;u=u*d-u*b;for(b=0;b!==f;++b)g[b]=c*h[r+b]+k*h[m+b]+q*h[a+b]+u*h[t+b];return g}});b.DiscreteInterpolant=function(a,c,e,d){b.Interpolant.call(this,a,c,e,d)};b.DiscreteInterpolant.prototype=Object.assign(Object.create(b.Interpolant.prototype),{constructor:b.DiscreteInterpolant,interpolate_:function(a,c,b,d){return this.copySampleValue_(a-1)}});b.LinearInterpolant= function(a,c,e,d){b.Interpolant.call(this,a,c,e,d)};b.LinearInterpolant.prototype=Object.assign(Object.create(b.Interpolant.prototype),{constructor:b.LinearInterpolant,interpolate_:function(a,c,b,d){var g=this.resultBuffer,h=this.sampleValues,f=this.valueSize;a*=f;var m=a-f;c=(b-c)/(d-c);b=1-c;for(d=0;d!==f;++d)g[d]=h[m+d]*b+h[a+d]*c;return g}});b.QuaternionLinearInterpolant=function(a,c,e,d){b.Interpolant.call(this,a,c,e,d)};b.QuaternionLinearInterpolant.prototype=Object.assign(Object.create(b.Interpolant.prototype), {constructor:b.QuaternionLinearInterpolant,interpolate_:function(a,c,e,d){var g=this.resultBuffer,h=this.sampleValues,f=this.valueSize;a*=f;c=(e-c)/(d-c);for(e=a+f;a!==e;a+=4)b.Quaternion.slerpFlat(g,0,h,a-f,h,a,c);return g}});b.Clock=function(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1};b.Clock.prototype={constructor:b.Clock,start:function(){this.oldTime=this.startTime=(performance||Date).now();this.running=!0},stop:function(){this.getElapsedTime(); this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;this.autoStart&&!this.running&&this.start();if(this.running){var c=(performance||Date).now(),a=(c-this.oldTime)/1E3;this.oldTime=c;this.elapsedTime+=a}return a}};b.EventDispatcher=function(){};Object.assign(b.EventDispatcher.prototype,{addEventListener:function(a,c){void 0===this._listeners&&(this._listeners={});var b=this._listeners;void 0===b[a]&&(b[a]=[]);-1===b[a].indexOf(c)&&b[a].push(c)}, hasEventListener:function(a,c){if(void 0===this._listeners)return!1;var b=this._listeners;return void 0!==b[a]&&-1!==b[a].indexOf(c)?!0:!1},removeEventListener:function(a,c){if(void 0!==this._listeners){var b=this._listeners[a];if(void 0!==b){var d=b.indexOf(c);-1!==d&&b.splice(d,1)}}},dispatchEvent:function(a){if(void 0!==this._listeners){var c=this._listeners[a.type];if(void 0!==c){a.target=this;for(var b=[],d=0,g=c.length,d=0;d<g;d++)b[d]=c[d];for(d=0;d<g;d++)b[d].call(this,a)}}}});b.Layers=function(){this.mask= 1};b.Layers.prototype={constructor:b.Layers,set:function(a){this.mask=1<<a},enable:function(a){this.mask|=1<<a},toggle:function(a){this.mask^=1<<a},disable:function(a){this.mask&=~(1<<a)},test:function(a){return 0!==(this.mask&a.mask)}};(function(a){function c(a,c){return a.distance-c.distance}function b(a,c,h,f){if(!1!==a.visible&&(a.raycast(c,h),!0===f)){a=a.children;f=0;for(var m=a.length;f<m;f++)b(a[f],c,h,!0)}}a.Raycaster=function(c,b,e,f){this.ray=new a.Ray(c,b);this.near=e||0;this.far=f||Infinity; this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})};a.Raycaster.prototype={constructor:a.Raycaster,linePrecision:1,set:function(a,c){this.ray.set(a,c)},setFromCamera:function(c,b){b instanceof a.PerspectiveCamera?(this.ray.origin.setFromMatrixPosition(b.matrixWorld),this.ray.direction.set(c.x,c.y,.5).unproject(b).sub(this.ray.origin).normalize()): b instanceof a.OrthographicCamera?(this.ray.origin.set(c.x,c.y,-1).unproject(b),this.ray.direction.set(0,0,-1).transformDirection(b.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(a,g){var h=[];b(a,this,h,g);h.sort(c);return h},intersectObjects:function(a,g){var h=[];if(!1===Array.isArray(a))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),h;for(var f=0,m=a.length;f<m;f++)b(a[f],this,h,g);h.sort(c);return h}}})(b); b.Object3D=function(){Object.defineProperty(this,"id",{value:b.Object3DIdCount++});this.uuid=b.Math.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=b.Object3D.DefaultUp.clone();var a=new b.Vector3,c=new b.Euler,e=new b.Quaternion,d=new b.Vector3(1,1,1);c.onChange(function(){e.setFromEuler(c,!1)});e.onChange(function(){c.setFromQuaternion(e,void 0,!1)});Object.defineProperties(this,{position:{enumerable:!0,value:a},rotation:{enumerable:!0,value:c},quaternion:{enumerable:!0, value:e},scale:{enumerable:!0,value:d},modelViewMatrix:{value:new b.Matrix4},normalMatrix:{value:new b.Matrix3}});this.matrix=new b.Matrix4;this.matrixWorld=new b.Matrix4;this.matrixAutoUpdate=b.Object3D.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new b.Layers;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}};b.Object3D.DefaultUp=new b.Vector3(0,1,0);b.Object3D.DefaultMatrixAutoUpdate=!0;Object.assign(b.Object3D.prototype, b.EventDispatcher.prototype,{applyMatrix:function(a){this.matrix.multiplyMatrices(a,this.matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(a,c){this.quaternion.setFromAxisAngle(a,c)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=new b.Quaternion;return function(c, b){a.setFromAxisAngle(c,b);this.quaternion.multiply(a);return this}}(),rotateX:function(){var a=new b.Vector3(1,0,0);return function(c){return this.rotateOnAxis(a,c)}}(),rotateY:function(){var a=new b.Vector3(0,1,0);return function(c){return this.rotateOnAxis(a,c)}}(),rotateZ:function(){var a=new b.Vector3(0,0,1);return function(c){return this.rotateOnAxis(a,c)}}(),translateOnAxis:function(){var a=new b.Vector3;return function(c,b){a.copy(c).applyQuaternion(this.quaternion);this.position.add(a.multiplyScalar(b)); return this}}(),translateX:function(){var a=new b.Vector3(1,0,0);return function(c){return this.translateOnAxis(a,c)}}(),translateY:function(){var a=new b.Vector3(0,1,0);return function(c){return this.translateOnAxis(a,c)}}(),translateZ:function(){var a=new b.Vector3(0,0,1);return function(c){return this.translateOnAxis(a,c)}}(),localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var a=new b.Matrix4;return function(c){return c.applyMatrix4(a.getInverse(this.matrixWorld))}}(), lookAt:function(){var a=new b.Matrix4;return function(c){a.lookAt(c,this.position,this.up);this.quaternion.setFromRotationMatrix(a)}}(),add:function(a){if(1<arguments.length){for(var c=0;c<arguments.length;c++)this.add(arguments[c]);return this}if(a===this)return console.error("THREE.Object3D.add: object can't be added as a child of itself.",a),this;a instanceof b.Object3D?(null!==a.parent&&a.parent.remove(a),a.parent=this,a.dispatchEvent({type:"added"}),this.children.push(a)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", a);return this},remove:function(a){if(1<arguments.length)for(var c=0;c<arguments.length;c++)this.remove(arguments[c]);c=this.children.indexOf(a);-1!==c&&(a.parent=null,a.dispatchEvent({type:"removed"}),this.children.splice(c,1))},getObjectById:function(a){return this.getObjectByProperty("id",a)},getObjectByName:function(a){return this.getObjectByProperty("name",a)},getObjectByProperty:function(a,c){if(this[a]===c)return this;for(var b=0,d=this.children.length;b<d;b++){var g=this.children[b].getObjectByProperty(a, c);if(void 0!==g)return g}},getWorldPosition:function(a){a=a||new b.Vector3;this.updateMatrixWorld(!0);return a.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var a=new b.Vector3,c=new b.Vector3;return function(e){e=e||new b.Quaternion;this.updateMatrixWorld(!0);this.matrixWorld.decompose(a,e,c);return e}}(),getWorldRotation:function(){var a=new b.Quaternion;return function(c){c=c||new b.Euler;this.getWorldQuaternion(a);return c.setFromQuaternion(a,this.rotation.order,!1)}}(), getWorldScale:function(){var a=new b.Vector3,c=new b.Quaternion;return function(e){e=e||new b.Vector3;this.updateMatrixWorld(!0);this.matrixWorld.decompose(a,c,e);return e}}(),getWorldDirection:function(){var a=new b.Quaternion;return function(c){c=c||new b.Vector3;this.getWorldQuaternion(a);return c.set(0,0,1).applyQuaternion(a)}}(),raycast:function(){},traverse:function(a){a(this);for(var c=this.children,b=0,d=c.length;b<d;b++)c[b].traverse(a)},traverseVisible:function(a){if(!1!==this.visible){a(this); for(var c=this.children,b=0,d=c.length;b<d;b++)c[b].traverseVisible(a)}},traverseAncestors:function(a){var c=this.parent;null!==c&&(a(c),c.traverseAncestors(a))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(a){!0===this.matrixAutoUpdate&&this.updateMatrix();if(!0===this.matrixWorldNeedsUpdate||!0===a)null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var c=0,b=this.children.length;c<b;c++)this.children[c].updateMatrixWorld(a)},toJSON:function(a){function c(a){var c=[],b;for(b in a){var e=a[b];delete e.metadata;c.push(e)}return c}var b=void 0===a||""===a,d={};b&&(a={geometries:{},materials:{},textures:{},images:{}},d.metadata={version:4.4,type:"Object",generator:"Object3D.toJSON"});var g={};g.uuid=this.uuid;g.type=this.type;""!==this.name&&(g.name=this.name);"{}"!==JSON.stringify(this.userData)&& (g.userData=this.userData);!0===this.castShadow&&(g.castShadow=!0);!0===this.receiveShadow&&(g.receiveShadow=!0);!1===this.visible&&(g.visible=!1);g.matrix=this.matrix.toArray();void 0!==this.geometry&&(void 0===a.geometries[this.geometry.uuid]&&(a.geometries[this.geometry.uuid]=this.geometry.toJSON(a)),g.geometry=this.geometry.uuid);void 0!==this.material&&(void 0===a.materials[this.material.uuid]&&(a.materials[this.material.uuid]=this.material.toJSON(a)),g.material=this.material.uuid);if(0<this.children.length){g.children= [];for(var h=0;h<this.children.length;h++)g.children.push(this.children[h].toJSON(a).object)}if(b){var b=c(a.geometries),h=c(a.materials),f=c(a.textures);a=c(a.images);0<b.length&&(d.geometries=b);0<h.length&&(d.materials=h);0<f.length&&(d.textures=f);0<a.length&&(d.images=a)}d.object=g;return d},clone:function(a){return(new this.constructor).copy(this,a)},copy:function(a,c){void 0===c&&(c=!0);this.name=a.name;this.up.copy(a.up);this.position.copy(a.position);this.quaternion.copy(a.quaternion);this.scale.copy(a.scale); this.matrix.copy(a.matrix);this.matrixWorld.copy(a.matrixWorld);this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrixWorldNeedsUpdate=a.matrixWorldNeedsUpdate;this.visible=a.visible;this.castShadow=a.castShadow;this.receiveShadow=a.receiveShadow;this.frustumCulled=a.frustumCulled;this.renderOrder=a.renderOrder;this.userData=JSON.parse(JSON.stringify(a.userData));if(!0===c)for(var b=0;b<a.children.length;b++)this.add(a.children[b].clone());return this}});b.Object3DIdCount=0;b.Face3=function(a,c,e,d, g,h){this.a=a;this.b=c;this.c=e;this.normal=d instanceof b.Vector3?d:new b.Vector3;this.vertexNormals=Array.isArray(d)?d:[];this.color=g instanceof b.Color?g:new b.Color;this.vertexColors=Array.isArray(g)?g:[];this.materialIndex=void 0!==h?h:0};b.Face3.prototype={constructor:b.Face3,clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.normal.copy(a.normal);this.color.copy(a.color);this.materialIndex=a.materialIndex;for(var c=0,b=a.vertexNormals.length;c< b;c++)this.vertexNormals[c]=a.vertexNormals[c].clone();c=0;for(b=a.vertexColors.length;c<b;c++)this.vertexColors[c]=a.vertexColors[c].clone();return this}};b.BufferAttribute=function(a,c,e){this.uuid=b.Math.generateUUID();this.array=a;this.itemSize=c;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0;this.normalized=!0===e};b.BufferAttribute.prototype={constructor:b.BufferAttribute,get count(){return this.array.length/this.itemSize},set needsUpdate(a){!0===a&&this.version++},setDynamic:function(a){this.dynamic= a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.itemSize=a.itemSize;this.dynamic=a.dynamic;return this},copyAt:function(a,c,b){a*=this.itemSize;b*=c.itemSize;for(var d=0,g=this.itemSize;d<g;d++)this.array[a+d]=c.array[b+d];return this},copyArray:function(a){this.array.set(a);return this},copyColorsArray:function(a){for(var c=this.array,e=0,d=0,g=a.length;d<g;d++){var h=a[d];void 0===h&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",d), h=new b.Color);c[e++]=h.r;c[e++]=h.g;c[e++]=h.b}return this},copyIndicesArray:function(a){for(var c=this.array,b=0,d=0,g=a.length;d<g;d++){var h=a[d];c[b++]=h.a;c[b++]=h.b;c[b++]=h.c}return this},copyVector2sArray:function(a){for(var c=this.array,e=0,d=0,g=a.length;d<g;d++){var h=a[d];void 0===h&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",d),h=new b.Vector2);c[e++]=h.x;c[e++]=h.y}return this},copyVector3sArray:function(a){for(var c=this.array,e=0,d=0,g=a.length;d< g;d++){var h=a[d];void 0===h&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",d),h=new b.Vector3);c[e++]=h.x;c[e++]=h.y;c[e++]=h.z}return this},copyVector4sArray:function(a){for(var c=this.array,e=0,d=0,g=a.length;d<g;d++){var h=a[d];void 0===h&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",d),h=new b.Vector4);c[e++]=h.x;c[e++]=h.y;c[e++]=h.z;c[e++]=h.w}return this},set:function(a,c){void 0===c&&(c=0);this.array.set(a,c);return this}, getX:function(a){return this.array[a*this.itemSize]},setX:function(a,c){this.array[a*this.itemSize]=c;return this},getY:function(a){return this.array[a*this.itemSize+1]},setY:function(a,c){this.array[a*this.itemSize+1]=c;return this},getZ:function(a){return this.array[a*this.itemSize+2]},setZ:function(a,c){this.array[a*this.itemSize+2]=c;return this},getW:function(a){return this.array[a*this.itemSize+3]},setW:function(a,c){this.array[a*this.itemSize+3]=c;return this},setXY:function(a,c,b){a*=this.itemSize; this.array[a+0]=c;this.array[a+1]=b;return this},setXYZ:function(a,c,b,d){a*=this.itemSize;this.array[a+0]=c;this.array[a+1]=b;this.array[a+2]=d;return this},setXYZW:function(a,c,b,d,g){a*=this.itemSize;this.array[a+0]=c;this.array[a+1]=b;this.array[a+2]=d;this.array[a+3]=g;return this},clone:function(){return(new this.constructor).copy(this)}};b.Int8Attribute=function(a,c){return new b.BufferAttribute(new Int8Array(a),c)};b.Uint8Attribute=function(a,c){return new b.BufferAttribute(new Uint8Array(a), c)};b.Uint8ClampedAttribute=function(a,c){return new b.BufferAttribute(new Uint8ClampedArray(a),c)};b.Int16Attribute=function(a,c){return new b.BufferAttribute(new Int16Array(a),c)};b.Uint16Attribute=function(a,c){return new b.BufferAttribute(new Uint16Array(a),c)};b.Int32Attribute=function(a,c){return new b.BufferAttribute(new Int32Array(a),c)};b.Uint32Attribute=function(a,c){return new b.BufferAttribute(new Uint32Array(a),c)};b.Float32Attribute=function(a,c){return new b.BufferAttribute(new Float32Array(a), c)};b.Float64Attribute=function(a,c){return new b.BufferAttribute(new Float64Array(a),c)};b.DynamicBufferAttribute=function(a,c){console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.");return(new b.BufferAttribute(a,c)).setDynamic(!0)};b.InstancedBufferAttribute=function(a,c,e){b.BufferAttribute.call(this,a,c);this.meshPerAttribute=e||1};b.InstancedBufferAttribute.prototype=Object.create(b.BufferAttribute.prototype);b.InstancedBufferAttribute.prototype.constructor= b.InstancedBufferAttribute;b.InstancedBufferAttribute.prototype.copy=function(a){b.BufferAttribute.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this};b.InterleavedBuffer=function(a,c){this.uuid=b.Math.generateUUID();this.array=a;this.stride=c;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0};b.InterleavedBuffer.prototype={constructor:b.InterleavedBuffer,get length(){return this.array.length},get count(){return this.array.length/this.stride},set needsUpdate(a){!0=== a&&this.version++},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.stride=a.stride;this.dynamic=a.dynamic;return this},copyAt:function(a,c,b){a*=this.stride;b*=c.stride;for(var d=0,g=this.stride;d<g;d++)this.array[a+d]=c.array[b+d];return this},set:function(a,c){void 0===c&&(c=0);this.array.set(a,c);return this},clone:function(){return(new this.constructor).copy(this)}};b.InstancedInterleavedBuffer=function(a,c,e){b.InterleavedBuffer.call(this, a,c);this.meshPerAttribute=e||1};b.InstancedInterleavedBuffer.prototype=Object.create(b.InterleavedBuffer.prototype);b.InstancedInterleavedBuffer.prototype.constructor=b.InstancedInterleavedBuffer;b.InstancedInterleavedBuffer.prototype.copy=function(a){b.InterleavedBuffer.prototype.copy.call(this,a);this.meshPerAttribute=a.meshPerAttribute;return this};b.InterleavedBufferAttribute=function(a,c,e){this.uuid=b.Math.generateUUID();this.data=a;this.itemSize=c;this.offset=e};b.InterleavedBufferAttribute.prototype= {constructor:b.InterleavedBufferAttribute,get length(){console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count.");return this.array.length},get count(){return this.data.count},setX:function(a,c){this.data.array[a*this.data.stride+this.offset]=c;return this},setY:function(a,c){this.data.array[a*this.data.stride+this.offset+1]=c;return this},setZ:function(a,c){this.data.array[a*this.data.stride+this.offset+2]=c;return this},setW:function(a,c){this.data.array[a*this.data.stride+ this.offset+3]=c;return this},getX:function(a){return this.data.array[a*this.data.stride+this.offset]},getY:function(a){return this.data.array[a*this.data.stride+this.offset+1]},getZ:function(a){return this.data.array[a*this.data.stride+this.offset+2]},getW:function(a){return this.data.array[a*this.data.stride+this.offset+3]},setXY:function(a,c,b){a=a*this.data.stride+this.offset;this.data.array[a+0]=c;this.data.array[a+1]=b;return this},setXYZ:function(a,c,b,d){a=a*this.data.stride+this.offset;this.data.array[a+ 0]=c;this.data.array[a+1]=b;this.data.array[a+2]=d;return this},setXYZW:function(a,c,b,d,g){a=a*this.data.stride+this.offset;this.data.array[a+0]=c;this.data.array[a+1]=b;this.data.array[a+2]=d;this.data.array[a+3]=g;return this}};b.Geometry=function(){Object.defineProperty(this,"id",{value:b.GeometryIdCount++});this.uuid=b.Math.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights= [];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.elementsNeedUpdate=this.verticesNeedUpdate=!1};Object.assign(b.Geometry.prototype,b.EventDispatcher.prototype,{applyMatrix:function(a){for(var c=(new b.Matrix3).getNormalMatrix(a),e=0,d=this.vertices.length;e<d;e++)this.vertices[e].applyMatrix4(a);e=0;for(d=this.faces.length;e<d;e++){a=this.faces[e]; a.normal.applyMatrix3(c).normalize();for(var g=0,h=a.vertexNormals.length;g<h;g++)a.vertexNormals[g].applyMatrix3(c).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(){var a;return function(c){void 0===a&&(a=new b.Matrix4);a.makeRotationX(c);this.applyMatrix(a);return this}}(),rotateY:function(){var a;return function(c){void 0===a&&(a=new b.Matrix4); a.makeRotationY(c);this.applyMatrix(a);return this}}(),rotateZ:function(){var a;return function(c){void 0===a&&(a=new b.Matrix4);a.makeRotationZ(c);this.applyMatrix(a);return this}}(),translate:function(){var a;return function(c,e,d){void 0===a&&(a=new b.Matrix4);a.makeTranslation(c,e,d);this.applyMatrix(a);return this}}(),scale:function(){var a;return function(c,e,d){void 0===a&&(a=new b.Matrix4);a.makeScale(c,e,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a;return function(c){void 0=== a&&(a=new b.Object3D);a.lookAt(c);a.updateMatrix();this.applyMatrix(a.matrix)}}(),fromBufferGeometry:function(a){function c(a,c,d,g){var h=void 0!==f?[k[a].clone(),k[c].clone(),k[d].clone()]:[],v=void 0!==m?[e.colors[a].clone(),e.colors[c].clone(),e.colors[d].clone()]:[];g=new b.Face3(a,c,d,h,v,g);e.faces.push(g);void 0!==r&&e.faceVertexUvs[0].push([u[a].clone(),u[c].clone(),u[d].clone()]);void 0!==t&&e.faceVertexUvs[1].push([q[a].clone(),q[c].clone(),q[d].clone()])}var e=this,d=null!==a.index?a.index.array: void 0,g=a.attributes,h=g.position.array,f=void 0!==g.normal?g.normal.array:void 0,m=void 0!==g.color?g.color.array:void 0,r=void 0!==g.uv?g.uv.array:void 0,t=void 0!==g.uv2?g.uv2.array:void 0;void 0!==t&&(this.faceVertexUvs[1]=[]);for(var k=[],u=[],q=[],v=g=0;g<h.length;g+=3,v+=2)e.vertices.push(new b.Vector3(h[g],h[g+1],h[g+2])),void 0!==f&&k.push(new b.Vector3(f[g],f[g+1],f[g+2])),void 0!==m&&e.colors.push(new b.Color(m[g],m[g+1],m[g+2])),void 0!==r&&u.push(new b.Vector2(r[v],r[v+1])),void 0!== t&&q.push(new b.Vector2(t[v],t[v+1]));if(void 0!==d)if(h=a.groups,0<h.length)for(g=0;g<h.length;g++)for(var p=h[g],n=p.start,B=p.count,v=n,n=n+B;v<n;v+=3)c(d[v],d[v+1],d[v+2],p.materialIndex);else for(g=0;g<d.length;g+=3)c(d[g],d[g+1],d[g+2]);else for(g=0;g<h.length/3;g+=3)c(g,g+1,g+2);this.computeFaceNormals();null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());return this},center:function(){this.computeBoundingBox(); var a=this.boundingBox.center().negate();this.translate(a.x,a.y,a.z);return a},normalize:function(){this.computeBoundingSphere();var a=this.boundingSphere.center,c=this.boundingSphere.radius,c=0===c?1:1/c,e=new b.Matrix4;e.set(c,0,0,-c*a.x,0,c,0,-c*a.y,0,0,c,-c*a.z,0,0,0,1);this.applyMatrix(e);return this},computeFaceNormals:function(){for(var a=new b.Vector3,c=new b.Vector3,e=0,d=this.faces.length;e<d;e++){var g=this.faces[e],h=this.vertices[g.a],f=this.vertices[g.b];a.subVectors(this.vertices[g.c], f);c.subVectors(h,f);a.cross(c);a.normalize();g.normal.copy(a)}},computeVertexNormals:function(a){void 0===a&&(a=!0);var c,e,d;d=Array(this.vertices.length);c=0;for(e=this.vertices.length;c<e;c++)d[c]=new b.Vector3;if(a){var g,h,f,m=new b.Vector3,r=new b.Vector3;a=0;for(c=this.faces.length;a<c;a++)e=this.faces[a],g=this.vertices[e.a],h=this.vertices[e.b],f=this.vertices[e.c],m.subVectors(f,h),r.subVectors(g,h),m.cross(r),d[e.a].add(m),d[e.b].add(m),d[e.c].add(m)}else for(a=0,c=this.faces.length;a< c;a++)e=this.faces[a],d[e.a].add(e.normal),d[e.b].add(e.normal),d[e.c].add(e.normal);c=0;for(e=this.vertices.length;c<e;c++)d[c].normalize();a=0;for(c=this.faces.length;a<c;a++)e=this.faces[a],g=e.vertexNormals,3===g.length?(g[0].copy(d[e.a]),g[1].copy(d[e.b]),g[2].copy(d[e.c])):(g[0]=d[e.a].clone(),g[1]=d[e.b].clone(),g[2]=d[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var a,c,e,d,g;e=0;for(d=this.faces.length;e<d;e++)for(g=this.faces[e],g.__originalFaceNormal? g.__originalFaceNormal.copy(g.normal):g.__originalFaceNormal=g.normal.clone(),g.__originalVertexNormals||(g.__originalVertexNormals=[]),a=0,c=g.vertexNormals.length;a<c;a++)g.__originalVertexNormals[a]?g.__originalVertexNormals[a].copy(g.vertexNormals[a]):g.__originalVertexNormals[a]=g.vertexNormals[a].clone();var h=new b.Geometry;h.faces=this.faces;a=0;for(c=this.morphTargets.length;a<c;a++){if(!this.morphNormals[a]){this.morphNormals[a]={};this.morphNormals[a].faceNormals=[];this.morphNormals[a].vertexNormals= [];g=this.morphNormals[a].faceNormals;var f=this.morphNormals[a].vertexNormals,m,r;e=0;for(d=this.faces.length;e<d;e++)m=new b.Vector3,r={a:new b.Vector3,b:new b.Vector3,c:new b.Vector3},g.push(m),f.push(r)}f=this.morphNormals[a];h.vertices=this.morphTargets[a].vertices;h.computeFaceNormals();h.computeVertexNormals();e=0;for(d=this.faces.length;e<d;e++)g=this.faces[e],m=f.faceNormals[e],r=f.vertexNormals[e],m.copy(g.normal),r.a.copy(g.vertexNormals[0]),r.b.copy(g.vertexNormals[1]),r.c.copy(g.vertexNormals[2])}e= 0;for(d=this.faces.length;e<d;e++)g=this.faces[e],g.normal=g.__originalFaceNormal,g.vertexNormals=g.__originalVertexNormals},computeTangents:function(){console.warn("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){for(var a=0,c=this.vertices,b=0,d=c.length;b<d;b++)0<b&&(a+=c[b].distanceTo(c[b-1])),this.lineDistances[b]=a},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new b.Box3);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null=== this.boundingSphere&&(this.boundingSphere=new b.Sphere);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,c,e){if(!1===a instanceof b.Geometry)console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a);else{var d,g=this.vertices.length,h=this.vertices,f=a.vertices,m=this.faces,r=a.faces,t=this.faceVertexUvs[0];a=a.faceVertexUvs[0];void 0===e&&(e=0);void 0!==c&&(d=(new b.Matrix3).getNormalMatrix(c));for(var k=0,u=f.length;k<u;k++){var q=f[k].clone();void 0!== c&&q.applyMatrix4(c);h.push(q)}k=0;for(u=r.length;k<u;k++){var f=r[k],v,p=f.vertexNormals,n=f.vertexColors,q=new b.Face3(f.a+g,f.b+g,f.c+g);q.normal.copy(f.normal);void 0!==d&&q.normal.applyMatrix3(d).normalize();c=0;for(h=p.length;c<h;c++)v=p[c].clone(),void 0!==d&&v.applyMatrix3(d).normalize(),q.vertexNormals.push(v);q.color.copy(f.color);c=0;for(h=n.length;c<h;c++)v=n[c],q.vertexColors.push(v.clone());q.materialIndex=f.materialIndex+e;m.push(q)}k=0;for(u=a.length;k<u;k++)if(e=a[k],d=[],void 0!== e){c=0;for(h=e.length;c<h;c++)d.push(e[c].clone());t.push(d)}}},mergeMesh:function(a){!1===a instanceof b.Mesh?console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a):(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix))},mergeVertices:function(){var a={},c=[],b=[],d,g=Math.pow(10,4),h,f;h=0;for(f=this.vertices.length;h<f;h++)d=this.vertices[h],d=Math.round(d.x*g)+"_"+Math.round(d.y*g)+"_"+Math.round(d.z*g),void 0===a[d]?(a[d]=h,c.push(this.vertices[h]), b[h]=c.length-1):b[h]=b[a[d]];a=[];h=0;for(f=this.faces.length;h<f;h++)for(g=this.faces[h],g.a=b[g.a],g.b=b[g.b],g.c=b[g.c],g=[g.a,g.b,g.c],d=0;3>d;d++)if(g[d]===g[(d+1)%3]){a.push(h);break}for(h=a.length-1;0<=h;h--)for(g=a[h],this.faces.splice(g,1),b=0,f=this.faceVertexUvs.length;b<f;b++)this.faceVertexUvs[b].splice(g,1);h=this.vertices.length-c.length;this.vertices=c;return h},sortFacesByMaterialIndex:function(){for(var a=this.faces,c=a.length,b=0;b<c;b++)a[b]._id=b;a.sort(function(a,c){return a.materialIndex- c.materialIndex});var d=this.faceVertexUvs[0],g=this.faceVertexUvs[1],h,f;d&&d.length===c&&(h=[]);g&&g.length===c&&(f=[]);for(b=0;b<c;b++){var m=a[b]._id;h&&h.push(d[m]);f&&f.push(g[m])}h&&(this.faceVertexUvs[0]=h);f&&(this.faceVertexUvs[1]=f)},toJSON:function(){function a(a,c,b){return b?a|1<<c:a&~(1<<c)}function c(a){var c=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==t[c])return t[c];t[c]=r.length/3;r.push(a.x,a.y,a.z);return t[c]}function b(a){var c=a.r.toString()+a.g.toString()+a.b.toString(); if(void 0!==u[c])return u[c];u[c]=k.length;k.push(a.getHex());return u[c]}function d(a){var c=a.x.toString()+a.y.toString();if(void 0!==v[c])return v[c];v[c]=q.length/2;q.push(a.x,a.y);return v[c]}var g={metadata:{version:4.4,type:"Geometry",generator:"Geometry.toJSON"}};g.uuid=this.uuid;g.type=this.type;""!==this.name&&(g.name=this.name);if(void 0!==this.parameters){var h=this.parameters,f;for(f in h)void 0!==h[f]&&(g[f]=h[f]);return g}h=[];for(f=0;f<this.vertices.length;f++){var m=this.vertices[f]; h.push(m.x,m.y,m.z)}var m=[],r=[],t={},k=[],u={},q=[],v={};for(f=0;f<this.faces.length;f++){var p=this.faces[f],n=void 0!==this.faceVertexUvs[0][f],B=0<p.normal.length(),A=0<p.vertexNormals.length,C=1!==p.color.r||1!==p.color.g||1!==p.color.b,G=0<p.vertexColors.length,D=0,D=a(D,0,0),D=a(D,1,!0),D=a(D,2,!1),D=a(D,3,n),D=a(D,4,B),D=a(D,5,A),D=a(D,6,C),D=a(D,7,G);m.push(D);m.push(p.a,p.b,p.c);m.push(p.materialIndex);n&&(n=this.faceVertexUvs[0][f],m.push(d(n[0]),d(n[1]),d(n[2])));B&&m.push(c(p.normal)); A&&(B=p.vertexNormals,m.push(c(B[0]),c(B[1]),c(B[2])));C&&m.push(b(p.color));G&&(p=p.vertexColors,m.push(b(p[0]),b(p[1]),b(p[2])))}g.data={};g.data.vertices=h;g.data.normals=r;0<k.length&&(g.data.colors=k);0<q.length&&(g.data.uvs=[q]);g.data.faces=m;return g},clone:function(){return(new b.Geometry).copy(this)},copy:function(a){this.vertices=[];this.faces=[];this.faceVertexUvs=[[]];for(var c=a.vertices,b=0,d=c.length;b<d;b++)this.vertices.push(c[b].clone());c=a.faces;b=0;for(d=c.length;b<d;b++)this.faces.push(c[b].clone()); b=0;for(d=a.faceVertexUvs.length;b<d;b++){c=a.faceVertexUvs[b];void 0===this.faceVertexUvs[b]&&(this.faceVertexUvs[b]=[]);for(var g=0,h=c.length;g<h;g++){for(var f=c[g],m=[],r=0,t=f.length;r<t;r++)m.push(f[r].clone());this.faceVertexUvs[b].push(m)}}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});b.GeometryIdCount=0;b.DirectGeometry=function(){Object.defineProperty(this,"id",{value:b.GeometryIdCount++});this.uuid=b.Math.generateUUID();this.name="";this.type="DirectGeometry"; this.indices=[];this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1};Object.assign(b.DirectGeometry.prototype,b.EventDispatcher.prototype,{computeBoundingBox:b.Geometry.prototype.computeBoundingBox,computeBoundingSphere:b.Geometry.prototype.computeBoundingSphere, computeFaceNormals:function(){console.warn("THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.")},computeVertexNormals:function(){console.warn("THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.")},computeGroups:function(a){var c,b=[],d;a=a.faces;for(var g=0;g<a.length;g++){var h=a[g];h.materialIndex!==d&&(d=h.materialIndex,void 0!==c&&(c.count=3*g-c.start,b.push(c)),c={start:3*g,materialIndex:d})}void 0!==c&&(c.count=3*g-c.start, b.push(c));this.groups=b},fromGeometry:function(a){var c=a.faces,e=a.vertices,d=a.faceVertexUvs,g=d[0]&&0<d[0].length,h=d[1]&&0<d[1].length,f=a.morphTargets,m=f.length,r;if(0<m){r=[];for(var t=0;t<m;t++)r[t]=[];this.morphTargets.position=r}var k=a.morphNormals,u=k.length,q;if(0<u){q=[];for(t=0;t<u;t++)q[t]=[];this.morphTargets.normal=q}for(var v=a.skinIndices,p=a.skinWeights,n=v.length===e.length,B=p.length===e.length,t=0;t<c.length;t++){var A=c[t];this.vertices.push(e[A.a],e[A.b],e[A.c]);var C=A.vertexNormals; 3===C.length?this.normals.push(C[0],C[1],C[2]):(C=A.normal,this.normals.push(C,C,C));C=A.vertexColors;3===C.length?this.colors.push(C[0],C[1],C[2]):(C=A.color,this.colors.push(C,C,C));!0===g&&(C=d[0][t],void 0!==C?this.uvs.push(C[0],C[1],C[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",t),this.uvs.push(new b.Vector2,new b.Vector2,new b.Vector2)));!0===h&&(C=d[1][t],void 0!==C?this.uvs2.push(C[0],C[1],C[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", t),this.uvs2.push(new b.Vector2,new b.Vector2,new b.Vector2)));for(C=0;C<m;C++){var G=f[C].vertices;r[C].push(G[A.a],G[A.b],G[A.c])}for(C=0;C<u;C++)G=k[C].vertexNormals[t],q[C].push(G.a,G.b,G.c);n&&this.skinIndices.push(v[A.a],v[A.b],v[A.c]);B&&this.skinWeights.push(p[A.a],p[A.b],p[A.c])}this.computeGroups(a);this.verticesNeedUpdate=a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.groupsNeedUpdate=a.groupsNeedUpdate; return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});b.BufferGeometry=function(){Object.defineProperty(this,"id",{value:b.GeometryIdCount++});this.uuid=b.Math.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity}};Object.assign(b.BufferGeometry.prototype,b.EventDispatcher.prototype,{getIndex:function(){return this.index},setIndex:function(a){this.index= a},addAttribute:function(a,c,e){if(!1===c instanceof b.BufferAttribute&&!1===c instanceof b.InterleavedBufferAttribute)console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(a,new b.BufferAttribute(c,e));else if("index"===a)console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(c);else return this.attributes[a]=c,this},getAttribute:function(a){return this.attributes[a]},removeAttribute:function(a){delete this.attributes[a]; return this},addGroup:function(a,c,b){this.groups.push({start:a,count:c,materialIndex:void 0!==b?b:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(a,c){this.drawRange.start=a;this.drawRange.count=c},applyMatrix:function(a){var c=this.attributes.position;void 0!==c&&(a.applyToVector3Array(c.array),c.needsUpdate=!0);c=this.attributes.normal;void 0!==c&&((new b.Matrix3).getNormalMatrix(a).applyToVector3Array(c.array),c.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox(); null!==this.boundingSphere&&this.computeBoundingSphere();return this},rotateX:function(){var a;return function(c){void 0===a&&(a=new b.Matrix4);a.makeRotationX(c);this.applyMatrix(a);return this}}(),rotateY:function(){var a;return function(c){void 0===a&&(a=new b.Matrix4);a.makeRotationY(c);this.applyMatrix(a);return this}}(),rotateZ:function(){var a;return function(c){void 0===a&&(a=new b.Matrix4);a.makeRotationZ(c);this.applyMatrix(a);return this}}(),translate:function(){var a;return function(c, e,d){void 0===a&&(a=new b.Matrix4);a.makeTranslation(c,e,d);this.applyMatrix(a);return this}}(),scale:function(){var a;return function(c,e,d){void 0===a&&(a=new b.Matrix4);a.makeScale(c,e,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a;return function(c){void 0===a&&(a=new b.Object3D);a.lookAt(c);a.updateMatrix();this.applyMatrix(a.matrix)}}(),center:function(){this.computeBoundingBox();var a=this.boundingBox.center().negate();this.translate(a.x,a.y,a.z);return a},setFromObject:function(a){var c= a.geometry;if(a instanceof b.Points||a instanceof b.Line){a=new b.Float32Attribute(3*c.vertices.length,3);var e=new b.Float32Attribute(3*c.colors.length,3);this.addAttribute("position",a.copyVector3sArray(c.vertices));this.addAttribute("color",e.copyColorsArray(c.colors));c.lineDistances&&c.lineDistances.length===c.vertices.length&&(a=new b.Float32Attribute(c.lineDistances.length,1),this.addAttribute("lineDistance",a.copyArray(c.lineDistances)));null!==c.boundingSphere&&(this.boundingSphere=c.boundingSphere.clone()); null!==c.boundingBox&&(this.boundingBox=c.boundingBox.clone())}else a instanceof b.Mesh&&c instanceof b.Geometry&&this.fromGeometry(c);return this},updateFromObject:function(a){var c=a.geometry;if(a instanceof b.Mesh){var e=c.__directGeometry;if(void 0===e)return this.fromGeometry(c);e.verticesNeedUpdate=c.verticesNeedUpdate;e.normalsNeedUpdate=c.normalsNeedUpdate;e.colorsNeedUpdate=c.colorsNeedUpdate;e.uvsNeedUpdate=c.uvsNeedUpdate;e.groupsNeedUpdate=c.groupsNeedUpdate;c.verticesNeedUpdate=!1;c.normalsNeedUpdate= !1;c.colorsNeedUpdate=!1;c.uvsNeedUpdate=!1;c.groupsNeedUpdate=!1;c=e}!0===c.verticesNeedUpdate&&(e=this.attributes.position,void 0!==e&&(e.copyVector3sArray(c.vertices),e.needsUpdate=!0),c.verticesNeedUpdate=!1);!0===c.normalsNeedUpdate&&(e=this.attributes.normal,void 0!==e&&(e.copyVector3sArray(c.normals),e.needsUpdate=!0),c.normalsNeedUpdate=!1);!0===c.colorsNeedUpdate&&(e=this.attributes.color,void 0!==e&&(e.copyColorsArray(c.colors),e.needsUpdate=!0),c.colorsNeedUpdate=!1);c.uvsNeedUpdate&&(e= this.attributes.uv,void 0!==e&&(e.copyVector2sArray(c.uvs),e.needsUpdate=!0),c.uvsNeedUpdate=!1);c.lineDistancesNeedUpdate&&(e=this.attributes.lineDistance,void 0!==e&&(e.copyArray(c.lineDistances),e.needsUpdate=!0),c.lineDistancesNeedUpdate=!1);c.groupsNeedUpdate&&(c.computeGroups(a.geometry),this.groups=c.groups,c.groupsNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new b.DirectGeometry).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var c= new Float32Array(3*a.vertices.length);this.addAttribute("position",(new b.BufferAttribute(c,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(c=new Float32Array(3*a.normals.length),this.addAttribute("normal",(new b.BufferAttribute(c,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(c=new Float32Array(3*a.colors.length),this.addAttribute("color",(new b.BufferAttribute(c,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(c=new Float32Array(2*a.uvs.length),this.addAttribute("uv",(new b.BufferAttribute(c, 2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(c=new Float32Array(2*a.uvs2.length),this.addAttribute("uv2",(new b.BufferAttribute(c,2)).copyVector2sArray(a.uvs2)));0<a.indices.length&&(c=new (65535<a.vertices.length?Uint32Array:Uint16Array)(3*a.indices.length),this.setIndex((new b.BufferAttribute(c,1)).copyIndicesArray(a.indices)));this.groups=a.groups;for(var e in a.morphTargets){for(var c=[],d=a.morphTargets[e],g=0,h=d.length;g<h;g++){var f=d[g],m=new b.Float32Attribute(3*f.length,3);c.push(m.copyVector3sArray(f))}this.morphAttributes[e]= c}0<a.skinIndices.length&&(e=new b.Float32Attribute(4*a.skinIndices.length,4),this.addAttribute("skinIndex",e.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(e=new b.Float32Attribute(4*a.skinWeights.length,4),this.addAttribute("skinWeight",e.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox= new b.Box3);var a=this.attributes.position.array;void 0!==a?this.boundingBox.setFromArray(a):this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var a=new b.Box3,c=new b.Vector3;return function(){null===this.boundingSphere&&(this.boundingSphere= new b.Sphere);var e=this.attributes.position.array;if(e){var d=this.boundingSphere.center;a.setFromArray(e);a.center(d);for(var g=0,h=0,f=e.length;h<f;h+=3)c.fromArray(e,h),g=Math.max(g,d.distanceToSquared(c));this.boundingSphere.radius=Math.sqrt(g);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a= this.index,c=this.attributes,e=this.groups;if(c.position){var d=c.position.array;if(void 0===c.normal)this.addAttribute("normal",new b.BufferAttribute(new Float32Array(d.length),3));else for(var g=c.normal.array,h=0,f=g.length;h<f;h++)g[h]=0;var g=c.normal.array,m,r,t,k=new b.Vector3,u=new b.Vector3,q=new b.Vector3,v=new b.Vector3,p=new b.Vector3;if(a){a=a.array;0===e.length&&this.addGroup(0,a.length);for(var n=0,B=e.length;n<B;++n)for(h=e[n],f=h.start,m=h.count,h=f,f+=m;h<f;h+=3)m=3*a[h+0],r=3*a[h+ 1],t=3*a[h+2],k.fromArray(d,m),u.fromArray(d,r),q.fromArray(d,t),v.subVectors(q,u),p.subVectors(k,u),v.cross(p),g[m]+=v.x,g[m+1]+=v.y,g[m+2]+=v.z,g[r]+=v.x,g[r+1]+=v.y,g[r+2]+=v.z,g[t]+=v.x,g[t+1]+=v.y,g[t+2]+=v.z}else for(h=0,f=d.length;h<f;h+=9)k.fromArray(d,h),u.fromArray(d,h+3),q.fromArray(d,h+6),v.subVectors(q,u),p.subVectors(k,u),v.cross(p),g[h]=v.x,g[h+1]=v.y,g[h+2]=v.z,g[h+3]=v.x,g[h+4]=v.y,g[h+5]=v.z,g[h+6]=v.x,g[h+7]=v.y,g[h+8]=v.z;this.normalizeNormals();c.normal.needsUpdate=!0}},merge:function(a, c){if(!1===a instanceof b.BufferGeometry)console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",a);else{void 0===c&&(c=0);var e=this.attributes,d;for(d in e)if(void 0!==a.attributes[d])for(var g=e[d].array,h=a.attributes[d],f=h.array,m=0,h=h.itemSize*c;m<f.length;m++,h++)g[h]=f[m];return this}},normalizeNormals:function(){for(var a=this.attributes.normal.array,c,b,d,g=0,h=a.length;g<h;g+=3)c=a[g],b=a[g+1],d=a[g+2],c=1/Math.sqrt(c*c+b*b+d*d),a[g]*=c,a[g+1]*= c,a[g+2]*=c},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var a=new b.BufferGeometry,c=this.index.array,e=this.attributes,d;for(d in e){for(var g=e[d],h=g.array,g=g.itemSize,f=new h.constructor(c.length*g),m=0,r=0,t=0,k=c.length;t<k;t++)for(var m=c[t]*g,u=0;u<g;u++)f[r++]=h[m++];a.addAttribute(d,new b.BufferAttribute(f,g))}return a},toJSON:function(){var a={metadata:{version:4.4,type:"BufferGeometry", generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=this.type;""!==this.name&&(a.name=this.name);if(void 0!==this.parameters){var c=this.parameters,b;for(b in c)void 0!==c[b]&&(a[b]=c[b]);return a}a.data={attributes:{}};var d=this.index;null!==d&&(c=Array.prototype.slice.call(d.array),a.data.index={type:d.array.constructor.name,array:c});d=this.attributes;for(b in d){var g=d[b],c=Array.prototype.slice.call(g.array);a.data.attributes[b]={itemSize:g.itemSize,type:g.array.constructor.name,array:c, normalized:g.normalized}}b=this.groups;0<b.length&&(a.data.groups=JSON.parse(JSON.stringify(b)));b=this.boundingSphere;null!==b&&(a.data.boundingSphere={center:b.center.toArray(),radius:b.radius});return a},clone:function(){return(new b.BufferGeometry).copy(this)},copy:function(a){var c=a.index;null!==c&&this.setIndex(c.clone());var c=a.attributes,b;for(b in c)this.addAttribute(b,c[b].clone());a=a.groups;b=0;for(c=a.length;b<c;b++){var d=a[b];this.addGroup(d.start,d.count,d.materialIndex)}return this}, dispose:function(){this.dispatchEvent({type:"dispose"})}});b.BufferGeometry.MaxIndex=65535;b.InstancedBufferGeometry=function(){b.BufferGeometry.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0};b.InstancedBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.InstancedBufferGeometry.prototype.constructor=b.InstancedBufferGeometry;b.InstancedBufferGeometry.prototype.addGroup=function(a,c,b){this.groups.push({start:a,count:c,instances:b})};b.InstancedBufferGeometry.prototype.copy= function(a){var c=a.index;null!==c&&this.setIndex(c.clone());var c=a.attributes,b;for(b in c)this.addAttribute(b,c[b].clone());a=a.groups;b=0;for(c=a.length;b<c;b++){var d=a[b];this.addGroup(d.start,d.count,d.instances)}return this};b.Uniform=function(a,c){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=c);this.value=a;this.dynamic=!1};b.Uniform.prototype={constructor:b.Uniform,onUpdate:function(a){this.dynamic=!0;this.onUpdateCallback=a;return this}};b.AnimationAction= function(){throw Error("THREE.AnimationAction: Use mixer.clipAction for construction.");};b.AnimationAction._new=function(a,c,e){this._mixer=a;this._clip=c;this._localRoot=e||null;a=c.tracks;c=a.length;e=Array(c);for(var d={endingStart:b.ZeroCurvatureEnding,endingEnd:b.ZeroCurvatureEnding},g=0;g!==c;++g){var h=a[g].createInterpolant(null);e[g]=h;h.settings=d}this._interpolantSettings=d;this._interpolants=e;this._propertyBindings=Array(c);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex= this._cacheIndex=null;this.loop=b.LoopRepeat;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0};b.AnimationAction._new.prototype={constructor:b.AnimationAction._new,play:function(){this._mixer._activateAction(this);return this},stop:function(){this._mixer._deactivateAction(this);return this.reset()}, reset:function(){this.paused=!1;this.enabled=!0;this.time=0;this._loopCount=-1;this._startTime=null;return this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(a){this._startTime=a;return this},setLoop:function(a,c){this.loop=a;this.repetitions=c;return this},setEffectiveWeight:function(a){this.weight=a; this._effectiveWeight=this.enabled?a:0;return this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(a){return this._scheduleFading(a,0,1)},fadeOut:function(a){return this._scheduleFading(a,1,0)},crossFadeFrom:function(a,c,b){a.fadeOut(c);this.fadeIn(c);if(b){b=this._clip.duration;var d=a._clip.duration,g=b/d;a.warp(1,d/b,c);this.warp(g,1,c)}return this},crossFadeTo:function(a,c,b){return a.crossFadeFrom(this,c,b)},stopFading:function(){var a=this._weightInterpolant; null!==a&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(a));return this},setEffectiveTimeScale:function(a){this.timeScale=a;this._effectiveTimeScale=this.paused?0:a;return this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(a){this.timeScale=this._clip.duration/a;return this.stopWarping()},syncWith:function(a){this.time=a.time;this.timeScale=a.timeScale;return this.stopWarping()},halt:function(a){return this.warp(this._effectiveTimeScale, 0,a)},warp:function(a,c,b){var d=this._mixer,g=d.time,h=this._timeScaleInterpolant,f=this.timeScale;null===h&&(this._timeScaleInterpolant=h=d._lendControlInterpolant());d=h.parameterPositions;h=h.sampleValues;d[0]=g;d[1]=g+b;h[0]=a/f;h[1]=c/f;return this},stopWarping:function(){var a=this._timeScaleInterpolant;null!==a&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(a));return this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot|| this._mixer._root},_update:function(a,c,b,d){var g=this._startTime;if(null!==g){c=(a-g)*b;if(0>c||0===b)return;this._startTime=null;c*=b}c*=this._updateTimeScale(a);b=this._updateTime(c);a=this._updateWeight(a);if(0<a){c=this._interpolants;for(var g=this._propertyBindings,h=0,f=c.length;h!==f;++h)c[h].evaluate(b),g[h].accumulate(d,a)}},_updateWeight:function(a){var c=0;if(this.enabled){var c=this.weight,b=this._weightInterpolant;if(null!==b){var d=b.evaluate(a)[0],c=c*d;a>b.parameterPositions[1]&& (this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=c},_updateTimeScale:function(a){var c=0;if(!this.paused){var c=this.timeScale,b=this._timeScaleInterpolant;if(null!==b){var d=b.evaluate(a)[0],c=c*d;a>b.parameterPositions[1]&&(this.stopWarping(),0===c?this.paused=!0:this.timeScale=c)}}return this._effectiveTimeScale=c},_updateTime:function(a){var c=this.time+a;if(0===a)return c;var e=this._clip.duration,d=this.loop,g=this._loopCount;if(d===b.LoopOnce)a:{if(-1===g&&(this.loopCount= 0,this._setEndings(!0,!0,!1)),c>=e)c=e;else if(0>c)c=0;else break a;this.clampWhenFinished?this.paused=!0:this.enabled=!1;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>a?-1:1})}else{d=d===b.LoopPingPong;-1===g&&(0<=a?(g=0,this._setEndings(!0,0===this.repetitions,d)):this._setEndings(0===this.repetitions,!0,d));if(c>=e||0>c){var h=Math.floor(c/e),c=c-e*h,g=g+Math.abs(h),f=this.repetitions-g;0>f?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,c=0<a?e:0,this._mixer.dispatchEvent({type:"finished", action:this,direction:0<a?1:-1})):(0===f?(a=0>a,this._setEndings(a,!a,d)):this._setEndings(!1,!1,d),this._loopCount=g,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:h}))}if(d&&1===(g&1))return this.time=c,e-c}return this.time=c},_setEndings:function(a,c,e){var d=this._interpolantSettings;e?(d.endingStart=b.ZeroSlopeEnding,d.endingEnd=b.ZeroSlopeEnding):(d.endingStart=a?this.zeroSlopeAtStart?b.ZeroSlopeEnding:b.ZeroCurvatureEnding:b.WrapAroundEnding,d.endingEnd=c?this.zeroSlopeAtEnd? b.ZeroSlopeEnding:b.ZeroCurvatureEnding:b.WrapAroundEnding)},_scheduleFading:function(a,c,b){var d=this._mixer,g=d.time,h=this._weightInterpolant;null===h&&(this._weightInterpolant=h=d._lendControlInterpolant());d=h.parameterPositions;h=h.sampleValues;d[0]=g;h[0]=c;d[1]=g+a;h[1]=b;return this}};b.AnimationClip=function(a,c,e){this.name=a;this.tracks=e;this.duration=void 0!==c?c:-1;this.uuid=b.Math.generateUUID();0>this.duration&&this.resetDuration();this.trim();this.optimize()};b.AnimationClip.prototype= {constructor:b.AnimationClip,resetDuration:function(){for(var a=0,c=0,b=this.tracks.length;c!==b;++c)var d=this.tracks[c],a=Math.max(a,d.times[d.times.length-1]);this.duration=a},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this}};Object.assign(b.AnimationClip,{parse:function(a){for(var c=[],e=a.tracks,d=1/(a.fps||1),g=0,h=e.length;g!==h;++g)c.push(b.KeyframeTrack.parse(e[g]).scale(d)); return new b.AnimationClip(a.name,a.duration,c)},toJSON:function(a){var c=[],e=a.tracks;a={name:a.name,duration:a.duration,tracks:c};for(var d=0,g=e.length;d!==g;++d)c.push(b.KeyframeTrack.toJSON(e[d]));return a},CreateFromMorphTargetSequence:function(a,c,e,d){for(var g=c.length,h=[],f=0;f<g;f++){var m=[],r=[];m.push((f+g-1)%g,f,(f+1)%g);r.push(0,1,0);var t=b.AnimationUtils.getKeyframeOrder(m),m=b.AnimationUtils.sortedArray(m,1,t),r=b.AnimationUtils.sortedArray(r,1,t);d||0!==m[0]||(m.push(g),r.push(r[0])); h.push((new b.NumberKeyframeTrack(".morphTargetInfluences["+c[f].name+"]",m,r)).scale(1/e))}return new b.AnimationClip(a,-1,h)},findByName:function(a,c){var b=a;Array.isArray(a)||(b=a.geometry&&a.geometry.animations||a.animations);for(var d=0;d<b.length;d++)if(b[d].name===c)return b[d];return null},CreateClipsFromMorphTargetSequences:function(a,c,e){for(var d={},g=/^([\w-]*?)([\d]+)$/,h=0,f=a.length;h<f;h++){var m=a[h],r=m.name.match(g);if(r&&1<r.length){var t=r[1];(r=d[t])||(d[t]=r=[]);r.push(m)}}a= [];for(t in d)a.push(b.AnimationClip.CreateFromMorphTargetSequence(t,d[t],c,e));return a},parseAnimation:function(a,c,e){if(!a)return console.error(" no animation in JSONLoader data"),null;e=function(a,c,e,d,g){if(0!==e.length){var h=[],f=[];b.AnimationUtils.flattenJSON(e,h,f,d);0!==h.length&&g.push(new a(c,h,f))}};var d=[],g=a.name||"default",h=a.length||-1,f=a.fps||30;a=a.hierarchy||[];for(var m=0;m<a.length;m++){var r=a[m].keys;if(r&&0!==r.length)if(r[0].morphTargets){for(var h={},t=0;t<r.length;t++)if(r[t].morphTargets)for(var k= 0;k<r[t].morphTargets.length;k++)h[r[t].morphTargets[k]]=-1;for(var u in h){for(var q=[],v=[],k=0;k!==r[t].morphTargets.length;++k){var p=r[t];q.push(p.time);v.push(p.morphTarget===u?1:0)}d.push(new b.NumberKeyframeTrack(".morphTargetInfluence["+u+"]",q,v))}h=h.length*(f||1)}else t=".bones["+c[m].name+"]",e(b.VectorKeyframeTrack,t+".position",r,"pos",d),e(b.QuaternionKeyframeTrack,t+".quaternion",r,"rot",d),e(b.VectorKeyframeTrack,t+".scale",r,"scl",d)}return 0===d.length?null:new b.AnimationClip(g, h,d)}});b.AnimationMixer=function(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1};Object.assign(b.AnimationMixer.prototype,b.EventDispatcher.prototype,{clipAction:function(a,c){var e=c||this._root,d=e.uuid,g="string"===typeof a?b.AnimationClip.findByName(e,a):a,e=null!==g?g.uuid:a,h=this._actionsByClip[e],f=null;if(void 0!==h){f=h.actionByRoot[d];if(void 0!==f)return f;f=h.knownActions[0];null===g&&(g=f._clip)}if(null===g)return null;g=new b.AnimationMixer._Action(this, g,c);this._bindAction(g,f);this._addInactiveAction(g,e,d);return g},existingAction:function(a,c){var e=c||this._root,d=e.uuid,e="string"===typeof a?b.AnimationClip.findByName(e,a):a,e=this._actionsByClip[e?e.uuid:a];return void 0!==e?e.actionByRoot[d]||null:null},stopAllAction:function(){for(var a=this._actions,c=this._nActiveActions,b=this._bindings,d=this._nActiveBindings,g=this._nActiveBindings=this._nActiveActions=0;g!==c;++g)a[g].reset();for(g=0;g!==d;++g)b[g].useCount=0;return this},update:function(a){a*= this.timeScale;for(var c=this._actions,b=this._nActiveActions,d=this.time+=a,g=Math.sign(a),h=this._accuIndex^=1,f=0;f!==b;++f){var m=c[f];m.enabled&&m._update(d,a,g,h)}a=this._bindings;c=this._nActiveBindings;for(f=0;f!==c;++f)a[f].apply(h);return this},getRoot:function(){return this._root},uncacheClip:function(a){var c=this._actions;a=a.uuid;var b=this._actionsByClip,d=b[a];if(void 0!==d){for(var d=d.knownActions,g=0,h=d.length;g!==h;++g){var f=d[g];this._deactivateAction(f);var m=f._cacheIndex, r=c[c.length-1];f._cacheIndex=null;f._byClipCacheIndex=null;r._cacheIndex=m;c[m]=r;c.pop();this._removeInactiveBindingsForAction(f)}delete b[a]}},uncacheRoot:function(a){a=a.uuid;var c=this._actionsByClip,b;for(b in c){var d=c[b].actionByRoot[a];void 0!==d&&(this._deactivateAction(d),this._removeInactiveAction(d))}b=this._bindingsByRootAndName[a];if(void 0!==b)for(var g in b)a=b[g],a.restoreOriginalState(),this._removeInactiveBinding(a)},uncacheAction:function(a,c){var b=this.existingAction(a,c); null!==b&&(this._deactivateAction(b),this._removeInactiveAction(b))}});b.AnimationMixer._Action=b.AnimationAction._new;Object.assign(b.AnimationMixer.prototype,{_bindAction:function(a,c){var e=a._localRoot||this._root,d=a._clip.tracks,g=d.length,h=a._propertyBindings,f=a._interpolants,m=e.uuid,r=this._bindingsByRootAndName,t=r[m];void 0===t&&(t={},r[m]=t);for(r=0;r!==g;++r){var k=d[r],u=k.name,q=t[u];if(void 0===q){q=h[r];if(void 0!==q){null===q._cacheIndex&&(++q.referenceCount,this._addInactiveBinding(q, m,u));continue}q=new b.PropertyMixer(b.PropertyBinding.create(e,u,c&&c._propertyBindings[r].binding.parsedPath),k.ValueTypeName,k.getValueSize());++q.referenceCount;this._addInactiveBinding(q,m,u)}h[r]=q;f[r].resultBuffer=q.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var c=(a._localRoot||this._root).uuid,b=a._clip.uuid,d=this._actionsByClip[b];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,b,c)}c=a._propertyBindings;b=0;for(d=c.length;b!== d;++b){var g=c[b];0===g.useCount++&&(this._lendBinding(g),g.saveOriginalState())}this._lendAction(a)}},_deactivateAction:function(a){if(this._isActiveAction(a)){for(var c=a._propertyBindings,b=0,d=c.length;b!==d;++b){var g=c[b];0===--g.useCount&&(g.restoreOriginalState(),this._takeBackBinding(g))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants= [];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}},_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&a<this._nActiveActions},_addInactiveAction:function(a,c,b){var d=this._actions,g= this._actionsByClip,h=g[c];void 0===h?(h={knownActions:[a],actionByRoot:{}},a._byClipCacheIndex=0,g[c]=h):(c=h.knownActions,a._byClipCacheIndex=c.length,c.push(a));a._cacheIndex=d.length;d.push(a);h.actionByRoot[b]=a},_removeInactiveAction:function(a){var c=this._actions,b=c[c.length-1],d=a._cacheIndex;b._cacheIndex=d;c[d]=b;c.pop();a._cacheIndex=null;var b=a._clip.uuid,d=this._actionsByClip,g=d[b],h=g.knownActions,f=h[h.length-1],m=a._byClipCacheIndex;f._byClipCacheIndex=m;h[m]=f;h.pop();a._byClipCacheIndex= null;delete g.actionByRoot[(c._localRoot||this._root).uuid];0===h.length&&delete d[b];this._removeInactiveBindingsForAction(a)},_removeInactiveBindingsForAction:function(a){a=a._propertyBindings;for(var c=0,b=a.length;c!==b;++c){var d=a[c];0===--d.referenceCount&&this._removeInactiveBinding(d)}},_lendAction:function(a){var c=this._actions,b=a._cacheIndex,d=this._nActiveActions++,g=c[d];a._cacheIndex=d;c[d]=a;g._cacheIndex=b;c[b]=g},_takeBackAction:function(a){var c=this._actions,b=a._cacheIndex,d= --this._nActiveActions,g=c[d];a._cacheIndex=d;c[d]=a;g._cacheIndex=b;c[b]=g},_addInactiveBinding:function(a,c,b){var d=this._bindingsByRootAndName,g=d[c],h=this._bindings;void 0===g&&(g={},d[c]=g);g[b]=a;a._cacheIndex=h.length;h.push(a)},_removeInactiveBinding:function(a){var c=this._bindings,b=a.binding,d=b.rootNode.uuid,b=b.path,g=this._bindingsByRootAndName,h=g[d],f=c[c.length-1];a=a._cacheIndex;f._cacheIndex=a;c[a]=f;c.pop();delete h[b];a:{for(var m in h)break a;delete g[d]}},_lendBinding:function(a){var c= this._bindings,b=a._cacheIndex,d=this._nActiveBindings++,g=c[d];a._cacheIndex=d;c[d]=a;g._cacheIndex=b;c[b]=g},_takeBackBinding:function(a){var c=this._bindings,b=a._cacheIndex,d=--this._nActiveBindings,g=c[d];a._cacheIndex=d;c[d]=a;g._cacheIndex=b;c[b]=g},_lendControlInterpolant:function(){var a=this._controlInterpolants,c=this._nActiveControlInterpolants++,e=a[c];void 0===e&&(e=new b.LinearInterpolant(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),e.__cacheIndex= c,a[c]=e);return e},_takeBackControlInterpolant:function(a){var c=this._controlInterpolants,b=a.__cacheIndex,d=--this._nActiveControlInterpolants,g=c[d];a.__cacheIndex=d;c[d]=a;g.__cacheIndex=b;c[b]=g},_controlInterpolantsResultBuffer:new Float32Array(1)});b.AnimationObjectGroup=function(a){this.uuid=b.Math.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var c={};this._indicesByUUID=c;for(var e=0,d=arguments.length;e!==d;++e)c[arguments[e].uuid]=e;this._paths= [];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var g=this;this.stats={objects:{get total(){return g._objects.length},get inUse(){return this.total-g.nCachedObjects_}},get bindingsPerObject(){return g._bindings.length}}};b.AnimationObjectGroup.prototype={constructor:b.AnimationObjectGroup,add:function(a){for(var c=this._objects,e=c.length,d=this.nCachedObjects_,g=this._indicesByUUID,h=this._paths,f=this._parsedPaths,m=this._bindings,r=m.length,t=0,k=arguments.length;t!==k;++t){var u= arguments[t],q=u.uuid,v=g[q];if(void 0===v){v=e++;g[q]=v;c.push(u);for(var q=0,p=r;q!==p;++q)m[q].push(new b.PropertyBinding(u,h[q],f[q]))}else if(v<d){var n=c[v],B=--d,p=c[B];g[p.uuid]=v;c[v]=p;g[q]=B;c[B]=u;q=0;for(p=r;q!==p;++q){var A=m[q],C=A[v];A[v]=A[B];void 0===C&&(C=new b.PropertyBinding(u,h[q],f[q]));A[B]=C}}else c[v]!==n&&console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...")}this.nCachedObjects_=d},remove:function(a){for(var c= this._objects,b=this.nCachedObjects_,d=this._indicesByUUID,g=this._bindings,h=g.length,f=0,m=arguments.length;f!==m;++f){var r=arguments[f],t=r.uuid,k=d[t];if(void 0!==k&&k>=b){var u=b++,q=c[u];d[q.uuid]=k;c[k]=q;d[t]=u;c[u]=r;r=0;for(t=h;r!==t;++r){var q=g[r],v=q[k];q[k]=q[u];q[u]=v}}}this.nCachedObjects_=b},uncache:function(a){for(var c=this._objects,b=c.length,d=this.nCachedObjects_,g=this._indicesByUUID,h=this._bindings,f=h.length,m=0,r=arguments.length;m!==r;++m){var t=arguments[m].uuid,k=g[t]; if(void 0!==k)if(delete g[t],k<d){var t=--d,u=c[t],q=--b,v=c[q];g[u.uuid]=k;c[k]=u;g[v.uuid]=t;c[t]=v;c.pop();u=0;for(v=f;u!==v;++u){var p=h[u],n=p[q];p[k]=p[t];p[t]=n;p.pop()}}else for(q=--b,v=c[q],g[v.uuid]=k,c[k]=v,c.pop(),u=0,v=f;u!==v;++u)p=h[u],p[k]=p[q],p.pop()}this.nCachedObjects_=d},subscribe_:function(a,c){var e=this._bindingsIndicesByPath,d=e[a],g=this._bindings;if(void 0!==d)return g[d];var h=this._paths,f=this._parsedPaths,m=this._objects,r=this.nCachedObjects_,t=Array(m.length),d=g.length; e[a]=d;h.push(a);f.push(c);g.push(t);e=r;for(d=m.length;e!==d;++e)t[e]=new b.PropertyBinding(m[e],a,c);return t},unsubscribe_:function(a){var c=this._bindingsIndicesByPath,b=c[a];if(void 0!==b){var d=this._paths,g=this._parsedPaths,h=this._bindings,f=h.length-1,m=h[f];c[a[f]]=b;h[b]=m;h.pop();g[b]=g[f];g.pop();d[b]=d[f];d.pop()}}};b.AnimationUtils={arraySlice:function(a,c,e){return b.AnimationUtils.isTypedArray(a)?new a.constructor(a.subarray(c,e)):a.slice(c,e)},convertArray:function(a,c,b){return!a|| !b&&a.constructor===c?a:"number"===typeof c.BYTES_PER_ELEMENT?new c(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var c=a.length,b=Array(c),d=0;d!==c;++d)b[d]=d;b.sort(function(c,b){return a[c]-a[b]});return b},sortedArray:function(a,c,b){for(var d=a.length,g=new a.constructor(d),h=0,f=0;f!==d;++h)for(var m=b[h]*c,r=0;r!==c;++r)g[f++]=a[m+r];return g},flattenJSON:function(a,c,b,d){for(var g=1,h=a[0];void 0!== h&&void 0===h[d];)h=a[g++];if(void 0!==h){var f=h[d];if(void 0!==f)if(Array.isArray(f)){do f=h[d],void 0!==f&&(c.push(h.time),b.push.apply(b,f)),h=a[g++];while(void 0!==h)}else if(void 0!==f.toArray){do f=h[d],void 0!==f&&(c.push(h.time),f.toArray(b,b.length)),h=a[g++];while(void 0!==h)}else{do f=h[d],void 0!==f&&(c.push(h.time),b.push(f)),h=a[g++];while(void 0!==h)}}}};b.KeyframeTrack=function(a,c,e,d){if(void 0===a)throw Error("track name is undefined");if(void 0===c||0===c.length)throw Error("no keyframes in track named "+ a);this.name=a;this.times=b.AnimationUtils.convertArray(c,this.TimeBufferType);this.values=b.AnimationUtils.convertArray(e,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation);this.validate();this.optimize()};b.KeyframeTrack.prototype={constructor:b.KeyframeTrack,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:b.InterpolateLinear,InterpolantFactoryMethodDiscrete:function(a){return new b.DiscreteInterpolant(this.times,this.values,this.getValueSize(), a)},InterpolantFactoryMethodLinear:function(a){return new b.LinearInterpolant(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new b.CubicInterpolant(this.times,this.values,this.getValueSize(),a)},setInterpolation:function(a){var c;switch(a){case b.InterpolateDiscrete:c=this.InterpolantFactoryMethodDiscrete;break;case b.InterpolateLinear:c=this.InterpolantFactoryMethodLinear;break;case b.InterpolateSmooth:c=this.InterpolantFactoryMethodSmooth}if(void 0=== c){c="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(c);console.warn(c)}else this.createInterpolant=c},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return b.InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return b.InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return b.InterpolateSmooth}}, getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var c=this.times,b=0,d=c.length;b!==d;++b)c[b]+=a;return this},scale:function(a){if(1!==a)for(var c=this.times,b=0,d=c.length;b!==d;++b)c[b]*=a;return this},trim:function(a,c){for(var e=this.times,d=e.length,g=0,h=d-1;g!==d&&e[g]<a;)++g;for(;-1!==h&&e[h]>c;)--h;++h;if(0!==g||h!==d)g>=h&&(h=Math.max(h,1),g=h-1),d=this.getValueSize(),this.times=b.AnimationUtils.arraySlice(e,g,h),this.values=b.AnimationUtils.arraySlice(this.values, g*d,h*d);return this},validate:function(){var a=!0,c=this.getValueSize();0!==c-Math.floor(c)&&(console.error("invalid value size in track",this),a=!1);var e=this.times,c=this.values,d=e.length;0===d&&(console.error("track is empty",this),a=!1);for(var g=null,h=0;h!==d;h++){var f=e[h];if("number"===typeof f&&isNaN(f)){console.error("time is not a valid number",this,h,f);a=!1;break}if(null!==g&&g>f){console.error("out of order keys",this,h,f,g);a=!1;break}g=f}if(void 0!==c&&b.AnimationUtils.isTypedArray(c))for(h= 0,e=c.length;h!==e;++h)if(d=c[h],isNaN(d)){console.error("value is not a valid number",this,h,d);a=!1;break}return a},optimize:function(){for(var a=this.times,c=this.values,e=this.getValueSize(),d=1,g=1,h=a.length-1;g<=h;++g){var f=!1,m=a[g];if(m!==a[g+1]&&(1!==g||m!==m[0]))for(var r=g*e,t=r-e,k=r+e,m=0;m!==e;++m){var u=c[r+m];if(u!==c[t+m]||u!==c[k+m]){f=!0;break}}if(f){if(g!==d)for(a[d]=a[g],f=g*e,r=d*e,m=0;m!==e;++m)c[r+m]=c[f+m];++d}}d!==a.length&&(this.times=b.AnimationUtils.arraySlice(a,0,d), this.values=b.AnimationUtils.arraySlice(c,0,d*e));return this}};Object.assign(b.KeyframeTrack,{parse:function(a){if(void 0===a.type)throw Error("track type undefined, can not parse");var c=b.KeyframeTrack._getTrackTypeForValueTypeName(a.type);if(void 0===a.times){var e=[],d=[];b.AnimationUtils.flattenJSON(a.keys,e,d,"value");a.times=e;a.values=d}return void 0!==c.parse?c.parse(a):new c(a.name,a.times,a.values,a.interpolation)},toJSON:function(a){var c=a.constructor;if(void 0!==c.toJSON)c=c.toJSON(a); else{var c={name:a.name,times:b.AnimationUtils.convertArray(a.times,Array),values:b.AnimationUtils.convertArray(a.values,Array)},e=a.getInterpolation();e!==a.DefaultInterpolation&&(c.interpolation=e)}c.type=a.ValueTypeName;return c},_getTrackTypeForValueTypeName:function(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return b.NumberKeyframeTrack;case "vector":case "vector2":case "vector3":case "vector4":return b.VectorKeyframeTrack;case "color":return b.ColorKeyframeTrack; case "quaternion":return b.QuaternionKeyframeTrack;case "bool":case "boolean":return b.BooleanKeyframeTrack;case "string":return b.StringKeyframeTrack}throw Error("Unsupported typeName: "+a);}});b.PropertyBinding=function(a,c,e){this.path=c;this.parsedPath=e||b.PropertyBinding.parseTrackName(c);this.node=b.PropertyBinding.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a};b.PropertyBinding.prototype={constructor:b.PropertyBinding,getValue:function(a,c){this.bind();this.getValue(a,c)},setValue:function(a, c){this.bind();this.setValue(a,c)},bind:function(){var a=this.node,c=this.parsedPath,e=c.objectName,d=c.propertyName,g=c.propertyIndex;a||(this.node=a=b.PropertyBinding.findNode(this.rootNode,c.nodeName)||this.rootNode);this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(a){if(e){var h=c.objectIndex;switch(e){case "materials":if(!a.material){console.error(" can not bind to material as node does not have a material",this);return}if(!a.material.materials){console.error(" can not bind to material.materials as node.material does not have a materials array", this);return}a=a.material.materials;break;case "bones":if(!a.skeleton){console.error(" can not bind to bones as node does not have a skeleton",this);return}a=a.skeleton.bones;for(e=0;e<a.length;e++)if(a[e].name===h){h=e;break}break;default:if(void 0===a[e]){console.error(" can not bind to objectName of node, undefined",this);return}a=a[e]}if(void 0!==h){if(void 0===a[h]){console.error(" trying to bind to objectIndex of objectName, but is undefined:",this,a);return}a=a[h]}}if(h=a[d]){c=this.Versioning.None; void 0!==a.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=a):void 0!==a.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=a);e=this.BindingType.Direct;if(void 0!==g){if("morphTargetInfluences"===d){if(!a.geometry){console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry",this);return}if(!a.geometry.morphTargets){console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets", this);return}for(e=0;e<this.node.geometry.morphTargets.length;e++)if(a.geometry.morphTargets[e].name===g){g=e;break}}e=this.BindingType.ArrayElement;this.resolvedProperty=h;this.propertyIndex=g}else void 0!==h.fromArray&&void 0!==h.toArray?(e=this.BindingType.HasFromToArray,this.resolvedProperty=h):void 0!==h.length?(e=this.BindingType.EntireArray,this.resolvedProperty=h):this.propertyName=d;this.getValue=this.GetterByBindingType[e];this.setValue=this.SetterByBindingTypeAndVersioning[e][c]}else console.error(" trying to update property for track: "+ c.nodeName+"."+d+" but it wasn't found.",a)}else console.error(" trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}};Object.assign(b.PropertyBinding.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},_getValue_unbound:b.PropertyBinding.prototype.getValue,_setValue_unbound:b.PropertyBinding.prototype.setValue,BindingType:{Direct:0,EntireArray:1, ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(a,c){a[c]=this.node[this.propertyName]},function(a,c){for(var b=this.resolvedProperty,d=0,g=b.length;d!==g;++d)a[c++]=b[d]},function(a,c){a[c]=this.resolvedProperty[this.propertyIndex]},function(a,c){this.resolvedProperty.toArray(a,c)}],SetterByBindingTypeAndVersioning:[[function(a,c){this.node[this.propertyName]=a[c]},function(a,c){this.node[this.propertyName]=a[c];this.targetObject.needsUpdate= !0},function(a,c){this.node[this.propertyName]=a[c];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,c){for(var b=this.resolvedProperty,d=0,g=b.length;d!==g;++d)b[d]=a[c++]},function(a,c){for(var b=this.resolvedProperty,d=0,g=b.length;d!==g;++d)b[d]=a[c++];this.targetObject.needsUpdate=!0},function(a,c){for(var b=this.resolvedProperty,d=0,g=b.length;d!==g;++d)b[d]=a[c++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,c){this.resolvedProperty[this.propertyIndex]=a[c]},function(a, c){this.resolvedProperty[this.propertyIndex]=a[c];this.targetObject.needsUpdate=!0},function(a,c){this.resolvedProperty[this.propertyIndex]=a[c];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(a,c){this.resolvedProperty.fromArray(a,c)},function(a,c){this.resolvedProperty.fromArray(a,c);this.targetObject.needsUpdate=!0},function(a,c){this.resolvedProperty.fromArray(a,c);this.targetObject.matrixWorldNeedsUpdate=!0}]]});b.PropertyBinding.Composite=function(a,c,e){e=e||b.PropertyBinding.parseTrackName(c); this._targetGroup=a;this._bindings=a.subscribe_(c,e)};b.PropertyBinding.Composite.prototype={constructor:b.PropertyBinding.Composite,getValue:function(a,c){this.bind();var b=this._bindings[this._targetGroup.nCachedObjects_];void 0!==b&&b.getValue(a,c)},setValue:function(a,c){for(var b=this._bindings,d=this._targetGroup.nCachedObjects_,g=b.length;d!==g;++d)b[d].setValue(a,c)},bind:function(){for(var a=this._bindings,c=this._targetGroup.nCachedObjects_,b=a.length;c!==b;++c)a[c].bind()},unbind:function(){for(var a= this._bindings,c=this._targetGroup.nCachedObjects_,b=a.length;c!==b;++c)a[c].unbind()}};b.PropertyBinding.create=function(a,c,e){return a instanceof b.AnimationObjectGroup?new b.PropertyBinding.Composite(a,c,e):new b.PropertyBinding(a,c,e)};b.PropertyBinding.parseTrackName=function(a){var c=/^(([\w]+\/)*)([\w-\d]+)?(\.([\w]+)(\[([\w\d\[\]\_.:\- ]+)\])?)?(\.([\w.]+)(\[([\w\d\[\]\_. ]+)\])?)$/,b=c.exec(a);if(!b)throw Error("cannot parse trackName at all: "+a);b.index===c.lastIndex&&c.lastIndex++;c= {nodeName:b[3],objectName:b[5],objectIndex:b[7],propertyName:b[9],propertyIndex:b[11]};if(null===c.propertyName||0===c.propertyName.length)throw Error("can not parse propertyName from trackName: "+a);return c};b.PropertyBinding.findNode=function(a,c){if(!c||""===c||"root"===c||"."===c||-1===c||c===a.name||c===a.uuid)return a;if(a.skeleton){var b=function(a){for(var b=0;b<a.bones.length;b++){var e=a.bones[b];if(e.name===c)return e}return null}(a.skeleton);if(b)return b}return a.children&&(b=function g(a){for(var b= 0;b<a.length;b++){var e=a[b];if(e.name===c||e.uuid===c||(e=g(e.children)))return e}return null}(a.children))?b:null};b.PropertyMixer=function(a,c,b){this.binding=a;this.valueSize=b;a=Float64Array;switch(c){case "quaternion":c=this._slerp;break;case "string":case "bool":a=Array;c=this._select;break;default:c=this._lerp}this.buffer=new a(4*b);this._mixBufferRegion=c;this.referenceCount=this.useCount=this.cumulativeWeight=0};b.PropertyMixer.prototype={constructor:b.PropertyMixer,accumulate:function(a, c){var b=this.buffer,d=this.valueSize,g=a*d+d,h=this.cumulativeWeight;if(0===h){for(h=0;h!==d;++h)b[g+h]=b[h];h=c}else h+=c,this._mixBufferRegion(b,g,0,c/h,d);this.cumulativeWeight=h},apply:function(a){var c=this.valueSize,b=this.buffer;a=a*c+c;var d=this.cumulativeWeight,g=this.binding;this.cumulativeWeight=0;1>d&&this._mixBufferRegion(b,a,3*c,1-d,c);for(var d=c,h=c+c;d!==h;++d)if(b[d]!==b[d+c]){g.setValue(b,a);break}},saveOriginalState:function(){var a=this.buffer,c=this.valueSize,b=3*c;this.binding.getValue(a, b);for(var d=c;d!==b;++d)a[d]=a[b+d%c];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,c,b,d,g){if(.5<=d)for(d=0;d!==g;++d)a[c+d]=a[b+d]},_slerp:function(a,c,e,d,g){b.Quaternion.slerpFlat(a,c,a,c,a,e,d)},_lerp:function(a,c,b,d,g){for(var h=1-d,f=0;f!==g;++f){var m=c+f;a[m]=a[m]*h+a[b+f]*d}}};b.BooleanKeyframeTrack=function(a,c,e){b.KeyframeTrack.call(this,a,c,e)};b.BooleanKeyframeTrack.prototype=Object.assign(Object.create(b.KeyframeTrack.prototype), {constructor:b.BooleanKeyframeTrack,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:b.InterpolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});b.ColorKeyframeTrack=function(a,c,e,d){b.KeyframeTrack.call(this,a,c,e,d)};b.ColorKeyframeTrack.prototype=Object.assign(Object.create(b.KeyframeTrack.prototype),{constructor:b.ColorKeyframeTrack,ValueTypeName:"color"});b.NumberKeyframeTrack=function(a,c,e,d){b.KeyframeTrack.call(this,a,c,e,d)};b.NumberKeyframeTrack.prototype= Object.assign(Object.create(b.KeyframeTrack.prototype),{constructor:b.NumberKeyframeTrack,ValueTypeName:"number"});b.QuaternionKeyframeTrack=function(a,c,e,d){b.KeyframeTrack.call(this,a,c,e,d)};b.QuaternionKeyframeTrack.prototype=Object.assign(Object.create(b.KeyframeTrack.prototype),{constructor:b.QuaternionKeyframeTrack,ValueTypeName:"quaternion",DefaultInterpolation:b.InterpolateLinear,InterpolantFactoryMethodLinear:function(a){return new b.QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(), a)},InterpolantFactoryMethodSmooth:void 0});b.StringKeyframeTrack=function(a,c,e,d){b.KeyframeTrack.call(this,a,c,e,d)};b.StringKeyframeTrack.prototype=Object.assign(Object.create(b.KeyframeTrack.prototype),{constructor:b.StringKeyframeTrack,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:b.InterpolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});b.VectorKeyframeTrack=function(a,c,e,d){b.KeyframeTrack.call(this,a,c,e,d)};b.VectorKeyframeTrack.prototype= Object.assign(Object.create(b.KeyframeTrack.prototype),{constructor:b.VectorKeyframeTrack,ValueTypeName:"vector"});b.Audio=function(a){b.Object3D.call(this);this.type="Audio";this.context=a.context;this.source=this.context.createBufferSource();this.source.onended=this.onEnded.bind(this);this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]};b.Audio.prototype= Object.assign(Object.create(b.Object3D.prototype),{constructor:b.Audio,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this},setBuffer:function(a){this.source.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(){if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); else{var a=this.context.createBufferSource();a.buffer=this.source.buffer;a.loop=this.source.loop;a.onended=this.source.onended;a.start(0,this.startTime);a.playbackRate.value=this.playbackRate;this.isPlaying=!0;this.source=a;return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.startTime=this.context.currentTime,this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); else return this.source.stop(),this.startTime=0,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-1].connect(this.filters[a]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var a=1,b=this.filters.length;a<b;a++)this.filters[a-1].disconnect(this.filters[a]); this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(a){a||(a=[]);!0===this.isPlaying?(this.disconnect(),this.filters=a,this.connect()):this.filters=a;return this},getFilter:function(){return this.getFilters()[0]},setFilter:function(a){return this.setFilters(a?[a]:[])},setPlaybackRate:function(a){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); else return this.playbackRate=a,!0===this.isPlaying&&(this.source.playbackRate.value=this.playbackRate),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.source.loop},setLoop:function(a){!1===this.hasPlaybackControl?console.warn("THREE.Audio: this Audio has no playback control."):this.source.loop=a},getVolume:function(){return this.gain.gain.value}, setVolume:function(a){this.gain.gain.value=a;return this}});b.AudioAnalyser=function(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)};Object.assign(b.AudioAnalyser.prototype,{getFrequencyData:function(){this.analyser.getByteFrequencyData(this.data);return this.data},getAverageFrequency:function(){for(var a=0,b=this.getFrequencyData(),e=0;e<b.length;e++)a+=b[e];return a/ b.length}});Object.defineProperty(b,"AudioContext",{get:function(){var a;return function(){void 0===a&&(a=new (window.AudioContext||window.webkitAudioContext));return a}}()});b.PositionalAudio=function(a){b.Audio.call(this,a);this.panner=this.context.createPanner();this.panner.connect(this.gain)};b.PositionalAudio.prototype=Object.assign(Object.create(b.Audio.prototype),{constructor:b.PositionalAudio,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance}, setRefDistance:function(a){this.panner.refDistance=a},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(a){this.panner.rolloffFactor=a},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(a){this.panner.distanceModel=a},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(a){this.panner.maxDistance=a},updateMatrixWorld:function(){var a=new b.Vector3;return function(c){b.Object3D.prototype.updateMatrixWorld.call(this, c);a.setFromMatrixPosition(this.matrixWorld);this.panner.setPosition(a.x,a.y,a.z)}}()});b.AudioListener=function(){b.Object3D.call(this);this.type="AudioListener";this.context=b.AudioContext;this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null};b.AudioListener.prototype=Object.assign(Object.create(b.Object3D.prototype),{constructor:b.AudioListener,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination);this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.value= a},updateMatrixWorld:function(){var a=new b.Vector3,c=new b.Quaternion,e=new b.Vector3,d=new b.Vector3;return function(g){b.Object3D.prototype.updateMatrixWorld.call(this,g);g=this.context.listener;var h=this.up;this.matrixWorld.decompose(a,c,e);d.set(0,0,-1).applyQuaternion(c);g.setPosition(a.x,a.y,a.z);g.setOrientation(d.x,d.y,d.z,h.x,h.y,h.z)}}()});b.Camera=function(){b.Object3D.call(this);this.type="Camera";this.matrixWorldInverse=new b.Matrix4;this.projectionMatrix=new b.Matrix4};b.Camera.prototype= Object.create(b.Object3D.prototype);b.Camera.prototype.constructor=b.Camera;b.Camera.prototype.getWorldDirection=function(){var a=new b.Quaternion;return function(c){c=c||new b.Vector3;this.getWorldQuaternion(a);return c.set(0,0,-1).applyQuaternion(a)}}();b.Camera.prototype.lookAt=function(){var a=new b.Matrix4;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();b.Camera.prototype.clone=function(){return(new this.constructor).copy(this)};b.Camera.prototype.copy= function(a){b.Object3D.prototype.copy.call(this,a);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);return this};b.CubeCamera=function(a,c,e){b.Object3D.call(this);this.type="CubeCamera";var d=new b.PerspectiveCamera(90,1,a,c);d.up.set(0,-1,0);d.lookAt(new b.Vector3(1,0,0));this.add(d);var g=new b.PerspectiveCamera(90,1,a,c);g.up.set(0,-1,0);g.lookAt(new b.Vector3(-1,0,0));this.add(g);var h=new b.PerspectiveCamera(90,1,a,c);h.up.set(0,0,1);h.lookAt(new b.Vector3(0, 1,0));this.add(h);var f=new b.PerspectiveCamera(90,1,a,c);f.up.set(0,0,-1);f.lookAt(new b.Vector3(0,-1,0));this.add(f);var m=new b.PerspectiveCamera(90,1,a,c);m.up.set(0,-1,0);m.lookAt(new b.Vector3(0,0,1));this.add(m);var r=new b.PerspectiveCamera(90,1,a,c);r.up.set(0,-1,0);r.lookAt(new b.Vector3(0,0,-1));this.add(r);this.renderTarget=new b.WebGLRenderTargetCube(e,e,{format:b.RGBFormat,magFilter:b.LinearFilter,minFilter:b.LinearFilter});this.updateCubeMap=function(a,b){null===this.parent&&this.updateMatrixWorld(); var c=this.renderTarget,e=c.texture.generateMipmaps;c.texture.generateMipmaps=!1;c.activeCubeFace=0;a.render(b,d,c);c.activeCubeFace=1;a.render(b,g,c);c.activeCubeFace=2;a.render(b,h,c);c.activeCubeFace=3;a.render(b,f,c);c.activeCubeFace=4;a.render(b,m,c);c.texture.generateMipmaps=e;c.activeCubeFace=5;a.render(b,r,c);a.setRenderTarget(null)}};b.CubeCamera.prototype=Object.create(b.Object3D.prototype);b.CubeCamera.prototype.constructor=b.CubeCamera;b.OrthographicCamera=function(a,c,e,d,g,h){b.Camera.call(this); this.type="OrthographicCamera";this.zoom=1;this.left=a;this.right=c;this.top=e;this.bottom=d;this.near=void 0!==g?g:.1;this.far=void 0!==h?h:2E3;this.updateProjectionMatrix()};b.OrthographicCamera.prototype=Object.assign(Object.create(b.Camera.prototype),{constructor:b.OrthographicCamera,copy:function(a){b.Camera.prototype.copy.call(this,a);this.left=a.left;this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;return this},updateProjectionMatrix:function(){var a= (this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),e=(this.right+this.left)/2,d=(this.top+this.bottom)/2;this.projectionMatrix.makeOrthographic(e-a,e+a,d+b,d-b,this.near,this.far)},toJSON:function(a){a=b.Object3D.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;return a}});b.PerspectiveCamera=function(a,c,e,d){b.Camera.call(this); this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==e?e:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==c?c:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()};b.PerspectiveCamera.prototype=Object.assign(Object.create(b.Camera.prototype),{constructor:b.PerspectiveCamera,copy:function(a){b.Camera.prototype.copy.call(this,a);this.fov=a.fov;this.zoom=a.zoom;this.near=a.near;this.far=a.far;this.focus=a.focus;this.aspect= a.aspect;this.view=null===a.view?null:Object.assign({},a.view);this.filmGauge=a.filmGauge;this.filmOffset=a.filmOffset;return this},setFocalLength:function(a){a=.5*this.getFilmHeight()/a;this.fov=2*b.Math.RAD2DEG*Math.atan(a);this.updateProjectionMatrix()},getFocalLength:function(){var a=Math.tan(.5*b.Math.DEG2RAD*this.fov);return.5*this.getFilmHeight()/a},getEffectiveFOV:function(){return 2*b.Math.RAD2DEG*Math.atan(Math.tan(.5*b.Math.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge* Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(a,b,e,d,g,h){this.aspect=a/b;this.view={fullWidth:a,fullHeight:b,offsetX:e,offsetY:d,width:g,height:h};this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null;this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=this.near,c=a*Math.tan(.5*b.Math.DEG2RAD*this.fov)/this.zoom,e=2*c,d=this.aspect*e,g=-.5*d,h=this.view;if(null!==h)var f=h.fullWidth,m= h.fullHeight,g=g+h.offsetX*d/f,c=c-h.offsetY*e/m,d=h.width/f*d,e=h.height/m*e;h=this.filmOffset;0!==h&&(g+=a*h/this.getFilmWidth());this.projectionMatrix.makeFrustum(g,g+d,c-e,c,a,this.far)},toJSON:function(a){a=b.Object3D.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset= this.filmOffset;return a}});b.StereoCamera=function(){this.type="StereoCamera";this.aspect=1;this.cameraL=new b.PerspectiveCamera;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new b.PerspectiveCamera;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1};Object.assign(b.StereoCamera.prototype,{update:function(){var a,c,e,d,g,h=new b.Matrix4,f=new b.Matrix4;return function(m){if(a!==m.focus||c!==m.fov||e!==m.aspect*this.aspect||d!==m.near||g!==m.far){a=m.focus; c=m.fov;e=m.aspect*this.aspect;d=m.near;g=m.far;var r=m.projectionMatrix.clone(),t=.032*d/a,k=d*Math.tan(b.Math.DEG2RAD*c*.5),u,q;f.elements[12]=-.032;h.elements[12]=.032;u=-k*e+t;q=k*e+t;r.elements[0]=2*d/(q-u);r.elements[8]=(q+u)/(q-u);this.cameraL.projectionMatrix.copy(r);u=-k*e-t;q=k*e-t;r.elements[0]=2*d/(q-u);r.elements[8]=(q+u)/(q-u);this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(m.matrixWorld).multiply(f);this.cameraR.matrixWorld.copy(m.matrixWorld).multiply(h)}}()}); b.Light=function(a,c){b.Object3D.call(this);this.type="Light";this.color=new b.Color(a);this.intensity=void 0!==c?c:1;this.receiveShadow=void 0};b.Light.prototype=Object.assign(Object.create(b.Object3D.prototype),{constructor:b.Light,copy:function(a){b.Object3D.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=b.Object3D.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=this.intensity;void 0!==this.groundColor&& (a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&(a.object.penumbra=this.penumbra);return a}});b.LightShadow=function(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new b.Vector2(512,512);this.map=null;this.matrix=new b.Matrix4};Object.assign(b.LightShadow.prototype,{copy:function(a){this.camera=a.camera.clone(); this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)}});b.AmbientLight=function(a,c){b.Light.call(this,a,c);this.type="AmbientLight";this.castShadow=void 0};b.AmbientLight.prototype=Object.assign(Object.create(b.Light.prototype),{constructor:b.AmbientLight});b.DirectionalLight=function(a,c){b.Light.call(this,a,c);this.type="DirectionalLight";this.position.set(0,1,0);this.updateMatrix();this.target=new b.Object3D;this.shadow= new b.DirectionalLightShadow};b.DirectionalLight.prototype=Object.assign(Object.create(b.Light.prototype),{constructor:b.DirectionalLight,copy:function(a){b.Light.prototype.copy.call(this,a);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});b.DirectionalLightShadow=function(a){b.LightShadow.call(this,new b.OrthographicCamera(-5,5,5,-5,.5,500))};b.DirectionalLightShadow.prototype=Object.assign(Object.create(b.LightShadow.prototype),{constructor:b.DirectionalLightShadow});b.HemisphereLight= function(a,c,e){b.Light.call(this,a,e);this.type="HemisphereLight";this.castShadow=void 0;this.position.set(0,1,0);this.updateMatrix();this.groundColor=new b.Color(c)};b.HemisphereLight.prototype=Object.assign(Object.create(b.Light.prototype),{constructor:b.HemisphereLight,copy:function(a){b.Light.prototype.copy.call(this,a);this.groundColor.copy(a.groundColor);return this}});b.PointLight=function(a,c,e,d){b.Light.call(this,a,c);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4* this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==e?e:0;this.decay=void 0!==d?d:1;this.shadow=new b.LightShadow(new b.PerspectiveCamera(90,1,.5,500))};b.PointLight.prototype=Object.assign(Object.create(b.Light.prototype),{constructor:b.PointLight,copy:function(a){b.Light.prototype.copy.call(this,a);this.distance=a.distance;this.decay=a.decay;this.shadow=a.shadow.clone();return this}});b.SpotLight=function(a,c,e,d,g,h){b.Light.call(this,a,c);this.type="SpotLight"; this.position.set(0,1,0);this.updateMatrix();this.target=new b.Object3D;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==e?e:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==g?g:0;this.decay=void 0!==h?h:1;this.shadow=new b.SpotLightShadow};b.SpotLight.prototype=Object.assign(Object.create(b.Light.prototype),{constructor:b.SpotLight,copy:function(a){b.Light.prototype.copy.call(this,a);this.distance= a.distance;this.angle=a.angle;this.penumbra=a.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});b.SpotLightShadow=function(){b.LightShadow.call(this,new b.PerspectiveCamera(50,1,.5,500))};b.SpotLightShadow.prototype=Object.assign(Object.create(b.LightShadow.prototype),{constructor:b.SpotLightShadow,update:function(a){var c=2*b.Math.RAD2DEG*a.angle,e=this.mapSize.width/this.mapSize.height;a=a.distance||500;var d=this.camera;if(c!==d.fov||e!==d.aspect|| a!==d.far)d.fov=c,d.aspect=e,d.far=a,d.updateProjectionMatrix()}});b.AudioLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager};b.AudioLoader.prototype={constructor:b.AudioLoader,load:function(a,c,e,d){var g=new b.XHRLoader(this.manager);g.setResponseType("arraybuffer");g.load(a,function(a){b.AudioContext.decodeAudioData(a,function(a){c(a)})},e,d)}};b.Cache={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]}, remove:function(a){delete this.files[a]},clear:function(){this.files={}}};b.Loader=function(){this.onLoadStart=function(){};this.onLoadProgress=function(){};this.onLoadComplete=function(){}};b.Loader.prototype={constructor:b.Loader,crossOrigin:void 0,extractUrlBase:function(a){a=a.split("/");if(1===a.length)return"./";a.pop();return a.join("/")+"/"},initMaterials:function(a,b,e){for(var d=[],g=0;g<a.length;++g)d[g]=this.createMaterial(a[g],b,e);return d},createMaterial:function(){var a,c,e;return function(d, g,h){function f(a,d,e,l,r){a=g+a;var k=b.Loader.Handlers.get(a);null!==k?a=k.load(a):(c.setCrossOrigin(h),a=c.load(a));void 0!==d&&(a.repeat.fromArray(d),1!==d[0]&&(a.wrapS=b.RepeatWrapping),1!==d[1]&&(a.wrapT=b.RepeatWrapping));void 0!==e&&a.offset.fromArray(e);void 0!==l&&("repeat"===l[0]&&(a.wrapS=b.RepeatWrapping),"mirror"===l[0]&&(a.wrapS=b.MirroredRepeatWrapping),"repeat"===l[1]&&(a.wrapT=b.RepeatWrapping),"mirror"===l[1]&&(a.wrapT=b.MirroredRepeatWrapping));void 0!==r&&(a.anisotropy=r);d=b.Math.generateUUID(); m[d]=a;return d}void 0===a&&(a=new b.Color);void 0===c&&(c=new b.TextureLoader);void 0===e&&(e=new b.MaterialLoader);var m={},r={uuid:b.Math.generateUUID(),type:"MeshLambertMaterial"},t;for(t in d){var k=d[t];switch(t){case "DbgColor":case "DbgIndex":case "opticalDensity":case "illumination":break;case "DbgName":r.name=k;break;case "blending":r.blending=b[k];break;case "colorAmbient":case "mapAmbient":console.warn("THREE.Loader.createMaterial:",t,"is no longer supported.");break;case "colorDiffuse":r.color= a.fromArray(k).getHex();break;case "colorSpecular":r.specular=a.fromArray(k).getHex();break;case "colorEmissive":r.emissive=a.fromArray(k).getHex();break;case "specularCoef":r.shininess=k;break;case "shading":"basic"===k.toLowerCase()&&(r.type="MeshBasicMaterial");"phong"===k.toLowerCase()&&(r.type="MeshPhongMaterial");break;case "mapDiffuse":r.map=f(k,d.mapDiffuseRepeat,d.mapDiffuseOffset,d.mapDiffuseWrap,d.mapDiffuseAnisotropy);break;case "mapDiffuseRepeat":case "mapDiffuseOffset":case "mapDiffuseWrap":case "mapDiffuseAnisotropy":break; case "mapLight":r.lightMap=f(k,d.mapLightRepeat,d.mapLightOffset,d.mapLightWrap,d.mapLightAnisotropy);break;case "mapLightRepeat":case "mapLightOffset":case "mapLightWrap":case "mapLightAnisotropy":break;case "mapAO":r.aoMap=f(k,d.mapAORepeat,d.mapAOOffset,d.mapAOWrap,d.mapAOAnisotropy);break;case "mapAORepeat":case "mapAOOffset":case "mapAOWrap":case "mapAOAnisotropy":break;case "mapBump":r.bumpMap=f(k,d.mapBumpRepeat,d.mapBumpOffset,d.mapBumpWrap,d.mapBumpAnisotropy);break;case "mapBumpScale":r.bumpScale= k;break;case "mapBumpRepeat":case "mapBumpOffset":case "mapBumpWrap":case "mapBumpAnisotropy":break;case "mapNormal":r.normalMap=f(k,d.mapNormalRepeat,d.mapNormalOffset,d.mapNormalWrap,d.mapNormalAnisotropy);break;case "mapNormalFactor":r.normalScale=[k,k];break;case "mapNormalRepeat":case "mapNormalOffset":case "mapNormalWrap":case "mapNormalAnisotropy":break;case "mapSpecular":r.specularMap=f(k,d.mapSpecularRepeat,d.mapSpecularOffset,d.mapSpecularWrap,d.mapSpecularAnisotropy);break;case "mapSpecularRepeat":case "mapSpecularOffset":case "mapSpecularWrap":case "mapSpecularAnisotropy":break; case "mapAlpha":r.alphaMap=f(k,d.mapAlphaRepeat,d.mapAlphaOffset,d.mapAlphaWrap,d.mapAlphaAnisotropy);break;case "mapAlphaRepeat":case "mapAlphaOffset":case "mapAlphaWrap":case "mapAlphaAnisotropy":break;case "flipSided":r.side=b.BackSide;break;case "doubleSided":r.side=b.DoubleSide;break;case "transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity");r.opacity=k;break;case "depthTest":case "depthWrite":case "colorWrite":case "opacity":case "reflectivity":case "transparent":case "visible":case "wireframe":r[t]= k;break;case "vertexColors":!0===k&&(r.vertexColors=b.VertexColors);"face"===k&&(r.vertexColors=b.FaceColors);break;default:console.error("THREE.Loader.createMaterial: Unsupported",t,k)}}"MeshBasicMaterial"===r.type&&delete r.emissive;"MeshPhongMaterial"!==r.type&&delete r.specular;1>r.opacity&&(r.transparent=!0);e.setTextures(m);return e.parse(r)}}()};b.Loader.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,e=0,d=b.length;e<d;e+=2){var g=b[e+ 1];if(b[e].test(a))return g}return null}};b.XHRLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager};b.XHRLoader.prototype={constructor:b.XHRLoader,load:function(a,c,e,d){void 0!==this.path&&(a=this.path+a);var g=this,f=b.Cache.get(a);if(void 0!==f)return c&&setTimeout(function(){c(f)},0),f;var l=new XMLHttpRequest;l.overrideMimeType("text/plain");l.open("GET",a,!0);l.addEventListener("load",function(e){var f=e.target.response;b.Cache.add(a,f);200===this.status?(c&&c(f),g.manager.itemEnd(a)): 0===this.status?(console.warn("THREE.XHRLoader: HTTP Status 0 received."),c&&c(f),g.manager.itemEnd(a)):(d&&d(e),g.manager.itemError(a))},!1);void 0!==e&&l.addEventListener("progress",function(a){e(a)},!1);l.addEventListener("error",function(b){d&&d(b);g.manager.itemError(a)},!1);void 0!==this.responseType&&(l.responseType=this.responseType);void 0!==this.withCredentials&&(l.withCredentials=this.withCredentials);l.send(null);g.manager.itemStart(a);return l},setPath:function(a){this.path=a},setResponseType:function(a){this.responseType= a},setWithCredentials:function(a){this.withCredentials=a}};b.FontLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager};b.FontLoader.prototype={constructor:b.FontLoader,load:function(a,c,e,d){var g=this;(new b.XHRLoader(this.manager)).load(a,function(a){var b;try{b=JSON.parse(a)}catch(d){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),b=JSON.parse(a.substring(65,a.length-2))}a=g.parse(b);c&&c(a)},e,d)},parse:function(a){return new b.Font(a)}}; b.ImageLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager};b.ImageLoader.prototype={constructor:b.ImageLoader,load:function(a,c,e,d){void 0!==this.path&&(a=this.path+a);var g=this,f=b.Cache.get(a);if(void 0!==f)return g.manager.itemStart(a),c?setTimeout(function(){c(f);g.manager.itemEnd(a)},0):g.manager.itemEnd(a),f;var l=document.createElement("img");l.addEventListener("load",function(d){b.Cache.add(a,this);c&&c(this);g.manager.itemEnd(a)},!1);void 0!==e&&l.addEventListener("progress", function(a){e(a)},!1);l.addEventListener("error",function(b){d&&d(b);g.manager.itemError(a)},!1);void 0!==this.crossOrigin&&(l.crossOrigin=this.crossOrigin);g.manager.itemStart(a);l.src=a;return l},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}};b.JSONLoader=function(a){"boolean"===typeof a&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),a=void 0);this.manager=void 0!==a?a:b.DefaultLoadingManager;this.withCredentials=!1}; b.JSONLoader.prototype={constructor:b.JSONLoader,get statusDomElement(){void 0===this._statusDomElement&&(this._statusDomElement=document.createElement("div"));console.warn("THREE.JSONLoader: .statusDomElement has been removed.");return this._statusDomElement},load:function(a,c,e,d){var g=this,f=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:b.Loader.prototype.extractUrlBase(a),l=new b.XHRLoader(this.manager);l.setWithCredentials(this.withCredentials);l.load(a,function(b){b= JSON.parse(b);var d=b.metadata;if(void 0!==d&&(d=d.type,void 0!==d)){if("object"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");return}if("scene"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}b=g.parse(b,f);c(b.geometry,b.materials)},e,d)},setTexturePath:function(a){this.texturePath=a},parse:function(a,c){var e=new b.Geometry,d=void 0!==a.scale?1/a.scale:1;(function(c){var d, f,m,r,k,w,u,q,v,p,n,B,A,C=a.faces;w=a.vertices;var G=a.normals,D=a.colors,H=0;if(void 0!==a.uvs){for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&H++;for(d=0;d<H;d++)e.faceVertexUvs[d]=[]}r=0;for(k=w.length;r<k;)d=new b.Vector3,d.x=w[r++]*c,d.y=w[r++]*c,d.z=w[r++]*c,e.vertices.push(d);r=0;for(k=C.length;r<k;)if(c=C[r++],v=c&1,m=c&2,d=c&8,u=c&16,p=c&32,w=c&64,c&=128,v){v=new b.Face3;v.a=C[r];v.b=C[r+1];v.c=C[r+3];n=new b.Face3;n.a=C[r+1];n.b=C[r+2];n.c=C[r+3];r+=4;m&&(m=C[r++],v.materialIndex=m,n.materialIndex= m);m=e.faces.length;if(d)for(d=0;d<H;d++)for(B=a.uvs[d],e.faceVertexUvs[d][m]=[],e.faceVertexUvs[d][m+1]=[],f=0;4>f;f++)q=C[r++],A=B[2*q],q=B[2*q+1],A=new b.Vector2(A,q),2!==f&&e.faceVertexUvs[d][m].push(A),0!==f&&e.faceVertexUvs[d][m+1].push(A);u&&(u=3*C[r++],v.normal.set(G[u++],G[u++],G[u]),n.normal.copy(v.normal));if(p)for(d=0;4>d;d++)u=3*C[r++],p=new b.Vector3(G[u++],G[u++],G[u]),2!==d&&v.vertexNormals.push(p),0!==d&&n.vertexNormals.push(p);w&&(w=C[r++],w=D[w],v.color.setHex(w),n.color.setHex(w)); if(c)for(d=0;4>d;d++)w=C[r++],w=D[w],2!==d&&v.vertexColors.push(new b.Color(w)),0!==d&&n.vertexColors.push(new b.Color(w));e.faces.push(v);e.faces.push(n)}else{v=new b.Face3;v.a=C[r++];v.b=C[r++];v.c=C[r++];m&&(m=C[r++],v.materialIndex=m);m=e.faces.length;if(d)for(d=0;d<H;d++)for(B=a.uvs[d],e.faceVertexUvs[d][m]=[],f=0;3>f;f++)q=C[r++],A=B[2*q],q=B[2*q+1],A=new b.Vector2(A,q),e.faceVertexUvs[d][m].push(A);u&&(u=3*C[r++],v.normal.set(G[u++],G[u++],G[u]));if(p)for(d=0;3>d;d++)u=3*C[r++],p=new b.Vector3(G[u++], G[u++],G[u]),v.vertexNormals.push(p);w&&(w=C[r++],v.color.setHex(D[w]));if(c)for(d=0;3>d;d++)w=C[r++],v.vertexColors.push(new b.Color(D[w]));e.faces.push(v)}})(d);(function(){var c=void 0!==a.influencesPerVertex?a.influencesPerVertex:2;if(a.skinWeights)for(var d=0,f=a.skinWeights.length;d<f;d+=c)e.skinWeights.push(new b.Vector4(a.skinWeights[d],1<c?a.skinWeights[d+1]:0,2<c?a.skinWeights[d+2]:0,3<c?a.skinWeights[d+3]:0));if(a.skinIndices)for(d=0,f=a.skinIndices.length;d<f;d+=c)e.skinIndices.push(new b.Vector4(a.skinIndices[d], 1<c?a.skinIndices[d+1]:0,2<c?a.skinIndices[d+2]:0,3<c?a.skinIndices[d+3]:0));e.bones=a.bones;e.bones&&0<e.bones.length&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")})();(function(c){if(void 0!==a.morphTargets)for(var d=0,f=a.morphTargets.length;d<f;d++){e.morphTargets[d]={};e.morphTargets[d].name= a.morphTargets[d].name;e.morphTargets[d].vertices=[];for(var m=e.morphTargets[d].vertices,r=a.morphTargets[d].vertices,k=0,p=r.length;k<p;k+=3){var u=new b.Vector3;u.x=r[k]*c;u.y=r[k+1]*c;u.z=r[k+2]*c;m.push(u)}}if(void 0!==a.morphColors&&0<a.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),c=e.faces,m=a.morphColors[0].colors,d=0,f=c.length;d<f;d++)c[d].color.fromArray(m,3*d)})(d);(function(){var c=[],d=[];void 0!==a.animation&& d.push(a.animation);void 0!==a.animations&&(a.animations.length?d=d.concat(a.animations):d.push(a.animations));for(var f=0;f<d.length;f++){var m=b.AnimationClip.parseAnimation(d[f],e.bones);m&&c.push(m)}e.morphTargets&&(d=b.AnimationClip.CreateClipsFromMorphTargetSequences(e.morphTargets,10),c=c.concat(d));0<c.length&&(e.animations=c)})();e.computeFaceNormals();e.computeBoundingSphere();if(void 0===a.materials||0===a.materials.length)return{geometry:e};d=b.Loader.prototype.initMaterials(a.materials, c,this.crossOrigin);return{geometry:e,materials:d}}};b.LoadingManager=function(a,b,e){var d=this,g=!1,f=0,l=0;this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=e;this.itemStart=function(a){l++;if(!1===g&&void 0!==d.onStart)d.onStart(a,f,l);g=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,l);if(f===l&&(g=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)}};b.DefaultLoadingManager=new b.LoadingManager;b.BufferGeometryLoader= function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager};b.BufferGeometryLoader.prototype={constructor:b.BufferGeometryLoader,load:function(a,c,e,d){var g=this;(new b.XHRLoader(g.manager)).load(a,function(a){c(g.parse(JSON.parse(a)))},e,d)},parse:function(a){var c=new b.BufferGeometry,e=a.data.index,d={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array, Float64Array:Float64Array};void 0!==e&&(e=new d[e.type](e.array),c.setIndex(new b.BufferAttribute(e,1)));var g=a.data.attributes,f;for(f in g){var l=g[f],e=new d[l.type](l.array);c.addAttribute(f,new b.BufferAttribute(e,l.itemSize,l.normalized))}d=a.data.groups||a.data.drawcalls||a.data.offsets;if(void 0!==d)for(f=0,e=d.length;f!==e;++f)g=d[f],c.addGroup(g.start,g.count,g.materialIndex);a=a.data.boundingSphere;void 0!==a&&(d=new b.Vector3,void 0!==a.center&&d.fromArray(a.center),c.boundingSphere= new b.Sphere(d,a.radius));return c}};b.MaterialLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager;this.textures={}};b.MaterialLoader.prototype={constructor:b.MaterialLoader,load:function(a,c,e,d){var g=this;(new b.XHRLoader(g.manager)).load(a,function(a){c(g.parse(JSON.parse(a)))},e,d)},setTextures:function(a){this.textures=a},getTexture:function(a){var b=this.textures;void 0===b[a]&&console.warn("THREE.MaterialLoader: Undefined texture",a);return b[a]},parse:function(a){var c=new b[a.type]; void 0!==a.uuid&&(c.uuid=a.uuid);void 0!==a.name&&(c.name=a.name);void 0!==a.color&&c.color.setHex(a.color);void 0!==a.roughness&&(c.roughness=a.roughness);void 0!==a.metalness&&(c.metalness=a.metalness);void 0!==a.emissive&&c.emissive.setHex(a.emissive);void 0!==a.specular&&c.specular.setHex(a.specular);void 0!==a.shininess&&(c.shininess=a.shininess);void 0!==a.uniforms&&(c.uniforms=a.uniforms);void 0!==a.vertexShader&&(c.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(c.fragmentShader= a.fragmentShader);void 0!==a.vertexColors&&(c.vertexColors=a.vertexColors);void 0!==a.shading&&(c.shading=a.shading);void 0!==a.blending&&(c.blending=a.blending);void 0!==a.side&&(c.side=a.side);void 0!==a.opacity&&(c.opacity=a.opacity);void 0!==a.transparent&&(c.transparent=a.transparent);void 0!==a.alphaTest&&(c.alphaTest=a.alphaTest);void 0!==a.depthTest&&(c.depthTest=a.depthTest);void 0!==a.depthWrite&&(c.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(c.colorWrite=a.colorWrite);void 0!==a.wireframe&& (c.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&(c.wireframeLinewidth=a.wireframeLinewidth);void 0!==a.size&&(c.size=a.size);void 0!==a.sizeAttenuation&&(c.sizeAttenuation=a.sizeAttenuation);void 0!==a.map&&(c.map=this.getTexture(a.map));void 0!==a.alphaMap&&(c.alphaMap=this.getTexture(a.alphaMap),c.transparent=!0);void 0!==a.bumpMap&&(c.bumpMap=this.getTexture(a.bumpMap));void 0!==a.bumpScale&&(c.bumpScale=a.bumpScale);void 0!==a.normalMap&&(c.normalMap=this.getTexture(a.normalMap));if(void 0!== a.normalScale){var e=a.normalScale;!1===Array.isArray(e)&&(e=[e,e]);c.normalScale=(new b.Vector2).fromArray(e)}void 0!==a.displacementMap&&(c.displacementMap=this.getTexture(a.displacementMap));void 0!==a.displacementScale&&(c.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(c.displacementBias=a.displacementBias);void 0!==a.roughnessMap&&(c.roughnessMap=this.getTexture(a.roughnessMap));void 0!==a.metalnessMap&&(c.metalnessMap=this.getTexture(a.metalnessMap));void 0!==a.emissiveMap&& (c.emissiveMap=this.getTexture(a.emissiveMap));void 0!==a.emissiveIntensity&&(c.emissiveIntensity=a.emissiveIntensity);void 0!==a.specularMap&&(c.specularMap=this.getTexture(a.specularMap));void 0!==a.envMap&&(c.envMap=this.getTexture(a.envMap),c.combine=b.MultiplyOperation);a.reflectivity&&(c.reflectivity=a.reflectivity);void 0!==a.lightMap&&(c.lightMap=this.getTexture(a.lightMap));void 0!==a.lightMapIntensity&&(c.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(c.aoMap=this.getTexture(a.aoMap)); void 0!==a.aoMapIntensity&&(c.aoMapIntensity=a.aoMapIntensity);if(void 0!==a.materials)for(var e=0,d=a.materials.length;e<d;e++)c.materials.push(this.parse(a.materials[e]));return c}};b.ObjectLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager;this.texturePath=""};b.ObjectLoader.prototype={constructor:b.ObjectLoader,load:function(a,c,e,d){""===this.texturePath&&(this.texturePath=a.substring(0,a.lastIndexOf("/")+1));var g=this;(new b.XHRLoader(g.manager)).load(a,function(a){g.parse(JSON.parse(a), c)},e,d)},setTexturePath:function(a){this.texturePath=a},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a,b){var e=this.parseGeometries(a.geometries),d=this.parseImages(a.images,function(){void 0!==b&&b(g)}),d=this.parseTextures(a.textures,d),d=this.parseMaterials(a.materials,d),g=this.parseObject(a.object,e,d);a.animations&&(g.animations=this.parseAnimations(a.animations));void 0!==a.images&&0!==a.images.length||void 0===b||b(g);return g},parseGeometries:function(a){var c={};if(void 0!== a)for(var e=new b.JSONLoader,d=new b.BufferGeometryLoader,g=0,f=a.length;g<f;g++){var l,m=a[g];switch(m.type){case "PlaneGeometry":case "PlaneBufferGeometry":l=new b[m.type](m.width,m.height,m.widthSegments,m.heightSegments);break;case "BoxGeometry":case "BoxBufferGeometry":case "CubeGeometry":l=new b[m.type](m.width,m.height,m.depth,m.widthSegments,m.heightSegments,m.depthSegments);break;case "CircleGeometry":case "CircleBufferGeometry":l=new b[m.type](m.radius,m.segments,m.thetaStart,m.thetaLength); break;case "CylinderGeometry":case "CylinderBufferGeometry":l=new b[m.type](m.radiusTop,m.radiusBottom,m.height,m.radialSegments,m.heightSegments,m.openEnded,m.thetaStart,m.thetaLength);break;case "ConeGeometry":case "ConeBufferGeometry":l=new b[m.type](m.radius,m.height,m.radialSegments,m.heightSegments,m.openEnded,m.thetaStart,m.thetaLength);break;case "SphereGeometry":case "SphereBufferGeometry":l=new b[m.type](m.radius,m.widthSegments,m.heightSegments,m.phiStart,m.phiLength,m.thetaStart,m.thetaLength); break;case "DodecahedronGeometry":case "IcosahedronGeometry":case "OctahedronGeometry":case "TetrahedronGeometry":l=new b[m.type](m.radius,m.detail);break;case "RingGeometry":case "RingBufferGeometry":l=new b[m.type](m.innerRadius,m.outerRadius,m.thetaSegments,m.phiSegments,m.thetaStart,m.thetaLength);break;case "TorusGeometry":case "TorusBufferGeometry":l=new b[m.type](m.radius,m.tube,m.radialSegments,m.tubularSegments,m.arc);break;case "TorusKnotGeometry":case "TorusKnotBufferGeometry":l=new b[m.type](m.radius, m.tube,m.tubularSegments,m.radialSegments,m.p,m.q);break;case "LatheGeometry":case "LatheBufferGeometry":l=new b[m.type](m.points,m.segments,m.phiStart,m.phiLength);break;case "BufferGeometry":l=d.parse(m);break;case "Geometry":l=e.parse(m.data,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+m.type+'"');continue}l.uuid=m.uuid;void 0!==m.name&&(l.name=m.name);c[m.uuid]=l}return c},parseMaterials:function(a,c){var e={};if(void 0!==a){var d=new b.MaterialLoader; d.setTextures(c);for(var g=0,f=a.length;g<f;g++){var l=d.parse(a[g]);e[l.uuid]=l}}return e},parseAnimations:function(a){for(var c=[],e=0;e<a.length;e++){var d=b.AnimationClip.parse(a[e]);c.push(d)}return c},parseImages:function(a,c){function e(a){d.manager.itemStart(a);return l.load(a,function(){d.manager.itemEnd(a)})}var d=this,g={};if(void 0!==a&&0<a.length){var f=new b.LoadingManager(c),l=new b.ImageLoader(f);l.setCrossOrigin(this.crossOrigin);for(var f=0,m=a.length;f<m;f++){var r=a[f],k=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(r.url)? r.url:d.texturePath+r.url;g[r.uuid]=e(k)}}return g},parseTextures:function(a,c){function e(a){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a);return b[a]}var d={};if(void 0!==a)for(var g=0,f=a.length;g<f;g++){var l=a[g];void 0===l.image&&console.warn('THREE.ObjectLoader: No "image" specified for',l.uuid);void 0===c[l.image]&&console.warn("THREE.ObjectLoader: Undefined image",l.image);var m=new b.Texture(c[l.image]);m.needsUpdate= !0;m.uuid=l.uuid;void 0!==l.name&&(m.name=l.name);void 0!==l.mapping&&(m.mapping=e(l.mapping));void 0!==l.offset&&(m.offset=new b.Vector2(l.offset[0],l.offset[1]));void 0!==l.repeat&&(m.repeat=new b.Vector2(l.repeat[0],l.repeat[1]));void 0!==l.minFilter&&(m.minFilter=e(l.minFilter));void 0!==l.magFilter&&(m.magFilter=e(l.magFilter));void 0!==l.anisotropy&&(m.anisotropy=l.anisotropy);Array.isArray(l.wrap)&&(m.wrapS=e(l.wrap[0]),m.wrapT=e(l.wrap[1]));d[l.uuid]=m}return d},parseObject:function(){var a= new b.Matrix4;return function(c,e,d){function g(a){void 0===e[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return e[a]}function f(a){if(void 0!==a)return void 0===d[a]&&console.warn("THREE.ObjectLoader: Undefined material",a),d[a]}var l;switch(c.type){case "Scene":l=new b.Scene;break;case "PerspectiveCamera":l=new b.PerspectiveCamera(c.fov,c.aspect,c.near,c.far);void 0!==c.focus&&(l.focus=c.focus);void 0!==c.zoom&&(l.zoom=c.zoom);void 0!==c.filmGauge&&(l.filmGauge=c.filmGauge);void 0!== c.filmOffset&&(l.filmOffset=c.filmOffset);void 0!==c.view&&(l.view=Object.assign({},c.view));break;case "OrthographicCamera":l=new b.OrthographicCamera(c.left,c.right,c.top,c.bottom,c.near,c.far);break;case "AmbientLight":l=new b.AmbientLight(c.color,c.intensity);break;case "DirectionalLight":l=new b.DirectionalLight(c.color,c.intensity);break;case "PointLight":l=new b.PointLight(c.color,c.intensity,c.distance,c.decay);break;case "SpotLight":l=new b.SpotLight(c.color,c.intensity,c.distance,c.angle, c.penumbra,c.decay);break;case "HemisphereLight":l=new b.HemisphereLight(c.color,c.groundColor,c.intensity);break;case "Mesh":l=g(c.geometry);var m=f(c.material);l=l.bones&&0<l.bones.length?new b.SkinnedMesh(l,m):new b.Mesh(l,m);break;case "LOD":l=new b.LOD;break;case "Line":l=new b.Line(g(c.geometry),f(c.material),c.mode);break;case "PointCloud":case "Points":l=new b.Points(g(c.geometry),f(c.material));break;case "Sprite":l=new b.Sprite(f(c.material));break;case "Group":l=new b.Group;break;default:l= new b.Object3D}l.uuid=c.uuid;void 0!==c.name&&(l.name=c.name);void 0!==c.matrix?(a.fromArray(c.matrix),a.decompose(l.position,l.quaternion,l.scale)):(void 0!==c.position&&l.position.fromArray(c.position),void 0!==c.rotation&&l.rotation.fromArray(c.rotation),void 0!==c.scale&&l.scale.fromArray(c.scale));void 0!==c.castShadow&&(l.castShadow=c.castShadow);void 0!==c.receiveShadow&&(l.receiveShadow=c.receiveShadow);void 0!==c.visible&&(l.visible=c.visible);void 0!==c.userData&&(l.userData=c.userData); if(void 0!==c.children)for(var r in c.children)l.add(this.parseObject(c.children[r],e,d));if("LOD"===c.type)for(c=c.levels,m=0;m<c.length;m++){var k=c[m];r=l.getObjectByProperty("uuid",k.object);void 0!==r&&l.addLevel(r,k.distance)}return l}}()};b.TextureLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager};b.TextureLoader.prototype={constructor:b.TextureLoader,load:function(a,c,e,d){var g=new b.Texture,f=new b.ImageLoader(this.manager);f.setCrossOrigin(this.crossOrigin);f.setPath(this.path); f.load(a,function(a){g.image=a;g.needsUpdate=!0;void 0!==c&&c(g)},e,d);return g},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}};b.CubeTextureLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager};b.CubeTextureLoader.prototype={constructor:b.CubeTextureLoader,load:function(a,c,e,d){function g(b){l.load(a[b],function(a){f.images[b]=a;m++;6===m&&(f.needsUpdate=!0,c&&c(f))},void 0,d)}var f=new b.CubeTexture,l=new b.ImageLoader(this.manager);l.setCrossOrigin(this.crossOrigin); l.setPath(this.path);var m=0;for(e=0;e<a.length;++e)g(e);return f},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}};b.DataTextureLoader=b.BinaryTextureLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager;this._parser=null};b.BinaryTextureLoader.prototype={constructor:b.BinaryTextureLoader,load:function(a,c,e,d){var g=this,f=new b.DataTexture,l=new b.XHRLoader(this.manager);l.setResponseType("arraybuffer");l.load(a,function(a){if(a=g._parser(a))void 0!== a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:b.ClampToEdgeWrapping,f.wrapT=void 0!==a.wrapT?a.wrapT:b.ClampToEdgeWrapping,f.magFilter=void 0!==a.magFilter?a.magFilter:b.LinearFilter,f.minFilter=void 0!==a.minFilter?a.minFilter:b.LinearMipMapLinearFilter,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps= a.mipmaps),1===a.mipmapCount&&(f.minFilter=b.LinearFilter),f.needsUpdate=!0,c&&c(f,a)},e,d);return f}};b.CompressedTextureLoader=function(a){this.manager=void 0!==a?a:b.DefaultLoadingManager;this._parser=null};b.CompressedTextureLoader.prototype={constructor:b.CompressedTextureLoader,load:function(a,c,e,d){function g(g){r.load(a[g],function(a){a=f._parser(a,!0);l[g]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};k+=1;6===k&&(1===a.mipmapCount&&(m.minFilter=b.LinearFilter),m.format= a.format,m.needsUpdate=!0,c&&c(m))},e,d)}var f=this,l=[],m=new b.CompressedTexture;m.image=l;var r=new b.XHRLoader(this.manager);r.setPath(this.path);r.setResponseType("arraybuffer");if(Array.isArray(a))for(var k=0,p=0,u=a.length;p<u;++p)g(p);else r.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var d=a.mipmaps.length/a.mipmapCount,e=0;e<d;e++){l[e]={mipmaps:[]};for(var g=0;g<a.mipmapCount;g++)l[e].mipmaps.push(a.mipmaps[e*a.mipmapCount+g]),l[e].format=a.format,l[e].width=a.width,l[e].height= a.height}else m.image.width=a.width,m.image.height=a.height,m.mipmaps=a.mipmaps;1===a.mipmapCount&&(m.minFilter=b.LinearFilter);m.format=a.format;m.needsUpdate=!0;c&&c(m)},e,d);return m},setPath:function(a){this.path=a}};b.Material=function(){Object.defineProperty(this,"id",{value:b.MaterialIdCount++});this.uuid=b.Math.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=b.NormalBlending;this.side=b.FrontSide;this.shading=b.SmoothShading;this.vertexColors=b.NoColors; this.opacity=1;this.transparent=!1;this.blendSrc=b.SrcAlphaFactor;this.blendDst=b.OneMinusSrcAlphaFactor;this.blendEquation=b.AddEquation;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=b.LessEqualDepth;this.depthWrite=this.depthTest=!0;this.clippingPlanes=null;this.clipShadows=!1;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.alphaTest=this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.premultipliedAlpha=!1;this.overdraw=0;this._needsUpdate= this.visible=!0};b.Material.prototype={constructor:b.Material,get needsUpdate(){return this._needsUpdate},set needsUpdate(a){!0===a&&this.update();this._needsUpdate=a},setValues:function(a){if(void 0!==a)for(var c in a){var e=a[c];if(void 0===e)console.warn("THREE.Material: '"+c+"' parameter is undefined.");else{var d=this[c];void 0===d?console.warn("THREE."+this.type+": '"+c+"' is not a property of this material."):d instanceof b.Color?d.set(e):d instanceof b.Vector3&&e instanceof b.Vector3?d.copy(e): this[c]="overdraw"===c?Number(e):e}}},toJSON:function(a){function c(a){var b=[],c;for(c in a){var d=a[c];delete d.metadata;b.push(d)}return b}var e=void 0===a;e&&(a={textures:{},images:{}});var d={metadata:{version:4.4,type:"Material",generator:"Material.toJSON"}};d.uuid=this.uuid;d.type=this.type;""!==this.name&&(d.name=this.name);this.color instanceof b.Color&&(d.color=this.color.getHex());.5!==this.roughness&&(d.roughness=this.roughness);.5!==this.metalness&&(d.metalness=this.metalness);this.emissive instanceof b.Color&&(d.emissive=this.emissive.getHex());this.specular instanceof b.Color&&(d.specular=this.specular.getHex());void 0!==this.shininess&&(d.shininess=this.shininess);this.map instanceof b.Texture&&(d.map=this.map.toJSON(a).uuid);this.alphaMap instanceof b.Texture&&(d.alphaMap=this.alphaMap.toJSON(a).uuid);this.lightMap instanceof b.Texture&&(d.lightMap=this.lightMap.toJSON(a).uuid);this.bumpMap instanceof b.Texture&&(d.bumpMap=this.bumpMap.toJSON(a).uuid,d.bumpScale=this.bumpScale);this.normalMap instanceof b.Texture&&(d.normalMap=this.normalMap.toJSON(a).uuid,d.normalScale=this.normalScale.toArray());this.displacementMap instanceof b.Texture&&(d.displacementMap=this.displacementMap.toJSON(a).uuid,d.displacementScale=this.displacementScale,d.displacementBias=this.displacementBias);this.roughnessMap instanceof b.Texture&&(d.roughnessMap=this.roughnessMap.toJSON(a).uuid);this.metalnessMap instanceof b.Texture&&(d.metalnessMap=this.metalnessMap.toJSON(a).uuid);this.emissiveMap instanceof b.Texture&&(d.emissiveMap= this.emissiveMap.toJSON(a).uuid);this.specularMap instanceof b.Texture&&(d.specularMap=this.specularMap.toJSON(a).uuid);this.envMap instanceof b.Texture&&(d.envMap=this.envMap.toJSON(a).uuid,d.reflectivity=this.reflectivity);void 0!==this.size&&(d.size=this.size);void 0!==this.sizeAttenuation&&(d.sizeAttenuation=this.sizeAttenuation);this.blending!==b.NormalBlending&&(d.blending=this.blending);this.shading!==b.SmoothShading&&(d.shading=this.shading);this.side!==b.FrontSide&&(d.side=this.side);this.vertexColors!== b.NoColors&&(d.vertexColors=this.vertexColors);1>this.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);0<this.alphaTest&&(d.alphaTest=this.alphaTest);!0===this.premultipliedAlpha&&(d.premultipliedAlpha=this.premultipliedAlpha);!0===this.wireframe&&(d.wireframe=this.wireframe);1<this.wireframeLinewidth&&(d.wireframeLinewidth=this.wireframeLinewidth);e&&(e=c(a.textures),a=c(a.images),0<e.length&&(d.textures=e),0<a.length&&(d.images=a));return d},clone:function(){return(new this.constructor).copy(this)}, copy:function(a){this.name=a.name;this.fog=a.fog;this.lights=a.lights;this.blending=a.blending;this.side=a.side;this.vertexColors=a.vertexColors;this.opacity=a.opacity;this.transparent=a.transparent;this.blendSrc=a.blendSrc;this.blendDst=a.blendDst;this.blendEquation=a.blendEquation;this.blendSrcAlpha=a.blendSrcAlpha;this.blendDstAlpha=a.blendDstAlpha;this.blendEquationAlpha=a.blendEquationAlpha;this.depthFunc=a.depthFunc;this.depthTest=a.depthTest;this.depthWrite=a.depthWrite;this.colorWrite=a.colorWrite; this.precision=a.precision;this.polygonOffset=a.polygonOffset;this.polygonOffsetFactor=a.polygonOffsetFactor;this.polygonOffsetUnits=a.polygonOffsetUnits;this.alphaTest=a.alphaTest;this.premultipliedAlpha=a.premultipliedAlpha;this.overdraw=a.overdraw;this.visible=a.visible;this.clipShadows=a.clipShadows;a=a.clippingPlanes;var b=null;if(null!==a)for(var e=a.length,b=Array(e),d=0;d!==e;++d)b[d]=a[d].clone();this.clippingPlanes=b;return this},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}}; Object.assign(b.Material.prototype,b.EventDispatcher.prototype);b.MaterialIdCount=0;b.LineBasicMaterial=function(a){b.Material.call(this);this.type="LineBasicMaterial";this.color=new b.Color(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.lights=!1;this.setValues(a)};b.LineBasicMaterial.prototype=Object.create(b.Material.prototype);b.LineBasicMaterial.prototype.constructor=b.LineBasicMaterial;b.LineBasicMaterial.prototype.copy=function(a){b.Material.prototype.copy.call(this,a); this.color.copy(a.color);this.linewidth=a.linewidth;this.linecap=a.linecap;this.linejoin=a.linejoin;return this};b.LineDashedMaterial=function(a){b.Material.call(this);this.type="LineDashedMaterial";this.color=new b.Color(16777215);this.scale=this.linewidth=1;this.dashSize=3;this.gapSize=1;this.lights=!1;this.setValues(a)};b.LineDashedMaterial.prototype=Object.create(b.Material.prototype);b.LineDashedMaterial.prototype.constructor=b.LineDashedMaterial;b.LineDashedMaterial.prototype.copy=function(a){b.Material.prototype.copy.call(this, a);this.color.copy(a.color);this.linewidth=a.linewidth;this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};b.MeshBasicMaterial=function(a){b.Material.call(this);this.type="MeshBasicMaterial";this.color=new b.Color(16777215);this.aoMap=this.map=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=b.MultiplyOperation;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap= "round";this.lights=this.morphTargets=this.skinning=!1;this.setValues(a)};b.MeshBasicMaterial.prototype=Object.create(b.Material.prototype);b.MeshBasicMaterial.prototype.constructor=b.MeshBasicMaterial;b.MeshBasicMaterial.prototype.copy=function(a){b.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity= a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;return this};b.MeshDepthMaterial=function(a){b.Material.call(this);this.type="MeshDepthMaterial";this.depthPacking=b.BasicDepthPacking;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale= 1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.lights=this.fog=!1;this.setValues(a)};b.MeshDepthMaterial.prototype=Object.create(b.Material.prototype);b.MeshDepthMaterial.prototype.constructor=b.MeshDepthMaterial;b.MeshDepthMaterial.prototype.copy=function(a){b.Material.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale= a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};b.MeshLambertMaterial=function(a){b.Material.call(this);this.type="MeshLambertMaterial";this.color=new b.Color(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new b.Color(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=b.MultiplyOperation; this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)};b.MeshLambertMaterial.prototype=Object.create(b.Material.prototype);b.MeshLambertMaterial.prototype.constructor=b.MeshLambertMaterial;b.MeshLambertMaterial.prototype.copy=function(a){b.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap; this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin= a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};b.MeshNormalMaterial=function(a){b.Material.call(this,a);this.type="MeshNormalMaterial";this.wireframe=!1;this.wireframeLinewidth=1;this.morphTargets=this.lights=this.fog=!1;this.setValues(a)};b.MeshNormalMaterial.prototype=Object.create(b.Material.prototype);b.MeshNormalMaterial.prototype.constructor=b.MeshNormalMaterial;b.MeshNormalMaterial.prototype.copy=function(a){b.Material.prototype.copy.call(this, a);this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};b.MeshPhongMaterial=function(a){b.Material.call(this);this.type="MeshPhongMaterial";this.color=new b.Color(16777215);this.specular=new b.Color(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new b.Color(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalScale=new b.Vector2(1, 1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=b.MultiplyOperation;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)};b.MeshPhongMaterial.prototype=Object.create(b.Material.prototype);b.MeshPhongMaterial.prototype.constructor=b.MeshPhongMaterial; b.MeshPhongMaterial.prototype.copy=function(a){b.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale); this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets; this.morphNormals=a.morphNormals;return this};b.MeshStandardMaterial=function(a){b.Material.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new b.Color(16777215);this.metalness=this.roughness=.5;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new b.Color(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalScale=new b.Vector2(1,1);this.displacementMap= null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)};b.MeshStandardMaterial.prototype=Object.create(b.Material.prototype);b.MeshStandardMaterial.prototype.constructor=b.MeshStandardMaterial;b.MeshStandardMaterial.prototype.copy= function(a){b.Material.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale); this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets= a.morphTargets;this.morphNormals=a.morphNormals;return this};b.MeshPhysicalMaterial=function(a){b.MeshStandardMaterial.call(this);this.defines={PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.setValues(a)};b.MeshPhysicalMaterial.prototype=Object.create(b.MeshStandardMaterial.prototype);b.MeshPhysicalMaterial.prototype.constructor=b.MeshPhysicalMaterial;b.MeshPhysicalMaterial.prototype.copy=function(a){b.MeshStandardMaterial.prototype.copy.call(this,a);this.defines={PHYSICAL:""}; this.reflectivity=a.reflectivity;return this};b.MultiMaterial=function(a){this.uuid=b.Math.generateUUID();this.type="MultiMaterial";this.materials=a instanceof Array?a:[];this.visible=!0};b.MultiMaterial.prototype={constructor:b.MultiMaterial,toJSON:function(a){for(var b={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type,materials:[]},e=this.materials,d=0,g=e.length;d<g;d++){var f=e[d].toJSON(a);delete f.metadata;b.materials.push(f)}b.visible=this.visible; return b},clone:function(){for(var a=new this.constructor,b=0;b<this.materials.length;b++)a.materials.push(this.materials[b].clone());a.visible=this.visible;return a}};b.PointsMaterial=function(a){b.Material.call(this);this.type="PointsMaterial";this.color=new b.Color(16777215);this.map=null;this.size=1;this.sizeAttenuation=!0;this.lights=!1;this.setValues(a)};b.PointsMaterial.prototype=Object.create(b.Material.prototype);b.PointsMaterial.prototype.constructor=b.PointsMaterial;b.PointsMaterial.prototype.copy= function(a){b.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};b.ShaderMaterial=function(a){b.Material.call(this);this.type="ShaderMaterial";this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";this.linewidth=1;this.wireframe= !1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1;this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;void 0!==a&&(void 0!==a.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(a))};b.ShaderMaterial.prototype=Object.create(b.Material.prototype); b.ShaderMaterial.prototype.constructor=b.ShaderMaterial;b.ShaderMaterial.prototype.copy=function(a){b.Material.prototype.copy.call(this,a);this.fragmentShader=a.fragmentShader;this.vertexShader=a.vertexShader;this.uniforms=b.UniformsUtils.clone(a.uniforms);this.defines=a.defines;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.lights=a.lights;this.clipping=a.clipping;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.extensions= a.extensions;return this};b.ShaderMaterial.prototype.toJSON=function(a){a=b.Material.prototype.toJSON.call(this,a);a.uniforms=this.uniforms;a.vertexShader=this.vertexShader;a.fragmentShader=this.fragmentShader;return a};b.RawShaderMaterial=function(a){b.ShaderMaterial.call(this,a);this.type="RawShaderMaterial"};b.RawShaderMaterial.prototype=Object.create(b.ShaderMaterial.prototype);b.RawShaderMaterial.prototype.constructor=b.RawShaderMaterial;b.SpriteMaterial=function(a){b.Material.call(this);this.type= "SpriteMaterial";this.color=new b.Color(16777215);this.map=null;this.rotation=0;this.lights=this.fog=!1;this.setValues(a)};b.SpriteMaterial.prototype=Object.create(b.Material.prototype);b.SpriteMaterial.prototype.constructor=b.SpriteMaterial;b.SpriteMaterial.prototype.copy=function(a){b.Material.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.rotation=a.rotation;return this};b.ShadowMaterial=function(){b.ShaderMaterial.call(this,{uniforms:b.UniformsUtils.merge([b.UniformsLib.lights, {opacity:{value:1}}]),vertexShader:b.ShaderChunk.shadow_vert,fragmentShader:b.ShaderChunk.shadow_frag});this.transparent=this.lights=!0;Object.defineProperties(this,{opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(a){this.uniforms.opacity.value=a}}})};b.ShadowMaterial.prototype=Object.create(b.ShaderMaterial.prototype);b.ShadowMaterial.prototype.constructor=b.ShadowMaterial;b.Texture=function(a,c,e,d,g,f,l,m,r,k){Object.defineProperty(this,"id",{value:b.TextureIdCount++}); this.uuid=b.Math.generateUUID();this.sourceFile=this.name="";this.image=void 0!==a?a:b.Texture.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==c?c:b.Texture.DEFAULT_MAPPING;this.wrapS=void 0!==e?e:b.ClampToEdgeWrapping;this.wrapT=void 0!==d?d:b.ClampToEdgeWrapping;this.magFilter=void 0!==g?g:b.LinearFilter;this.minFilter=void 0!==f?f:b.LinearMipMapLinearFilter;this.anisotropy=void 0!==r?r:1;this.format=void 0!==l?l:b.RGBAFormat;this.type=void 0!==m?m:b.UnsignedByteType;this.offset=new b.Vector2(0, 0);this.repeat=new b.Vector2(1,1);this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==k?k:b.LinearEncoding;this.version=0;this.onUpdate=null};b.Texture.DEFAULT_IMAGE=void 0;b.Texture.DEFAULT_MAPPING=b.UVMapping;b.Texture.prototype={constructor:b.Texture,set needsUpdate(a){!0===a&&this.version++},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.image=a.image;this.mipmaps=a.mipmaps.slice(0);this.mapping=a.mapping; this.wrapS=a.wrapS;this.wrapT=a.wrapT;this.magFilter=a.magFilter;this.minFilter=a.minFilter;this.anisotropy=a.anisotropy;this.format=a.format;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=a.premultiplyAlpha;this.flipY=a.flipY;this.unpackAlignment=a.unpackAlignment;this.encoding=a.encoding;return this},toJSON:function(a){if(void 0!==a.textures[this.uuid])return a.textures[this.uuid];var c={metadata:{version:4.4,type:"Texture", generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy};if(void 0!==this.image){var e=this.image;void 0===e.uuid&&(e.uuid=b.Math.generateUUID());if(void 0===a.images[e.uuid]){var d=a.images,g=e.uuid,f=e.uuid,l;void 0!==e.toDataURL?l=e:(l=document.createElement("canvas"),l.width=e.width,l.height=e.height, l.getContext("2d").drawImage(e,0,0,e.width,e.height));l=2048<l.width||2048<l.height?l.toDataURL("image/jpeg",.6):l.toDataURL("image/png");d[g]={uuid:f,url:l}}c.image=e.uuid}return a.textures[this.uuid]=c},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(a){if(this.mapping===b.UVMapping){a.multiply(this.repeat);a.add(this.offset);if(0>a.x||1<a.x)switch(this.wrapS){case b.RepeatWrapping:a.x-=Math.floor(a.x);break;case b.ClampToEdgeWrapping:a.x=0>a.x?0:1;break;case b.MirroredRepeatWrapping:a.x= 1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1<a.y)switch(this.wrapT){case b.RepeatWrapping:a.y-=Math.floor(a.y);break;case b.ClampToEdgeWrapping:a.y=0>a.y?0:1;break;case b.MirroredRepeatWrapping:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y)}}};Object.assign(b.Texture.prototype,b.EventDispatcher.prototype);b.TextureIdCount=0;b.DepthTexture=function(a,c,e,d,g,f,l,m,r){b.Texture.call(this,null,d,g,f,l,m,b.DepthFormat, e,r);this.image={width:a,height:c};this.type=void 0!==e?e:b.UnsignedShortType;this.magFilter=void 0!==l?l:b.NearestFilter;this.minFilter=void 0!==m?m:b.NearestFilter;this.generateMipmaps=this.flipY=!1};b.DepthTexture.prototype=Object.create(b.Texture.prototype);b.DepthTexture.prototype.constructor=b.DepthTexture;b.CanvasTexture=function(a,c,e,d,g,f,l,m,r){b.Texture.call(this,a,c,e,d,g,f,l,m,r);this.needsUpdate=!0};b.CanvasTexture.prototype=Object.create(b.Texture.prototype);b.CanvasTexture.prototype.constructor= b.CanvasTexture;b.CubeTexture=function(a,c,e,d,g,f,l,m,r,k){a=void 0!==a?a:[];c=void 0!==c?c:b.CubeReflectionMapping;b.Texture.call(this,a,c,e,d,g,f,l,m,r,k);this.flipY=!1};b.CubeTexture.prototype=Object.create(b.Texture.prototype);b.CubeTexture.prototype.constructor=b.CubeTexture;Object.defineProperty(b.CubeTexture.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});b.CompressedTexture=function(a,c,e,d,g,f,l,m,r,k,p,u){b.Texture.call(this,null,f,l,m,r,k,d,g,p,u); this.image={width:c,height:e};this.mipmaps=a;this.generateMipmaps=this.flipY=!1};b.CompressedTexture.prototype=Object.create(b.Texture.prototype);b.CompressedTexture.prototype.constructor=b.CompressedTexture;b.DataTexture=function(a,c,e,d,g,f,l,m,r,k,p,u){b.Texture.call(this,null,f,l,m,r,k,d,g,p,u);this.image={data:a,width:c,height:e};this.magFilter=void 0!==r?r:b.NearestFilter;this.minFilter=void 0!==k?k:b.NearestFilter;this.generateMipmaps=this.flipY=!1};b.DataTexture.prototype=Object.create(b.Texture.prototype); b.DataTexture.prototype.constructor=b.DataTexture;b.VideoTexture=function(a,c,e,d,g,f,l,m,r){function k(){requestAnimationFrame(k);a.readyState>=a.HAVE_CURRENT_DATA&&(p.needsUpdate=!0)}b.Texture.call(this,a,c,e,d,g,f,l,m,r);this.generateMipmaps=!1;var p=this;k()};b.VideoTexture.prototype=Object.create(b.Texture.prototype);b.VideoTexture.prototype.constructor=b.VideoTexture;b.Group=function(){b.Object3D.call(this);this.type="Group"};b.Group.prototype=Object.assign(Object.create(b.Object3D.prototype), {constructor:b.Group});b.Points=function(a,c){b.Object3D.call(this);this.type="Points";this.geometry=void 0!==a?a:new b.BufferGeometry;this.material=void 0!==c?c:new b.PointsMaterial({color:16777215*Math.random()})};b.Points.prototype=Object.assign(Object.create(b.Object3D.prototype),{constructor:b.Points,raycast:function(){var a=new b.Matrix4,c=new b.Ray,e=new b.Sphere;return function(d,g){function f(a,b){var e=c.distanceSqToPoint(a);if(e<p){var h=c.closestPointToPoint(a);h.applyMatrix4(r);var m= d.ray.origin.distanceTo(h);m<d.near||m>d.far||g.push({distance:m,distanceToRay:Math.sqrt(e),point:h.clone(),index:b,face:null,object:l})}}var l=this,m=this.geometry,r=this.matrixWorld,k=d.params.Points.threshold;null===m.boundingSphere&&m.computeBoundingSphere();e.copy(m.boundingSphere);e.applyMatrix4(r);if(!1!==d.ray.intersectsSphere(e)){a.getInverse(r);c.copy(d.ray).applyMatrix4(a);var k=k/((this.scale.x+this.scale.y+this.scale.z)/3),p=k*k,k=new b.Vector3;if(m instanceof b.BufferGeometry){var u= m.index,m=m.attributes.position.array;if(null!==u)for(var q=u.array,u=0,v=q.length;u<v;u++){var n=q[u];k.fromArray(m,3*n);f(k,n)}else for(u=0,q=m.length/3;u<q;u++)k.fromArray(m,3*u),f(k,u)}else for(k=m.vertices,u=0,q=k.length;u<q;u++)f(k[u],u)}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});b.Line=function(a,c,e){if(1===e)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new b.LineSegments(a, c);b.Object3D.call(this);this.type="Line";this.geometry=void 0!==a?a:new b.BufferGeometry;this.material=void 0!==c?c:new b.LineBasicMaterial({color:16777215*Math.random()})};b.Line.prototype=Object.assign(Object.create(b.Object3D.prototype),{constructor:b.Line,raycast:function(){var a=new b.Matrix4,c=new b.Ray,e=new b.Sphere;return function(d,g){var f=d.linePrecision,f=f*f,l=this.geometry,m=this.matrixWorld;null===l.boundingSphere&&l.computeBoundingSphere();e.copy(l.boundingSphere);e.applyMatrix4(m); if(!1!==d.ray.intersectsSphere(e)){a.getInverse(m);c.copy(d.ray).applyMatrix4(a);var r=new b.Vector3,k=new b.Vector3,m=new b.Vector3,p=new b.Vector3,u=this instanceof b.LineSegments?2:1;if(l instanceof b.BufferGeometry){var q=l.index,v=l.attributes.position.array;if(null!==q)for(var q=q.array,l=0,n=q.length-1;l<n;l+=u){var z=q[l+1];r.fromArray(v,3*q[l]);k.fromArray(v,3*z);z=c.distanceSqToSegment(r,k,p,m);z>f||(p.applyMatrix4(this.matrixWorld),z=d.ray.origin.distanceTo(p),z<d.near||z>d.far||g.push({distance:z, point:m.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}else for(l=0,n=v.length/3-1;l<n;l+=u)r.fromArray(v,3*l),k.fromArray(v,3*l+3),z=c.distanceSqToSegment(r,k,p,m),z>f||(p.applyMatrix4(this.matrixWorld),z=d.ray.origin.distanceTo(p),z<d.near||z>d.far||g.push({distance:z,point:m.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}else if(l instanceof b.Geometry)for(r=l.vertices,k=r.length,l=0;l<k-1;l+=u)z=c.distanceSqToSegment(r[l], r[l+1],p,m),z>f||(p.applyMatrix4(this.matrixWorld),z=d.ray.origin.distanceTo(p),z<d.near||z>d.far||g.push({distance:z,point:m.clone().applyMatrix4(this.matrixWorld),index:l,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});b.LineSegments=function(a,c){b.Line.call(this,a,c);this.type="LineSegments"};b.LineSegments.prototype=Object.assign(Object.create(b.Line.prototype),{constructor:b.LineSegments});b.Mesh=function(a, c){b.Object3D.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new b.BufferGeometry;this.material=void 0!==c?c:new b.MeshBasicMaterial({color:16777215*Math.random()});this.drawMode=b.TrianglesDrawMode;this.updateMorphTargets()};b.Mesh.prototype=Object.assign(Object.create(b.Object3D.prototype),{constructor:b.Mesh,setDrawMode:function(a){this.drawMode=a},updateMorphTargets:function(){if(void 0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1;this.morphTargetInfluences= [];this.morphTargetDictionary={};for(var a=0,b=this.geometry.morphTargets.length;a<b;a++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[a].name]=a}},getMorphTargetIndexByName:function(a){if(void 0!==this.morphTargetDictionary[a])return this.morphTargetDictionary[a];console.warn("THREE.Mesh.getMorphTargetIndexByName: morph target "+a+" does not exist. Returning 0.");return 0},raycast:function(){function a(a,c,d,e,g,f,h){b.Triangle.barycoordFromPoint(a,c,d, e,z);g.multiplyScalar(z.x);f.multiplyScalar(z.y);h.multiplyScalar(z.z);g.add(f).add(h);return g.clone()}function c(a,c,d,e,g,f,h){var l=a.material;if(null===(l.side===b.BackSide?d.intersectTriangle(f,g,e,!0,h):d.intersectTriangle(e,g,f,l.side!==b.DoubleSide,h)))return null;A.copy(h);A.applyMatrix4(a.matrixWorld);d=c.ray.origin.distanceTo(A);return d<c.near||d>c.far?null:{distance:d,point:A.clone(),object:a}}function e(d,e,g,f,h,k,t,u){l.fromArray(f,3*k);m.fromArray(f,3*t);r.fromArray(f,3*u);if(d= c(d,e,g,l,m,r,B))h&&(q.fromArray(h,2*k),v.fromArray(h,2*t),n.fromArray(h,2*u),d.uv=a(B,l,m,r,q,v,n)),d.face=new b.Face3(k,t,u,b.Triangle.normal(l,m,r)),d.faceIndex=k;return d}var d=new b.Matrix4,g=new b.Ray,f=new b.Sphere,l=new b.Vector3,m=new b.Vector3,r=new b.Vector3,k=new b.Vector3,p=new b.Vector3,u=new b.Vector3,q=new b.Vector2,v=new b.Vector2,n=new b.Vector2,z=new b.Vector3,B=new b.Vector3,A=new b.Vector3;return function(A,z){var D=this.geometry,H=this.material,E=this.matrixWorld;if(void 0!== H&&(null===D.boundingSphere&&D.computeBoundingSphere(),f.copy(D.boundingSphere),f.applyMatrix4(E),!1!==A.ray.intersectsSphere(f)&&(d.getInverse(E),g.copy(A.ray).applyMatrix4(d),null===D.boundingBox||!1!==g.intersectsBox(D.boundingBox)))){var F,I;if(D instanceof b.BufferGeometry){var O,J,H=D.index,E=D.attributes,D=E.position.array;void 0!==E.uv&&(F=E.uv.array);if(null!==H)for(var E=H.array,K=0,T=E.length;K<T;K+=3){if(H=E[K],O=E[K+1],J=E[K+2],I=e(this,A,g,D,F,H,O,J))I.faceIndex=Math.floor(K/3),z.push(I)}else for(K= 0,T=D.length;K<T;K+=9)if(H=K/3,O=H+1,J=H+2,I=e(this,A,g,D,F,H,O,J))I.index=H,z.push(I)}else if(D instanceof b.Geometry){var U,S,E=H instanceof b.MultiMaterial,K=!0===E?H.materials:null,T=D.vertices;O=D.faces;J=D.faceVertexUvs[0];0<J.length&&(F=J);for(var L=0,P=O.length;L<P;L++){var Q=O[L];I=!0===E?K[Q.materialIndex]:H;if(void 0!==I){J=T[Q.a];U=T[Q.b];S=T[Q.c];if(!0===I.morphTargets){I=D.morphTargets;var M=this.morphTargetInfluences;l.set(0,0,0);m.set(0,0,0);r.set(0,0,0);for(var V=0,X=I.length;V<X;V++){var W= M[V];if(0!==W){var N=I[V].vertices;l.addScaledVector(k.subVectors(N[Q.a],J),W);m.addScaledVector(p.subVectors(N[Q.b],U),W);r.addScaledVector(u.subVectors(N[Q.c],S),W)}}l.add(J);m.add(U);r.add(S);J=l;U=m;S=r}if(I=c(this,A,g,J,U,S,B))F&&(M=F[L],q.copy(M[0]),v.copy(M[1]),n.copy(M[2]),I.uv=a(B,J,U,S,q,v,n)),I.face=Q,I.faceIndex=L,z.push(I)}}}}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});b.Bone=function(a){b.Object3D.call(this);this.type="Bone";this.skin= a};b.Bone.prototype=Object.assign(Object.create(b.Object3D.prototype),{constructor:b.Bone,copy:function(a){b.Object3D.prototype.copy.call(this,a);this.skin=a.skin;return this}});b.Skeleton=function(a,c,e){this.useVertexTexture=void 0!==e?e:!0;this.identityMatrix=new b.Matrix4;a=a||[];this.bones=a.slice(0);this.useVertexTexture?(a=Math.sqrt(4*this.bones.length),a=b.Math.nextPowerOfTwo(Math.ceil(a)),this.boneTextureHeight=this.boneTextureWidth=a=Math.max(a,4),this.boneMatrices=new Float32Array(this.boneTextureWidth* this.boneTextureHeight*4),this.boneTexture=new b.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,b.RGBAFormat,b.FloatType)):this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===c)this.calculateInverses();else if(this.bones.length===c.length)this.boneInverses=c.slice(0);else for(console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[],c=0,a=this.bones.length;c<a;c++)this.boneInverses.push(new b.Matrix4)};Object.assign(b.Skeleton.prototype, {calculateInverses:function(){this.boneInverses=[];for(var a=0,c=this.bones.length;a<c;a++){var e=new b.Matrix4;this.bones[a]&&e.getInverse(this.bones[a].matrixWorld);this.boneInverses.push(e)}},pose:function(){for(var a,b=0,e=this.bones.length;b<e;b++)(a=this.bones[b])&&a.matrixWorld.getInverse(this.boneInverses[b]);b=0;for(e=this.bones.length;b<e;b++)if(a=this.bones[b])a.parent?(a.matrix.getInverse(a.parent.matrixWorld),a.matrix.multiply(a.matrixWorld)):a.matrix.copy(a.matrixWorld),a.matrix.decompose(a.position, a.quaternion,a.scale)},update:function(){var a=new b.Matrix4;return function(){for(var b=0,e=this.bones.length;b<e;b++)a.multiplyMatrices(this.bones[b]?this.bones[b].matrixWorld:this.identityMatrix,this.boneInverses[b]),a.toArray(this.boneMatrices,16*b);this.useVertexTexture&&(this.boneTexture.needsUpdate=!0)}}(),clone:function(){return new b.Skeleton(this.bones,this.boneInverses,this.useVertexTexture)}});b.SkinnedMesh=function(a,c,e){b.Mesh.call(this,a,c);this.type="SkinnedMesh";this.bindMode="attached"; this.bindMatrix=new b.Matrix4;this.bindMatrixInverse=new b.Matrix4;a=[];if(this.geometry&&void 0!==this.geometry.bones){for(var d,g=0,f=this.geometry.bones.length;g<f;++g)d=this.geometry.bones[g],c=new b.Bone(this),a.push(c),c.name=d.name,c.position.fromArray(d.pos),c.quaternion.fromArray(d.rotq),void 0!==d.scl&&c.scale.fromArray(d.scl);g=0;for(f=this.geometry.bones.length;g<f;++g)d=this.geometry.bones[g],-1!==d.parent&&null!==d.parent&&void 0!==a[d.parent]?a[d.parent].add(a[g]):this.add(a[g])}this.normalizeSkinWeights(); this.updateMatrixWorld(!0);this.bind(new b.Skeleton(a,void 0,e),this.matrixWorld)};b.SkinnedMesh.prototype=Object.assign(Object.create(b.Mesh.prototype),{constructor:b.SkinnedMesh,bind:function(a,b){this.skeleton=a;void 0===b&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),b=this.matrixWorld);this.bindMatrix.copy(b);this.bindMatrixInverse.getInverse(b)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){if(this.geometry instanceof b.Geometry)for(var a=0;a<this.geometry.skinWeights.length;a++){var c= this.geometry.skinWeights[a],e=1/c.lengthManhattan();Infinity!==e?c.multiplyScalar(e):c.set(1,0,0,0)}else if(this.geometry instanceof b.BufferGeometry)for(var c=new b.Vector4,d=this.geometry.attributes.skinWeight,a=0;a<d.count;a++)c.x=d.getX(a),c.y=d.getY(a),c.z=d.getZ(a),c.w=d.getW(a),e=1/c.lengthManhattan(),Infinity!==e?c.multiplyScalar(e):c.set(1,0,0,0),d.setXYZW(a,c.x,c.y,c.z,c.w)},updateMatrixWorld:function(a){b.Mesh.prototype.updateMatrixWorld.call(this,!0);"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld): "detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh unrecognized bindMode: "+this.bindMode)},clone:function(){return(new this.constructor(this.geometry,this.material,this.useVertexTexture)).copy(this)}});b.LOD=function(){b.Object3D.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})};b.LOD.prototype=Object.assign(Object.create(b.Object3D.prototype),{constructor:b.LOD,copy:function(a){b.Object3D.prototype.copy.call(this, a,!1);a=a.levels;for(var c=0,e=a.length;c<e;c++){var d=a[c];this.addLevel(d.object.clone(),d.distance)}return this},addLevel:function(a,b){void 0===b&&(b=0);b=Math.abs(b);for(var e=this.levels,d=0;d<e.length&&!(b<e[d].distance);d++);e.splice(d,0,{distance:b,object:a});this.add(a)},getObjectForDistance:function(a){for(var b=this.levels,e=1,d=b.length;e<d&&!(a<b[e].distance);e++);return b[e-1].object},raycast:function(){var a=new b.Vector3;return function(b,e){a.setFromMatrixPosition(this.matrixWorld); var d=b.ray.origin.distanceTo(a);this.getObjectForDistance(d).raycast(b,e)}}(),update:function(){var a=new b.Vector3,c=new b.Vector3;return function(b){var d=this.levels;if(1<d.length){a.setFromMatrixPosition(b.matrixWorld);c.setFromMatrixPosition(this.matrixWorld);b=a.distanceTo(c);d[0].object.visible=!0;for(var g=1,f=d.length;g<f;g++)if(b>=d[g].distance)d[g-1].object.visible=!1,d[g].object.visible=!0;else break;for(;g<f;g++)d[g].object.visible=!1}}}(),toJSON:function(a){a=b.Object3D.prototype.toJSON.call(this, a);a.object.levels=[];for(var c=this.levels,e=0,d=c.length;e<d;e++){var g=c[e];a.object.levels.push({object:g.object.uuid,distance:g.distance})}return a}});b.Sprite=function(a){b.Object3D.call(this);this.type="Sprite";this.material=void 0!==a?a:new b.SpriteMaterial};b.Sprite.prototype=Object.assign(Object.create(b.Object3D.prototype),{constructor:b.Sprite,raycast:function(){var a=new b.Vector3;return function(b,e){a.setFromMatrixPosition(this.matrixWorld);var d=b.ray.distanceSqToPoint(a);d>this.scale.x* this.scale.y/4||e.push({distance:Math.sqrt(d),point:this.position,face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}});b.LensFlare=function(a,c,e,d,g){b.Object3D.call(this);this.lensFlares=[];this.positionScreen=new b.Vector3;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,c,e,d,g)};b.LensFlare.prototype=Object.assign(Object.create(b.Object3D.prototype),{constructor:b.LensFlare,copy:function(a){b.Object3D.prototype.copy.call(this,a);this.positionScreen.copy(a.positionScreen); this.customUpdateCallback=a.customUpdateCallback;for(var c=0,e=a.lensFlares.length;c<e;c++)this.lensFlares.push(a.lensFlares[c]);return this},add:function(a,c,e,d,g,f){void 0===c&&(c=-1);void 0===e&&(e=0);void 0===f&&(f=1);void 0===g&&(g=new b.Color(16777215));void 0===d&&(d=b.NormalBlending);e=Math.min(e,Math.max(0,e));this.lensFlares.push({texture:a,size:c,distance:e,x:0,y:0,z:0,scale:1,rotation:0,opacity:f,color:g,blending:d})},updateLensFlares:function(){var a,b=this.lensFlares.length,e,d=2*-this.positionScreen.x, g=2*-this.positionScreen.y;for(a=0;a<b;a++)e=this.lensFlares[a],e.x=this.positionScreen.x+d*e.distance,e.y=this.positionScreen.y+g*e.distance,e.wantedRotation=e.x*Math.PI*.25,e.rotation+=.25*(e.wantedRotation-e.rotation)}});b.Scene=function(){b.Object3D.call(this);this.type="Scene";this.overrideMaterial=this.fog=null;this.autoUpdate=!0};b.Scene.prototype=Object.create(b.Object3D.prototype);b.Scene.prototype.constructor=b.Scene;b.Scene.prototype.copy=function(a,c){b.Object3D.prototype.copy.call(this, a,c);null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this};b.Fog=function(a,c,e){this.name="";this.color=new b.Color(a);this.near=void 0!==c?c:1;this.far=void 0!==e?e:1E3};b.Fog.prototype.clone=function(){return new b.Fog(this.color.getHex(),this.near,this.far)};b.FogExp2=function(a,c){this.name="";this.color=new b.Color(a);this.density=void 0!==c?c:2.5E-4}; b.FogExp2.prototype.clone=function(){return new b.FogExp2(this.color.getHex(),this.density)};b.ShaderChunk={};b.ShaderChunk.alphamap_fragment="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n";b.ShaderChunk.alphamap_pars_fragment="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n";b.ShaderChunk.alphatest_fragment="#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n";b.ShaderChunk.aomap_fragment="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n"; b.ShaderChunk.aomap_pars_fragment="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif";b.ShaderChunk.begin_vertex="\nvec3 transformed = vec3( position );\n";b.ShaderChunk.beginnormal_vertex="\nvec3 objectNormal = vec3( normal );\n";b.ShaderChunk.bsdfs="bool testLightInRange( const in float lightDistance, const in float cutoffDistance ) {\n\treturn any( bvec2( cutoffDistance == 0.0, lightDistance < cutoffDistance ) );\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t\t}\n\t\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n"; b.ShaderChunk.bumpmap_pars_fragment="#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos );\n\t\tvec3 vSigmaY = dFdy( surf_pos );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n"; b.ShaderChunk.clipping_planes_fragment="#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n#endif\n";b.ShaderChunk.clipping_planes_pars_fragment="#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n";b.ShaderChunk.clipping_planes_pars_vertex= "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n";b.ShaderChunk.clipping_planes_vertex="#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n";b.ShaderChunk.color_fragment="#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif";b.ShaderChunk.color_pars_fragment="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n";b.ShaderChunk.color_pars_vertex="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif"; b.ShaderChunk.color_vertex="#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif";b.ShaderChunk.common="#define PI 3.14159265359\n#define PI2 6.28318530718\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\n"; b.ShaderChunk.cube_uv_reflection_fragment="#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n"; b.ShaderChunk.defaultnormal_vertex="#ifdef FLIP_SIDED\n\tobjectNormal = -objectNormal;\n#endif\nvec3 transformedNormal = normalMatrix * objectNormal;\n";b.ShaderChunk.displacementmap_vertex="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n";b.ShaderChunk.displacementmap_pars_vertex="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n"; b.ShaderChunk.emissivemap_fragment="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n";b.ShaderChunk.emissivemap_pars_fragment="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n";b.ShaderChunk.encodings_pars_fragment="\nvec4 LinearToLinear( in vec4 value ) {\n return value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n float maxComponent = max( max( value.r, value.g ), value.b );\n float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.x, max( value.g, value.b ) );\n float M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n M = ceil( M * 255.0 ) / 255.0;\n return vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.x, max( value.g, value.b ) );\n float D = max( maxRange / maxRGB, 1.0 );\n D = min( floor( D ) / 255.0, 1.0 );\n return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n vec4 vResult;\n vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n vResult.w = fract(Le);\n vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n return vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n float Le = value.z * 255.0 + value.w;\n vec3 Xp_Y_XYZp;\n Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n return vec4( max(vRGB, 0.0), 1.0 );\n}\n"; b.ShaderChunk.encodings_fragment=" gl_FragColor = linearToOutputTexel( gl_FragColor );\n";b.ShaderChunk.envmap_fragment="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#else\n\t\tfloat flipNormal = 1.0;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\tvec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n"; b.ShaderChunk.envmap_pars_fragment="#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntenstiy;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n"; b.ShaderChunk.envmap_pars_vertex="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n";b.ShaderChunk.envmap_vertex="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n"; b.ShaderChunk.fog_fragment="#ifdef USE_FOG\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t#else\n\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t#endif\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n";b.ShaderChunk.fog_pars_fragment= "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif";b.ShaderChunk.lightmap_fragment="#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n";b.ShaderChunk.lightmap_pars_fragment="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif";b.ShaderChunk.lights_lambert_vertex= "vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n"; b.ShaderChunk.lights_pars="uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tif ( testLightInRange( lightDistance, pointLight.distance ) ) {\n\t\t\tdirectLight.color = pointLight.color;\n\t\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( all( bvec2( angleCos > spotLight.coneCos, testLightInRange( lightDistance, spotLight.distance ) ) ) ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#else\n\t\t\tfloat flipNormal = 1.0;\n\t\t#endif\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#else\n\t\t\tfloat flipNormal = 1.0;\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n"; b.ShaderChunk.lights_phong_fragment="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n";b.ShaderChunk.lights_phong_pars_fragment="varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n"; b.ShaderChunk.lights_physical_fragment="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.16 * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#endif\n";b.ShaderChunk.lights_physical_pars_fragment="struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t#endif\n};\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectSpecular += radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n"; b.ShaderChunk.lights_template="\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t \tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\tRE_IndirectSpecular( radiance, geometry, material, reflectedLight );\n#endif\n"; b.ShaderChunk.logdepthbuf_fragment="#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif";b.ShaderChunk.logdepthbuf_pars_fragment="#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n";b.ShaderChunk.logdepthbuf_pars_vertex="#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif"; b.ShaderChunk.logdepthbuf_vertex="#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n";b.ShaderChunk.map_fragment="#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n";b.ShaderChunk.map_pars_fragment= "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n";b.ShaderChunk.map_particle_fragment="#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n";b.ShaderChunk.map_particle_pars_fragment="#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n";b.ShaderChunk.metalnessmap_fragment="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.r;\n#endif\n"; b.ShaderChunk.metalnessmap_pars_fragment="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif";b.ShaderChunk.morphnormal_vertex="#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n";b.ShaderChunk.morphtarget_pars_vertex= "#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif";b.ShaderChunk.morphtarget_vertex="#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n"; b.ShaderChunk.normal_fragment="#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) );\n\t#endif\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n"; b.ShaderChunk.normalmap_pars_fragment="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n"; b.ShaderChunk.packing="vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 1.0 - 2.0 * rgb.xyz;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthoDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat OrthoDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n"; b.ShaderChunk.premultiplied_alpha_fragment="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n";b.ShaderChunk.project_vertex="#ifdef USE_SKINNING\n\tvec4 mvPosition = modelViewMatrix * skinned;\n#else\n\tvec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n#endif\ngl_Position = projectionMatrix * mvPosition;\n";b.ShaderChunk.roughnessmap_fragment="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.r;\n#endif\n"; b.ShaderChunk.roughnessmap_pars_fragment="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif";b.ShaderChunk.shadowmap_pars_fragment="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn 1.0;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n"; b.ShaderChunk.shadowmap_pars_vertex="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n"; b.ShaderChunk.shadowmap_vertex="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n"; b.ShaderChunk.shadowmask_pars_fragment="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n"; b.ShaderChunk.skinbase_vertex="#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif";b.ShaderChunk.skinning_pars_vertex="#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureWidth;\n\t\tuniform int boneTextureHeight;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureWidth ) );\n\t\t\tfloat y = floor( j / float( boneTextureWidth ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureWidth );\n\t\t\tfloat dy = 1.0 / float( boneTextureHeight );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n"; b.ShaderChunk.skinning_vertex="#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\tskinned = bindMatrixInverse * skinned;\n#endif\n";b.ShaderChunk.skinnormal_vertex="#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n"; b.ShaderChunk.specularmap_fragment="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif";b.ShaderChunk.specularmap_pars_fragment="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";b.ShaderChunk.tonemapping_fragment="#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n";b.ShaderChunk.tonemapping_pars_fragment="#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n return toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n"; b.ShaderChunk.uv2_pars_fragment="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif";b.ShaderChunk.uv2_pars_vertex="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif";b.ShaderChunk.uv2_vertex="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif";b.ShaderChunk.uv_pars_fragment="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif"; b.ShaderChunk.uv_pars_vertex="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n";b.ShaderChunk.uv_vertex="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n#endif"; b.ShaderChunk.worldpos_vertex="#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\t#ifdef USE_SKINNING\n\t\tvec4 worldPosition = modelMatrix * skinned;\n\t#else\n\t\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\t#endif\n#endif\n";b.UniformsUtils={merge:function(a){for(var b={},e=0;e<a.length;e++){var d=this.clone(a[e]),g;for(g in d)b[g]=d[g]}return b},clone:function(a){var c={},e;for(e in a){c[e]={};for(var d in a[e]){var g= a[e][d];g instanceof b.Color||g instanceof b.Vector2||g instanceof b.Vector3||g instanceof b.Vector4||g instanceof b.Matrix3||g instanceof b.Matrix4||g instanceof b.Texture?c[e][d]=g.clone():Array.isArray(g)?c[e][d]=g.slice():c[e][d]=g}}return c}};b.UniformsLib={common:{diffuse:{type:"c",value:new b.Color(15658734)},opacity:{type:"1f",value:1},map:{type:"t",value:null},offsetRepeat:{type:"v4",value:new b.Vector4(0,0,1,1)},specularMap:{type:"t",value:null},alphaMap:{type:"t",value:null},envMap:{type:"t", value:null},flipEnvMap:{type:"1f",value:-1},reflectivity:{type:"1f",value:1},refractionRatio:{type:"1f",value:.98}},aomap:{aoMap:{type:"t",value:null},aoMapIntensity:{type:"1f",value:1}},lightmap:{lightMap:{type:"t",value:null},lightMapIntensity:{type:"1f",value:1}},emissivemap:{emissiveMap:{type:"t",value:null}},bumpmap:{bumpMap:{type:"t",value:null},bumpScale:{type:"1f",value:1}},normalmap:{normalMap:{type:"t",value:null},normalScale:{type:"v2",value:new b.Vector2(1,1)}},displacementmap:{displacementMap:{type:"t", value:null},displacementScale:{type:"1f",value:1},displacementBias:{type:"1f",value:0}},roughnessmap:{roughnessMap:{type:"t",value:null}},metalnessmap:{metalnessMap:{type:"t",value:null}},fog:{fogDensity:{type:"1f",value:2.5E-4},fogNear:{type:"1f",value:1},fogFar:{type:"1f",value:2E3},fogColor:{type:"c",value:new b.Color(16777215)}},lights:{ambientLightColor:{type:"3fv",value:[]},directionalLights:{type:"sa",value:[],properties:{direction:{type:"v3"},color:{type:"c"},shadow:{type:"1i"},shadowBias:{type:"1f"}, shadowRadius:{type:"1f"},shadowMapSize:{type:"v2"}}},directionalShadowMap:{type:"tv",value:[]},directionalShadowMatrix:{type:"m4v",value:[]},spotLights:{type:"sa",value:[],properties:{color:{type:"c"},position:{type:"v3"},direction:{type:"v3"},distance:{type:"1f"},coneCos:{type:"1f"},penumbraCos:{type:"1f"},decay:{type:"1f"},shadow:{type:"1i"},shadowBias:{type:"1f"},shadowRadius:{type:"1f"},shadowMapSize:{type:"v2"}}},spotShadowMap:{type:"tv",value:[]},spotShadowMatrix:{type:"m4v",value:[]},pointLights:{type:"sa", value:[],properties:{color:{type:"c"},position:{type:"v3"},decay:{type:"1f"},distance:{type:"1f"},shadow:{type:"1i"},shadowBias:{type:"1f"},shadowRadius:{type:"1f"},shadowMapSize:{type:"v2"}}},pointShadowMap:{type:"tv",value:[]},pointShadowMatrix:{type:"m4v",value:[]},hemisphereLights:{type:"sa",value:[],properties:{direction:{type:"v3"},skyColor:{type:"c"},groundColor:{type:"c"}}}},points:{diffuse:{type:"c",value:new b.Color(15658734)},opacity:{type:"1f",value:1},size:{type:"1f",value:1},scale:{type:"1f", value:1},map:{type:"t",value:null},offsetRepeat:{type:"v4",value:new b.Vector4(0,0,1,1)}}};b.ShaderChunk.cube_frag="uniform samplerCube tCube;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\t#include <logdepthbuf_fragment>\n}\n";b.ShaderChunk.cube_vert= "varying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n";b.ShaderChunk.depth_frag="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n"; b.ShaderChunk.depth_vert="#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n"; b.ShaderChunk.distanceRGBA_frag="uniform vec3 lightPos;\nvarying vec4 vWorldPosition;\n#include <common>\n#include <packing>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );\n}\n";b.ShaderChunk.distanceRGBA_vert="varying vec4 vWorldPosition;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition;\n}\n"; b.ShaderChunk.equirect_frag="uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <logdepthbuf_fragment>\n}\n"; b.ShaderChunk.equirect_vert="varying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n";b.ShaderChunk.linedashed_frag="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n"; b.ShaderChunk.linedashed_vert="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n"; b.ShaderChunk.meshbasic_frag="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight;\n\treflectedLight.directDiffuse = vec3( 0.0 );\n\treflectedLight.directSpecular = vec3( 0.0 );\n\treflectedLight.indirectDiffuse = diffuseColor.rgb;\n\treflectedLight.indirectSpecular = vec3( 0.0 );\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n"; b.ShaderChunk.meshbasic_vert="#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n}\n"; b.ShaderChunk.meshlambert_frag="uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n"; b.ShaderChunk.meshlambert_vert="#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n}\n"; b.ShaderChunk.meshphong_frag="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n"; b.ShaderChunk.meshphong_vert="#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n}\n"; b.ShaderChunk.meshphysical_frag="#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float envMapIntensity;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n"; b.ShaderChunk.meshphysical_vert="#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n"; b.ShaderChunk.normal_frag="uniform float opacity;\nvarying vec3 vNormal;\n#include <common>\n#include <packing>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = vec4( packNormalToRGB( vNormal ), opacity );\n\t#include <logdepthbuf_fragment>\n}\n";b.ShaderChunk.normal_vert="varying vec3 vNormal;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n"; b.ShaderChunk.points_frag="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n"; b.ShaderChunk.points_vert="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n"; b.ShaderChunk.shadow_frag="uniform float opacity;\n#include <common>\n#include <packing>\n#include <bsdfs>\n#include <lights_pars>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0 - getShadowMask() ) );\n}\n";b.ShaderChunk.shadow_vert="#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n}\n"; b.ShaderLib={basic:{uniforms:b.UniformsUtils.merge([b.UniformsLib.common,b.UniformsLib.aomap,b.UniformsLib.fog]),vertexShader:b.ShaderChunk.meshbasic_vert,fragmentShader:b.ShaderChunk.meshbasic_frag},lambert:{uniforms:b.UniformsUtils.merge([b.UniformsLib.common,b.UniformsLib.aomap,b.UniformsLib.lightmap,b.UniformsLib.emissivemap,b.UniformsLib.fog,b.UniformsLib.lights,{emissive:{type:"c",value:new b.Color(0)}}]),vertexShader:b.ShaderChunk.meshlambert_vert,fragmentShader:b.ShaderChunk.meshlambert_frag}, phong:{uniforms:b.UniformsUtils.merge([b.UniformsLib.common,b.UniformsLib.aomap,b.UniformsLib.lightmap,b.UniformsLib.emissivemap,b.UniformsLib.bumpmap,b.UniformsLib.normalmap,b.UniformsLib.displacementmap,b.UniformsLib.fog,b.UniformsLib.lights,{emissive:{type:"c",value:new b.Color(0)},specular:{type:"c",value:new b.Color(1118481)},shininess:{type:"1f",value:30}}]),vertexShader:b.ShaderChunk.meshphong_vert,fragmentShader:b.ShaderChunk.meshphong_frag},standard:{uniforms:b.UniformsUtils.merge([b.UniformsLib.common, b.UniformsLib.aomap,b.UniformsLib.lightmap,b.UniformsLib.emissivemap,b.UniformsLib.bumpmap,b.UniformsLib.normalmap,b.UniformsLib.displacementmap,b.UniformsLib.roughnessmap,b.UniformsLib.metalnessmap,b.UniformsLib.fog,b.UniformsLib.lights,{emissive:{type:"c",value:new b.Color(0)},roughness:{type:"1f",value:.5},metalness:{type:"1f",value:0},envMapIntensity:{type:"1f",value:1}}]),vertexShader:b.ShaderChunk.meshphysical_vert,fragmentShader:b.ShaderChunk.meshphysical_frag},points:{uniforms:b.UniformsUtils.merge([b.UniformsLib.points, b.UniformsLib.fog]),vertexShader:b.ShaderChunk.points_vert,fragmentShader:b.ShaderChunk.points_frag},dashed:{uniforms:b.UniformsUtils.merge([b.UniformsLib.common,b.UniformsLib.fog,{scale:{type:"1f",value:1},dashSize:{type:"1f",value:1},totalSize:{type:"1f",value:2}}]),vertexShader:b.ShaderChunk.linedashed_vert,fragmentShader:b.ShaderChunk.linedashed_frag},depth:{uniforms:b.UniformsUtils.merge([b.UniformsLib.common,b.UniformsLib.displacementmap]),vertexShader:b.ShaderChunk.depth_vert,fragmentShader:b.ShaderChunk.depth_frag}, normal:{uniforms:{opacity:{type:"1f",value:1}},vertexShader:b.ShaderChunk.normal_vert,fragmentShader:b.ShaderChunk.normal_frag},cube:{uniforms:{tCube:{type:"t",value:null},tFlip:{type:"1f",value:-1}},vertexShader:b.ShaderChunk.cube_vert,fragmentShader:b.ShaderChunk.cube_frag},equirect:{uniforms:{tEquirect:{type:"t",value:null},tFlip:{type:"1f",value:-1}},vertexShader:b.ShaderChunk.equirect_vert,fragmentShader:b.ShaderChunk.equirect_frag},distanceRGBA:{uniforms:{lightPos:{type:"v3",value:new b.Vector3}}, vertexShader:b.ShaderChunk.distanceRGBA_vert,fragmentShader:b.ShaderChunk.distanceRGBA_frag}};b.ShaderLib.physical={uniforms:b.UniformsUtils.merge([b.ShaderLib.standard.uniforms,{}]),vertexShader:b.ShaderChunk.meshphysical_vert,fragmentShader:b.ShaderChunk.meshphysical_frag};b.WebGLRenderer=function(a){function c(a,b,c,d){!0===P&&(a*=d,b*=d,c*=d);R.clearColor(a,b,c,d)}function e(){R.init();R.scissor(ya.copy(Ga).multiplyScalar(ia));R.viewport(ua.copy(va).multiplyScalar(ia));c(ha.r,ha.g,ha.b,qa)}function d(){oa= ka=null;ta="";fa=-1;R.reset()}function g(a){a.preventDefault();d();e();aa.clear()}function f(a){a=a.target;a.removeEventListener("dispose",f);a:{var b=aa.get(a);if(a.image&&b.__image__webglTextureCube)y.deleteTexture(b.__image__webglTextureCube);else{if(void 0===b.__webglInit)break a;y.deleteTexture(b.__webglTexture)}aa["delete"](a)}ra.textures--}function l(a){a=a.target;a.removeEventListener("dispose",l);var c=aa.get(a),d=aa.get(a.texture);if(a){void 0!==d.__webglTexture&&y.deleteTexture(d.__webglTexture); a.depthTexture&&a.depthTexture.dispose();if(a instanceof b.WebGLRenderTargetCube)for(d=0;6>d;d++)y.deleteFramebuffer(c.__webglFramebuffer[d]),c.__webglDepthbuffer&&y.deleteRenderbuffer(c.__webglDepthbuffer[d]);else y.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&y.deleteRenderbuffer(c.__webglDepthbuffer);aa["delete"](a.texture);aa["delete"](a)}ra.textures--}function m(a){a=a.target;a.removeEventListener("dispose",m);k(a);aa["delete"](a)}function k(a){var b=aa.get(a).program;a.program= void 0;void 0!==b&&wa.releaseProgram(b)}function t(a,b){return Math.abs(b[0])-Math.abs(a[0])}function p(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function u(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function q(a,b,c,d,e){var g;c.transparent?(d=W,g=++N):(d=V,g=++X);g=d[g];void 0!== g?(g.id=a.id,g.object=a,g.geometry=b,g.material=c,g.z=ea.z,g.group=e):(g={id:a.id,object:a,geometry:b,material:c,z:ea.z,group:e},d.push(g))}function v(a){if(!Ia.intersectsSphere(a))return!1;var b=la.numPlanes;if(0===b)return!0;var c=ca.clippingPlanes,d=a.center;a=-a.radius;var e=0;do if(c[e].distanceToPoint(d)<a)return!1;while(++e!==b);return!0}function n(a,c){if(!1!==a.visible){if(a.layers.test(c.layers))if(a instanceof b.Light)M.push(a);else if(a instanceof b.Sprite){var d;(d=!1===a.frustumCulled)|| (sa.center.set(0,0,0),sa.radius=.7071067811865476,sa.applyMatrix4(a.matrixWorld),d=!0===v(sa));d&&Z.push(a)}else if(a instanceof b.LensFlare)da.push(a);else if(a instanceof b.ImmediateRenderObject)!0===ca.sortObjects&&(ea.setFromMatrixPosition(a.matrixWorld),ea.applyProjection(Ca)),q(a,null,a.material,ea.z,null);else if(a instanceof b.Mesh||a instanceof b.Line||a instanceof b.Points)if(a instanceof b.SkinnedMesh&&a.skeleton.update(),(d=!1===a.frustumCulled)||(d=a.geometry,null===d.boundingSphere&& d.computeBoundingSphere(),sa.copy(d.boundingSphere).applyMatrix4(a.matrixWorld),d=!0===v(sa)),d){var e=a.material;if(!0===e.visible)if(!0===ca.sortObjects&&(ea.setFromMatrixPosition(a.matrixWorld),ea.applyProjection(Ca)),d=xa.update(a),e instanceof b.MultiMaterial)for(var g=d.groups,f=e.materials,e=0,h=g.length;e<h;e++){var l=g[e],m=f[l.materialIndex];!0===m.visible&&q(a,d,m,ea.z,l)}else q(a,d,e,ea.z,null)}d=a.children;e=0;for(h=d.length;e<h;e++)n(d[e],c)}}function z(a,c,d,e){for(var g=0,f=a.length;g< f;g++){var h=a[g],l=h.object,m=h.geometry,k=void 0===e?h.material:e,h=h.group;l.modelViewMatrix.multiplyMatrices(c.matrixWorldInverse,l.matrixWorld);l.normalMatrix.getNormalMatrix(l.modelViewMatrix);if(l instanceof b.ImmediateRenderObject){B(k);var r=A(c,d,k,l);ta="";l.render(function(a){ca.renderBufferImmediate(a,r,k)})}else ca.renderBufferDirect(c,d,m,k,l,h)}}function B(a){a.side!==b.DoubleSide?R.enable(y.CULL_FACE):R.disable(y.CULL_FACE);R.setFlipSided(a.side===b.BackSide);!0===a.transparent?R.setBlending(a.blending, a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha,a.premultipliedAlpha):R.setBlending(b.NoBlending);R.setDepthFunc(a.depthFunc);R.setDepthTest(a.depthTest);R.setDepthWrite(a.depthWrite);R.setColorWrite(a.colorWrite);R.setPolygonOffset(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)}function A(a,c,d,e){za=0;var g=aa.get(d);Da&&((Ha||a!==oa)&&la.setState(d.clippingPlanes,d.clipShadows,a,g,a===oa&&d.id===fa),void 0!==g.numClippingPlanes&&g.numClippingPlanes!== la.numPlanes&&(d.needsUpdate=!0));void 0===g.program&&(d.needsUpdate=!0);void 0!==g.lightsHash&&g.lightsHash!==Y.hash&&(d.needsUpdate=!0);if(d.needsUpdate){a:{var f=aa.get(d),h=wa.getParameters(d,Y,c,la.numPlanes,e),l=wa.getProgramCode(d,h),t=f.program,q=!0;if(void 0===t)d.addEventListener("dispose",m);else if(t.code!==l)k(d);else if(void 0!==h.shaderID)break a;else q=!1;q&&(h.shaderID?(t=b.ShaderLib[h.shaderID],f.__webglShader={name:d.type,uniforms:b.UniformsUtils.clone(t.uniforms),vertexShader:t.vertexShader, fragmentShader:t.fragmentShader}):f.__webglShader={name:d.type,uniforms:d.uniforms,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader},d.__webglShader=f.__webglShader,t=wa.acquireProgram(d,h,l),f.program=t,d.program=t);h=t.getAttributes();if(d.morphTargets)for(l=d.numSupportedMorphTargets=0;l<ca.maxMorphTargets;l++)0<=h["morphTarget"+l]&&d.numSupportedMorphTargets++;if(d.morphNormals)for(l=d.numSupportedMorphNormals=0;l<ca.maxMorphNormals;l++)0<=h["morphNormal"+l]&&d.numSupportedMorphNormals++; h=f.__webglShader.uniforms;(d instanceof b.ShaderMaterial||d instanceof b.RawShaderMaterial)&&!0!==d.clipping||(f.numClippingPlanes=la.numPlanes,h.clippingPlanes=la.uniform);d.lights&&(f.lightsHash=Y.hash,h.ambientLightColor.value=Y.ambient,h.directionalLights.value=Y.directional,h.spotLights.value=Y.spot,h.pointLights.value=Y.point,h.hemisphereLights.value=Y.hemi,h.directionalShadowMap.value=Y.directionalShadowMap,h.directionalShadowMatrix.value=Y.directionalShadowMatrix,h.spotShadowMap.value=Y.spotShadowMap, h.spotShadowMatrix.value=Y.spotShadowMatrix,h.pointShadowMap.value=Y.pointShadowMap,h.pointShadowMatrix.value=Y.pointShadowMatrix);l=f.program.getUniforms();l=b.WebGLUniforms.seqWithValue(l.seq,h);f.uniformsList=l;f.dynamicUniforms=b.WebGLUniforms.splitDynamic(l,h)}d.needsUpdate=!1}var u=!1,q=t=!1,f=g.program,l=f.getUniforms(),h=g.__webglShader.uniforms;f.id!==ka&&(y.useProgram(f.program),ka=f.id,q=t=u=!0);d.id!==fa&&(fa=d.id,t=!0);if(u||a!==oa){l.set(y,a,"projectionMatrix");ma.logarithmicDepthBuffer&& l.setValue(y,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));a!==oa&&(oa=a,q=t=!0);if(d instanceof b.ShaderMaterial||d instanceof b.MeshPhongMaterial||d instanceof b.MeshStandardMaterial||d.envMap)u=l.map.cameraPosition,void 0!==u&&u.setValue(y,ea.setFromMatrixPosition(a.matrixWorld));(d instanceof b.MeshPhongMaterial||d instanceof b.MeshLambertMaterial||d instanceof b.MeshBasicMaterial||d instanceof b.MeshStandardMaterial||d instanceof b.ShaderMaterial||d.skinning)&&l.setValue(y,"viewMatrix",a.matrixWorldInverse); l.set(y,ca,"toneMappingExposure");l.set(y,ca,"toneMappingWhitePoint")}d.skinning&&(l.setOptional(y,e,"bindMatrix"),l.setOptional(y,e,"bindMatrixInverse"),u=e.skeleton)&&(ma.floatVertexTextures&&u.useVertexTexture?(l.set(y,u,"boneTexture"),l.set(y,u,"boneTextureWidth"),l.set(y,u,"boneTextureHeight")):l.setOptional(y,u,"boneMatrices"));if(t){d.lights&&(t=q,h.ambientLightColor.needsUpdate=t,h.directionalLights.needsUpdate=t,h.pointLights.needsUpdate=t,h.spotLights.needsUpdate=t,h.hemisphereLights.needsUpdate= t);c&&d.fog&&(h.fogColor.value=c.color,c instanceof b.Fog?(h.fogNear.value=c.near,h.fogFar.value=c.far):c instanceof b.FogExp2&&(h.fogDensity.value=c.density));if(d instanceof b.MeshBasicMaterial||d instanceof b.MeshLambertMaterial||d instanceof b.MeshPhongMaterial||d instanceof b.MeshStandardMaterial||d instanceof b.MeshDepthMaterial){h.opacity.value=d.opacity;h.diffuse.value=d.color;d.emissive&&h.emissive.value.copy(d.emissive).multiplyScalar(d.emissiveIntensity);h.map.value=d.map;h.specularMap.value= d.specularMap;h.alphaMap.value=d.alphaMap;d.aoMap&&(h.aoMap.value=d.aoMap,h.aoMapIntensity.value=d.aoMapIntensity);var p;d.map?p=d.map:d.specularMap?p=d.specularMap:d.displacementMap?p=d.displacementMap:d.normalMap?p=d.normalMap:d.bumpMap?p=d.bumpMap:d.roughnessMap?p=d.roughnessMap:d.metalnessMap?p=d.metalnessMap:d.alphaMap?p=d.alphaMap:d.emissiveMap&&(p=d.emissiveMap);void 0!==p&&(p instanceof b.WebGLRenderTarget&&(p=p.texture),c=p.offset,p=p.repeat,h.offsetRepeat.value.set(c.x,c.y,p.x,p.y));h.envMap.value= d.envMap;h.flipEnvMap.value=d.envMap instanceof b.CubeTexture?-1:1;h.reflectivity.value=d.reflectivity;h.refractionRatio.value=d.refractionRatio}d instanceof b.LineBasicMaterial?(h.diffuse.value=d.color,h.opacity.value=d.opacity):d instanceof b.LineDashedMaterial?(h.diffuse.value=d.color,h.opacity.value=d.opacity,h.dashSize.value=d.dashSize,h.totalSize.value=d.dashSize+d.gapSize,h.scale.value=d.scale):d instanceof b.PointsMaterial?(h.diffuse.value=d.color,h.opacity.value=d.opacity,h.size.value=d.size* ia,h.scale.value=.5*J.clientHeight,h.map.value=d.map,null!==d.map&&(p=d.map.offset,d=d.map.repeat,h.offsetRepeat.value.set(p.x,p.y,d.x,d.y))):d instanceof b.MeshLambertMaterial?(d.lightMap&&(h.lightMap.value=d.lightMap,h.lightMapIntensity.value=d.lightMapIntensity),d.emissiveMap&&(h.emissiveMap.value=d.emissiveMap)):d instanceof b.MeshPhongMaterial?(h.specular.value=d.specular,h.shininess.value=Math.max(d.shininess,1E-4),d.lightMap&&(h.lightMap.value=d.lightMap,h.lightMapIntensity.value=d.lightMapIntensity), d.emissiveMap&&(h.emissiveMap.value=d.emissiveMap),d.bumpMap&&(h.bumpMap.value=d.bumpMap,h.bumpScale.value=d.bumpScale),d.normalMap&&(h.normalMap.value=d.normalMap,h.normalScale.value.copy(d.normalScale)),d.displacementMap&&(h.displacementMap.value=d.displacementMap,h.displacementScale.value=d.displacementScale,h.displacementBias.value=d.displacementBias)):d instanceof b.MeshPhysicalMaterial?C(h,d):d instanceof b.MeshStandardMaterial?C(h,d):d instanceof b.MeshDepthMaterial?d.displacementMap&&(h.displacementMap.value= d.displacementMap,h.displacementScale.value=d.displacementScale,h.displacementBias.value=d.displacementBias):d instanceof b.MeshNormalMaterial&&(h.opacity.value=d.opacity);b.WebGLUniforms.upload(y,g.uniformsList,h,ca)}l.set(y,e,"modelViewMatrix");l.set(y,e,"normalMatrix");l.setValue(y,"modelMatrix",e.matrixWorld);g=g.dynamicUniforms;null!==g&&(b.WebGLUniforms.evalDynamic(g,h,e,a),b.WebGLUniforms.upload(y,g,h,ca));return f}function C(a,b){a.roughness.value=b.roughness;a.metalness.value=b.metalness; b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale);b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale));b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale, a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}function G(a,c,d){d?(y.texParameteri(a,y.TEXTURE_WRAP_S,O(c.wrapS)),y.texParameteri(a,y.TEXTURE_WRAP_T,O(c.wrapT)),y.texParameteri(a,y.TEXTURE_MAG_FILTER,O(c.magFilter)),y.texParameteri(a,y.TEXTURE_MIN_FILTER,O(c.minFilter))):(y.texParameteri(a,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(a,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),c.wrapS===b.ClampToEdgeWrapping&&c.wrapT===b.ClampToEdgeWrapping||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.", c),y.texParameteri(a,y.TEXTURE_MAG_FILTER,I(c.magFilter)),y.texParameteri(a,y.TEXTURE_MIN_FILTER,I(c.minFilter)),c.minFilter!==b.NearestFilter&&c.minFilter!==b.LinearFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",c));!(d=ba.get("EXT_texture_filter_anisotropic"))||c.type===b.FloatType&&null===ba.get("OES_texture_float_linear")||c.type===b.HalfFloatType&&null===ba.get("OES_texture_half_float_linear")|| !(1<c.anisotropy||aa.get(c).__currentAnisotropy)||(y.texParameterf(a,d.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(c.anisotropy,ca.getMaxAnisotropy())),aa.get(c).__currentAnisotropy=c.anisotropy)}function D(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElement("canvas");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+ a.height+"). Resized to "+d.width+"x"+d.height,a);return d}return a}function H(a){return b.Math.isPowerOfTwo(a.width)&&b.Math.isPowerOfTwo(a.height)}function E(a,b,c,d){var e=O(b.texture.format),g=O(b.texture.type);R.texImage2D(d,0,e,b.width,b.height,0,e,g,null);y.bindFramebuffer(y.FRAMEBUFFER,a);y.framebufferTexture2D(y.FRAMEBUFFER,c,d,aa.get(b.texture).__webglTexture,0);y.bindFramebuffer(y.FRAMEBUFFER,null)}function F(a,b){y.bindRenderbuffer(y.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(y.renderbufferStorage(y.RENDERBUFFER, y.DEPTH_COMPONENT16,b.width,b.height),y.framebufferRenderbuffer(y.FRAMEBUFFER,y.DEPTH_ATTACHMENT,y.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(y.renderbufferStorage(y.RENDERBUFFER,y.DEPTH_STENCIL,b.width,b.height),y.framebufferRenderbuffer(y.FRAMEBUFFER,y.DEPTH_STENCIL_ATTACHMENT,y.RENDERBUFFER,a)):y.renderbufferStorage(y.RENDERBUFFER,y.RGBA4,b.width,b.height);y.bindRenderbuffer(y.RENDERBUFFER,null)}function I(a){return a===b.NearestFilter||a===b.NearestMipMapNearestFilter||a===b.NearestMipMapLinearFilter? y.NEAREST:y.LINEAR}function O(a){var c;if(a===b.RepeatWrapping)return y.REPEAT;if(a===b.ClampToEdgeWrapping)return y.CLAMP_TO_EDGE;if(a===b.MirroredRepeatWrapping)return y.MIRRORED_REPEAT;if(a===b.NearestFilter)return y.NEAREST;if(a===b.NearestMipMapNearestFilter)return y.NEAREST_MIPMAP_NEAREST;if(a===b.NearestMipMapLinearFilter)return y.NEAREST_MIPMAP_LINEAR;if(a===b.LinearFilter)return y.LINEAR;if(a===b.LinearMipMapNearestFilter)return y.LINEAR_MIPMAP_NEAREST;if(a===b.LinearMipMapLinearFilter)return y.LINEAR_MIPMAP_LINEAR; if(a===b.UnsignedByteType)return y.UNSIGNED_BYTE;if(a===b.UnsignedShort4444Type)return y.UNSIGNED_SHORT_4_4_4_4;if(a===b.UnsignedShort5551Type)return y.UNSIGNED_SHORT_5_5_5_1;if(a===b.UnsignedShort565Type)return y.UNSIGNED_SHORT_5_6_5;if(a===b.ByteType)return y.BYTE;if(a===b.ShortType)return y.SHORT;if(a===b.UnsignedShortType)return y.UNSIGNED_SHORT;if(a===b.IntType)return y.INT;if(a===b.UnsignedIntType)return y.UNSIGNED_INT;if(a===b.FloatType)return y.FLOAT;c=ba.get("OES_texture_half_float");if(null!== c&&a===b.HalfFloatType)return c.HALF_FLOAT_OES;if(a===b.AlphaFormat)return y.ALPHA;if(a===b.RGBFormat)return y.RGB;if(a===b.RGBAFormat)return y.RGBA;if(a===b.LuminanceFormat)return y.LUMINANCE;if(a===b.LuminanceAlphaFormat)return y.LUMINANCE_ALPHA;if(a===b.DepthFormat)return y.DEPTH_COMPONENT;if(a===b.AddEquation)return y.FUNC_ADD;if(a===b.SubtractEquation)return y.FUNC_SUBTRACT;if(a===b.ReverseSubtractEquation)return y.FUNC_REVERSE_SUBTRACT;if(a===b.ZeroFactor)return y.ZERO;if(a===b.OneFactor)return y.ONE; if(a===b.SrcColorFactor)return y.SRC_COLOR;if(a===b.OneMinusSrcColorFactor)return y.ONE_MINUS_SRC_COLOR;if(a===b.SrcAlphaFactor)return y.SRC_ALPHA;if(a===b.OneMinusSrcAlphaFactor)return y.ONE_MINUS_SRC_ALPHA;if(a===b.DstAlphaFactor)return y.DST_ALPHA;if(a===b.OneMinusDstAlphaFactor)return y.ONE_MINUS_DST_ALPHA;if(a===b.DstColorFactor)return y.DST_COLOR;if(a===b.OneMinusDstColorFactor)return y.ONE_MINUS_DST_COLOR;if(a===b.SrcAlphaSaturateFactor)return y.SRC_ALPHA_SATURATE;c=ba.get("WEBGL_compressed_texture_s3tc"); if(null!==c){if(a===b.RGB_S3TC_DXT1_Format)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===b.RGBA_S3TC_DXT1_Format)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===b.RGBA_S3TC_DXT3_Format)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===b.RGBA_S3TC_DXT5_Format)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}c=ba.get("WEBGL_compressed_texture_pvrtc");if(null!==c){if(a===b.RGB_PVRTC_4BPPV1_Format)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===b.RGB_PVRTC_2BPPV1_Format)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a=== b.RGBA_PVRTC_4BPPV1_Format)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===b.RGBA_PVRTC_2BPPV1_Format)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}c=ba.get("WEBGL_compressed_texture_etc1");if(null!==c&&a===b.RGB_ETC1_Format)return c.COMPRESSED_RGB_ETC1_WEBGL;c=ba.get("EXT_blend_minmax");if(null!==c){if(a===b.MinEquation)return c.MIN_EXT;if(a===b.MaxEquation)return c.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",b.REVISION);a=a||{};var J=void 0!==a.canvas?a.canvas:document.createElement("canvas"), K=void 0!==a.context?a.context:null,T=void 0!==a.alpha?a.alpha:!1,U=void 0!==a.depth?a.depth:!0,S=void 0!==a.stencil?a.stencil:!0,L=void 0!==a.antialias?a.antialias:!1,P=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,Q=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,M=[],V=[],X=-1,W=[],N=-1,ga=new Float32Array(8),Z=[],da=[];this.domElement=J;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[]; this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMapping=b.LinearToneMapping;this.toneMappingWhitePoint=this.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;this.autoScaleCubemaps=!0;var ca=this,ka=null,na=null,ja=null,fa=-1,ta="",oa=null,ya=new b.Vector4,Fa=null,ua=new b.Vector4,za=0,ha=new b.Color(0),qa=0,Aa=J.width,Ba=J.height,ia=1,Ga=new b.Vector4(0,0,Aa,Ba),Ja=!1,va=new b.Vector4(0,0,Aa,Ba),Ia=new b.Frustum, la=new b.WebGLClipping,Da=!1,Ha=!1,sa=new b.Sphere,Ca=new b.Matrix4,ea=new b.Vector3,Y={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},ra={geometries:0,textures:0},pa={calls:0,vertices:0,faces:0,points:0};this.info={render:pa,memory:ra,programs:null};var y;try{T={alpha:T,depth:U,stencil:S,antialias:L,premultipliedAlpha:P,preserveDrawingBuffer:Q}; y=K||J.getContext("webgl",T)||J.getContext("experimental-webgl",T);if(null===y){if(null!==J.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}void 0===y.getShaderPrecisionFormat&&(y.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});J.addEventListener("webglcontextlost",g,!1)}catch(Ma){console.error("THREE.WebGLRenderer: "+Ma)}var Ka="undefined"!==typeof WebGL2RenderingContext&&y instanceof WebGL2RenderingContext, ba=new b.WebGLExtensions(y);ba.get("WEBGL_depth_texture");ba.get("OES_texture_float");ba.get("OES_texture_float_linear");ba.get("OES_texture_half_float");ba.get("OES_texture_half_float_linear");ba.get("OES_standard_derivatives");ba.get("ANGLE_instanced_arrays");ba.get("OES_element_index_uint")&&(b.BufferGeometry.MaxIndex=4294967296);var ma=new b.WebGLCapabilities(y,ba,a),R=new b.WebGLState(y,ba,O),aa=new b.WebGLProperties,xa=new b.WebGLObjects(y,aa,this.info),wa=new b.WebGLPrograms(this,ma),Ea=new b.WebGLLights; this.info.programs=wa.programs;var Na=new b.WebGLBufferRenderer(y,ba,pa),Oa=new b.WebGLIndexedBufferRenderer(y,ba,pa);e();this.context=y;this.capabilities=ma;this.extensions=ba;this.properties=aa;this.state=R;var La=new b.WebGLShadowMap(this,Y,xa);this.shadowMap=La;var Pa=new b.SpritePlugin(this,Z),Qa=new b.LensFlarePlugin(this,da);this.getContext=function(){return y};this.getContextAttributes=function(){return y.getContextAttributes()};this.forceContextLoss=function(){ba.get("WEBGL_lose_context").loseContext()}; this.getMaxAnisotropy=function(){var a;return function(){if(void 0!==a)return a;var b=ba.get("EXT_texture_filter_anisotropic");return a=null!==b?y.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}}();this.getPrecision=function(){return ma.precision};this.getPixelRatio=function(){return ia};this.setPixelRatio=function(a){void 0!==a&&(ia=a,this.setSize(va.z,va.w,!1))};this.getSize=function(){return{width:Aa,height:Ba}};this.setSize=function(a,b,c){Aa=a;Ba=b;J.width=a*ia;J.height=b*ia;!1!==c&&(J.style.width= a+"px",J.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){R.viewport(va.set(a,b,c,d))};this.setScissor=function(a,b,c,d){R.scissor(Ga.set(a,b,c,d))};this.setScissorTest=function(a){R.setScissorTest(Ja=a)};this.getClearColor=function(){return ha};this.setClearColor=function(a,b){ha.set(a);qa=void 0!==b?b:1;c(ha.r,ha.g,ha.b,qa)};this.getClearAlpha=function(){return qa};this.setClearAlpha=function(a){qa=a;c(ha.r,ha.g,ha.b,qa)};this.clear=function(a,b,c){var d=0;if(void 0=== a||a)d|=y.COLOR_BUFFER_BIT;if(void 0===b||b)d|=y.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=y.STENCIL_BUFFER_BIT;y.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.resetGLState=d;this.dispose=function(){J.removeEventListener("webglcontextlost",g,!1)};this.renderBufferImmediate=function(a,c,d){R.initAttributes();var e= aa.get(a);a.hasPositions&&!e.position&&(e.position=y.createBuffer());a.hasNormals&&!e.normal&&(e.normal=y.createBuffer());a.hasUvs&&!e.uv&&(e.uv=y.createBuffer());a.hasColors&&!e.color&&(e.color=y.createBuffer());c=c.getAttributes();a.hasPositions&&(y.bindBuffer(y.ARRAY_BUFFER,e.position),y.bufferData(y.ARRAY_BUFFER,a.positionArray,y.DYNAMIC_DRAW),R.enableAttribute(c.position),y.vertexAttribPointer(c.position,3,y.FLOAT,!1,0,0));if(a.hasNormals){y.bindBuffer(y.ARRAY_BUFFER,e.normal);if("MeshPhongMaterial"!== d.type&&"MeshStandardMaterial"!==d.type&&"MeshPhysicalMaterial"!==d.type&&d.shading===b.FlatShading)for(var g=0,f=3*a.count;g<f;g+=9){var h=a.normalArray,l=(h[g+0]+h[g+3]+h[g+6])/3,m=(h[g+1]+h[g+4]+h[g+7])/3,k=(h[g+2]+h[g+5]+h[g+8])/3;h[g+0]=l;h[g+1]=m;h[g+2]=k;h[g+3]=l;h[g+4]=m;h[g+5]=k;h[g+6]=l;h[g+7]=m;h[g+8]=k}y.bufferData(y.ARRAY_BUFFER,a.normalArray,y.DYNAMIC_DRAW);R.enableAttribute(c.normal);y.vertexAttribPointer(c.normal,3,y.FLOAT,!1,0,0)}a.hasUvs&&d.map&&(y.bindBuffer(y.ARRAY_BUFFER,e.uv), y.bufferData(y.ARRAY_BUFFER,a.uvArray,y.DYNAMIC_DRAW),R.enableAttribute(c.uv),y.vertexAttribPointer(c.uv,2,y.FLOAT,!1,0,0));a.hasColors&&d.vertexColors!==b.NoColors&&(y.bindBuffer(y.ARRAY_BUFFER,e.color),y.bufferData(y.ARRAY_BUFFER,a.colorArray,y.DYNAMIC_DRAW),R.enableAttribute(c.color),y.vertexAttribPointer(c.color,3,y.FLOAT,!1,0,0));R.disableUnusedAttributes();y.drawArrays(y.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,c,d,e,g,f){B(e);var h=A(a,c,e,g),l=!1;a=d.id+"_"+h.id+ "_"+e.wireframe;a!==ta&&(ta=a,l=!0);c=g.morphTargetInfluences;if(void 0!==c){a=[];for(var m=0,l=c.length;m<l;m++){var k=c[m];a.push([k,m])}a.sort(t);8<a.length&&(a.length=8);for(var r=d.morphAttributes,m=0,l=a.length;m<l;m++)k=a[m],ga[m]=k[0],0!==k[0]?(c=k[1],!0===e.morphTargets&&r.position&&d.addAttribute("morphTarget"+m,r.position[c]),!0===e.morphNormals&&r.normal&&d.addAttribute("morphNormal"+m,r.normal[c])):(!0===e.morphTargets&&d.removeAttribute("morphTarget"+m),!0===e.morphNormals&&d.removeAttribute("morphNormal"+ m));h.getUniforms().setValue(y,"morphTargetInfluences",ga);l=!0}c=d.index;m=d.attributes.position;!0===e.wireframe&&(c=xa.getWireframeAttribute(d));null!==c?(a=Oa,a.setIndex(c)):a=Na;if(l){a:{var l=void 0,q;if(d instanceof b.InstancedBufferGeometry&&(q=ba.get("ANGLE_instanced_arrays"),null===q)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===l&&(l=0);R.initAttributes(); var k=d.attributes,h=h.getAttributes(),r=e.defaultAttributeValues,u;for(u in h){var p=h[u];if(0<=p){var v=k[u];if(void 0!==v){var n=y.FLOAT,w=v.array,x=v.normalized;w instanceof Float32Array?n=y.FLOAT:w instanceof Float64Array?console.warn("Unsupported data buffer format: Float64Array"):w instanceof Uint16Array?n=y.UNSIGNED_SHORT:w instanceof Int16Array?n=y.SHORT:w instanceof Uint32Array?n=y.UNSIGNED_INT:w instanceof Int32Array?n=y.INT:w instanceof Int8Array?n=y.BYTE:w instanceof Uint8Array&&(n=y.UNSIGNED_BYTE); var w=v.itemSize,z=xa.getAttributeBuffer(v);if(v instanceof b.InterleavedBufferAttribute){var C=v.data,D=C.stride,v=v.offset;C instanceof b.InstancedInterleavedBuffer?(R.enableAttributeAndDivisor(p,C.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=C.meshPerAttribute*C.count)):R.enableAttribute(p);y.bindBuffer(y.ARRAY_BUFFER,z);y.vertexAttribPointer(p,w,n,x,D*C.array.BYTES_PER_ELEMENT,(l*D+v)*C.array.BYTES_PER_ELEMENT)}else v instanceof b.InstancedBufferAttribute?(R.enableAttributeAndDivisor(p, v.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=v.meshPerAttribute*v.count)):R.enableAttribute(p),y.bindBuffer(y.ARRAY_BUFFER,z),y.vertexAttribPointer(p,w,n,x,0,l*w*v.array.BYTES_PER_ELEMENT)}else if(void 0!==r&&(n=r[u],void 0!==n))switch(n.length){case 2:y.vertexAttrib2fv(p,n);break;case 3:y.vertexAttrib3fv(p,n);break;case 4:y.vertexAttrib4fv(p,n);break;default:y.vertexAttrib1fv(p,n)}}}R.disableUnusedAttributes()}null!==c&&y.bindBuffer(y.ELEMENT_ARRAY_BUFFER,xa.getAttributeBuffer(c))}q= Infinity;null!==c?q=c.count:void 0!==m&&(q=m.count);c=d.drawRange.start;m=null!==f?f.start:0;u=Math.max(0,c,m);f=Math.max(0,Math.min(0+q,c+d.drawRange.count,m+(null!==f?f.count:Infinity))-1-u+1);if(g instanceof b.Mesh)if(!0===e.wireframe)R.setLineWidth(e.wireframeLinewidth*(null===na?ia:1)),a.setMode(y.LINES);else switch(g.drawMode){case b.TrianglesDrawMode:a.setMode(y.TRIANGLES);break;case b.TriangleStripDrawMode:a.setMode(y.TRIANGLE_STRIP);break;case b.TriangleFanDrawMode:a.setMode(y.TRIANGLE_FAN)}else g instanceof b.Line?(e=e.linewidth,void 0===e&&(e=1),R.setLineWidth(e*(null===na?ia:1)),g instanceof b.LineSegments?a.setMode(y.LINES):a.setMode(y.LINE_STRIP)):g instanceof b.Points&&a.setMode(y.POINTS);d instanceof b.InstancedBufferGeometry?0<d.maxInstancedCount&&a.renderInstances(d,u,f):a.render(u,f)};this.render=function(a,c,d,e){if(!1===c instanceof b.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var g=a.fog;ta="";fa=-1;oa=null;!0===a.autoUpdate&&a.updateMatrixWorld(); null===c.parent&&c.updateMatrixWorld();c.matrixWorldInverse.getInverse(c.matrixWorld);Ca.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse);Ia.setFromMatrix(Ca);M.length=0;N=X=-1;Z.length=0;da.length=0;Ha=this.localClippingEnabled;Da=la.init(this.clippingPlanes,Ha,c);n(a,c);V.length=X+1;W.length=N+1;!0===ca.sortObjects&&(V.sort(p),W.sort(u));Da&&la.beginShadows();for(var f=M,h=0,l=0,m=f.length;l<m;l++){var k=f[l];k.castShadow&&(Y.shadows[h++]=k)}Y.shadows.length=h;La.render(a,c);for(var f= M,r=k=0,t=0,q,v,A,C,D=c.matrixWorldInverse,L=0,B=0,G=0,F=0,h=0,l=f.length;h<l;h++)if(m=f[h],q=m.color,v=m.intensity,A=m.distance,C=m.shadow&&m.shadow.map?m.shadow.map.texture:null,m instanceof b.AmbientLight)k+=q.r*v,r+=q.g*v,t+=q.b*v;else if(m instanceof b.DirectionalLight){var E=Ea.get(m);E.color.copy(m.color).multiplyScalar(m.intensity);E.direction.setFromMatrixPosition(m.matrixWorld);ea.setFromMatrixPosition(m.target.matrixWorld);E.direction.sub(ea);E.direction.transformDirection(D);if(E.shadow= m.castShadow)E.shadowBias=m.shadow.bias,E.shadowRadius=m.shadow.radius,E.shadowMapSize=m.shadow.mapSize;Y.directionalShadowMap[L]=C;Y.directionalShadowMatrix[L]=m.shadow.matrix;Y.directional[L++]=E}else if(m instanceof b.SpotLight){E=Ea.get(m);E.position.setFromMatrixPosition(m.matrixWorld);E.position.applyMatrix4(D);E.color.copy(q).multiplyScalar(v);E.distance=A;E.direction.setFromMatrixPosition(m.matrixWorld);ea.setFromMatrixPosition(m.target.matrixWorld);E.direction.sub(ea);E.direction.transformDirection(D); E.coneCos=Math.cos(m.angle);E.penumbraCos=Math.cos(m.angle*(1-m.penumbra));E.decay=0===m.distance?0:m.decay;if(E.shadow=m.castShadow)E.shadowBias=m.shadow.bias,E.shadowRadius=m.shadow.radius,E.shadowMapSize=m.shadow.mapSize;Y.spotShadowMap[G]=C;Y.spotShadowMatrix[G]=m.shadow.matrix;Y.spot[G++]=E}else if(m instanceof b.PointLight){E=Ea.get(m);E.position.setFromMatrixPosition(m.matrixWorld);E.position.applyMatrix4(D);E.color.copy(m.color).multiplyScalar(m.intensity);E.distance=m.distance;E.decay=0=== m.distance?0:m.decay;if(E.shadow=m.castShadow)E.shadowBias=m.shadow.bias,E.shadowRadius=m.shadow.radius,E.shadowMapSize=m.shadow.mapSize;Y.pointShadowMap[B]=C;void 0===Y.pointShadowMatrix[B]&&(Y.pointShadowMatrix[B]=new b.Matrix4);ea.setFromMatrixPosition(m.matrixWorld).negate();Y.pointShadowMatrix[B].identity().setPosition(ea);Y.point[B++]=E}else m instanceof b.HemisphereLight&&(E=Ea.get(m),E.direction.setFromMatrixPosition(m.matrixWorld),E.direction.transformDirection(D),E.direction.normalize(), E.skyColor.copy(m.color).multiplyScalar(v),E.groundColor.copy(m.groundColor).multiplyScalar(v),Y.hemi[F++]=E);Y.ambient[0]=k;Y.ambient[1]=r;Y.ambient[2]=t;Y.directional.length=L;Y.spot.length=G;Y.point.length=B;Y.hemi.length=F;Y.hash=L+","+B+","+G+","+F+","+Y.shadows.length;Da&&la.endShadows();pa.calls=0;pa.vertices=0;pa.faces=0;pa.points=0;void 0===d&&(d=null);this.setRenderTarget(d);(this.autoClear||e)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);a.overrideMaterial? (e=a.overrideMaterial,z(V,c,g,e),z(W,c,g,e)):(R.setBlending(b.NoBlending),z(V,c,g),z(W,c,g));Pa.render(a,c);Qa.render(a,c,ua);d&&(a=d.texture,a.generateMipmaps&&H(d)&&a.minFilter!==b.NearestFilter&&a.minFilter!==b.LinearFilter&&(a=d instanceof b.WebGLRenderTargetCube?y.TEXTURE_CUBE_MAP:y.TEXTURE_2D,d=aa.get(d.texture).__webglTexture,R.bindTexture(a,d),y.generateMipmap(a),R.bindTexture(a,null)));R.setDepthTest(!0);R.setDepthWrite(!0);R.setColorWrite(!0)}};this.setFaceCulling=function(a,c){R.setCullFace(a); R.setFlipSided(c===b.FrontFaceDirectionCW)};this.allocTextureUnit=function(){var a=za;a>=ma.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ma.maxTextures);za+=1;return a};this.setTexture2D=function(){var a=!1;return function(c,d){c instanceof b.WebGLRenderTarget&&(a||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),a=!0),c=c.texture);var e=c,g=aa.get(e);if(0<e.version&& g.__version!==e.version){var l=e.image;if(void 0===l)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else if(!1===l.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e);else{void 0===g.__webglInit&&(g.__webglInit=!0,e.addEventListener("dispose",f),g.__webglTexture=y.createTexture(),ra.textures++);R.activeTexture(y.TEXTURE0+d);R.bindTexture(y.TEXTURE_2D,g.__webglTexture);y.pixelStorei(y.UNPACK_FLIP_Y_WEBGL,e.flipY); y.pixelStorei(y.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha);y.pixelStorei(y.UNPACK_ALIGNMENT,e.unpackAlignment);var m=D(e.image,ma.maxTextureSize);if((e.wrapS!==b.ClampToEdgeWrapping||e.wrapT!==b.ClampToEdgeWrapping||e.minFilter!==b.NearestFilter&&e.minFilter!==b.LinearFilter)&&!1===H(m))if(l=m,l instanceof HTMLImageElement||l instanceof HTMLCanvasElement){var k=document.createElement("canvas");k.width=b.Math.nearestPowerOfTwo(l.width);k.height=b.Math.nearestPowerOfTwo(l.height);k.getContext("2d").drawImage(l, 0,0,k.width,k.height);console.warn("THREE.WebGLRenderer: image is not power of two ("+l.width+"x"+l.height+"). Resized to "+k.width+"x"+k.height,l);m=k}else m=l;var l=H(m),k=O(e.format),r=O(e.type);G(y.TEXTURE_2D,e,l);var t=e.mipmaps;if(e instanceof b.DepthTexture){t=y.DEPTH_COMPONENT;if(e.type===b.FloatType){if(!Ka)throw Error("Float Depth Texture only supported in WebGL2.0");t=y.DEPTH_COMPONENT32F}else Ka&&(t=y.DEPTH_COMPONENT16);R.texImage2D(y.TEXTURE_2D,0,t,m.width,m.height,0,k,r,null)}else if(e instanceof b.DataTexture)if(0<t.length&&l){for(var q=0,u=t.length;q<u;q++)m=t[q],R.texImage2D(y.TEXTURE_2D,q,k,m.width,m.height,0,k,r,m.data);e.generateMipmaps=!1}else R.texImage2D(y.TEXTURE_2D,0,k,m.width,m.height,0,k,r,m.data);else if(e instanceof b.CompressedTexture)for(q=0,u=t.length;q<u;q++)m=t[q],e.format!==b.RGBAFormat&&e.format!==b.RGBFormat?-1<R.getCompressedTextureFormats().indexOf(k)?R.compressedTexImage2D(y.TEXTURE_2D,q,k,m.width,m.height,0,m.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"): R.texImage2D(y.TEXTURE_2D,q,k,m.width,m.height,0,k,r,m.data);else if(0<t.length&&l){q=0;for(u=t.length;q<u;q++)m=t[q],R.texImage2D(y.TEXTURE_2D,q,k,k,r,m);e.generateMipmaps=!1}else R.texImage2D(y.TEXTURE_2D,0,k,k,r,m);e.generateMipmaps&&l&&y.generateMipmap(y.TEXTURE_2D);g.__version=e.version;if(e.onUpdate)e.onUpdate(e)}}else R.activeTexture(y.TEXTURE0+d),R.bindTexture(y.TEXTURE_2D,g.__webglTexture)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."), a=!0);ca.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=!1;return function(c,d){c instanceof b.WebGLRenderTargetCube&&(a||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),a=!0),c=c.texture);if(c instanceof b.CubeTexture||Array.isArray(c.image)&&6===c.image.length){var e=c,g=aa.get(e);if(6===e.image.length)if(0<e.version&&g.__version!==e.version){g.__image__webglTextureCube||(e.addEventListener("dispose", f),g.__image__webglTextureCube=y.createTexture(),ra.textures++);R.activeTexture(y.TEXTURE0+d);R.bindTexture(y.TEXTURE_CUBE_MAP,g.__image__webglTextureCube);y.pixelStorei(y.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var l=e instanceof b.CompressedTexture,m=e.image[0]instanceof b.DataTexture,k=[],r=0;6>r;r++)k[r]=!ca.autoScaleCubemaps||l||m?m?e.image[r].image:e.image[r]:D(e.image[r],ma.maxCubemapSize);var t=H(k[0]),q=O(e.format),u=O(e.type);G(y.TEXTURE_CUBE_MAP,e,t);for(r=0;6>r;r++)if(l)for(var p,v=k[r].mipmaps, n=0,w=v.length;n<w;n++)p=v[n],e.format!==b.RGBAFormat&&e.format!==b.RGBFormat?-1<R.getCompressedTextureFormats().indexOf(q)?R.compressedTexImage2D(y.TEXTURE_CUBE_MAP_POSITIVE_X+r,n,q,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):R.texImage2D(y.TEXTURE_CUBE_MAP_POSITIVE_X+r,n,q,p.width,p.height,0,q,u,p.data);else m?R.texImage2D(y.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,q,k[r].width,k[r].height,0,q,u,k[r].data):R.texImage2D(y.TEXTURE_CUBE_MAP_POSITIVE_X+ r,0,q,q,u,k[r]);e.generateMipmaps&&t&&y.generateMipmap(y.TEXTURE_CUBE_MAP);g.__version=e.version;if(e.onUpdate)e.onUpdate(e)}else R.activeTexture(y.TEXTURE0+d),R.bindTexture(y.TEXTURE_CUBE_MAP,g.__image__webglTextureCube)}else e=c,R.activeTexture(y.TEXTURE0+d),R.bindTexture(y.TEXTURE_CUBE_MAP,aa.get(e).__webglTexture)}}();this.getCurrentRenderTarget=function(){return na};this.setRenderTarget=function(a){if((na=a)&&void 0===aa.get(a).__webglFramebuffer){var c=aa.get(a),d=aa.get(a.texture);a.addEventListener("dispose", l);d.__webglTexture=y.createTexture();ra.textures++;var e=a instanceof b.WebGLRenderTargetCube,g=b.Math.isPowerOfTwo(a.width)&&b.Math.isPowerOfTwo(a.height);if(e){c.__webglFramebuffer=[];for(var f=0;6>f;f++)c.__webglFramebuffer[f]=y.createFramebuffer()}else c.__webglFramebuffer=y.createFramebuffer();if(e){R.bindTexture(y.TEXTURE_CUBE_MAP,d.__webglTexture);G(y.TEXTURE_CUBE_MAP,a.texture,g);for(f=0;6>f;f++)E(c.__webglFramebuffer[f],a,y.COLOR_ATTACHMENT0,y.TEXTURE_CUBE_MAP_POSITIVE_X+f);a.texture.generateMipmaps&& g&&y.generateMipmap(y.TEXTURE_CUBE_MAP);R.bindTexture(y.TEXTURE_CUBE_MAP,null)}else R.bindTexture(y.TEXTURE_2D,d.__webglTexture),G(y.TEXTURE_2D,a.texture,g),E(c.__webglFramebuffer,a,y.COLOR_ATTACHMENT0,y.TEXTURE_2D),a.texture.generateMipmaps&&g&&y.generateMipmap(y.TEXTURE_2D),R.bindTexture(y.TEXTURE_2D,null);if(a.depthBuffer){c=aa.get(a);d=a instanceof b.WebGLRenderTargetCube;if(a.depthTexture){if(d)throw Error("target.depthTexture not supported in Cube render targets");if(a instanceof b.WebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported!"); y.bindFramebuffer(y.FRAMEBUFFER,c.__webglFramebuffer);if(!(a.depthTexture instanceof b.DepthTexture))throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");aa.get(a.depthTexture).__webglTexture&&a.depthTexture.image.width===a.width&&a.depthTexture.image.height===a.height||(a.depthTexture.image.width=a.width,a.depthTexture.image.height=a.height,a.depthTexture.needsUpdate=!0);ca.setTexture2D(a.depthTexture,0);c=aa.get(a.depthTexture).__webglTexture;y.framebufferTexture2D(y.FRAMEBUFFER, y.DEPTH_ATTACHMENT,y.TEXTURE_2D,c,0)}else if(d)for(c.__webglDepthbuffer=[],d=0;6>d;d++)y.bindFramebuffer(y.FRAMEBUFFER,c.__webglFramebuffer[d]),c.__webglDepthbuffer[d]=y.createRenderbuffer(),F(c.__webglDepthbuffer[d],a);else y.bindFramebuffer(y.FRAMEBUFFER,c.__webglFramebuffer),c.__webglDepthbuffer=y.createRenderbuffer(),F(c.__webglDepthbuffer,a);y.bindFramebuffer(y.FRAMEBUFFER,null)}}c=a instanceof b.WebGLRenderTargetCube;a?(d=aa.get(a),d=c?d.__webglFramebuffer[a.activeCubeFace]:d.__webglFramebuffer, ya.copy(a.scissor),Fa=a.scissorTest,ua.copy(a.viewport)):(d=null,ya.copy(Ga).multiplyScalar(ia),Fa=Ja,ua.copy(va).multiplyScalar(ia));ja!==d&&(y.bindFramebuffer(y.FRAMEBUFFER,d),ja=d);R.scissor(ya);R.setScissorTest(Fa);R.viewport(ua);c&&(c=aa.get(a.texture),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,c.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=function(a,c,d,e,g,f){if(!1===a instanceof b.WebGLRenderTarget)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget."); else{var h=aa.get(a).__webglFramebuffer;if(h){var l=!1;h!==ja&&(y.bindFramebuffer(y.FRAMEBUFFER,h),l=!0);try{var m=a.texture;m.format!==b.RGBAFormat&&O(m.format)!==y.getParameter(y.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):m.type===b.UnsignedByteType||O(m.type)===y.getParameter(y.IMPLEMENTATION_COLOR_READ_TYPE)||m.type===b.FloatType&&ba.get("WEBGL_color_buffer_float")||m.type===b.HalfFloatType&& ba.get("EXT_color_buffer_half_float")?y.checkFramebufferStatus(y.FRAMEBUFFER)===y.FRAMEBUFFER_COMPLETE?0<=c&&c<=a.width-e&&0<=d&&d<=a.height-g&&y.readPixels(c,d,e,g,O(m.format),O(m.type),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{l&&y.bindFramebuffer(y.FRAMEBUFFER,ja)}}}}};b.WebGLRenderTarget= function(a,c,e){this.uuid=b.Math.generateUUID();this.width=a;this.height=c;this.scissor=new b.Vector4(0,0,a,c);this.scissorTest=!1;this.viewport=new b.Vector4(0,0,a,c);e=e||{};void 0===e.minFilter&&(e.minFilter=b.LinearFilter);this.texture=new b.Texture(void 0,void 0,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding);this.depthBuffer=void 0!==e.depthBuffer?e.depthBuffer:!0;this.stencilBuffer=void 0!==e.stencilBuffer?e.stencilBuffer:!0;this.depthTexture=null};Object.assign(b.WebGLRenderTarget.prototype, b.EventDispatcher.prototype,{setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}}); b.WebGLRenderTargetCube=function(a,c,e){b.WebGLRenderTarget.call(this,a,c,e);this.activeMipMapLevel=this.activeCubeFace=0};b.WebGLRenderTargetCube.prototype=Object.create(b.WebGLRenderTarget.prototype);b.WebGLRenderTargetCube.prototype.constructor=b.WebGLRenderTargetCube;b.WebGLBufferRenderer=function(a,c,e){var d;this.setMode=function(a){d=a};this.render=function(b,c){a.drawArrays(d,b,c);e.calls++;e.vertices+=c;d===a.TRIANGLES&&(e.faces+=c/3)};this.renderInstances=function(g){var f=c.get("ANGLE_instanced_arrays"); if(null===f)console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{var l=g.attributes.position,m=0,m=l instanceof b.InterleavedBufferAttribute?l.data.count:l.count;f.drawArraysInstancedANGLE(d,0,m,g.maxInstancedCount);e.calls++;e.vertices+=m*g.maxInstancedCount;d===a.TRIANGLES&&(e.faces+=g.maxInstancedCount*m/3)}}};b.WebGLClipping=function(){function a(){t.value!==d&&(t.value=d,t.needsUpdate=0<g);e.numPlanes= g}function c(a,b,c,d){var g=null!==a?a.length:0,f=null;if(0!==g){f=t.value;if(!0!==d||null===f){d=c+4*g;b=b.matrixWorldInverse;k.getNormalMatrix(b);if(null===f||f.length<d)f=new Float32Array(d);for(d=0;d!==g;++d,c+=4)m.copy(a[d]).applyMatrix4(b,k),m.normal.toArray(f,c),f[c+3]=m.constant}t.value=f;t.needsUpdate=!0}e.numPlanes=g;return f}var e=this,d=null,g=0,f=!1,l=!1,m=new b.Plane,k=new b.Matrix3,t={value:null,needsUpdate:!1};this.uniform=t;this.numPlanes=0;this.init=function(a,b,e){var l=0!==a.length|| b||0!==g||f;f=b;d=c(a,e,0);g=a.length;return l};this.beginShadows=function(){l=!0;c(null)};this.endShadows=function(){l=!1;a()};this.setState=function(b,e,m,k,r){if(!f||null===b||0===b.length||l&&!e)l?c(null):a();else{e=l?0:g;var p=4*e,n=k.clippingState||null;t.value=n;n=c(b,m,p,r);for(b=0;b!==p;++b)n[b]=d[b];k.clippingState=n;this.numPlanes+=e}}};b.WebGLIndexedBufferRenderer=function(a,b,e){var d,g,f;this.setMode=function(a){d=a};this.setIndex=function(d){d.array instanceof Uint32Array&&b.get("OES_element_index_uint")? (g=a.UNSIGNED_INT,f=4):(g=a.UNSIGNED_SHORT,f=2)};this.render=function(b,c){a.drawElements(d,c,g,b*f);e.calls++;e.vertices+=c;d===a.TRIANGLES&&(e.faces+=c/3)};this.renderInstances=function(l,m,k){var t=b.get("ANGLE_instanced_arrays");null===t?console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."):(t.drawElementsInstancedANGLE(d,k,g,m*f,l.maxInstancedCount),e.calls++,e.vertices+=k*l.maxInstancedCount,d===a.TRIANGLES&& (e.faces+=l.maxInstancedCount*k/3))}};b.WebGLExtensions=function(a){var b={};this.get=function(e){if(void 0!==b[e])return b[e];var d;switch(e){case "WEBGL_depth_texture":d=a.getExtension("WEBGL_depth_texture")||a.getExtension("MOZ_WEBGL_depth_texture")||a.getExtension("WEBKIT_WEBGL_depth_texture");break;case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic"); break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case "WEBGL_compressed_texture_etc1":d=a.getExtension("WEBGL_compressed_texture_etc1");break;default:d=a.getExtension(e)}null===d&&console.warn("THREE.WebGLRenderer: "+ e+" extension not supported.");return b[e]=d}};b.WebGLCapabilities=function(a,b,e){function d(b){if("highp"===b){if(0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.HIGH_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT).precision)return"highp";b="mediump"}return"mediump"===b&&0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.MEDIUM_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.MEDIUM_FLOAT).precision?"mediump":"lowp"}this.getMaxPrecision=d;this.precision= void 0!==e.precision?e.precision:"highp";this.logarithmicDepthBuffer=void 0!==e.logarithmicDepthBuffer?e.logarithmicDepthBuffer:!1;this.maxTextures=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS);this.maxVertexTextures=a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS);this.maxTextureSize=a.getParameter(a.MAX_TEXTURE_SIZE);this.maxCubemapSize=a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE);this.maxAttributes=a.getParameter(a.MAX_VERTEX_ATTRIBS);this.maxVertexUniforms=a.getParameter(a.MAX_VERTEX_UNIFORM_VECTORS); this.maxVaryings=a.getParameter(a.MAX_VARYING_VECTORS);this.maxFragmentUniforms=a.getParameter(a.MAX_FRAGMENT_UNIFORM_VECTORS);this.vertexTextures=0<this.maxVertexTextures;this.floatFragmentTextures=!!b.get("OES_texture_float");this.floatVertexTextures=this.vertexTextures&&this.floatFragmentTextures;e=d(this.precision);e!==this.precision&&(console.warn("THREE.WebGLRenderer:",this.precision,"not supported, using",e,"instead."),this.precision=e);this.logarithmicDepthBuffer&&(this.logarithmicDepthBuffer= !!b.get("EXT_frag_depth"))};b.WebGLGeometries=function(a,c,e){function d(a){var b=a.target;a=f[b.id];null!==a.index&&g(a.index);var k=a.attributes,t;for(t in k)g(k[t]);b.removeEventListener("dispose",d);delete f[b.id];t=c.get(b);t.wireframe&&g(t.wireframe);c["delete"](b);b=c.get(a);b.wireframe&&g(b.wireframe);c["delete"](a);e.memory.geometries--}function g(d){var e;e=d instanceof b.InterleavedBufferAttribute?c.get(d.data).__webglBuffer:c.get(d).__webglBuffer;void 0!==e&&(a.deleteBuffer(e),d instanceof b.InterleavedBufferAttribute?c["delete"](d.data):c["delete"](d))}var f={};this.get=function(a){var c=a.geometry;if(void 0!==f[c.id])return f[c.id];c.addEventListener("dispose",d);var g;c instanceof b.BufferGeometry?g=c:c instanceof b.Geometry&&(void 0===c._bufferGeometry&&(c._bufferGeometry=(new b.BufferGeometry).setFromObject(a)),g=c._bufferGeometry);f[c.id]=g;e.memory.geometries++;return g}};b.WebGLLights=function(){var a={};this.get=function(c){if(void 0!==a[c.id])return a[c.id];var e;switch(c.type){case "DirectionalLight":e= {direction:new b.Vector3,color:new b.Color,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new b.Vector2};break;case "SpotLight":e={position:new b.Vector3,direction:new b.Vector3,color:new b.Color,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new b.Vector2};break;case "PointLight":e={position:new b.Vector3,color:new b.Color,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new b.Vector2};break;case "HemisphereLight":e={direction:new b.Vector3, skyColor:new b.Color,groundColor:new b.Color}}return a[c.id]=e}};b.WebGLObjects=function(a,c,e){function d(d,e){var g=d instanceof b.InterleavedBufferAttribute?d.data:d,f=c.get(g);void 0===f.__webglBuffer?(f.__webglBuffer=a.createBuffer(),a.bindBuffer(e,f.__webglBuffer),a.bufferData(e,g.array,g.dynamic?a.DYNAMIC_DRAW:a.STATIC_DRAW),f.version=g.version):f.version!==g.version&&(a.bindBuffer(e,f.__webglBuffer),!1===g.dynamic||-1===g.updateRange.count?a.bufferSubData(e,0,g.array):0===g.updateRange.count? console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(a.bufferSubData(e,g.updateRange.offset*g.array.BYTES_PER_ELEMENT,g.array.subarray(g.updateRange.offset,g.updateRange.offset+g.updateRange.count)),g.updateRange.count=0),f.version=g.version)}function g(a,b,c){if(b>c){var d=b;b=c;c=d}d=a[b];return void 0===d?(a[b]=[c],!0):-1===d.indexOf(c)?(d.push(c),!0):!1}var f=new b.WebGLGeometries(a, c,e);this.getAttributeBuffer=function(a){return a instanceof b.InterleavedBufferAttribute?c.get(a.data).__webglBuffer:c.get(a).__webglBuffer};this.getWireframeAttribute=function(e){var f=c.get(e);if(void 0!==f.wireframe)return f.wireframe;var h=[],k=e.index,p=e.attributes;e=p.position;if(null!==k)for(var p={},k=k.array,u=0,q=k.length;u<q;u+=3){var v=k[u+0],n=k[u+1],z=k[u+2];g(p,v,n)&&h.push(v,n);g(p,n,z)&&h.push(n,z);g(p,z,v)&&h.push(z,v)}else for(k=p.position.array,u=0,q=k.length/3-1;u<q;u+=3)v= u+0,n=u+1,z=u+2,h.push(v,n,n,z,z,v);h=new b.BufferAttribute(new (65535<e.count?Uint32Array:Uint16Array)(h),1);d(h,a.ELEMENT_ARRAY_BUFFER);return f.wireframe=h};this.update=function(c){var e=f.get(c);c.geometry instanceof b.Geometry&&e.updateFromObject(c);c=e.index;var g=e.attributes;null!==c&&d(c,a.ELEMENT_ARRAY_BUFFER);for(var k in g)d(g[k],a.ARRAY_BUFFER);c=e.morphAttributes;for(k in c)for(var g=c[k],p=0,u=g.length;p<u;p++)d(g[p],a.ARRAY_BUFFER);return e}};b.WebGLProgram=function(){function a(a){switch(a){case b.LinearEncoding:return["Linear", "( value )"];case b.sRGBEncoding:return["sRGB","( value )"];case b.RGBEEncoding:return["RGBE","( value )"];case b.RGBM7Encoding:return["RGBM","( value, 7.0 )"];case b.RGBM16Encoding:return["RGBM","( value, 16.0 )"];case b.RGBDEncoding:return["RGBD","( value, 256.0 )"];case b.GammaEncoding:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw Error("unsupported encoding: "+a);}}function c(b,c){var d=a(c);return"vec4 "+b+"( vec4 value ) { return "+d[0]+"ToLinear"+d[1]+"; }"}function e(b, c){var d=a(c);return"vec4 "+b+"( vec4 value ) { return LinearTo"+d[0]+d[1]+"; }"}function d(a,c){var d;switch(c){case b.LinearToneMapping:d="Linear";break;case b.ReinhardToneMapping:d="Reinhard";break;case b.Uncharted2ToneMapping:d="Uncharted2";break;case b.CineonToneMapping:d="OptimizedCineon";break;default:throw Error("unsupported toneMapping: "+c);}return"vec3 "+a+"( vec3 color ) { return "+d+"ToneMapping( color ); }"}function g(a,b,c){a=a||{};return[a.derivatives||b.envMapCubeUV||b.bumpMap||b.normalMap|| b.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(a.fragDepth||b.logarithmicDepthBuffer)&&c.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",a.drawBuffers&&c.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(a.shaderTextureLOD||b.envMap)&&c.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(l).join("\n")}function f(a){var b=[],c;for(c in a){var d=a[c];!1!==d&&b.push("#define "+c+" "+d)}return b.join("\n")} function l(a){return""!==a}function m(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights)}function k(a){return a.replace(/#include +<([\w\d.]+)>/g,function(a,c){var d=b.ShaderChunk[c];if(void 0===d)throw Error("Can not resolve #include <"+c+">");return k(d)})}function t(a){return a.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a, b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]");return a})}var p=0;return function(a,q,n,x){var z=a.context,B=n.extensions,A=n.defines,C=n.__webglShader.vertexShader,G=n.__webglShader.fragmentShader,D="SHADOWMAP_TYPE_BASIC";x.shadowMapType===b.PCFShadowMap?D="SHADOWMAP_TYPE_PCF":x.shadowMapType===b.PCFSoftShadowMap&&(D="SHADOWMAP_TYPE_PCF_SOFT");var H="ENVMAP_TYPE_CUBE",E="ENVMAP_MODE_REFLECTION",F="ENVMAP_BLENDING_MULTIPLY";if(x.envMap){switch(n.envMap.mapping){case b.CubeReflectionMapping:case b.CubeRefractionMapping:H= "ENVMAP_TYPE_CUBE";break;case b.CubeUVReflectionMapping:case b.CubeUVRefractionMapping:H="ENVMAP_TYPE_CUBE_UV";break;case b.EquirectangularReflectionMapping:case b.EquirectangularRefractionMapping:H="ENVMAP_TYPE_EQUIREC";break;case b.SphericalReflectionMapping:H="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case b.CubeRefractionMapping:case b.EquirectangularRefractionMapping:E="ENVMAP_MODE_REFRACTION"}switch(n.combine){case b.MultiplyOperation:F="ENVMAP_BLENDING_MULTIPLY";break;case b.MixOperation:F= "ENVMAP_BLENDING_MIX";break;case b.AddOperation:F="ENVMAP_BLENDING_ADD"}}var I=0<a.gammaFactor?a.gammaFactor:1,B=g(B,x,a.extensions),O=f(A),J=z.createProgram();n instanceof b.RawShaderMaterial?D=A="":(A=["precision "+x.precision+" float;","precision "+x.precision+" int;","#define SHADER_NAME "+n.__webglShader.name,O,x.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+I,"#define MAX_BONES "+x.maxBones,x.map?"#define USE_MAP":"",x.envMap?"#define USE_ENVMAP":"",x.envMap?"#define "+ E:"",x.lightMap?"#define USE_LIGHTMAP":"",x.aoMap?"#define USE_AOMAP":"",x.emissiveMap?"#define USE_EMISSIVEMAP":"",x.bumpMap?"#define USE_BUMPMAP":"",x.normalMap?"#define USE_NORMALMAP":"",x.displacementMap&&x.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",x.specularMap?"#define USE_SPECULARMAP":"",x.roughnessMap?"#define USE_ROUGHNESSMAP":"",x.metalnessMap?"#define USE_METALNESSMAP":"",x.alphaMap?"#define USE_ALPHAMAP":"",x.vertexColors?"#define USE_COLOR":"",x.flatShading?"#define FLAT_SHADED": "",x.skinning?"#define USE_SKINNING":"",x.useVertexTexture?"#define BONE_TEXTURE":"",x.morphTargets?"#define USE_MORPHTARGETS":"",x.morphNormals&&!1===x.flatShading?"#define USE_MORPHNORMALS":"",x.doubleSided?"#define DOUBLE_SIDED":"",x.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+x.numClippingPlanes,x.shadowMapEnabled?"#define USE_SHADOWMAP":"",x.shadowMapEnabled?"#define "+D:"",x.sizeAttenuation?"#define USE_SIZEATTENUATION":"",x.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF": "",x.logarithmicDepthBuffer&&a.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;", "\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(l).join("\n"),D=[B,"precision "+ x.precision+" float;","precision "+x.precision+" int;","#define SHADER_NAME "+n.__webglShader.name,O,x.alphaTest?"#define ALPHATEST "+x.alphaTest:"","#define GAMMA_FACTOR "+I,x.useFog&&x.fog?"#define USE_FOG":"",x.useFog&&x.fogExp?"#define FOG_EXP2":"",x.map?"#define USE_MAP":"",x.envMap?"#define USE_ENVMAP":"",x.envMap?"#define "+H:"",x.envMap?"#define "+E:"",x.envMap?"#define "+F:"",x.lightMap?"#define USE_LIGHTMAP":"",x.aoMap?"#define USE_AOMAP":"",x.emissiveMap?"#define USE_EMISSIVEMAP":"",x.bumpMap? "#define USE_BUMPMAP":"",x.normalMap?"#define USE_NORMALMAP":"",x.specularMap?"#define USE_SPECULARMAP":"",x.roughnessMap?"#define USE_ROUGHNESSMAP":"",x.metalnessMap?"#define USE_METALNESSMAP":"",x.alphaMap?"#define USE_ALPHAMAP":"",x.vertexColors?"#define USE_COLOR":"",x.flatShading?"#define FLAT_SHADED":"",x.doubleSided?"#define DOUBLE_SIDED":"",x.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+x.numClippingPlanes,x.shadowMapEnabled?"#define USE_SHADOWMAP":"",x.shadowMapEnabled? "#define "+D:"",x.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",x.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",x.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",x.logarithmicDepthBuffer&&a.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",x.envMap&&a.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",x.toneMapping!==b.NoToneMapping?"#define TONE_MAPPING":"",x.toneMapping!==b.NoToneMapping? b.ShaderChunk.tonemapping_pars_fragment:"",x.toneMapping!==b.NoToneMapping?d("toneMapping",x.toneMapping):"",x.outputEncoding||x.mapEncoding||x.envMapEncoding||x.emissiveMapEncoding?b.ShaderChunk.encodings_pars_fragment:"",x.mapEncoding?c("mapTexelToLinear",x.mapEncoding):"",x.envMapEncoding?c("envMapTexelToLinear",x.envMapEncoding):"",x.emissiveMapEncoding?c("emissiveMapTexelToLinear",x.emissiveMapEncoding):"",x.outputEncoding?e("linearToOutputTexel",x.outputEncoding):"",x.depthPacking?"#define DEPTH_PACKING "+ n.depthPacking:"","\n"].filter(l).join("\n"));C=k(C,x);C=m(C,x);G=k(G,x);G=m(G,x);!1===n instanceof b.ShaderMaterial&&(C=t(C),G=t(G));G=D+G;C=b.WebGLShader(z,z.VERTEX_SHADER,A+C);G=b.WebGLShader(z,z.FRAGMENT_SHADER,G);z.attachShader(J,C);z.attachShader(J,G);void 0!==n.index0AttributeName?z.bindAttribLocation(J,0,n.index0AttributeName):!0===x.morphTargets&&z.bindAttribLocation(J,0,"position");z.linkProgram(J);x=z.getProgramInfoLog(J);H=z.getShaderInfoLog(C);E=z.getShaderInfoLog(G);I=F=!0;if(!1===z.getProgramParameter(J, z.LINK_STATUS))F=!1,console.error("THREE.WebGLProgram: shader error: ",z.getError(),"gl.VALIDATE_STATUS",z.getProgramParameter(J,z.VALIDATE_STATUS),"gl.getProgramInfoLog",x,H,E);else if(""!==x)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",x);else if(""===H||""===E)I=!1;I&&(this.diagnostics={runnable:F,material:n,programLog:x,vertexShader:{log:H,prefix:A},fragmentShader:{log:E,prefix:D}});z.deleteShader(C);z.deleteShader(G);var K;this.getUniforms=function(){void 0===K&&(K=new b.WebGLUniforms(z, J,a));return K};var T;this.getAttributes=function(){if(void 0===T){for(var a={},b=z.getProgramParameter(J,z.ACTIVE_ATTRIBUTES),c=0;c<b;c++){var d=z.getActiveAttrib(J,c).name;a[d]=z.getAttribLocation(J,d)}T=a}return T};this.destroy=function(){z.deleteProgram(J);this.program=void 0};Object.defineProperties(this,{uniforms:{get:function(){console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms().");return this.getUniforms()}},attributes:{get:function(){console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."); return this.getAttributes()}}});this.id=p++;this.code=q;this.usedTimes=1;this.program=J;this.vertexShader=C;this.fragmentShader=G;return this}}();b.WebGLPrograms=function(a,c){function e(a,c){var d;a?a instanceof b.Texture?d=a.encoding:a instanceof b.WebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),d=a.texture.encoding):d=b.LinearEncoding;d===b.LinearEncoding&&c&&(d=b.GammaEncoding);return d} var d=[],g={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},f="precision supportsVertexTextures map mapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap displacementMap specularMap roughnessMap metalnessMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes depthPacking".split(" "); this.getParameters=function(d,f,h,k,p){var n=g[d.type],q;c.floatVertexTextures&&p&&p.skeleton&&p.skeleton.useVertexTexture?q=1024:(q=Math.floor((c.maxVertexUniforms-20)/4),void 0!==p&&p instanceof b.SkinnedMesh&&(q=Math.min(p.skeleton.bones.length,q),q<p.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+p.skeleton.bones.length+", this GPU supports just "+q+" (try OpenGL instead of ANGLE)")));var v=a.getPrecision();null!==d.precision&&(v=c.getMaxPrecision(d.precision),v!==d.precision&& console.warn("THREE.WebGLProgram.getParameters:",d.precision,"not supported, using",v,"instead."));var x=a.getCurrentRenderTarget();return{shaderID:n,precision:v,supportsVertexTextures:c.vertexTextures,outputEncoding:e(x?x.texture:null,a.gammaOutput),map:!!d.map,mapEncoding:e(d.map,a.gammaInput),envMap:!!d.envMap,envMapMode:d.envMap&&d.envMap.mapping,envMapEncoding:e(d.envMap,a.gammaInput),envMapCubeUV:!!d.envMap&&(d.envMap.mapping===b.CubeUVReflectionMapping||d.envMap.mapping===b.CubeUVRefractionMapping), lightMap:!!d.lightMap,aoMap:!!d.aoMap,emissiveMap:!!d.emissiveMap,emissiveMapEncoding:e(d.emissiveMap,a.gammaInput),bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,displacementMap:!!d.displacementMap,roughnessMap:!!d.roughnessMap,metalnessMap:!!d.metalnessMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,combine:d.combine,vertexColors:d.vertexColors,fog:h,useFog:d.fog,fogExp:h instanceof b.FogExp2,flatShading:d.shading===b.FlatShading,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:c.logarithmicDepthBuffer, skinning:d.skinning,maxBones:q,useVertexTexture:c.floatVertexTextures&&p&&p.skeleton&&p.skeleton.useVertexTexture,morphTargets:d.morphTargets,morphNormals:d.morphNormals,maxMorphTargets:a.maxMorphTargets,maxMorphNormals:a.maxMorphNormals,numDirLights:f.directional.length,numPointLights:f.point.length,numSpotLights:f.spot.length,numHemiLights:f.hemi.length,numClippingPlanes:k,shadowMapEnabled:a.shadowMap.enabled&&p.receiveShadow&&0<f.shadows.length,shadowMapType:a.shadowMap.type,toneMapping:a.toneMapping, physicallyCorrectLights:a.physicallyCorrectLights,premultipliedAlpha:d.premultipliedAlpha,alphaTest:d.alphaTest,doubleSided:d.side===b.DoubleSide,flipSided:d.side===b.BackSide,depthPacking:void 0!==d.depthPacking?d.depthPacking:!1}};this.getProgramCode=function(a,b){var c=[];b.shaderID?c.push(b.shaderID):(c.push(a.fragmentShader),c.push(a.vertexShader));if(void 0!==a.defines)for(var d in a.defines)c.push(d),c.push(a.defines[d]);for(d=0;d<f.length;d++)c.push(b[f[d]]);return c.join()};this.acquireProgram= function(c,e,g){for(var f,h=0,k=d.length;h<k;h++){var q=d[h];if(q.code===g){f=q;++f.usedTimes;break}}void 0===f&&(f=new b.WebGLProgram(a,g,c,e),d.push(f));return f};this.releaseProgram=function(a){if(0===--a.usedTimes){var b=d.indexOf(a);d[b]=d[d.length-1];d.pop();a.destroy()}};this.programs=d};b.WebGLProperties=function(){var a={};this.get=function(b){b=b.uuid;var e=a[b];void 0===e&&(e={},a[b]=e);return e};this["delete"]=function(b){delete a[b.uuid]};this.clear=function(){a={}}};b.WebGLShader=function(){function a(a){a= a.split("\n");for(var b=0;b<a.length;b++)a[b]=b+1+": "+a[b];return a.join("\n")}return function(b,e,d){var g=b.createShader(e);b.shaderSource(g,d);b.compileShader(g);!1===b.getShaderParameter(g,b.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile.");""!==b.getShaderInfoLog(g)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===b.VERTEX_SHADER?"vertex":"fragment",b.getShaderInfoLog(g),a(d));return g}}();b.WebGLShadowMap=function(a,c,e){function d(c,d,e,g){var f=c.geometry, h=null,h=x,l=c.customDepthMaterial;e&&(h=z,l=c.customDistanceMaterial);l?h=l:(c=c instanceof b.SkinnedMesh&&d.skinning,l=0,void 0!==f.morphTargets&&0<f.morphTargets.length&&d.morphTargets&&(l|=1),c&&(l|=2),h=h[l]);a.localClippingEnabled&&!0===d.clipShadows&&0!==d.clippingPlanes.length&&(l=h.uuid,f=d.uuid,c=B[l],void 0===c&&(c={},B[l]=c),l=c[f],void 0===l&&(l=h.clone(),c[f]=l),h=l);h.visible=d.visible;h.wireframe=d.wireframe;f=d.side;J.renderSingleSided&&f==b.DoubleSide&&(f=b.FrontSide);J.renderReverseSided&& (f===b.FrontSide?f=b.BackSide:f===b.BackSide&&(f=b.FrontSide));h.side=f;h.clipShadows=d.clipShadows;h.clippingPlanes=d.clippingPlanes;h.wireframeLinewidth=d.wireframeLinewidth;h.linewidth=d.linewidth;e&&void 0!==h.uniforms.lightPos&&h.uniforms.lightPos.value.copy(g);return h}function g(a,c,d){if(!1!==a.visible){a.layers.test(c.layers)&&(a instanceof b.Mesh||a instanceof b.Line||a instanceof b.Points)&&a.castShadow&&(!1===a.frustumCulled||!0===m.intersectsObject(a))&&!0===a.material.visible&&(a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse, a.matrixWorld),v.push(a));a=a.children;for(var e=0,f=a.length;e<f;e++)g(a[e],c,d)}}var f=a.context,l=a.state,m=new b.Frustum,k=new b.Matrix4,t=c.shadows,p=new b.Vector2,n=new b.Vector3,q=new b.Vector3,v=[],x=Array(4),z=Array(4),B={},A=[new b.Vector3(1,0,0),new b.Vector3(-1,0,0),new b.Vector3(0,0,1),new b.Vector3(0,0,-1),new b.Vector3(0,1,0),new b.Vector3(0,-1,0)],C=[new b.Vector3(0,1,0),new b.Vector3(0,1,0),new b.Vector3(0,1,0),new b.Vector3(0,1,0),new b.Vector3(0,0,1),new b.Vector3(0,0,-1)],G=[new b.Vector4, new b.Vector4,new b.Vector4,new b.Vector4,new b.Vector4,new b.Vector4];c=new b.MeshDepthMaterial;c.depthPacking=b.RGBADepthPacking;c.clipping=!0;for(var D=b.ShaderLib.distanceRGBA,H=b.UniformsUtils.clone(D.uniforms),E=0;4!==E;++E){var F=0!==(E&1),I=0!==(E&2),O=c.clone();O.morphTargets=F;O.skinning=I;x[E]=O;F=new b.ShaderMaterial({defines:{USE_SHADOWMAP:""},uniforms:H,vertexShader:D.vertexShader,fragmentShader:D.fragmentShader,morphTargets:F,skinning:I,clipping:!0});z[E]=F}var J=this;this.enabled= !1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=b.PCFShadowMap;this.renderSingleSided=this.renderReverseSided=!0;this.render=function(c,x){if(!1!==J.enabled&&(!1!==J.autoUpdate||!1!==J.needsUpdate)&&0!==t.length){l.clearColor(1,1,1,1);l.disable(f.BLEND);l.setDepthTest(!0);l.setScissorTest(!1);for(var z,D,B=0,E=t.length;B<E;B++){var F=t[B],M=F.shadow;if(void 0===M)console.warn("THREE.WebGLShadowMap:",F,"has no shadow.");else{var V=M.camera;p.copy(M.mapSize);if(F instanceof b.PointLight){z=6;D= !0;var I=p.x,H=p.y;G[0].set(2*I,H,I,H);G[1].set(0,H,I,H);G[2].set(3*I,H,I,H);G[3].set(I,H,I,H);G[4].set(3*I,0,I,H);G[5].set(I,0,I,H);p.x*=4;p.y*=2}else z=1,D=!1;null===M.map&&(M.map=new b.WebGLRenderTarget(p.x,p.y,{minFilter:b.NearestFilter,magFilter:b.NearestFilter,format:b.RGBAFormat}),V.updateProjectionMatrix());M instanceof b.SpotLightShadow&&M.update(F);I=M.map;M=M.matrix;q.setFromMatrixPosition(F.matrixWorld);V.position.copy(q);a.setRenderTarget(I);a.clear();for(I=0;I<z;I++){D?(n.copy(V.position), n.add(A[I]),V.up.copy(C[I]),V.lookAt(n),l.viewport(G[I])):(n.setFromMatrixPosition(F.target.matrixWorld),V.lookAt(n));V.updateMatrixWorld();V.matrixWorldInverse.getInverse(V.matrixWorld);M.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);M.multiply(V.projectionMatrix);M.multiply(V.matrixWorldInverse);k.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse);m.setFromMatrix(k);v.length=0;g(c,x,V);for(var H=0,N=v.length;H<N;H++){var O=v[H],Z=e.update(O),da=O.material;if(da instanceof b.MultiMaterial)for(var ca= Z.groups,da=da.materials,ka=0,na=ca.length;ka<na;ka++){var ja=ca[ka],fa=da[ja.materialIndex];!0===fa.visible&&(fa=d(O,fa,D,q),a.renderBufferDirect(V,null,Z,fa,O,ja))}else fa=d(O,da,D,q),a.renderBufferDirect(V,null,Z,fa,O,null)}}}}z=a.getClearColor();D=a.getClearAlpha();a.setClearColor(z,D);J.needsUpdate=!1}}};b.WebGLState=function(a,c,e){function d(b,c,d){var e=new Uint8Array(3),g=a.createTexture();a.bindTexture(b,g);a.texParameteri(b,a.TEXTURE_MIN_FILTER,a.NEAREST);a.texParameteri(b,a.TEXTURE_MAG_FILTER, a.NEAREST);for(b=0;b<d;b++)a.texImage2D(c+b,0,a.RGB,1,1,0,a.RGB,a.UNSIGNED_BYTE,e);return g}var g=this;this.buffers={color:new b.WebGLColorBuffer(a,this),depth:new b.WebGLDepthBuffer(a,this),stencil:new b.WebGLStencilBuffer(a,this)};var f=a.getParameter(a.MAX_VERTEX_ATTRIBS),l=new Uint8Array(f),m=new Uint8Array(f),k=new Uint8Array(f),t={},p=null,n=null,q=null,v=null,x=null,z=null,B=null,A=null,C=!1,G=null,D=null,H=null,E=null,F=null,I=null,O=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),J=null,K={},T= new b.Vector4,U=new b.Vector4,S={};S[a.TEXTURE_2D]=d(a.TEXTURE_2D,a.TEXTURE_2D,1);S[a.TEXTURE_CUBE_MAP]=d(a.TEXTURE_CUBE_MAP,a.TEXTURE_CUBE_MAP_POSITIVE_X,6);this.init=function(){this.clearColor(0,0,0,1);this.clearDepth(1);this.clearStencil(0);this.enable(a.DEPTH_TEST);this.setDepthFunc(b.LessEqualDepth);this.setFlipSided(!1);this.setCullFace(b.CullFaceBack);this.enable(a.CULL_FACE);this.enable(a.BLEND);this.setBlending(b.NormalBlending)};this.initAttributes=function(){for(var a=0,b=l.length;a<b;a++)l[a]= 0};this.enableAttribute=function(b){l[b]=1;0===m[b]&&(a.enableVertexAttribArray(b),m[b]=1);0!==k[b]&&(c.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(b,0),k[b]=0)};this.enableAttributeAndDivisor=function(b,c,d){l[b]=1;0===m[b]&&(a.enableVertexAttribArray(b),m[b]=1);k[b]!==c&&(d.vertexAttribDivisorANGLE(b,c),k[b]=c)};this.disableUnusedAttributes=function(){for(var b=0,c=m.length;b!==c;++b)m[b]!==l[b]&&(a.disableVertexAttribArray(b),m[b]=0)};this.enable=function(b){!0!==t[b]&&(a.enable(b), t[b]=!0)};this.disable=function(b){!1!==t[b]&&(a.disable(b),t[b]=!1)};this.getCompressedTextureFormats=function(){if(null===p&&(p=[],c.get("WEBGL_compressed_texture_pvrtc")||c.get("WEBGL_compressed_texture_s3tc")||c.get("WEBGL_compressed_texture_etc1")))for(var b=a.getParameter(a.COMPRESSED_TEXTURE_FORMATS),d=0;d<b.length;d++)p.push(b[d]);return p};this.setBlending=function(c,d,g,f,h,l,m,k){if(c!==b.NoBlending){this.enable(a.BLEND);if(c!==n||k!==C)c===b.AdditiveBlending?k?(a.blendEquationSeparate(a.FUNC_ADD, a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE,a.ONE,a.ONE)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.SRC_ALPHA,a.ONE)):c===b.SubtractiveBlending?k?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.ZERO,a.ONE_MINUS_SRC_COLOR,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.ONE_MINUS_SRC_COLOR)):c===b.MultiplyBlending?k?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.SRC_COLOR,a.ZERO,a.SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD), a.blendFunc(a.ZERO,a.SRC_COLOR)):k?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)),n=c,C=k;if(c===b.CustomBlending){h=h||d;l=l||g;m=m||f;if(d!==q||h!==z)a.blendEquationSeparate(e(d),e(h)),q=d,z=h;if(g!==v||f!==x||l!==B||m!==A)a.blendFuncSeparate(e(g),e(f),e(l),e(m)),v=g,x=f,B=l,A=m}else A=B= z=x=v=q=null}else this.disable(a.BLEND),n=c};this.setColorWrite=function(a){this.buffers.color.setMask(a)};this.setDepthTest=function(a){this.buffers.depth.setTest(a)};this.setDepthWrite=function(a){this.buffers.depth.setMask(a)};this.setDepthFunc=function(a){this.buffers.depth.setFunc(a)};this.setStencilTest=function(a){this.buffers.stencil.setTest(a)};this.setStencilWrite=function(a){this.buffers.stencil.setMask(a)};this.setStencilFunc=function(a,b,c){this.buffers.stencil.setFunc(a,b,c)};this.setStencilOp= function(a,b,c){this.buffers.stencil.setOp(a,b,c)};this.setFlipSided=function(b){G!==b&&(b?a.frontFace(a.CW):a.frontFace(a.CCW),G=b)};this.setCullFace=function(c){c!==b.CullFaceNone?(this.enable(a.CULL_FACE),c!==D&&(c===b.CullFaceBack?a.cullFace(a.BACK):c===b.CullFaceFront?a.cullFace(a.FRONT):a.cullFace(a.FRONT_AND_BACK))):this.disable(a.CULL_FACE);D=c};this.setLineWidth=function(b){b!==H&&(a.lineWidth(b),H=b)};this.setPolygonOffset=function(b,c,d){if(b){if(this.enable(a.POLYGON_OFFSET_FILL),E!== c||F!==d)a.polygonOffset(c,d),E=c,F=d}else this.disable(a.POLYGON_OFFSET_FILL)};this.getScissorTest=function(){return I};this.setScissorTest=function(b){(I=b)?this.enable(a.SCISSOR_TEST):this.disable(a.SCISSOR_TEST)};this.activeTexture=function(b){void 0===b&&(b=a.TEXTURE0+O-1);J!==b&&(a.activeTexture(b),J=b)};this.bindTexture=function(b,c){null===J&&g.activeTexture();var d=K[J];void 0===d&&(d={type:void 0,texture:void 0},K[J]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||S[b]),d.type=b,d.texture= c};this.compressedTexImage2D=function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(b){console.error(b)}};this.texImage2D=function(){try{a.texImage2D.apply(a,arguments)}catch(b){console.error(b)}};this.clearColor=function(a,b,c,d){this.buffers.color.setClear(a,b,c,d)};this.clearDepth=function(a){this.buffers.depth.setClear(a)};this.clearStencil=function(a){this.buffers.stencil.setClear(a)};this.scissor=function(b){!1===T.equals(b)&&(a.scissor(b.x,b.y,b.z,b.w),T.copy(b))};this.viewport=function(b){!1=== U.equals(b)&&(a.viewport(b.x,b.y,b.z,b.w),U.copy(b))};this.reset=function(){for(var b=0;b<m.length;b++)1===m[b]&&(a.disableVertexAttribArray(b),m[b]=0);t={};J=p=null;K={};D=G=n=null;this.buffers.color.reset();this.buffers.depth.reset();this.buffers.stencil.reset()}};b.WebGLColorBuffer=function(a,c){var e=!1,d=new b.Vector4,g=null,f=new b.Vector4;this.setMask=function(b){g===b||e||(a.colorMask(b,b,b,b),g=b)};this.setLocked=function(a){e=a};this.setClear=function(b,c,e,g){d.set(b,c,e,g);!1===f.equals(d)&& (a.clearColor(b,c,e,g),f.copy(d))};this.reset=function(){e=!1;g=null;f=new b.Vector4}};b.WebGLDepthBuffer=function(a,c){var e=!1,d=null,g=null,f=null;this.setTest=function(b){b?c.enable(a.DEPTH_TEST):c.disable(a.DEPTH_TEST)};this.setMask=function(b){d===b||e||(a.depthMask(b),d=b)};this.setFunc=function(c){if(g!==c){if(c)switch(c){case b.NeverDepth:a.depthFunc(a.NEVER);break;case b.AlwaysDepth:a.depthFunc(a.ALWAYS);break;case b.LessDepth:a.depthFunc(a.LESS);break;case b.LessEqualDepth:a.depthFunc(a.LEQUAL); break;case b.EqualDepth:a.depthFunc(a.EQUAL);break;case b.GreaterEqualDepth:a.depthFunc(a.GEQUAL);break;case b.GreaterDepth:a.depthFunc(a.GREATER);break;case b.NotEqualDepth:a.depthFunc(a.NOTEQUAL);break;default:a.depthFunc(a.LEQUAL)}else a.depthFunc(a.LEQUAL);g=c}};this.setLocked=function(a){e=a};this.setClear=function(b){f!==b&&(a.clearDepth(b),f=b)};this.reset=function(){e=!1;f=g=d=null}};b.WebGLStencilBuffer=function(a,b){var e=!1,d=null,g=null,f=null,l=null,m=null,k=null,t=null,p=null;this.setTest= function(d){d?b.enable(a.STENCIL_TEST):b.disable(a.STENCIL_TEST)};this.setMask=function(b){d===b||e||(a.stencilMask(b),d=b)};this.setFunc=function(b,c,d){if(g!==b||f!==c||l!==d)a.stencilFunc(b,c,d),g=b,f=c,l=d};this.setOp=function(b,c,d){if(m!==b||k!==c||t!==d)a.stencilOp(b,c,d),m=b,k=c,t=d};this.setLocked=function(a){e=a};this.setClear=function(b){p!==b&&(a.clearStencil(b),p=b)};this.reset=function(){e=!1;p=t=k=m=l=f=g=d=null}};b.WebGLUniforms=function(){var a=[],b=[],e=function(b,c,d){var e=b[0]; if(0>=e||0<e)return b;var g=c*d,f=a[g];void 0===f&&(f=new Float32Array(g),a[g]=f);if(0!==c)for(e.toArray(f,0),e=1,g=0;e!==c;++e)g+=d,b[e].toArray(f,g);return f},d=function(a,d){var e=b[d];void 0===e&&(e=new Int32Array(d),b[d]=e);for(var g=0;g!==d;++g)e[g]=a.allocTextureUnit();return e},g=function(a,b){a.uniform1f(this.addr,b)},f=function(a,b){a.uniform1i(this.addr,b)},l=function(a,b){void 0===b.x?a.uniform2fv(this.addr,b):a.uniform2f(this.addr,b.x,b.y)},m=function(a,b){void 0!==b.x?a.uniform3f(this.addr, b.x,b.y,b.z):void 0!==b.r?a.uniform3f(this.addr,b.r,b.g,b.b):a.uniform3fv(this.addr,b)},k=function(a,b){void 0===b.x?a.uniform4fv(this.addr,b):a.uniform4f(this.addr,b.x,b.y,b.z,b.w)},t=function(a,b){a.uniformMatrix2fv(this.addr,!1,b.elements||b)},p=function(a,b){a.uniformMatrix3fv(this.addr,!1,b.elements||b)},n=function(a,b){a.uniformMatrix4fv(this.addr,!1,b.elements||b)},q=function(a,b,c){var d=c.allocTextureUnit();a.uniform1i(this.addr,d);b&&c.setTexture2D(b,d)},v=function(a,b,c){var d=c.allocTextureUnit(); a.uniform1i(this.addr,d);b&&c.setTextureCube(b,d)},x=function(a,b){a.uniform2iv(this.addr,b)},z=function(a,b){a.uniform3iv(this.addr,b)},B=function(a,b){a.uniform4iv(this.addr,b)},A=function(a){switch(a){case 5126:return g;case 35664:return l;case 35665:return m;case 35666:return k;case 35674:return t;case 35675:return p;case 35676:return n;case 35678:return q;case 35680:return v;case 5124:case 35670:return f;case 35667:case 35671:return x;case 35668:case 35672:return z;case 35669:case 35673:return B}}, C=function(a,b){a.uniform1fv(this.addr,b)},G=function(a,b){a.uniform1iv(this.addr,b)},D=function(a,b){a.uniform2fv(this.addr,e(b,this.size,2))},H=function(a,b){a.uniform3fv(this.addr,e(b,this.size,3))},E=function(a,b){a.uniform4fv(this.addr,e(b,this.size,4))},F=function(a,b){a.uniformMatrix2fv(this.addr,!1,e(b,this.size,4))},I=function(a,b){a.uniformMatrix3fv(this.addr,!1,e(b,this.size,9))},O=function(a,b){a.uniformMatrix4fv(this.addr,!1,e(b,this.size,16))},J=function(a,b,c){var e=b.length,g=d(c, e);a.uniform1iv(this.addr,g);for(a=0;a!==e;++a){var f=b[a];f&&c.setTexture2D(f,g[a])}},K=function(a,b,c){var e=b.length,g=d(c,e);a.uniform1iv(this.addr,g);for(a=0;a!==e;++a){var f=b[a];f&&c.setTextureCube(f,g[a])}},T=function(a){switch(a){case 5126:return C;case 35664:return D;case 35665:return H;case 35666:return E;case 35674:return F;case 35675:return I;case 35676:return O;case 35678:return J;case 35680:return K;case 5124:case 35670:return G;case 35667:case 35671:return x;case 35668:case 35672:return z; case 35669:case 35673:return B}},U=function(a,b,c){this.id=a;this.addr=c;this.setValue=A(b.type)},S=function(a,b,c){this.id=a;this.addr=c;this.size=b.size;this.setValue=T(b.type)},L=function(a){this.id=a;this.seq=[];this.map={}};L.prototype.setValue=function(a,b){for(var c=this.seq,d=0,e=c.length;d!==e;++d){var g=c[d];g.setValue(a,b[g.id])}};var P=/([\w\d_]+)(\])?(\[|\.)?/g,Q=function(a,b,c){this.seq=[];this.map={};this.renderer=c;c=a.getProgramParameter(b,a.ACTIVE_UNIFORMS);for(var d=0;d!==c;++d){var e= a.getActiveUniform(b,d),g=a.getUniformLocation(b,e.name),f=this,h=e.name,l=h.length;for(P.lastIndex=0;;){var m=P.exec(h),k=P.lastIndex,r=m[1],t=m[3];"]"===m[2]&&(r|=0);if(void 0===t||"["===t&&k+2===l){h=f;e=void 0===t?new U(r,e,g):new S(r,e,g);h.seq.push(e);h.map[e.id]=e;break}else t=f.map[r],void 0===t&&(t=new L(r),r=f,f=t,r.seq.push(f),r.map[f.id]=f),f=t}}};Q.prototype.setValue=function(a,b,c){b=this.map[b];void 0!==b&&b.setValue(a,c,this.renderer)};Q.prototype.set=function(a,b,c){var d=this.map[c]; void 0!==d&&d.setValue(a,b[c],this.renderer)};Q.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Q.upload=function(a,b,c,d){for(var e=0,g=b.length;e!==g;++e){var f=b[e],h=c[f.id];!1!==h.needsUpdate&&f.setValue(a,h.value,d)}};Q.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var g=a[d];g.id in b&&c.push(g)}return c};Q.splitDynamic=function(a,b){for(var c=null,d=a.length,e=0,g=0;g!==d;++g){var f=a[g],h=b[f.id];h&&!0===h.dynamic?(null===c&&(c=[]),c.push(f)): (e<g&&(a[e]=f),++e)}e<d&&(a.length=e);return c};Q.evalDynamic=function(a,b,c,d){for(var e=0,g=a.length;e!==g;++e){var f=b[a[e].id],h=f.onUpdateCallback;void 0!==h&&h.call(f,c,d)}};return Q}();b.LensFlarePlugin=function(a,c){var e,d,g,f,l,m,k,t,p,n,q=a.context,v=a.state,x,z,B,A,C,G;this.render=function(D,H,E){if(0!==c.length){D=new b.Vector3;var F=E.w/E.z,I=.5*E.z,O=.5*E.w,J=16/E.w,K=new b.Vector2(J*F,J),T=new b.Vector3(1,1,0),U=new b.Vector2(1,1),S=new b.Box2;S.min.set(0,0);S.max.set(E.z-16,E.w-16); if(void 0===A){var J=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),L=new Uint16Array([0,1,2,0,2,3]);x=q.createBuffer();z=q.createBuffer();q.bindBuffer(q.ARRAY_BUFFER,x);q.bufferData(q.ARRAY_BUFFER,J,q.STATIC_DRAW);q.bindBuffer(q.ELEMENT_ARRAY_BUFFER,z);q.bufferData(q.ELEMENT_ARRAY_BUFFER,L,q.STATIC_DRAW);C=q.createTexture();G=q.createTexture();v.bindTexture(q.TEXTURE_2D,C);q.texImage2D(q.TEXTURE_2D,0,q.RGB,16,16,0,q.RGB,q.UNSIGNED_BYTE,null);q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_S, q.CLAMP_TO_EDGE);q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_T,q.CLAMP_TO_EDGE);q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MAG_FILTER,q.NEAREST);q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MIN_FILTER,q.NEAREST);v.bindTexture(q.TEXTURE_2D,G);q.texImage2D(q.TEXTURE_2D,0,q.RGBA,16,16,0,q.RGBA,q.UNSIGNED_BYTE,null);q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_S,q.CLAMP_TO_EDGE);q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_T,q.CLAMP_TO_EDGE);q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MAG_FILTER,q.NEAREST);q.texParameteri(q.TEXTURE_2D, q.TEXTURE_MIN_FILTER,q.NEAREST);var J=B={vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nuniform sampler2D occlusionMap;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif ( renderType == 2 ) {\nvec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );\nvVisibility = visibility.r / 9.0;\nvVisibility *= 1.0 - visibility.g / 9.0;\nvVisibility *= visibility.b / 9.0;\nvVisibility *= 1.0 - visibility.a / 9.0;\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}", fragmentShader:"uniform lowp int renderType;\nuniform sampler2D map;\nuniform float opacity;\nuniform vec3 color;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nif ( renderType == 0 ) {\ngl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );\n} else if ( renderType == 1 ) {\ngl_FragColor = texture2D( map, vUV );\n} else {\nvec4 texture = texture2D( map, vUV );\ntexture.a *= opacity * vVisibility;\ngl_FragColor = texture;\ngl_FragColor.rgb *= color;\n}\n}"},L=q.createProgram(),P=q.createShader(q.FRAGMENT_SHADER), Q=q.createShader(q.VERTEX_SHADER),M="precision "+a.getPrecision()+" float;\n";q.shaderSource(P,M+J.fragmentShader);q.shaderSource(Q,M+J.vertexShader);q.compileShader(P);q.compileShader(Q);q.attachShader(L,P);q.attachShader(L,Q);q.linkProgram(L);A=L;p=q.getAttribLocation(A,"position");n=q.getAttribLocation(A,"uv");e=q.getUniformLocation(A,"renderType");d=q.getUniformLocation(A,"map");g=q.getUniformLocation(A,"occlusionMap");f=q.getUniformLocation(A,"opacity");l=q.getUniformLocation(A,"color");m=q.getUniformLocation(A, "scale");k=q.getUniformLocation(A,"rotation");t=q.getUniformLocation(A,"screenPosition")}q.useProgram(A);v.initAttributes();v.enableAttribute(p);v.enableAttribute(n);v.disableUnusedAttributes();q.uniform1i(g,0);q.uniform1i(d,1);q.bindBuffer(q.ARRAY_BUFFER,x);q.vertexAttribPointer(p,2,q.FLOAT,!1,16,0);q.vertexAttribPointer(n,2,q.FLOAT,!1,16,8);q.bindBuffer(q.ELEMENT_ARRAY_BUFFER,z);v.disable(q.CULL_FACE);v.setDepthWrite(!1);L=0;for(P=c.length;L<P;L++)if(J=16/E.w,K.set(J*F,J),Q=c[L],D.set(Q.matrixWorld.elements[12], Q.matrixWorld.elements[13],Q.matrixWorld.elements[14]),D.applyMatrix4(H.matrixWorldInverse),D.applyProjection(H.projectionMatrix),T.copy(D),U.x=E.x+T.x*I+I-8,U.y=E.y+T.y*O+O-8,!0===S.containsPoint(U)){v.activeTexture(q.TEXTURE0);v.bindTexture(q.TEXTURE_2D,null);v.activeTexture(q.TEXTURE1);v.bindTexture(q.TEXTURE_2D,C);q.copyTexImage2D(q.TEXTURE_2D,0,q.RGB,U.x,U.y,16,16,0);q.uniform1i(e,0);q.uniform2f(m,K.x,K.y);q.uniform3f(t,T.x,T.y,T.z);v.disable(q.BLEND);v.enable(q.DEPTH_TEST);q.drawElements(q.TRIANGLES, 6,q.UNSIGNED_SHORT,0);v.activeTexture(q.TEXTURE0);v.bindTexture(q.TEXTURE_2D,G);q.copyTexImage2D(q.TEXTURE_2D,0,q.RGBA,U.x,U.y,16,16,0);q.uniform1i(e,1);v.disable(q.DEPTH_TEST);v.activeTexture(q.TEXTURE1);v.bindTexture(q.TEXTURE_2D,C);q.drawElements(q.TRIANGLES,6,q.UNSIGNED_SHORT,0);Q.positionScreen.copy(T);Q.customUpdateCallback?Q.customUpdateCallback(Q):Q.updateLensFlares();q.uniform1i(e,2);v.enable(q.BLEND);for(var M=0,V=Q.lensFlares.length;M<V;M++){var X=Q.lensFlares[M];.001<X.opacity&&.001<X.scale&& (T.x=X.x,T.y=X.y,T.z=X.z,J=X.size*X.scale/E.w,K.x=J*F,K.y=J,q.uniform3f(t,T.x,T.y,T.z),q.uniform2f(m,K.x,K.y),q.uniform1f(k,X.rotation),q.uniform1f(f,X.opacity),q.uniform3f(l,X.color.r,X.color.g,X.color.b),v.setBlending(X.blending,X.blendEquation,X.blendSrc,X.blendDst),a.setTexture2D(X.texture,1),q.drawElements(q.TRIANGLES,6,q.UNSIGNED_SHORT,0))}}v.enable(q.CULL_FACE);v.enable(q.DEPTH_TEST);v.setDepthWrite(!0);a.resetGLState()}}};b.SpritePlugin=function(a,c){var e,d,g,f,l,m,k,t,p,n,q,v,x,z,B,A,C; function G(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:b.id-a.id}var D=a.context,H=a.state,E,F,I,O,J=new b.Vector3,K=new b.Quaternion,T=new b.Vector3;this.render=function(U,S){if(0!==c.length){if(void 0===I){var L=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),P=new Uint16Array([0,1,2,0,2,3]);E=D.createBuffer();F=D.createBuffer();D.bindBuffer(D.ARRAY_BUFFER,E);D.bufferData(D.ARRAY_BUFFER,L,D.STATIC_DRAW);D.bindBuffer(D.ELEMENT_ARRAY_BUFFER, F);D.bufferData(D.ELEMENT_ARRAY_BUFFER,P,D.STATIC_DRAW);var L=D.createProgram(),P=D.createShader(D.VERTEX_SHADER),Q=D.createShader(D.FRAGMENT_SHADER);D.shaderSource(P,["precision "+a.getPrecision()+" float;","uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uvOffset + uv * uvScale;\nvec2 alignedPosition = position * scale;\nvec2 rotatedPosition;\nrotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\nrotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\nvec4 finalPosition;\nfinalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\nfinalPosition.xy += rotatedPosition;\nfinalPosition = projectionMatrix * finalPosition;\ngl_Position = finalPosition;\n}"].join("\n")); D.shaderSource(Q,["precision "+a.getPrecision()+" float;","uniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\nvarying vec2 vUV;\nvoid main() {\nvec4 texture = texture2D( map, vUV );\nif ( texture.a < alphaTest ) discard;\ngl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\nif ( fogType > 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"].join("\n")); D.compileShader(P);D.compileShader(Q);D.attachShader(L,P);D.attachShader(L,Q);D.linkProgram(L);I=L;A=D.getAttribLocation(I,"position");C=D.getAttribLocation(I,"uv");e=D.getUniformLocation(I,"uvOffset");d=D.getUniformLocation(I,"uvScale");g=D.getUniformLocation(I,"rotation");f=D.getUniformLocation(I,"scale");l=D.getUniformLocation(I,"color");m=D.getUniformLocation(I,"map");k=D.getUniformLocation(I,"opacity");t=D.getUniformLocation(I,"modelViewMatrix");p=D.getUniformLocation(I,"projectionMatrix");n= D.getUniformLocation(I,"fogType");q=D.getUniformLocation(I,"fogDensity");v=D.getUniformLocation(I,"fogNear");x=D.getUniformLocation(I,"fogFar");z=D.getUniformLocation(I,"fogColor");B=D.getUniformLocation(I,"alphaTest");L=document.createElement("canvas");L.width=8;L.height=8;P=L.getContext("2d");P.fillStyle="white";P.fillRect(0,0,8,8);O=new b.Texture(L);O.needsUpdate=!0}D.useProgram(I);H.initAttributes();H.enableAttribute(A);H.enableAttribute(C);H.disableUnusedAttributes();H.disable(D.CULL_FACE);H.enable(D.BLEND); D.bindBuffer(D.ARRAY_BUFFER,E);D.vertexAttribPointer(A,2,D.FLOAT,!1,16,0);D.vertexAttribPointer(C,2,D.FLOAT,!1,16,8);D.bindBuffer(D.ELEMENT_ARRAY_BUFFER,F);D.uniformMatrix4fv(p,!1,S.projectionMatrix.elements);H.activeTexture(D.TEXTURE0);D.uniform1i(m,0);P=L=0;(Q=U.fog)?(D.uniform3f(z,Q.color.r,Q.color.g,Q.color.b),Q instanceof b.Fog?(D.uniform1f(v,Q.near),D.uniform1f(x,Q.far),D.uniform1i(n,1),P=L=1):Q instanceof b.FogExp2&&(D.uniform1f(q,Q.density),D.uniform1i(n,2),P=L=2)):(D.uniform1i(n,0),P=L=0); for(var Q=0,M=c.length;Q<M;Q++){var V=c[Q];V.modelViewMatrix.multiplyMatrices(S.matrixWorldInverse,V.matrixWorld);V.z=-V.modelViewMatrix.elements[14]}c.sort(G);for(var X=[],Q=0,M=c.length;Q<M;Q++){var V=c[Q],W=V.material;D.uniform1f(B,W.alphaTest);D.uniformMatrix4fv(t,!1,V.modelViewMatrix.elements);V.matrixWorld.decompose(J,K,T);X[0]=T.x;X[1]=T.y;V=0;U.fog&&W.fog&&(V=P);L!==V&&(D.uniform1i(n,V),L=V);null!==W.map?(D.uniform2f(e,W.map.offset.x,W.map.offset.y),D.uniform2f(d,W.map.repeat.x,W.map.repeat.y)): (D.uniform2f(e,0,0),D.uniform2f(d,1,1));D.uniform1f(k,W.opacity);D.uniform3f(l,W.color.r,W.color.g,W.color.b);D.uniform1f(g,W.rotation);D.uniform2fv(f,X);H.setBlending(W.blending,W.blendEquation,W.blendSrc,W.blendDst);H.setDepthTest(W.depthTest);H.setDepthWrite(W.depthWrite);W.map?a.setTexture2D(W.map,0):a.setTexture2D(O,0);D.drawElements(D.TRIANGLES,6,D.UNSIGNED_SHORT,0)}H.enable(D.CULL_FACE);a.resetGLState()}}};Object.assign(b,{Face4:function(a,c,e,d,g,f,l){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."); return new b.Face3(a,c,e,g,f,l)},LineStrip:0,LinePieces:1,MeshFaceMaterial:b.MultiMaterial,PointCloud:function(a,c){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new b.Points(a,c)},Particle:b.Sprite,ParticleSystem:function(a,c){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new b.Points(a,c)},PointCloudMaterial:function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new b.PointsMaterial(a)},ParticleBasicMaterial:function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."); return new b.PointsMaterial(a)},ParticleSystemMaterial:function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new b.PointsMaterial(a)},Vertex:function(a,c,e){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new b.Vector3(a,c,e)}});Object.assign(b.Box2.prototype,{empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."); return this.intersectsBox(a)}});Object.assign(b.Box3.prototype,{empty:function(){console.warn("THREE.Box3: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)}});Object.assign(b.Matrix3.prototype, {multiplyVector3:function(a){console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)},multiplyVector3Array:function(a){console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.");return this.applyToVector3Array(a)}});Object.assign(b.Matrix4.prototype,{extractPosition:function(a){console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."); return this.copyPosition(a)},setRotationFromQuaternion:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");return this.makeRotationFromQuaternion(a)},multiplyVector3:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.");return a.applyProjection(this)},multiplyVector4:function(a){console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."); return a.applyMatrix4(this)},multiplyVector3Array:function(a){console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.");return this.applyToVector3Array(a)},rotateAxis:function(a){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.");a.transformDirection(this)},crossVector:function(a){console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."); return a.applyMatrix4(this)},translate:function(a){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(a){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(a){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(a){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(a,b){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")}});Object.assign(b.Plane.prototype,{isIntersectionLine:function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."); return this.intersectsLine(a)}});Object.assign(b.Quaternion.prototype,{multiplyVector3:function(a){console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.");return a.applyQuaternion(this)}});Object.assign(b.Ray.prototype,{isIntersectionBox:function(a){console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},isIntersectionPlane:function(a){console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."); return this.intersectsPlane(a)},isIntersectionSphere:function(a){console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)}});Object.assign(b.Vector3.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")}, getPositionFromMatrix:function(a){console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().");return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a,b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(b, a)}});Object.assign(b.Object3D.prototype,{getChildByName:function(a){console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a)},renderDepth:function(a){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(a,b){console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.");return this.translateOnAxis(b,a)}});Object.defineProperties(b.Object3D.prototype, {eulerOrder:{get:function(){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");return this.rotation.order},set:function(a){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order.");this.rotation.order=a}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(a){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}); Object.defineProperties(b.LOD.prototype,{objects:{get:function(){console.warn("THREE.LOD: .objects has been renamed to .levels.");return this.levels}}});b.PerspectiveCamera.prototype.setLens=function(a,b){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup.");void 0!==b&&(this.filmGauge=b);this.setFocalLength(a)};Object.defineProperties(b.Light.prototype,{onlyShadow:{set:function(a){console.warn("THREE.Light: .onlyShadow has been removed.")}}, shadowCameraFov:{set:function(a){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov.");this.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left.");this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right.");this.shadow.camera.right=a}},shadowCameraTop:{set:function(a){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."); this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.");this.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near.");this.shadow.camera.near=a}},shadowCameraFar:{set:function(a){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far.");this.shadow.camera.far=a}},shadowCameraVisible:{set:function(a){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}}, shadowBias:{set:function(a){console.warn("THREE.Light: .shadowBias is now .shadow.bias.");this.shadow.bias=a}},shadowDarkness:{set:function(a){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(a){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.");this.shadow.mapSize.width=a}},shadowMapHeight:{set:function(a){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.");this.shadow.mapSize.height=a}}});Object.defineProperties(b.BufferAttribute.prototype, {length:{get:function(){console.warn("THREE.BufferAttribute: .length has been deprecated. Please use .count.");return this.array.length}}});Object.assign(b.BufferGeometry.prototype,{addIndex:function(a){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().");this.setIndex(a)},addDrawCall:function(a,b,e){void 0!==e&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.");console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."); this.addGroup(a,b)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().");this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}});Object.defineProperties(b.BufferGeometry.prototype,{drawcalls:{get:function(){console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."); return this.groups}},offsets:{get:function(){console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups.");return this.groups}}});Object.defineProperties(b.Material.prototype,{wrapAround:{get:function(){console.warn("THREE."+this.type+": .wrapAround has been removed.")},set:function(a){console.warn("THREE."+this.type+": .wrapAround has been removed.")}},wrapRGB:{get:function(){console.warn("THREE."+this.type+": .wrapRGB has been removed.");return new b.Color}}});Object.defineProperties(b.MeshPhongMaterial.prototype, {metal:{get:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.");return!1},set:function(a){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}});Object.defineProperties(b.ShaderMaterial.prototype,{derivatives:{get:function(){console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.");return this.extensions.derivatives},set:function(a){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."); this.extensions.derivatives=a}}});b.EventDispatcher.prototype=Object.assign(Object.create({constructor:b.EventDispatcher,apply:function(a){console.warn("THREE.EventDispatcher: .apply is deprecated, just inherit or Object.assign the prototype to mix-in.");Object.assign(a,this)}}),b.EventDispatcher.prototype);Object.assign(b.WebGLRenderer.prototype,{supportsFloatTextures:function(){console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).");return this.extensions.get("OES_texture_float")}, supportsHalfFloatTextures:function(){console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).");return this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).");return this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."); return this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).");return this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).");return this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return this.capabilities.vertexTextures}, supportsInstancedArrays:function(){console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).");return this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(a){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().");this.setScissorTest(a)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")}, addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")}});Object.defineProperties(b.WebGLRenderer.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.");this.shadowMap.enabled=a}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."); this.shadowMap.type=a}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.");this.shadowMap.cullFace=a}}});Object.defineProperties(b.WebGLShadowMap.prototype,{cullFace:{get:function(){return this.renderReverseSided?b.CullFaceFront:b.CullFaceBack},set:function(a){a=a!==b.CullFaceBack;console.warn("WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to "+a+ ".");this.renderReverseSided=a}}});Object.defineProperties(b.WebGLRenderTarget.prototype,{wrapS:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");return this.texture.wrapS},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");this.texture.wrapS=a}},wrapT:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");return this.texture.wrapT},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."); this.texture.wrapT=a}},magFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");return this.texture.magFilter},set:function(a){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");this.texture.magFilter=a}},minFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");return this.texture.minFilter},set:function(a){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."); this.texture.minFilter=a}},anisotropy:{get:function(){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");return this.texture.anisotropy},set:function(a){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");this.texture.anisotropy=a}},offset:{get:function(){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset.");return this.texture.offset},set:function(a){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."); this.texture.offset=a}},repeat:{get:function(){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");return this.texture.repeat},set:function(a){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");this.texture.repeat=a}},format:{get:function(){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");return this.texture.format},set:function(a){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");this.texture.format=a}},type:{get:function(){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."); return this.texture.type},set:function(a){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type.");this.texture.type=a}},generateMipmaps:{get:function(){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");return this.texture.generateMipmaps},set:function(a){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");this.texture.generateMipmaps=a}}});Object.assign(b.Audio.prototype,{load:function(a){console.warn("THREE.Audio: .load has been deprecated. Please use THREE.AudioLoader."); var c=this;(new b.AudioLoader).load(a,function(a){c.setBuffer(a)});return this}});Object.assign(b.AudioAnalyser.prototype,{getData:function(a){console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData().");return this.getFrequencyData()}});b.GeometryUtils={merge:function(a,c,e){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var d;c instanceof b.Mesh&&(c.matrixAutoUpdate&&c.updateMatrix(), d=c.matrix,c=c.geometry);a.merge(c,d,e)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};b.ImageUtils={crossOrigin:void 0,loadTexture:function(a,c,e,d){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var g=new b.TextureLoader;g.setCrossOrigin(this.crossOrigin);a=g.load(a,e,void 0,d);c&&(a.mapping=c);return a},loadTextureCube:function(a,c,e,d){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead."); var g=new b.CubeTextureLoader;g.setCrossOrigin(this.crossOrigin);a=g.load(a,e,void 0,d);c&&(a.mapping=c);return a},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}};b.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."); this.projectVector=function(a,b){console.warn("THREE.Projector: .projectVector() is now vector.project().");a.project(b)};this.unprojectVector=function(a,b){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject().");a.unproject(b)};this.pickingRay=function(a,b){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}};b.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js");this.domElement= document.createElement("canvas");this.clear=function(){};this.render=function(){};this.setClearColor=function(){};this.setSize=function(){}};b.CurveUtils={tangentQuadraticBezier:function(a,b,e,d){return 2*(1-a)*(e-b)+2*a*(d-e)},tangentCubicBezier:function(a,b,e,d,g){return-3*b*(1-a)*(1-a)+3*e*(1-a)*(1-a)-6*a*e*(1-a)+6*a*d*(1-a)-3*a*a*d+3*a*a*g},tangentSpline:function(a,b,e,d,g){return 6*a*a-6*a+(3*a*a-4*a+1)+(-6*a*a+6*a)+(3*a*a-2*a)},interpolate:function(a,b,e,d,g){a=.5*(e-a);d=.5*(d-b);var f=g*g; return(2*b-2*e+a+d)*g*f+(-3*b+3*e-2*a-d)*f+a*g+b}};b.SceneUtils={createMultiMaterialObject:function(a,c){for(var e=new b.Group,d=0,g=c.length;d<g;d++)e.add(new b.Mesh(a,c[d]));return e},detach:function(a,b,e){a.applyMatrix(b.matrixWorld);b.remove(a);e.add(a)},attach:function(a,c,e){var d=new b.Matrix4;d.getInverse(e.matrixWorld);a.applyMatrix(d);c.remove(a);e.add(a)}};b.ShapeUtils={area:function(a){for(var b=a.length,e=0,d=b-1,g=0;g<b;d=g++)e+=a[d].x*a[g].y-a[g].x*a[d].y;return.5*e},triangulate:function(){return function(a, c){var e=a.length;if(3>e)return null;var d=[],g=[],f=[],l,m,k;if(0<b.ShapeUtils.area(a))for(m=0;m<e;m++)g[m]=m;else for(m=0;m<e;m++)g[m]=e-1-m;var t=2*e;for(m=e-1;2<e;){if(0>=t--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}l=m;e<=l&&(l=0);m=l+1;e<=m&&(m=0);k=m+1;e<=k&&(k=0);var p;a:{var n=p=void 0,q=void 0,v=void 0,x=void 0,z=void 0,B=void 0,A=void 0,C=void 0,n=a[g[l]].x,q=a[g[l]].y,v=a[g[m]].x,x=a[g[m]].y,z=a[g[k]].x,B=a[g[k]].y;if(Number.EPSILON>(v-n)* (B-q)-(x-q)*(z-n))p=!1;else{var G=void 0,D=void 0,H=void 0,E=void 0,F=void 0,I=void 0,O=void 0,J=void 0,K=void 0,T=void 0,K=J=O=C=A=void 0,G=z-v,D=B-x,H=n-z,E=q-B,F=v-n,I=x-q;for(p=0;p<e;p++)if(A=a[g[p]].x,C=a[g[p]].y,!(A===n&&C===q||A===v&&C===x||A===z&&C===B)&&(O=A-n,J=C-q,K=A-v,T=C-x,A-=z,C-=B,K=G*T-D*K,O=F*J-I*O,J=H*C-E*A,K>=-Number.EPSILON&&J>=-Number.EPSILON&&O>=-Number.EPSILON)){p=!1;break a}p=!0}}if(p){d.push([a[g[l]],a[g[m]],a[g[k]]]);f.push([g[l],g[m],g[k]]);l=m;for(k=m+1;k<e;l++,k++)g[l]= g[k];e--;t=2*e}}return c?f:d}}(),triangulateShape:function(a,c){function e(a,b,c){return a.x!==b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:b.y<=c.y&&c.y<=a.y}function d(a,b,c,d,f){var g=b.x-a.x,h=b.y-a.y,l=d.x-c.x,m=d.y-c.y,k=a.x-c.x,r=a.y-c.y,t=h*l-g*m,p=h*k-g*r;if(Math.abs(t)>Number.EPSILON){if(0<t){if(0>p||p>t)return[];l=m*k-l*r;if(0>l||l>t)return[]}else{if(0<p||p<t)return[];l=m*k-l*r;if(0<l||l<t)return[]}if(0===l)return!f||0!==p&&p!==t?[a]:[];if(l===t)return!f|| 0!==p&&p!==t?[b]:[];if(0===p)return[c];if(p===t)return[d];f=l/t;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==p||m*k!==l*r)return[];h=0===g&&0===h;l=0===l&&0===m;if(h&&l)return a.x!==c.x||a.y!==c.y?[]:[a];if(h)return e(c,d,a)?[a]:[];if(l)return e(a,b,c)?[c]:[];0!==g?(a.x<b.x?(g=a,l=a.x,h=b,a=b.x):(g=b,l=b.x,h=a,a=a.x),c.x<d.x?(b=c,t=c.x,m=d,c=d.x):(b=d,t=d.x,m=c,c=c.x)):(a.y<b.y?(g=a,l=a.y,h=b,a=b.y):(g=b,l=b.y,h=a,a=a.y),c.y<d.y?(b=c,t=c.y,m=d,c=d.y):(b=d,t=d.y,m=c,c=c.y));return l<=t?a<t?[]:a===t?f?[]:[b]: a<=c?[b,h]:[b,m]:l>c?[]:l===c?f?[]:[g]:a<=c?[g,h]:[g,m]}function f(a,b,c,d){var e=b.x-a.x,g=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var h=d.x-a.x;d=d.y-a.y;a=e*c-g*b;e=e*d-g*h;return Math.abs(a)>Number.EPSILON?(b=h*c-d*b,0<a?0<=e&&0<=b:0<=e||0<=b):0<e}var h,l,m,k,t,p={};m=a.concat();h=0;for(l=c.length;h<l;h++)Array.prototype.push.apply(m,c[h]);h=0;for(l=m.length;h<l;h++)t=m[h].x+":"+m[h].y,void 0!==p[t]&&console.warn("THREE.Shape: Duplicate point",t),p[t]=h;h=function(a,b){function c(a,b){var d=l.length-1,e= a-1;0>e&&(e=d);var h=a+1;h>d&&(h=0);d=f(l[a],l[e],l[h],m[b]);if(!d)return!1;d=m.length-1;e=b-1;0>e&&(e=d);h=b+1;h>d&&(h=0);return(d=f(m[b],m[e],m[h],l[a]))?!0:!1}function e(a,b){var c,f;for(c=0;c<l.length;c++)if(f=c+1,f%=l.length,f=d(a,b,l[c],l[f],!0),0<f.length)return!0;return!1}function h(a,c){var e,f,g,l;for(e=0;e<k.length;e++)for(f=b[k[e]],g=0;g<f.length;g++)if(l=g+1,l%=f.length,l=d(a,c,f[g],f[l],!0),0<l.length)return!0;return!1}var l=a.concat(),m,k=[],r,t,p,n,u,w=[],J,K,T,U=0;for(r=b.length;U< r;U++)k.push(U);J=0;for(var S=2*k.length;0<k.length;){S--;if(0>S){console.log("Infinite Loop! Holes left:"+k.length+", Probably Hole outside Shape!");break}for(t=J;t<l.length;t++){p=l[t];r=-1;for(U=0;U<k.length;U++)if(n=k[U],u=p.x+":"+p.y+":"+n,void 0===w[u]){m=b[n];for(K=0;K<m.length;K++)if(n=m[K],c(t,K)&&!e(p,n)&&!h(p,n)){r=K;k.splice(U,1);J=l.slice(0,t+1);n=l.slice(t);K=m.slice(r);T=m.slice(0,r+1);l=J.concat(K).concat(T).concat(n);J=t;break}if(0<=r)break;w[u]=!0}if(0<=r)break}}return l}(a,c);var n= b.ShapeUtils.triangulate(h,!1);h=0;for(l=n.length;h<l;h++)for(k=n[h],m=0;3>m;m++)t=k[m].x+":"+k[m].y,t=p[t],void 0!==t&&(k[m]=t);return n.concat()},isClockWise:function(a){return 0>b.ShapeUtils.area(a)},b2:function(){return function(a,b,e,d){var f=1-a;return f*f*b+2*(1-a)*a*e+a*a*d}}(),b3:function(){return function(a,b,e,d,f){var h=1-a,l=1-a;return h*h*h*b+3*l*l*a*e+3*(1-a)*a*a*d+a*a*a*f}}()};b.Curve=function(){};b.Curve.prototype={constructor:b.Curve,getPoint:function(a){console.warn("THREE.Curve: Warning, getPoint() not implemented!"); return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){a||(a=5);var b,e=[];for(b=0;b<=a;b++)e.push(this.getPoint(b/a));return e},getSpacedPoints:function(a){a||(a=5);var b,e=[];for(b=0;b<=a;b++)e.push(this.getPointAt(b/a));return e},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){a||(a=this.__arcLengthDivisions?this.__arcLengthDivisions:200);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths; this.needsUpdate=!1;var b=[],e,d=this.getPoint(0),f,h=0;b.push(0);for(f=1;f<=a;f++)e=this.getPoint(f/a),h+=e.distanceTo(d),b.push(h),d=e;return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var e=this.getLengths(),d=0,f=e.length,h;h=b?b:a*e[f-1];for(var l=0,m=f-1,k;l<=m;)if(d=Math.floor(l+(m-l)/2),k=e[d]-h,0>k)l=d+1;else if(0<k)m=d-1;else{m=d;break}d=m;if(e[d]===h)return d/(f-1);l=e[d];return e=(d+(h-l)/(e[d+1]-l))/(f-1)},getTangent:function(a){var b= a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)}};b.Curve.create=function(a,c){a.prototype=Object.create(b.Curve.prototype);a.prototype.constructor=a;a.prototype.getPoint=c;return a};b.CurvePath=function(){this.curves=[];this.autoClose=!1};b.CurvePath.prototype=Object.assign(Object.create(b.Curve.prototype),{constructor:b.CurvePath,add:function(a){this.curves.push(a)}, closePath:function(){var a=this.curves[0].getPoint(0),c=this.curves[this.curves.length-1].getPoint(1);a.equals(c)||this.curves.push(new b.LineCurve(c,a))},getPoint:function(a){for(var b=a*this.getLength(),e=this.getCurveLengths(),d=0;d<e.length;){if(e[d]>=b)return a=this.curves[d],b=1-(e[d]-b)/a.getLength(),a.getPointAt(b);d++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths; for(var a=[],b=0,e=0,d=this.curves.length;e<d;e++)b+=this.curves[e].getLength(),a.push(b);return this.cacheLengths=a},createPointsGeometry:function(a){a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){for(var c=new b.Geometry,e=0,d=a.length;e<d;e++){var f=a[e];c.vertices.push(new b.Vector3(f.x,f.y,f.z||0))}return c}});b.Font=function(a){this.data=a};Object.assign(b.Font.prototype, {generateShapes:function(a,c,e){void 0===c&&(c=100);void 0===e&&(e=4);var d=this.data;a=String(a).split("");var f=c/d.resolution,h=0;c=[];for(var l=0;l<a.length;l++){var m;m=f;var k=h,t=d.glyphs[a[l]]||d.glyphs["?"];if(t){var p=new b.Path,n=[],q=b.ShapeUtils.b2,v=b.ShapeUtils.b3,x=void 0,z=void 0,B=z=x=void 0,A=void 0,C=void 0,G=void 0,D=void 0,H=void 0,A=void 0;if(t.o)for(var E=t._cachedOutline||(t._cachedOutline=t.o.split(" ")),F=0,I=E.length;F<I;)switch(E[F++]){case "m":x=E[F++]*m+k;z=E[F++]*m; p.moveTo(x,z);break;case "l":x=E[F++]*m+k;z=E[F++]*m;p.lineTo(x,z);break;case "q":x=E[F++]*m+k;z=E[F++]*m;C=E[F++]*m+k;G=E[F++]*m;p.quadraticCurveTo(C,G,x,z);if(A=n[n.length-1])for(var B=A.x,A=A.y,O=1;O<=e;O++){var J=O/e;q(J,B,C,x);q(J,A,G,z)}break;case "b":if(x=E[F++]*m+k,z=E[F++]*m,C=E[F++]*m+k,G=E[F++]*m,D=E[F++]*m+k,H=E[F++]*m,p.bezierCurveTo(C,G,D,H,x,z),A=n[n.length-1])for(B=A.x,A=A.y,O=1;O<=e;O++)J=O/e,v(J,B,C,D,x),v(J,A,G,H,z)}m={offset:t.ha*m,path:p}}else m=void 0;h+=m.offset;c.push(m.path)}e= [];d=0;for(a=c.length;d<a;d++)Array.prototype.push.apply(e,c[d].toShapes());return e}});b.Path=function(a){b.CurvePath.call(this);this.actions=[];a&&this.fromPoints(a)};b.Path.prototype=Object.assign(Object.create(b.CurvePath.prototype),{constructor:b.Path,fromPoints:function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,e=a.length;b<e;b++)this.lineTo(a[b].x,a[b].y)},moveTo:function(a,b){this.actions.push({action:"moveTo",args:[a,b]})},lineTo:function(a,c){var e=this.actions[this.actions.length-1].args, e=new b.LineCurve(new b.Vector2(e[e.length-2],e[e.length-1]),new b.Vector2(a,c));this.curves.push(e);this.actions.push({action:"lineTo",args:[a,c]})},quadraticCurveTo:function(a,c,e,d){var f=this.actions[this.actions.length-1].args,f=new b.QuadraticBezierCurve(new b.Vector2(f[f.length-2],f[f.length-1]),new b.Vector2(a,c),new b.Vector2(e,d));this.curves.push(f);this.actions.push({action:"quadraticCurveTo",args:[a,c,e,d]})},bezierCurveTo:function(a,c,e,d,f,h){var l=this.actions[this.actions.length- 1].args,l=new b.CubicBezierCurve(new b.Vector2(l[l.length-2],l[l.length-1]),new b.Vector2(a,c),new b.Vector2(e,d),new b.Vector2(f,h));this.curves.push(l);this.actions.push({action:"bezierCurveTo",args:[a,c,e,d,f,h]})},splineThru:function(a){var c=Array.prototype.slice.call(arguments),e=this.actions[this.actions.length-1].args,e=[new b.Vector2(e[e.length-2],e[e.length-1])];Array.prototype.push.apply(e,a);e=new b.SplineCurve(e);this.curves.push(e);this.actions.push({action:"splineThru",args:c})},arc:function(a, b,e,d,f,h){var l=this.actions[this.actions.length-1].args;this.absarc(a+l[l.length-2],b+l[l.length-1],e,d,f,h)},absarc:function(a,b,e,d,f,h){this.absellipse(a,b,e,e,d,f,h)},ellipse:function(a,b,e,d,f,h,l,m){var k=this.actions[this.actions.length-1].args;this.absellipse(a+k[k.length-2],b+k[k.length-1],e,d,f,h,l,m)},absellipse:function(a,c,e,d,f,h,l,m){var k=[a,c,e,d,f,h,l,m||0];a=new b.EllipseCurve(a,c,e,d,f,h,l,m);this.curves.push(a);a=a.getPoint(1);k.push(a.x);k.push(a.y);this.actions.push({action:"ellipse", args:k})},getSpacedPoints:function(a){a||(a=40);for(var b=[],e=0;e<a;e++)b.push(this.getPoint(e/a));this.autoClose&&b.push(b[0]);return b},getPoints:function(a){a=a||12;for(var c=b.ShapeUtils.b2,e=b.ShapeUtils.b3,d=[],f,h,l,m,k,t,p,n,q,v,x=0,z=this.actions.length;x<z;x++){q=this.actions[x];var B=q.args;switch(q.action){case "moveTo":d.push(new b.Vector2(B[0],B[1]));break;case "lineTo":d.push(new b.Vector2(B[0],B[1]));break;case "quadraticCurveTo":f=B[2];h=B[3];k=B[0];t=B[1];0<d.length?(q=d[d.length- 1],p=q.x,n=q.y):(q=this.actions[x-1].args,p=q[q.length-2],n=q[q.length-1]);for(B=1;B<=a;B++)v=B/a,q=c(v,p,k,f),v=c(v,n,t,h),d.push(new b.Vector2(q,v));break;case "bezierCurveTo":f=B[4];h=B[5];k=B[0];t=B[1];l=B[2];m=B[3];0<d.length?(q=d[d.length-1],p=q.x,n=q.y):(q=this.actions[x-1].args,p=q[q.length-2],n=q[q.length-1]);for(B=1;B<=a;B++)v=B/a,q=e(v,p,k,l,f),v=e(v,n,t,m,h),d.push(new b.Vector2(q,v));break;case "splineThru":q=this.actions[x-1].args;v=[new b.Vector2(q[q.length-2],q[q.length-1])];q=a*B[0].length; v=v.concat(B[0]);v=new b.SplineCurve(v);for(B=1;B<=q;B++)d.push(v.getPointAt(B/q));break;case "arc":f=B[0];h=B[1];t=B[2];l=B[3];q=B[4];k=!!B[5];p=q-l;n=2*a;for(B=1;B<=n;B++)v=B/n,k||(v=1-v),v=l+v*p,q=f+t*Math.cos(v),v=h+t*Math.sin(v),d.push(new b.Vector2(q,v));break;case "ellipse":f=B[0];h=B[1];t=B[2];m=B[3];l=B[4];q=B[5];k=!!B[6];var A=B[7];p=q-l;n=2*a;var C,G;0!==A&&(C=Math.cos(A),G=Math.sin(A));for(B=1;B<=n;B++){v=B/n;k||(v=1-v);v=l+v*p;q=f+t*Math.cos(v);v=h+m*Math.sin(v);if(0!==A){var D=q;q=(D- f)*C-(v-h)*G+f;v=(D-f)*G+(v-h)*C+h}d.push(new b.Vector2(q,v))}}}a=d[d.length-1];Math.abs(a.x-d[0].x)<Number.EPSILON&&Math.abs(a.y-d[0].y)<Number.EPSILON&&d.splice(d.length-1,1);this.autoClose&&d.push(d[0]);return d},toShapes:function(a,c){function e(a){for(var c=[],d=0,e=a.length;d<e;d++){var f=a[d],g=new b.Shape;g.actions=f.actions;g.curves=f.curves;c.push(g)}return c}function d(a,b){for(var c=b.length,d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],h=b[f],l=h.x-g.x,m=h.y-g.y;if(Math.abs(m)>Number.EPSILON){if(0> m&&(g=b[f],l=-l,h=b[e],m=-m),!(a.y<g.y||a.y>h.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=m*(a.x-g.x)-l*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var f=b.ShapeUtils.isClockWise,h=function(a){for(var c=[],d=new b.Path,e=0,f=a.length;e<f;e++){var g=a[e],h=g.args,g=g.action;"moveTo"===g&&0!==d.actions.length&&(c.push(d),d=new b.Path);d[g].apply(d,h)}0!==d.actions.length&&c.push(d);return c}(this.actions);if(0===h.length)return[]; if(!0===c)return e(h);var l,m,k,p=[];if(1===h.length)return m=h[0],k=new b.Shape,k.actions=m.actions,k.curves=m.curves,p.push(k),p;var n=!f(h[0].getPoints()),n=a?!n:n;k=[];var u=[],q=[],v=0,x;u[v]=void 0;q[v]=[];for(var z=0,B=h.length;z<B;z++)m=h[z],x=m.getPoints(),l=f(x),(l=a?!l:l)?(!n&&u[v]&&v++,u[v]={s:new b.Shape,p:x},u[v].s.actions=m.actions,u[v].s.curves=m.curves,n&&v++,q[v]=[]):q[v].push({h:m,p:x[0]});if(!u[0])return e(h);if(1<u.length){z=!1;m=[];f=0;for(h=u.length;f<h;f++)k[f]=[];f=0;for(h= u.length;f<h;f++)for(l=q[f],n=0;n<l.length;n++){v=l[n];x=!0;for(B=0;B<u.length;B++)d(v.p,u[B].p)&&(f!==B&&m.push({froms:f,tos:B,hole:n}),x?(x=!1,k[B].push(v)):z=!0);x&&k[f].push(v)}0<m.length&&(z||(q=k))}z=0;for(f=u.length;z<f;z++)for(k=u[z].s,p.push(k),m=q[z],h=0,l=m.length;h<l;h++)k.holes.push(m[h].h);return p}});b.Shape=function(){b.Path.apply(this,arguments);this.holes=[]};b.Shape.prototype=Object.assign(Object.create(b.Path.prototype),{constructor:b.Shape,extrude:function(a){return new b.ExtrudeGeometry(this, a)},makeGeometry:function(a){return new b.ShapeGeometry(this,a)},getPointsHoles:function(a){for(var b=[],e=0,d=this.holes.length;e<d;e++)b[e]=this.holes[e].getPoints(a);return b},extractAllPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},extractPoints:function(a){return this.extractAllPoints(a)}});b.LineCurve=function(a,b){this.v1=a;this.v2=b};b.LineCurve.prototype=Object.create(b.Curve.prototype);b.LineCurve.prototype.constructor=b.LineCurve;b.LineCurve.prototype.getPoint= function(a){var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);return b};b.LineCurve.prototype.getPointAt=function(a){return this.getPoint(a)};b.LineCurve.prototype.getTangent=function(a){return this.v2.clone().sub(this.v1).normalize()};b.QuadraticBezierCurve=function(a,b,e){this.v0=a;this.v1=b;this.v2=e};b.QuadraticBezierCurve.prototype=Object.create(b.Curve.prototype);b.QuadraticBezierCurve.prototype.constructor=b.QuadraticBezierCurve;b.QuadraticBezierCurve.prototype.getPoint=function(a){var c= b.ShapeUtils.b2;return new b.Vector2(c(a,this.v0.x,this.v1.x,this.v2.x),c(a,this.v0.y,this.v1.y,this.v2.y))};b.QuadraticBezierCurve.prototype.getTangent=function(a){var c=b.CurveUtils.tangentQuadraticBezier;return(new b.Vector2(c(a,this.v0.x,this.v1.x,this.v2.x),c(a,this.v0.y,this.v1.y,this.v2.y))).normalize()};b.CubicBezierCurve=function(a,b,e,d){this.v0=a;this.v1=b;this.v2=e;this.v3=d};b.CubicBezierCurve.prototype=Object.create(b.Curve.prototype);b.CubicBezierCurve.prototype.constructor=b.CubicBezierCurve; b.CubicBezierCurve.prototype.getPoint=function(a){var c=b.ShapeUtils.b3;return new b.Vector2(c(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x),c(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y))};b.CubicBezierCurve.prototype.getTangent=function(a){var c=b.CurveUtils.tangentCubicBezier;return(new b.Vector2(c(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x),c(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y))).normalize()};b.SplineCurve=function(a){this.points=void 0==a?[]:a};b.SplineCurve.prototype=Object.create(b.Curve.prototype); b.SplineCurve.prototype.constructor=b.SplineCurve;b.SplineCurve.prototype.getPoint=function(a){var c=this.points;a*=c.length-1;var e=Math.floor(a);a-=e;var d=c[0===e?e:e-1],f=c[e],h=c[e>c.length-2?c.length-1:e+1],c=c[e>c.length-3?c.length-1:e+2],e=b.CurveUtils.interpolate;return new b.Vector2(e(d.x,f.x,h.x,c.x,a),e(d.y,f.y,h.y,c.y,a))};b.EllipseCurve=function(a,b,e,d,f,h,l,m){this.aX=a;this.aY=b;this.xRadius=e;this.yRadius=d;this.aStartAngle=f;this.aEndAngle=h;this.aClockwise=l;this.aRotation=m|| 0};b.EllipseCurve.prototype=Object.create(b.Curve.prototype);b.EllipseCurve.prototype.constructor=b.EllipseCurve;b.EllipseCurve.prototype.getPoint=function(a){var c=this.aEndAngle-this.aStartAngle;0>c&&(c+=2*Math.PI);c>2*Math.PI&&(c-=2*Math.PI);c=!0===this.aClockwise?this.aEndAngle+(1-a)*(2*Math.PI-c):this.aStartAngle+a*c;a=this.aX+this.xRadius*Math.cos(c);var e=this.aY+this.yRadius*Math.sin(c);if(0!==this.aRotation){var c=Math.cos(this.aRotation),d=Math.sin(this.aRotation),f=a;a=(f-this.aX)*c-(e- this.aY)*d+this.aX;e=(f-this.aX)*d+(e-this.aY)*c+this.aY}return new b.Vector2(a,e)};b.ArcCurve=function(a,c,e,d,f,h){b.EllipseCurve.call(this,a,c,e,e,d,f,h)};b.ArcCurve.prototype=Object.create(b.EllipseCurve.prototype);b.ArcCurve.prototype.constructor=b.ArcCurve;b.LineCurve3=b.Curve.create(function(a,b){this.v1=a;this.v2=b},function(a){var c=new b.Vector3;c.subVectors(this.v2,this.v1);c.multiplyScalar(a);c.add(this.v1);return c});b.QuadraticBezierCurve3=b.Curve.create(function(a,b,e){this.v0=a;this.v1= b;this.v2=e},function(a){var c=b.ShapeUtils.b2;return new b.Vector3(c(a,this.v0.x,this.v1.x,this.v2.x),c(a,this.v0.y,this.v1.y,this.v2.y),c(a,this.v0.z,this.v1.z,this.v2.z))});b.CubicBezierCurve3=b.Curve.create(function(a,b,e,d){this.v0=a;this.v1=b;this.v2=e;this.v3=d},function(a){var c=b.ShapeUtils.b3;return new b.Vector3(c(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x),c(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y),c(a,this.v0.z,this.v1.z,this.v2.z,this.v3.z))});b.SplineCurve3=b.Curve.create(function(a){console.warn("THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3"); this.points=void 0==a?[]:a},function(a){var c=this.points;a*=c.length-1;var e=Math.floor(a);a-=e;var d=c[0==e?e:e-1],f=c[e],h=c[e>c.length-2?c.length-1:e+1],c=c[e>c.length-3?c.length-1:e+2],e=b.CurveUtils.interpolate;return new b.Vector3(e(d.x,f.x,h.x,c.x,a),e(d.y,f.y,h.y,c.y,a),e(d.z,f.z,h.z,c.z,a))});b.CatmullRomCurve3=function(){function a(){}var c=new b.Vector3,e=new a,d=new a,f=new a;a.prototype.init=function(a,b,c,d){this.c0=a;this.c1=c;this.c2=-3*a+3*b-2*c-d;this.c3=2*a-2*b+c+d};a.prototype.initNonuniformCatmullRom= function(a,b,c,d,e,f,g){a=((b-a)/e-(c-a)/(e+f)+(c-b)/f)*f;d=((c-b)/f-(d-b)/(f+g)+(d-c)/g)*f;this.init(b,c,a,d)};a.prototype.initCatmullRom=function(a,b,c,d,e){this.init(b,c,e*(c-a),e*(d-b))};a.prototype.calc=function(a){var b=a*a;return this.c0+this.c1*a+this.c2*b+this.c3*b*a};return b.Curve.create(function(a){this.points=a||[];this.closed=!1},function(a){var l=this.points,m,k;k=l.length;2>k&&console.log("duh, you need at least 2 points");a*=k-(this.closed?0:1);m=Math.floor(a);a-=m;this.closed?m+= 0<m?0:(Math.floor(Math.abs(m)/l.length)+1)*l.length:0===a&&m===k-1&&(m=k-2,a=1);var p,n,u;this.closed||0<m?p=l[(m-1)%k]:(c.subVectors(l[0],l[1]).add(l[0]),p=c);n=l[m%k];u=l[(m+1)%k];this.closed||m+2<k?l=l[(m+2)%k]:(c.subVectors(l[k-1],l[k-2]).add(l[k-1]),l=c);if(void 0===this.type||"centripetal"===this.type||"chordal"===this.type){var q="chordal"===this.type?.5:.25;k=Math.pow(p.distanceToSquared(n),q);m=Math.pow(n.distanceToSquared(u),q);q=Math.pow(u.distanceToSquared(l),q);1E-4>m&&(m=1);1E-4>k&& (k=m);1E-4>q&&(q=m);e.initNonuniformCatmullRom(p.x,n.x,u.x,l.x,k,m,q);d.initNonuniformCatmullRom(p.y,n.y,u.y,l.y,k,m,q);f.initNonuniformCatmullRom(p.z,n.z,u.z,l.z,k,m,q)}else"catmullrom"===this.type&&(k=void 0!==this.tension?this.tension:.5,e.initCatmullRom(p.x,n.x,u.x,l.x,k),d.initCatmullRom(p.y,n.y,u.y,l.y,k),f.initCatmullRom(p.z,n.z,u.z,l.z,k));return new b.Vector3(e.calc(a),d.calc(a),f.calc(a))})}();b.ClosedSplineCurve3=function(a){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3."); b.CatmullRomCurve3.call(this,a);this.type="catmullrom";this.closed=!0};b.ClosedSplineCurve3.prototype=Object.create(b.CatmullRomCurve3.prototype);b.BoxGeometry=function(a,c,e,d,f,h){b.Geometry.call(this);this.type="BoxGeometry";this.parameters={width:a,height:c,depth:e,widthSegments:d,heightSegments:f,depthSegments:h};this.fromBufferGeometry(new b.BoxBufferGeometry(a,c,e,d,f,h));this.mergeVertices()};b.BoxGeometry.prototype=Object.create(b.Geometry.prototype);b.BoxGeometry.prototype.constructor=b.BoxGeometry; b.CubeGeometry=b.BoxGeometry;b.BoxBufferGeometry=function(a,c,e,d,f,h){function l(a,c,d,e,f,g,h,l,k,p,t){var r=g/k,L=h/p,P=g/2,Q=h/2,M=l/2;h=k+1;for(var V=p+1,X=g=0,W=new b.Vector3,N=0;N<V;N++)for(var ga=N*L-Q,Z=0;Z<h;Z++)W[a]=(Z*r-P)*e,W[c]=ga*f,W[d]=M,u[x]=W.x,u[x+1]=W.y,u[x+2]=W.z,W[a]=0,W[c]=0,W[d]=0<l?1:-1,q[x]=W.x,q[x+1]=W.y,q[x+2]=W.z,v[z]=Z/k,v[z+1]=1-N/p,x+=3,z+=2,g+=1;for(N=0;N<p;N++)for(Z=0;Z<k;Z++)a=A+Z+h*(N+1),c=A+(Z+1)+h*(N+1),d=A+(Z+1)+h*N,n[B]=A+Z+h*N,n[B+1]=a,n[B+2]=d,n[B+3]=a,n[B+ 4]=c,n[B+5]=d,B+=6,X+=6;m.addGroup(C,X,t);C+=X;A+=g}b.BufferGeometry.call(this);this.type="BoxBufferGeometry";this.parameters={width:a,height:c,depth:e,widthSegments:d,heightSegments:f,depthSegments:h};var m=this;d=Math.floor(d)||1;f=Math.floor(f)||1;h=Math.floor(h)||1;var k=function(a,b,c){a=0+(a+1)*(b+1)*2+(a+1)*(c+1)*2;return a+=(c+1)*(b+1)*2}(d,f,h),p=function(a,b,c){a=0+a*b*2+a*c*2;a+=c*b*2;return 6*a}(d,f,h),n=new (65535<p?Uint32Array:Uint16Array)(p),u=new Float32Array(3*k),q=new Float32Array(3* k),v=new Float32Array(2*k),x=0,z=0,B=0,A=0,C=0;l("z","y","x",-1,-1,e,c,a,h,f,0);l("z","y","x",1,-1,e,c,-a,h,f,1);l("x","z","y",1,1,a,e,c,d,h,2);l("x","z","y",1,-1,a,e,-c,d,h,3);l("x","y","z",1,-1,a,c,e,d,f,4);l("x","y","z",-1,-1,a,c,-e,d,f,5);this.setIndex(new b.BufferAttribute(n,1));this.addAttribute("position",new b.BufferAttribute(u,3));this.addAttribute("normal",new b.BufferAttribute(q,3));this.addAttribute("uv",new b.BufferAttribute(v,2))};b.BoxBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype); b.BoxBufferGeometry.prototype.constructor=b.BoxBufferGeometry;b.CircleGeometry=function(a,c,e,d){b.Geometry.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:c,thetaStart:e,thetaLength:d};this.fromBufferGeometry(new b.CircleBufferGeometry(a,c,e,d))};b.CircleGeometry.prototype=Object.create(b.Geometry.prototype);b.CircleGeometry.prototype.constructor=b.CircleGeometry;b.CircleBufferGeometry=function(a,c,e,d){b.BufferGeometry.call(this);this.type="CircleBufferGeometry";this.parameters= {radius:a,segments:c,thetaStart:e,thetaLength:d};a=a||50;c=void 0!==c?Math.max(3,c):8;e=void 0!==e?e:0;d=void 0!==d?d:2*Math.PI;var f=c+2,h=new Float32Array(3*f),l=new Float32Array(3*f),f=new Float32Array(2*f);l[2]=1;f[0]=.5;f[1]=.5;for(var m=0,k=3,p=2;m<=c;m++,k+=3,p+=2){var n=e+m/c*d;h[k]=a*Math.cos(n);h[k+1]=a*Math.sin(n);l[k+2]=1;f[p]=(h[k]/a+1)/2;f[p+1]=(h[k+1]/a+1)/2}e=[];for(k=1;k<=c;k++)e.push(k,k+1,0);this.setIndex(new b.BufferAttribute(new Uint16Array(e),1));this.addAttribute("position", new b.BufferAttribute(h,3));this.addAttribute("normal",new b.BufferAttribute(l,3));this.addAttribute("uv",new b.BufferAttribute(f,2));this.boundingSphere=new b.Sphere(new b.Vector3,a)};b.CircleBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.CircleBufferGeometry.prototype.constructor=b.CircleBufferGeometry;b.CylinderBufferGeometry=function(a,c,e,d,f,h,l,m){function k(e){var f,g,h,n=new b.Vector2,r=new b.Vector3,q=0,u=!0===e?a:c,w=!0===e?1:-1;g=A;for(f=1;f<=d;f++)x.setXYZ(A,0,D* w,0),z.setXYZ(A,0,w,0),n.x=.5,n.y=.5,B.setXY(A,n.x,n.y),A++;h=A;for(f=0;f<=d;f++){var G=f/d*m+l,P=Math.cos(G),G=Math.sin(G);r.x=u*G;r.y=D*w;r.z=u*P;x.setXYZ(A,r.x,r.y,r.z);z.setXYZ(A,0,w,0);n.x=.5*P+.5;n.y=.5*G*w+.5;B.setXY(A,n.x,n.y);A++}for(f=0;f<d;f++)n=g+f,r=h+f,!0===e?(v.setX(C,r),C++,v.setX(C,r+1)):(v.setX(C,r+1),C++,v.setX(C,r)),C++,v.setX(C,n),C++,q+=3;p.addGroup(H,q,!0===e?1:2);H+=q}b.BufferGeometry.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:c, height:e,radialSegments:d,heightSegments:f,openEnded:h,thetaStart:l,thetaLength:m};var p=this;a=void 0!==a?a:20;c=void 0!==c?c:20;e=void 0!==e?e:100;d=Math.floor(d)||8;f=Math.floor(f)||1;h=void 0!==h?h:!1;l=void 0!==l?l:0;m=void 0!==m?m:2*Math.PI;var n=0;!1===h&&(0<a&&n++,0<c&&n++);var u=function(){var a=(d+1)*(f+1);!1===h&&(a+=(d+1)*n+d*n);return a}(),q=function(){var a=d*f*6;!1===h&&(a+=d*n*3);return a}(),v=new b.BufferAttribute(new (65535<q?Uint32Array:Uint16Array)(q),1),x=new b.BufferAttribute(new Float32Array(3* u),3),z=new b.BufferAttribute(new Float32Array(3*u),3),B=new b.BufferAttribute(new Float32Array(2*u),2),A=0,C=0,G=[],D=e/2,H=0;(function(){var h,k,n=new b.Vector3,r=new b.Vector3,q=0,u=(c-a)/e;for(k=0;k<=f;k++){var w=[],U=k/f,S=U*(c-a)+a;for(h=0;h<=d;h++){var L=h/d;r.x=S*Math.sin(L*m+l);r.y=-U*e+D;r.z=S*Math.cos(L*m+l);x.setXYZ(A,r.x,r.y,r.z);n.copy(r);if(0===a&&0===k||0===c&&k===f)n.x=Math.sin(L*m+l),n.z=Math.cos(L*m+l);n.setY(Math.sqrt(n.x*n.x+n.z*n.z)*u).normalize();z.setXYZ(A,n.x,n.y,n.z);B.setXY(A, L,1-U);w.push(A);A++}G.push(w)}for(h=0;h<d;h++)for(k=0;k<f;k++)n=G[k+1][h],r=G[k+1][h+1],u=G[k][h+1],v.setX(C,G[k][h]),C++,v.setX(C,n),C++,v.setX(C,u),C++,v.setX(C,n),C++,v.setX(C,r),C++,v.setX(C,u),C++,q+=6;p.addGroup(H,q,0);H+=q})();!1===h&&(0<a&&k(!0),0<c&&k(!1));this.setIndex(v);this.addAttribute("position",x);this.addAttribute("normal",z);this.addAttribute("uv",B)};b.CylinderBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.CylinderBufferGeometry.prototype.constructor=b.CylinderBufferGeometry; b.CylinderGeometry=function(a,c,e,d,f,h,l,m){b.Geometry.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:c,height:e,radialSegments:d,heightSegments:f,openEnded:h,thetaStart:l,thetaLength:m};this.fromBufferGeometry(new b.CylinderBufferGeometry(a,c,e,d,f,h,l,m));this.mergeVertices()};b.CylinderGeometry.prototype=Object.create(b.Geometry.prototype);b.CylinderGeometry.prototype.constructor=b.CylinderGeometry;b.ConeBufferGeometry=function(a,c,e,d,f,h,l){b.CylinderBufferGeometry.call(this, 0,a,c,e,d,f,h,l);this.type="ConeBufferGeometry";this.parameters={radius:a,height:c,radialSegments:e,heightSegments:d,thetaStart:h,thetaLength:l}};b.ConeBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.ConeBufferGeometry.prototype.constructor=b.ConeBufferGeometry;b.ConeGeometry=function(a,c,e,d,f,h,l){b.CylinderGeometry.call(this,0,a,c,e,d,f,h,l);this.type="ConeGeometry";this.parameters={radius:a,height:c,radialSegments:e,heightSegments:d,openEnded:f,thetaStart:h,thetaLength:l}}; b.ConeGeometry.prototype=Object.create(b.CylinderGeometry.prototype);b.ConeGeometry.prototype.constructor=b.ConeGeometry;b.EdgesGeometry=function(a,c){function e(a,b){return a-b}b.BufferGeometry.call(this);var d=Math.cos(b.Math.DEG2RAD*(void 0!==c?c:1)),f=[0,0],h={},l=["a","b","c"],m;a instanceof b.BufferGeometry?(m=new b.Geometry,m.fromBufferGeometry(a)):m=a.clone();m.mergeVertices();m.computeFaceNormals();var k=m.vertices;m=m.faces;for(var p=0,n=m.length;p<n;p++)for(var u=m[p],q=0;3>q;q++){f[0]= u[l[q]];f[1]=u[l[(q+1)%3]];f.sort(e);var v=f.toString();void 0===h[v]?h[v]={vert1:f[0],vert2:f[1],face1:p,face2:void 0}:h[v].face2=p}f=[];for(v in h)if(l=h[v],void 0===l.face2||m[l.face1].normal.dot(m[l.face2].normal)<=d)p=k[l.vert1],f.push(p.x),f.push(p.y),f.push(p.z),p=k[l.vert2],f.push(p.x),f.push(p.y),f.push(p.z);this.addAttribute("position",new b.BufferAttribute(new Float32Array(f),3))};b.EdgesGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.EdgesGeometry.prototype.constructor= b.EdgesGeometry;b.ExtrudeGeometry=function(a,c){"undefined"!==typeof a&&(b.Geometry.call(this),this.type="ExtrudeGeometry",a=Array.isArray(a)?a:[a],this.addShapeList(a,c),this.computeFaceNormals())};b.ExtrudeGeometry.prototype=Object.create(b.Geometry.prototype);b.ExtrudeGeometry.prototype.constructor=b.ExtrudeGeometry;b.ExtrudeGeometry.prototype.addShapeList=function(a,b){for(var e=a.length,d=0;d<e;d++)this.addShape(a[d],b)};b.ExtrudeGeometry.prototype.addShape=function(a,c){function e(a,b,c){b|| console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function d(a,c,d){var e=1,e=a.x-c.x,f=a.y-c.y,g=d.x-a.x,h=d.y-a.y,l=e*e+f*f;if(Math.abs(e*h-f*g)>Number.EPSILON){var m=Math.sqrt(l),k=Math.sqrt(g*g+h*h),l=c.x-f/m;c=c.y+e/m;g=((d.x-h/k-l)*h-(d.y+g/k-c)*g)/(e*h-f*g);d=l+e*g-a.x;a=c+f*g-a.y;e=d*d+a*a;if(2>=e)return new b.Vector2(d,a);e=Math.sqrt(e/2)}else a=!1,e>Number.EPSILON?g>Number.EPSILON&&(a=!0):e<-Number.EPSILON?g<-Number.EPSILON&&(a=!0):Math.sign(f)=== Math.sign(h)&&(a=!0),a?(d=-f,a=e,e=Math.sqrt(l)):(d=e,a=f,e=Math.sqrt(l/2));return new b.Vector2(d/e,a/e)}function f(a,c){var d,e;for(N=a.length;0<=--N;){d=N;e=N-1;0>e&&(e=a.length-1);for(var g=0,h=v+2*n,g=0;g<h;g++){var l=V*g,m=V*(g+1),k=c+d+l,l=c+e+l,p=c+e+m,m=c+d+m,k=k+J,l=l+J,p=p+J,m=m+J;O.faces.push(new b.Face3(k,l,m,null,null,1));O.faces.push(new b.Face3(l,p,m,null,null,1));k=A.generateSideWallUV(O,k,l,p,m);O.faceVertexUvs[0].push([k[0],k[1],k[3]]);O.faceVertexUvs[0].push([k[1],k[2],k[3]])}}} function h(a,c,d){O.vertices.push(new b.Vector3(a,c,d))}function l(a,c,d){a+=J;c+=J;d+=J;O.faces.push(new b.Face3(a,c,d,null,null,0));a=A.generateTopUV(O,a,c,d);O.faceVertexUvs[0].push(a)}var m=void 0!==c.amount?c.amount:100,k=void 0!==c.bevelThickness?c.bevelThickness:6,p=void 0!==c.bevelSize?c.bevelSize:k-2,n=void 0!==c.bevelSegments?c.bevelSegments:3,u=void 0!==c.bevelEnabled?c.bevelEnabled:!0,q=void 0!==c.curveSegments?c.curveSegments:12,v=void 0!==c.steps?c.steps:1,x=c.extrudePath,z,B=!1,A=void 0!== c.UVGenerator?c.UVGenerator:b.ExtrudeGeometry.WorldUVGenerator,C,G,D,H;x&&(z=x.getSpacedPoints(v),B=!0,u=!1,C=void 0!==c.frames?c.frames:new b.TubeGeometry.FrenetFrames(x,v,!1),G=new b.Vector3,D=new b.Vector3,H=new b.Vector3);u||(p=k=n=0);var E,F,I,O=this,J=this.vertices.length,x=a.extractPoints(q),q=x.shape,K=x.holes;if(x=!b.ShapeUtils.isClockWise(q)){q=q.reverse();F=0;for(I=K.length;F<I;F++)E=K[F],b.ShapeUtils.isClockWise(E)&&(K[F]=E.reverse());x=!1}var T=b.ShapeUtils.triangulateShape(q,K),U=q; F=0;for(I=K.length;F<I;F++)E=K[F],q=q.concat(E);var S,L,P,Q,M,V=q.length,X,W=T.length,x=[],N=0;P=U.length;S=P-1;for(L=N+1;N<P;N++,S++,L++)S===P&&(S=0),L===P&&(L=0),x[N]=d(U[N],U[S],U[L]);var ga=[],Z,da=x.concat();F=0;for(I=K.length;F<I;F++){E=K[F];Z=[];N=0;P=E.length;S=P-1;for(L=N+1;N<P;N++,S++,L++)S===P&&(S=0),L===P&&(L=0),Z[N]=d(E[N],E[S],E[L]);ga.push(Z);da=da.concat(Z)}for(S=0;S<n;S++){P=S/n;Q=k*(1-P);L=p*Math.sin(P*Math.PI/2);N=0;for(P=U.length;N<P;N++)M=e(U[N],x[N],L),h(M.x,M.y,-Q);F=0;for(I= K.length;F<I;F++)for(E=K[F],Z=ga[F],N=0,P=E.length;N<P;N++)M=e(E[N],Z[N],L),h(M.x,M.y,-Q)}L=p;for(N=0;N<V;N++)M=u?e(q[N],da[N],L):q[N],B?(D.copy(C.normals[0]).multiplyScalar(M.x),G.copy(C.binormals[0]).multiplyScalar(M.y),H.copy(z[0]).add(D).add(G),h(H.x,H.y,H.z)):h(M.x,M.y,0);for(P=1;P<=v;P++)for(N=0;N<V;N++)M=u?e(q[N],da[N],L):q[N],B?(D.copy(C.normals[P]).multiplyScalar(M.x),G.copy(C.binormals[P]).multiplyScalar(M.y),H.copy(z[P]).add(D).add(G),h(H.x,H.y,H.z)):h(M.x,M.y,m/v*P);for(S=n-1;0<=S;S--){P= S/n;Q=k*(1-P);L=p*Math.sin(P*Math.PI/2);N=0;for(P=U.length;N<P;N++)M=e(U[N],x[N],L),h(M.x,M.y,m+Q);F=0;for(I=K.length;F<I;F++)for(E=K[F],Z=ga[F],N=0,P=E.length;N<P;N++)M=e(E[N],Z[N],L),B?h(M.x,M.y+z[v-1].y,z[v-1].x+Q):h(M.x,M.y,m+Q)}(function(){if(u){var a;a=0*V;for(N=0;N<W;N++)X=T[N],l(X[2]+a,X[1]+a,X[0]+a);a=v+2*n;a*=V;for(N=0;N<W;N++)X=T[N],l(X[0]+a,X[1]+a,X[2]+a)}else{for(N=0;N<W;N++)X=T[N],l(X[2],X[1],X[0]);for(N=0;N<W;N++)X=T[N],l(X[0]+V*v,X[1]+V*v,X[2]+V*v)}})();(function(){var a=0;f(U,a); a+=U.length;F=0;for(I=K.length;F<I;F++)E=K[F],f(E,a),a+=E.length})()};b.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(a,c,e,d){a=a.vertices;c=a[c];e=a[e];d=a[d];return[new b.Vector2(c.x,c.y),new b.Vector2(e.x,e.y),new b.Vector2(d.x,d.y)]},generateSideWallUV:function(a,c,e,d,f){a=a.vertices;c=a[c];e=a[e];d=a[d];f=a[f];return.01>Math.abs(c.y-e.y)?[new b.Vector2(c.x,1-c.z),new b.Vector2(e.x,1-e.z),new b.Vector2(d.x,1-d.z),new b.Vector2(f.x,1-f.z)]:[new b.Vector2(c.y,1-c.z),new b.Vector2(e.y, 1-e.z),new b.Vector2(d.y,1-d.z),new b.Vector2(f.y,1-f.z)]}};b.ShapeGeometry=function(a,c){b.Geometry.call(this);this.type="ShapeGeometry";!1===Array.isArray(a)&&(a=[a]);this.addShapeList(a,c);this.computeFaceNormals()};b.ShapeGeometry.prototype=Object.create(b.Geometry.prototype);b.ShapeGeometry.prototype.constructor=b.ShapeGeometry;b.ShapeGeometry.prototype.addShapeList=function(a,b){for(var e=0,d=a.length;e<d;e++)this.addShape(a[e],b);return this};b.ShapeGeometry.prototype.addShape=function(a,c){void 0=== c&&(c={});var e=c.material,d=void 0===c.UVGenerator?b.ExtrudeGeometry.WorldUVGenerator:c.UVGenerator,f,h,l,m=this.vertices.length;f=a.extractPoints(void 0!==c.curveSegments?c.curveSegments:12);var k=f.shape,p=f.holes;if(!b.ShapeUtils.isClockWise(k))for(k=k.reverse(),f=0,h=p.length;f<h;f++)l=p[f],b.ShapeUtils.isClockWise(l)&&(p[f]=l.reverse());var n=b.ShapeUtils.triangulateShape(k,p);f=0;for(h=p.length;f<h;f++)l=p[f],k=k.concat(l);p=k.length;h=n.length;for(f=0;f<p;f++)l=k[f],this.vertices.push(new b.Vector3(l.x, l.y,0));for(f=0;f<h;f++)p=n[f],k=p[0]+m,l=p[1]+m,p=p[2]+m,this.faces.push(new b.Face3(k,l,p,null,null,e)),this.faceVertexUvs[0].push(d.generateTopUV(this,k,l,p))};b.LatheBufferGeometry=function(a,c,e,d){b.BufferGeometry.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:c,phiStart:e,phiLength:d};c=Math.floor(c)||12;e=e||0;d=d||2*Math.PI;d=b.Math.clamp(d,0,2*Math.PI);for(var f=(c+1)*a.length,h=c*a.length*6,l=new b.BufferAttribute(new (65535<h?Uint32Array:Uint16Array)(h), 1),m=new b.BufferAttribute(new Float32Array(3*f),3),k=new b.BufferAttribute(new Float32Array(2*f),2),p=0,n=0,u=1/c,q=new b.Vector3,v=new b.Vector2,f=0;f<=c;f++)for(var h=e+f*u*d,x=Math.sin(h),z=Math.cos(h),h=0;h<=a.length-1;h++)q.x=a[h].x*x,q.y=a[h].y,q.z=a[h].x*z,m.setXYZ(p,q.x,q.y,q.z),v.x=f/c,v.y=h/(a.length-1),k.setXY(p,v.x,v.y),p++;for(f=0;f<c;f++)for(h=0;h<a.length-1;h++)e=h+f*a.length,p=e+a.length,u=e+a.length+1,q=e+1,l.setX(n,e),n++,l.setX(n,p),n++,l.setX(n,q),n++,l.setX(n,p),n++,l.setX(n, u),n++,l.setX(n,q),n++;this.setIndex(l);this.addAttribute("position",m);this.addAttribute("uv",k);this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,l=new b.Vector3,m=new b.Vector3,k=new b.Vector3,e=c*a.length*3,h=f=0;f<a.length;f++,h+=3)l.x=d[h+0],l.y=d[h+1],l.z=d[h+2],m.x=d[e+h+0],m.y=d[e+h+1],m.z=d[e+h+2],k.addVectors(l,m).normalize(),d[h+0]=d[e+h+0]=k.x,d[h+1]=d[e+h+1]=k.y,d[h+2]=d[e+h+2]=k.z};b.LatheBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype); b.LatheBufferGeometry.prototype.constructor=b.LatheBufferGeometry;b.LatheGeometry=function(a,c,e,d){b.Geometry.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:c,phiStart:e,phiLength:d};this.fromBufferGeometry(new b.LatheBufferGeometry(a,c,e,d));this.mergeVertices()};b.LatheGeometry.prototype=Object.create(b.Geometry.prototype);b.LatheGeometry.prototype.constructor=b.LatheGeometry;b.PlaneGeometry=function(a,c,e,d){b.Geometry.call(this);this.type="PlaneGeometry";this.parameters= {width:a,height:c,widthSegments:e,heightSegments:d};this.fromBufferGeometry(new b.PlaneBufferGeometry(a,c,e,d))};b.PlaneGeometry.prototype=Object.create(b.Geometry.prototype);b.PlaneGeometry.prototype.constructor=b.PlaneGeometry;b.PlaneBufferGeometry=function(a,c,e,d){b.BufferGeometry.call(this);this.type="PlaneBufferGeometry";this.parameters={width:a,height:c,widthSegments:e,heightSegments:d};var f=a/2,h=c/2;e=Math.floor(e)||1;d=Math.floor(d)||1;var l=e+1,m=d+1,k=a/e,p=c/d;c=new Float32Array(l*m* 3);a=new Float32Array(l*m*3);for(var n=new Float32Array(l*m*2),u=0,q=0,v=0;v<m;v++)for(var x=v*p-h,z=0;z<l;z++)c[u]=z*k-f,c[u+1]=-x,a[u+2]=1,n[q]=z/e,n[q+1]=1-v/d,u+=3,q+=2;u=0;f=new (65535<c.length/3?Uint32Array:Uint16Array)(e*d*6);for(v=0;v<d;v++)for(z=0;z<e;z++)h=z+l*(v+1),m=z+1+l*(v+1),k=z+1+l*v,f[u]=z+l*v,f[u+1]=h,f[u+2]=k,f[u+3]=h,f[u+4]=m,f[u+5]=k,u+=6;this.setIndex(new b.BufferAttribute(f,1));this.addAttribute("position",new b.BufferAttribute(c,3));this.addAttribute("normal",new b.BufferAttribute(a, 3));this.addAttribute("uv",new b.BufferAttribute(n,2))};b.PlaneBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.PlaneBufferGeometry.prototype.constructor=b.PlaneBufferGeometry;b.RingBufferGeometry=function(a,c,e,d,f,h){b.BufferGeometry.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:c,thetaSegments:e,phiSegments:d,thetaStart:f,thetaLength:h};a=a||20;c=c||50;f=void 0!==f?f:0;h=void 0!==h?h:2*Math.PI;e=void 0!==e?Math.max(3,e):8;d=void 0!==d? Math.max(1,d):1;var l=(e+1)*(d+1),m=e*d*6,m=new b.BufferAttribute(new (65535<m?Uint32Array:Uint16Array)(m),1),k=new b.BufferAttribute(new Float32Array(3*l),3),p=new b.BufferAttribute(new Float32Array(3*l),3),l=new b.BufferAttribute(new Float32Array(2*l),2),n=0,u=0,q,v=a,x=(c-a)/d,z=new b.Vector3,B=new b.Vector2,A;for(a=0;a<=d;a++){for(A=0;A<=e;A++)q=f+A/e*h,z.x=v*Math.cos(q),z.y=v*Math.sin(q),k.setXYZ(n,z.x,z.y,z.z),p.setXYZ(n,0,0,1),B.x=(z.x/c+1)/2,B.y=(z.y/c+1)/2,l.setXY(n,B.x,B.y),n++;v+=x}for(a= 0;a<d;a++)for(c=a*(e+1),A=0;A<e;A++)f=q=A+c,h=q+e+1,n=q+e+2,q+=1,m.setX(u,f),u++,m.setX(u,h),u++,m.setX(u,n),u++,m.setX(u,f),u++,m.setX(u,n),u++,m.setX(u,q),u++;this.setIndex(m);this.addAttribute("position",k);this.addAttribute("normal",p);this.addAttribute("uv",l)};b.RingBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.RingBufferGeometry.prototype.constructor=b.RingBufferGeometry;b.RingGeometry=function(a,c,e,d,f,h){b.Geometry.call(this);this.type="RingGeometry";this.parameters= {innerRadius:a,outerRadius:c,thetaSegments:e,phiSegments:d,thetaStart:f,thetaLength:h};this.fromBufferGeometry(new b.RingBufferGeometry(a,c,e,d,f,h))};b.RingGeometry.prototype=Object.create(b.Geometry.prototype);b.RingGeometry.prototype.constructor=b.RingGeometry;b.SphereGeometry=function(a,c,e,d,f,h,l){b.Geometry.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:c,heightSegments:e,phiStart:d,phiLength:f,thetaStart:h,thetaLength:l};this.fromBufferGeometry(new b.SphereBufferGeometry(a, c,e,d,f,h,l))};b.SphereGeometry.prototype=Object.create(b.Geometry.prototype);b.SphereGeometry.prototype.constructor=b.SphereGeometry;b.SphereBufferGeometry=function(a,c,e,d,f,h,l){b.BufferGeometry.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:c,heightSegments:e,phiStart:d,phiLength:f,thetaStart:h,thetaLength:l};a=a||50;c=Math.max(3,Math.floor(c)||8);e=Math.max(2,Math.floor(e)||6);d=void 0!==d?d:0;f=void 0!==f?f:2*Math.PI;h=void 0!==h?h:0;l=void 0!==l?l:Math.PI; for(var m=h+l,k=(c+1)*(e+1),p=new b.BufferAttribute(new Float32Array(3*k),3),n=new b.BufferAttribute(new Float32Array(3*k),3),k=new b.BufferAttribute(new Float32Array(2*k),2),u=0,q=[],v=new b.Vector3,x=0;x<=e;x++){for(var z=[],B=x/e,A=0;A<=c;A++){var C=A/c,G=-a*Math.cos(d+C*f)*Math.sin(h+B*l),D=a*Math.cos(h+B*l),H=a*Math.sin(d+C*f)*Math.sin(h+B*l);v.set(G,D,H).normalize();p.setXYZ(u,G,D,H);n.setXYZ(u,v.x,v.y,v.z);k.setXY(u,C,1-B);z.push(u);u++}q.push(z)}d=[];for(x=0;x<e;x++)for(A=0;A<c;A++)f=q[x][A+ 1],l=q[x][A],u=q[x+1][A],v=q[x+1][A+1],(0!==x||0<h)&&d.push(f,l,v),(x!==e-1||m<Math.PI)&&d.push(l,u,v);this.setIndex(new (65535<p.count?b.Uint32Attribute:b.Uint16Attribute)(d,1));this.addAttribute("position",p);this.addAttribute("normal",n);this.addAttribute("uv",k);this.boundingSphere=new b.Sphere(new b.Vector3,a)};b.SphereBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.SphereBufferGeometry.prototype.constructor=b.SphereBufferGeometry;b.TextGeometry=function(a,c){c=c||{};var e= c.font;if(!1===e instanceof b.Font)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new b.Geometry;e=e.generateShapes(a,c.size,c.curveSegments);c.amount=void 0!==c.height?c.height:50;void 0===c.bevelThickness&&(c.bevelThickness=10);void 0===c.bevelSize&&(c.bevelSize=8);void 0===c.bevelEnabled&&(c.bevelEnabled=!1);b.ExtrudeGeometry.call(this,e,c);this.type="TextGeometry"};b.TextGeometry.prototype=Object.create(b.ExtrudeGeometry.prototype);b.TextGeometry.prototype.constructor= b.TextGeometry;b.TorusBufferGeometry=function(a,c,e,d,f){b.BufferGeometry.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:c,radialSegments:e,tubularSegments:d,arc:f};a=a||100;c=c||40;e=Math.floor(e)||8;d=Math.floor(d)||6;f=f||2*Math.PI;var h=(e+1)*(d+1),l=e*d*6,l=new (65535<l?Uint32Array:Uint16Array)(l),m=new Float32Array(3*h),k=new Float32Array(3*h),h=new Float32Array(2*h),p=0,n=0,u=0,q=new b.Vector3,v=new b.Vector3,x=new b.Vector3,z,B;for(z=0;z<=e;z++)for(B=0;B<=d;B++){var A= B/d*f,C=z/e*Math.PI*2;v.x=(a+c*Math.cos(C))*Math.cos(A);v.y=(a+c*Math.cos(C))*Math.sin(A);v.z=c*Math.sin(C);m[p]=v.x;m[p+1]=v.y;m[p+2]=v.z;q.x=a*Math.cos(A);q.y=a*Math.sin(A);x.subVectors(v,q).normalize();k[p]=x.x;k[p+1]=x.y;k[p+2]=x.z;h[n]=B/d;h[n+1]=z/e;p+=3;n+=2}for(z=1;z<=e;z++)for(B=1;B<=d;B++)a=(d+1)*(z-1)+B-1,c=(d+1)*(z-1)+B,f=(d+1)*z+B,l[u]=(d+1)*z+B-1,l[u+1]=a,l[u+2]=f,l[u+3]=a,l[u+4]=c,l[u+5]=f,u+=6;this.setIndex(new b.BufferAttribute(l,1));this.addAttribute("position",new b.BufferAttribute(m, 3));this.addAttribute("normal",new b.BufferAttribute(k,3));this.addAttribute("uv",new b.BufferAttribute(h,2))};b.TorusBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.TorusBufferGeometry.prototype.constructor=b.TorusBufferGeometry;b.TorusGeometry=function(a,c,e,d,f){b.Geometry.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:c,radialSegments:e,tubularSegments:d,arc:f};this.fromBufferGeometry(new b.TorusBufferGeometry(a,c,e,d,f))};b.TorusGeometry.prototype=Object.create(b.Geometry.prototype); b.TorusGeometry.prototype.constructor=b.TorusGeometry;b.TorusKnotBufferGeometry=function(a,c,e,d,f,h){function l(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}b.BufferGeometry.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:c,tubularSegments:e,radialSegments:d,p:f,q:h};a=a||100;c=c||40;e=Math.floor(e)||64;d=Math.floor(d)||8;f=f||2;h=h||3;var m=(d+1)*(e+1),k=d*e*6,k=new b.BufferAttribute(new (65535< k?Uint32Array:Uint16Array)(k),1),p=new b.BufferAttribute(new Float32Array(3*m),3),n=new b.BufferAttribute(new Float32Array(3*m),3),m=new b.BufferAttribute(new Float32Array(2*m),2),u,q,v=0,x=0,z=new b.Vector3,B=new b.Vector3,A=new b.Vector2,C=new b.Vector3,G=new b.Vector3,D=new b.Vector3,H=new b.Vector3,E=new b.Vector3;for(u=0;u<=e;++u)for(q=u/e*f*Math.PI*2,l(q,f,h,a,C),l(q+.01,f,h,a,G),H.subVectors(G,C),E.addVectors(G,C),D.crossVectors(H,E),E.crossVectors(D,H),D.normalize(),E.normalize(),q=0;q<=d;++q){var F= q/d*Math.PI*2,I=-c*Math.cos(F),F=c*Math.sin(F);z.x=C.x+(I*E.x+F*D.x);z.y=C.y+(I*E.y+F*D.y);z.z=C.z+(I*E.z+F*D.z);p.setXYZ(v,z.x,z.y,z.z);B.subVectors(z,C).normalize();n.setXYZ(v,B.x,B.y,B.z);A.x=u/e;A.y=q/d;m.setXY(v,A.x,A.y);v++}for(q=1;q<=e;q++)for(u=1;u<=d;u++)a=(d+1)*q+(u-1),c=(d+1)*q+u,f=(d+1)*(q-1)+u,k.setX(x,(d+1)*(q-1)+(u-1)),x++,k.setX(x,a),x++,k.setX(x,f),x++,k.setX(x,a),x++,k.setX(x,c),x++,k.setX(x,f),x++;this.setIndex(k);this.addAttribute("position",p);this.addAttribute("normal",n);this.addAttribute("uv", m)};b.TorusKnotBufferGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.TorusKnotBufferGeometry.prototype.constructor=b.TorusKnotBufferGeometry;b.TorusKnotGeometry=function(a,c,e,d,f,h,l){b.Geometry.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:c,tubularSegments:e,radialSegments:d,p:f,q:h};void 0!==l&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new b.TorusKnotBufferGeometry(a, c,e,d,f,h));this.mergeVertices()};b.TorusKnotGeometry.prototype=Object.create(b.Geometry.prototype);b.TorusKnotGeometry.prototype.constructor=b.TorusKnotGeometry;b.TubeGeometry=function(a,c,e,d,f,h){b.Geometry.call(this);this.type="TubeGeometry";this.parameters={path:a,segments:c,radius:e,radialSegments:d,closed:f,taper:h};c=c||64;e=e||1;d=d||8;f=f||!1;h=h||b.TubeGeometry.NoTaper;var l=[],k,p,n=c+1,w,u,q,v,x,z=new b.Vector3,B,A,C;B=new b.TubeGeometry.FrenetFrames(a,c,f);A=B.normals;C=B.binormals; this.tangents=B.tangents;this.normals=A;this.binormals=C;for(B=0;B<n;B++)for(l[B]=[],w=B/(n-1),x=a.getPointAt(w),k=A[B],p=C[B],q=e*h(w),w=0;w<d;w++)u=w/d*2*Math.PI,v=-q*Math.cos(u),u=q*Math.sin(u),z.copy(x),z.x+=v*k.x+u*p.x,z.y+=v*k.y+u*p.y,z.z+=v*k.z+u*p.z,l[B][w]=this.vertices.push(new b.Vector3(z.x,z.y,z.z))-1;for(B=0;B<c;B++)for(w=0;w<d;w++)h=f?(B+1)%c:B+1,n=(w+1)%d,a=l[B][w],e=l[h][w],h=l[h][n],n=l[B][n],z=new b.Vector2(B/c,w/d),A=new b.Vector2((B+1)/c,w/d),C=new b.Vector2((B+1)/c,(w+1)/d),k= new b.Vector2(B/c,(w+1)/d),this.faces.push(new b.Face3(a,e,n)),this.faceVertexUvs[0].push([z,A,k]),this.faces.push(new b.Face3(e,h,n)),this.faceVertexUvs[0].push([A.clone(),C,k.clone()]);this.computeFaceNormals();this.computeVertexNormals()};b.TubeGeometry.prototype=Object.create(b.Geometry.prototype);b.TubeGeometry.prototype.constructor=b.TubeGeometry;b.TubeGeometry.NoTaper=function(a){return 1};b.TubeGeometry.SinusoidalTaper=function(a){return Math.sin(Math.PI*a)};b.TubeGeometry.FrenetFrames=function(a, c,e){var d=new b.Vector3,f=[],h=[],l=[],k=new b.Vector3,p=new b.Matrix4;c+=1;var n,w,u;this.tangents=f;this.normals=h;this.binormals=l;for(n=0;n<c;n++)w=n/(c-1),f[n]=a.getTangentAt(w),f[n].normalize();h[0]=new b.Vector3;l[0]=new b.Vector3;a=Number.MAX_VALUE;n=Math.abs(f[0].x);w=Math.abs(f[0].y);u=Math.abs(f[0].z);n<=a&&(a=n,d.set(1,0,0));w<=a&&(a=w,d.set(0,1,0));u<=a&&d.set(0,0,1);k.crossVectors(f[0],d).normalize();h[0].crossVectors(f[0],k);l[0].crossVectors(f[0],h[0]);for(n=1;n<c;n++)h[n]=h[n-1].clone(), l[n]=l[n-1].clone(),k.crossVectors(f[n-1],f[n]),k.length()>Number.EPSILON&&(k.normalize(),d=Math.acos(b.Math.clamp(f[n-1].dot(f[n]),-1,1)),h[n].applyMatrix4(p.makeRotationAxis(k,d))),l[n].crossVectors(f[n],h[n]);if(e)for(d=Math.acos(b.Math.clamp(h[0].dot(h[c-1]),-1,1)),d/=c-1,0<f[0].dot(k.crossVectors(h[0],h[c-1]))&&(d=-d),n=1;n<c;n++)h[n].applyMatrix4(p.makeRotationAxis(f[n],d*n)),l[n].crossVectors(f[n],h[n])};b.PolyhedronGeometry=function(a,c,e,d){function f(a){var c=a.normalize().clone();c.index= p.vertices.push(c)-1;c.uv=new b.Vector2(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));return c}function h(a,c,d,e){e=new b.Face3(a.index,c.index,d.index,[a.clone(),c.clone(),d.clone()],void 0,e);p.faces.push(e);B.copy(a).add(c).add(d).divideScalar(3);e=Math.atan2(B.z,-B.x);p.faceVertexUvs[0].push([k(a.uv,a,e),k(c.uv,c,e),k(d.uv,d,e)])}function l(a,b){for(var c=Math.pow(2,b),d=f(p.vertices[a.a]),e=f(p.vertices[a.b]),l=f(p.vertices[a.c]),k=[],m=a.materialIndex, n=0;n<=c;n++){k[n]=[];for(var q=f(d.clone().lerp(l,n/c)),t=f(e.clone().lerp(l,n/c)),u=c-n,v=0;v<=u;v++)k[n][v]=0===v&&n===c?q:f(q.clone().lerp(t,v/u))}for(n=0;n<c;n++)for(v=0;v<2*(c-n)-1;v++)d=Math.floor(v/2),0===v%2?h(k[n][d+1],k[n+1][d],k[n][d],m):h(k[n][d+1],k[n+1][d+1],k[n+1][d],m)}function k(a,c,d){0>d&&1===a.x&&(a=new b.Vector2(a.x-1,a.y));0===c.x&&0===c.z&&(a=new b.Vector2(d/2/Math.PI+.5,a.y));return a.clone()}b.Geometry.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a, indices:c,radius:e,detail:d};e=e||1;d=d||0;for(var p=this,n=0,w=a.length;n<w;n+=3)f(new b.Vector3(a[n],a[n+1],a[n+2]));a=this.vertices;for(var u=[],q=n=0,w=c.length;n<w;n+=3,q++){var v=a[c[n]],x=a[c[n+1]],z=a[c[n+2]];u[q]=new b.Face3(v.index,x.index,z.index,[v.clone(),x.clone(),z.clone()],void 0,q)}for(var B=new b.Vector3,n=0,w=u.length;n<w;n++)l(u[n],d);n=0;for(w=this.faceVertexUvs[0].length;n<w;n++)c=this.faceVertexUvs[0][n],d=c[0].x,a=c[1].x,u=c[2].x,q=Math.min(d,a,u),.9<Math.max(d,a,u)&&.1>q&& (.2>d&&(c[0].x+=1),.2>a&&(c[1].x+=1),.2>u&&(c[2].x+=1));n=0;for(w=this.vertices.length;n<w;n++)this.vertices[n].multiplyScalar(e);this.mergeVertices();this.computeFaceNormals();this.boundingSphere=new b.Sphere(new b.Vector3,e)};b.PolyhedronGeometry.prototype=Object.create(b.Geometry.prototype);b.PolyhedronGeometry.prototype.constructor=b.PolyhedronGeometry;b.DodecahedronGeometry=function(a,c){var e=(1+Math.sqrt(5))/2,d=1/e;b.PolyhedronGeometry.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1, -1,1,1,1,-1,1,1,1,0,-d,-e,0,-d,e,0,d,-e,0,d,e,-d,-e,0,-d,e,0,d,-e,0,d,e,0,-e,0,-d,e,0,-d,-e,0,d,e,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,c);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:c}};b.DodecahedronGeometry.prototype=Object.create(b.PolyhedronGeometry.prototype); b.DodecahedronGeometry.prototype.constructor=b.DodecahedronGeometry;b.IcosahedronGeometry=function(a,c){var e=(1+Math.sqrt(5))/2;b.PolyhedronGeometry.call(this,[-1,e,0,1,e,0,-1,-e,0,1,-e,0,0,-1,e,0,1,e,0,-1,-e,0,1,-e,e,0,-1,e,0,1,-e,0,-1,-e,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,c);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:c}};b.IcosahedronGeometry.prototype=Object.create(b.PolyhedronGeometry.prototype); b.IcosahedronGeometry.prototype.constructor=b.IcosahedronGeometry;b.OctahedronGeometry=function(a,c){b.PolyhedronGeometry.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,c);this.type="OctahedronGeometry";this.parameters={radius:a,detail:c}};b.OctahedronGeometry.prototype=Object.create(b.PolyhedronGeometry.prototype);b.OctahedronGeometry.prototype.constructor=b.OctahedronGeometry;b.TetrahedronGeometry=function(a,c){b.PolyhedronGeometry.call(this, [1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,c);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:c}};b.TetrahedronGeometry.prototype=Object.create(b.PolyhedronGeometry.prototype);b.TetrahedronGeometry.prototype.constructor=b.TetrahedronGeometry;b.ParametricGeometry=function(a,c,e){b.Geometry.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:c,stacks:e};var d=this.vertices,f=this.faces,h=this.faceVertexUvs[0],l,k,n,p,w=c+1;for(l=0;l<=e;l++)for(p= l/e,k=0;k<=c;k++)n=k/c,n=a(n,p),d.push(n);var u,q,v,x;for(l=0;l<e;l++)for(k=0;k<c;k++)a=l*w+k,d=l*w+k+1,p=(l+1)*w+k+1,n=(l+1)*w+k,u=new b.Vector2(k/c,l/e),q=new b.Vector2((k+1)/c,l/e),v=new b.Vector2((k+1)/c,(l+1)/e),x=new b.Vector2(k/c,(l+1)/e),f.push(new b.Face3(a,d,n)),h.push([u,q,x]),f.push(new b.Face3(d,p,n)),h.push([q.clone(),v,x.clone()]);this.computeFaceNormals();this.computeVertexNormals()};b.ParametricGeometry.prototype=Object.create(b.Geometry.prototype);b.ParametricGeometry.prototype.constructor= b.ParametricGeometry;b.WireframeGeometry=function(a){function c(a,b){return a-b}b.BufferGeometry.call(this);var e=[0,0],d={},f=["a","b","c"];if(a instanceof b.Geometry){var h=a.vertices,l=a.faces,k=0,n=new Uint32Array(6*l.length);a=0;for(var p=l.length;a<p;a++)for(var w=l[a],u=0;3>u;u++){e[0]=w[f[u]];e[1]=w[f[(u+1)%3]];e.sort(c);var q=e.toString();void 0===d[q]&&(n[2*k]=e[0],n[2*k+1]=e[1],d[q]=!0,k++)}e=new Float32Array(6*k);a=0;for(p=k;a<p;a++)for(u=0;2>u;u++)d=h[n[2*a+u]],k=6*a+3*u,e[k+0]=d.x,e[k+ 1]=d.y,e[k+2]=d.z;this.addAttribute("position",new b.BufferAttribute(e,3))}else if(a instanceof b.BufferGeometry){if(null!==a.index){p=a.index.array;h=a.attributes.position;f=a.groups;k=0;0===f.length&&a.addGroup(0,p.length);n=new Uint32Array(2*p.length);l=0;for(w=f.length;l<w;++l){a=f[l];u=a.start;q=a.count;a=u;for(var v=u+q;a<v;a+=3)for(u=0;3>u;u++)e[0]=p[a+u],e[1]=p[a+(u+1)%3],e.sort(c),q=e.toString(),void 0===d[q]&&(n[2*k]=e[0],n[2*k+1]=e[1],d[q]=!0,k++)}e=new Float32Array(6*k);a=0;for(p=k;a< p;a++)for(u=0;2>u;u++)k=6*a+3*u,d=n[2*a+u],e[k+0]=h.getX(d),e[k+1]=h.getY(d),e[k+2]=h.getZ(d)}else for(h=a.attributes.position.array,k=h.length/3,n=k/3,e=new Float32Array(6*k),a=0,p=n;a<p;a++)for(u=0;3>u;u++)k=18*a+6*u,n=9*a+3*u,e[k+0]=h[n],e[k+1]=h[n+1],e[k+2]=h[n+2],d=9*a+(u+1)%3*3,e[k+3]=h[d],e[k+4]=h[d+1],e[k+5]=h[d+2];this.addAttribute("position",new b.BufferAttribute(e,3))}};b.WireframeGeometry.prototype=Object.create(b.BufferGeometry.prototype);b.WireframeGeometry.prototype.constructor=b.WireframeGeometry; b.AxisHelper=function(a){a=a||1;var c=new Float32Array([0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a]),e=new Float32Array([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]);a=new b.BufferGeometry;a.addAttribute("position",new b.BufferAttribute(c,3));a.addAttribute("color",new b.BufferAttribute(e,3));c=new b.LineBasicMaterial({vertexColors:b.VertexColors});b.LineSegments.call(this,a,c)};b.AxisHelper.prototype=Object.create(b.LineSegments.prototype);b.AxisHelper.prototype.constructor=b.AxisHelper;b.ArrowHelper=function(){var a= new b.BufferGeometry;a.addAttribute("position",new b.Float32Attribute([0,0,0,0,1,0],3));var c=new b.CylinderBufferGeometry(0,.5,1,5,1);c.translate(0,-.5,0);return function(e,d,f,h,l,k){b.Object3D.call(this);void 0===h&&(h=16776960);void 0===f&&(f=1);void 0===l&&(l=.2*f);void 0===k&&(k=.2*l);this.position.copy(d);this.line=new b.Line(a,new b.LineBasicMaterial({color:h}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new b.Mesh(c,new b.MeshBasicMaterial({color:h}));this.cone.matrixAutoUpdate= !1;this.add(this.cone);this.setDirection(e);this.setLength(f,l,k)}}();b.ArrowHelper.prototype=Object.create(b.Object3D.prototype);b.ArrowHelper.prototype.constructor=b.ArrowHelper;b.ArrowHelper.prototype.setDirection=function(){var a=new b.Vector3,c;return function(b){.99999<b.y?this.quaternion.set(0,0,0,1):-.99999>b.y?this.quaternion.set(1,0,0,0):(a.set(b.z,0,-b.x).normalize(),c=Math.acos(b.y),this.quaternion.setFromAxisAngle(a,c))}}();b.ArrowHelper.prototype.setLength=function(a,b,e){void 0===b&& (b=.2*a);void 0===e&&(e=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(e,b,e);this.cone.position.y=a;this.cone.updateMatrix()};b.ArrowHelper.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};b.BoxHelper=function(a){var c=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),e=new Float32Array(24),d=new b.BufferGeometry;d.setIndex(new b.BufferAttribute(c,1));d.addAttribute("position",new b.BufferAttribute(e, 3));b.LineSegments.call(this,d,new b.LineBasicMaterial({color:16776960}));void 0!==a&&this.update(a)};b.BoxHelper.prototype=Object.create(b.LineSegments.prototype);b.BoxHelper.prototype.constructor=b.BoxHelper;b.BoxHelper.prototype.update=function(){var a=new b.Box3;return function(c){c instanceof b.Box3?a.copy(c):a.setFromObject(c);if(!a.isEmpty()){c=a.min;var e=a.max,d=this.geometry.attributes.position,f=d.array;f[0]=e.x;f[1]=e.y;f[2]=e.z;f[3]=c.x;f[4]=e.y;f[5]=e.z;f[6]=c.x;f[7]=c.y;f[8]=e.z;f[9]= e.x;f[10]=c.y;f[11]=e.z;f[12]=e.x;f[13]=e.y;f[14]=c.z;f[15]=c.x;f[16]=e.y;f[17]=c.z;f[18]=c.x;f[19]=c.y;f[20]=c.z;f[21]=e.x;f[22]=c.y;f[23]=c.z;d.needsUpdate=!0;this.geometry.computeBoundingSphere()}}}();b.BoundingBoxHelper=function(a,c){var e=void 0!==c?c:8947848;this.object=a;this.box=new b.Box3;b.Mesh.call(this,new b.BoxGeometry(1,1,1),new b.MeshBasicMaterial({color:e,wireframe:!0}))};b.BoundingBoxHelper.prototype=Object.create(b.Mesh.prototype);b.BoundingBoxHelper.prototype.constructor=b.BoundingBoxHelper; b.BoundingBoxHelper.prototype.update=function(){this.box.setFromObject(this.object);this.box.size(this.scale);this.box.center(this.position)};b.CameraHelper=function(a){function c(a,b,c){e(a,c);e(b,c)}function e(a,c){d.vertices.push(new b.Vector3);d.colors.push(new b.Color(c));void 0===h[a]&&(h[a]=[]);h[a].push(d.vertices.length-1)}var d=new b.Geometry,f=new b.LineBasicMaterial({color:16777215,vertexColors:b.FaceColors}),h={};c("n1","n2",16755200);c("n2","n4",16755200);c("n4","n3",16755200);c("n3", "n1",16755200);c("f1","f2",16755200);c("f2","f4",16755200);c("f4","f3",16755200);c("f3","f1",16755200);c("n1","f1",16755200);c("n2","f2",16755200);c("n3","f3",16755200);c("n4","f4",16755200);c("p","n1",16711680);c("p","n2",16711680);c("p","n3",16711680);c("p","n4",16711680);c("u1","u2",43775);c("u2","u3",43775);c("u3","u1",43775);c("c","t",16777215);c("p","c",3355443);c("cn1","cn2",3355443);c("cn3","cn4",3355443);c("cf1","cf2",3355443);c("cf3","cf4",3355443);b.LineSegments.call(this,d,f);this.camera= a;this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()};b.CameraHelper.prototype=Object.create(b.LineSegments.prototype);b.CameraHelper.prototype.constructor=b.CameraHelper;b.CameraHelper.prototype.update=function(){function a(a,b,k,n){d.set(b,k,n).unproject(f);a=e[a];if(void 0!==a)for(b=0,k=a.length;b<k;b++)c.vertices[a[b]].copy(d)}var c,e,d=new b.Vector3,f=new b.Camera;return function(){c=this.geometry;e=this.pointMap;f.projectionMatrix.copy(this.camera.projectionMatrix); a("c",0,0,-1);a("t",0,0,1);a("n1",-1,-1,-1);a("n2",1,-1,-1);a("n3",-1,1,-1);a("n4",1,1,-1);a("f1",-1,-1,1);a("f2",1,-1,1);a("f3",-1,1,1);a("f4",1,1,1);a("u1",.7,1.1,-1);a("u2",-.7,1.1,-1);a("u3",0,2,-1);a("cf1",-1,0,1);a("cf2",1,0,1);a("cf3",0,-1,1);a("cf4",0,1,1);a("cn1",-1,0,-1);a("cn2",1,0,-1);a("cn3",0,-1,-1);a("cn4",0,1,-1);c.verticesNeedUpdate=!0}}();b.DirectionalLightHelper=function(a,c){b.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate= !1;void 0===c&&(c=1);var e=new b.BufferGeometry;e.addAttribute("position",new b.Float32Attribute([-c,c,0,c,c,0,c,-c,0,-c,-c,0,-c,c,0],3));var d=new b.LineBasicMaterial({fog:!1});this.add(new b.Line(e,d));e=new b.BufferGeometry;e.addAttribute("position",new b.Float32Attribute([0,0,0,0,0,1],3));this.add(new b.Line(e,d));this.update()};b.DirectionalLightHelper.prototype=Object.create(b.Object3D.prototype);b.DirectionalLightHelper.prototype.constructor=b.DirectionalLightHelper;b.DirectionalLightHelper.prototype.dispose= function(){var a=this.children[0],b=this.children[1];a.geometry.dispose();a.material.dispose();b.geometry.dispose();b.material.dispose()};b.DirectionalLightHelper.prototype.update=function(){var a=new b.Vector3,c=new b.Vector3,e=new b.Vector3;return function(){a.setFromMatrixPosition(this.light.matrixWorld);c.setFromMatrixPosition(this.light.target.matrixWorld);e.subVectors(c,a);var b=this.children[0],f=this.children[1];b.lookAt(e);b.material.color.copy(this.light.color).multiplyScalar(this.light.intensity); f.lookAt(e);f.scale.z=e.length()}}();b.EdgesHelper=function(a,c,e){c=void 0!==c?c:16777215;b.LineSegments.call(this,new b.EdgesGeometry(a.geometry,e),new b.LineBasicMaterial({color:c}));this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1};b.EdgesHelper.prototype=Object.create(b.LineSegments.prototype);b.EdgesHelper.prototype.constructor=b.EdgesHelper;b.FaceNormalsHelper=function(a,c,e,d){this.object=a;this.size=void 0!==c?c:1;a=void 0!==e?e:16776960;d=void 0!==d?d:1;c=0;e=this.object.geometry;e instanceof b.Geometry?c=e.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");e=new b.BufferGeometry;c=new b.Float32Attribute(6*c,3);e.addAttribute("position",c);b.LineSegments.call(this,e,new b.LineBasicMaterial({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()};b.FaceNormalsHelper.prototype=Object.create(b.LineSegments.prototype);b.FaceNormalsHelper.prototype.constructor=b.FaceNormalsHelper;b.FaceNormalsHelper.prototype.update= function(){var a=new b.Vector3,c=new b.Vector3,e=new b.Matrix3;return function(){this.object.updateMatrixWorld(!0);e.getNormalMatrix(this.object.matrixWorld);for(var b=this.object.matrixWorld,f=this.geometry.attributes.position,h=this.object.geometry,l=h.vertices,h=h.faces,k=0,n=0,p=h.length;n<p;n++){var w=h[n],u=w.normal;a.copy(l[w.a]).add(l[w.b]).add(l[w.c]).divideScalar(3).applyMatrix4(b);c.copy(u).applyMatrix3(e).normalize().multiplyScalar(this.size).add(a);f.setXYZ(k,a.x,a.y,a.z);k+=1;f.setXYZ(k, c.x,c.y,c.z);k+=1}f.needsUpdate=!0;return this}}();b.GridHelper=function(a,c,e,d){e=new b.Color(void 0!==e?e:4473924);d=new b.Color(void 0!==d?d:8947848);for(var f=[],h=[],l=-a,k=0;l<=a;l+=c){f.push(-a,0,l,a,0,l);f.push(l,0,-a,l,0,a);var n=0===l?e:d;n.toArray(h,k);k+=3;n.toArray(h,k);k+=3;n.toArray(h,k);k+=3;n.toArray(h,k);k+=3}a=new b.BufferGeometry;a.addAttribute("position",new b.Float32Attribute(f,3));a.addAttribute("color",new b.Float32Attribute(h,3));f=new b.LineBasicMaterial({vertexColors:b.VertexColors}); b.LineSegments.call(this,a,f)};b.GridHelper.prototype=Object.create(b.LineSegments.prototype);b.GridHelper.prototype.constructor=b.GridHelper;b.GridHelper.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};b.HemisphereLightHelper=function(a,c){b.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.colors=[new b.Color,new b.Color];var e=new b.SphereGeometry(c, 4,2);e.rotateX(-Math.PI/2);for(var d=0;8>d;d++)e.faces[d].color=this.colors[4>d?0:1];d=new b.MeshBasicMaterial({vertexColors:b.FaceColors,wireframe:!0});this.lightSphere=new b.Mesh(e,d);this.add(this.lightSphere);this.update()};b.HemisphereLightHelper.prototype=Object.create(b.Object3D.prototype);b.HemisphereLightHelper.prototype.constructor=b.HemisphereLightHelper;b.HemisphereLightHelper.prototype.dispose=function(){this.lightSphere.geometry.dispose();this.lightSphere.material.dispose()};b.HemisphereLightHelper.prototype.update= function(){var a=new b.Vector3;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity);this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity);this.lightSphere.lookAt(a.setFromMatrixPosition(this.light.matrixWorld).negate());this.lightSphere.geometry.colorsNeedUpdate=!0}}();b.PointLightHelper=function(a,c){this.light=a;this.light.updateMatrixWorld();var e=new b.SphereBufferGeometry(c,4,2),d=new b.MeshBasicMaterial({wireframe:!0,fog:!1}); d.color.copy(this.light.color).multiplyScalar(this.light.intensity);b.Mesh.call(this,e,d);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1};b.PointLightHelper.prototype=Object.create(b.Mesh.prototype);b.PointLightHelper.prototype.constructor=b.PointLightHelper;b.PointLightHelper.prototype.dispose=function(){this.geometry.dispose();this.material.dispose()};b.PointLightHelper.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)};b.SkeletonHelper= function(a){this.bones=this.getBoneList(a);for(var c=new b.Geometry,e=0;e<this.bones.length;e++)this.bones[e].parent instanceof b.Bone&&(c.vertices.push(new b.Vector3),c.vertices.push(new b.Vector3),c.colors.push(new b.Color(0,0,1)),c.colors.push(new b.Color(0,1,0)));c.dynamic=!0;e=new b.LineBasicMaterial({vertexColors:b.VertexColors,depthTest:!1,depthWrite:!1,transparent:!0});b.LineSegments.call(this,c,e);this.root=a;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.update()};b.SkeletonHelper.prototype= Object.create(b.LineSegments.prototype);b.SkeletonHelper.prototype.constructor=b.SkeletonHelper;b.SkeletonHelper.prototype.getBoneList=function(a){var c=[];a instanceof b.Bone&&c.push(a);for(var e=0;e<a.children.length;e++)c.push.apply(c,this.getBoneList(a.children[e]));return c};b.SkeletonHelper.prototype.update=function(){for(var a=this.geometry,c=(new b.Matrix4).getInverse(this.root.matrixWorld),e=new b.Matrix4,d=0,f=0;f<this.bones.length;f++){var h=this.bones[f];h.parent instanceof b.Bone&&(e.multiplyMatrices(c, h.matrixWorld),a.vertices[d].setFromMatrixPosition(e),e.multiplyMatrices(c,h.parent.matrixWorld),a.vertices[d+1].setFromMatrixPosition(e),d+=2)}a.verticesNeedUpdate=!0;a.computeBoundingSphere()};b.SpotLightHelper=function(a){b.Object3D.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;a=new b.BufferGeometry;for(var c=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],e=0,d=1;32>e;e++,d++){var f=e/32*Math.PI*2,h=d/32*Math.PI*2;c.push(Math.cos(f), Math.sin(f),1,Math.cos(h),Math.sin(h),1)}a.addAttribute("position",new b.Float32Attribute(c,3));c=new b.LineBasicMaterial({fog:!1});this.cone=new b.LineSegments(a,c);this.add(this.cone);this.update()};b.SpotLightHelper.prototype=Object.create(b.Object3D.prototype);b.SpotLightHelper.prototype.constructor=b.SpotLightHelper;b.SpotLightHelper.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};b.SpotLightHelper.prototype.update=function(){var a=new b.Vector3,c=new b.Vector3; return function(){var b=this.light.distance?this.light.distance:1E3,d=b*Math.tan(this.light.angle);this.cone.scale.set(d,d,b);a.setFromMatrixPosition(this.light.matrixWorld);c.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(c.sub(a));this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}}();b.VertexNormalsHelper=function(a,c,e,d){this.object=a;this.size=void 0!==c?c:1;a=void 0!==e?e:16711680;d=void 0!==d?d:1;c=0;e=this.object.geometry;e instanceof b.Geometry?c=3*e.faces.length:e instanceof b.BufferGeometry&&(c=e.attributes.normal.count);e=new b.BufferGeometry;c=new b.Float32Attribute(6*c,3);e.addAttribute("position",c);b.LineSegments.call(this,e,new b.LineBasicMaterial({color:a,linewidth:d}));this.matrixAutoUpdate=!1;this.update()};b.VertexNormalsHelper.prototype=Object.create(b.LineSegments.prototype);b.VertexNormalsHelper.prototype.constructor=b.VertexNormalsHelper;b.VertexNormalsHelper.prototype.update=function(){var a=new b.Vector3,c=new b.Vector3, e=new b.Matrix3;return function(){var d=["a","b","c"];this.object.updateMatrixWorld(!0);e.getNormalMatrix(this.object.matrixWorld);var f=this.object.matrixWorld,h=this.geometry.attributes.position,l=this.object.geometry;if(l instanceof b.Geometry)for(var k=l.vertices,n=l.faces,p=l=0,w=n.length;p<w;p++)for(var u=n[p],q=0,v=u.vertexNormals.length;q<v;q++){var x=u.vertexNormals[q];a.copy(k[u[d[q]]]).applyMatrix4(f);c.copy(x).applyMatrix3(e).normalize().multiplyScalar(this.size).add(a);h.setXYZ(l,a.x, a.y,a.z);l+=1;h.setXYZ(l,c.x,c.y,c.z);l+=1}else if(l instanceof b.BufferGeometry)for(d=l.attributes.position,k=l.attributes.normal,q=l=0,v=d.count;q<v;q++)a.set(d.getX(q),d.getY(q),d.getZ(q)).applyMatrix4(f),c.set(k.getX(q),k.getY(q),k.getZ(q)),c.applyMatrix3(e).normalize().multiplyScalar(this.size).add(a),h.setXYZ(l,a.x,a.y,a.z),l+=1,h.setXYZ(l,c.x,c.y,c.z),l+=1;h.needsUpdate=!0;return this}}();b.WireframeHelper=function(a,c){var e=void 0!==c?c:16777215;b.LineSegments.call(this,new b.WireframeGeometry(a.geometry), new b.LineBasicMaterial({color:e}));this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1};b.WireframeHelper.prototype=Object.create(b.LineSegments.prototype);b.WireframeHelper.prototype.constructor=b.WireframeHelper;b.ImmediateRenderObject=function(a){b.Object3D.call(this);this.material=a;this.render=function(a){}};b.ImmediateRenderObject.prototype=Object.create(b.Object3D.prototype);b.ImmediateRenderObject.prototype.constructor=b.ImmediateRenderObject;b.MorphBlendMesh=function(a,c){b.Mesh.call(this, a,c);this.animationsMap={};this.animationsList=[];var e=this.geometry.morphTargets.length;this.createAnimation("__default",0,e-1,e/1);this.setAnimationWeight("__default",1)};b.MorphBlendMesh.prototype=Object.create(b.Mesh.prototype);b.MorphBlendMesh.prototype.constructor=b.MorphBlendMesh;b.MorphBlendMesh.prototype.createAnimation=function(a,b,e,d){b={start:b,end:e,length:e-b+1,fps:d,duration:(e-b)/d,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1}; this.animationsMap[a]=b;this.animationsList.push(b)};b.MorphBlendMesh.prototype.autoCreateAnimations=function(a){for(var b=/([a-z]+)_?(\d+)/i,e,d={},f=this.geometry,h=0,l=f.morphTargets.length;h<l;h++){var k=f.morphTargets[h].name.match(b);if(k&&1<k.length){var n=k[1];d[n]||(d[n]={start:Infinity,end:-Infinity});k=d[n];h<k.start&&(k.start=h);h>k.end&&(k.end=h);e||(e=n)}}for(n in d)k=d[n],this.createAnimation(n,k.start,k.end,a);this.firstAnimation=e};b.MorphBlendMesh.prototype.setAnimationDirectionForward= function(a){if(a=this.animationsMap[a])a.direction=1,a.directionBackwards=!1};b.MorphBlendMesh.prototype.setAnimationDirectionBackward=function(a){if(a=this.animationsMap[a])a.direction=-1,a.directionBackwards=!0};b.MorphBlendMesh.prototype.setAnimationFPS=function(a,b){var e=this.animationsMap[a];e&&(e.fps=b,e.duration=(e.end-e.start)/e.fps)};b.MorphBlendMesh.prototype.setAnimationDuration=function(a,b){var e=this.animationsMap[a];e&&(e.duration=b,e.fps=(e.end-e.start)/e.duration)};b.MorphBlendMesh.prototype.setAnimationWeight= function(a,b){var e=this.animationsMap[a];e&&(e.weight=b)};b.MorphBlendMesh.prototype.setAnimationTime=function(a,b){var e=this.animationsMap[a];e&&(e.time=b)};b.MorphBlendMesh.prototype.getAnimationTime=function(a){var b=0;if(a=this.animationsMap[a])b=a.time;return b};b.MorphBlendMesh.prototype.getAnimationDuration=function(a){var b=-1;if(a=this.animationsMap[a])b=a.duration;return b};b.MorphBlendMesh.prototype.playAnimation=function(a){var b=this.animationsMap[a];b?(b.time=0,b.active=!0):console.warn("THREE.MorphBlendMesh: animation["+ a+"] undefined in .playAnimation()")};b.MorphBlendMesh.prototype.stopAnimation=function(a){if(a=this.animationsMap[a])a.active=!1};b.MorphBlendMesh.prototype.update=function(a){for(var c=0,e=this.animationsList.length;c<e;c++){var d=this.animationsList[c];if(d.active){var f=d.duration/d.length;d.time+=d.direction*a;if(d.mirroredLoop){if(d.time>d.duration||0>d.time)d.direction*=-1,d.time>d.duration&&(d.time=d.duration,d.directionBackwards=!0),0>d.time&&(d.time=0,d.directionBackwards=!1)}else d.time%= d.duration,0>d.time&&(d.time+=d.duration);var h=d.start+b.Math.clamp(Math.floor(d.time/f),0,d.length-1),k=d.weight;h!==d.currentFrame&&(this.morphTargetInfluences[d.lastFrame]=0,this.morphTargetInfluences[d.currentFrame]=1*k,this.morphTargetInfluences[h]=0,d.lastFrame=d.currentFrame,d.currentFrame=h);f=d.time%f/f;d.directionBackwards&&(f=1-f);d.currentFrame!==d.lastFrame?(this.morphTargetInfluences[d.currentFrame]=f*k,this.morphTargetInfluences[d.lastFrame]=(1-f)*k):this.morphTargetInfluences[d.currentFrame]= k}}}},function(p,k){p.exports=function(f){f.webpackPolyfill||(f.deprecate=function(){},f.paths=[],f.children=[],f.webpackPolyfill=1);return f}},function(p,k,f){k.__esModule=!0;var n=(p=f(194))&&p.__esModule?p:{"default":p};p=function(){function b(a,c,e){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.canvas=a;this.video=c;this.options=e;this.requestId=null}b.prototype.createScene=function(){var a=this.options,b=a.ratio,e=a.width,a=a.height;this.scene=new n["default"].Scene; this.camera=new n["default"].PerspectiveCamera(75,b,1,1E3);this.renderer=new n["default"].WebGLRenderer({canvas:this.canvas});this.updateSceneSize(e,a);this.texture=new n["default"].VideoTexture(this.video);this.texture.minFilter=n["default"].LinearFilter;this.material=new n["default"].MeshBasicMaterial({map:this.texture,side:n["default"].DoubleSide});this.geometry=new n["default"].SphereGeometry(5,32,32);this.sphere=new n["default"].Mesh(this.geometry,this.material);this.sphere.scale.x=-1;this.scene.add(this.sphere)}; b.prototype.updateCameraQuaternion=function(a,b,e,d){var f=new n["default"].Vector3(0,0,1),h=new n["default"].Euler,k=new n["default"].Quaternion,m=new n["default"].Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5));h.set(b,a,-e,"YXZ");this.camera.quaternion.setFromEuler(h);this.camera.quaternion.multiply(m);this.camera.quaternion.multiply(k.setFromAxisAngle(f,-d))};b.prototype.updateOrientationScene=function(a,b){var e=n["default"].Math.degToRad(a),d=n["default"].Math.degToRad(b.alpha),f=n["default"].Math.degToRad(b.beta), h=n["default"].Math.degToRad(b.gamma);this.camera&&(this.updateCameraQuaternion(d,f,h,e),this.requestId||this.renderer.render(this.scene,this.camera))};b.prototype.rotateScene=function(a,b){!this.sphere||isNaN(a)||isNaN(b)||(this.sphere.rotation.y+=a,this.sphere.rotation.x+=b,this.requestId||this.renderer.render(this.scene,this.camera))};b.prototype.updateSceneSize=function(a,b){this.renderer.setSize(a,b,!1)};b.prototype.renderLoop=function(){this.requestId=window.requestAnimationFrame(this.renderLoop.bind(this)); this.renderer.render(this.scene,this.camera)};b.prototype.stopRenderLoop=function(){this.requestId&&(window.cancelAnimationFrame(this.requestId),this.requestId=void 0)};return b}();k["default"]=p},function(p,k,f){function n(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a, b):a.__proto__=b)}k.__esModule=!0;var b=(p=f(93))&&p.__esModule?p:{"default":p},a={top:0,left:0,position:"relative"},c={display:"none"};p=function(e){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");var a=e.apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!==typeof a&&"function"!==typeof a?this:a}n(d,e);d.prototype.render=function(){return b["default"].createElement("div", null,b["default"].createElement("canvas",{style:a,ref:"canvasTag"}),b["default"].createElement("video",{style:c,ref:"videoTag"}))};return d}(p.Component);k["default"]=p},function(p,k){p.exports=function(){throw Error("define cannot be used indirect");}}])});
docs/src/pages/component-demos/lists/CheckboxListSecondary.js
dsslimshaddy/material-ui
// @flow weak import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import List, { ListItem, ListItemSecondaryAction, ListItemText } from 'material-ui/List'; import Checkbox from 'material-ui/Checkbox'; import Avatar from 'material-ui/Avatar'; import remyImage from 'docs/src/assets/images/remy.jpg'; const styles = theme => ({ root: { width: '100%', maxWidth: 360, background: theme.palette.background.paper, }, }); class CheckboxListSecondary extends Component { state = { checked: [1], }; handleToggle = (event, value) => { const { checked } = this.state; const currentIndex = checked.indexOf(value); const newChecked = [...checked]; if (currentIndex === -1) { newChecked.push(value); } else { newChecked.splice(currentIndex, 1); } this.setState({ checked: newChecked, }); }; render() { const classes = this.props.classes; return ( <div className={classes.root}> <List> {[0, 1, 2, 3].map(value => <ListItem dense button key={value}> <Avatar alt="Remy Sharp" src={remyImage} /> <ListItemText primary={`Line item ${value + 1}`} /> <ListItemSecondaryAction> <Checkbox onClick={event => this.handleToggle(event, value)} checked={this.state.checked.indexOf(value) !== -1} /> </ListItemSecondaryAction> </ListItem>, )} </List> </div> ); } } CheckboxListSecondary.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(CheckboxListSecondary);
ajax/libs/react-instantsearch/4.1.0-beta.4/Connectors.js
nolsherry/cdnjs
/*! ReactInstantSearch 4.1.0-beta.4 | © Algolia, inc. | https://community.algolia.com/react-instantsearch/ */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react")); else if(typeof define === 'function' && define.amd) define(["react"], factory); else if(typeof exports === 'object') exports["Connectors"] = factory(require("react")); else root["ReactInstantSearch"] = root["ReactInstantSearch"] || {}, root["ReactInstantSearch"]["Connectors"] = factory(root["React"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_4__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 433); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ if (false) { var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; var isValidElement = function(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; }; // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(159)(); } /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEqual2 = __webpack_require__(81); var _isEqual3 = _interopRequireDefault(_isEqual2); var _has2 = __webpack_require__(58); var _has3 = _interopRequireDefault(_has2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); exports.default = createConnector; var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(44); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * @typedef {object} ConnectorDescription * @property {string} displayName - the displayName used by the wrapper * @property {function} refine - a function to filter the local state * @property {function} getSearchParameters - function transforming the local state to a SearchParameters * @property {function} getMetadata - metadata of the widget * @property {function} transitionState - hook after the state has changed * @property {function} getProvidedProps - transform the state into props passed to the wrapped component. * Receives (props, widgetStates, searchState, metadata) and returns the local state. * @property {function} getId - Receives props and return the id that will be used to identify the widget * @property {function} cleanUp - hook when the widget will unmount. Receives (props, searchState) and return a cleaned state. * @property {object} propTypes - PropTypes forwarded to the wrapped component. * @property {object} defaultProps - default values for the props */ /** * Connectors are the HOC used to transform React components * into InstantSearch widgets. * In order to simplify the construction of such connectors * `createConnector` takes a description and transform it into * a connector. * @param {ConnectorDescription} connectorDesc the description of the connector * @return {Connector} a function that wraps a component into * an instantsearch connected one. */ function createConnector(connectorDesc) { if (!connectorDesc.displayName) { throw new Error('`createConnector` requires you to provide a `displayName` property.'); } var hasRefine = (0, _has3.default)(connectorDesc, 'refine'); var hasSearchForFacetValues = (0, _has3.default)(connectorDesc, 'searchForFacetValues'); var hasSearchParameters = (0, _has3.default)(connectorDesc, 'getSearchParameters'); var hasMetadata = (0, _has3.default)(connectorDesc, 'getMetadata'); var hasTransitionState = (0, _has3.default)(connectorDesc, 'transitionState'); var hasCleanUp = (0, _has3.default)(connectorDesc, 'cleanUp'); var isWidget = hasSearchParameters || hasMetadata || hasTransitionState; return function (Composed) { var _class, _temp, _initialiseProps; return _temp = _class = function (_Component) { _inherits(Connector, _Component); function Connector(props, context) { _classCallCheck(this, Connector); var _this = _possibleConstructorReturn(this, (Connector.__proto__ || Object.getPrototypeOf(Connector)).call(this, props, context)); _initialiseProps.call(_this); var _context$ais = context.ais, store = _context$ais.store, widgetsManager = _context$ais.widgetsManager, multiIndexContext = context.multiIndexContext; var canRender = false; _this.state = { props: _this.getProvidedProps(_extends({}, props, { canRender: canRender })), canRender: canRender // use to know if a component is rendered (browser), or not (server). }; _this.unsubscribe = store.subscribe(function () { if (_this.state.canRender) { _this.setState({ props: _this.getProvidedProps(_extends({}, _this.props, { canRender: _this.state.canRender })) }); } }); var getSearchParameters = hasSearchParameters ? function (searchParameters) { return connectorDesc.getSearchParameters.call(_this, searchParameters, _this.props, store.getState().widgets); } : null; var getMetadata = hasMetadata ? function (nextWidgetsState) { return connectorDesc.getMetadata.call(_this, _this.props, nextWidgetsState); } : null; var transitionState = hasTransitionState ? function (prevWidgetsState, nextWidgetsState) { return connectorDesc.transitionState.call(_this, _this.props, prevWidgetsState, nextWidgetsState); } : null; if (isWidget) { _this.unregisterWidget = widgetsManager.registerWidget({ getSearchParameters: getSearchParameters, getMetadata: getMetadata, transitionState: transitionState, multiIndexContext: multiIndexContext }); } return _this; } _createClass(Connector, [{ key: 'componentDidMount', value: function componentDidMount() { this.setState({ canRender: true }); } }, { key: 'componentWillMount', value: function componentWillMount() { if (connectorDesc.getSearchParameters) { this.context.ais.onSearchParameters(connectorDesc.getSearchParameters, this.context, this.props); } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (!(0, _isEqual3.default)(this.props, nextProps)) { this.setState({ props: this.getProvidedProps(nextProps) }); if (isWidget) { // Since props might have changed, we need to re-run getSearchParameters // and getMetadata with the new props. this.context.ais.widgetsManager.update(); if (connectorDesc.transitionState) { this.context.ais.onSearchStateChange(connectorDesc.transitionState.call(this, nextProps, this.context.ais.store.getState().widgets, this.context.ais.store.getState().widgets)); } } } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.unsubscribe(); if (isWidget) { this.unregisterWidget(); // will schedule an update if (hasCleanUp) { var newState = connectorDesc.cleanUp.call(this, this.props, this.context.ais.store.getState().widgets); this.context.ais.store.setState(_extends({}, this.context.ais.store.getState(), { widgets: newState })); this.context.ais.onSearchStateChange((0, _utils.removeEmptyKey)(newState)); } } } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps, nextState) { var propsEqual = (0, _utils.shallowEqual)(this.props, nextProps); if (this.state.props === null || nextState.props === null) { if (this.state.props === nextState.props) { return !propsEqual; } return true; } return !propsEqual || !(0, _utils.shallowEqual)(this.state.props, nextState.props); } }, { key: 'render', value: function render() { var _this2 = this; if (this.state.props === null) { return null; } var refineProps = hasRefine ? { refine: this.refine, createURL: this.createURL } : {}; var searchForFacetValuesProps = hasSearchForFacetValues ? { searchForItems: this.searchForFacetValues, searchForFacetValues: function searchForFacetValues(facetName, query) { if (false) { // eslint-disable-next-line no-console console.warn('react-instantsearch: `searchForFacetValues` has been renamed to' + '`searchForItems`, this will break in the next major version.'); } _this2.searchForFacetValues(facetName, query); } } : {}; return _react2.default.createElement(Composed, _extends({}, this.props, this.state.props, refineProps, searchForFacetValuesProps)); } }]); return Connector; }(_react.Component), _class.displayName = connectorDesc.displayName + '(' + (0, _utils.getDisplayName)(Composed) + ')', _class.defaultClassNames = Composed.defaultClassNames, _class.propTypes = connectorDesc.propTypes, _class.defaultProps = connectorDesc.defaultProps, _class.contextTypes = { // @TODO: more precise state manager propType ais: _propTypes2.default.object.isRequired, multiIndexContext: _propTypes2.default.object }, _initialiseProps = function _initialiseProps() { var _this3 = this; this.getProvidedProps = function (props) { var store = _this3.context.ais.store; var _store$getState = store.getState(), results = _store$getState.results, searching = _store$getState.searching, error = _store$getState.error, widgets = _store$getState.widgets, metadata = _store$getState.metadata, resultsFacetValues = _store$getState.resultsFacetValues, searchingForFacetValues = _store$getState.searchingForFacetValues; var searchState = { results: results, searching: searching, error: error, searchingForFacetValues: searchingForFacetValues }; return connectorDesc.getProvidedProps.call(_this3, props, widgets, searchState, metadata, resultsFacetValues); }; this.refine = function () { var _connectorDesc$refine; for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this3.context.ais.onInternalStateUpdate((_connectorDesc$refine = connectorDesc.refine).call.apply(_connectorDesc$refine, [_this3, _this3.props, _this3.context.ais.store.getState().widgets].concat(args))); }; this.searchForFacetValues = function () { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } _this3.context.ais.onSearchForFacetValues(connectorDesc.searchForFacetValues.apply(connectorDesc, [_this3.props, _this3.context.ais.store.getState().widgets].concat(args))); }; this.createURL = function () { var _connectorDesc$refine2; for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } return _this3.context.ais.createHrefForState((_connectorDesc$refine2 = connectorDesc.refine).call.apply(_connectorDesc$refine2, [_this3, _this3.props, _this3.context.ais.store.getState().widgets].concat(args))); }; this.cleanUp = function () { var _connectorDesc$cleanU; for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args[_key4] = arguments[_key4]; } return (_connectorDesc$cleanU = connectorDesc.cleanUp).call.apply(_connectorDesc$cleanU, [_this3].concat(args)); }; }, _temp; }; } /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(76); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 4 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_4__; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _get2 = __webpack_require__(72); var _get3 = _interopRequireDefault(_get2); var _omit2 = __webpack_require__(34); var _omit3 = _interopRequireDefault(_omit2); var _has2 = __webpack_require__(58); var _has3 = _interopRequireDefault(_has2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.getIndex = getIndex; exports.getResults = getResults; exports.hasMultipleIndex = hasMultipleIndex; exports.refineValue = refineValue; exports.getCurrentRefinementValue = getCurrentRefinementValue; exports.cleanUpValue = cleanUpValue; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getIndex(context) { return context && context.multiIndexContext ? context.multiIndexContext.targetedIndex : context.ais.mainTargetedIndex; } function getResults(searchResults, context) { if (searchResults.results && !searchResults.results.hits) { return searchResults.results[getIndex(context)] ? searchResults.results[getIndex(context)] : null; } else { return searchResults.results ? searchResults.results : null; } } function hasMultipleIndex(context) { return context && context.multiIndexContext; } // eslint-disable-next-line max-params function refineValue(searchState, nextRefinement, context, resetPage, namespace) { if (hasMultipleIndex(context)) { return namespace ? refineMultiIndexWithNamespace(searchState, nextRefinement, context, resetPage, namespace) : refineMultiIndex(searchState, nextRefinement, context, resetPage); } else { return namespace ? refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) : refineSingleIndex(searchState, nextRefinement, resetPage); } } function refineMultiIndex(searchState, nextRefinement, context, resetPage) { var page = resetPage ? { page: 1 } : undefined; var index = getIndex(context); var state = (0, _has3.default)(searchState, 'indices.' + index) ? _extends({}, searchState.indices, _defineProperty({}, index, _extends({}, searchState.indices[index], nextRefinement, page))) : _extends({}, searchState.indices, _defineProperty({}, index, _extends({}, nextRefinement, page))); return _extends({}, searchState, { indices: state }); } function refineSingleIndex(searchState, nextRefinement, resetPage) { var page = resetPage ? { page: 1 } : undefined; return _extends({}, searchState, nextRefinement, page); } // eslint-disable-next-line max-params function refineMultiIndexWithNamespace(searchState, nextRefinement, context, resetPage, namespace) { var _extends4; var index = getIndex(context); var page = resetPage ? { page: 1 } : undefined; var state = (0, _has3.default)(searchState, 'indices.' + index) ? _extends({}, searchState.indices, _defineProperty({}, index, _extends({}, searchState.indices[index], (_extends4 = {}, _defineProperty(_extends4, namespace, _extends({}, searchState.indices[index][namespace], nextRefinement)), _defineProperty(_extends4, 'page', 1), _extends4)))) : _extends({}, searchState.indices, _defineProperty({}, index, _extends(_defineProperty({}, namespace, nextRefinement), page))); return _extends({}, searchState, { indices: state }); } function refineSingleIndexWithNamespace(searchState, nextRefinement, resetPage, namespace) { var page = resetPage ? { page: 1 } : undefined; return _extends({}, searchState, _defineProperty({}, namespace, _extends({}, searchState[namespace], nextRefinement)), page); } function getNamespaceAndAttributeName(id) { var parts = id.match(/^([^.]*)\.(.*)/); var namespace = parts && parts[1]; var attributeName = parts && parts[2]; return { namespace: namespace, attributeName: attributeName }; } // eslint-disable-next-line max-params function getCurrentRefinementValue(props, searchState, context, id, defaultValue, refinementsCallback) { var index = getIndex(context); var _getNamespaceAndAttri = getNamespaceAndAttributeName(id), namespace = _getNamespaceAndAttri.namespace, attributeName = _getNamespaceAndAttri.attributeName; var refinements = hasMultipleIndex(context) && searchState.indices && namespace && searchState.indices['' + index] && (0, _has3.default)(searchState.indices['' + index][namespace], '' + attributeName) || hasMultipleIndex(context) && searchState.indices && (0, _has3.default)(searchState, 'indices.' + index + '.' + id) || !hasMultipleIndex(context) && namespace && (0, _has3.default)(searchState[namespace], attributeName) || !hasMultipleIndex(context) && (0, _has3.default)(searchState, id); if (refinements) { var currentRefinement = void 0; if (hasMultipleIndex(context)) { currentRefinement = namespace ? (0, _get3.default)(searchState.indices['' + index][namespace], attributeName) : (0, _get3.default)(searchState.indices[index], id); } else { currentRefinement = namespace ? (0, _get3.default)(searchState[namespace], attributeName) : (0, _get3.default)(searchState, id); } return refinementsCallback(currentRefinement); } if (props.defaultRefinement) { return props.defaultRefinement; } return defaultValue; } function cleanUpValue(searchState, context, id) { var index = getIndex(context); var _getNamespaceAndAttri2 = getNamespaceAndAttributeName(id), namespace = _getNamespaceAndAttri2.namespace, attributeName = _getNamespaceAndAttri2.attributeName; if (hasMultipleIndex(context)) { return namespace ? _extends({}, searchState, { indices: _extends({}, searchState.indices, _defineProperty({}, index, _extends({}, searchState.indices[index], _defineProperty({}, namespace, (0, _omit3.default)(searchState.indices[index][namespace], '' + attributeName))))) }) : (0, _omit3.default)(searchState, 'indices.' + index + '.' + id); } else { return namespace ? _extends({}, searchState, _defineProperty({}, namespace, (0, _omit3.default)(searchState[namespace], '' + attributeName))) : (0, _omit3.default)(searchState, '' + id); } } /***/ }), /* 6 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 7 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(15), getRawTag = __webpack_require__(124), objectToString = __webpack_require__(125); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(89), baseKeys = __webpack_require__(79), isArrayLike = __webpack_require__(11); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(123), getValue = __webpack_require__(128); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(19), isLength = __webpack_require__(42); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 12 */ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(256), baseMatchesProperty = __webpack_require__(259), identity = __webpack_require__(26), isArray = __webpack_require__(0), property = __webpack_require__(261); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { var baseKeys = __webpack_require__(79), getTag = __webpack_require__(57), isArguments = __webpack_require__(20), isArray = __webpack_require__(0), isArrayLike = __webpack_require__(11), isBuffer = __webpack_require__(21), isPrototype = __webpack_require__(38), isTypedArray = __webpack_require__(33); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if `value` is an empty object, collection, map, or set. * * Objects are considered empty if they have no own enumerable string keyed * properties. * * Array-like values such as `arguments` objects, arrays, buffers, strings, or * jQuery-like collections are considered empty if they have a `length` of `0`. * Similarly, maps and sets are considered empty if they have a `size` of `0`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * * _.isEmpty(null); * // => true * * _.isEmpty(true); * // => true * * _.isEmpty(1); * // => true * * _.isEmpty([1, 2, 3]); * // => false * * _.isEmpty({ 'a': 1 }); * // => false */ function isEmpty(value) { if (value == null) { return true; } if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } var tag = getTag(value); if (tag == mapTag || tag == setTag) { return !value.size; } if (isPrototype(value)) { return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } return true; } module.exports = isEmpty; /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(3); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 16 */, /* 17 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(12), baseIteratee = __webpack_require__(13), baseMap = __webpack_require__(183), isArray = __webpack_require__(0); /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, baseIteratee(iteratee, 3)); } module.exports = map; /***/ }), /* 18 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(8), isObject = __webpack_require__(6); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(147), isObjectLike = __webpack_require__(7); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(3), stubFalse = __webpack_require__(148); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(56)(module))) /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(0), isKey = __webpack_require__(64), stringToPath = __webpack_require__(156), toString = __webpack_require__(65); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(8), isObjectLike = __webpack_require__(7); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(23); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(26), overRest = __webpack_require__(166), setToString = __webpack_require__(93); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ''); } module.exports = baseRest; /***/ }), /* 26 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(96), baseAssignValue = __webpack_require__(47); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(113), listCacheDelete = __webpack_require__(114), listCacheGet = __webpack_require__(115), listCacheHas = __webpack_require__(116), listCacheSet = __webpack_require__(117); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(18); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 30 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(10); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(137); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 32 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (typeof value == 'number' || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(149), baseUnary = __webpack_require__(43), nodeUtil = __webpack_require__(150); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(12), baseClone = __webpack_require__(228), baseUnset = __webpack_require__(244), castPath = __webpack_require__(22), copyObject = __webpack_require__(27), customOmitClone = __webpack_require__(246), flatRest = __webpack_require__(176), getAllKeysIn = __webpack_require__(97); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** * The opposite of `_.pick`; this method creates an object composed of the * own and inherited enumerable property paths of `object` that are not omitted. * * **Note:** This method is considerably slower than `_.pick`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to omit. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ var omit = flatRest(function(object, paths) { var result = {}; if (object == null) { return result; } var isDeep = false; paths = arrayMap(paths, function(path) { path = castPath(path, object); isDeep || (isDeep = path.length > 1); return path; }); copyObject(object, getAllKeysIn(object), result); if (isDeep) { result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); } var length = paths.length; while (length--) { baseUnset(result, paths[length]); } return result; }); module.exports = omit; /***/ }), /* 35 */, /* 36 */ /***/ (function(module, exports, __webpack_require__) { var arrayEach = __webpack_require__(95), baseEach = __webpack_require__(73), castFunction = __webpack_require__(179), isArray = __webpack_require__(0); /** * Iterates over elements of `collection` and invokes `iteratee` for each element. * The iteratee is invoked with three arguments: (value, index|key, collection). * Iteratee functions may exit iteration early by explicitly returning `false`. * * **Note:** As with other "Collections" methods, objects with a "length" * property are iterated like arrays. To avoid this behavior use `_.forIn` * or `_.forOwn` for object iteration. * * @static * @memberOf _ * @since 0.1.0 * @alias each * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. * @see _.forEachRight * @example * * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. * * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { var func = isArray(collection) ? arrayEach : baseEach; return func(collection, castFunction(iteratee)); } module.exports = forEach; /***/ }), /* 37 */ /***/ (function(module, exports) { /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** * Replaces all `placeholder` elements in `array` with an internal placeholder * and returns an array of their indexes. * * @private * @param {Array} array The array to modify. * @param {*} placeholder The placeholder to replace. * @returns {Array} Returns the new array of placeholder indexes. */ function replaceHolders(array, placeholder) { var index = -1, length = array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value === placeholder || value === PLACEHOLDER) { array[index] = PLACEHOLDER; result[resIndex++] = index; } } return result; } module.exports = replaceHolders; /***/ }), /* 38 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(28), stackClear = __webpack_require__(118), stackDelete = __webpack_require__(119), stackGet = __webpack_require__(120), stackHas = __webpack_require__(121), stackSet = __webpack_require__(122); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(10), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(129), mapCacheDelete = __webpack_require__(136), mapCacheGet = __webpack_require__(138), mapCacheHas = __webpack_require__(139), mapCacheSet = __webpack_require__(140); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 42 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 43 */ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defer = undefined; var _isPlainObject2 = __webpack_require__(45); var _isPlainObject3 = _interopRequireDefault(_isPlainObject2); var _isEmpty2 = __webpack_require__(14); var _isEmpty3 = _interopRequireDefault(_isEmpty2); exports.shallowEqual = shallowEqual; exports.isSpecialClick = isSpecialClick; exports.capitalize = capitalize; exports.assertFacetDefined = assertFacetDefined; exports.getDisplayName = getDisplayName; exports.removeEmptyKey = removeEmptyKey; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js function shallowEqual(objA, objB) { if (objA === objB) { return true; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. var hasOwn = Object.prototype.hasOwnProperty; for (var i = 0; i < keysA.length; i++) { if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { return false; } } return true; } function isSpecialClick(event) { var isMiddleClick = event.button === 1; return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey); } function capitalize(key) { return key.length === 0 ? '' : '' + key[0].toUpperCase() + key.slice(1); } function assertFacetDefined(searchParameters, searchResults, facet) { var wasRequested = searchParameters.isConjunctiveFacet(facet) || searchParameters.isDisjunctiveFacet(facet); var wasReceived = Boolean(searchResults.getFacetByName(facet)); if (searchResults.nbHits > 0 && wasRequested && !wasReceived) { // eslint-disable-next-line no-console console.warn('A component requested values for facet "' + facet + '", but no facet ' + 'values were retrieved from the API. This means that you should add ' + ('the attribute "' + facet + '" to the list of attributes for faceting in ') + 'your index settings.'); } } function getDisplayName(Component) { return Component.displayName || Component.name || 'UnknownComponent'; } var resolved = Promise.resolve(); var defer = exports.defer = function defer(f) { resolved.then(f); }; function removeEmptyKey(obj) { Object.keys(obj).forEach(function (key) { var value = obj[key]; if ((0, _isEmpty3.default)(value) && (0, _isPlainObject3.default)(value)) { delete obj[key]; } else if ((0, _isPlainObject3.default)(value)) { removeEmptyKey(value); } }); return obj; } /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(8), getPrototype = __webpack_require__(67), isObjectLike = __webpack_require__(7); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(163), baseIsNaN = __webpack_require__(224), strictIndexOf = __webpack_require__(225); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } module.exports = baseIndexOf; /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(168); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(89), baseKeysIn = __webpack_require__(231), isArrayLike = __webpack_require__(11); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { var baseFor = __webpack_require__(178), keys = __webpack_require__(9); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } module.exports = baseForOwn; /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { var arrayReduce = __webpack_require__(99), baseEach = __webpack_require__(73), baseIteratee = __webpack_require__(13), baseReduce = __webpack_require__(264), isArray = __webpack_require__(0); /** * Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` * is not given, the first element of `collection` is used as the initial * value. The iteratee is invoked with four arguments: * (accumulator, value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.reduce`, `_.reduceRight`, and `_.transform`. * * The guarded methods are: * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, * and `sortBy` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. * @see _.reduceRight * @example * * _.reduce([1, 2], function(sum, n) { * return sum + n; * }, 0); * // => 3 * * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); * return result; * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ function reduce(collection, iteratee, accumulator) { var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); } module.exports = reduce; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { var toFinite = __webpack_require__(213); /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } module.exports = toInteger; /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(8), isArray = __webpack_require__(0), isObjectLike = __webpack_require__(7); /** `Object#toString` result references. */ var stringTag = '[object String]'; /** * Checks if `value` is classified as a `String` primitive or object. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); * // => true * * _.isString(1); * // => false */ function isString(value) { return typeof value == 'string' || (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } module.exports = isString; /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { var createFind = __webpack_require__(266), findIndex = __webpack_require__(186); /** * Iterates over elements of `collection`, returning the first element * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false }, * { 'user': 'pebbles', 'age': 1, 'active': true } * ]; * * _.find(users, function(o) { return o.age < 40; }); * // => object for 'barney' * * // The `_.matches` iteratee shorthand. * _.find(users, { 'age': 1, 'active': true }); * // => object for 'pebbles' * * // The `_.matchesProperty` iteratee shorthand. * _.find(users, ['active', false]); * // => object for 'fred' * * // The `_.property` iteratee shorthand. * _.find(users, 'active'); * // => object for 'barney' */ var find = createFind(findIndex); module.exports = find; /***/ }), /* 54 */ /***/ (function(module, exports) { /** * Gets the argument placeholder value for `func`. * * @private * @param {Function} func The function to inspect. * @returns {*} Returns the placeholder value. */ function getHolder(func) { var object = func; return object.placeholder; } module.exports = getHolder; /***/ }), /* 55 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 56 */ /***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default if(!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function() { return module.i; } }); module.webpackPolyfill = 1; } return module; }; /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(152), Map = __webpack_require__(40), Promise = __webpack_require__(153), Set = __webpack_require__(154), WeakMap = __webpack_require__(90), baseGetTag = __webpack_require__(8), toSource = __webpack_require__(77); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { var baseHas = __webpack_require__(155), hasPath = __webpack_require__(91); /** * Checks if `path` is a direct property of `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = { 'a': { 'b': 2 } }; * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * * _.has(object, 'a.b'); * // => true * * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); * // => false */ function has(object, path) { return object != null && hasPath(object, path, baseHas); } module.exports = has; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(112), isObjectLike = __webpack_require__(7); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(41), setCacheAdd = __webpack_require__(141), setCacheHas = __webpack_require__(142); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /* 61 */ /***/ (function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /* 62 */ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(87), stubArray = __webpack_require__(88); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(0), isSymbol = __webpack_require__(23); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(66); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(15), arrayMap = __webpack_require__(12), isArray = __webpack_require__(0), isSymbol = __webpack_require__(23); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(80); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 68 */ /***/ (function(module, exports) { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /* 69 */ /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(6); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(22), toKey = __webpack_require__(24); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(71); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(49), createBaseEach = __webpack_require__(254); /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(46), toInteger = __webpack_require__(51); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Gets the index at which the first occurrence of `value` is found in `array` * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. * @example * * _.indexOf([1, 2, 1, 2], 2); * // => 1 * * // Search from the `fromIndex`. * _.indexOf([1, 2, 1, 2], 2, 2); * // => 3 */ function indexOf(array, value, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseIndexOf(array, value, index); } module.exports = indexOf; /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(70), isObject = __webpack_require__(6); /** * Creates a function that produces an instance of `Ctor` regardless of * whether it was invoked as part of a `new` expression or by `call` or `apply`. * * @private * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { case 0: return new Ctor; case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args); // Mimic the constructor's `return` behavior. // See https://es5.github.io/#x13.2.2 for more details. return isObject(result) ? result : thisBinding; }; } module.exports = createCtor; /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(55))) /***/ }), /* 77 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(60), arraySome = __webpack_require__(143), cacheHas = __webpack_require__(61); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__(38), nativeKeys = __webpack_require__(151); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /* 80 */ /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(59); /** * Performs a deep comparison between two values to determine if they are * equivalent. * * **Note:** This method supports comparing arrays, array buffers, booleans, * date objects, error objects, maps, numbers, `Object` objects, regexes, * sets, strings, symbols, and typed arrays. `Object` objects are compared * by their own, not inherited, enumerable properties. Functions and DOM * nodes are compared by strict equality, i.e. `===`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true * * object === other; * // => false */ function isEqual(value, other) { return baseIsEqual(value, other); } module.exports = isEqual; /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(3); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /* 83 */ /***/ (function(module, exports) { /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } module.exports = mapToArray; /***/ }), /* 84 */ /***/ (function(module, exports) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(86), getSymbols = __webpack_require__(63), keys = __webpack_require__(9); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(62), isArray = __webpack_require__(0); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /* 87 */ /***/ (function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /* 88 */ /***/ (function(module, exports) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /* 89 */ /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(146), isArguments = __webpack_require__(20), isArray = __webpack_require__(0), isBuffer = __webpack_require__(21), isIndex = __webpack_require__(32), isTypedArray = __webpack_require__(33); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /* 90 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(10), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /* 91 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(22), isArguments = __webpack_require__(20), isArray = __webpack_require__(0), isIndex = __webpack_require__(32), isLength = __webpack_require__(42), toKey = __webpack_require__(24); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(46); /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; /***/ }), /* 93 */ /***/ (function(module, exports, __webpack_require__) { var baseSetToString = __webpack_require__(227), shortOut = __webpack_require__(169); /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = shortOut(baseSetToString); module.exports = setToString; /***/ }), /* 94 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(11), isObjectLike = __webpack_require__(7); /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } module.exports = isArrayLikeObject; /***/ }), /* 95 */ /***/ (function(module, exports) { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(47), eq = __webpack_require__(18); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(86), getSymbolsIn = __webpack_require__(171), keysIn = __webpack_require__(48); /** * Creates an array of own and inherited enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } module.exports = getAllKeysIn; /***/ }), /* 98 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(82); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 99 */ /***/ (function(module, exports) { /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } module.exports = arrayReduce; /***/ }), /* 100 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var keys = __webpack_require__(9); var intersection = __webpack_require__(249); var forOwn = __webpack_require__(252); var forEach = __webpack_require__(36); var filter = __webpack_require__(101); var map = __webpack_require__(17); var reduce = __webpack_require__(50); var omit = __webpack_require__(34); var indexOf = __webpack_require__(74); var isNaN = __webpack_require__(214); var isArray = __webpack_require__(0); var isEmpty = __webpack_require__(14); var isEqual = __webpack_require__(81); var isUndefined = __webpack_require__(185); var isString = __webpack_require__(52); var isFunction = __webpack_require__(19); var find = __webpack_require__(53); var trim = __webpack_require__(187); var defaults = __webpack_require__(102); var merge = __webpack_require__(103); var valToNumber = __webpack_require__(279); var filterState = __webpack_require__(280); var RefinementList = __webpack_require__(281); /** * like _.find but using _.isEqual to be able to use it * to find arrays. * @private * @param {any[]} array array to search into * @param {any} searchedValue the value we're looking for * @return {any} the searched value or undefined */ function findArray(array, searchedValue) { return find(array, function(currentValue) { return isEqual(currentValue, searchedValue); }); } /** * The facet list is the structure used to store the list of values used to * filter a single attribute. * @typedef {string[]} SearchParameters.FacetList */ /** * Structure to store numeric filters with the operator as the key. The supported operators * are `=`, `>`, `<`, `>=`, `<=` and `!=`. * @typedef {Object.<string, Array.<number|number[]>>} SearchParameters.OperatorList */ /** * SearchParameters is the data structure that contains all the information * usable for making a search to Algolia API. It doesn't do the search itself, * nor does it contains logic about the parameters. * It is an immutable object, therefore it has been created in a way that each * changes does not change the object itself but returns a copy with the * modification. * This object should probably not be instantiated outside of the helper. It will * be provided when needed. This object is documented for reference as you'll * get it from events generated by the {@link AlgoliaSearchHelper}. * If need be, instantiate the Helper from the factory function {@link SearchParameters.make} * @constructor * @classdesc contains all the parameters of a search * @param {object|SearchParameters} newParameters existing parameters or partial object * for the properties of a new SearchParameters * @see SearchParameters.make * @example <caption>SearchParameters of the first query in * <a href="http://demos.algolia.com/instant-search-demo/">the instant search demo</a></caption> { "query": "", "disjunctiveFacets": [ "customerReviewCount", "category", "salePrice_range", "manufacturer" ], "maxValuesPerFacet": 30, "page": 0, "hitsPerPage": 10, "facets": [ "type", "shipping" ] } */ function SearchParameters(newParameters) { var params = newParameters ? SearchParameters._parseNumbers(newParameters) : {}; /** * Targeted index. This parameter is mandatory. * @member {string} */ this.index = params.index || ''; // Query /** * Query string of the instant search. The empty string is a valid query. * @member {string} * @see https://www.algolia.com/doc/rest#param-query */ this.query = params.query || ''; // Facets /** * This attribute contains the list of all the conjunctive facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * @member {string[]} */ this.facets = params.facets || []; /** * This attribute contains the list of all the disjunctive facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * @member {string[]} */ this.disjunctiveFacets = params.disjunctiveFacets || []; /** * This attribute contains the list of all the hierarchical facets * used. This list will be added to requested facets in the * [facets attribute](https://www.algolia.com/doc/rest-api/search#param-facets) sent to algolia. * Hierarchical facets are a sub type of disjunctive facets that * let you filter faceted attributes hierarchically. * @member {string[]|object[]} */ this.hierarchicalFacets = params.hierarchicalFacets || []; // Refinements /** * This attribute contains all the filters that need to be * applied on the conjunctive facets. Each facet must be properly * defined in the `facets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.facetsRefinements = params.facetsRefinements || {}; /** * This attribute contains all the filters that need to be * excluded from the conjunctive facets. Each facet must be properly * defined in the `facets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters excluded for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.facetsExcludes = params.facetsExcludes || {}; /** * This attribute contains all the filters that need to be * applied on the disjunctive facets. Each facet must be properly * defined in the `disjunctiveFacets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.disjunctiveFacetsRefinements = params.disjunctiveFacetsRefinements || {}; /** * This attribute contains all the filters that need to be * applied on the numeric attributes. * * The key is the name of the attribute, and the value is the * filters to apply to this attribute. * * When querying algolia, the values stored in this attribute will * be translated into the `numericFilters` attribute. * @member {Object.<string, SearchParameters.OperatorList>} */ this.numericRefinements = params.numericRefinements || {}; /** * This attribute contains all the tags used to refine the query. * * When querying algolia, the values stored in this attribute will * be translated into the `tagFilters` attribute. * @member {string[]} */ this.tagRefinements = params.tagRefinements || []; /** * This attribute contains all the filters that need to be * applied on the hierarchical facets. Each facet must be properly * defined in the `hierarchicalFacets` attribute. * * The key is the name of the facet, and the `FacetList` contains all * filters selected for the associated facet name. The FacetList values * are structured as a string that contain the values for each level * separated by the configured separator. * * When querying algolia, the values stored in this attribute will * be translated into the `facetFilters` attribute. * @member {Object.<string, SearchParameters.FacetList>} */ this.hierarchicalFacetsRefinements = params.hierarchicalFacetsRefinements || {}; /** * Contains the numeric filters in the raw format of the Algolia API. Setting * this parameter is not compatible with the usage of numeric filters methods. * @see https://www.algolia.com/doc/javascript#numericFilters * @member {string} */ this.numericFilters = params.numericFilters; /** * Contains the tag filters in the raw format of the Algolia API. Setting this * parameter is not compatible with the of the add/remove/toggle methods of the * tag api. * @see https://www.algolia.com/doc/rest#param-tagFilters * @member {string} */ this.tagFilters = params.tagFilters; /** * Contains the optional tag filters in the raw format of the Algolia API. * @see https://www.algolia.com/doc/rest#param-tagFilters * @member {string} */ this.optionalTagFilters = params.optionalTagFilters; /** * Contains the optional facet filters in the raw format of the Algolia API. * @see https://www.algolia.com/doc/rest#param-tagFilters * @member {string} */ this.optionalFacetFilters = params.optionalFacetFilters; // Misc. parameters /** * Number of hits to be returned by the search API * @member {number} * @see https://www.algolia.com/doc/rest#param-hitsPerPage */ this.hitsPerPage = params.hitsPerPage; /** * Number of values for each faceted attribute * @member {number} * @see https://www.algolia.com/doc/rest#param-maxValuesPerFacet */ this.maxValuesPerFacet = params.maxValuesPerFacet; /** * The current page number * @member {number} * @see https://www.algolia.com/doc/rest#param-page */ this.page = params.page || 0; /** * How the query should be treated by the search engine. * Possible values: prefixAll, prefixLast, prefixNone * @see https://www.algolia.com/doc/rest#param-queryType * @member {string} */ this.queryType = params.queryType; /** * How the typo tolerance behave in the search engine. * Possible values: true, false, min, strict * @see https://www.algolia.com/doc/rest#param-typoTolerance * @member {string} */ this.typoTolerance = params.typoTolerance; /** * Number of characters to wait before doing one character replacement. * @see https://www.algolia.com/doc/rest#param-minWordSizefor1Typo * @member {number} */ this.minWordSizefor1Typo = params.minWordSizefor1Typo; /** * Number of characters to wait before doing a second character replacement. * @see https://www.algolia.com/doc/rest#param-minWordSizefor2Typos * @member {number} */ this.minWordSizefor2Typos = params.minWordSizefor2Typos; /** * Configure the precision of the proximity ranking criterion * @see https://www.algolia.com/doc/rest#param-minProximity */ this.minProximity = params.minProximity; /** * Should the engine allow typos on numerics. * @see https://www.algolia.com/doc/rest#param-allowTyposOnNumericTokens * @member {boolean} */ this.allowTyposOnNumericTokens = params.allowTyposOnNumericTokens; /** * Should the plurals be ignored * @see https://www.algolia.com/doc/rest#param-ignorePlurals * @member {boolean} */ this.ignorePlurals = params.ignorePlurals; /** * Restrict which attribute is searched. * @see https://www.algolia.com/doc/rest#param-restrictSearchableAttributes * @member {string} */ this.restrictSearchableAttributes = params.restrictSearchableAttributes; /** * Enable the advanced syntax. * @see https://www.algolia.com/doc/rest#param-advancedSyntax * @member {boolean} */ this.advancedSyntax = params.advancedSyntax; /** * Enable the analytics * @see https://www.algolia.com/doc/rest#param-analytics * @member {boolean} */ this.analytics = params.analytics; /** * Tag of the query in the analytics. * @see https://www.algolia.com/doc/rest#param-analyticsTags * @member {string} */ this.analyticsTags = params.analyticsTags; /** * Enable the synonyms * @see https://www.algolia.com/doc/rest#param-synonyms * @member {boolean} */ this.synonyms = params.synonyms; /** * Should the engine replace the synonyms in the highlighted results. * @see https://www.algolia.com/doc/rest#param-replaceSynonymsInHighlight * @member {boolean} */ this.replaceSynonymsInHighlight = params.replaceSynonymsInHighlight; /** * Add some optional words to those defined in the dashboard * @see https://www.algolia.com/doc/rest#param-optionalWords * @member {string} */ this.optionalWords = params.optionalWords; /** * Possible values are "lastWords" "firstWords" "allOptional" "none" (default) * @see https://www.algolia.com/doc/rest#param-removeWordsIfNoResults * @member {string} */ this.removeWordsIfNoResults = params.removeWordsIfNoResults; /** * List of attributes to retrieve * @see https://www.algolia.com/doc/rest#param-attributesToRetrieve * @member {string} */ this.attributesToRetrieve = params.attributesToRetrieve; /** * List of attributes to highlight * @see https://www.algolia.com/doc/rest#param-attributesToHighlight * @member {string} */ this.attributesToHighlight = params.attributesToHighlight; /** * Code to be embedded on the left part of the highlighted results * @see https://www.algolia.com/doc/rest#param-highlightPreTag * @member {string} */ this.highlightPreTag = params.highlightPreTag; /** * Code to be embedded on the right part of the highlighted results * @see https://www.algolia.com/doc/rest#param-highlightPostTag * @member {string} */ this.highlightPostTag = params.highlightPostTag; /** * List of attributes to snippet * @see https://www.algolia.com/doc/rest#param-attributesToSnippet * @member {string} */ this.attributesToSnippet = params.attributesToSnippet; /** * Enable the ranking informations in the response, set to 1 to activate * @see https://www.algolia.com/doc/rest#param-getRankingInfo * @member {number} */ this.getRankingInfo = params.getRankingInfo; /** * Remove duplicates based on the index setting attributeForDistinct * @see https://www.algolia.com/doc/rest#param-distinct * @member {boolean|number} */ this.distinct = params.distinct; /** * Center of the geo search. * @see https://www.algolia.com/doc/rest#param-aroundLatLng * @member {string} */ this.aroundLatLng = params.aroundLatLng; /** * Center of the search, retrieve from the user IP. * @see https://www.algolia.com/doc/rest#param-aroundLatLngViaIP * @member {boolean} */ this.aroundLatLngViaIP = params.aroundLatLngViaIP; /** * Radius of the geo search. * @see https://www.algolia.com/doc/rest#param-aroundRadius * @member {number} */ this.aroundRadius = params.aroundRadius; /** * Precision of the geo search. * @see https://www.algolia.com/doc/rest#param-aroundPrecision * @member {number} */ this.minimumAroundRadius = params.minimumAroundRadius; /** * Precision of the geo search. * @see https://www.algolia.com/doc/rest#param-minimumAroundRadius * @member {number} */ this.aroundPrecision = params.aroundPrecision; /** * Geo search inside a box. * @see https://www.algolia.com/doc/rest#param-insideBoundingBox * @member {string} */ this.insideBoundingBox = params.insideBoundingBox; /** * Geo search inside a polygon. * @see https://www.algolia.com/doc/rest#param-insidePolygon * @member {string} */ this.insidePolygon = params.insidePolygon; /** * Allows to specify an ellipsis character for the snippet when we truncate the text * (added before and after if truncated). * The default value is an empty string and we recommend to set it to "…" * @see https://www.algolia.com/doc/rest#param-insidePolygon * @member {string} */ this.snippetEllipsisText = params.snippetEllipsisText; /** * Allows to specify some attributes name on which exact won't be applied. * Attributes are separated with a comma (for example "name,address" ), you can also use a * JSON string array encoding (for example encodeURIComponent('["name","address"]') ). * By default the list is empty. * @see https://www.algolia.com/doc/rest#param-disableExactOnAttributes * @member {string|string[]} */ this.disableExactOnAttributes = params.disableExactOnAttributes; /** * Applies 'exact' on single word queries if the word contains at least 3 characters * and is not a stop word. * Can take two values: true or false. * By default, its set to false. * @see https://www.algolia.com/doc/rest#param-enableExactOnSingleWordQuery * @member {boolean} */ this.enableExactOnSingleWordQuery = params.enableExactOnSingleWordQuery; // Undocumented parameters, still needed otherwise we fail this.offset = params.offset; this.length = params.length; var self = this; forOwn(params, function checkForUnknownParameter(paramValue, paramName) { if (SearchParameters.PARAMETERS.indexOf(paramName) === -1) { self[paramName] = paramValue; } }); } /** * List all the properties in SearchParameters and therefore all the known Algolia properties * This doesn't contain any beta/hidden features. * @private */ SearchParameters.PARAMETERS = keys(new SearchParameters()); /** * @private * @param {object} partialState full or part of a state * @return {object} a new object with the number keys as number */ SearchParameters._parseNumbers = function(partialState) { // Do not reparse numbers in SearchParameters, they ought to be parsed already if (partialState instanceof SearchParameters) return partialState; var numbers = {}; var numberKeys = [ 'aroundPrecision', 'aroundRadius', 'getRankingInfo', 'minWordSizefor2Typos', 'minWordSizefor1Typo', 'page', 'maxValuesPerFacet', 'distinct', 'minimumAroundRadius', 'hitsPerPage', 'minProximity' ]; forEach(numberKeys, function(k) { var value = partialState[k]; if (isString(value)) { var parsedValue = parseFloat(value); numbers[k] = isNaN(parsedValue) ? value : parsedValue; } }); if (partialState.numericRefinements) { var numericRefinements = {}; forEach(partialState.numericRefinements, function(operators, attribute) { numericRefinements[attribute] = {}; forEach(operators, function(values, operator) { var parsedValues = map(values, function(v) { if (isArray(v)) { return map(v, function(vPrime) { if (isString(vPrime)) { return parseFloat(vPrime); } return vPrime; }); } else if (isString(v)) { return parseFloat(v); } return v; }); numericRefinements[attribute][operator] = parsedValues; }); }); numbers.numericRefinements = numericRefinements; } return merge({}, partialState, numbers); }; /** * Factory for SearchParameters * @param {object|SearchParameters} newParameters existing parameters or partial * object for the properties of a new SearchParameters * @return {SearchParameters} frozen instance of SearchParameters */ SearchParameters.make = function makeSearchParameters(newParameters) { var instance = new SearchParameters(newParameters); forEach(newParameters.hierarchicalFacets, function(facet) { if (facet.rootPath) { var currentRefinement = instance.getHierarchicalRefinement(facet.name); if (currentRefinement.length > 0 && currentRefinement[0].indexOf(facet.rootPath) !== 0) { instance = instance.clearRefinements(facet.name); } // get it again in case it has been cleared currentRefinement = instance.getHierarchicalRefinement(facet.name); if (currentRefinement.length === 0) { instance = instance.toggleHierarchicalFacetRefinement(facet.name, facet.rootPath); } } }); return instance; }; /** * Validates the new parameters based on the previous state * @param {SearchParameters} currentState the current state * @param {object|SearchParameters} parameters the new parameters to set * @return {Error|null} Error if the modification is invalid, null otherwise */ SearchParameters.validate = function(currentState, parameters) { var params = parameters || {}; if (currentState.tagFilters && params.tagRefinements && params.tagRefinements.length > 0) { return new Error( '[Tags] Cannot switch from the managed tag API to the advanced API. It is probably ' + 'an error, if it is really what you want, you should first clear the tags with clearTags method.'); } if (currentState.tagRefinements.length > 0 && params.tagFilters) { return new Error( '[Tags] Cannot switch from the advanced tag API to the managed API. It is probably ' + 'an error, if it is not, you should first clear the tags with clearTags method.'); } if (currentState.numericFilters && params.numericRefinements && !isEmpty(params.numericRefinements)) { return new Error( "[Numeric filters] Can't switch from the advanced to the managed API. It" + ' is probably an error, if this is really what you want, you have to first' + ' clear the numeric filters.'); } if (!isEmpty(currentState.numericRefinements) && params.numericFilters) { return new Error( "[Numeric filters] Can't switch from the managed API to the advanced. It" + ' is probably an error, if this is really what you want, you have to first' + ' clear the numeric filters.'); } return null; }; SearchParameters.prototype = { constructor: SearchParameters, /** * Remove all refinements (disjunctive + conjunctive + excludes + numeric filters) * @method * @param {undefined|string|SearchParameters.clearCallback} [attribute] optional string or function * - If not given, means to clear all the filters. * - If `string`, means to clear all refinements for the `attribute` named filter. * - If `function`, means to clear all the refinements that return truthy values. * @return {SearchParameters} */ clearRefinements: function clearRefinements(attribute) { var clear = RefinementList.clearRefinement; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(attribute), facetsRefinements: clear(this.facetsRefinements, attribute, 'conjunctiveFacet'), facetsExcludes: clear(this.facetsExcludes, attribute, 'exclude'), disjunctiveFacetsRefinements: clear(this.disjunctiveFacetsRefinements, attribute, 'disjunctiveFacet'), hierarchicalFacetsRefinements: clear(this.hierarchicalFacetsRefinements, attribute, 'hierarchicalFacet') }); }, /** * Remove all the refined tags from the SearchParameters * @method * @return {SearchParameters} */ clearTags: function clearTags() { if (this.tagFilters === undefined && this.tagRefinements.length === 0) return this; return this.setQueryParameters({ tagFilters: undefined, tagRefinements: [] }); }, /** * Set the index. * @method * @param {string} index the index name * @return {SearchParameters} */ setIndex: function setIndex(index) { if (index === this.index) return this; return this.setQueryParameters({ index: index }); }, /** * Query setter * @method * @param {string} newQuery value for the new query * @return {SearchParameters} */ setQuery: function setQuery(newQuery) { if (newQuery === this.query) return this; return this.setQueryParameters({ query: newQuery }); }, /** * Page setter * @method * @param {number} newPage new page number * @return {SearchParameters} */ setPage: function setPage(newPage) { if (newPage === this.page) return this; return this.setQueryParameters({ page: newPage }); }, /** * Facets setter * The facets are the simple facets, used for conjunctive (and) faceting. * @method * @param {string[]} facets all the attributes of the algolia records used for conjunctive faceting * @return {SearchParameters} */ setFacets: function setFacets(facets) { return this.setQueryParameters({ facets: facets }); }, /** * Disjunctive facets setter * Change the list of disjunctive (or) facets the helper chan handle. * @method * @param {string[]} facets all the attributes of the algolia records used for disjunctive faceting * @return {SearchParameters} */ setDisjunctiveFacets: function setDisjunctiveFacets(facets) { return this.setQueryParameters({ disjunctiveFacets: facets }); }, /** * HitsPerPage setter * Hits per page represents the number of hits retrieved for this query * @method * @param {number} n number of hits retrieved per page of results * @return {SearchParameters} */ setHitsPerPage: function setHitsPerPage(n) { if (this.hitsPerPage === n) return this; return this.setQueryParameters({ hitsPerPage: n }); }, /** * typoTolerance setter * Set the value of typoTolerance * @method * @param {string} typoTolerance new value of typoTolerance ("true", "false", "min" or "strict") * @return {SearchParameters} */ setTypoTolerance: function setTypoTolerance(typoTolerance) { if (this.typoTolerance === typoTolerance) return this; return this.setQueryParameters({ typoTolerance: typoTolerance }); }, /** * Add a numeric filter for a given attribute * When value is an array, they are combined with OR * When value is a single value, it will combined with AND * @method * @param {string} attribute attribute to set the filter on * @param {string} operator operator of the filter (possible values: =, >, >=, <, <=, !=) * @param {number | number[]} value value of the filter * @return {SearchParameters} * @example * // for price = 50 or 40 * searchparameter.addNumericRefinement('price', '=', [50, 40]); * @example * // for size = 38 and 40 * searchparameter.addNumericRefinement('size', '=', 38); * searchparameter.addNumericRefinement('size', '=', 40); */ addNumericRefinement: function(attribute, operator, v) { var value = valToNumber(v); if (this.isNumericRefined(attribute, operator, value)) return this; var mod = merge({}, this.numericRefinements); mod[attribute] = merge({}, mod[attribute]); if (mod[attribute][operator]) { // Array copy mod[attribute][operator] = mod[attribute][operator].slice(); // Add the element. Concat can't be used here because value can be an array. mod[attribute][operator].push(value); } else { mod[attribute][operator] = [value]; } return this.setQueryParameters({ numericRefinements: mod }); }, /** * Get the list of conjunctive refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getConjunctiveRefinements: function(facetName) { if (!this.isConjunctiveFacet(facetName)) { throw new Error(facetName + ' is not defined in the facets attribute of the helper configuration'); } return this.facetsRefinements[facetName] || []; }, /** * Get the list of disjunctive refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getDisjunctiveRefinements: function(facetName) { if (!this.isDisjunctiveFacet(facetName)) { throw new Error( facetName + ' is not defined in the disjunctiveFacets attribute of the helper configuration' ); } return this.disjunctiveFacetsRefinements[facetName] || []; }, /** * Get the list of hierarchical refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getHierarchicalRefinement: function(facetName) { // we send an array but we currently do not support multiple // hierarchicalRefinements for a hierarchicalFacet return this.hierarchicalFacetsRefinements[facetName] || []; }, /** * Get the list of exclude refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {string[]} list of refinements */ getExcludeRefinements: function(facetName) { if (!this.isConjunctiveFacet(facetName)) { throw new Error(facetName + ' is not defined in the facets attribute of the helper configuration'); } return this.facetsExcludes[facetName] || []; }, /** * Remove all the numeric filter for a given (attribute, operator) * @method * @param {string} attribute attribute to set the filter on * @param {string} [operator] operator of the filter (possible values: =, >, >=, <, <=, !=) * @param {number} [number] the value to be removed * @return {SearchParameters} */ removeNumericRefinement: function(attribute, operator, paramValue) { if (paramValue !== undefined) { var paramValueAsNumber = valToNumber(paramValue); if (!this.isNumericRefined(attribute, operator, paramValueAsNumber)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute && value.op === operator && isEqual(value.val, paramValueAsNumber); }) }); } else if (operator !== undefined) { if (!this.isNumericRefined(attribute, operator)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute && value.op === operator; }) }); } if (!this.isNumericRefined(attribute)) return this; return this.setQueryParameters({ numericRefinements: this._clearNumericRefinements(function(value, key) { return key === attribute; }) }); }, /** * Get the list of numeric refinements for a single facet * @param {string} facetName name of the attribute used for faceting * @return {SearchParameters.OperatorList[]} list of refinements */ getNumericRefinements: function(facetName) { return this.numericRefinements[facetName] || {}; }, /** * Return the current refinement for the (attribute, operator) * @param {string} attribute of the record * @param {string} operator applied * @return {number} value of the refinement */ getNumericRefinement: function(attribute, operator) { return this.numericRefinements[attribute] && this.numericRefinements[attribute][operator]; }, /** * Clear numeric filters. * @method * @private * @param {string|SearchParameters.clearCallback} [attribute] optional string or function * - If not given, means to clear all the filters. * - If `string`, means to clear all refinements for the `attribute` named filter. * - If `function`, means to clear all the refinements that return truthy values. * @return {Object.<string, OperatorList>} */ _clearNumericRefinements: function _clearNumericRefinements(attribute) { if (isUndefined(attribute)) { return {}; } else if (isString(attribute)) { return omit(this.numericRefinements, attribute); } else if (isFunction(attribute)) { return reduce(this.numericRefinements, function(memo, operators, key) { var operatorList = {}; forEach(operators, function(values, operator) { var outValues = []; forEach(values, function(value) { var predicateResult = attribute({val: value, op: operator}, key, 'numeric'); if (!predicateResult) outValues.push(value); }); if (!isEmpty(outValues)) operatorList[operator] = outValues; }); if (!isEmpty(operatorList)) memo[key] = operatorList; return memo; }, {}); } }, /** * Add a facet to the facets attribute of the helper configuration, if it * isn't already present. * @method * @param {string} facet facet name to add * @return {SearchParameters} */ addFacet: function addFacet(facet) { if (this.isConjunctiveFacet(facet)) { return this; } return this.setQueryParameters({ facets: this.facets.concat([facet]) }); }, /** * Add a disjunctive facet to the disjunctiveFacets attribute of the helper * configuration, if it isn't already present. * @method * @param {string} facet disjunctive facet name to add * @return {SearchParameters} */ addDisjunctiveFacet: function addDisjunctiveFacet(facet) { if (this.isDisjunctiveFacet(facet)) { return this; } return this.setQueryParameters({ disjunctiveFacets: this.disjunctiveFacets.concat([facet]) }); }, /** * Add a hierarchical facet to the hierarchicalFacets attribute of the helper * configuration. * @method * @param {object} hierarchicalFacet hierarchical facet to add * @return {SearchParameters} * @throws will throw an error if a hierarchical facet with the same name was already declared */ addHierarchicalFacet: function addHierarchicalFacet(hierarchicalFacet) { if (this.isHierarchicalFacet(hierarchicalFacet.name)) { throw new Error( 'Cannot declare two hierarchical facets with the same name: `' + hierarchicalFacet.name + '`'); } return this.setQueryParameters({ hierarchicalFacets: this.hierarchicalFacets.concat([hierarchicalFacet]) }); }, /** * Add a refinement on a "normal" facet * @method * @param {string} facet attribute to apply the faceting on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addFacetRefinement: function addFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this; return this.setQueryParameters({ facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value) }); }, /** * Exclude a value from a "normal" facet * @method * @param {string} facet attribute to apply the exclusion on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addExcludeRefinement: function addExcludeRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this; return this.setQueryParameters({ facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value) }); }, /** * Adds a refinement on a disjunctive facet. * @method * @param {string} facet attribute to apply the faceting on * @param {string} value value of the attribute (will be converted to string) * @return {SearchParameters} */ addDisjunctiveFacetRefinement: function addDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this; return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.addRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * addTagRefinement adds a tag to the list used to filter the results * @param {string} tag tag to be added * @return {SearchParameters} */ addTagRefinement: function addTagRefinement(tag) { if (this.isTagRefined(tag)) return this; var modification = { tagRefinements: this.tagRefinements.concat(tag) }; return this.setQueryParameters(modification); }, /** * Remove a facet from the facets attribute of the helper configuration, if it * is present. * @method * @param {string} facet facet name to remove * @return {SearchParameters} */ removeFacet: function removeFacet(facet) { if (!this.isConjunctiveFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ facets: filter(this.facets, function(f) { return f !== facet; }) }); }, /** * Remove a disjunctive facet from the disjunctiveFacets attribute of the * helper configuration, if it is present. * @method * @param {string} facet disjunctive facet name to remove * @return {SearchParameters} */ removeDisjunctiveFacet: function removeDisjunctiveFacet(facet) { if (!this.isDisjunctiveFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ disjunctiveFacets: filter(this.disjunctiveFacets, function(f) { return f !== facet; }) }); }, /** * Remove a hierarchical facet from the hierarchicalFacets attribute of the * helper configuration, if it is present. * @method * @param {string} facet hierarchical facet name to remove * @return {SearchParameters} */ removeHierarchicalFacet: function removeHierarchicalFacet(facet) { if (!this.isHierarchicalFacet(facet)) { return this; } return this.clearRefinements(facet).setQueryParameters({ hierarchicalFacets: filter(this.hierarchicalFacets, function(f) { return f.name !== facet; }) }); }, /** * Remove a refinement set on facet. If a value is provided, it will clear the * refinement for the given value, otherwise it will clear all the refinement * values for the faceted attribute. * @method * @param {string} facet name of the attribute used for faceting * @param {string} [value] value used to filter * @return {SearchParameters} */ removeFacetRefinement: function removeFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this; return this.setQueryParameters({ facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value) }); }, /** * Remove a negative refinement on a facet * @method * @param {string} facet name of the attribute used for faceting * @param {string} value value used to filter * @return {SearchParameters} */ removeExcludeRefinement: function removeExcludeRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this; return this.setQueryParameters({ facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value) }); }, /** * Remove a refinement on a disjunctive facet * @method * @param {string} facet name of the attribute used for faceting * @param {string} value value used to filter * @return {SearchParameters} */ removeDisjunctiveFacetRefinement: function removeDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this; return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.removeRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * Remove a tag from the list of tag refinements * @method * @param {string} tag the tag to remove * @return {SearchParameters} */ removeTagRefinement: function removeTagRefinement(tag) { if (!this.isTagRefined(tag)) return this; var modification = { tagRefinements: filter(this.tagRefinements, function(t) { return t !== tag; }) }; return this.setQueryParameters(modification); }, /** * Generic toggle refinement method to use with facet, disjunctive facets * and hierarchical facets * @param {string} facet the facet to refine * @param {string} value the associated value * @return {SearchParameters} * @throws will throw an error if the facet is not declared in the settings of the helper * @deprecated since version 2.19.0, see {@link SearchParameters#toggleFacetRefinement} */ toggleRefinement: function toggleRefinement(facet, value) { return this.toggleFacetRefinement(facet, value); }, /** * Generic toggle refinement method to use with facet, disjunctive facets * and hierarchical facets * @param {string} facet the facet to refine * @param {string} value the associated value * @return {SearchParameters} * @throws will throw an error if the facet is not declared in the settings of the helper */ toggleFacetRefinement: function toggleFacetRefinement(facet, value) { if (this.isHierarchicalFacet(facet)) { return this.toggleHierarchicalFacetRefinement(facet, value); } else if (this.isConjunctiveFacet(facet)) { return this.toggleConjunctiveFacetRefinement(facet, value); } else if (this.isDisjunctiveFacet(facet)) { return this.toggleDisjunctiveFacetRefinement(facet, value); } throw new Error('Cannot refine the undeclared facet ' + facet + '; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets'); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleConjunctiveFacetRefinement: function toggleConjunctiveFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return this.setQueryParameters({ facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleExcludeFacetRefinement: function toggleExcludeFacetRefinement(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return this.setQueryParameters({ facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleDisjunctiveFacetRefinement: function toggleDisjunctiveFacetRefinement(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } return this.setQueryParameters({ disjunctiveFacetsRefinements: RefinementList.toggleRefinement( this.disjunctiveFacetsRefinements, facet, value) }); }, /** * Switch the refinement applied over a facet/value * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {SearchParameters} */ toggleHierarchicalFacetRefinement: function toggleHierarchicalFacetRefinement(facet, value) { if (!this.isHierarchicalFacet(facet)) { throw new Error( facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration'); } var separator = this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(facet)); var mod = {}; var upOneOrMultipleLevel = this.hierarchicalFacetsRefinements[facet] !== undefined && this.hierarchicalFacetsRefinements[facet].length > 0 && ( // remove current refinement: // refinement was 'beer > IPA', call is toggleRefine('beer > IPA'), refinement should be `beer` this.hierarchicalFacetsRefinements[facet][0] === value || // remove a parent refinement of the current refinement: // - refinement was 'beer > IPA > Flying dog' // - call is toggleRefine('beer > IPA') // - refinement should be `beer` this.hierarchicalFacetsRefinements[facet][0].indexOf(value + separator) === 0 ); if (upOneOrMultipleLevel) { if (value.indexOf(separator) === -1) { // go back to root level mod[facet] = []; } else { mod[facet] = [value.slice(0, value.lastIndexOf(separator))]; } } else { mod[facet] = [value]; } return this.setQueryParameters({ hierarchicalFacetsRefinements: defaults({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Adds a refinement on a hierarchical facet. * @param {string} facet the facet name * @param {string} path the hierarchical facet path * @return {SearchParameter} the new state * @throws Error if the facet is not defined or if the facet is refined */ addHierarchicalFacetRefinement: function(facet, path) { if (this.isHierarchicalFacetRefined(facet)) { throw new Error(facet + ' is already refined.'); } var mod = {}; mod[facet] = [path]; return this.setQueryParameters({ hierarchicalFacetsRefinements: defaults({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Removes the refinement set on a hierarchical facet. * @param {string} facet the facet name * @return {SearchParameter} the new state * @throws Error if the facet is not defined or if the facet is not refined */ removeHierarchicalFacetRefinement: function(facet) { if (!this.isHierarchicalFacetRefined(facet)) { throw new Error(facet + ' is not refined.'); } var mod = {}; mod[facet] = []; return this.setQueryParameters({ hierarchicalFacetsRefinements: defaults({}, mod, this.hierarchicalFacetsRefinements) }); }, /** * Switch the tag refinement * @method * @param {string} tag the tag to remove or add * @return {SearchParameters} */ toggleTagRefinement: function toggleTagRefinement(tag) { if (this.isTagRefined(tag)) { return this.removeTagRefinement(tag); } return this.addTagRefinement(tag); }, /** * Test if the facet name is from one of the disjunctive facets * @method * @param {string} facet facet name to test * @return {boolean} */ isDisjunctiveFacet: function(facet) { return indexOf(this.disjunctiveFacets, facet) > -1; }, /** * Test if the facet name is from one of the hierarchical facets * @method * @param {string} facetName facet name to test * @return {boolean} */ isHierarchicalFacet: function(facetName) { return this.getHierarchicalFacetByName(facetName) !== undefined; }, /** * Test if the facet name is from one of the conjunctive/normal facets * @method * @param {string} facet facet name to test * @return {boolean} */ isConjunctiveFacet: function(facet) { return indexOf(this.facets, facet) > -1; }, /** * Returns true if the facet is refined, either for a specific value or in * general. * @method * @param {string} facet name of the attribute for used for faceting * @param {string} value, optional value. If passed will test that this value * is filtering the given facet. * @return {boolean} returns true if refined */ isFacetRefined: function isFacetRefined(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return RefinementList.isRefined(this.facetsRefinements, facet, value); }, /** * Returns true if the facet contains exclusions or if a specific value is * excluded. * * @method * @param {string} facet name of the attribute for used for faceting * @param {string} [value] optional value. If passed will test that this value * is filtering the given facet. * @return {boolean} returns true if refined */ isExcludeRefined: function isExcludeRefined(facet, value) { if (!this.isConjunctiveFacet(facet)) { throw new Error(facet + ' is not defined in the facets attribute of the helper configuration'); } return RefinementList.isRefined(this.facetsExcludes, facet, value); }, /** * Returns true if the facet contains a refinement, or if a value passed is a * refinement for the facet. * @method * @param {string} facet name of the attribute for used for faceting * @param {string} value optional, will test if the value is used for refinement * if there is one, otherwise will test if the facet contains any refinement * @return {boolean} */ isDisjunctiveFacetRefined: function isDisjunctiveFacetRefined(facet, value) { if (!this.isDisjunctiveFacet(facet)) { throw new Error( facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration'); } return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value); }, /** * Returns true if the facet contains a refinement, or if a value passed is a * refinement for the facet. * @method * @param {string} facet name of the attribute for used for faceting * @param {string} value optional, will test if the value is used for refinement * if there is one, otherwise will test if the facet contains any refinement * @return {boolean} */ isHierarchicalFacetRefined: function isHierarchicalFacetRefined(facet, value) { if (!this.isHierarchicalFacet(facet)) { throw new Error( facet + ' is not defined in the hierarchicalFacets attribute of the helper configuration'); } var refinements = this.getHierarchicalRefinement(facet); if (!value) { return refinements.length > 0; } return indexOf(refinements, value) !== -1; }, /** * Test if the triple (attribute, operator, value) is already refined. * If only the attribute and the operator are provided, it tests if the * contains any refinement value. * @method * @param {string} attribute attribute for which the refinement is applied * @param {string} [operator] operator of the refinement * @param {string} [value] value of the refinement * @return {boolean} true if it is refined */ isNumericRefined: function isNumericRefined(attribute, operator, value) { if (isUndefined(value) && isUndefined(operator)) { return !!this.numericRefinements[attribute]; } var isOperatorDefined = this.numericRefinements[attribute] && !isUndefined(this.numericRefinements[attribute][operator]); if (isUndefined(value) || !isOperatorDefined) { return isOperatorDefined; } var parsedValue = valToNumber(value); var isAttributeValueDefined = !isUndefined( findArray(this.numericRefinements[attribute][operator], parsedValue) ); return isOperatorDefined && isAttributeValueDefined; }, /** * Returns true if the tag refined, false otherwise * @method * @param {string} tag the tag to check * @return {boolean} */ isTagRefined: function isTagRefined(tag) { return indexOf(this.tagRefinements, tag) !== -1; }, /** * Returns the list of all disjunctive facets refined * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {string[]} */ getRefinedDisjunctiveFacets: function getRefinedDisjunctiveFacets() { // attributes used for numeric filter can also be disjunctive var disjunctiveNumericRefinedFacets = intersection( keys(this.numericRefinements), this.disjunctiveFacets ); return keys(this.disjunctiveFacetsRefinements) .concat(disjunctiveNumericRefinedFacets) .concat(this.getRefinedHierarchicalFacets()); }, /** * Returns the list of all disjunctive facets refined * @method * @param {string} facet name of the attribute used for faceting * @param {value} value value used for filtering * @return {string[]} */ getRefinedHierarchicalFacets: function getRefinedHierarchicalFacets() { return intersection( // enforce the order between the two arrays, // so that refinement name index === hierarchical facet index map(this.hierarchicalFacets, 'name'), keys(this.hierarchicalFacetsRefinements) ); }, /** * Returned the list of all disjunctive facets not refined * @method * @return {string[]} */ getUnrefinedDisjunctiveFacets: function() { var refinedFacets = this.getRefinedDisjunctiveFacets(); return filter(this.disjunctiveFacets, function(f) { return indexOf(refinedFacets, f) === -1; }); }, managedParameters: [ 'index', 'facets', 'disjunctiveFacets', 'facetsRefinements', 'facetsExcludes', 'disjunctiveFacetsRefinements', 'numericRefinements', 'tagRefinements', 'hierarchicalFacets', 'hierarchicalFacetsRefinements' ], getQueryParams: function getQueryParams() { var managedParameters = this.managedParameters; var queryParams = {}; forOwn(this, function(paramValue, paramName) { if (indexOf(managedParameters, paramName) === -1 && paramValue !== undefined) { queryParams[paramName] = paramValue; } }); return queryParams; }, /** * Let the user retrieve any parameter value from the SearchParameters * @param {string} paramName name of the parameter * @return {any} the value of the parameter */ getQueryParameter: function getQueryParameter(paramName) { if (!this.hasOwnProperty(paramName)) { throw new Error( "Parameter '" + paramName + "' is not an attribute of SearchParameters " + '(http://algolia.github.io/algoliasearch-helper-js/docs/SearchParameters.html)'); } return this[paramName]; }, /** * Let the user set a specific value for a given parameter. Will return the * same instance if the parameter is invalid or if the value is the same as the * previous one. * @method * @param {string} parameter the parameter name * @param {any} value the value to be set, must be compliant with the definition * of the attribute on the object * @return {SearchParameters} the updated state */ setQueryParameter: function setParameter(parameter, value) { if (this[parameter] === value) return this; var modification = {}; modification[parameter] = value; return this.setQueryParameters(modification); }, /** * Let the user set any of the parameters with a plain object. * @method * @param {object} params all the keys and the values to be updated * @return {SearchParameters} a new updated instance */ setQueryParameters: function setQueryParameters(params) { if (!params) return this; var error = SearchParameters.validate(this, params); if (error) { throw error; } var parsedParams = SearchParameters._parseNumbers(params); return this.mutateMe(function mergeWith(newInstance) { var ks = keys(params); forEach(ks, function(k) { newInstance[k] = parsedParams[k]; }); return newInstance; }); }, /** * Returns an object with only the selected attributes. * @param {string[]} filters filters to retrieve only a subset of the state. It * accepts strings that can be either attributes of the SearchParameters (e.g. hitsPerPage) * or attributes of the index with the notation 'attribute:nameOfMyAttribute' * @return {object} */ filter: function(filters) { return filterState(this, filters); }, /** * Helper function to make it easier to build new instances from a mutating * function * @private * @param {function} fn newMutableState -> previousState -> () function that will * change the value of the newMutable to the desired state * @return {SearchParameters} a new instance with the specified modifications applied */ mutateMe: function mutateMe(fn) { var newState = new this.constructor(this); fn(newState, this); return newState; }, /** * Helper function to get the hierarchicalFacet separator or the default one (`>`) * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.separator or `>` as default */ _getHierarchicalFacetSortBy: function(hierarchicalFacet) { return hierarchicalFacet.sortBy || ['isRefined:desc', 'name:asc']; }, /** * Helper function to get the hierarchicalFacet separator or the default one (`>`) * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.separator or `>` as default */ _getHierarchicalFacetSeparator: function(hierarchicalFacet) { return hierarchicalFacet.separator || ' > '; }, /** * Helper function to get the hierarchicalFacet prefix path or null * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.rootPath or null as default */ _getHierarchicalRootPath: function(hierarchicalFacet) { return hierarchicalFacet.rootPath || null; }, /** * Helper function to check if we show the parent level of the hierarchicalFacet * @private * @param {object} hierarchicalFacet * @return {string} returns the hierarchicalFacet.showParentLevel or true as default */ _getHierarchicalShowParentLevel: function(hierarchicalFacet) { if (typeof hierarchicalFacet.showParentLevel === 'boolean') { return hierarchicalFacet.showParentLevel; } return true; }, /** * Helper function to get the hierarchicalFacet by it's name * @param {string} hierarchicalFacetName * @return {object} a hierarchicalFacet */ getHierarchicalFacetByName: function(hierarchicalFacetName) { return find( this.hierarchicalFacets, {name: hierarchicalFacetName} ); }, /** * Get the current breadcrumb for a hierarchical facet, as an array * @param {string} facetName Hierarchical facet name * @return {array.<string>} the path as an array of string */ getHierarchicalFacetBreadcrumb: function(facetName) { if (!this.isHierarchicalFacet(facetName)) { throw new Error( 'Cannot get the breadcrumb of an unknown hierarchical facet: `' + facetName + '`'); } var refinement = this.getHierarchicalRefinement(facetName)[0]; if (!refinement) return []; var separator = this._getHierarchicalFacetSeparator( this.getHierarchicalFacetByName(facetName) ); var path = refinement.split(separator); return map(path, trim); } }; /** * Callback used for clearRefinement method * @callback SearchParameters.clearCallback * @param {OperatorList|FacetList} value the value of the filter * @param {string} key the current attribute name * @param {string} type `numeric`, `disjunctiveFacet`, `conjunctiveFacet`, `hierarchicalFacet` or `exclude` * depending on the type of facet * @return {boolean} `true` if the element should be removed. `false` otherwise. */ module.exports = SearchParameters; /***/ }), /* 101 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(87), baseFilter = __webpack_require__(255), baseIteratee = __webpack_require__(13), isArray = __webpack_require__(0); /** * Iterates over elements of `collection`, returning an array of all elements * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * **Note:** Unlike `_.remove`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * _.filter(users, function(o) { return !o.active; }); * // => objects for ['fred'] * * // The `_.matches` iteratee shorthand. * _.filter(users, { 'age': 36, 'active': true }); * // => objects for ['barney'] * * // The `_.matchesProperty` iteratee shorthand. * _.filter(users, ['active', false]); * // => objects for ['fred'] * * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, baseIteratee(predicate, 3)); } module.exports = filter; /***/ }), /* 102 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(68), assignInWith = __webpack_require__(274), baseRest = __webpack_require__(25), customDefaultsAssignIn = __webpack_require__(275); /** * Assigns own and inherited enumerable string keyed properties of source * objects to the destination object for all destination properties that * resolve to `undefined`. Source objects are applied from left to right. * Once a property is set, additional values of the same property are ignored. * * **Note:** This method mutates `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.defaultsDeep * @example * * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var defaults = baseRest(function(args) { args.push(undefined, customDefaultsAssignIn); return apply(assignInWith, undefined, args); }); module.exports = defaults; /***/ }), /* 103 */ /***/ (function(module, exports, __webpack_require__) { var baseMerge = __webpack_require__(276), createAssigner = __webpack_require__(188); /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); module.exports = merge; /***/ }), /* 104 */ /***/ (function(module, exports, __webpack_require__) { var baseOrderBy = __webpack_require__(288), isArray = __webpack_require__(0); /** * This method is like `_.sortBy` except that it allows specifying the sort * orders of the iteratees to sort by. If `orders` is unspecified, all values * are sorted in ascending order. Otherwise, specify an order of "desc" for * descending or "asc" for ascending sort order of corresponding values. * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] * The iteratees to sort by. * @param {string[]} [orders] The sort orders of `iteratees`. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {Array} Returns the new sorted array. * @example * * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 34 }, * { 'user': 'fred', 'age': 40 }, * { 'user': 'barney', 'age': 36 } * ]; * * // Sort by `user` in ascending order and by `age` in descending order. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ function orderBy(collection, iteratees, orders, guard) { if (collection == null) { return []; } if (!isArray(iteratees)) { iteratees = iteratees == null ? [] : [iteratees]; } orders = guard ? undefined : orders; if (!isArray(orders)) { orders = orders == null ? [] : [orders]; } return baseOrderBy(collection, iteratees, orders); } module.exports = orderBy; /***/ }), /* 105 */ /***/ (function(module, exports, __webpack_require__) { var baseSetData = __webpack_require__(191), createBind = __webpack_require__(293), createCurry = __webpack_require__(294), createHybrid = __webpack_require__(193), createPartial = __webpack_require__(306), getData = __webpack_require__(197), mergeData = __webpack_require__(307), setData = __webpack_require__(199), setWrapToString = __webpack_require__(200), toInteger = __webpack_require__(51); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Creates a function that either curries or invokes `func` with optional * `this` binding and partially applied arguments. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. * 1 - `_.bind` * 2 - `_.bindKey` * 4 - `_.curry` or `_.curryRight` of a bound function * 8 - `_.curry` * 16 - `_.curryRight` * 32 - `_.partial` * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = undefined; } ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); arity = arity === undefined ? arity : toInteger(arity); length -= holders ? holders.length : 0; if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; partials = holders = undefined; } var data = isBindKey ? undefined : getData(func); var newData = [ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity ]; if (data) { mergeData(newData, data); } func = newData[0]; bitmask = newData[1]; thisArg = newData[2]; partials = newData[3]; holders = newData[4]; arity = newData[9] = newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == WRAP_BIND_FLAG) { var result = createBind(func, bitmask, thisArg); } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { result = createCurry(func, bitmask, arity); } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { result = createPartial(func, bitmask, thisArg, partials); } else { result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; return setWrapToString(setter(result, newData), func, bitmask); } module.exports = createWrap; /***/ }), /* 106 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(70), baseLodash = __webpack_require__(107); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; /** * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. * * @private * @constructor * @param {*} value The value to wrap. */ function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } // Ensure `LazyWrapper` is an instance of `baseLodash`. LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; module.exports = LazyWrapper; /***/ }), /* 107 */ /***/ (function(module, exports) { /** * The function whose prototype chain sequence wrappers inherit from. * * @private */ function baseLodash() { // No operation performed. } module.exports = baseLodash; /***/ }), /* 108 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var has = Object.prototype.hasOwnProperty; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); exports.arrayToObject = function (source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; exports.merge = function (target, source, options) { if (!source) { return target; } if (typeof source !== 'object') { if (Array.isArray(target)) { target.push(source); } else if (typeof target === 'object') { if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (Array.isArray(target) && !Array.isArray(source)) { mergeTarget = exports.arrayToObject(target, options); } if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { if (target[i] && typeof target[i] === 'object') { target[i] = exports.merge(target[i], item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = exports.merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; exports.assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function (acc, key) { acc[key] = source[key]; return acc; }, target); }; exports.decode = function (str) { try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { return str; } }; exports.encode = function (str) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = typeof str === 'string' ? str : String(str); var out = ''; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if ( c === 0x2D // - || c === 0x2E // . || c === 0x5F // _ || c === 0x7E // ~ || (c >= 0x30 && c <= 0x39) // 0-9 || (c >= 0x41 && c <= 0x5A) // a-z || (c >= 0x61 && c <= 0x7A) // A-Z ) { out += string.charAt(i); continue; } if (c < 0x80) { out = out + hexTable[c]; continue; } if (c < 0x800) { out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } return out; }; exports.compact = function (obj, references) { if (typeof obj !== 'object' || obj === null) { return obj; } var refs = references || []; var lookup = refs.indexOf(obj); if (lookup !== -1) { return refs[lookup]; } refs.push(obj); if (Array.isArray(obj)) { var compacted = []; for (var i = 0; i < obj.length; ++i) { if (obj[i] && typeof obj[i] === 'object') { compacted.push(exports.compact(obj[i], refs)); } else if (typeof obj[i] !== 'undefined') { compacted.push(obj[i]); } } return compacted; } var keys = Object.keys(obj); keys.forEach(function (key) { obj[key] = exports.compact(obj[key], refs); }); return obj; }; exports.isRegExp = function (obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; exports.isBuffer = function (obj) { if (obj === null || typeof obj === 'undefined') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; /***/ }), /* 109 */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { var basePick = __webpack_require__(325), flatRest = __webpack_require__(176); /** * Creates an object composed of the picked `object` properties. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ var pick = flatRest(function(object, paths) { return object == null ? {} : basePick(object, paths); }); module.exports = pick; /***/ }), /* 111 */, /* 112 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(39), equalArrays = __webpack_require__(78), equalByTag = __webpack_require__(144), equalObjects = __webpack_require__(145), getTag = __webpack_require__(57), isArray = __webpack_require__(0), isBuffer = __webpack_require__(21), isTypedArray = __webpack_require__(33); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /* 113 */ /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(29); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(29); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(29); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /* 117 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(29); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(28); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /* 119 */ /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /* 120 */ /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /* 121 */ /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /* 122 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(28), Map = __webpack_require__(40), MapCache = __webpack_require__(41); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /* 123 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(19), isMasked = __webpack_require__(126), isObject = __webpack_require__(6), toSource = __webpack_require__(77); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /* 124 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(15); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /* 125 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /* 126 */ /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__(127); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(3); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /* 128 */ /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /* 129 */ /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__(130), ListCache = __webpack_require__(28), Map = __webpack_require__(40); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /* 130 */ /***/ (function(module, exports, __webpack_require__) { var hashClear = __webpack_require__(131), hashDelete = __webpack_require__(132), hashGet = __webpack_require__(133), hashHas = __webpack_require__(134), hashSet = __webpack_require__(135); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /* 131 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(30); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /* 132 */ /***/ (function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /* 133 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(30); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /* 134 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(30); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /* 135 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(30); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(31); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /* 137 */ /***/ (function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /* 138 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(31); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /* 139 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(31); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /* 140 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(31); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /* 141 */ /***/ (function(module, exports) { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } module.exports = setCacheAdd; /***/ }), /* 142 */ /***/ (function(module, exports) { /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } module.exports = setCacheHas; /***/ }), /* 143 */ /***/ (function(module, exports) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /* 144 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(15), Uint8Array = __webpack_require__(82), eq = __webpack_require__(18), equalArrays = __webpack_require__(78), mapToArray = __webpack_require__(83), setToArray = __webpack_require__(84); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } module.exports = equalByTag; /***/ }), /* 145 */ /***/ (function(module, exports, __webpack_require__) { var getAllKeys = __webpack_require__(85); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }), /* 146 */ /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /* 147 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(8), isObjectLike = __webpack_require__(7); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /* 148 */ /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /* 149 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(8), isLength = __webpack_require__(42), isObjectLike = __webpack_require__(7); /** `Object#toString` result references. */ var 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]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', 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]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /* 150 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(76); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(56)(module))) /***/ }), /* 151 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(80); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(10), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /* 153 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(10), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /* 154 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(10), root = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /* 155 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.has` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { return object != null && hasOwnProperty.call(object, key); } module.exports = baseHas; /***/ }), /* 156 */ /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__(157); /** Used to match property names within property paths. */ var reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (reLeadingDot.test(string)) { result.push(''); } string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /* 157 */ /***/ (function(module, exports, __webpack_require__) { var memoize = __webpack_require__(158); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(41); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /* 159 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var emptyFunction = __webpack_require__(160); var invariant = __webpack_require__(161); var ReactPropTypesSecret = __webpack_require__(162); module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } invariant( false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); }; shim.isRequired = shim; function getShim() { return shim; }; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim }; ReactPropTypes.checkPropTypes = emptyFunction; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /* 160 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * */ function makeEmptyFunction(arg) { return function () { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ var emptyFunction = function emptyFunction() {}; emptyFunction.thatReturns = makeEmptyFunction; emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); emptyFunction.thatReturnsThis = function () { return this; }; emptyFunction.thatReturnsArgument = function (arg) { return arg; }; module.exports = emptyFunction; /***/ }), /* 161 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var validateFormat = function validateFormat(format) {}; if (false) { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; /***/ }), /* 162 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 163 */ /***/ (function(module, exports) { /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; /***/ }), /* 164 */ /***/ (function(module, exports) { /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } module.exports = arrayIncludesWith; /***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(62), isFlattenable = __webpack_require__(226); /** * The base implementation of `_.flatten` with support for restricting flattening. * * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } module.exports = baseFlatten; /***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(68); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } module.exports = overRest; /***/ }), /* 167 */ /***/ (function(module, exports) { /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } module.exports = constant; /***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(10); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /* 169 */ /***/ (function(module, exports) { /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } module.exports = shortOut; /***/ }), /* 170 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(3); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(56)(module))) /***/ }), /* 171 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(62), getPrototype = __webpack_require__(67), getSymbols = __webpack_require__(63), stubArray = __webpack_require__(88); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); object = getPrototype(object); } return result; }; module.exports = getSymbolsIn; /***/ }), /* 172 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(98); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /* 173 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(70), getPrototype = __webpack_require__(67), isPrototype = __webpack_require__(38); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /* 174 */ /***/ (function(module, exports) { /** * Gets the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @returns {*} Returns the last element of `array`. * @example * * _.last([1, 2, 3]); * // => 3 */ function last(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } module.exports = last; /***/ }), /* 175 */ /***/ (function(module, exports) { /** * The base implementation of `_.slice` without an iteratee call guard. * * @private * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : (length + start); } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } module.exports = baseSlice; /***/ }), /* 176 */ /***/ (function(module, exports, __webpack_require__) { var flatten = __webpack_require__(177), overRest = __webpack_require__(166), setToString = __webpack_require__(93); /** * A specialized version of `baseRest` which flattens the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @returns {Function} Returns the new function. */ function flatRest(func) { return setToString(overRest(func, undefined, flatten), func + ''); } module.exports = flatRest; /***/ }), /* 177 */ /***/ (function(module, exports, __webpack_require__) { var baseFlatten = __webpack_require__(165); /** * Flattens `array` a single level deep. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, [3, [4]], 5]]); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } module.exports = flatten; /***/ }), /* 178 */ /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(253); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /* 179 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(26); /** * Casts `value` to `identity` if it's not a function. * * @private * @param {*} value The value to inspect. * @returns {Function} Returns cast function. */ function castFunction(value) { return typeof value == 'function' ? value : identity; } module.exports = castFunction; /***/ }), /* 180 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(6); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }), /* 181 */ /***/ (function(module, exports) { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }), /* 182 */ /***/ (function(module, exports, __webpack_require__) { var baseHasIn = __webpack_require__(260), hasPath = __webpack_require__(91); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; /***/ }), /* 183 */ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(73), isArrayLike = __webpack_require__(11); /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } module.exports = baseMap; /***/ }), /* 184 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(8), isObjectLike = __webpack_require__(7); /** `Object#toString` result references. */ var numberTag = '[object Number]'; /** * Checks if `value` is classified as a `Number` primitive or object. * * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are * classified as numbers, use the `_.isFinite` method. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); * // => true * * _.isNumber(Number.MIN_VALUE); * // => true * * _.isNumber(Infinity); * // => true * * _.isNumber('3'); * // => false */ function isNumber(value) { return typeof value == 'number' || (isObjectLike(value) && baseGetTag(value) == numberTag); } module.exports = isNumber; /***/ }), /* 185 */ /***/ (function(module, exports) { /** * Checks if `value` is `undefined`. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. * @example * * _.isUndefined(void 0); * // => true * * _.isUndefined(null); * // => false */ function isUndefined(value) { return value === undefined; } module.exports = isUndefined; /***/ }), /* 186 */ /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(163), baseIteratee = __webpack_require__(13), toInteger = __webpack_require__(51); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This method is like `_.find` except that it returns the index of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.findIndex(users, function(o) { return o.user == 'barney'; }); * // => 0 * * // The `_.matches` iteratee shorthand. * _.findIndex(users, { 'user': 'fred', 'active': false }); * // => 1 * * // The `_.matchesProperty` iteratee shorthand. * _.findIndex(users, ['active', false]); * // => 0 * * // The `_.property` iteratee shorthand. * _.findIndex(users, 'active'); * // => 2 */ function findIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseFindIndex(array, baseIteratee(predicate, 3), index); } module.exports = findIndex; /***/ }), /* 187 */ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(66), castSlice = __webpack_require__(267), charsEndIndex = __webpack_require__(268), charsStartIndex = __webpack_require__(269), stringToArray = __webpack_require__(270), toString = __webpack_require__(65); /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** * Removes leading and trailing whitespace or specified characters from `string`. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to trim. * @param {string} [chars=whitespace] The characters to trim. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {string} Returns the trimmed string. * @example * * _.trim(' abc '); * // => 'abc' * * _.trim('-_-abc-_-', '_-'); * // => 'abc' * * _.map([' foo ', ' bar '], _.trim); * // => ['foo', 'bar'] */ function trim(string, chars, guard) { string = toString(string); if (string && (guard || chars === undefined)) { return string.replace(reTrim, ''); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1; return castSlice(strSymbols, start, end).join(''); } module.exports = trim; /***/ }), /* 188 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(25), isIterateeCall = __webpack_require__(215); /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } module.exports = createAssigner; /***/ }), /* 189 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(47), eq = __webpack_require__(18); /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignMergeValue; /***/ }), /* 190 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var forEach = __webpack_require__(36); var compact = __webpack_require__(282); var indexOf = __webpack_require__(74); var findIndex = __webpack_require__(186); var get = __webpack_require__(72); var sumBy = __webpack_require__(283); var find = __webpack_require__(53); var includes = __webpack_require__(285); var map = __webpack_require__(17); var orderBy = __webpack_require__(104); var defaults = __webpack_require__(102); var merge = __webpack_require__(103); var isArray = __webpack_require__(0); var isFunction = __webpack_require__(19); var partial = __webpack_require__(292); var partialRight = __webpack_require__(308); var formatSort = __webpack_require__(201); var generateHierarchicalTree = __webpack_require__(311); /** * @typedef SearchResults.Facet * @type {object} * @property {string} name name of the attribute in the record * @property {object} data the faceting data: value, number of entries * @property {object} stats undefined unless facet_stats is retrieved from algolia */ /** * @typedef SearchResults.HierarchicalFacet * @type {object} * @property {string} name name of the current value given the hierarchical level, trimmed. * If root node, you get the facet name * @property {number} count number of objects matching this hierarchical value * @property {string} path the current hierarchical value full path * @property {boolean} isRefined `true` if the current value was refined, `false` otherwise * @property {HierarchicalFacet[]} data sub values for the current level */ /** * @typedef SearchResults.FacetValue * @type {object} * @property {string} value the facet value itself * @property {number} count times this facet appears in the results * @property {boolean} isRefined is the facet currently selected * @property {boolean} isExcluded is the facet currently excluded (only for conjunctive facets) */ /** * @typedef Refinement * @type {object} * @property {string} type the type of filter used: * `numeric`, `facet`, `exclude`, `disjunctive`, `hierarchical` * @property {string} attributeName name of the attribute used for filtering * @property {string} name the value of the filter * @property {number} numericValue the value as a number. Only for numeric filters. * @property {string} operator the operator used. Only for numeric filters. * @property {number} count the number of computed hits for this filter. Only on facets. * @property {boolean} exhaustive if the count is exhaustive */ function getIndices(obj) { var indices = {}; forEach(obj, function(val, idx) { indices[val] = idx; }); return indices; } function assignFacetStats(dest, facetStats, key) { if (facetStats && facetStats[key]) { dest.stats = facetStats[key]; } } function findMatchingHierarchicalFacetFromAttributeName(hierarchicalFacets, hierarchicalAttributeName) { return find( hierarchicalFacets, function facetKeyMatchesAttribute(hierarchicalFacet) { return includes(hierarchicalFacet.attributes, hierarchicalAttributeName); } ); } /*eslint-disable */ /** * Constructor for SearchResults * @class * @classdesc SearchResults contains the results of a query to Algolia using the * {@link AlgoliaSearchHelper}. * @param {SearchParameters} state state that led to the response * @param {array.<object>} results the results from algolia client * @example <caption>SearchResults of the first query in * <a href="http://demos.algolia.com/instant-search-demo">the instant search demo</a></caption> { "hitsPerPage": 10, "processingTimeMS": 2, "facets": [ { "name": "type", "data": { "HardGood": 6627, "BlackTie": 550, "Music": 665, "Software": 131, "Game": 456, "Movie": 1571 }, "exhaustive": false }, { "exhaustive": false, "data": { "Free shipping": 5507 }, "name": "shipping" } ], "hits": [ { "thumbnailImage": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_54x108_s.gif", "_highlightResult": { "shortDescription": { "matchLevel": "none", "value": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection", "matchedWords": [] }, "category": { "matchLevel": "none", "value": "Computer Security Software", "matchedWords": [] }, "manufacturer": { "matchedWords": [], "value": "Webroot", "matchLevel": "none" }, "name": { "value": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows", "matchedWords": [], "matchLevel": "none" } }, "image": "http://img.bbystatic.com/BestBuy_US/images/products/1688/1688832_105x210_sc.jpg", "shipping": "Free shipping", "bestSellingRank": 4, "shortDescription": "Safeguard your PC, Mac, Android and iOS devices with comprehensive Internet protection", "url": "http://www.bestbuy.com/site/webroot-secureanywhere-internet-security-3-devi…d=1219060687969&skuId=1688832&cmp=RMX&ky=2d3GfEmNIzjA0vkzveHdZEBgpPCyMnLTJ", "name": "Webroot SecureAnywhere Internet Security (3-Device) (1-Year Subscription) - Mac/Windows", "category": "Computer Security Software", "salePrice_range": "1 - 50", "objectID": "1688832", "type": "Software", "customerReviewCount": 5980, "salePrice": 49.99, "manufacturer": "Webroot" }, .... ], "nbHits": 10000, "disjunctiveFacets": [ { "exhaustive": false, "data": { "5": 183, "12": 112, "7": 149, ... }, "name": "customerReviewCount", "stats": { "max": 7461, "avg": 157.939, "min": 1 } }, { "data": { "Printer Ink": 142, "Wireless Speakers": 60, "Point & Shoot Cameras": 48, ... }, "name": "category", "exhaustive": false }, { "exhaustive": false, "data": { "> 5000": 2, "1 - 50": 6524, "501 - 2000": 566, "201 - 500": 1501, "101 - 200": 1360, "2001 - 5000": 47 }, "name": "salePrice_range" }, { "data": { "Dynex™": 202, "Insignia™": 230, "PNY": 72, ... }, "name": "manufacturer", "exhaustive": false } ], "query": "", "nbPages": 100, "page": 0, "index": "bestbuy" } **/ /*eslint-enable */ function SearchResults(state, results) { var mainSubResponse = results[0]; this._rawResults = results; /** * query used to generate the results * @member {string} */ this.query = mainSubResponse.query; /** * The query as parsed by the engine given all the rules. * @member {string} */ this.parsedQuery = mainSubResponse.parsedQuery; /** * all the records that match the search parameters. Each record is * augmented with a new attribute `_highlightResult` * which is an object keyed by attribute and with the following properties: * - `value` : the value of the facet highlighted (html) * - `matchLevel`: full, partial or none depending on how the query terms match * @member {object[]} */ this.hits = mainSubResponse.hits; /** * index where the results come from * @member {string} */ this.index = mainSubResponse.index; /** * number of hits per page requested * @member {number} */ this.hitsPerPage = mainSubResponse.hitsPerPage; /** * total number of hits of this query on the index * @member {number} */ this.nbHits = mainSubResponse.nbHits; /** * total number of pages with respect to the number of hits per page and the total number of hits * @member {number} */ this.nbPages = mainSubResponse.nbPages; /** * current page * @member {number} */ this.page = mainSubResponse.page; /** * sum of the processing time of all the queries * @member {number} */ this.processingTimeMS = sumBy(results, 'processingTimeMS'); /** * The position if the position was guessed by IP. * @member {string} * @example "48.8637,2.3615", */ this.aroundLatLng = mainSubResponse.aroundLatLng; /** * The radius computed by Algolia. * @member {string} * @example "126792922", */ this.automaticRadius = mainSubResponse.automaticRadius; /** * String identifying the server used to serve this request. * @member {string} * @example "c7-use-2.algolia.net", */ this.serverUsed = mainSubResponse.serverUsed; /** * Boolean that indicates if the computation of the counts did time out. * @member {boolean} */ this.timeoutCounts = mainSubResponse.timeoutCounts; /** * Boolean that indicates if the computation of the hits did time out. * @member {boolean} */ this.timeoutHits = mainSubResponse.timeoutHits; /** * disjunctive facets results * @member {SearchResults.Facet[]} */ this.disjunctiveFacets = []; /** * disjunctive facets results * @member {SearchResults.HierarchicalFacet[]} */ this.hierarchicalFacets = map(state.hierarchicalFacets, function initFutureTree() { return []; }); /** * other facets results * @member {SearchResults.Facet[]} */ this.facets = []; var disjunctiveFacets = state.getRefinedDisjunctiveFacets(); var facetsIndices = getIndices(state.facets); var disjunctiveFacetsIndices = getIndices(state.disjunctiveFacets); var nextDisjunctiveResult = 1; var self = this; // Since we send request only for disjunctive facets that have been refined, // we get the facets informations from the first, general, response. forEach(mainSubResponse.facets, function(facetValueObject, facetKey) { var hierarchicalFacet = findMatchingHierarchicalFacetFromAttributeName( state.hierarchicalFacets, facetKey ); if (hierarchicalFacet) { // Place the hierarchicalFacet data at the correct index depending on // the attributes order that was defined at the helper initialization var facetIndex = hierarchicalFacet.attributes.indexOf(facetKey); var idxAttributeName = findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name}); self.hierarchicalFacets[idxAttributeName][facetIndex] = { attribute: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; } else { var isFacetDisjunctive = indexOf(state.disjunctiveFacets, facetKey) !== -1; var isFacetConjunctive = indexOf(state.facets, facetKey) !== -1; var position; if (isFacetDisjunctive) { position = disjunctiveFacetsIndices[facetKey]; self.disjunctiveFacets[position] = { name: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; assignFacetStats(self.disjunctiveFacets[position], mainSubResponse.facets_stats, facetKey); } if (isFacetConjunctive) { position = facetsIndices[facetKey]; self.facets[position] = { name: facetKey, data: facetValueObject, exhaustive: mainSubResponse.exhaustiveFacetsCount }; assignFacetStats(self.facets[position], mainSubResponse.facets_stats, facetKey); } } }); // Make sure we do not keep holes within the hierarchical facets this.hierarchicalFacets = compact(this.hierarchicalFacets); // aggregate the refined disjunctive facets forEach(disjunctiveFacets, function(disjunctiveFacet) { var result = results[nextDisjunctiveResult]; var hierarchicalFacet = state.getHierarchicalFacetByName(disjunctiveFacet); // There should be only item in facets. forEach(result.facets, function(facetResults, dfacet) { var position; if (hierarchicalFacet) { position = findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name}); var attributeIndex = findIndex(self.hierarchicalFacets[position], {attribute: dfacet}); // previous refinements and no results so not able to find it if (attributeIndex === -1) { return; } self.hierarchicalFacets[position][attributeIndex].data = merge( {}, self.hierarchicalFacets[position][attributeIndex].data, facetResults ); } else { position = disjunctiveFacetsIndices[dfacet]; var dataFromMainRequest = mainSubResponse.facets && mainSubResponse.facets[dfacet] || {}; self.disjunctiveFacets[position] = { name: dfacet, data: defaults({}, facetResults, dataFromMainRequest), exhaustive: result.exhaustiveFacetsCount }; assignFacetStats(self.disjunctiveFacets[position], result.facets_stats, dfacet); if (state.disjunctiveFacetsRefinements[dfacet]) { forEach(state.disjunctiveFacetsRefinements[dfacet], function(refinementValue) { // add the disjunctive refinements if it is no more retrieved if (!self.disjunctiveFacets[position].data[refinementValue] && indexOf(state.disjunctiveFacetsRefinements[dfacet], refinementValue) > -1) { self.disjunctiveFacets[position].data[refinementValue] = 0; } }); } } }); nextDisjunctiveResult++; }); // if we have some root level values for hierarchical facets, merge them forEach(state.getRefinedHierarchicalFacets(), function(refinedFacet) { var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet); var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var currentRefinement = state.getHierarchicalRefinement(refinedFacet); // if we are already at a root refinement (or no refinement at all), there is no // root level values request if (currentRefinement.length === 0 || currentRefinement[0].split(separator).length < 2) { return; } var result = results[nextDisjunctiveResult]; forEach(result.facets, function(facetResults, dfacet) { var position = findIndex(state.hierarchicalFacets, {name: hierarchicalFacet.name}); var attributeIndex = findIndex(self.hierarchicalFacets[position], {attribute: dfacet}); // previous refinements and no results so not able to find it if (attributeIndex === -1) { return; } // when we always get root levels, if the hits refinement is `beers > IPA` (count: 5), // then the disjunctive values will be `beers` (count: 100), // but we do not want to display // | beers (100) // > IPA (5) // We want // | beers (5) // > IPA (5) var defaultData = {}; if (currentRefinement.length > 0) { var root = currentRefinement[0].split(separator)[0]; defaultData[root] = self.hierarchicalFacets[position][attributeIndex].data[root]; } self.hierarchicalFacets[position][attributeIndex].data = defaults( defaultData, facetResults, self.hierarchicalFacets[position][attributeIndex].data ); }); nextDisjunctiveResult++; }); // add the excludes forEach(state.facetsExcludes, function(excludes, facetName) { var position = facetsIndices[facetName]; self.facets[position] = { name: facetName, data: mainSubResponse.facets[facetName], exhaustive: mainSubResponse.exhaustiveFacetsCount }; forEach(excludes, function(facetValue) { self.facets[position] = self.facets[position] || {name: facetName}; self.facets[position].data = self.facets[position].data || {}; self.facets[position].data[facetValue] = 0; }); }); this.hierarchicalFacets = map(this.hierarchicalFacets, generateHierarchicalTree(state)); this.facets = compact(this.facets); this.disjunctiveFacets = compact(this.disjunctiveFacets); this._state = state; } /** * Get a facet object with its name * @deprecated * @param {string} name name of the faceted attribute * @return {SearchResults.Facet} the facet object */ SearchResults.prototype.getFacetByName = function(name) { var predicate = {name: name}; return find(this.facets, predicate) || find(this.disjunctiveFacets, predicate) || find(this.hierarchicalFacets, predicate); }; /** * Get the facet values of a specified attribute from a SearchResults object. * @private * @param {SearchResults} results the search results to search in * @param {string} attribute name of the faceted attribute to search for * @return {array|object} facet values. For the hierarchical facets it is an object. */ function extractNormalizedFacetValues(results, attribute) { var predicate = {name: attribute}; if (results._state.isConjunctiveFacet(attribute)) { var facet = find(results.facets, predicate); if (!facet) return []; return map(facet.data, function(v, k) { return { name: k, count: v, isRefined: results._state.isFacetRefined(attribute, k), isExcluded: results._state.isExcludeRefined(attribute, k) }; }); } else if (results._state.isDisjunctiveFacet(attribute)) { var disjunctiveFacet = find(results.disjunctiveFacets, predicate); if (!disjunctiveFacet) return []; return map(disjunctiveFacet.data, function(v, k) { return { name: k, count: v, isRefined: results._state.isDisjunctiveFacetRefined(attribute, k) }; }); } else if (results._state.isHierarchicalFacet(attribute)) { return find(results.hierarchicalFacets, predicate); } } /** * Sort nodes of a hierarchical facet results * @private * @param {HierarchicalFacet} node node to upon which we want to apply the sort */ function recSort(sortFn, node) { if (!node.data || node.data.length === 0) { return node; } var children = map(node.data, partial(recSort, sortFn)); var sortedChildren = sortFn(children); var newNode = merge({}, node, {data: sortedChildren}); return newNode; } SearchResults.DEFAULT_SORT = ['isRefined:desc', 'count:desc', 'name:asc']; function vanillaSortFn(order, data) { return data.sort(order); } /** * Get a the list of values for a given facet attribute. Those values are sorted * refinement first, descending count (bigger value on top), and name ascending * (alphabetical order). The sort formula can overridden using either string based * predicates or a function. * * This method will return all the values returned by the Algolia engine plus all * the values already refined. This means that it can happen that the * `maxValuesPerFacet` [configuration](https://www.algolia.com/doc/rest-api/search#param-maxValuesPerFacet) * might not be respected if you have facet values that are already refined. * @param {string} attribute attribute name * @param {object} opts configuration options. * @param {Array.<string> | function} opts.sortBy * When using strings, it consists of * the name of the [FacetValue](#SearchResults.FacetValue) or the * [HierarchicalFacet](#SearchResults.HierarchicalFacet) attributes with the * order (`asc` or `desc`). For example to order the value by count, the * argument would be `['count:asc']`. * * If only the attribute name is specified, the ordering defaults to the one * specified in the default value for this attribute. * * When not specified, the order is * ascending. This parameter can also be a function which takes two facet * values and should return a number, 0 if equal, 1 if the first argument is * bigger or -1 otherwise. * * The default value for this attribute `['isRefined:desc', 'count:desc', 'name:asc']` * @return {FacetValue[]|HierarchicalFacet} depending on the type of facet of * the attribute requested (hierarchical, disjunctive or conjunctive) * @example * helper.on('results', function(content){ * //get values ordered only by name ascending using the string predicate * content.getFacetValues('city', {sortBy: ['name:asc']}); * //get values ordered only by count ascending using a function * content.getFacetValues('city', { * // this is equivalent to ['count:asc'] * sortBy: function(a, b) { * if (a.count === b.count) return 0; * if (a.count > b.count) return 1; * if (b.count > a.count) return -1; * } * }); * }); */ SearchResults.prototype.getFacetValues = function(attribute, opts) { var facetValues = extractNormalizedFacetValues(this, attribute); if (!facetValues) throw new Error(attribute + ' is not a retrieved facet.'); var options = defaults({}, opts, {sortBy: SearchResults.DEFAULT_SORT}); if (isArray(options.sortBy)) { var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT); if (isArray(facetValues)) { return orderBy(facetValues, order[0], order[1]); } // If facetValues is not an array, it's an object thus a hierarchical facet object return recSort(partialRight(orderBy, order[0], order[1]), facetValues); } else if (isFunction(options.sortBy)) { if (isArray(facetValues)) { return facetValues.sort(options.sortBy); } // If facetValues is not an array, it's an object thus a hierarchical facet object return recSort(partial(vanillaSortFn, options.sortBy), facetValues); } throw new Error( 'options.sortBy is optional but if defined it must be ' + 'either an array of string (predicates) or a sorting function' ); }; /** * Returns the facet stats if attribute is defined and the facet contains some. * Otherwise returns undefined. * @param {string} attribute name of the faceted attribute * @return {object} The stats of the facet */ SearchResults.prototype.getFacetStats = function(attribute) { if (this._state.isConjunctiveFacet(attribute)) { return getFacetStatsIfAvailable(this.facets, attribute); } else if (this._state.isDisjunctiveFacet(attribute)) { return getFacetStatsIfAvailable(this.disjunctiveFacets, attribute); } throw new Error(attribute + ' is not present in `facets` or `disjunctiveFacets`'); }; function getFacetStatsIfAvailable(facetList, facetName) { var data = find(facetList, {name: facetName}); return data && data.stats; } /** * Returns all refinements for all filters + tags. It also provides * additional information: count and exhausistivity for each filter. * * See the [refinement type](#Refinement) for an exhaustive view of the available * data. * * @return {Array.<Refinement>} all the refinements */ SearchResults.prototype.getRefinements = function() { var state = this._state; var results = this; var res = []; forEach(state.facetsRefinements, function(refinements, attributeName) { forEach(refinements, function(name) { res.push(getRefinement(state, 'facet', attributeName, name, results.facets)); }); }); forEach(state.facetsExcludes, function(refinements, attributeName) { forEach(refinements, function(name) { res.push(getRefinement(state, 'exclude', attributeName, name, results.facets)); }); }); forEach(state.disjunctiveFacetsRefinements, function(refinements, attributeName) { forEach(refinements, function(name) { res.push(getRefinement(state, 'disjunctive', attributeName, name, results.disjunctiveFacets)); }); }); forEach(state.hierarchicalFacetsRefinements, function(refinements, attributeName) { forEach(refinements, function(name) { res.push(getHierarchicalRefinement(state, attributeName, name, results.hierarchicalFacets)); }); }); forEach(state.numericRefinements, function(operators, attributeName) { forEach(operators, function(values, operator) { forEach(values, function(value) { res.push({ type: 'numeric', attributeName: attributeName, name: value, numericValue: value, operator: operator }); }); }); }); forEach(state.tagRefinements, function(name) { res.push({type: 'tag', attributeName: '_tags', name: name}); }); return res; }; function getRefinement(state, type, attributeName, name, resultsFacets) { var facet = find(resultsFacets, {name: attributeName}); var count = get(facet, 'data[' + name + ']'); var exhaustive = get(facet, 'exhaustive'); return { type: type, attributeName: attributeName, name: name, count: count || 0, exhaustive: exhaustive || false }; } function getHierarchicalRefinement(state, attributeName, name, resultsFacets) { var facet = find(resultsFacets, {name: attributeName}); var facetDeclaration = state.getHierarchicalFacetByName(attributeName); var splitted = name.split(facetDeclaration.separator); var configuredName = splitted[splitted.length - 1]; for (var i = 0; facet !== undefined && i < splitted.length; ++i) { facet = find(facet.data, {name: splitted[i]}); } var count = get(facet, 'count'); var exhaustive = get(facet, 'exhaustive'); return { type: 'hierarchical', attributeName: attributeName, name: configuredName, count: count || 0, exhaustive: exhaustive || false }; } module.exports = SearchResults; /***/ }), /* 191 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(26), metaMap = __webpack_require__(192); /** * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var baseSetData = !metaMap ? identity : function(func, data) { metaMap.set(func, data); return func; }; module.exports = baseSetData; /***/ }), /* 192 */ /***/ (function(module, exports, __webpack_require__) { var WeakMap = __webpack_require__(90); /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; module.exports = metaMap; /***/ }), /* 193 */ /***/ (function(module, exports, __webpack_require__) { var composeArgs = __webpack_require__(194), composeArgsRight = __webpack_require__(195), countHolders = __webpack_require__(295), createCtor = __webpack_require__(75), createRecurry = __webpack_require__(196), getHolder = __webpack_require__(54), reorder = __webpack_require__(305), replaceHolders = __webpack_require__(37), root = __webpack_require__(3); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_ARY_FLAG = 128, WRAP_FLIP_FLAG = 512; /** * Creates a function that wraps `func` to invoke it with optional `this` * binding of `thisArg`, partial application, and currying. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [partialsRight] The arguments to append to those provided * to the new function. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { args = composeArgs(args, partials, holders, isCurried); } if (partialsRight) { args = composeArgsRight(args, partialsRight, holdersRight, isCurried); } length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; length = args.length; if (argPos) { args = reorder(args, argPos); } else if (isFlip && length > 1) { args.reverse(); } if (isAry && ary < length) { args.length = ary; } if (this && this !== root && this instanceof wrapper) { fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } module.exports = createHybrid; /***/ }), /* 194 */ /***/ (function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Creates an array that is the composition of partially applied arguments, * placeholders, and provided arguments into a single array of arguments. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgs(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(leftLength + rangeLength), isUncurried = !isCurried; while (++leftIndex < leftLength) { result[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[holders[argsIndex]] = args[argsIndex]; } } while (rangeLength--) { result[leftIndex++] = args[argsIndex++]; } return result; } module.exports = composeArgs; /***/ }), /* 195 */ /***/ (function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This function is like `composeArgs` except that the arguments composition * is tailored for `_.partialRight`. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgsRight(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(rangeLength + rightLength), isUncurried = !isCurried; while (++argsIndex < rangeLength) { result[argsIndex] = args[argsIndex]; } var offset = argsIndex; while (++rightIndex < rightLength) { result[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[offset + holders[holdersIndex]] = args[argsIndex++]; } } return result; } module.exports = composeArgsRight; /***/ }), /* 196 */ /***/ (function(module, exports, __webpack_require__) { var isLaziable = __webpack_require__(296), setData = __webpack_require__(199), setWrapToString = __webpack_require__(200); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64; /** * Creates a function that wraps `func` to continue currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials; bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity ]; var result = wrapFunc.apply(undefined, newData); if (isLaziable(func)) { setData(result, newData); } result.placeholder = placeholder; return setWrapToString(result, func, bitmask); } module.exports = createRecurry; /***/ }), /* 197 */ /***/ (function(module, exports, __webpack_require__) { var metaMap = __webpack_require__(192), noop = __webpack_require__(297); /** * Gets metadata for `func`. * * @private * @param {Function} func The function to query. * @returns {*} Returns the metadata for `func`. */ var getData = !metaMap ? noop : function(func) { return metaMap.get(func); }; module.exports = getData; /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(70), baseLodash = __webpack_require__(107); /** * The base constructor for creating `lodash` wrapper objects. * * @private * @param {*} value The value to wrap. * @param {boolean} [chainAll] Enable explicit method chain sequences. */ function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = undefined; } LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; module.exports = LodashWrapper; /***/ }), /* 199 */ /***/ (function(module, exports, __webpack_require__) { var baseSetData = __webpack_require__(191), shortOut = __webpack_require__(169); /** * Sets metadata for `func`. * * **Note:** If this function becomes hot, i.e. is invoked a lot in a short * period of time, it will trip its breaker and transition to an identity * function to avoid garbage collection pauses in V8. See * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) * for more details. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var setData = shortOut(baseSetData); module.exports = setData; /***/ }), /* 200 */ /***/ (function(module, exports, __webpack_require__) { var getWrapDetails = __webpack_require__(302), insertWrapDetails = __webpack_require__(303), setToString = __webpack_require__(93), updateWrapDetails = __webpack_require__(304); /** * Sets the `toString` method of `wrapper` to mimic the source of `reference` * with wrapper details in a comment at the top of the source body. * * @private * @param {Function} wrapper The function to modify. * @param {Function} reference The reference function. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Function} Returns `wrapper`. */ function setWrapToString(wrapper, reference, bitmask) { var source = (reference + ''); return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); } module.exports = setWrapToString; /***/ }), /* 201 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var reduce = __webpack_require__(50); var find = __webpack_require__(53); var startsWith = __webpack_require__(309); /** * Transform sort format from user friendly notation to lodash format * @param {string[]} sortBy array of predicate of the form "attribute:order" * @return {array.<string[]>} array containing 2 elements : attributes, orders */ module.exports = function formatSort(sortBy, defaults) { return reduce(sortBy, function preparePredicate(out, sortInstruction) { var sortInstructions = sortInstruction.split(':'); if (defaults && sortInstructions.length === 1) { var similarDefault = find(defaults, function(predicate) { return startsWith(predicate, sortInstruction[0]); }); if (similarDefault) { sortInstructions = similarDefault.split(':'); } } out[0].push(sortInstructions[0]); out[1].push(sortInstructions[1]); return out; }, [[], []]); }; /***/ }), /* 202 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(71), baseSet = __webpack_require__(313), castPath = __webpack_require__(22); /** * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ function basePickBy(object, paths, predicate) { var index = -1, length = paths.length, result = {}; while (++index < length) { var path = paths[index], value = baseGet(object, path); if (predicate(value, path)) { baseSet(result, castPath(path, object), value); } } return result; } module.exports = basePickBy; /***/ }), /* 203 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var formatRegExp = /%[sdj%]/g; exports.format = function(f) { if (!isString(f)) { var objects = []; for (var i = 0; i < arguments.length; i++) { objects.push(inspect(arguments[i])); } return objects.join(' '); } var i = 1; var args = arguments; var len = args.length; var str = String(f).replace(formatRegExp, function(x) { if (x === '%%') return '%'; if (i >= len) return x; switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } default: return x; } }); for (var x = args[i]; i < len; x = args[++i]) { if (isNull(x) || !isObject(x)) { str += ' ' + x; } else { str += ' ' + inspect(x); } } return str; }; // Mark that a method should not be used. // Returns a modified function which warns once by default. // If --no-deprecation is set, then it is a no-op. exports.deprecate = function(fn, msg) { // Allow for deprecating things in the process of starting up. if (isUndefined(global.process)) { return function() { return exports.deprecate(fn, msg).apply(this, arguments); }; } if (process.noDeprecation === true) { return fn; } var warned = false; function deprecated() { if (!warned) { if (process.throwDeprecation) { throw new Error(msg); } else if (process.traceDeprecation) { console.trace(msg); } else { console.error(msg); } warned = true; } return fn.apply(this, arguments); } return deprecated; }; var debugs = {}; var debugEnviron; exports.debuglog = function(set) { if (isUndefined(debugEnviron)) debugEnviron = process.env.NODE_DEBUG || ''; set = set.toUpperCase(); if (!debugs[set]) { if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { var pid = process.pid; debugs[set] = function() { var msg = exports.format.apply(exports, arguments); console.error('%s %d: %s', set, pid, msg); }; } else { debugs[set] = function() {}; } } return debugs[set]; }; /** * Echos the value of a value. Trys to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. * @param {Object} opts Optional options object that alters the output. */ /* legacy: obj, showHidden, depth, colors*/ function inspect(obj, opts) { // default options var ctx = { seen: [], stylize: stylizeNoColor }; // legacy... if (arguments.length >= 3) ctx.depth = arguments[2]; if (arguments.length >= 4) ctx.colors = arguments[3]; if (isBoolean(opts)) { // legacy... ctx.showHidden = opts; } else if (opts) { // got an "options" object exports._extend(ctx, opts); } // set default options if (isUndefined(ctx.showHidden)) ctx.showHidden = false; if (isUndefined(ctx.depth)) ctx.depth = 2; if (isUndefined(ctx.colors)) ctx.colors = false; if (isUndefined(ctx.customInspect)) ctx.customInspect = true; if (ctx.colors) ctx.stylize = stylizeWithColor; return formatValue(ctx, obj, ctx.depth); } exports.inspect = inspect; // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics inspect.colors = { 'bold' : [1, 22], 'italic' : [3, 23], 'underline' : [4, 24], 'inverse' : [7, 27], 'white' : [37, 39], 'grey' : [90, 39], 'black' : [30, 39], 'blue' : [34, 39], 'cyan' : [36, 39], 'green' : [32, 39], 'magenta' : [35, 39], 'red' : [31, 39], 'yellow' : [33, 39] }; // Don't use 'blue' not visible on cmd.exe inspect.styles = { 'special': 'cyan', 'number': 'yellow', 'boolean': 'yellow', 'undefined': 'grey', 'null': 'bold', 'string': 'green', 'date': 'magenta', // "name": intentionally not styling 'regexp': 'red' }; function stylizeWithColor(str, styleType) { var style = inspect.styles[styleType]; if (style) { return '\u001b[' + inspect.colors[style][0] + 'm' + str + '\u001b[' + inspect.colors[style][1] + 'm'; } else { return str; } } function stylizeNoColor(str, styleType) { return str; } function arrayToHash(array) { var hash = {}; array.forEach(function(val, idx) { hash[val] = true; }); return hash; } function formatValue(ctx, value, recurseTimes) { // Provide a hook for user-specified inspect functions. // Check that value is an object with an inspect function on it if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check. !(value.constructor && value.constructor.prototype === value)) { var ret = value.inspect(recurseTimes, ctx); if (!isString(ret)) { ret = formatValue(ctx, ret, recurseTimes); } return ret; } // Primitive types cannot have properties var primitive = formatPrimitive(ctx, value); if (primitive) { return primitive; } // Look up the keys of the object. var keys = Object.keys(value); var visibleKeys = arrayToHash(keys); if (ctx.showHidden) { keys = Object.getOwnPropertyNames(value); } // IE doesn't make error fields non-enumerable // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { return formatError(value); } // Some type of object without properties can be shortcutted. if (keys.length === 0) { if (isFunction(value)) { var name = value.name ? ': ' + value.name : ''; return ctx.stylize('[Function' + name + ']', 'special'); } if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } if (isDate(value)) { return ctx.stylize(Date.prototype.toString.call(value), 'date'); } if (isError(value)) { return formatError(value); } } var base = '', array = false, braces = ['{', '}']; // Make Array say that they are Array if (isArray(value)) { array = true; braces = ['[', ']']; } // Make functions say that they are functions if (isFunction(value)) { var n = value.name ? ': ' + value.name : ''; base = ' [Function' + n + ']'; } // Make RegExps say that they are RegExps if (isRegExp(value)) { base = ' ' + RegExp.prototype.toString.call(value); } // Make dates with properties first say the date if (isDate(value)) { base = ' ' + Date.prototype.toUTCString.call(value); } // Make error with message first say the error if (isError(value)) { base = ' ' + formatError(value); } if (keys.length === 0 && (!array || value.length == 0)) { return braces[0] + base + braces[1]; } if (recurseTimes < 0) { if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } else { return ctx.stylize('[Object]', 'special'); } } ctx.seen.push(value); var output; if (array) { output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); } else { output = keys.map(function(key) { return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); }); } ctx.seen.pop(); return reduceToSingleString(output, base, braces); } function formatPrimitive(ctx, value) { if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); if (isString(value)) { var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') .replace(/'/g, "\\'") .replace(/\\"/g, '"') + '\''; return ctx.stylize(simple, 'string'); } if (isNumber(value)) return ctx.stylize('' + value, 'number'); if (isBoolean(value)) return ctx.stylize('' + value, 'boolean'); // For some reason typeof null is "object", so special case here. if (isNull(value)) return ctx.stylize('null', 'null'); } function formatError(value) { return '[' + Error.prototype.toString.call(value) + ']'; } function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { var output = []; for (var i = 0, l = value.length; i < l; ++i) { if (hasOwnProperty(value, String(i))) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true)); } else { output.push(''); } } keys.forEach(function(key) { if (!key.match(/^\d+$/)) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); } }); return output; } function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { var name, str, desc; desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; if (desc.get) { if (desc.set) { str = ctx.stylize('[Getter/Setter]', 'special'); } else { str = ctx.stylize('[Getter]', 'special'); } } else { if (desc.set) { str = ctx.stylize('[Setter]', 'special'); } } if (!hasOwnProperty(visibleKeys, key)) { name = '[' + key + ']'; } if (!str) { if (ctx.seen.indexOf(desc.value) < 0) { if (isNull(recurseTimes)) { str = formatValue(ctx, desc.value, null); } else { str = formatValue(ctx, desc.value, recurseTimes - 1); } if (str.indexOf('\n') > -1) { if (array) { str = str.split('\n').map(function(line) { return ' ' + line; }).join('\n').substr(2); } else { str = '\n' + str.split('\n').map(function(line) { return ' ' + line; }).join('\n'); } } } else { str = ctx.stylize('[Circular]', 'special'); } } if (isUndefined(name)) { if (array && key.match(/^\d+$/)) { return str; } name = JSON.stringify('' + key); if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { name = name.substr(1, name.length - 2); name = ctx.stylize(name, 'name'); } else { name = name.replace(/'/g, "\\'") .replace(/\\"/g, '"') .replace(/(^"|"$)/g, "'"); name = ctx.stylize(name, 'string'); } } return name + ': ' + str; } function reduceToSingleString(output, base, braces) { var numLinesEst = 0; var length = output.reduce(function(prev, cur) { numLinesEst++; if (cur.indexOf('\n') >= 0) numLinesEst++; return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; }, 0); if (length > 60) { return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; } return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. function isArray(ar) { return Array.isArray(ar); } exports.isArray = isArray; function isBoolean(arg) { return typeof arg === 'boolean'; } exports.isBoolean = isBoolean; function isNull(arg) { return arg === null; } exports.isNull = isNull; function isNullOrUndefined(arg) { return arg == null; } exports.isNullOrUndefined = isNullOrUndefined; function isNumber(arg) { return typeof arg === 'number'; } exports.isNumber = isNumber; function isString(arg) { return typeof arg === 'string'; } exports.isString = isString; function isSymbol(arg) { return typeof arg === 'symbol'; } exports.isSymbol = isSymbol; function isUndefined(arg) { return arg === void 0; } exports.isUndefined = isUndefined; function isRegExp(re) { return isObject(re) && objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; function isObject(arg) { return typeof arg === 'object' && arg !== null; } exports.isObject = isObject; function isDate(d) { return isObject(d) && objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error); } exports.isError = isError; function isFunction(arg) { return typeof arg === 'function'; } exports.isFunction = isFunction; function isPrimitive(arg) { return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || // ES6 symbol typeof arg === 'undefined'; } exports.isPrimitive = isPrimitive; exports.isBuffer = __webpack_require__(315); function objectToString(o) { return Object.prototype.toString.call(o); } function pad(n) { return n < 10 ? '0' + n.toString(10) : n.toString(10); } var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; // 26 Feb 16:19:34 function timestamp() { var d = new Date(); var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':'); return [d.getDate(), months[d.getMonth()], time].join(' '); } // log is just a thin wrapper to console.log that prepends a timestamp exports.log = function() { console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); }; /** * Inherit the prototype methods from one constructor into another. * * The Function.prototype.inherits from lang.js rewritten as a standalone * function (not on Function.prototype). NOTE: If this file is to be loaded * during bootstrapping this function needs to be rewritten using some native * functions as prototype setup using normal JavaScript does not work as * expected during bootstrapping (see mirror.js in r114903). * * @param {function} ctor Constructor function which needs to inherit the * prototype. * @param {function} superCtor Constructor function to inherit prototype from. */ exports.inherits = __webpack_require__(316); exports._extend = function(origin, add) { // Don't do anything if add isn't an object if (!add || !isObject(add)) return origin; var keys = Object.keys(add); var i = keys.length; while (i--) { origin[keys[i]] = add[keys[i]]; } return origin; }; function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(55), __webpack_require__(109))) /***/ }), /* 204 */ /***/ (function(module, exports) { // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; } module.exports = EventEmitter; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. EventEmitter.defaultMaxListeners = 10; // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. EventEmitter.prototype.setMaxListeners = function(n) { if (!isNumber(n) || n < 0 || isNaN(n)) throw TypeError('n must be a positive number'); this._maxListeners = n; return this; }; EventEmitter.prototype.emit = function(type) { var er, handler, len, args, i, listeners; if (!this._events) this._events = {}; // If there is no 'error' event listener then throw. if (type === 'error') { if (!this._events.error || (isObject(this._events.error) && !this._events.error.length)) { er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' event } else { // At least give some kind of context to the user var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); err.context = er; throw err; } } } handler = this._events[type]; if (isUndefined(handler)) return false; if (isFunction(handler)) { switch (arguments.length) { // fast cases case 1: handler.call(this); break; case 2: handler.call(this, arguments[1]); break; case 3: handler.call(this, arguments[1], arguments[2]); break; // slower default: args = Array.prototype.slice.call(arguments, 1); handler.apply(this, args); } } else if (isObject(handler)) { args = Array.prototype.slice.call(arguments, 1); listeners = handler.slice(); len = listeners.length; for (i = 0; i < len; i++) listeners[i].apply(this, args); } return true; }; EventEmitter.prototype.addListener = function(type, listener) { var m; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events) this._events = {}; // To avoid recursion in the case that type === "newListener"! Before // adding it to the listeners, first emit "newListener". if (this._events.newListener) this.emit('newListener', type, isFunction(listener.listener) ? listener.listener : listener); if (!this._events[type]) // Optimize the case of one listener. Don't need the extra array object. this._events[type] = listener; else if (isObject(this._events[type])) // If we've already got an array, just append. this._events[type].push(listener); else // Adding the second element, need to change to array. this._events[type] = [this._events[type], listener]; // Check for listener leak if (isObject(this._events[type]) && !this._events[type].warned) { if (!isUndefined(this._maxListeners)) { m = this._maxListeners; } else { m = EventEmitter.defaultMaxListeners; } if (m && m > 0 && this._events[type].length > m) { this._events[type].warned = true; console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); if (typeof console.trace === 'function') { // not supported in IE 10 console.trace(); } } } return this; }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.once = function(type, listener) { if (!isFunction(listener)) throw TypeError('listener must be a function'); var fired = false; function g() { this.removeListener(type, g); if (!fired) { fired = true; listener.apply(this, arguments); } } g.listener = listener; this.on(type, g); return this; }; // emits a 'removeListener' event iff the listener was removed 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; list = this._events[type]; length = list.length; position = -1; if (list === listener || (isFunction(list.listener) && list.listener === listener)) { delete this._events[type]; if (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 (position < 0) return this; if (list.length === 1) { list.length = 0; delete this._events[type]; } else { list.splice(position, 1); } if (this._events.removeListener) this.emit('removeListener', type, listener); } return this; }; EventEmitter.prototype.removeAllListeners = function(type) { var key, listeners; if (!this._events) return this; // not listening for removeListener, no need to emit if (!this._events.removeListener) { if (arguments.length === 0) this._events = {}; else if (this._events[type]) delete this._events[type]; return this; } // emit removeListener for all listeners on all events if (arguments.length === 0) { for (key in this._events) { if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = {}; return this; } listeners = this._events[type]; if (isFunction(listeners)) { this.removeListener(type, listeners); } else if (listeners) { // LIFO order while (listeners.length) this.removeListener(type, listeners[listeners.length - 1]); } delete this._events[type]; return this; }; EventEmitter.prototype.listeners = function(type) { var ret; if (!this._events || !this._events[type]) ret = []; else if (isFunction(this._events[type])) ret = [this._events[type]]; else ret = this._events[type].slice(); return ret; }; EventEmitter.prototype.listenerCount = function(type) { if (this._events) { var evlistener = this._events[type]; if (isFunction(evlistener)) return 1; else if (evlistener) return evlistener.length; } return 0; }; EventEmitter.listenerCount = function(emitter, type) { return emitter.listenerCount(type); }; function isFunction(arg) { return typeof arg === 'function'; } function isNumber(arg) { return typeof arg === 'number'; } function isObject(arg) { return typeof arg === 'object' && arg !== null; } function isUndefined(arg) { return arg === void 0; } /***/ }), /* 205 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Module containing the functions to serialize and deserialize * {SearchParameters} in the query string format * @module algoliasearchHelper.url */ var shortener = __webpack_require__(318); var SearchParameters = __webpack_require__(100); var qs = __webpack_require__(321); var bind = __webpack_require__(324); var forEach = __webpack_require__(36); var pick = __webpack_require__(110); var map = __webpack_require__(17); var mapKeys = __webpack_require__(326); var mapValues = __webpack_require__(327); var isString = __webpack_require__(52); var isPlainObject = __webpack_require__(45); var isArray = __webpack_require__(0); var isEmpty = __webpack_require__(14); var invert = __webpack_require__(206); var encode = __webpack_require__(108).encode; function recursiveEncode(input) { if (isPlainObject(input)) { return mapValues(input, recursiveEncode); } if (isArray(input)) { return map(input, recursiveEncode); } if (isString(input)) { return encode(input); } return input; } var refinementsParameters = ['dFR', 'fR', 'nR', 'hFR', 'tR']; var stateKeys = shortener.ENCODED_PARAMETERS; function sortQueryStringValues(prefixRegexp, invertedMapping, a, b) { if (prefixRegexp !== null) { a = a.replace(prefixRegexp, ''); b = b.replace(prefixRegexp, ''); } a = invertedMapping[a] || a; b = invertedMapping[b] || b; if (stateKeys.indexOf(a) !== -1 || stateKeys.indexOf(b) !== -1) { if (a === 'q') return -1; if (b === 'q') return 1; var isARefinements = refinementsParameters.indexOf(a) !== -1; var isBRefinements = refinementsParameters.indexOf(b) !== -1; if (isARefinements && !isBRefinements) { return 1; } else if (isBRefinements && !isARefinements) { return -1; } } return a.localeCompare(b); } /** * Read a query string and return an object containing the state * @param {string} queryString the query string that will be decoded * @param {object} [options] accepted options : * - prefix : the prefix used for the saved attributes, you have to provide the * same that was used for serialization * - mapping : map short attributes to another value e.g. {q: 'query'} * @return {object} partial search parameters object (same properties than in the * SearchParameters but not exhaustive) */ exports.getStateFromQueryString = function(queryString, options) { var prefixForParameters = options && options.prefix || ''; var mapping = options && options.mapping || {}; var invertedMapping = invert(mapping); var partialStateWithPrefix = qs.parse(queryString); var prefixRegexp = new RegExp('^' + prefixForParameters); var partialState = mapKeys( partialStateWithPrefix, function(v, k) { var hasPrefix = prefixForParameters && prefixRegexp.test(k); var unprefixedKey = hasPrefix ? k.replace(prefixRegexp, '') : k; var decodedKey = shortener.decode(invertedMapping[unprefixedKey] || unprefixedKey); return decodedKey || unprefixedKey; } ); var partialStateWithParsedNumbers = SearchParameters._parseNumbers(partialState); return pick(partialStateWithParsedNumbers, SearchParameters.PARAMETERS); }; /** * Retrieve an object of all the properties that are not understandable as helper * parameters. * @param {string} queryString the query string to read * @param {object} [options] the options * - prefixForParameters : prefix used for the helper configuration keys * - mapping : map short attributes to another value e.g. {q: 'query'} * @return {object} the object containing the parsed configuration that doesn't * to the helper */ exports.getUnrecognizedParametersInQueryString = function(queryString, options) { var prefixForParameters = options && options.prefix; var mapping = options && options.mapping || {}; var invertedMapping = invert(mapping); var foreignConfig = {}; var config = qs.parse(queryString); if (prefixForParameters) { var prefixRegexp = new RegExp('^' + prefixForParameters); forEach(config, function(v, key) { if (!prefixRegexp.test(key)) foreignConfig[key] = v; }); } else { forEach(config, function(v, key) { if (!shortener.decode(invertedMapping[key] || key)) foreignConfig[key] = v; }); } return foreignConfig; }; /** * Generate a query string for the state passed according to the options * @param {SearchParameters} state state to serialize * @param {object} [options] May contain the following parameters : * - prefix : prefix in front of the keys * - mapping : map short attributes to another value e.g. {q: 'query'} * - moreAttributes : more values to be added in the query string. Those values * won't be prefixed. * - safe : get safe urls for use in emails, chat apps or any application auto linking urls. * All parameters and values will be encoded in a way that it's safe to share them. * Default to false for legacy reasons () * @return {string} the query string */ exports.getQueryStringFromState = function(state, options) { var moreAttributes = options && options.moreAttributes; var prefixForParameters = options && options.prefix || ''; var mapping = options && options.mapping || {}; var safe = options && options.safe || false; var invertedMapping = invert(mapping); var stateForUrl = safe ? state : recursiveEncode(state); var encodedState = mapKeys( stateForUrl, function(v, k) { var shortK = shortener.encode(k); return prefixForParameters + (mapping[shortK] || shortK); } ); var prefixRegexp = prefixForParameters === '' ? null : new RegExp('^' + prefixForParameters); var sort = bind(sortQueryStringValues, null, prefixRegexp, invertedMapping); if (!isEmpty(moreAttributes)) { var stateQs = qs.stringify(encodedState, {encode: safe, sort: sort}); var moreQs = qs.stringify(moreAttributes, {encode: safe}); if (!stateQs) return moreQs; return stateQs + '&' + moreQs; } return qs.stringify(encodedState, {encode: safe, sort: sort}); }; /***/ }), /* 206 */ /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__(167), createInverter = __webpack_require__(319), identity = __webpack_require__(26); /** * Creates an object composed of the inverted keys and values of `object`. * If `object` contains duplicate values, subsequent values overwrite * property assignments of previous values. * * @static * @memberOf _ * @since 0.7.0 * @category Object * @param {Object} object The object to invert. * @returns {Object} Returns the new inverted object. * @example * * var object = { 'a': 1, 'b': 2, 'c': 1 }; * * _.invert(object); * // => { '1': 'c', '2': 'b' } */ var invert = createInverter(function(result, value, key) { result[value] = key; }, constant(identity)); module.exports = invert; /***/ }), /* 207 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; module.exports = { 'default': 'RFC3986', formatters: { RFC1738: function (value) { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { return value; } }, RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; /***/ }), /* 208 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = '2.21.1'; /***/ }), /* 209 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _indexUtils = __webpack_require__(5); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * connectRange connector provides the logic to create connected * components that will give the ability for a user to refine results using * a numeric range. * @name connectRange * @kind connector * @requirements The attribute passed to the `attributeName` prop must be holding numerical values. * @propType {string} attributeName - Name of the attribute for faceting * @propType {{min: number, max: number}} [defaultRefinement] - Default searchState of the widget containing the start and the end of the range. * @propType {number} [min] - Minimum value. When this isn't set, the minimum value will be automatically computed by Algolia using the data in the index. * @propType {number} [max] - Maximum value. When this isn't set, the maximum value will be automatically computed by Algolia using the data in the index. * @providedPropType {function} refine - a function to select a range. * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied */ function getId(props) { return props.attributeName; } var namespace = 'range'; function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), {}, function (currentRefinement) { var min = currentRefinement.min, max = currentRefinement.max; if (typeof min === 'string') { min = parseInt(min, 10); } if (typeof max === 'string') { max = parseInt(max, 10); } return { min: min, max: max }; }); } function _refine(props, searchState, nextRefinement, context) { if (!isFinite(nextRefinement.min) || !isFinite(nextRefinement.max)) { throw new Error("You can't provide non finite values to the range connector"); } var id = getId(props); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaRange', propTypes: { id: _propTypes2.default.string, attributeName: _propTypes2.default.string.isRequired, defaultRefinement: _propTypes2.default.shape({ min: _propTypes2.default.number.isRequired, max: _propTypes2.default.number.isRequired }), min: _propTypes2.default.number, max: _propTypes2.default.number }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var attributeName = props.attributeName; var min = props.min, max = props.max; var hasMin = typeof min !== 'undefined'; var hasMax = typeof max !== 'undefined'; var results = (0, _indexUtils.getResults)(searchResults, this.context); if (!hasMin || !hasMax) { if (!results) { return { canRefine: false }; } var stats = results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null; if (!stats) { return { canRefine: false }; } if (!hasMin) { min = stats.min; } if (!hasMax) { max = stats.max; } } var count = results ? results.getFacetValues(attributeName).map(function (v) { return { value: v.name, count: v.count }; }) : []; var _getCurrentRefinement = getCurrentRefinement(props, searchState, this.context), _getCurrentRefinement2 = _getCurrentRefinement.min, valueMin = _getCurrentRefinement2 === undefined ? min : _getCurrentRefinement2, _getCurrentRefinement3 = _getCurrentRefinement.max, valueMax = _getCurrentRefinement3 === undefined ? max : _getCurrentRefinement3; return { min: min, max: max, currentRefinement: { min: valueMin, max: valueMax }, count: count, canRefine: count.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(params, props, searchState) { var attributeName = props.attributeName; var currentRefinement = getCurrentRefinement(props, searchState, this.context); params = params.addDisjunctiveFacet(attributeName); var min = currentRefinement.min, max = currentRefinement.max; if (typeof min !== 'undefined') { params = params.addNumericRefinement(attributeName, '>=', min); } if (typeof max !== 'undefined') { params = params.addNumericRefinement(attributeName, '<=', max); } return params; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId(props); var currentRefinement = getCurrentRefinement(props, searchState, this.context); var item = void 0; var hasMin = typeof currentRefinement.min !== 'undefined'; var hasMax = typeof currentRefinement.max !== 'undefined'; if (hasMin || hasMax) { var itemLabel = ''; if (hasMin) { itemLabel += currentRefinement.min + ' <= '; } itemLabel += props.attributeName; if (hasMax) { itemLabel += ' <= ' + currentRefinement.max; } item = { label: itemLabel, currentRefinement: currentRefinement, attributeName: props.attributeName, value: function value(nextState) { return _cleanUp(props, nextState, _this.context); } }; } return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: item ? [item] : [] }; } }); /***/ }), /* 210 */, /* 211 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectCurrentRefinements connector provides the logic to build a widget that will * give the user the ability to remove all or some of the filters that were * set. * @name connectCurrentRefinements * @kind connector * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @propType {function} [clearsQuery=false] - Pass true to also clear the search query * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {array.<{label: string, attributeName: string, currentRefinement: string || object, items: array, value: function}>} items - all the filters, the `value` is to pass to the `refine` function for removing all currentrefinements, `label` is for the display. When existing several refinements for the same atribute name, then you get a nested `items` object that contains a `label` and a `value` function to use to remove a single filter. `attributeName` and `currentRefinement` are metadata containing row values. * @providedPropType {string} query - the search query */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaCurrentRefinements', propTypes: { transformItems: _propTypes2.default.func }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata) { var items = metadata.reduce(function (res, meta) { if (typeof meta.items !== 'undefined') { if (!props.clearsQuery && meta.id === 'query') { return res; } else { if (props.clearsQuery && meta.id === 'query' && meta.items[0].currentRefinement === '') { return res; } return res.concat(meta.items); } } return res; }, []); return { items: props.transformItems ? props.transformItems(items) : items, canRefine: items.length > 0 }; }, refine: function refine(props, searchState, items) { // `value` corresponds to our internal clear function computed in each connector metadata. var refinementsToClear = items instanceof Array ? items.map(function (item) { return item.value; }) : [items]; return refinementsToClear.reduce(function (res, clear) { return clear(res); }, searchState); } }); /***/ }), /* 212 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var AlgoliaSearchHelper = __webpack_require__(248); var SearchParameters = __webpack_require__(100); var SearchResults = __webpack_require__(190); /** * The algoliasearchHelper module is the function that will let its * contains everything needed to use the Algoliasearch * Helper. It is a also a function that instanciate the helper. * To use the helper, you also need the Algolia JS client v3. * @example * //using the UMD build * var client = algoliasearch('latency', '6be0576ff61c053d5f9a3225e2a90f76'); * var helper = algoliasearchHelper(client, 'bestbuy', { * facets: ['shipping'], * disjunctiveFacets: ['category'] * }); * helper.on('result', function(result) { * console.log(result); * }); * helper.toggleRefine('Movies & TV Shows') * .toggleRefine('Free shipping') * .search(); * @example * // The helper is an event emitter using the node API * helper.on('result', updateTheResults); * helper.once('result', updateTheResults); * helper.removeListener('result', updateTheResults); * helper.removeAllListeners('result'); * @module algoliasearchHelper * @param {AlgoliaSearch} client an AlgoliaSearch client * @param {string} index the name of the index to query * @param {SearchParameters|object} opts an object defining the initial config of the search. It doesn't have to be a {SearchParameters}, just an object containing the properties you need from it. * @return {AlgoliaSearchHelper} */ function algoliasearchHelper(client, index, opts) { return new AlgoliaSearchHelper(client, index, opts); } /** * The version currently used * @member module:algoliasearchHelper.version * @type {number} */ algoliasearchHelper.version = __webpack_require__(208); /** * Constructor for the Helper. * @member module:algoliasearchHelper.AlgoliaSearchHelper * @type {AlgoliaSearchHelper} */ algoliasearchHelper.AlgoliaSearchHelper = AlgoliaSearchHelper; /** * Constructor for the object containing all the parameters of the search. * @member module:algoliasearchHelper.SearchParameters * @type {SearchParameters} */ algoliasearchHelper.SearchParameters = SearchParameters; /** * Constructor for the object containing the results of the search. * @member module:algoliasearchHelper.SearchResults * @type {SearchResults} */ algoliasearchHelper.SearchResults = SearchResults; /** * URL tools to generate query string and parse them from/into * SearchParameters * @member module:algoliasearchHelper.url * @type {object} {@link url} * */ algoliasearchHelper.url = __webpack_require__(205); module.exports = algoliasearchHelper; /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { var toNumber = __webpack_require__(265); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_INTEGER = 1.7976931348623157e+308; /** * Converts `value` to a finite number. * * @static * @memberOf _ * @since 4.12.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted number. * @example * * _.toFinite(3.2); * // => 3.2 * * _.toFinite(Number.MIN_VALUE); * // => 5e-324 * * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * * _.toFinite('3.2'); * // => 3.2 */ function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; } module.exports = toFinite; /***/ }), /* 214 */ /***/ (function(module, exports, __webpack_require__) { var isNumber = __webpack_require__(184); /** * Checks if `value` is `NaN`. * * **Note:** This method is based on * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for * `undefined` and other non-number values. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. * @example * * _.isNaN(NaN); * // => true * * _.isNaN(new Number(NaN)); * // => true * * isNaN(undefined); * // => true * * _.isNaN(undefined); * // => false */ function isNaN(value) { // An `NaN` primitive is the only value that is not equal to itself. // Perform the `toStringTag` check first to avoid errors with some // ActiveX objects in IE. return isNumber(value) && value != +value; } module.exports = isNaN; /***/ }), /* 215 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(18), isArrayLike = __webpack_require__(11), isIndex = __webpack_require__(32), isObject = __webpack_require__(6); /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq(object[index], value); } return false; } module.exports = isIterateeCall; /***/ }), /* 216 */, /* 217 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _highlight = __webpack_require__(330); var _highlight2 = _interopRequireDefault(_highlight); var _highlightTags = __webpack_require__(218); var _highlightTags2 = _interopRequireDefault(_highlightTags); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var highlight = function highlight(_ref) { var attributeName = _ref.attributeName, hit = _ref.hit, highlightProperty = _ref.highlightProperty; return (0, _highlight2.default)({ attributeName: attributeName, hit: hit, preTag: _highlightTags2.default.highlightPreTag, postTag: _highlightTags2.default.highlightPostTag, highlightProperty: highlightProperty }); }; /** * connectHighlight connector provides the logic to create an highlighter * component that will retrieve, parse and render an highlighted attribute * from an Algolia hit. * @name connectHighlight * @kind connector * @category connector * @providedPropType {function} highlight - the function to retrieve and parse an attribute from a hit. It takes a configuration object with 3 attribute: `highlightProperty` which is the property that contains the highlight structure from the records, `attributeName` which is the name of the attribute to look for and `hit` which is the hit from Algolia. It returns an array of object `{value: string, isHighlighted: boolean}`. * @example * import React from 'react'; * import { connectHighlight } from 'react-instantsearch/connectors'; * import { InstantSearch, Hits } from 'react-instantsearch/dom'; * * const CustomHighlight = connectHighlight( * ({ highlight, attributeName, hit, highlightProperty }) => { * const parsedHit = highlight({ attributeName, hit, highlightProperty: '_highlightResult' }); * const highlightedHits = parsedHit.map(part => { * if (part.isHighlighted) return <mark>{part.value}</mark>; * return part.value; * }); * return <div>{highlightedHits}</div>; * } * ); * * const Hit = ({hit}) => * <p> * <CustomHighlight attributeName="description" hit={hit} /> * </p>; * * export default function App() { * return ( * <InstantSearch * appId="latency" * apiKey="6be0576ff61c053d5f9a3225e2a90f76" * indexName="ikea"> * <Hits hitComponent={Hit} /> * </InstantSearch> * ); * } */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaHighlighter', propTypes: {}, getProvidedProps: function getProvidedProps() { return { highlight: highlight }; } }); /***/ }), /* 218 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { highlightPreTag: "<ais-highlight>", highlightPostTag: "</ais-highlight>" }; /***/ }), /* 219 */, /* 220 */, /* 221 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _keys2 = __webpack_require__(9); var _keys3 = _interopRequireDefault(_keys2); var _difference2 = __webpack_require__(222); var _difference3 = _interopRequireDefault(_difference2); var _omit2 = __webpack_require__(34); var _omit3 = _interopRequireDefault(_omit2); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'configure'; } exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaConfigure', getProvidedProps: function getProvidedProps() { return {}; }, getSearchParameters: function getSearchParameters(searchParameters, props) { var items = (0, _omit3.default)(props, 'children'); return searchParameters.setQueryParameters(items); }, transitionState: function transitionState(props, prevSearchState, nextSearchState) { var id = getId(); var items = (0, _omit3.default)(props, 'children'); var nonPresentKeys = this._props ? (0, _difference3.default)((0, _keys3.default)(this._props), (0, _keys3.default)(props)) : []; this._props = props; var nextValue = _defineProperty({}, id, _extends({}, (0, _omit3.default)(nextSearchState[id], nonPresentKeys), items)); return (0, _indexUtils.refineValue)(nextSearchState, nextValue, this.context); }, cleanUp: function cleanUp(props, searchState) { var id = getId(); var index = (0, _indexUtils.getIndex)(this.context); var subState = (0, _indexUtils.hasMultipleIndex)(this.context) && searchState.indices ? searchState.indices[index] : searchState; var configureKeys = subState && subState[id] ? Object.keys(subState[id]) : []; var configureState = configureKeys.reduce(function (acc, item) { if (!props[item]) { acc[item] = subState[id][item]; } return acc; }, {}); var nextValue = _defineProperty({}, id, configureState); return (0, _indexUtils.refineValue)(searchState, nextValue, this.context); } }); /***/ }), /* 222 */ /***/ (function(module, exports, __webpack_require__) { var baseDifference = __webpack_require__(223), baseFlatten = __webpack_require__(165), baseRest = __webpack_require__(25), isArrayLikeObject = __webpack_require__(94); /** * Creates an array of `array` values not included in the other given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. The order and references of result values are * determined by the first array. * * **Note:** Unlike `_.pullAll`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. * @see _.without, _.xor * @example * * _.difference([2, 1], [2, 3]); * // => [1] */ var difference = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; }); module.exports = difference; /***/ }), /* 223 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(60), arrayIncludes = __webpack_require__(92), arrayIncludesWith = __webpack_require__(164), arrayMap = __webpack_require__(12), baseUnary = __webpack_require__(43), cacheHas = __webpack_require__(61); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * The base implementation of methods like `_.difference` without support * for excluding multiple arrays or iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Array} values The values to exclude. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of filtered values. */ function baseDifference(array, values, iteratee, comparator) { var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; if (!length) { return result; } if (iteratee) { values = arrayMap(values, baseUnary(iteratee)); } if (comparator) { includes = arrayIncludesWith; isCommon = false; } else if (values.length >= LARGE_ARRAY_SIZE) { includes = cacheHas; isCommon = false; values = new SetCache(values); } outer: while (++index < length) { var value = array[index], computed = iteratee == null ? value : iteratee(value); value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var valuesIndex = valuesLength; while (valuesIndex--) { if (values[valuesIndex] === computed) { continue outer; } } result.push(value); } else if (!includes(values, computed, comparator)) { result.push(value); } } return result; } module.exports = baseDifference; /***/ }), /* 224 */ /***/ (function(module, exports) { /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } module.exports = baseIsNaN; /***/ }), /* 225 */ /***/ (function(module, exports) { /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; /***/ }), /* 226 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(15), isArguments = __webpack_require__(20), isArray = __webpack_require__(0); /** Built-in value references. */ var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; /***/ }), /* 227 */ /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__(167), defineProperty = __webpack_require__(168), identity = __webpack_require__(26); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; module.exports = baseSetToString; /***/ }), /* 228 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(39), arrayEach = __webpack_require__(95), assignValue = __webpack_require__(96), baseAssign = __webpack_require__(229), baseAssignIn = __webpack_require__(230), cloneBuffer = __webpack_require__(170), copyArray = __webpack_require__(69), copySymbols = __webpack_require__(233), copySymbolsIn = __webpack_require__(234), getAllKeys = __webpack_require__(85), getAllKeysIn = __webpack_require__(97), getTag = __webpack_require__(57), initCloneArray = __webpack_require__(235), initCloneByTag = __webpack_require__(236), initCloneObject = __webpack_require__(173), isArray = __webpack_require__(0), isBuffer = __webpack_require__(21), isObject = __webpack_require__(6), keys = __webpack_require__(9); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', 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]'; /** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, baseClone, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } module.exports = baseClone; /***/ }), /* 229 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(27), keys = __webpack_require__(9); /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } module.exports = baseAssign; /***/ }), /* 230 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(27), keysIn = __webpack_require__(48); /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } module.exports = baseAssignIn; /***/ }), /* 231 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(6), isPrototype = __webpack_require__(38), nativeKeysIn = __webpack_require__(232); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /* 232 */ /***/ (function(module, exports) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /* 233 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(27), getSymbols = __webpack_require__(63); /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } module.exports = copySymbols; /***/ }), /* 234 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(27), getSymbolsIn = __webpack_require__(171); /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } module.exports = copySymbolsIn; /***/ }), /* 235 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } module.exports = initCloneArray; /***/ }), /* 236 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(98), cloneDataView = __webpack_require__(237), cloneMap = __webpack_require__(238), cloneRegExp = __webpack_require__(240), cloneSet = __webpack_require__(241), cloneSymbol = __webpack_require__(243), cloneTypedArray = __webpack_require__(172); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', 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]'; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, cloneFunc, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return cloneMap(object, isDeep, cloneFunc); case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return cloneSet(object, isDeep, cloneFunc); case symbolTag: return cloneSymbol(object); } } module.exports = initCloneByTag; /***/ }), /* 237 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(98); /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } module.exports = cloneDataView; /***/ }), /* 238 */ /***/ (function(module, exports, __webpack_require__) { var addMapEntry = __webpack_require__(239), arrayReduce = __webpack_require__(99), mapToArray = __webpack_require__(83); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1; /** * Creates a clone of `map`. * * @private * @param {Object} map The map to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned map. */ function cloneMap(map, isDeep, cloneFunc) { var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); return arrayReduce(array, addMapEntry, new map.constructor); } module.exports = cloneMap; /***/ }), /* 239 */ /***/ (function(module, exports) { /** * Adds the key-value `pair` to `map`. * * @private * @param {Object} map The map to modify. * @param {Array} pair The key-value pair to add. * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } module.exports = addMapEntry; /***/ }), /* 240 */ /***/ (function(module, exports) { /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } module.exports = cloneRegExp; /***/ }), /* 241 */ /***/ (function(module, exports, __webpack_require__) { var addSetEntry = __webpack_require__(242), arrayReduce = __webpack_require__(99), setToArray = __webpack_require__(84); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1; /** * Creates a clone of `set`. * * @private * @param {Object} set The set to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned set. */ function cloneSet(set, isDeep, cloneFunc) { var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); return arrayReduce(array, addSetEntry, new set.constructor); } module.exports = cloneSet; /***/ }), /* 242 */ /***/ (function(module, exports) { /** * Adds `value` to `set`. * * @private * @param {Object} set The set to modify. * @param {*} value The value to add. * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } module.exports = addSetEntry; /***/ }), /* 243 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(15); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } module.exports = cloneSymbol; /***/ }), /* 244 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(22), last = __webpack_require__(174), parent = __webpack_require__(245), toKey = __webpack_require__(24); /** * The base implementation of `_.unset`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset(object, path) { path = castPath(path, object); object = parent(object, path); return object == null || delete object[toKey(last(path))]; } module.exports = baseUnset; /***/ }), /* 245 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(71), baseSlice = __webpack_require__(175); /** * Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ function parent(object, path) { return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } module.exports = parent; /***/ }), /* 246 */ /***/ (function(module, exports, __webpack_require__) { var isPlainObject = __webpack_require__(45); /** * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain * objects. * * @private * @param {*} value The value to inspect. * @param {string} key The key of the property to inspect. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ function customOmitClone(value) { return isPlainObject(value) ? undefined : value; } module.exports = customOmitClone; /***/ }), /* 247 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getId = undefined; var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _algoliasearchHelper = __webpack_require__(212); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var getId = exports.getId = function getId(props) { return props.attributes[0]; }; var namespace = 'hierarchicalMenu'; function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), null, function (currentRefinement) { if (currentRefinement === '') { return null; } return currentRefinement; }); } function getValue(path, props, searchState, context) { var id = props.id, attributes = props.attributes, separator = props.separator, rootPath = props.rootPath, showParentLevel = props.showParentLevel; var currentRefinement = getCurrentRefinement(props, searchState, context); var nextRefinement = void 0; if (currentRefinement === null) { nextRefinement = path; } else { var tmpSearchParameters = new _algoliasearchHelper.SearchParameters({ hierarchicalFacets: [{ name: id, attributes: attributes, separator: separator, rootPath: rootPath, showParentLevel: showParentLevel }] }); nextRefinement = tmpSearchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement).toggleHierarchicalFacetRefinement(id, path).getHierarchicalRefinement(id)[0]; } return nextRefinement; } function transformValue(value, limit, props, searchState, context) { return value.slice(0, limit).map(function (v) { return { label: v.name, value: getValue(v.path, props, searchState, context), count: v.count, isRefined: v.isRefined, items: v.data && transformValue(v.data, limit, props, searchState, context) }; }); } function _refine(props, searchState, nextRefinement, context) { var id = getId(props); var nextValue = _defineProperty({}, id, nextRefinement || ''); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } var sortBy = ['name:asc']; /** * connectHierarchicalMenu connector provides the logic to build a widget that will * give the user the ability to explore a tree-like structure. * This is commonly used for multi-level categorization of products on e-commerce * websites. From a UX point of view, we suggest not displaying more than two levels deep. * @name connectHierarchicalMenu * @requirements To use this widget, your attributes must be formatted in a specific way. * If you want for example to have a hiearchical menu of categories, objects in your index * should be formatted this way: * * ```json * { * "categories.lvl0": "products", * "categories.lvl1": "products > fruits", * "categories.lvl2": "products > fruits > citrus" * } * ``` * * It's also possible to provide more than one path for each level: * * ```json * { * "categories.lvl0": ["products", "goods"], * "categories.lvl1": ["products > fruits", "goods > to eat"] * } * ``` * * All attributes passed to the `attributes` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * * @kind connector * @propType {string} attributes - List of attributes to use to generate the hierarchy of the menu. See the example for the convention to follow. * @propType {string} [defaultRefinement] - the item value selected by default * @propType {boolean} [showMore=false] - Flag to activate the show more button, for toggling the number of items between limitMin and limitMax. * @propType {number} [limitMin=10] - The maximum number of items displayed. * @propType {number} [limitMax=20] - The maximum number of items displayed when the user triggers the show more. Not considered if `showMore` is false. * @propType {string} [separator='>'] - Specifies the level separator used in the data. * @propType {string[]} [rootPath=null] - The already selected and hidden path. * @propType {boolean} [showParentLevel=true] - Flag to set if the parent level should be displayed. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{items: object, count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the HierarchicalMenu can display. items has the same shape as parent items. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaHierarchicalMenu', propTypes: { attributes: function attributes(props, propName, componentName) { var isNotString = function isNotString(val) { return typeof val !== 'string'; }; if (!Array.isArray(props[propName]) || props[propName].some(isNotString) || props[propName].length < 1) { return new Error('Invalid prop ' + propName + ' supplied to ' + componentName + '. Expected an Array of Strings'); } return undefined; }, separator: _propTypes2.default.string, rootPath: _propTypes2.default.string, showParentLevel: _propTypes2.default.bool, defaultRefinement: _propTypes2.default.string, showMore: _propTypes2.default.bool, limitMin: _propTypes2.default.number, limitMax: _propTypes2.default.number, transformItems: _propTypes2.default.func }, defaultProps: { showMore: false, limitMin: 10, limitMax: 20, separator: ' > ', rootPath: null, showParentLevel: true }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var id = getId(props); var results = (0, _indexUtils.getResults)(searchResults, this.context); var isFacetPresent = Boolean(results) && Boolean(results.getFacetByName(id)); if (!isFacetPresent) { return { items: [], currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: false }; } var limit = showMore ? limitMax : limitMin; var value = results.getFacetValues(id, { sortBy: sortBy }); var items = value.data ? transformValue(value.data, limit, props, searchState, this.context) : []; return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: items.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributes = props.attributes, separator = props.separator, rootPath = props.rootPath, showParentLevel = props.showParentLevel, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var id = getId(props); var limit = showMore ? limitMax : limitMin; searchParameters = searchParameters.addHierarchicalFacet({ name: id, attributes: attributes, separator: separator, rootPath: rootPath, showParentLevel: showParentLevel }).setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit) }); var currentRefinement = getCurrentRefinement(props, searchState, this.context); if (currentRefinement !== null) { searchParameters = searchParameters.toggleHierarchicalFacetRefinement(id, currentRefinement); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var rootAttribute = props.attributes[0]; var id = getId(props); var currentRefinement = getCurrentRefinement(props, searchState, this.context); return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: !currentRefinement ? [] : [{ label: rootAttribute + ': ' + currentRefinement, attributeName: rootAttribute, value: function value(nextState) { return _refine(props, nextState, '', _this.context); }, currentRefinement: currentRefinement }] }; } }); /***/ }), /* 248 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var SearchParameters = __webpack_require__(100); var SearchResults = __webpack_require__(190); var DerivedHelper = __webpack_require__(314); var requestBuilder = __webpack_require__(317); var util = __webpack_require__(203); var events = __webpack_require__(204); var flatten = __webpack_require__(177); var forEach = __webpack_require__(36); var isEmpty = __webpack_require__(14); var map = __webpack_require__(17); var url = __webpack_require__(205); var version = __webpack_require__(208); /** * Event triggered when a parameter is set or updated * @event AlgoliaSearchHelper#event:change * @property {SearchParameters} state the current parameters with the latest changes applied * @property {SearchResults} lastResults the previous results received from Algolia. `null` before * the first request * @example * helper.on('change', function(state, lastResults) { * console.log('The parameters have changed'); * }); */ /** * Event triggered when a main search is sent to Algolia * @event AlgoliaSearchHelper#event:search * @property {SearchParameters} state the parameters used for this search * @property {SearchResults} lastResults the results from the previous search. `null` if * it is the first search. * @example * helper.on('search', function(state, lastResults) { * console.log('Search sent'); * }); */ /** * Event triggered when a search using `searchForFacetValues` is sent to Algolia * @event AlgoliaSearchHelper#event:searchForFacetValues * @property {SearchParameters} state the parameters used for this search * it is the first search. * @property {string} facet the facet searched into * @property {string} query the query used to search in the facets * @example * helper.on('searchForFacetValues', function(state, facet, query) { * console.log('searchForFacetValues sent'); * }); */ /** * Event triggered when a search using `searchOnce` is sent to Algolia * @event AlgoliaSearchHelper#event:searchOnce * @property {SearchParameters} state the parameters used for this search * it is the first search. * @example * helper.on('searchOnce', function(state) { * console.log('searchOnce sent'); * }); */ /** * Event triggered when the results are retrieved from Algolia * @event AlgoliaSearchHelper#event:result * @property {SearchResults} results the results received from Algolia * @property {SearchParameters} state the parameters used to query Algolia. Those might * be different from the one in the helper instance (for example if the network is unreliable). * @example * helper.on('result', function(results, state) { * console.log('Search results received'); * }); */ /** * Event triggered when Algolia sends back an error. For example, if an unknown parameter is * used, the error can be caught using this event. * @event AlgoliaSearchHelper#event:error * @property {Error} error the error returned by the Algolia. * @example * helper.on('error', function(error) { * console.log('Houston we got a problem.'); * }); */ /** * Event triggered when the queue of queries have been depleted (with any result or outdated queries) * @event AlgoliaSearchHelper#event:searchQueueEmpty * @example * helper.on('searchQueueEmpty', function() { * console.log('No more search pending'); * // This is received before the result event if we're not expecting new results * }); * * helper.search(); */ /** * Initialize a new AlgoliaSearchHelper * @class * @classdesc The AlgoliaSearchHelper is a class that ease the management of the * search. It provides an event based interface for search callbacks: * - change: when the internal search state is changed. * This event contains a {@link SearchParameters} object and the * {@link SearchResults} of the last result if any. * - search: when a search is triggered using the `search()` method. * - result: when the response is retrieved from Algolia and is processed. * This event contains a {@link SearchResults} object and the * {@link SearchParameters} corresponding to this answer. * - error: when the response is an error. This event contains the error returned by the server. * @param {AlgoliaSearch} client an AlgoliaSearch client * @param {string} index the index name to query * @param {SearchParameters | object} options an object defining the initial * config of the search. It doesn't have to be a {SearchParameters}, * just an object containing the properties you need from it. */ function AlgoliaSearchHelper(client, index, options) { if (!client.addAlgoliaAgent) console.log('Please upgrade to the newest version of the JS Client.'); // eslint-disable-line else if (!doesClientAgentContainsHelper(client)) client.addAlgoliaAgent('JS Helper ' + version); this.setClient(client); var opts = options || {}; opts.index = index; this.state = SearchParameters.make(opts); this.lastResults = null; this._queryId = 0; this._lastQueryIdReceived = -1; this.derivedHelpers = []; this._currentNbQueries = 0; } util.inherits(AlgoliaSearchHelper, events.EventEmitter); /** * Start the search with the parameters set in the state. When the * method is called, it triggers a `search` event. The results will * be available through the `result` event. If an error occurs, an * `error` will be fired instead. * @return {AlgoliaSearchHelper} * @fires search * @fires result * @fires error * @chainable */ AlgoliaSearchHelper.prototype.search = function() { this._search(); return this; }; /** * Gets the search query parameters that would be sent to the Algolia Client * for the hits * @return {object} Query Parameters */ AlgoliaSearchHelper.prototype.getQuery = function() { var state = this.state; return requestBuilder._getHitsSearchParams(state); }; /** * Start a search using a modified version of the current state. This method does * not trigger the helper lifecycle and does not modify the state kept internally * by the helper. This second aspect means that the next search call will be the * same as a search call before calling searchOnce. * @param {object} options can contain all the parameters that can be set to SearchParameters * plus the index * @param {function} [callback] optional callback executed when the response from the * server is back. * @return {promise|undefined} if a callback is passed the method returns undefined * otherwise it returns a promise containing an object with two keys : * - content with a SearchResults * - state with the state used for the query as a SearchParameters * @example * // Changing the number of records returned per page to 1 * // This example uses the callback API * var state = helper.searchOnce({hitsPerPage: 1}, * function(error, content, state) { * // if an error occurred it will be passed in error, otherwise its value is null * // content contains the results formatted as a SearchResults * // state is the instance of SearchParameters used for this search * }); * @example * // Changing the number of records returned per page to 1 * // This example uses the promise API * var state1 = helper.searchOnce({hitsPerPage: 1}) * .then(promiseHandler); * * function promiseHandler(res) { * // res contains * // { * // content : SearchResults * // state : SearchParameters (the one used for this specific search) * // } * } */ AlgoliaSearchHelper.prototype.searchOnce = function(options, cb) { var tempState = !options ? this.state : this.state.setQueryParameters(options); var queries = requestBuilder._getQueries(tempState.index, tempState); var self = this; this._currentNbQueries++; this.emit('searchOnce', tempState); if (cb) { return this.client.search( queries, function(err, content) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); if (err) cb(err, null, tempState); else cb(err, new SearchResults(tempState, content.results), tempState); } ); } return this.client.search(queries).then(function(content) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); return { content: new SearchResults(tempState, content.results), state: tempState, _originalResponse: content }; }, function(e) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); throw e; }); }; /** * Structure of each result when using * [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues) * @typedef FacetSearchHit * @type {object} * @property {string} value the facet value * @property {string} highlighted the facet value highlighted with the query string * @property {number} count number of occurrence of this facet value * @property {boolean} isRefined true if the value is already refined */ /** * Structure of the data resolved by the * [`searchForFacetValues()`](reference.html#AlgoliaSearchHelper#searchForFacetValues) * promise. * @typedef FacetSearchResult * @type {object} * @property {FacetSearchHit} facetHits the results for this search for facet values * @property {number} processingTimeMS time taken by the query inside the engine */ /** * Search for facet values based on an query and the name of a faceted attribute. This * triggers a search and will return a promise. On top of using the query, it also sends * the parameters from the state so that the search is narrowed down to only the possible values. * * See the description of [FacetSearchResult](reference.html#FacetSearchResult) * @param {string} facet the name of the faceted attribute * @param {string} query the string query for the search * @param {number} maxFacetHits the maximum number values returned. Should be > 0 and <= 100 * @return {promise<FacetSearchResult>} the results of the search */ AlgoliaSearchHelper.prototype.searchForFacetValues = function(facet, query, maxFacetHits) { var state = this.state; var index = this.client.initIndex(this.state.index); var isDisjunctive = state.isDisjunctiveFacet(facet); var algoliaQuery = requestBuilder.getSearchForFacetQuery(facet, query, maxFacetHits, this.state); this._currentNbQueries++; var self = this; this.emit('searchForFacetValues', state, facet, query); return index.searchForFacetValues(algoliaQuery).then(function addIsRefined(content) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); content.facetHits = forEach(content.facetHits, function(f) { f.isRefined = isDisjunctive ? state.isDisjunctiveFacetRefined(facet, f.value) : state.isFacetRefined(facet, f.value); }); return content; }, function(e) { self._currentNbQueries--; if (self._currentNbQueries === 0) self.emit('searchQueueEmpty'); throw e; }); }; /** * Sets the text query used for the search. * * This method resets the current page to 0. * @param {string} q the user query * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setQuery = function(q) { this.state = this.state.setPage(0).setQuery(q); this._change(); return this; }; /** * Remove all the types of refinements except tags. A string can be provided to remove * only the refinements of a specific attribute. For more advanced use case, you can * provide a function instead. This function should follow the * [clearCallback definition](#SearchParameters.clearCallback). * * This method resets the current page to 0. * @param {string} [name] optional name of the facet / attribute on which we want to remove all refinements * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * // Removing all the refinements * helper.clearRefinements().search(); * @example * // Removing all the filters on a the category attribute. * helper.clearRefinements('category').search(); * @example * // Removing only the exclude filters on the category facet. * helper.clearRefinements(function(value, attribute, type) { * return type === 'exclude' && attribute === 'category'; * }).search(); */ AlgoliaSearchHelper.prototype.clearRefinements = function(name) { this.state = this.state.setPage(0).clearRefinements(name); this._change(); return this; }; /** * Remove all the tag filters. * * This method resets the current page to 0. * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.clearTags = function() { this.state = this.state.setPage(0).clearTags(); this._change(); return this; }; /** * Adds a disjunctive filter to a faceted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addDisjunctiveFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).addDisjunctiveFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addDisjunctiveFacetRefinement} */ AlgoliaSearchHelper.prototype.addDisjunctiveRefine = function() { return this.addDisjunctiveFacetRefinement.apply(this, arguments); }; /** * Adds a refinement on a hierarchical facet. It will throw * an exception if the facet is not defined or if the facet * is already refined. * * This method resets the current page to 0. * @param {string} facet the facet name * @param {string} path the hierarchical facet path * @return {AlgoliaSearchHelper} * @throws Error if the facet is not defined or if the facet is refined * @chainable * @fires change */ AlgoliaSearchHelper.prototype.addHierarchicalFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).addHierarchicalFacetRefinement(facet, value); this._change(); return this; }; /** * Adds a an numeric filter to an attribute with the `operator` and `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} attribute the attribute on which the numeric filter applies * @param {string} operator the operator of the filter * @param {number} value the value of the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addNumericRefinement = function(attribute, operator, value) { this.state = this.state.setPage(0).addNumericRefinement(attribute, operator, value); this._change(); return this; }; /** * Adds a filter to a faceted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).addFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetRefinement} */ AlgoliaSearchHelper.prototype.addRefine = function() { return this.addFacetRefinement.apply(this, arguments); }; /** * Adds a an exclusion filter to a faceted attribute with the `value` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value (will be converted to string) * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addFacetExclusion = function(facet, value) { this.state = this.state.setPage(0).addExcludeRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#addFacetExclusion} */ AlgoliaSearchHelper.prototype.addExclude = function() { return this.addFacetExclusion.apply(this, arguments); }; /** * Adds a tag filter with the `tag` provided. If the * filter is already set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} tag the tag to add to the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.addTag = function(tag) { this.state = this.state.setPage(0).addTagRefinement(tag); this._change(); return this; }; /** * Removes an numeric filter to an attribute with the `operator` and `value` provided. If the * filter is not set, it doesn't change the filters. * * Some parameters are optional, triggering different behavior: * - if the value is not provided, then all the numeric value will be removed for the * specified attribute/operator couple. * - if the operator is not provided either, then all the numeric filter on this attribute * will be removed. * * This method resets the current page to 0. * @param {string} attribute the attribute on which the numeric filter applies * @param {string} [operator] the operator of the filter * @param {number} [value] the value of the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeNumericRefinement = function(attribute, operator, value) { this.state = this.state.setPage(0).removeNumericRefinement(attribute, operator, value); this._change(); return this; }; /** * Removes a disjunctive filter to a faceted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeDisjunctiveFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).removeDisjunctiveFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeDisjunctiveFacetRefinement} */ AlgoliaSearchHelper.prototype.removeDisjunctiveRefine = function() { return this.removeDisjunctiveFacetRefinement.apply(this, arguments); }; /** * Removes the refinement set on a hierarchical facet. * @param {string} facet the facet name * @return {AlgoliaSearchHelper} * @throws Error if the facet is not defined or if the facet is not refined * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeHierarchicalFacetRefinement = function(facet) { this.state = this.state.setPage(0).removeHierarchicalFacetRefinement(facet); this._change(); return this; }; /** * Removes a filter to a faceted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).removeFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetRefinement} */ AlgoliaSearchHelper.prototype.removeRefine = function() { return this.removeFacetRefinement.apply(this, arguments); }; /** * Removes an exclusion filter to a faceted attribute with the `value` provided. If the * filter is not set, it doesn't change the filters. * * If the value is omitted, then this method will remove all the filters for the * attribute. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} [value] the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeFacetExclusion = function(facet, value) { this.state = this.state.setPage(0).removeExcludeRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#removeFacetExclusion} */ AlgoliaSearchHelper.prototype.removeExclude = function() { return this.removeFacetExclusion.apply(this, arguments); }; /** * Removes a tag filter with the `tag` provided. If the * filter is not set, it doesn't change the filters. * * This method resets the current page to 0. * @param {string} tag tag to remove from the filter * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.removeTag = function(tag) { this.state = this.state.setPage(0).removeTagRefinement(tag); this._change(); return this; }; /** * Adds or removes an exclusion filter to a faceted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleFacetExclusion = function(facet, value) { this.state = this.state.setPage(0).toggleExcludeFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetExclusion} */ AlgoliaSearchHelper.prototype.toggleExclude = function() { return this.toggleFacetExclusion.apply(this, arguments); }; /** * Adds or removes a filter to a faceted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method can be used for conjunctive, disjunctive and hierarchical filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @throws Error will throw an error if the facet is not declared in the settings of the helper * @fires change * @chainable * @deprecated since version 2.19.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement} */ AlgoliaSearchHelper.prototype.toggleRefinement = function(facet, value) { return this.toggleFacetRefinement(facet, value); }; /** * Adds or removes a filter to a faceted attribute with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method can be used for conjunctive, disjunctive and hierarchical filters. * * This method resets the current page to 0. * @param {string} facet the facet to refine * @param {string} value the associated value * @return {AlgoliaSearchHelper} * @throws Error will throw an error if the facet is not declared in the settings of the helper * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleFacetRefinement = function(facet, value) { this.state = this.state.setPage(0).toggleFacetRefinement(facet, value); this._change(); return this; }; /** * @deprecated since version 2.4.0, see {@link AlgoliaSearchHelper#toggleFacetRefinement} */ AlgoliaSearchHelper.prototype.toggleRefine = function() { return this.toggleFacetRefinement.apply(this, arguments); }; /** * Adds or removes a tag filter with the `value` provided. If * the value is set then it removes it, otherwise it adds the filter. * * This method resets the current page to 0. * @param {string} tag tag to remove or add * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.toggleTag = function(tag) { this.state = this.state.setPage(0).toggleTagRefinement(tag); this._change(); return this; }; /** * Increments the page number by one. * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * helper.setPage(0).nextPage().getPage(); * // returns 1 */ AlgoliaSearchHelper.prototype.nextPage = function() { return this.setPage(this.state.page + 1); }; /** * Decrements the page number by one. * @fires change * @return {AlgoliaSearchHelper} * @chainable * @example * helper.setPage(1).previousPage().getPage(); * // returns 0 */ AlgoliaSearchHelper.prototype.previousPage = function() { return this.setPage(this.state.page - 1); }; /** * @private */ function setCurrentPage(page) { if (page < 0) throw new Error('Page requested below 0.'); this.state = this.state.setPage(page); this._change(); return this; } /** * Change the current page * @deprecated * @param {number} page The page number * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setCurrentPage = setCurrentPage; /** * Updates the current page. * @function * @param {number} page The page number * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setPage = setCurrentPage; /** * Updates the name of the index that will be targeted by the query. * * This method resets the current page to 0. * @param {string} name the index name * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setIndex = function(name) { this.state = this.state.setPage(0).setIndex(name); this._change(); return this; }; /** * Update a parameter of the search. This method reset the page * * The complete list of parameters is available on the * [Algolia website](https://www.algolia.com/doc/rest#query-an-index). * The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts) * or benefit from higher-level APIs (all the kind of filters and facets have their own API) * * This method resets the current page to 0. * @param {string} parameter name of the parameter to update * @param {any} value new value of the parameter * @return {AlgoliaSearchHelper} * @fires change * @chainable * @example * helper.setQueryParameter('hitsPerPage', 20).search(); */ AlgoliaSearchHelper.prototype.setQueryParameter = function(parameter, value) { var newState = this.state.setPage(0).setQueryParameter(parameter, value); if (this.state === newState) return this; this.state = newState; this._change(); return this; }; /** * Set the whole state (warning: will erase previous state) * @param {SearchParameters} newState the whole new state * @return {AlgoliaSearchHelper} * @fires change * @chainable */ AlgoliaSearchHelper.prototype.setState = function(newState) { this.state = new SearchParameters(newState); this._change(); return this; }; /** * Get the current search state stored in the helper. This object is immutable. * @param {string[]} [filters] optional filters to retrieve only a subset of the state * @return {SearchParameters|object} if filters is specified a plain object is * returned containing only the requested fields, otherwise return the unfiltered * state * @example * // Get the complete state as stored in the helper * helper.getState(); * @example * // Get a part of the state with all the refinements on attributes and the query * helper.getState(['query', 'attribute:category']); */ AlgoliaSearchHelper.prototype.getState = function(filters) { if (filters === undefined) return this.state; return this.state.filter(filters); }; /** * DEPRECATED Get part of the state as a query string. By default, the output keys will not * be prefixed and will only take the applied refinements and the query. * @deprecated * @param {object} [options] May contain the following parameters : * * **filters** : possible values are all the keys of the [SearchParameters](#searchparameters), `index` for * the index, all the refinements with `attribute:*` or for some specific attributes with * `attribute:theAttribute` * * **prefix** : prefix in front of the keys * * **moreAttributes** : more values to be added in the query string. Those values * won't be prefixed. * @return {string} the query string */ AlgoliaSearchHelper.prototype.getStateAsQueryString = function getStateAsQueryString(options) { var filters = options && options.filters || ['query', 'attribute:*']; var partialState = this.getState(filters); return url.getQueryStringFromState(partialState, options); }; /** * DEPRECATED Read a query string and return an object containing the state. Use * url module. * @deprecated * @static * @param {string} queryString the query string that will be decoded * @param {object} options accepted options : * - prefix : the prefix used for the saved attributes, you have to provide the * same that was used for serialization * @return {object} partial search parameters object (same properties than in the * SearchParameters but not exhaustive) * @see {@link url#getStateFromQueryString} */ AlgoliaSearchHelper.getConfigurationFromQueryString = url.getStateFromQueryString; /** * DEPRECATED Retrieve an object of all the properties that are not understandable as helper * parameters. Use url module. * @deprecated * @static * @param {string} queryString the query string to read * @param {object} options the options * - prefixForParameters : prefix used for the helper configuration keys * @return {object} the object containing the parsed configuration that doesn't * to the helper */ AlgoliaSearchHelper.getForeignConfigurationInQueryString = url.getUnrecognizedParametersInQueryString; /** * DEPRECATED Overrides part of the state with the properties stored in the provided query * string. * @deprecated * @param {string} queryString the query string containing the informations to url the state * @param {object} options optional parameters : * - prefix : prefix used for the algolia parameters * - triggerChange : if set to true the state update will trigger a change event */ AlgoliaSearchHelper.prototype.setStateFromQueryString = function(queryString, options) { var triggerChange = options && options.triggerChange || false; var configuration = url.getStateFromQueryString(queryString, options); var updatedState = this.state.setQueryParameters(configuration); if (triggerChange) this.setState(updatedState); else this.overrideStateWithoutTriggeringChangeEvent(updatedState); }; /** * Override the current state without triggering a change event. * Do not use this method unless you know what you are doing. (see the example * for a legit use case) * @param {SearchParameters} newState the whole new state * @return {AlgoliaSearchHelper} * @example * helper.on('change', function(state){ * // In this function you might want to find a way to store the state in the url/history * updateYourURL(state) * }) * window.onpopstate = function(event){ * // This is naive though as you should check if the state is really defined etc. * helper.overrideStateWithoutTriggeringChangeEvent(event.state).search() * } * @chainable */ AlgoliaSearchHelper.prototype.overrideStateWithoutTriggeringChangeEvent = function(newState) { this.state = new SearchParameters(newState); return this; }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasRefinements} */ AlgoliaSearchHelper.prototype.isRefined = function(facet, value) { if (this.state.isConjunctiveFacet(facet)) { return this.state.isFacetRefined(facet, value); } else if (this.state.isDisjunctiveFacet(facet)) { return this.state.isDisjunctiveFacetRefined(facet, value); } throw new Error(facet + ' is not properly defined in this helper configuration' + '(use the facets or disjunctiveFacets keys to configure it)'); }; /** * Check if an attribute has any numeric, conjunctive, disjunctive or hierarchical filters. * @param {string} attribute the name of the attribute * @return {boolean} true if the attribute is filtered by at least one value * @example * // hasRefinements works with numeric, conjunctive, disjunctive and hierarchical filters * helper.hasRefinements('price'); // false * helper.addNumericRefinement('price', '>', 100); * helper.hasRefinements('price'); // true * * helper.hasRefinements('color'); // false * helper.addFacetRefinement('color', 'blue'); * helper.hasRefinements('color'); // true * * helper.hasRefinements('material'); // false * helper.addDisjunctiveFacetRefinement('material', 'plastic'); * helper.hasRefinements('material'); // true * * helper.hasRefinements('categories'); // false * helper.toggleFacetRefinement('categories', 'kitchen > knife'); * helper.hasRefinements('categories'); // true * */ AlgoliaSearchHelper.prototype.hasRefinements = function(attribute) { if (!isEmpty(this.state.getNumericRefinements(attribute))) { return true; } else if (this.state.isConjunctiveFacet(attribute)) { return this.state.isFacetRefined(attribute); } else if (this.state.isDisjunctiveFacet(attribute)) { return this.state.isDisjunctiveFacetRefined(attribute); } else if (this.state.isHierarchicalFacet(attribute)) { return this.state.isHierarchicalFacetRefined(attribute); } // there's currently no way to know that the user did call `addNumericRefinement` at some point // thus we cannot distinguish if there once was a numeric refinement that was cleared // so we will return false in every other situations to be consistent // while what we should do here is throw because we did not find the attribute in any type // of refinement return false; }; /** * Check if a value is excluded for a specific faceted attribute. If the value * is omitted then the function checks if there is any excluding refinements. * * @param {string} facet name of the attribute for used for faceting * @param {string} [value] optional value. If passed will test that this value * is filtering the given facet. * @return {boolean} true if refined * @example * helper.isExcludeRefined('color'); // false * helper.isExcludeRefined('color', 'blue') // false * helper.isExcludeRefined('color', 'red') // false * * helper.addFacetExclusion('color', 'red'); * * helper.isExcludeRefined('color'); // true * helper.isExcludeRefined('color', 'blue') // false * helper.isExcludeRefined('color', 'red') // true */ AlgoliaSearchHelper.prototype.isExcluded = function(facet, value) { return this.state.isExcludeRefined(facet, value); }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasRefinements} */ AlgoliaSearchHelper.prototype.isDisjunctiveRefined = function(facet, value) { return this.state.isDisjunctiveFacetRefined(facet, value); }; /** * Check if the string is a currently filtering tag. * @param {string} tag tag to check * @return {boolean} */ AlgoliaSearchHelper.prototype.hasTag = function(tag) { return this.state.isTagRefined(tag); }; /** * @deprecated since 2.4.0, see {@link AlgoliaSearchHelper#hasTag} */ AlgoliaSearchHelper.prototype.isTagRefined = function() { return this.hasTagRefinements.apply(this, arguments); }; /** * Get the name of the currently used index. * @return {string} * @example * helper.setIndex('highestPrice_products').getIndex(); * // returns 'highestPrice_products' */ AlgoliaSearchHelper.prototype.getIndex = function() { return this.state.index; }; function getCurrentPage() { return this.state.page; } /** * Get the currently selected page * @deprecated * @return {number} the current page */ AlgoliaSearchHelper.prototype.getCurrentPage = getCurrentPage; /** * Get the currently selected page * @function * @return {number} the current page */ AlgoliaSearchHelper.prototype.getPage = getCurrentPage; /** * Get all the tags currently set to filters the results. * * @return {string[]} The list of tags currently set. */ AlgoliaSearchHelper.prototype.getTags = function() { return this.state.tagRefinements; }; /** * Get a parameter of the search by its name. It is possible that a parameter is directly * defined in the index dashboard, but it will be undefined using this method. * * The complete list of parameters is * available on the * [Algolia website](https://www.algolia.com/doc/rest#query-an-index). * The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts) * or benefit from higher-level APIs (all the kind of filters have their own API) * @param {string} parameterName the parameter name * @return {any} the parameter value * @example * var hitsPerPage = helper.getQueryParameter('hitsPerPage'); */ AlgoliaSearchHelper.prototype.getQueryParameter = function(parameterName) { return this.state.getQueryParameter(parameterName); }; /** * Get the list of refinements for a given attribute. This method works with * conjunctive, disjunctive, excluding and numerical filters. * * See also SearchResults#getRefinements * * @param {string} facetName attribute name used for faceting * @return {Array.<FacetRefinement|NumericRefinement>} All Refinement are objects that contain a value, and * a type. Numeric also contains an operator. * @example * helper.addNumericRefinement('price', '>', 100); * helper.getRefinements('price'); * // [ * // { * // "value": [ * // 100 * // ], * // "operator": ">", * // "type": "numeric" * // } * // ] * @example * helper.addFacetRefinement('color', 'blue'); * helper.addFacetExclusion('color', 'red'); * helper.getRefinements('color'); * // [ * // { * // "value": "blue", * // "type": "conjunctive" * // }, * // { * // "value": "red", * // "type": "exclude" * // } * // ] * @example * helper.addDisjunctiveFacetRefinement('material', 'plastic'); * // [ * // { * // "value": "plastic", * // "type": "disjunctive" * // } * // ] */ AlgoliaSearchHelper.prototype.getRefinements = function(facetName) { var refinements = []; if (this.state.isConjunctiveFacet(facetName)) { var conjRefinements = this.state.getConjunctiveRefinements(facetName); forEach(conjRefinements, function(r) { refinements.push({ value: r, type: 'conjunctive' }); }); var excludeRefinements = this.state.getExcludeRefinements(facetName); forEach(excludeRefinements, function(r) { refinements.push({ value: r, type: 'exclude' }); }); } else if (this.state.isDisjunctiveFacet(facetName)) { var disjRefinements = this.state.getDisjunctiveRefinements(facetName); forEach(disjRefinements, function(r) { refinements.push({ value: r, type: 'disjunctive' }); }); } var numericRefinements = this.state.getNumericRefinements(facetName); forEach(numericRefinements, function(value, operator) { refinements.push({ value: value, operator: operator, type: 'numeric' }); }); return refinements; }; /** * Return the current refinement for the (attribute, operator) * @param {string} attribute of the record * @param {string} operator applied * @return {number} value of the refinement */ AlgoliaSearchHelper.prototype.getNumericRefinement = function(attribute, operator) { return this.state.getNumericRefinement(attribute, operator); }; /** * Get the current breadcrumb for a hierarchical facet, as an array * @param {string} facetName Hierarchical facet name * @return {array.<string>} the path as an array of string */ AlgoliaSearchHelper.prototype.getHierarchicalFacetBreadcrumb = function(facetName) { return this.state.getHierarchicalFacetBreadcrumb(facetName); }; // /////////// PRIVATE /** * Perform the underlying queries * @private * @return {undefined} * @fires search * @fires result * @fires error */ AlgoliaSearchHelper.prototype._search = function() { var state = this.state; var mainQueries = requestBuilder._getQueries(state.index, state); var states = [{ state: state, queriesCount: mainQueries.length, helper: this }]; this.emit('search', state, this.lastResults); var derivedQueries = map(this.derivedHelpers, function(derivedHelper) { var derivedState = derivedHelper.getModifiedState(state); var queries = requestBuilder._getQueries(derivedState.index, derivedState); states.push({ state: derivedState, queriesCount: queries.length, helper: derivedHelper }); derivedHelper.emit('search', derivedState, derivedHelper.lastResults); return queries; }); var queries = mainQueries.concat(flatten(derivedQueries)); var queryId = this._queryId++; this._currentNbQueries++; this.client.search(queries, this._dispatchAlgoliaResponse.bind(this, states, queryId)); }; /** * Transform the responses as sent by the server and transform them into a user * usable object that merge the results of all the batch requests. It will dispatch * over the different helper + derived helpers (when there are some). * @private * @param {array.<{SearchParameters, AlgoliaQueries, AlgoliaSearchHelper}>} * state state used for to generate the request * @param {number} queryId id of the current request * @param {Error} err error if any, null otherwise * @param {object} content content of the response * @return {undefined} */ AlgoliaSearchHelper.prototype._dispatchAlgoliaResponse = function(states, queryId, err, content) { // FIXME remove the number of outdated queries discarded instead of just one if (queryId < this._lastQueryIdReceived) { // Outdated answer return; } this._currentNbQueries -= (queryId - this._lastQueryIdReceived); this._lastQueryIdReceived = queryId; if (err) { this.emit('error', err); if (this._currentNbQueries === 0) this.emit('searchQueueEmpty'); } else { if (this._currentNbQueries === 0) this.emit('searchQueueEmpty'); var results = content.results; forEach(states, function(s) { var state = s.state; var queriesCount = s.queriesCount; var helper = s.helper; var specificResults = results.splice(0, queriesCount); var formattedResponse = helper.lastResults = new SearchResults(state, specificResults); helper.emit('result', formattedResponse, state); }); } }; AlgoliaSearchHelper.prototype.containsRefinement = function(query, facetFilters, numericFilters, tagFilters) { return query || facetFilters.length !== 0 || numericFilters.length !== 0 || tagFilters.length !== 0; }; /** * Test if there are some disjunctive refinements on the facet * @private * @param {string} facet the attribute to test * @return {boolean} */ AlgoliaSearchHelper.prototype._hasDisjunctiveRefinements = function(facet) { return this.state.disjunctiveRefinements[facet] && this.state.disjunctiveRefinements[facet].length > 0; }; AlgoliaSearchHelper.prototype._change = function() { this.emit('change', this.state, this.lastResults); }; /** * Clears the cache of the underlying Algolia client. * @return {AlgoliaSearchHelper} */ AlgoliaSearchHelper.prototype.clearCache = function() { this.client.clearCache(); return this; }; /** * Updates the internal client instance. If the reference of the clients * are equal then no update is actually done. * @param {AlgoliaSearch} newClient an AlgoliaSearch client * @return {AlgoliaSearchHelper} */ AlgoliaSearchHelper.prototype.setClient = function(newClient) { if (this.client === newClient) return this; if (newClient.addAlgoliaAgent && !doesClientAgentContainsHelper(newClient)) newClient.addAlgoliaAgent('JS Helper ' + version); this.client = newClient; return this; }; /** * Gets the instance of the currently used client. * @return {AlgoliaSearch} */ AlgoliaSearchHelper.prototype.getClient = function() { return this.client; }; /** * Creates an derived instance of the Helper. A derived helper * is a way to request other indices synchronised with the lifecycle * of the main Helper. This mechanism uses the multiqueries feature * of Algolia to aggregate all the requests in a single network call. * * This method takes a function that is used to create a new SearchParameter * that will be used to create requests to Algolia. Those new requests * are created just before the `search` event. The signature of the function * is `SearchParameters -> SearchParameters`. * * This method returns a new DerivedHelper which is an EventEmitter * that fires the same `search`, `result` and `error` events. Those * events, however, will receive data specific to this DerivedHelper * and the SearchParameters that is returned by the call of the * parameter function. * @param {function} fn SearchParameters -> SearchParameters * @return {DerivedHelper} */ AlgoliaSearchHelper.prototype.derive = function(fn) { var derivedHelper = new DerivedHelper(this, fn); this.derivedHelpers.push(derivedHelper); return derivedHelper; }; /** * This method detaches a derived Helper from the main one. Prefer using the one from the * derived helper itself, to remove the event listeners too. * @private * @return {undefined} * @throws Error */ AlgoliaSearchHelper.prototype.detachDerivedHelper = function(derivedHelper) { var pos = this.derivedHelpers.indexOf(derivedHelper); if (pos === -1) throw new Error('Derived helper already detached'); this.derivedHelpers.splice(pos, 1); }; /** * This method returns true if there is currently at least one on-going search. * @return {boolean} true if there is a search pending */ AlgoliaSearchHelper.prototype.hasPendingRequests = function() { return this._currentNbQueries > 0; }; /** * @typedef AlgoliaSearchHelper.NumericRefinement * @type {object} * @property {number[]} value the numbers that are used for filtering this attribute with * the operator specified. * @property {string} operator the faceting data: value, number of entries * @property {string} type will be 'numeric' */ /** * @typedef AlgoliaSearchHelper.FacetRefinement * @type {object} * @property {string} value the string use to filter the attribute * @property {string} type the type of filter: 'conjunctive', 'disjunctive', 'exclude' */ /* * This function tests if the _ua parameter of the client * already contains the JS Helper UA */ function doesClientAgentContainsHelper(client) { // this relies on JS Client internal variable, this might break if implementation changes var currentAgent = client._ua; return !currentAgent ? false : currentAgent.indexOf('JS Helper') !== -1; } module.exports = AlgoliaSearchHelper; /***/ }), /* 249 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(12), baseIntersection = __webpack_require__(250), baseRest = __webpack_require__(25), castArrayLikeObject = __webpack_require__(251); /** * Creates an array of unique values that are included in all given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. The order and references of result values are * determined by the first array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersection([2, 1], [2, 3]); * // => [2] */ var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) : []; }); module.exports = intersection; /***/ }), /* 250 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(60), arrayIncludes = __webpack_require__(92), arrayIncludesWith = __webpack_require__(164), arrayMap = __webpack_require__(12), baseUnary = __webpack_require__(43), cacheHas = __webpack_require__(61); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * The base implementation of methods like `_.intersection`, without support * for iteratee shorthands, that accepts an array of arrays to inspect. * * @private * @param {Array} arrays The arrays to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of shared values. */ function baseIntersection(arrays, iteratee, comparator) { var includes = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = []; while (othIndex--) { var array = arrays[othIndex]; if (othIndex && iteratee) { array = arrayMap(array, baseUnary(iteratee)); } maxLength = nativeMin(array.length, maxLength); caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) ? new SetCache(othIndex && array) : undefined; } array = arrays[0]; var index = -1, seen = caches[0]; outer: while (++index < length && result.length < maxLength) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator) )) { othIndex = othLength; while (--othIndex) { var cache = caches[othIndex]; if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) ) { continue outer; } } if (seen) { seen.push(computed); } result.push(value); } } return result; } module.exports = baseIntersection; /***/ }), /* 251 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLikeObject = __webpack_require__(94); /** * Casts `value` to an empty array if it's not an array like object. * * @private * @param {*} value The value to inspect. * @returns {Array|Object} Returns the cast array-like object. */ function castArrayLikeObject(value) { return isArrayLikeObject(value) ? value : []; } module.exports = castArrayLikeObject; /***/ }), /* 252 */ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(49), castFunction = __webpack_require__(179); /** * Iterates over own enumerable string keyed properties of an object and * invokes `iteratee` for each property. The iteratee is invoked with three * arguments: (value, key, object). Iteratee functions may exit iteration * early by explicitly returning `false`. * * @static * @memberOf _ * @since 0.3.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. * @see _.forOwnRight * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.forOwn(new Foo, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { return object && baseForOwn(object, castFunction(iteratee)); } module.exports = forOwn; /***/ }), /* 253 */ /***/ (function(module, exports) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /* 254 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(11); /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } module.exports = createBaseEach; /***/ }), /* 255 */ /***/ (function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(73); /** * The base implementation of `_.filter` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function baseFilter(collection, predicate) { var result = []; baseEach(collection, function(value, index, collection) { if (predicate(value, index, collection)) { result.push(value); } }); return result; } module.exports = baseFilter; /***/ }), /* 256 */ /***/ (function(module, exports, __webpack_require__) { var baseIsMatch = __webpack_require__(257), getMatchData = __webpack_require__(258), matchesStrictComparable = __webpack_require__(181); /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; /***/ }), /* 257 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(39), baseIsEqual = __webpack_require__(59); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } module.exports = baseIsMatch; /***/ }), /* 258 */ /***/ (function(module, exports, __webpack_require__) { var isStrictComparable = __webpack_require__(180), keys = __webpack_require__(9); /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; /***/ }), /* 259 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(59), get = __webpack_require__(72), hasIn = __webpack_require__(182), isKey = __webpack_require__(64), isStrictComparable = __webpack_require__(180), matchesStrictComparable = __webpack_require__(181), toKey = __webpack_require__(24); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; /***/ }), /* 260 */ /***/ (function(module, exports) { /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }), /* 261 */ /***/ (function(module, exports, __webpack_require__) { var baseProperty = __webpack_require__(262), basePropertyDeep = __webpack_require__(263), isKey = __webpack_require__(64), toKey = __webpack_require__(24); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; /***/ }), /* 262 */ /***/ (function(module, exports) { /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } module.exports = baseProperty; /***/ }), /* 263 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(71); /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; /***/ }), /* 264 */ /***/ (function(module, exports) { /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} accumulator The initial value. * @param {boolean} initAccum Specify using the first or last element of * `collection` as the initial value. * @param {Function} eachFunc The function to iterate over `collection`. * @returns {*} Returns the accumulated value. */ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index, collection) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection); }); return accumulator; } module.exports = baseReduce; /***/ }), /* 265 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(6), isSymbol = __webpack_require__(23); /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = toNumber; /***/ }), /* 266 */ /***/ (function(module, exports, __webpack_require__) { var baseIteratee = __webpack_require__(13), isArrayLike = __webpack_require__(11), keys = __webpack_require__(9); /** * Creates a `_.find` or `_.findLast` function. * * @private * @param {Function} findIndexFunc The function to find the collection index. * @returns {Function} Returns the new find function. */ function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); if (!isArrayLike(collection)) { var iteratee = baseIteratee(predicate, 3); collection = keys(collection); predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } var index = findIndexFunc(collection, predicate, fromIndex); return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } module.exports = createFind; /***/ }), /* 267 */ /***/ (function(module, exports, __webpack_require__) { var baseSlice = __webpack_require__(175); /** * Casts `array` to a slice if it's needed. * * @private * @param {Array} array The array to inspect. * @param {number} start The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the cast slice. */ function castSlice(array, start, end) { var length = array.length; end = end === undefined ? length : end; return (!start && end >= length) ? array : baseSlice(array, start, end); } module.exports = castSlice; /***/ }), /* 268 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(46); /** * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol * that is not found in the character symbols. * * @private * @param {Array} strSymbols The string symbols to inspect. * @param {Array} chrSymbols The character symbols to find. * @returns {number} Returns the index of the last unmatched string symbol. */ function charsEndIndex(strSymbols, chrSymbols) { var index = strSymbols.length; while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} return index; } module.exports = charsEndIndex; /***/ }), /* 269 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(46); /** * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol * that is not found in the character symbols. * * @private * @param {Array} strSymbols The string symbols to inspect. * @param {Array} chrSymbols The character symbols to find. * @returns {number} Returns the index of the first unmatched string symbol. */ function charsStartIndex(strSymbols, chrSymbols) { var index = -1, length = strSymbols.length; while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} return index; } module.exports = charsStartIndex; /***/ }), /* 270 */ /***/ (function(module, exports, __webpack_require__) { var asciiToArray = __webpack_require__(271), hasUnicode = __webpack_require__(272), unicodeToArray = __webpack_require__(273); /** * Converts `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function stringToArray(string) { return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); } module.exports = stringToArray; /***/ }), /* 271 */ /***/ (function(module, exports) { /** * Converts an ASCII `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function asciiToArray(string) { return string.split(''); } module.exports = asciiToArray; /***/ }), /* 272 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsZWJ = '\\u200d'; /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** * Checks if `string` contains Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a symbol is found, else `false`. */ function hasUnicode(string) { return reHasUnicode.test(string); } module.exports = hasUnicode; /***/ }), /* 273 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsAstral = '[' + rsAstralRange + ']', rsCombo = '[' + rsComboRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** * Converts a Unicode `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function unicodeToArray(string) { return string.match(reUnicode) || []; } module.exports = unicodeToArray; /***/ }), /* 274 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(27), createAssigner = __webpack_require__(188), keysIn = __webpack_require__(48); /** * This method is like `_.assignIn` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 * @alias extendWith * @category Object * @param {Object} object The destination object. * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. * @see _.assignWith * @example * * function customizer(objValue, srcValue) { * return _.isUndefined(objValue) ? srcValue : objValue; * } * * var defaults = _.partialRight(_.assignInWith, customizer); * * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { copyObject(source, keysIn(source), object, customizer); }); module.exports = assignInWith; /***/ }), /* 275 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(18); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used by `_.defaults` to customize its `_.assignIn` use to assign properties * of source objects to the destination object for all destination properties * that resolve to `undefined`. * * @private * @param {*} objValue The destination value. * @param {*} srcValue The source value. * @param {string} key The key of the property to assign. * @param {Object} object The parent object of `objValue`. * @returns {*} Returns the value to assign. */ function customDefaultsAssignIn(objValue, srcValue, key, object) { if (objValue === undefined || (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { return srcValue; } return objValue; } module.exports = customDefaultsAssignIn; /***/ }), /* 276 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(39), assignMergeValue = __webpack_require__(189), baseFor = __webpack_require__(178), baseMergeDeep = __webpack_require__(277), isObject = __webpack_require__(6), keysIn = __webpack_require__(48); /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(object[key], srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } module.exports = baseMerge; /***/ }), /* 277 */ /***/ (function(module, exports, __webpack_require__) { var assignMergeValue = __webpack_require__(189), cloneBuffer = __webpack_require__(170), cloneTypedArray = __webpack_require__(172), copyArray = __webpack_require__(69), initCloneObject = __webpack_require__(173), isArguments = __webpack_require__(20), isArray = __webpack_require__(0), isArrayLikeObject = __webpack_require__(94), isBuffer = __webpack_require__(21), isFunction = __webpack_require__(19), isObject = __webpack_require__(6), isPlainObject = __webpack_require__(45), isTypedArray = __webpack_require__(33), toPlainObject = __webpack_require__(278); /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = object[key], srcValue = source[key], stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } assignMergeValue(object, key, newValue); } module.exports = baseMergeDeep; /***/ }), /* 278 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(27), keysIn = __webpack_require__(48); /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return copyObject(value, keysIn(value)); } module.exports = toPlainObject; /***/ }), /* 279 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var map = __webpack_require__(17); var isArray = __webpack_require__(0); var isNumber = __webpack_require__(184); var isString = __webpack_require__(52); function valToNumber(v) { if (isNumber(v)) { return v; } else if (isString(v)) { return parseFloat(v); } else if (isArray(v)) { return map(v, valToNumber); } throw new Error('The value should be a number, a parseable string or an array of those.'); } module.exports = valToNumber; /***/ }), /* 280 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var forEach = __webpack_require__(36); var filter = __webpack_require__(101); var map = __webpack_require__(17); var isEmpty = __webpack_require__(14); var indexOf = __webpack_require__(74); function filterState(state, filters) { var partialState = {}; var attributeFilters = filter(filters, function(f) { return f.indexOf('attribute:') !== -1; }); var attributes = map(attributeFilters, function(aF) { return aF.split(':')[1]; }); if (indexOf(attributes, '*') === -1) { forEach(attributes, function(attr) { if (state.isConjunctiveFacet(attr) && state.isFacetRefined(attr)) { if (!partialState.facetsRefinements) partialState.facetsRefinements = {}; partialState.facetsRefinements[attr] = state.facetsRefinements[attr]; } if (state.isDisjunctiveFacet(attr) && state.isDisjunctiveFacetRefined(attr)) { if (!partialState.disjunctiveFacetsRefinements) partialState.disjunctiveFacetsRefinements = {}; partialState.disjunctiveFacetsRefinements[attr] = state.disjunctiveFacetsRefinements[attr]; } if (state.isHierarchicalFacet(attr) && state.isHierarchicalFacetRefined(attr)) { if (!partialState.hierarchicalFacetsRefinements) partialState.hierarchicalFacetsRefinements = {}; partialState.hierarchicalFacetsRefinements[attr] = state.hierarchicalFacetsRefinements[attr]; } var numericRefinements = state.getNumericRefinements(attr); if (!isEmpty(numericRefinements)) { if (!partialState.numericRefinements) partialState.numericRefinements = {}; partialState.numericRefinements[attr] = state.numericRefinements[attr]; } }); } else { if (!isEmpty(state.numericRefinements)) { partialState.numericRefinements = state.numericRefinements; } if (!isEmpty(state.facetsRefinements)) partialState.facetsRefinements = state.facetsRefinements; if (!isEmpty(state.disjunctiveFacetsRefinements)) { partialState.disjunctiveFacetsRefinements = state.disjunctiveFacetsRefinements; } if (!isEmpty(state.hierarchicalFacetsRefinements)) { partialState.hierarchicalFacetsRefinements = state.hierarchicalFacetsRefinements; } } var searchParameters = filter( filters, function(f) { return f.indexOf('attribute:') === -1; } ); forEach( searchParameters, function(parameterKey) { partialState[parameterKey] = state[parameterKey]; } ); return partialState; } module.exports = filterState; /***/ }), /* 281 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Functions to manipulate refinement lists * * The RefinementList is not formally defined through a prototype but is based * on a specific structure. * * @module SearchParameters.refinementList * * @typedef {string[]} SearchParameters.refinementList.Refinements * @typedef {Object.<string, SearchParameters.refinementList.Refinements>} SearchParameters.refinementList.RefinementList */ var isUndefined = __webpack_require__(185); var isString = __webpack_require__(52); var isFunction = __webpack_require__(19); var isEmpty = __webpack_require__(14); var defaults = __webpack_require__(102); var reduce = __webpack_require__(50); var filter = __webpack_require__(101); var omit = __webpack_require__(34); var lib = { /** * Adds a refinement to a RefinementList * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} value the value of the refinement, if the value is not a string it will be converted * @return {RefinementList} a new and updated refinement list */ addRefinement: function addRefinement(refinementList, attribute, value) { if (lib.isRefined(refinementList, attribute, value)) { return refinementList; } var valueAsString = '' + value; var facetRefinement = !refinementList[attribute] ? [valueAsString] : refinementList[attribute].concat(valueAsString); var mod = {}; mod[attribute] = facetRefinement; return defaults({}, mod, refinementList); }, /** * Removes refinement(s) for an attribute: * - if the value is specified removes the refinement for the value on the attribute * - if no value is specified removes all the refinements for this attribute * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} [value] the value of the refinement * @return {RefinementList} a new and updated refinement lst */ removeRefinement: function removeRefinement(refinementList, attribute, value) { if (isUndefined(value)) { return lib.clearRefinement(refinementList, attribute); } var valueAsString = '' + value; return lib.clearRefinement(refinementList, function(v, f) { return attribute === f && valueAsString === v; }); }, /** * Toggles the refinement value for an attribute. * @param {RefinementList} refinementList the initial list * @param {string} attribute the attribute to refine * @param {string} value the value of the refinement * @return {RefinementList} a new and updated list */ toggleRefinement: function toggleRefinement(refinementList, attribute, value) { if (isUndefined(value)) throw new Error('toggleRefinement should be used with a value'); if (lib.isRefined(refinementList, attribute, value)) { return lib.removeRefinement(refinementList, attribute, value); } return lib.addRefinement(refinementList, attribute, value); }, /** * Clear all or parts of a RefinementList. Depending on the arguments, three * kinds of behavior can happen: * - if no attribute is provided: clears the whole list * - if an attribute is provided as a string: clears the list for the specific attribute * - if an attribute is provided as a function: discards the elements for which the function returns true * @param {RefinementList} refinementList the initial list * @param {string} [attribute] the attribute or function to discard * @param {string} [refinementType] optional parameter to give more context to the attribute function * @return {RefinementList} a new and updated refinement list */ clearRefinement: function clearRefinement(refinementList, attribute, refinementType) { if (isUndefined(attribute)) { return {}; } else if (isString(attribute)) { return omit(refinementList, attribute); } else if (isFunction(attribute)) { return reduce(refinementList, function(memo, values, key) { var facetList = filter(values, function(value) { return !attribute(value, key, refinementType); }); if (!isEmpty(facetList)) memo[key] = facetList; return memo; }, {}); } }, /** * Test if the refinement value is used for the attribute. If no refinement value * is provided, test if the refinementList contains any refinement for the * given attribute. * @param {RefinementList} refinementList the list of refinement * @param {string} attribute name of the attribute * @param {string} [refinementValue] value of the filter/refinement * @return {boolean} */ isRefined: function isRefined(refinementList, attribute, refinementValue) { var indexOf = __webpack_require__(74); var containsRefinements = !!refinementList[attribute] && refinementList[attribute].length > 0; if (isUndefined(refinementValue) || !containsRefinements) { return containsRefinements; } var refinementValueAsString = '' + refinementValue; return indexOf(refinementList[attribute], refinementValueAsString) !== -1; } }; module.exports = lib; /***/ }), /* 282 */ /***/ (function(module, exports) { /** * Creates an array with all falsey values removed. The values `false`, `null`, * `0`, `""`, `undefined`, and `NaN` are falsey. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to compact. * @returns {Array} Returns the new array of filtered values. * @example * * _.compact([0, 1, false, 2, '', 3]); * // => [1, 2, 3] */ function compact(array) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value) { result[resIndex++] = value; } } return result; } module.exports = compact; /***/ }), /* 283 */ /***/ (function(module, exports, __webpack_require__) { var baseIteratee = __webpack_require__(13), baseSum = __webpack_require__(284); /** * This method is like `_.sum` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the value to be summed. * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; * * _.sumBy(objects, function(o) { return o.n; }); * // => 20 * * // The `_.property` iteratee shorthand. * _.sumBy(objects, 'n'); * // => 20 */ function sumBy(array, iteratee) { return (array && array.length) ? baseSum(array, baseIteratee(iteratee, 2)) : 0; } module.exports = sumBy; /***/ }), /* 284 */ /***/ (function(module, exports) { /** * The base implementation of `_.sum` and `_.sumBy` without support for * iteratee shorthands. * * @private * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {number} Returns the sum. */ function baseSum(array, iteratee) { var result, index = -1, length = array.length; while (++index < length) { var current = iteratee(array[index]); if (current !== undefined) { result = result === undefined ? current : (result + current); } } return result; } module.exports = baseSum; /***/ }), /* 285 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(46), isArrayLike = __webpack_require__(11), isString = __webpack_require__(52), toInteger = __webpack_require__(51), values = __webpack_require__(286); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as * the offset from the end of `collection`. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object|string} collection The collection to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {boolean} Returns `true` if `value` is found, else `false`. * @example * * _.includes([1, 2, 3], 1); * // => true * * _.includes([1, 2, 3], 1, 2); * // => false * * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { collection = isArrayLike(collection) ? collection : values(collection); fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; var length = collection.length; if (fromIndex < 0) { fromIndex = nativeMax(length + fromIndex, 0); } return isString(collection) ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } module.exports = includes; /***/ }), /* 286 */ /***/ (function(module, exports, __webpack_require__) { var baseValues = __webpack_require__(287), keys = __webpack_require__(9); /** * Creates an array of the own enumerable string keyed property values of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property values. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.values(new Foo); * // => [1, 2] (iteration order is not guaranteed) * * _.values('hi'); * // => ['h', 'i'] */ function values(object) { return object == null ? [] : baseValues(object, keys(object)); } module.exports = values; /***/ }), /* 287 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(12); /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names * of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. * @returns {Object} Returns the array of property values. */ function baseValues(object, props) { return arrayMap(props, function(key) { return object[key]; }); } module.exports = baseValues; /***/ }), /* 288 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(12), baseIteratee = __webpack_require__(13), baseMap = __webpack_require__(183), baseSortBy = __webpack_require__(289), baseUnary = __webpack_require__(43), compareMultiple = __webpack_require__(290), identity = __webpack_require__(26); /** * The base implementation of `_.orderBy` without param guards. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. * @param {string[]} orders The sort orders of `iteratees`. * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { var index = -1; iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); return { 'criteria': criteria, 'index': ++index, 'value': value }; }); return baseSortBy(result, function(object, other) { return compareMultiple(object, other, orders); }); } module.exports = baseOrderBy; /***/ }), /* 289 */ /***/ (function(module, exports) { /** * The base implementation of `_.sortBy` which uses `comparer` to define the * sort order of `array` and replaces criteria objects with their corresponding * values. * * @private * @param {Array} array The array to sort. * @param {Function} comparer The function to define sort order. * @returns {Array} Returns `array`. */ function baseSortBy(array, comparer) { var length = array.length; array.sort(comparer); while (length--) { array[length] = array[length].value; } return array; } module.exports = baseSortBy; /***/ }), /* 290 */ /***/ (function(module, exports, __webpack_require__) { var compareAscending = __webpack_require__(291); /** * Used by `_.orderBy` to compare multiple properties of a value to another * and stable sort them. * * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, * specify an order of "desc" for descending or "asc" for ascending sort order * of corresponding values. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {boolean[]|string[]} orders The order to sort by for each property. * @returns {number} Returns the sort order indicator for `object`. */ function compareMultiple(object, other, orders) { var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; while (++index < length) { var result = compareAscending(objCriteria[index], othCriteria[index]); if (result) { if (index >= ordersLength) { return result; } var order = orders[index]; return result * (order == 'desc' ? -1 : 1); } } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications // that causes it, under certain circumstances, to provide the same value for // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 // for more details. // // This also ensures a stable sort in V8 and other engines. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. return object.index - other.index; } module.exports = compareMultiple; /***/ }), /* 291 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(23); /** * Compares values to sort them in ascending order. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {number} Returns the sort order indicator for `value`. */ function compareAscending(value, other) { if (value !== other) { var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || (valIsNull && othIsDefined && othIsReflexive) || (!valIsDefined && othIsReflexive) || !valIsReflexive) { return 1; } if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || (othIsNull && valIsDefined && valIsReflexive) || (!othIsDefined && valIsReflexive) || !othIsReflexive) { return -1; } } return 0; } module.exports = compareAscending; /***/ }), /* 292 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(25), createWrap = __webpack_require__(105), getHolder = __webpack_require__(54), replaceHolders = __webpack_require__(37); /** Used to compose bitmasks for function metadata. */ var WRAP_PARTIAL_FLAG = 32; /** * Creates a function that invokes `func` with `partials` prepended to the * arguments it receives. This method is like `_.bind` except it does **not** * alter the `this` binding. * * The `_.partial.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * **Note:** This method doesn't set the "length" property of partially * applied functions. * * @static * @memberOf _ * @since 0.2.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new partially applied function. * @example * * function greet(greeting, name) { * return greeting + ' ' + name; * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); * // => 'hello fred' * * // Partially applied with placeholders. * var greetFred = _.partial(greet, _, 'fred'); * greetFred('hi'); * // => 'hi fred' */ var partial = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partial)); return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); }); // Assign default placeholders. partial.placeholder = {}; module.exports = partial; /***/ }), /* 293 */ /***/ (function(module, exports, __webpack_require__) { var createCtor = __webpack_require__(75), root = __webpack_require__(3); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; /** * Creates a function that wraps `func` to invoke it with the optional `this` * binding of `thisArg`. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ function createBind(func, bitmask, thisArg) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; } module.exports = createBind; /***/ }), /* 294 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(68), createCtor = __webpack_require__(75), createHybrid = __webpack_require__(193), createRecurry = __webpack_require__(196), getHolder = __webpack_require__(54), replaceHolders = __webpack_require__(37), root = __webpack_require__(3); /** * Creates a function that wraps `func` to enable currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createCurry(func, bitmask, arity) { var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; } var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) ? [] : replaceHolders(args, placeholder); length -= holders.length; if (length < arity) { return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return apply(fn, this, args); } return wrapper; } module.exports = createCurry; /***/ }), /* 295 */ /***/ (function(module, exports) { /** * Gets the number of `placeholder` occurrences in `array`. * * @private * @param {Array} array The array to inspect. * @param {*} placeholder The placeholder to search for. * @returns {number} Returns the placeholder count. */ function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { ++result; } } return result; } module.exports = countHolders; /***/ }), /* 296 */ /***/ (function(module, exports, __webpack_require__) { var LazyWrapper = __webpack_require__(106), getData = __webpack_require__(197), getFuncName = __webpack_require__(298), lodash = __webpack_require__(300); /** * Checks if `func` has a lazy counterpart. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` has a lazy counterpart, * else `false`. */ function isLaziable(func) { var funcName = getFuncName(func), other = lodash[funcName]; if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { return false; } if (func === other) { return true; } var data = getData(other); return !!data && func === data[0]; } module.exports = isLaziable; /***/ }), /* 297 */ /***/ (function(module, exports) { /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop() { // No operation performed. } module.exports = noop; /***/ }), /* 298 */ /***/ (function(module, exports, __webpack_require__) { var realNames = __webpack_require__(299); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the name of `func`. * * @private * @param {Function} func The function to query. * @returns {string} Returns the function name. */ function getFuncName(func) { var result = (func.name + ''), array = realNames[result], length = hasOwnProperty.call(realNames, result) ? array.length : 0; while (length--) { var data = array[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result; } module.exports = getFuncName; /***/ }), /* 299 */ /***/ (function(module, exports) { /** Used to lookup unminified function names. */ var realNames = {}; module.exports = realNames; /***/ }), /* 300 */ /***/ (function(module, exports, __webpack_require__) { var LazyWrapper = __webpack_require__(106), LodashWrapper = __webpack_require__(198), baseLodash = __webpack_require__(107), isArray = __webpack_require__(0), isObjectLike = __webpack_require__(7), wrapperClone = __webpack_require__(301); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates a `lodash` object which wraps `value` to enable implicit method * chain sequences. Methods that operate on and return arrays, collections, * and functions can be chained together. Methods that retrieve a single value * or may return a primitive value will automatically end the chain sequence * and return the unwrapped value. Otherwise, the value must be unwrapped * with `_#value`. * * Explicit chain sequences, which must be unwrapped with `_#value`, may be * enabled using `_.chain`. * * The execution of chained methods is lazy, that is, it's deferred until * `_#value` is implicitly or explicitly called. * * Lazy evaluation allows several methods to support shortcut fusion. * Shortcut fusion is an optimization to merge iteratee calls; this avoids * the creation of intermediate arrays and can greatly reduce the number of * iteratee executions. Sections of a chain sequence qualify for shortcut * fusion if the section is applied to an array and iteratees accept only * one argument. The heuristic for whether a section qualifies for shortcut * fusion is subject to change. * * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. * * In addition to lodash methods, wrappers have `Array` and `String` methods. * * The wrapper `Array` methods are: * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` * * The wrapper `String` methods are: * `replace` and `split` * * The wrapper methods that support shortcut fusion are: * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` * * The chainable wrapper methods are: * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, * `zipObject`, `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, * `upperFirst`, `value`, and `words` * * @name _ * @constructor * @category Seq * @param {*} value The value to wrap in a `lodash` instance. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * function square(n) { * return n * n; * } * * var wrapped = _([1, 2, 3]); * * // Returns an unwrapped value. * wrapped.reduce(_.add); * // => 6 * * // Returns a wrapped value. * var squares = wrapped.map(square); * * _.isArray(squares); * // => false * * _.isArray(squares.value()); * // => true */ function lodash(value) { if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { if (value instanceof LodashWrapper) { return value; } if (hasOwnProperty.call(value, '__wrapped__')) { return wrapperClone(value); } } return new LodashWrapper(value); } // Ensure wrappers are instances of `baseLodash`. lodash.prototype = baseLodash.prototype; lodash.prototype.constructor = lodash; module.exports = lodash; /***/ }), /* 301 */ /***/ (function(module, exports, __webpack_require__) { var LazyWrapper = __webpack_require__(106), LodashWrapper = __webpack_require__(198), copyArray = __webpack_require__(69); /** * Creates a clone of `wrapper`. * * @private * @param {Object} wrapper The wrapper to clone. * @returns {Object} Returns the cloned wrapper. */ function wrapperClone(wrapper) { if (wrapper instanceof LazyWrapper) { return wrapper.clone(); } var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); result.__actions__ = copyArray(wrapper.__actions__); result.__index__ = wrapper.__index__; result.__values__ = wrapper.__values__; return result; } module.exports = wrapperClone; /***/ }), /* 302 */ /***/ (function(module, exports) { /** Used to match wrap detail comments. */ var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; /** * Extracts wrapper details from the `source` body comment. * * @private * @param {string} source The source to inspect. * @returns {Array} Returns the wrapper details. */ function getWrapDetails(source) { var match = source.match(reWrapDetails); return match ? match[1].split(reSplitDetails) : []; } module.exports = getWrapDetails; /***/ }), /* 303 */ /***/ (function(module, exports) { /** Used to match wrap detail comments. */ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; /** * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private * @param {string} source The source to modify. * @returns {Array} details The details to insert. * @returns {string} Returns the modified source. */ function insertWrapDetails(source, details) { var length = details.length; if (!length) { return source; } var lastIndex = length - 1; details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; details = details.join(length > 2 ? ', ' : ' '); return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } module.exports = insertWrapDetails; /***/ }), /* 304 */ /***/ (function(module, exports, __webpack_require__) { var arrayEach = __webpack_require__(95), arrayIncludes = __webpack_require__(92); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; /** Used to associate wrap methods with their bit flags. */ var wrapFlags = [ ['ary', WRAP_ARY_FLAG], ['bind', WRAP_BIND_FLAG], ['bindKey', WRAP_BIND_KEY_FLAG], ['curry', WRAP_CURRY_FLAG], ['curryRight', WRAP_CURRY_RIGHT_FLAG], ['flip', WRAP_FLIP_FLAG], ['partial', WRAP_PARTIAL_FLAG], ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], ['rearg', WRAP_REARG_FLAG] ]; /** * Updates wrapper `details` based on `bitmask` flags. * * @private * @returns {Array} details The details to modify. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Array} Returns `details`. */ function updateWrapDetails(details, bitmask) { arrayEach(wrapFlags, function(pair) { var value = '_.' + pair[0]; if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { details.push(value); } }); return details.sort(); } module.exports = updateWrapDetails; /***/ }), /* 305 */ /***/ (function(module, exports, __webpack_require__) { var copyArray = __webpack_require__(69), isIndex = __webpack_require__(32); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * Reorder `array` according to the specified indexes where the element at * the first index is assigned as the first element, the element at * the second index is assigned as the second element, and so on. * * @private * @param {Array} array The array to reorder. * @param {Array} indexes The arranged array indexes. * @returns {Array} Returns `array`. */ function reorder(array, indexes) { var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); while (length--) { var index = indexes[length]; array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; } return array; } module.exports = reorder; /***/ }), /* 306 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(68), createCtor = __webpack_require__(75), root = __webpack_require__(3); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; /** * Creates a function that wraps `func` to invoke it with the `this` binding * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; } while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } return apply(fn, isBind ? thisArg : this, args); } return wrapper; } module.exports = createPartial; /***/ }), /* 307 */ /***/ (function(module, exports, __webpack_require__) { var composeArgs = __webpack_require__(194), composeArgsRight = __webpack_require__(195), replaceHolders = __webpack_require__(37); /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * Merges the function metadata of `source` into `data`. * * Merging metadata reduces the number of wrappers used to invoke a function. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` * may be applied regardless of execution order. Methods like `_.ary` and * `_.rearg` modify function arguments, making the order in which they are * executed important, preventing the merging of metadata. However, we make * an exception for a safe combined case where curried functions have `_.ary` * and or `_.rearg` applied. * * @private * @param {Array} data The destination metadata. * @param {Array} source The source metadata. * @returns {Array} Returns `data`. */ function mergeData(data, source) { var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); var isCombo = ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); // Exit early if metadata can't be merged. if (!(isCommon || isCombo)) { return data; } // Use source `thisArg` if available. if (srcBitmask & WRAP_BIND_FLAG) { data[2] = source[2]; // Set when currying a bound function. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } // Compose partial arguments. var value = source[3]; if (value) { var partials = data[3]; data[3] = partials ? composeArgs(partials, value, source[4]) : value; data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; } // Compose partial right arguments. value = source[5]; if (value) { partials = data[5]; data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; } // Use source `argPos` if available. value = source[7]; if (value) { data[7] = value; } // Use source `ary` if it's smaller. if (srcBitmask & WRAP_ARY_FLAG) { data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); } // Use source `arity` if one is not provided. if (data[9] == null) { data[9] = source[9]; } // Use source `func` and merge bitmasks. data[0] = source[0]; data[1] = newBitmask; return data; } module.exports = mergeData; /***/ }), /* 308 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(25), createWrap = __webpack_require__(105), getHolder = __webpack_require__(54), replaceHolders = __webpack_require__(37); /** Used to compose bitmasks for function metadata. */ var WRAP_PARTIAL_RIGHT_FLAG = 64; /** * This method is like `_.partial` except that partially applied arguments * are appended to the arguments it receives. * * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * **Note:** This method doesn't set the "length" property of partially * applied functions. * * @static * @memberOf _ * @since 1.0.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new partially applied function. * @example * * function greet(greeting, name) { * return greeting + ' ' + name; * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); * // => 'hi fred' * * // Partially applied with placeholders. * var sayHelloTo = _.partialRight(greet, 'hello', _); * sayHelloTo('fred'); * // => 'hello fred' */ var partialRight = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partialRight)); return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); // Assign default placeholders. partialRight.placeholder = {}; module.exports = partialRight; /***/ }), /* 309 */ /***/ (function(module, exports, __webpack_require__) { var baseClamp = __webpack_require__(310), baseToString = __webpack_require__(66), toInteger = __webpack_require__(51), toString = __webpack_require__(65); /** * Checks if `string` starts with the given target string. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=0] The position to search from. * @returns {boolean} Returns `true` if `string` starts with `target`, * else `false`. * @example * * _.startsWith('abc', 'a'); * // => true * * _.startsWith('abc', 'b'); * // => false * * _.startsWith('abc', 'b', 1); * // => true */ function startsWith(string, target, position) { string = toString(string); position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); target = baseToString(target); return string.slice(position, position + target.length) == target; } module.exports = startsWith; /***/ }), /* 310 */ /***/ (function(module, exports) { /** * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. * @param {number} [lower] The lower bound. * @param {number} upper The upper bound. * @returns {number} Returns the clamped number. */ function baseClamp(number, lower, upper) { if (number === number) { if (upper !== undefined) { number = number <= upper ? number : upper; } if (lower !== undefined) { number = number >= lower ? number : lower; } } return number; } module.exports = baseClamp; /***/ }), /* 311 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = generateTrees; var last = __webpack_require__(174); var map = __webpack_require__(17); var reduce = __webpack_require__(50); var orderBy = __webpack_require__(104); var trim = __webpack_require__(187); var find = __webpack_require__(53); var pickBy = __webpack_require__(312); var prepareHierarchicalFacetSortBy = __webpack_require__(201); function generateTrees(state) { return function generate(hierarchicalFacetResult, hierarchicalFacetIndex) { var hierarchicalFacet = state.hierarchicalFacets[hierarchicalFacetIndex]; var hierarchicalFacetRefinement = state.hierarchicalFacetsRefinements[hierarchicalFacet.name] && state.hierarchicalFacetsRefinements[hierarchicalFacet.name][0] || ''; var hierarchicalSeparator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var hierarchicalRootPath = state._getHierarchicalRootPath(hierarchicalFacet); var hierarchicalShowParentLevel = state._getHierarchicalShowParentLevel(hierarchicalFacet); var sortBy = prepareHierarchicalFacetSortBy(state._getHierarchicalFacetSortBy(hierarchicalFacet)); var generateTreeFn = generateHierarchicalTree(sortBy, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel, hierarchicalFacetRefinement); var results = hierarchicalFacetResult; if (hierarchicalRootPath) { results = hierarchicalFacetResult.slice(hierarchicalRootPath.split(hierarchicalSeparator).length); } return reduce(results, generateTreeFn, { name: state.hierarchicalFacets[hierarchicalFacetIndex].name, count: null, // root level, no count isRefined: true, // root level, always refined path: null, // root level, no path data: null }); }; } function generateHierarchicalTree(sortBy, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel, currentRefinement) { return function generateTree(hierarchicalTree, hierarchicalFacetResult, currentHierarchicalLevel) { var parent = hierarchicalTree; if (currentHierarchicalLevel > 0) { var level = 0; parent = hierarchicalTree; while (level < currentHierarchicalLevel) { parent = parent && find(parent.data, {isRefined: true}); level++; } } // we found a refined parent, let's add current level data under it if (parent) { // filter values in case an object has multiple categories: // { // categories: { // level0: ['beers', 'bières'], // level1: ['beers > IPA', 'bières > Belges'] // } // } // // If parent refinement is `beers`, then we do not want to have `bières > Belges` // showing up var onlyMatchingValuesFn = filterFacetValues(parent.path || hierarchicalRootPath, currentRefinement, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel); parent.data = orderBy( map( pickBy(hierarchicalFacetResult.data, onlyMatchingValuesFn), formatHierarchicalFacetValue(hierarchicalSeparator, currentRefinement) ), sortBy[0], sortBy[1] ); } return hierarchicalTree; }; } function filterFacetValues(parentPath, currentRefinement, hierarchicalSeparator, hierarchicalRootPath, hierarchicalShowParentLevel) { return function(facetCount, facetValue) { // we want the facetValue is a child of hierarchicalRootPath if (hierarchicalRootPath && (facetValue.indexOf(hierarchicalRootPath) !== 0 || hierarchicalRootPath === facetValue)) { return false; } // we always want root levels (only when there is no prefix path) return !hierarchicalRootPath && facetValue.indexOf(hierarchicalSeparator) === -1 || // if there is a rootPath, being root level mean 1 level under rootPath hierarchicalRootPath && facetValue.split(hierarchicalSeparator).length - hierarchicalRootPath.split(hierarchicalSeparator).length === 1 || // if current refinement is a root level and current facetValue is a root level, // keep the facetValue facetValue.indexOf(hierarchicalSeparator) === -1 && currentRefinement.indexOf(hierarchicalSeparator) === -1 || // currentRefinement is a child of the facet value currentRefinement.indexOf(facetValue) === 0 || // facetValue is a child of the current parent, add it facetValue.indexOf(parentPath + hierarchicalSeparator) === 0 && (hierarchicalShowParentLevel || facetValue.indexOf(currentRefinement) === 0); }; } function formatHierarchicalFacetValue(hierarchicalSeparator, currentRefinement) { return function format(facetCount, facetValue) { return { name: trim(last(facetValue.split(hierarchicalSeparator))), path: facetValue, count: facetCount, isRefined: currentRefinement === facetValue || currentRefinement.indexOf(facetValue + hierarchicalSeparator) === 0, data: null }; }; } /***/ }), /* 312 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(12), baseIteratee = __webpack_require__(13), basePickBy = __webpack_require__(202), getAllKeysIn = __webpack_require__(97); /** * Creates an object composed of the `object` properties `predicate` returns * truthy for. The predicate is invoked with two arguments: (value, key). * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The source object. * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pickBy(object, _.isNumber); * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { if (object == null) { return {}; } var props = arrayMap(getAllKeysIn(object), function(prop) { return [prop]; }); predicate = baseIteratee(predicate); return basePickBy(object, props, function(value, path) { return predicate(value, path[0]); }); } module.exports = pickBy; /***/ }), /* 313 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(96), castPath = __webpack_require__(22), isIndex = __webpack_require__(32), isObject = __webpack_require__(6), toKey = __webpack_require__(24); /** * The base implementation of `_.set`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { if (!isObject(object)) { return object; } path = castPath(path, object); var index = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index < length) { var key = toKey(path[index]), newValue = value; if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { newValue = isObject(objValue) ? objValue : (isIndex(path[index + 1]) ? [] : {}); } } assignValue(nested, key, newValue); nested = nested[key]; } return object; } module.exports = baseSet; /***/ }), /* 314 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(203); var events = __webpack_require__(204); /** * A DerivedHelper is a way to create sub requests to * Algolia from a main helper. * @class * @classdesc The DerivedHelper provides an event based interface for search callbacks: * - search: when a search is triggered using the `search()` method. * - result: when the response is retrieved from Algolia and is processed. * This event contains a {@link SearchResults} object and the * {@link SearchParameters} corresponding to this answer. */ function DerivedHelper(mainHelper, fn) { this.main = mainHelper; this.fn = fn; this.lastResults = null; } util.inherits(DerivedHelper, events.EventEmitter); /** * Detach this helper from the main helper * @return {undefined} * @throws Error if the derived helper is already detached */ DerivedHelper.prototype.detach = function() { this.removeAllListeners(); this.main.detachDerivedHelper(this); }; DerivedHelper.prototype.getModifiedState = function(parameters) { return this.fn(parameters); }; module.exports = DerivedHelper; /***/ }), /* 315 */ /***/ (function(module, exports) { module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } /***/ }), /* 316 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } } /***/ }), /* 317 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var forEach = __webpack_require__(36); var map = __webpack_require__(17); var reduce = __webpack_require__(50); var merge = __webpack_require__(103); var isArray = __webpack_require__(0); var requestBuilder = { /** * Get all the queries to send to the client, those queries can used directly * with the Algolia client. * @private * @return {object[]} The queries */ _getQueries: function getQueries(index, state) { var queries = []; // One query for the hits queries.push({ indexName: index, params: requestBuilder._getHitsSearchParams(state) }); // One for each disjunctive facets forEach(state.getRefinedDisjunctiveFacets(), function(refinedFacet) { queries.push({ indexName: index, params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet) }); }); // maybe more to get the root level of hierarchical facets when activated forEach(state.getRefinedHierarchicalFacets(), function(refinedFacet) { var hierarchicalFacet = state.getHierarchicalFacetByName(refinedFacet); var currentRefinement = state.getHierarchicalRefinement(refinedFacet); // if we are deeper than level 0 (starting from `beer > IPA`) // we want to get the root values var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); if (currentRefinement.length > 0 && currentRefinement[0].split(separator).length > 1) { queries.push({ indexName: index, params: requestBuilder._getDisjunctiveFacetSearchParams(state, refinedFacet, true) }); } }); return queries; }, /** * Build search parameters used to fetch hits * @private * @return {object.<string, any>} */ _getHitsSearchParams: function(state) { var facets = state.facets .concat(state.disjunctiveFacets) .concat(requestBuilder._getHitsHierarchicalFacetsAttributes(state)); var facetFilters = requestBuilder._getFacetFilters(state); var numericFilters = requestBuilder._getNumericFilters(state); var tagFilters = requestBuilder._getTagFilters(state); var additionalParams = { facets: facets, tagFilters: tagFilters }; if (facetFilters.length > 0) { additionalParams.facetFilters = facetFilters; } if (numericFilters.length > 0) { additionalParams.numericFilters = numericFilters; } return merge(state.getQueryParams(), additionalParams); }, /** * Build search parameters used to fetch a disjunctive facet * @private * @param {string} facet the associated facet name * @param {boolean} hierarchicalRootLevel ?? FIXME * @return {object} */ _getDisjunctiveFacetSearchParams: function(state, facet, hierarchicalRootLevel) { var facetFilters = requestBuilder._getFacetFilters(state, facet, hierarchicalRootLevel); var numericFilters = requestBuilder._getNumericFilters(state, facet); var tagFilters = requestBuilder._getTagFilters(state); var additionalParams = { hitsPerPage: 1, page: 0, attributesToRetrieve: [], attributesToHighlight: [], attributesToSnippet: [], tagFilters: tagFilters }; var hierarchicalFacet = state.getHierarchicalFacetByName(facet); if (hierarchicalFacet) { additionalParams.facets = requestBuilder._getDisjunctiveHierarchicalFacetAttribute( state, hierarchicalFacet, hierarchicalRootLevel ); } else { additionalParams.facets = facet; } if (numericFilters.length > 0) { additionalParams.numericFilters = numericFilters; } if (facetFilters.length > 0) { additionalParams.facetFilters = facetFilters; } return merge(state.getQueryParams(), additionalParams); }, /** * Return the numeric filters in an algolia request fashion * @private * @param {string} [facetName] the name of the attribute for which the filters should be excluded * @return {string[]} the numeric filters in the algolia format */ _getNumericFilters: function(state, facetName) { if (state.numericFilters) { return state.numericFilters; } var numericFilters = []; forEach(state.numericRefinements, function(operators, attribute) { forEach(operators, function(values, operator) { if (facetName !== attribute) { forEach(values, function(value) { if (isArray(value)) { var vs = map(value, function(v) { return attribute + operator + v; }); numericFilters.push(vs); } else { numericFilters.push(attribute + operator + value); } }); } }); }); return numericFilters; }, /** * Return the tags filters depending * @private * @return {string} */ _getTagFilters: function(state) { if (state.tagFilters) { return state.tagFilters; } return state.tagRefinements.join(','); }, /** * Build facetFilters parameter based on current refinements. The array returned * contains strings representing the facet filters in the algolia format. * @private * @param {string} [facet] if set, the current disjunctive facet * @return {array.<string>} */ _getFacetFilters: function(state, facet, hierarchicalRootLevel) { var facetFilters = []; forEach(state.facetsRefinements, function(facetValues, facetName) { forEach(facetValues, function(facetValue) { facetFilters.push(facetName + ':' + facetValue); }); }); forEach(state.facetsExcludes, function(facetValues, facetName) { forEach(facetValues, function(facetValue) { facetFilters.push(facetName + ':-' + facetValue); }); }); forEach(state.disjunctiveFacetsRefinements, function(facetValues, facetName) { if (facetName === facet || !facetValues || facetValues.length === 0) return; var orFilters = []; forEach(facetValues, function(facetValue) { orFilters.push(facetName + ':' + facetValue); }); facetFilters.push(orFilters); }); forEach(state.hierarchicalFacetsRefinements, function(facetValues, facetName) { var facetValue = facetValues[0]; if (facetValue === undefined) { return; } var hierarchicalFacet = state.getHierarchicalFacetByName(facetName); var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var rootPath = state._getHierarchicalRootPath(hierarchicalFacet); var attributeToRefine; var attributesIndex; // we ask for parent facet values only when the `facet` is the current hierarchical facet if (facet === facetName) { // if we are at the root level already, no need to ask for facet values, we get them from // the hits query if (facetValue.indexOf(separator) === -1 || (!rootPath && hierarchicalRootLevel === true) || (rootPath && rootPath.split(separator).length === facetValue.split(separator).length)) { return; } if (!rootPath) { attributesIndex = facetValue.split(separator).length - 2; facetValue = facetValue.slice(0, facetValue.lastIndexOf(separator)); } else { attributesIndex = rootPath.split(separator).length - 1; facetValue = rootPath; } attributeToRefine = hierarchicalFacet.attributes[attributesIndex]; } else { attributesIndex = facetValue.split(separator).length - 1; attributeToRefine = hierarchicalFacet.attributes[attributesIndex]; } if (attributeToRefine) { facetFilters.push([attributeToRefine + ':' + facetValue]); } }); return facetFilters; }, _getHitsHierarchicalFacetsAttributes: function(state) { var out = []; return reduce( state.hierarchicalFacets, // ask for as much levels as there's hierarchical refinements function getHitsAttributesForHierarchicalFacet(allAttributes, hierarchicalFacet) { var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0]; // if no refinement, ask for root level if (!hierarchicalRefinement) { allAttributes.push(hierarchicalFacet.attributes[0]); return allAttributes; } var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); var level = hierarchicalRefinement.split(separator).length; var newAttributes = hierarchicalFacet.attributes.slice(0, level + 1); return allAttributes.concat(newAttributes); }, out); }, _getDisjunctiveHierarchicalFacetAttribute: function(state, hierarchicalFacet, rootLevel) { var separator = state._getHierarchicalFacetSeparator(hierarchicalFacet); if (rootLevel === true) { var rootPath = state._getHierarchicalRootPath(hierarchicalFacet); var attributeIndex = 0; if (rootPath) { attributeIndex = rootPath.split(separator).length; } return [hierarchicalFacet.attributes[attributeIndex]]; } var hierarchicalRefinement = state.getHierarchicalRefinement(hierarchicalFacet.name)[0] || ''; // if refinement is 'beers > IPA > Flying dog', // then we want `facets: ['beers > IPA']` as disjunctive facet (parent level values) var parentLevel = hierarchicalRefinement.split(separator).length - 1; return hierarchicalFacet.attributes.slice(0, parentLevel + 1); }, getSearchForFacetQuery: function(facetName, query, maxFacetHits, state) { var stateForSearchForFacetValues = state.isDisjunctiveFacet(facetName) ? state.clearRefinements(facetName) : state; var searchForFacetSearchParameters = { facetQuery: query, facetName: facetName }; if (typeof maxFacetHits === 'number') { searchForFacetSearchParameters.maxFacetHits = maxFacetHits; } var queries = merge(requestBuilder._getHitsSearchParams(stateForSearchForFacetValues), searchForFacetSearchParameters); return queries; } }; module.exports = requestBuilder; /***/ }), /* 318 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var invert = __webpack_require__(206); var keys = __webpack_require__(9); var keys2Short = { advancedSyntax: 'aS', allowTyposOnNumericTokens: 'aTONT', analyticsTags: 'aT', analytics: 'a', aroundLatLngViaIP: 'aLLVIP', aroundLatLng: 'aLL', aroundPrecision: 'aP', aroundRadius: 'aR', attributesToHighlight: 'aTH', attributesToRetrieve: 'aTR', attributesToSnippet: 'aTS', disjunctiveFacetsRefinements: 'dFR', disjunctiveFacets: 'dF', distinct: 'd', facetsExcludes: 'fE', facetsRefinements: 'fR', facets: 'f', getRankingInfo: 'gRI', hierarchicalFacetsRefinements: 'hFR', hierarchicalFacets: 'hF', highlightPostTag: 'hPoT', highlightPreTag: 'hPrT', hitsPerPage: 'hPP', ignorePlurals: 'iP', index: 'idx', insideBoundingBox: 'iBB', insidePolygon: 'iPg', length: 'l', maxValuesPerFacet: 'mVPF', minimumAroundRadius: 'mAR', minProximity: 'mP', minWordSizefor1Typo: 'mWS1T', minWordSizefor2Typos: 'mWS2T', numericFilters: 'nF', numericRefinements: 'nR', offset: 'o', optionalWords: 'oW', page: 'p', queryType: 'qT', query: 'q', removeWordsIfNoResults: 'rWINR', replaceSynonymsInHighlight: 'rSIH', restrictSearchableAttributes: 'rSA', synonyms: 's', tagFilters: 'tF', tagRefinements: 'tR', typoTolerance: 'tT', optionalTagFilters: 'oTF', optionalFacetFilters: 'oFF', snippetEllipsisText: 'sET', disableExactOnAttributes: 'dEOA', enableExactOnSingleWordQuery: 'eEOSWQ' }; var short2Keys = invert(keys2Short); module.exports = { /** * All the keys of the state, encoded. * @const */ ENCODED_PARAMETERS: keys(short2Keys), /** * Decode a shorten attribute * @param {string} shortKey the shorten attribute * @return {string} the decoded attribute, undefined otherwise */ decode: function(shortKey) { return short2Keys[shortKey]; }, /** * Encode an attribute into a short version * @param {string} key the attribute * @return {string} the shorten attribute */ encode: function(key) { return keys2Short[key]; } }; /***/ }), /* 319 */ /***/ (function(module, exports, __webpack_require__) { var baseInverter = __webpack_require__(320); /** * Creates a function like `_.invertBy`. * * @private * @param {Function} setter The function to set accumulator values. * @param {Function} toIteratee The function to resolve iteratees. * @returns {Function} Returns the new inverter function. */ function createInverter(setter, toIteratee) { return function(object, iteratee) { return baseInverter(object, setter, toIteratee(iteratee), {}); }; } module.exports = createInverter; /***/ }), /* 320 */ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(49); /** * The base implementation of `_.invert` and `_.invertBy` which inverts * `object` with values transformed by `iteratee` and set by `setter`. * * @private * @param {Object} object The object to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform values. * @param {Object} accumulator The initial inverted object. * @returns {Function} Returns `accumulator`. */ function baseInverter(object, setter, iteratee, accumulator) { baseForOwn(object, function(value, key, object) { setter(accumulator, iteratee(value), key, object); }); return accumulator; } module.exports = baseInverter; /***/ }), /* 321 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var stringify = __webpack_require__(322); var parse = __webpack_require__(323); var formats = __webpack_require__(207); module.exports = { formats: formats, parse: parse, stringify: stringify }; /***/ }), /* 322 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(108); var formats = __webpack_require__(207); var arrayPrefixGenerators = { brackets: function brackets(prefix) { // eslint-disable-line func-name-matching return prefix + '[]'; }, indices: function indices(prefix, key) { // eslint-disable-line func-name-matching return prefix + '[' + key + ']'; }, repeat: function repeat(prefix) { // eslint-disable-line func-name-matching return prefix; } }; var toISO = Date.prototype.toISOString; var defaults = { delimiter: '&', encode: true, encoder: utils.encode, encodeValuesOnly: false, serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var stringify = function stringify( // eslint-disable-line func-name-matching object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly ) { var obj = object; if (typeof filter === 'function') { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; } obj = ''; } if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; } return [formatter(prefix) + '=' + formatter(String(obj))]; } var values = []; if (typeof obj === 'undefined') { return values; } var objKeys; if (Array.isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } if (Array.isArray(obj)) { values = values.concat(stringify( obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } else { values = values.concat(stringify( obj[key], prefix + (allowDots ? '.' + key : '[' + key + ']'), generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } } return values; }; module.exports = function (object, opts) { var obj = object; var options = opts ? utils.assign({}, opts) : {}; if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; var sort = typeof options.sort === 'function' ? options.sort : null; var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; if (typeof options.format === 'undefined') { options.format = formats.default; } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { throw new TypeError('Unknown format option provided.'); } var formatter = formats.formatters[options.format]; var objKeys; var filter; if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); } else if (Array.isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (options.arrayFormat in arrayPrefixGenerators) { arrayFormat = options.arrayFormat; } else if ('indices' in options) { arrayFormat = options.indices ? 'indices' : 'repeat'; } else { arrayFormat = 'indices'; } var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; if (!objKeys) { objKeys = Object.keys(obj); } if (sort) { objKeys.sort(sort); } for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (skipNulls && obj[key] === null) { continue; } keys = keys.concat(stringify( obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode ? encoder : null, filter, sort, allowDots, serializeDate, formatter, encodeValuesOnly )); } var joined = keys.join(delimiter); var prefix = options.addQueryPrefix === true ? '?' : ''; return joined.length > 0 ? prefix + joined : ''; }; /***/ }), /* 323 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(108); var has = Object.prototype.hasOwnProperty; var defaults = { allowDots: false, allowPrototypes: false, arrayLimit: 20, decoder: utils.decode, delimiter: '&', depth: 5, parameterLimit: 1000, plainObjects: false, strictNullHandling: false }; var parseValues = function parseQueryStringValues(str, options) { var obj = {}; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); for (var i = 0; i < parts.length; ++i) { var part = parts[i]; var bracketEqualsPos = part.indexOf(']='); var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; var key, val; if (pos === -1) { key = options.decoder(part, defaults.decoder); val = options.strictNullHandling ? null : ''; } else { key = options.decoder(part.slice(0, pos), defaults.decoder); val = options.decoder(part.slice(pos + 1), defaults.decoder); } if (has.call(obj, key)) { obj[key] = [].concat(obj[key]).concat(val); } else { obj[key] = val; } } return obj; }; var parseObject = function parseObjectRecursive(chain, val, options) { if (!chain.length) { return val; } var root = chain.shift(); var obj; if (root === '[]') { obj = []; obj = obj.concat(parseObject(chain, val, options)); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit) ) { obj = []; obj[index] = parseObject(chain, val, options); } else { obj[cleanRoot] = parseObject(chain, val, options); } } return obj; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options) { if (!givenKey) { return; } // Transform dot notation to bracket notation var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; // The regex chunks var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; // Get the parent var segment = brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists var keys = []; if (parent) { // If we aren't using plain objects, optionally prefix keys // that would overwrite object prototype properties if (!options.plainObjects && has.call(Object.prototype, parent)) { if (!options.allowPrototypes) { return; } } keys.push(parent); } // Loop through children appending to the array until we hit depth var i = 0; while ((segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } // If there's a remainder, just add whatever is left if (segment) { keys.push('[' + key.slice(segment.index) + ']'); } return parseObject(keys, val, options); }; module.exports = function (str, opts) { var options = opts ? utils.assign({}, opts) : {}; if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { throw new TypeError('Decoder has to be a function.'); } options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; options.parseArrays = options.parseArrays !== false; options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; if (str === '' || str === null || typeof str === 'undefined') { return options.plainObjects ? Object.create(null) : {}; } var tempObj = typeof str === 'string' ? parseValues(str, options) : str; var obj = options.plainObjects ? Object.create(null) : {}; // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options); obj = utils.merge(obj, newObj, options); } return utils.compact(obj); }; /***/ }), /* 324 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(25), createWrap = __webpack_require__(105), getHolder = __webpack_require__(54), replaceHolders = __webpack_require__(37); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_PARTIAL_FLAG = 32; /** * Creates a function that invokes `func` with the `this` binding of `thisArg` * and `partials` prepended to the arguments it receives. * * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to bind. * @param {*} thisArg The `this` binding of `func`. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new bound function. * @example * * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; * } * * var object = { 'user': 'fred' }; * * var bound = _.bind(greet, object, 'hi'); * bound('!'); * // => 'hi fred!' * * // Bound with placeholders. * var bound = _.bind(greet, object, _, '!'); * bound('hi'); * // => 'hi fred!' */ var bind = baseRest(function(func, thisArg, partials) { var bitmask = WRAP_BIND_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bind)); bitmask |= WRAP_PARTIAL_FLAG; } return createWrap(func, bitmask, thisArg, partials, holders); }); // Assign default placeholders. bind.placeholder = {}; module.exports = bind; /***/ }), /* 325 */ /***/ (function(module, exports, __webpack_require__) { var basePickBy = __webpack_require__(202), hasIn = __webpack_require__(182); /** * The base implementation of `_.pick` without support for individual * property identifiers. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @returns {Object} Returns the new object. */ function basePick(object, paths) { return basePickBy(object, paths, function(value, path) { return hasIn(object, path); }); } module.exports = basePick; /***/ }), /* 326 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(47), baseForOwn = __webpack_require__(49), baseIteratee = __webpack_require__(13); /** * The opposite of `_.mapValues`; this method creates an object with the * same values as `object` and keys generated by running each own enumerable * string keyed property of `object` thru `iteratee`. The iteratee is invoked * with three arguments: (value, key, object). * * @static * @memberOf _ * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example * * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { * return key + value; * }); * // => { 'a1': 1, 'b2': 2 } */ function mapKeys(object, iteratee) { var result = {}; iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { baseAssignValue(result, iteratee(value, key, object), value); }); return result; } module.exports = mapKeys; /***/ }), /* 327 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(47), baseForOwn = __webpack_require__(49), baseIteratee = __webpack_require__(13); /** * Creates an object with the same keys as `object` and values generated * by running each own enumerable string keyed property of `object` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, key, object). * * @static * @memberOf _ * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example * * var users = { * 'fred': { 'user': 'fred', 'age': 40 }, * 'pebbles': { 'user': 'pebbles', 'age': 1 } * }; * * _.mapValues(users, function(o) { return o.age; }); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) * * // The `_.property` iteratee shorthand. * _.mapValues(users, 'age'); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) */ function mapValues(object, iteratee) { var result = {}; iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } module.exports = mapValues; /***/ }), /* 328 */, /* 329 */, /* 330 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _get2 = __webpack_require__(72); var _get3 = _interopRequireDefault(_get2); exports.default = parseAlgoliaHit; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Find an highlighted attribute given an `attributeName` and an `highlightProperty`, parses it, * and provided an array of objects with the string value and a boolean if this * value is highlighted. * * In order to use this feature, highlight must be activated in the configuration of * the index. The `preTag` and `postTag` attributes are respectively highlightPreTag and * highligtPostTag in Algolia configuration. * * @param {string} preTag - string used to identify the start of an highlighted value * @param {string} postTag - string used to identify the end of an highlighted value * @param {string} highlightProperty - the property that contains the highlight structure in the results * @param {string} attributeName - the highlighted attribute to look for * @param {object} hit - the actual hit returned by Algolia. * @return {object[]} - An array of {value: string, isDefined: boolean}. */ function parseAlgoliaHit(_ref) { var _ref$preTag = _ref.preTag, preTag = _ref$preTag === undefined ? '<em>' : _ref$preTag, _ref$postTag = _ref.postTag, postTag = _ref$postTag === undefined ? '</em>' : _ref$postTag, highlightProperty = _ref.highlightProperty, attributeName = _ref.attributeName, hit = _ref.hit; if (!hit) throw new Error('`hit`, the matching record, must be provided'); var highlightObject = (0, _get3.default)(hit[highlightProperty], attributeName); var highlightedValue = !highlightObject ? '' : highlightObject.value; return parseHighlightedAttribute({ preTag: preTag, postTag: postTag, highlightedValue: highlightedValue }); } /** * Parses an highlighted attribute into an array of objects with the string value, and * a boolean that indicated if this part is highlighted. * * @param {string} preTag - string used to identify the start of an highlighted value * @param {string} postTag - string used to identify the end of an highlighted value * @param {string} highlightedValue - highlighted attribute as returned by Algolia highlight feature * @return {object[]} - An array of {value: string, isDefined: boolean}. */ function parseHighlightedAttribute(_ref2) { var preTag = _ref2.preTag, postTag = _ref2.postTag, highlightedValue = _ref2.highlightedValue; var splitByPreTag = highlightedValue.split(preTag); var firstValue = splitByPreTag.shift(); var elements = firstValue === '' ? [] : [{ value: firstValue, isHighlighted: false }]; if (postTag === preTag) { var isHighlighted = true; splitByPreTag.forEach(function (split) { elements.push({ value: split, isHighlighted: isHighlighted }); isHighlighted = !isHighlighted; }); } else { splitByPreTag.forEach(function (split) { var splitByPostTag = split.split(postTag); elements.push({ value: splitByPostTag[0], isHighlighted: true }); if (splitByPostTag[1] !== '') { elements.push({ value: splitByPostTag[1], isHighlighted: false }); } }); } return elements; } /***/ }), /* 331 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectHits connector provides the logic to create connected * components that will render the results retrieved from * Algolia. * * To configure the number of hits retrieved, use [HitsPerPage widget](widgets/HitsPerPage.html), * [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or pass the hitsPerPage * prop to a [Configure](guide/Search_parameters.html) widget. * @name connectHits * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaHits', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = (0, _indexUtils.getResults)(searchResults, this.context); var hits = results ? results.hits : []; return { hits: hits }; }, /* Hits needs to be considered as a widget to trigger a search if no others widgets are used. * To be considered as a widget you need either getSearchParameters, getMetadata or getTransitionState * See createConnector.js * */ getSearchParameters: function getSearchParameters(searchParameters) { return searchParameters; } }); /***/ }), /* 332 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'hitsPerPage'; } function getCurrentRefinement(props, searchState, context) { var id = getId(); return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, null, function (currentRefinement) { if (typeof currentRefinement === 'string') { return parseInt(currentRefinement, 10); } return currentRefinement; }); } /** * connectHitsPerPage connector provides the logic to create connected * components that will allow a user to choose to display more or less results from Algolia. * @name connectHitsPerPage * @kind connector * @propType {number} defaultRefinement - The number of items selected by default * @propType {{value: number, label: string}[]} items - List of hits per page options. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{isRefined: boolean, label?: string, value: number}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaHitsPerPage', propTypes: { defaultRefinement: _propTypes2.default.number.isRequired, items: _propTypes2.default.arrayOf(_propTypes2.default.shape({ label: _propTypes2.default.string, value: _propTypes2.default.number.isRequired })).isRequired, transformItems: _propTypes2.default.func }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement(props, searchState, this.context); var items = props.items.map(function (item) { return item.value === currentRefinement ? _extends({}, item, { isRefined: true }) : _extends({}, item, { isRefined: false }); }); return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { var id = getId(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, this.context, resetPage); }, cleanUp: function cleanUp(props, searchState) { return (0, _indexUtils.cleanUpValue)(searchState, this.context, getId()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setHitsPerPage(getCurrentRefinement(props, searchState, this.context)); }, getMetadata: function getMetadata() { return { id: getId() }; } }); /***/ }), /* 333 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function getId() { return 'page'; } function getCurrentRefinement(props, searchState, context) { var id = getId(); var page = 1; return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, page, function (currentRefinement) { if (typeof currentRefinement === 'string') { currentRefinement = parseInt(currentRefinement, 10); } return currentRefinement; }); } /** * InfiniteHits connector provides the logic to create connected * components that will render an continuous list of results retrieved from * Algolia. This connector provides a function to load more results. * @name connectInfiniteHits * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state * @providedPropType {boolean} hasMore - indicates if there are more pages to load * @providedPropType {function} refine - call to load more results */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaInfiniteHits', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = (0, _indexUtils.getResults)(searchResults, this.context); if (!results) { this._allResults = []; return { hits: this._allResults, hasMore: false }; } var hits = results.hits, page = results.page, nbPages = results.nbPages; // If it is the same page we do not touch the page result list if (page === 0) { this._allResults = hits; } else if (page > this.previousPage) { this._allResults = [].concat(_toConsumableArray(this._allResults), _toConsumableArray(hits)); } else if (page < this.previousPage) { this._allResults = hits; } var lastPageIndex = nbPages - 1; var hasMore = page < lastPageIndex; this.previousPage = page; return { hits: this._allResults, hasMore: hasMore }; }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQueryParameters({ page: getCurrentRefinement(props, searchState, this.context) - 1 }); }, refine: function refine(props, searchState) { var id = getId(); var nextPage = getCurrentRefinement(props, searchState, this.context) + 1; var nextValue = _defineProperty({}, id, nextPage); var resetPage = false; return (0, _indexUtils.refineValue)(searchState, nextValue, this.context, resetPage); } }); /***/ }), /* 334 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _orderBy2 = __webpack_require__(104); var _orderBy3 = _interopRequireDefault(_orderBy2); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var namespace = 'menu'; function getId(props) { return props.attributeName; } function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), null, function (currentRefinement) { if (currentRefinement === '') { return null; } return currentRefinement; }); } function getValue(name, props, searchState, context) { var currentRefinement = getCurrentRefinement(props, searchState, context); return name === currentRefinement ? '' : name; } function _refine(props, searchState, nextRefinement, context) { var id = getId(props); var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : ''); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } var sortBy = ['count:desc', 'name:asc']; /** * connectMenu connector provides the logic to build a widget that will * give the user the ability to choose a single value for a specific facet. * @name connectMenu * @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @kind connector * @propType {string} attributeName - the name of the attribute in the record * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limitMin=10] - the minimum number of diplayed items * @propType {number} [limitMax=20] - the maximun number of displayed items. Only used when showMore is set to `true` * @propType {string} [defaultRefinement] - the value of the item selected by default * @propType {boolean} [withSearchBox=false] - allow search inside values * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied * @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the Menu can display. * @providedPropType {function} searchForItems - a function to toggle a search inside items values * @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaMenu', propTypes: { attributeName: _propTypes2.default.string.isRequired, showMore: _propTypes2.default.bool, limitMin: _propTypes2.default.number, limitMax: _propTypes2.default.number, defaultRefinement: _propTypes2.default.string, transformItems: _propTypes2.default.func, withSearchBox: _propTypes2.default.bool, searchForFacetValues: _propTypes2.default.bool // @deprecated }, defaultProps: { showMore: false, limitMin: 10, limitMax: 20 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, meta, searchForFacetValuesResults) { var _this = this; var attributeName = props.attributeName, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; var results = (0, _indexUtils.getResults)(searchResults, this.context); var canRefine = Boolean(results) && Boolean(results.getFacetByName(attributeName)); var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attributeName] && searchForFacetValuesResults.query !== ''); var withSearchBox = props.withSearchBox || props.searchForFacetValues; if (false) { // eslint-disable-next-line no-console console.warn('react-instantsearch: `searchForFacetValues` has been renamed to' + '`withSearchBox`, this will break in the next major version.'); } // Search For Facet Values is not available with derived helper (used for multi index search) if (props.withSearchBox && this.context.multiIndexContext) { throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context'); } if (!canRefine) { return { items: [], currentRefinement: getCurrentRefinement(props, searchState, this.context), isFromSearch: isFromSearch, withSearchBox: withSearchBox, canRefine: canRefine }; } var items = isFromSearch ? searchForFacetValuesResults[attributeName].map(function (v) { return { label: v.value, value: getValue(v.value, props, searchState, _this.context), _highlightResult: { label: { value: v.highlighted } }, count: v.count, isRefined: v.isRefined }; }) : results.getFacetValues(attributeName, { sortBy: sortBy }).map(function (v) { return { label: v.name, value: getValue(v.name, props, searchState, _this.context), count: v.count, isRefined: v.isRefined }; }); var sortedItems = withSearchBox && !isFromSearch ? (0, _orderBy3.default)(items, ['isRefined', 'count', 'label'], ['desc', 'desc', 'asc']) : items; var transformedItems = props.transformItems ? props.transformItems(sortedItems) : sortedItems; return { items: transformedItems.slice(0, limit), currentRefinement: getCurrentRefinement(props, searchState, this.context), isFromSearch: isFromSearch, withSearchBox: withSearchBox, canRefine: items.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) { return { facetName: props.attributeName, query: nextRefinement }; }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; searchParameters = searchParameters.setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit) }); searchParameters = searchParameters.addDisjunctiveFacet(attributeName); var currentRefinement = getCurrentRefinement(props, searchState, this.context); if (currentRefinement !== null) { searchParameters = searchParameters.addDisjunctiveFacetRefinement(attributeName, currentRefinement); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this2 = this; var id = getId(props); var currentRefinement = getCurrentRefinement(props, searchState, this.context); return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: currentRefinement === null ? [] : [{ label: props.attributeName + ': ' + currentRefinement, attributeName: props.attributeName, value: function value(nextState) { return _refine(props, nextState, '', _this2.context); }, currentRefinement: currentRefinement }] }; } }); /***/ }), /* 335 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isEmpty2 = __webpack_require__(14); var _isEmpty3 = _interopRequireDefault(_isEmpty2); var _find3 = __webpack_require__(53); var _find4 = _interopRequireDefault(_find3); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _indexUtils = __webpack_require__(5); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function stringifyItem(item) { if (typeof item.start === 'undefined' && typeof item.end === 'undefined') { return ''; } return (item.start ? item.start : '') + ':' + (item.end ? item.end : ''); } function parseItem(value) { if (value.length === 0) { return { start: null, end: null }; } var _value$split = value.split(':'), _value$split2 = _slicedToArray(_value$split, 2), startStr = _value$split2[0], endStr = _value$split2[1]; return { start: startStr.length > 0 ? parseInt(startStr, 10) : null, end: endStr.length > 0 ? parseInt(endStr, 10) : null }; } var namespace = 'multiRange'; function getId(props) { return props.attributeName; } function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), '', function (currentRefinement) { if (currentRefinement === '') { return ''; } return currentRefinement; }); } function isRefinementsRangeIncludesInsideItemRange(stats, start, end) { return stats.min > start && stats.min < end || stats.max > start && stats.max < end; } function isItemRangeIncludedInsideRefinementsRange(stats, start, end) { return start > stats.min && start < stats.max || end > stats.min && end < stats.max; } function itemHasRefinement(attributeName, results, value) { var stats = results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null; var range = value.split(':'); var start = Number(range[0]) === 0 || value === '' ? Number.NEGATIVE_INFINITY : Number(range[0]); var end = Number(range[1]) === 0 || value === '' ? Number.POSITIVE_INFINITY : Number(range[1]); return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end))); } function _refine(props, searchState, nextRefinement, context) { var nextValue = _defineProperty({}, getId(props, searchState), nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } /** * connectMultiRange connector provides the logic to build a widget that will * give the user the ability to select a range value for a numeric attribute. * Ranges are defined statically. * @name connectMultiRange * @requirements The attribute passed to the `attributeName` prop must be holding numerical values. * @kind connector * @propType {string} attributeName - the name of the attribute in the records * @propType {{label: string, start: number, end: number}[]} items - List of options. With a text label, and upper and lower bounds. * @propType {string} [defaultRefinement] - the value of the item selected by default, follow the shape of a `string` with a pattern of `'{start}:{end}'`. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to select a range. * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the refinement currently applied. follow the shape of a `string` with a pattern of `'{start}:{end}'` which corresponds to the current selected item. For instance, when the selected item is `{start: 10, end: 20}`, the searchState of the widget is `'10:20'`. When `start` isn't defined, the searchState of the widget is `':{end}'`, and the same way around when `end` isn't defined. However, when neither `start` nor `end` are defined, the searchState is an empty string. * @providedPropType {array.<{isRefined: boolean, label: string, value: string, isRefined: boolean, noRefinement: boolean}>} items - the list of ranges the MultiRange can display. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaMultiRange', propTypes: { id: _propTypes2.default.string, attributeName: _propTypes2.default.string.isRequired, items: _propTypes2.default.arrayOf(_propTypes2.default.shape({ label: _propTypes2.default.node, start: _propTypes2.default.number, end: _propTypes2.default.number })).isRequired, transformItems: _propTypes2.default.func }, getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var attributeName = props.attributeName; var currentRefinement = getCurrentRefinement(props, searchState, this.context); var results = (0, _indexUtils.getResults)(searchResults, this.context); var items = props.items.map(function (item) { var value = stringifyItem(item); return { label: item.label, value: value, isRefined: value === currentRefinement, noRefinement: results ? itemHasRefinement(getId(props), results, value) : false }; }); var stats = results && results.getFacetByName(attributeName) ? results.getFacetStats(attributeName) : null; var refinedItem = (0, _find4.default)(items, function (item) { return item.isRefined === true; }); if (!items.some(function (item) { return item.value === ''; })) { items.push({ value: '', isRefined: (0, _isEmpty3.default)(refinedItem), noRefinement: !stats, label: 'All' }); } return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement, canRefine: items.length > 0 && items.some(function (item) { return item.noRefinement === false; }) }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName; var _parseItem = parseItem(getCurrentRefinement(props, searchState, this.context)), start = _parseItem.start, end = _parseItem.end; searchParameters = searchParameters.addDisjunctiveFacet(attributeName); if (start) { searchParameters = searchParameters.addNumericRefinement(attributeName, '>=', start); } if (end) { searchParameters = searchParameters.addNumericRefinement(attributeName, '<=', end); } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId(props); var value = getCurrentRefinement(props, searchState, this.context); var items = []; var index = (0, _indexUtils.getIndex)(this.context); if (value !== '') { var _find2 = (0, _find4.default)(props.items, function (item) { return stringifyItem(item) === value; }), label = _find2.label; items.push({ label: props.attributeName + ': ' + label, attributeName: props.attributeName, currentRefinement: label, value: function value(nextState) { return _refine(props, nextState, '', _this.context); } }); } return { id: id, index: index, items: items }; } }); /***/ }), /* 336 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _indexUtils = __webpack_require__(5); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'page'; } function getCurrentRefinement(props, searchState, context) { var id = getId(); var page = 1; return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, page, function (currentRefinement) { if (typeof currentRefinement === 'string') { return parseInt(currentRefinement, 10); } return currentRefinement; }); } function _refine(props, searchState, nextPage, context) { var id = getId(); var nextValue = _defineProperty({}, id, nextPage); var resetPage = false; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage); } /** * connectPagination connector provides the logic to build a widget that will * let the user displays hits corresponding to a certain page. * @name connectPagination * @kind connector * @propType {boolean} [showFirst=true] - Display the first page link. * @propType {boolean} [showLast=false] - Display the last page link. * @propType {boolean} [showPrevious=true] - Display the previous page link. * @propType {boolean} [showNext=true] - Display the next page link. * @propType {number} [pagesPadding=3] - How many page links to display around the current page. * @propType {number} [maxPages=Infinity] - Maximum number of pages to display. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {number} nbPages - the total of existing pages * @providedPropType {number} currentRefinement - the page refinement currently applied */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaPagination', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = (0, _indexUtils.getResults)(searchResults, this.context); if (!results) { return null; } var nbPages = results.nbPages; return { nbPages: nbPages, currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: nbPages > 1 }; }, refine: function refine(props, searchState, nextPage) { return _refine(props, searchState, nextPage, this.context); }, cleanUp: function cleanUp(props, searchState) { return (0, _indexUtils.cleanUpValue)(searchState, this.context, getId()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setPage(getCurrentRefinement(props, searchState, this.context) - 1); }, getMetadata: function getMetadata() { return { id: getId() }; } }); /***/ }), /* 337 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectPoweredBy connector provides the logic to build a widget that * will display a link to algolia. * @name connectPoweredBy * @kind connector * @providedPropType {string} url - the url to redirect to algolia */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaPoweredBy', propTypes: {}, getProvidedProps: function getProvidedProps(props) { var url = 'https://www.algolia.com/?' + 'utm_source=react-instantsearch&' + 'utm_medium=website&' + ('utm_content=' + (props.canRender ? location.hostname : '') + '&') + 'utm_campaign=poweredby'; return { url: url }; } }); /***/ }), /* 338 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _indexUtils = __webpack_require__(5); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var namespace = 'refinementList'; function getId(props) { return props.attributeName; } function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), [], function (currentRefinement) { if (typeof currentRefinement === 'string') { // All items were unselected if (currentRefinement === '') { return []; } // Only one item was in the searchState but we know it should be an array return [currentRefinement]; } return currentRefinement; }); } function getValue(name, props, searchState, context) { var currentRefinement = getCurrentRefinement(props, searchState, context); var isAnewValue = currentRefinement.indexOf(name) === -1; var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates : currentRefinement.filter(function (selectedValue) { return selectedValue !== name; }); // cannot use .splice(), it mutates return nextRefinement; } function _refine(props, searchState, nextRefinement, context) { var id = getId(props); // Setting the value to an empty string ensures that it is persisted in // the URL as an empty value. // This is necessary in the case where `defaultRefinement` contains one // item and we try to deselect it. `nextSelected` would be an empty array, // which would not be persisted to the URL. // {foo: ['bar']} => "foo[0]=bar" // {foo: []} => "" var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : ''); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } /** * connectRefinementList connector provides the logic to build a widget that will * give the user the ability to choose multiple values for a specific facet. * @name connectRefinementList * @kind connector * @requirements The attribute passed to the `attributeName` prop must be present in "attributes for faceting" * on the Algolia dashboard or configured as `attributesForFaceting` via a set settings call to the Algolia API. * @propType {string} attributeName - the name of the attribute in the record * @propType {boolean} [withSearchBox=false] - allow search inside values * @propType {string} [operator=or] - How to apply the refinements. Possible values: 'or' or 'and'. * @propType {boolean} [showMore=false] - true if the component should display a button that will expand the number of items * @propType {number} [limitMin=10] - the minimum number of displayed items * @propType {number} [limitMax=20] - the maximun number of displayed items. Only used when showMore is set to `true` * @propType {string[]} defaultRefinement - the values of the items selected by default. The searchState of this widget takes the form of a list of `string`s, which correspond to the values of all selected refinements. However, when there are no refinements selected, the value of the searchState is an empty string. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string[]} currentRefinement - the refinement currently applied * @providedPropType {array.<{count: number, isRefined: boolean, label: string, value: string}>} items - the list of items the RefinementList can display. * @providedPropType {function} searchForItems - a function to toggle a search inside items values * @providedPropType {boolean} isFromSearch - a boolean that says if the `items` props contains facet values from the global search or from the search inside items. */ var sortBy = ['isRefined', 'count:desc', 'name:asc']; exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaRefinementList', propTypes: { id: _propTypes2.default.string, attributeName: _propTypes2.default.string.isRequired, operator: _propTypes2.default.oneOf(['and', 'or']), showMore: _propTypes2.default.bool, limitMin: _propTypes2.default.number, limitMax: _propTypes2.default.number, defaultRefinement: _propTypes2.default.arrayOf(_propTypes2.default.string), withSearchBox: _propTypes2.default.bool, searchForFacetValues: _propTypes2.default.bool, // @deprecated transformItems: _propTypes2.default.func }, defaultProps: { operator: 'or', showMore: false, limitMin: 10, limitMax: 20 }, getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata, searchForFacetValuesResults) { var _this = this; var attributeName = props.attributeName, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; var results = (0, _indexUtils.getResults)(searchResults, this.context); var canRefine = Boolean(results) && Boolean(results.getFacetByName(attributeName)); var isFromSearch = Boolean(searchForFacetValuesResults && searchForFacetValuesResults[attributeName] && searchForFacetValuesResults.query !== ''); var withSearchBox = props.withSearchBox || props.searchForFacetValues; if (false) { // eslint-disable-next-line no-console console.warn('react-instantsearch: `searchForFacetValues` has been renamed to' + '`withSearchBox`, this will break in the next major version.'); } // Search For Facet Values is not available with derived helper (used for multi index search) if (props.withSearchBox && this.context.multiIndexContext) { throw new Error('react-instantsearch: searching in *List is not available when used inside a' + ' multi index context'); } if (!canRefine) { return { items: [], currentRefinement: getCurrentRefinement(props, searchState, this.context), canRefine: canRefine, isFromSearch: isFromSearch, withSearchBox: withSearchBox }; } var items = isFromSearch ? searchForFacetValuesResults[attributeName].map(function (v) { return { label: v.value, value: getValue(v.value, props, searchState, _this.context), _highlightResult: { label: { value: v.highlighted } }, count: v.count, isRefined: v.isRefined }; }) : results.getFacetValues(attributeName, { sortBy: sortBy }).map(function (v) { return { label: v.name, value: getValue(v.name, props, searchState, _this.context), count: v.count, isRefined: v.isRefined }; }); var transformedItems = props.transformItems ? props.transformItems(items) : items; return { items: transformedItems.slice(0, limit), currentRefinement: getCurrentRefinement(props, searchState, this.context), isFromSearch: isFromSearch, withSearchBox: withSearchBox, canRefine: items.length > 0 }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, searchForFacetValues: function searchForFacetValues(props, searchState, nextRefinement) { return { facetName: props.attributeName, query: nextRefinement }; }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName, operator = props.operator, showMore = props.showMore, limitMin = props.limitMin, limitMax = props.limitMax; var limit = showMore ? limitMax : limitMin; var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet'; var addRefinementKey = addKey + 'Refinement'; searchParameters = searchParameters.setQueryParameters({ maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, limit) }); searchParameters = searchParameters[addKey](attributeName); return getCurrentRefinement(props, searchState, this.context).reduce(function (res, val) { return res[addRefinementKey](attributeName, val); }, searchParameters); }, getMetadata: function getMetadata(props, searchState) { var id = getId(props); var context = this.context; return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: getCurrentRefinement(props, searchState, context).length > 0 ? [{ attributeName: props.attributeName, label: props.attributeName + ': ', currentRefinement: getCurrentRefinement(props, searchState, context), value: function value(nextState) { return _refine(props, nextState, [], context); }, items: getCurrentRefinement(props, searchState, context).map(function (item) { return { label: '' + item, value: function value(nextState) { var nextSelectedItems = getCurrentRefinement(props, nextState, context).filter(function (other) { return other !== item; }); return _refine(props, searchState, nextSelectedItems, context); } }; }) }] : [] }; } }); /***/ }), /* 339 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _omit2 = __webpack_require__(34); var _omit3 = _interopRequireDefault(_omit2); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(5); var _utils = __webpack_require__(44); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectScrollTo connector provides the logic to build a widget that will * let the page scroll to a certain point. * @name connectScrollTo * @kind connector * @propType {string} [scrollOn="page"] - Widget searchState key on which to listen for changes, default to the pagination widget. * @providedPropType {any} value - the current refinement applied to the widget listened by scrollTo * @providedPropType {boolean} hasNotChanged - indicates whether the refinement came from the scrollOn argument (for instance page by default) */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaScrollTo', propTypes: { scrollOn: _propTypes2.default.string }, defaultProps: { scrollOn: 'page' }, getProvidedProps: function getProvidedProps(props, searchState) { var id = props.scrollOn; var value = (0, _indexUtils.getCurrentRefinementValue)(props, searchState, this.context, id, null, function (currentRefinement) { return currentRefinement; }); if (!this._prevSearchState) { this._prevSearchState = {}; } /* Get the subpart of the state that interest us*/ if ((0, _indexUtils.hasMultipleIndex)(this.context)) { var index = (0, _indexUtils.getIndex)(this.context); searchState = searchState.indices ? searchState.indices[index] : {}; } /* if there is a change in the app that has been triggered by another element than "props.scrollOn (id) or the Configure widget, we need to keep track of the search state to know if there's a change in the app that was not triggered by the props.scrollOn (id) or the Configure widget. This is useful when using ScrollTo in combination of Pagination. As pagination can be change by every widget, we want to scroll only if it cames from the pagination widget itself. We also remove the configure key from the search state to do this comparaison because for now configure values are not present in the search state before a first refinement has been made and will false the results. See: https://github.com/algolia/react-instantsearch/issues/164 */ var cleanedSearchState = (0, _omit3.default)((0, _omit3.default)(searchState, 'configure'), id); var hasNotChanged = (0, _utils.shallowEqual)(this._prevSearchState, cleanedSearchState); this._prevSearchState = cleanedSearchState; return { value: value, hasNotChanged: hasNotChanged }; } }); /***/ }), /* 340 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'query'; } function getCurrentRefinement(props, searchState, context) { var id = getId(props); return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, '', function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return ''; }); } function _refine(props, searchState, nextRefinement, context) { var id = getId(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, getId()); } /** * connectSearchBox connector provides the logic to build a widget that will * let the user search for a query. * @name connectSearchBox * @kind connector * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string} currentRefinement - the query to search for. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaSearchBox', propTypes: { defaultRefinement: _propTypes2.default.string }, getProvidedProps: function getProvidedProps(props, searchState) { return { currentRefinement: getCurrentRefinement(props, searchState, this.context) }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQuery(getCurrentRefinement(props, searchState, this.context)); }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId(props); var currentRefinement = getCurrentRefinement(props, searchState, this.context); return { id: id, index: (0, _indexUtils.getIndex)(this.context), items: currentRefinement === null ? [] : [{ label: id + ': ' + currentRefinement, value: function value(nextState) { return _refine(props, nextState, '', _this.context); }, currentRefinement: currentRefinement }] }; } }); /***/ }), /* 341 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _indexUtils = __webpack_require__(5); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId() { return 'sortBy'; } function getCurrentRefinement(props, searchState, context) { var id = getId(props); return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, null, function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return null; }); } /** * The connectSortBy connector provides the logic to build a widget that will * display a list of indices. This allows a user to change how the hits are being sorted. * @name connectSortBy * @requirements Algolia handles sorting by creating replica indices. [Read more about sorting](https://www.algolia.com/doc/guides/relevance/sorting/) on * the Algolia website. * @kind connector * @propType {string} defaultRefinement - The default selected index. * @propType {{value: string, label: string}[]} items - The list of indexes to search in. * @propType {function} [transformItems] - Function to modify the items being displayed, e.g. for filtering or sorting them. Takes an items as parameter and expects it back in return. * @providedPropType {function} refine - a function to remove a single filter * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {string[]} currentRefinement - the refinement currently applied * @providedPropType {array.<{isRefined: boolean, label?: string, value: string}>} items - the list of items the HitsPerPage can display. If no label provided, the value will be displayed. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaSortBy', propTypes: { defaultRefinement: _propTypes2.default.string, items: _propTypes2.default.arrayOf(_propTypes2.default.shape({ label: _propTypes2.default.string, value: _propTypes2.default.string.isRequired })).isRequired, transformItems: _propTypes2.default.func }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement(props, searchState, this.context); var items = props.items.map(function (item) { return item.value === currentRefinement ? _extends({}, item, { isRefined: true }) : _extends({}, item, { isRefined: false }); }); return { items: props.transformItems ? props.transformItems(items) : items, currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { var id = getId(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, this.context, resetPage); }, cleanUp: function cleanUp(props, searchState) { return (0, _indexUtils.cleanUpValue)(searchState, this.context, getId()); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var selectedIndex = getCurrentRefinement(props, searchState, this.context); return searchParameters.setIndex(selectedIndex); }, getMetadata: function getMetadata() { return { id: getId() }; } }); /***/ }), /* 342 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * connectStats connector provides the logic to build a widget that will * displays algolia search statistics (hits number and processing time). * @name connectStats * @kind connector * @providedPropType {number} nbHits - number of hits returned by Algolia. * @providedPropType {number} processingTimeMS - the time in ms took by Algolia to search for results. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaStats', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { var results = (0, _indexUtils.getResults)(searchResults, this.context); if (!results) { return null; } return { nbHits: results.nbHits, processingTimeMS: results.processingTimeMS }; } }); /***/ }), /* 343 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getId(props) { return props.attributeName; } var namespace = 'toggle'; function getCurrentRefinement(props, searchState, context) { return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, namespace + '.' + getId(props), false, function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return false; }); } function _refine(props, searchState, nextRefinement, context) { var id = getId(props); var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage, namespace); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, namespace + '.' + getId(props)); } /** * connectToggle connector provides the logic to build a widget that will * provides an on/off filtering feature based on an attribute value. Note that if you provide an “off” option, it will be refined at initialization. * @name connectToggle * @kind connector * @propType {string} attributeName - Name of the attribute on which to apply the `value` refinement. Required when `value` is present. * @propType {string} label - Label for the toggle. * @propType {string} value - Value of the refinement to apply on `attributeName`. * @propType {boolean} [defaultRefinement=false] - Default searchState of the widget. Should the toggle be checked by default? * @providedPropType {function} refine - a function to toggle a refinement * @providedPropType {function} createURL - a function to generate a URL for the corresponding search state * @providedPropType {boolean} currentRefinement - the refinement currently applied */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaToggle', propTypes: { label: _propTypes2.default.string, filter: _propTypes2.default.func, attributeName: _propTypes2.default.string, value: _propTypes2.default.any, defaultRefinement: _propTypes2.default.bool }, getProvidedProps: function getProvidedProps(props, searchState) { var currentRefinement = getCurrentRefinement(props, searchState, this.context); return { currentRefinement: currentRefinement }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { var attributeName = props.attributeName, value = props.value, filter = props.filter; var checked = getCurrentRefinement(props, searchState, this.context); if (checked) { if (attributeName) { searchParameters = searchParameters.addFacet(attributeName).addFacetRefinement(attributeName, value); } if (filter) { searchParameters = filter(searchParameters); } } return searchParameters; }, getMetadata: function getMetadata(props, searchState) { var _this = this; var id = getId(props); var checked = getCurrentRefinement(props, searchState, this.context); var items = []; var index = (0, _indexUtils.getIndex)(this.context); if (checked) { items.push({ label: props.label, currentRefinement: props.label, attributeName: props.attributeName, value: function value(nextState) { return _refine(props, nextState, false, _this.context); } }); } return { id: id, index: index, items: items }; } }); /***/ }), /* 344 */, /* 345 */, /* 346 */, /* 347 */, /* 348 */, /* 349 */, /* 350 */, /* 351 */, /* 352 */, /* 353 */, /* 354 */, /* 355 */, /* 356 */, /* 357 */, /* 358 */, /* 359 */, /* 360 */, /* 361 */, /* 362 */, /* 363 */, /* 364 */, /* 365 */, /* 366 */, /* 367 */, /* 368 */, /* 369 */, /* 370 */, /* 371 */, /* 372 */, /* 373 */, /* 374 */, /* 375 */, /* 376 */, /* 377 */, /* 378 */, /* 379 */, /* 380 */, /* 381 */, /* 382 */, /* 383 */, /* 384 */, /* 385 */, /* 386 */, /* 387 */, /* 388 */, /* 389 */, /* 390 */, /* 391 */, /* 392 */, /* 393 */, /* 394 */, /* 395 */, /* 396 */, /* 397 */, /* 398 */, /* 399 */, /* 400 */, /* 401 */, /* 402 */, /* 403 */, /* 404 */, /* 405 */, /* 406 */, /* 407 */, /* 408 */, /* 409 */, /* 410 */, /* 411 */, /* 412 */, /* 413 */, /* 414 */, /* 415 */, /* 416 */, /* 417 */, /* 418 */, /* 419 */, /* 420 */, /* 421 */, /* 422 */, /* 423 */, /* 424 */, /* 425 */, /* 426 */, /* 427 */, /* 428 */, /* 429 */, /* 430 */, /* 431 */, /* 432 */, /* 433 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _connectConfigure = __webpack_require__(221); Object.defineProperty(exports, 'connectConfigure', { enumerable: true, get: function get() { return _interopRequireDefault(_connectConfigure).default; } }); var _connectCurrentRefinements = __webpack_require__(211); Object.defineProperty(exports, 'connectCurrentRefinements', { enumerable: true, get: function get() { return _interopRequireDefault(_connectCurrentRefinements).default; } }); var _connectHierarchicalMenu = __webpack_require__(247); Object.defineProperty(exports, 'connectHierarchicalMenu', { enumerable: true, get: function get() { return _interopRequireDefault(_connectHierarchicalMenu).default; } }); var _connectHighlight = __webpack_require__(217); Object.defineProperty(exports, 'connectHighlight', { enumerable: true, get: function get() { return _interopRequireDefault(_connectHighlight).default; } }); var _connectHits = __webpack_require__(331); Object.defineProperty(exports, 'connectHits', { enumerable: true, get: function get() { return _interopRequireDefault(_connectHits).default; } }); var _connectAutoComplete = __webpack_require__(434); Object.defineProperty(exports, 'connectAutoComplete', { enumerable: true, get: function get() { return _interopRequireDefault(_connectAutoComplete).default; } }); var _connectHitsPerPage = __webpack_require__(332); Object.defineProperty(exports, 'connectHitsPerPage', { enumerable: true, get: function get() { return _interopRequireDefault(_connectHitsPerPage).default; } }); var _connectInfiniteHits = __webpack_require__(333); Object.defineProperty(exports, 'connectInfiniteHits', { enumerable: true, get: function get() { return _interopRequireDefault(_connectInfiniteHits).default; } }); var _connectMenu = __webpack_require__(334); Object.defineProperty(exports, 'connectMenu', { enumerable: true, get: function get() { return _interopRequireDefault(_connectMenu).default; } }); var _connectMultiRange = __webpack_require__(335); Object.defineProperty(exports, 'connectMultiRange', { enumerable: true, get: function get() { return _interopRequireDefault(_connectMultiRange).default; } }); var _connectPagination = __webpack_require__(336); Object.defineProperty(exports, 'connectPagination', { enumerable: true, get: function get() { return _interopRequireDefault(_connectPagination).default; } }); var _connectPoweredBy = __webpack_require__(337); Object.defineProperty(exports, 'connectPoweredBy', { enumerable: true, get: function get() { return _interopRequireDefault(_connectPoweredBy).default; } }); var _connectRange = __webpack_require__(209); Object.defineProperty(exports, 'connectRange', { enumerable: true, get: function get() { return _interopRequireDefault(_connectRange).default; } }); var _connectRefinementList = __webpack_require__(338); Object.defineProperty(exports, 'connectRefinementList', { enumerable: true, get: function get() { return _interopRequireDefault(_connectRefinementList).default; } }); var _connectScrollTo = __webpack_require__(339); Object.defineProperty(exports, 'connectScrollTo', { enumerable: true, get: function get() { return _interopRequireDefault(_connectScrollTo).default; } }); var _connectSearchBox = __webpack_require__(340); Object.defineProperty(exports, 'connectSearchBox', { enumerable: true, get: function get() { return _interopRequireDefault(_connectSearchBox).default; } }); var _connectSortBy = __webpack_require__(341); Object.defineProperty(exports, 'connectSortBy', { enumerable: true, get: function get() { return _interopRequireDefault(_connectSortBy).default; } }); var _connectStats = __webpack_require__(342); Object.defineProperty(exports, 'connectStats', { enumerable: true, get: function get() { return _interopRequireDefault(_connectStats).default; } }); var _connectToggle = __webpack_require__(343); Object.defineProperty(exports, 'connectToggle', { enumerable: true, get: function get() { return _interopRequireDefault(_connectToggle).default; } }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /* 434 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createConnector = __webpack_require__(2); var _createConnector2 = _interopRequireDefault(_createConnector); var _indexUtils = __webpack_require__(5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var getId = function getId() { return 'query'; }; function getCurrentRefinement(props, searchState, context) { var id = getId(); return (0, _indexUtils.getCurrentRefinementValue)(props, searchState, context, id, '', function (currentRefinement) { if (currentRefinement) { return currentRefinement; } return ''; }); } function getHits(searchResults) { if (searchResults.results) { if (searchResults.results.hits && Array.isArray(searchResults.results.hits)) { return searchResults.results.hits; } else { return Object.keys(searchResults.results).reduce(function (hits, index) { return [].concat(_toConsumableArray(hits), [{ index: index, hits: searchResults.results[index].hits }]); }, []); } } else { return []; } } function _refine(props, searchState, nextRefinement, context) { var id = getId(); var nextValue = _defineProperty({}, id, nextRefinement); var resetPage = true; return (0, _indexUtils.refineValue)(searchState, nextValue, context, resetPage); } function _cleanUp(props, searchState, context) { return (0, _indexUtils.cleanUpValue)(searchState, context, getId()); } /** * connectAutoComplete connector provides the logic to create connected * components that will render the results retrieved from * Algolia. * * To configure the number of hits retrieved, use [HitsPerPage widget](widgets/HitsPerPage.html), * [connectHitsPerPage connector](connectors/connectHitsPerPage.html) or pass the hitsPerPage * prop to a [Configure](guide/Search_parameters.html) widget. * @name connectAutoComplete * @kind connector * @providedPropType {array.<object>} hits - the records that matched the search state. * @providedPropType {function} refine - a function to change the query. * @providedPropType {string} currentRefinement - the query to search for. */ exports.default = (0, _createConnector2.default)({ displayName: 'AlgoliaAutoComplete', getProvidedProps: function getProvidedProps(props, searchState, searchResults) { return { hits: getHits(searchResults), currentRefinement: getCurrentRefinement(props, searchState, this.context) }; }, refine: function refine(props, searchState, nextRefinement) { return _refine(props, searchState, nextRefinement, this.context); }, cleanUp: function cleanUp(props, searchState) { return _cleanUp(props, searchState, this.context); }, /* connectAutoComplete needs to be considered as a widget to trigger a search if no others widgets are used. * To be considered as a widget you need either getSearchParameters, getMetadata or getTransitionState * See createConnector.js * */ getSearchParameters: function getSearchParameters(searchParameters, props, searchState) { return searchParameters.setQuery(getCurrentRefinement(props, searchState, this.context)); } }); /***/ }) /******/ ]); }); //# sourceMappingURL=Connectors.js.map
app/routes.js
rhberro/the-react-client
import { Route, Switch } from 'react-router-dom' import React from 'react' import About from './components/views/About' import Home from './components/views/Home' import NotFound from './components/views/NotFound' function Routes () { return ( <Switch> <Route exact path='/' component={Home} /> <Route exact path='/about' component={About} /> <Route component={NotFound} /> </Switch> ) } export default Routes
testdriven/jquery-1.11.3.min.js
chyeh727/tut-tictactoe
/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{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":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){ return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.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(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
node_modules/material-ui/svg-icons/maps/local-offer.js
SerendpityZOEY/Solr-Search-React-UI
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _pure = require('recompose/pure'); var _pure2 = _interopRequireDefault(_pure); var _SvgIcon = require('../../SvgIcon'); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var MapsLocalOffer = function MapsLocalOffer(props) { return _react2.default.createElement( _SvgIcon2.default, props, _react2.default.createElement('path', { d: 'M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z' }) ); }; MapsLocalOffer = (0, _pure2.default)(MapsLocalOffer); MapsLocalOffer.displayName = 'MapsLocalOffer'; MapsLocalOffer.muiName = 'SvgIcon'; exports.default = MapsLocalOffer;
docs/src/pages/components/tooltips/DelayTooltips.js
allanalexandre/material-ui
import React from 'react'; import Button from '@material-ui/core/Button'; import Tooltip from '@material-ui/core/Tooltip'; function DelayTooltips() { return ( <Tooltip title="Add" enterDelay={500} leaveDelay={200}> <Button>[500ms, 200ms]</Button> </Tooltip> ); } export default DelayTooltips;
src/views/components/projects/ProjectUserEditor.js
Domiii/project-empire
import { getOptionalArgument, NOT_LOADED } from 'dbdi/util'; import { EmptyObject, EmptyArray } from 'src/util'; import map from 'lodash/map'; import isEmpty from 'lodash/isEmpty'; import pickBy from 'lodash/pickBy'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import autoBind from 'react-autobind'; import {dataBind} from 'dbdi/react'; import Moment from 'react-moment'; import { Alert, Button, Badge, Panel } from 'react-bootstrap'; import Flexbox from 'flexbox-react'; import Form from 'react-jsonschema-form'; import Select from 'react-select'; import LoadIndicator from 'src/views/components/util/LoadIndicator'; import ConfirmModal from 'src/views/components/util/ConfirmModal'; import UserList from 'src/views/components/users/UserList'; import UserBadge from 'src/views/components/users/UserBadge'; import { FAIcon } from 'src/views/components/util'; // ################################################################### // UserListEditor // ################################################################### // // eslint-disable-next-line react/prop-types // function DeleteUserButton({ open }) { // return (<Button onClick={open} bsSize="small" // className="color-red no-padding"> // <FAIcon name="trash" /> // </Button>); // } // <ConfirmModal // header="Delete user from project?" // ButtonCreator={DeleteUserButton} // onConfirm={deleteUser} // > // <UserBadge uid={uid} size="tiny" /> // </ConfirmModal> const ExistingUserEl = dataBind({ deleteUser(evt, { uid, thisProjectId }, { deleteUserFromProject }) { return deleteUserFromProject({ uid, projectId: thisProjectId }); } })( ({ uid }, { deleteUser }) => { return (<Badge> <span className="user-tag"> <UserBadge uid={uid} size="tiny" /> &nbsp; <Button onClick={deleteUser} bsSize="small" className="color-red no-padding"> <FAIcon name="trash" /> </Button> </span> </Badge>); }); // // eslint-disable-next-line react/prop-types // function AddUserButton({ open }) { // return (<Button onClick={open} // className="color-green no-padding" // bsSize="small"> // <FAIcon name="plus" /> // </Button>); // } // <ConfirmModal // header="Delete user from project?" // ButtonCreator={AddUserButton} // onConfirm={addUser} // > // <UserBadge uid={uid} size="tiny" /> // </ConfirmModal> const AddUserEl = dataBind({ addUser(evt, { uid, thisProjectId }, { addUserToProject }) { return addUserToProject({ uid, projectId: thisProjectId }); } })( ({ uid }, { addUser }) => { return (<Badge> <span className="user-tag"> <UserBadge uid={uid} size="tiny" /> &nbsp; <Button onClick={addUser} className="color-green no-padding" bsSize="small"> <FAIcon name="plus" /> </Button> </span> </Badge>); } ); const ProjectUserList = dataBind({})(function ProjectUserList( { userFn, emptyText }, { } ) { const addableUids = userFn(); if (addableUids !== NOT_LOADED) { if (isEmpty(addableUids)) { return ( <Alert bsStyle="warning" className="no-padding"> {emptyText} </Alert> ); } else { return ( <UserList uids={addableUids} renderUser={AddUserEl} /> ); } } else { return <LoadIndicator block />; } }); const noMarginStyle = { margin: '0 !important' }; @dataBind({ getAllUidsWithProjectButNotInCurrent( { projectId }, { uidsWithProjectButNotIn } ) { return uidsWithProjectButNotIn({ projectId }); } }) export default class ProjectUserEditor extends Component { constructor(...args) { super(...args); this.state = { addAllUsers: false }; } toggleAddAllUsers = () => { this.setState({ addAllUsers: !this.state.addAllUsers }); }; render( { projectId }, { uidsOfProject, uidsWithoutProject, getAllUidsWithProjectButNotInCurrent }, { } ) { const { addAllUsers } = this.state; let existingUsersEl; if (uidsOfProject.isLoaded({ projectId })) { const existingUids = Object.keys(uidsOfProject({ projectId })); if (isEmpty(existingUids)) { existingUsersEl = (<Alert bsStyle="warning" className="no-padding">no users in team</Alert>); } else { existingUsersEl = ( <UserList uids={existingUids} renderUser={ExistingUserEl} /> ); } } else { existingUsersEl = <LoadIndicator block />; } return (<Flexbox flexDirection="row" justifyContent="flex-start" alignItems="stretch" className="full-width"> <Flexbox flex="20" alignItems="stretch" className="full-width"> <Panel className="full-width full-height no-margin" style={noMarginStyle}> <Panel.Heading> Remove user from project </Panel.Heading> <Panel.Body> {existingUsersEl} </Panel.Body> </Panel> </Flexbox> <Flexbox flex="1" /> <Flexbox flex="20" className="full-width" flexDirection="column" alignItems="stretch"> <Panel header=""> <Panel.Heading> Users w/o project </Panel.Heading> <Panel.Body> <ProjectUserList emptyText="no users without project" userFn={uidsWithoutProject} /> </Panel.Body> </Panel> <Panel className="no-margin"> <Panel.Heading> <Button onClick={this.toggleAddAllUsers} active={addAllUsers}> <FAIcon name="users" /> Show users with projects </Button> </Panel.Heading> <Panel.Body> {addAllUsers && (<div> <ProjectUserList emptyText="no users with project" userFn={getAllUidsWithProjectButNotInCurrent} /> </div>)} </Panel.Body> </Panel> </Flexbox> </Flexbox>); } }
ajax/libs/flocks.js/1.6.1/flocks.min.js
davidbau/cdnjs
if("undefined"===typeof React)var React=require("react"); (function(){function h(a){return"[object Array]"===Object.prototype.toString.call(a)}function l(a){return"undefined"===typeof a}function v(a){return"object"!==typeof a||"[object Array]"===Object.prototype.toString.call(a)?!1:!0}function b(a,c){if("string"===typeof a)if(~"warn debug error log info exception assert".split(" ").indexOf(a,0))console[a]("Flocks2 ["+a+"] "+c.toString());else console.log("Flocks2 [Unknown level] "+c.toString());else l(d.flocks2Config)?console.log("Flocks2 pre-config ["+ a.toString()+"] "+c.toString()):d.flocks2Config.log_level>=a&&console.log("Flocks2 ["+a.toString()+"] "+c.toString())}function m(){b(3," - Flocks2 attempting update");if(!w)return b(1," x Flocks2 skipped update: root is not initialized"),null;if(n)return b(1," x Flocks2 skipped update: lock count updateBlocks is non-zero"),null;if(!x(d))return b(0," ! Flocks2 rolling back update: handler rejected propset"),d=e,null;e=d;b(3," - Flocks2 update passed");"detatched"===e.flocks2Config.target?b(3," - Flocks2 skipping render because explicitly detatched"): (b(3," - Flocks2 rendering"),React.render(React.createFactory(q)({flocks2context:d}),e.flocks2Config.target));b(3," - Flocks2 update complete; finalizing");y();return!0}function z(a,c){if("string"!==typeof a)throw c||"Argument must be a string";}function A(a,c){if(!h(a))throw c||"Argument must be an array";}function B(a,c){if(!v(a))throw c||"Argument must be a non-array object";}function C(a,c,b){var d;if(!h(a))throw"Path must be an array!";if(0===a.length)return c;if(1===a.length)return d=c[a[0]], c[a[0]]=b,d;if(-1!==["string","number"].indexOf(typeof a[0]))return d=a.splice(1,Number.MAX_VALUE),C(d,c[a[0]],b)}function D(a,c){A(a,"Flocks2 setByPathh/2 must take an array for its key");b(1,' - Flocks2 setByPath "'+a.join("|")+'"');C(a,d,c);m()}function r(a,c){b(3," - Flocks2 multi-set");if("string"===typeof a)z(a,"Flocks2 set/2 must take a string for its key"),d[a]=c,b(1,' - Flocks2 setByKey "'+a+'"'),m();else{if(h(a))return D(a,c);throw"Flocks2 set/1,2 key must be a string or an array";}} function J(a){return e[a]}function E(a,c){var b;if(!h(a))throw"path must be an array!";if(0===a.length)return c;if(1===a.length)return c[a[0]];if(-1!==["string","number"].indexOf(typeof a[0]))return b=a.splice(1,Number.MAX_VALUE),E(b,c[a[0]])}function t(a){return E(a,e)}function F(a){b(3," - Flocks2 multi-get");if("string"===typeof a)return e[a];if(h(a))return t(a);throw"Flocks2 get/1 key must be a string or an array";}function G(a){console.log("ERROR: stub called!");B(a,"Flocks2 update/1 must take a plain object")} function K(){++n}function H(){if(0>=n)throw"unlock()ed with no lock!";--n;m()}function u(a){var c=a.constructor(),b;if(null===a||"object"!==typeof a)return a;for(b in a)a.hasOwnProperty(b)&&(c[b]=a[b]);return c}function I(a){if(l(a))return[p];if(h(a)){if(~a.indexOf(p,0))return a;a=u(a);a.push(p);return a}throw"Original mixin list must be an array or undefined!";}var p,k,w=!1,n=0,q,x=function(a){return!0},y=function(){return!0},e={},d={};k={flocks2context:React.PropTypes.object};p={contextTypes:k, childContextTypes:k,componentWillMount:function(){b(1," - Flocks2 component will mount: "+this.constructor.displayName);b(3,l(this.props.flocks2context)?" - No F2 Context Prop":" - F2 Context Prop found");b(3,l(this.context.flocks2context)?" - No F2 Context":" - F2 Context found");this.props.flocks2context&&(this.context.flocks2context=this.props.flocks2context);this.fupdate=function(a){return G(a)};this.fget=function(a){return F(a)};this.fgetkey=function(a){return e[a]};this.fgetpath=function(a){return t(a)}; this.fset=function(a,b){return r(a,b)};this.fsetpath=function(a,b){return r(a,b)};this.flock=function(){++n};this.funlock=function(){return H()};this.fctx=this.context.flocks2context},getChildContext:function(){return this.context}};k={version:"1.6.1",createClass:function(a){a.mixins=I(a.mixins);return React.createClass(a)},mount:function(a,c){var g=a||{},e=c||{},f=function(){console.log("ERROR: stub called!");m()},f={override:f,clear:f,get:F,get_key:J,get_path:t,set:r,set_path:D,update:G,lock:K, unlock:H};g.log_level=g.log_level||-1;q=g.control;e.flocks2Config=g;d=e;b(1,"Flocks2 root creation begins");if(!q)throw"Flocks2 fatal error: must provide a control in create/2 FlocksConfig";g.handler&&(x=g.handler,b(3," - Flocks2 handler assigned"));g.finalizer&&(y=g.finalizer,b(3," - Flocks2 finalizer assigned"));g.preventAutoContext?b(2," - Flocks2 skipping auto-context"):(b(2," - Flocks2 engaging auto-context"),this.fctx=u(d));b(3,"Flocks2 creation finished; initializing");w=!0;m();b(3,"Flocks2 expose updater"); this.fupd=f;this.fset=f.set;this.fgetkey=f.get_key;this.fgetpath=f.get_path;this.flock=f.lock;this.funlock=f.unlock;this.fupdate=f.update;b(3,"Flocks2 initialization finished");return f},clone:u,isArray:h,isUndefined:l,isStringOfNonNegInt:function(a){return"string"!==typeof a?!1:/^(0|[1-9]\d*)$/.test(a)},isNonArrayObject:v,enforceString:z,enforceArray:A,enforceNonArrayObject:B,atLeastFlocks:I,plumbing:p};"undefined"!==typeof module?module.exports=k:window.flocks=k})();
es/components/viewer2d/scene.js
vovance/3d-demo
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); import React from 'react'; import PropTypes from 'prop-types'; import Layer from './layer'; import Guides from './guides/guides'; export default function Scene(_ref) { var scene = _ref.scene, catalog = _ref.catalog; var height = scene.height, layers = scene.layers; var selectedLayer = scene.layers.get(scene.selectedLayer); return React.createElement( 'g', null, React.createElement(Guides, { scene: scene }), React.createElement( 'g', { style: { pointerEvents: "none" } }, layers.entrySeq().filter(function (_ref2) { var _ref3 = _slicedToArray(_ref2, 2), layerID = _ref3[0], layer = _ref3[1]; return layerID !== scene.selectedLayer && layer.visible; }).map(function (_ref4) { var _ref5 = _slicedToArray(_ref4, 2), layerID = _ref5[0], layer = _ref5[1]; return React.createElement(Layer, { key: layerID, layer: layer, scene: scene, catalog: catalog }); }) ), React.createElement(Layer, { key: selectedLayer.id, layer: selectedLayer, scene: scene, catalog: catalog }) ); } Scene.propTypes = { scene: PropTypes.object.isRequired, catalog: PropTypes.object.isRequired };
components/EventsCard.js
cleaskitchen/cleaskitchen.github.io
import React from 'react'; import {Card,CardMedia} from 'material-ui/Card'; import {Grid,Row,Col} from 'react-bootstrap'; const EventsCard = () => ( <Grid> <Row> <Col md={4}> <Card> <CardMedia> <img src="./images/Chalkboard-background.jpg" /> </CardMedia> </Card> </Col> </Row> </Grid> ); export default EventsCard;
src/svg-icons/notification/sd-card.js
ichiohta/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationSdCard = (props) => ( <SvgIcon {...props}> <path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"/> </SvgIcon> ); NotificationSdCard = pure(NotificationSdCard); NotificationSdCard.displayName = 'NotificationSdCard'; NotificationSdCard.muiName = 'SvgIcon'; export default NotificationSdCard;
chrome-extension/src/browser_action/containers/App/index.js
hiiamyes/paiyun-auto-apply
import React, { Component } from 'react'; import styled from 'styled-components'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import Select from 'react-select'; import DatePicker from 'react-datepicker'; import moment from 'moment'; import Loader from 'halogen/ScaleLoader'; import classNames from 'classnames/bind'; import 'toastr/build/toastr.min.css'; import toastr from 'toastr/build/toastr.min'; import styles from './styles.scss'; import * as actions from 'containers/App/ducks'; import firebaseConfig from '../../../../configs/firebaseConfig'; import * as mixpanelApp from '../../../../mixpanels/app'; import Header from './Header'; import MyApply from './MyApply'; import NewApply from './NewApply'; toastr.options = { positionClass: 'toast-top-center', timeOut: '3000', progressBar: true, }; const cx = classNames.bind(styles); class App extends Component { constructor(props) { super(props); const { actions: { init, setIn } } = props; firebase.initializeApp(firebaseConfig); firebase.auth().onAuthStateChanged((user) => { if (user) { init(user); } else { setIn(['user'], null); setIn(['isSignInOutIng'], false); } }); } render() { const { user, route, isSignInOutIng } = this.props; return ( <div className={cx('app')}> <Header /> <div className={cx('content')}> {!isSignInOutIng && user && route === 'ROUTE_MY_APPLY' && <MyApply />} {!isSignInOutIng && user && route === 'ROUTE_NEW_APPLY' && <NewApply />} </div> </div> ); } } export default connect( ({ AppReducer }) => ({ route: AppReducer.get('route'), isSignInOutIng: AppReducer.get('isSignInOutIng'), user: AppReducer.get('user'), application: AppReducer.get('application'), }), dispatch => ({ actions: bindActionCreators(actions, dispatch) }), )(App);
packages/material-ui-icons/src/Brightness7Sharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z" /> , 'Brightness7Sharp');
assets/script/modules/wedding-pat.min.js
eavlee/Funky
!function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Banner=void 0;var o=e("react"),i=r(o),a=i["default"].createClass({displayName:"Banner",render:function(){return i["default"].createElement("div",{className:"bannar-box"},i["default"].createElement("img",{src:this.props.imageUrl}))},propTypes:{imageUrl:i["default"].PropTypes.string},getDefaultProps:function(){return{imageUrl:"http://placehold.it/1920x690"}}});n.Banner=a},{react:171}],2:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.CasesList=void 0;var o=e("react"),i=r(o),a=e("./scheme-list-item.jsx"),s=i["default"].createClass({displayName:"CasesList",render:function(){return i["default"].createElement("div",{className:"case-list-view"},i["default"].createElement("div",{className:"screening-results"},i["default"].createElement("span",{className:"find"},i["default"].createElement("span",null,"找到最佳案例"),i["default"].createElement("b",{className:"J_Count"},"-"),i["default"].createElement("span",null,"套"))),i["default"].createElement(a.SchemeListItem,this.props))},propTypes:{dataUrl:i["default"].PropTypes.string},getDefaultProps:function(){return{dataUrl:""}}});n.CasesList=s},{"./scheme-list-item.jsx":5,react:171}],3:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.MediaItem=void 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},i=e("react"),a=r(i),s=/_(\d{1,4})x(\d{1,4})\.\w+g$/i,u=a["default"].createClass({displayName:"ImageItem",render:function(){var e=this.props.width,t=this.props.height,n=this.props.mediaUrl.match(s),r="@"+this.props.width+"h_"+this.props.height+"w_90Q";r=this.props.water?r+"|watermark=1&object=c2h1aXlpbi5wbmc&t=80&p=5&y=10&x=10":r;var o=this.props.mediaUrl;return n&&3===n.length&&(e=parseFloat(n[1]),t=parseFloat(n[2])),a["default"].createElement("div",{className:"J_MediaWrapper",style:{height:"100%"},"data-width":e,"data-height":t},a["default"].createElement("img",{src:o}))}}),c=a["default"].createClass({displayName:"MediaItem",render:function(){var e=this.props.aspectRatio.split(":"),t=1,n=1;return this.props.width?(n=parseInt(this.props.width*parseFloat(e[1])/parseFloat(e[0])),t=this.props.width):this.props.height?(t=parseInt(this.props.height*parseFloat(e[0])/parseFloat(e[1])),n=this.props.height):console.log("高度或者宽度必须指定一个啊."),this.props.autoplay?a["default"].createElement("h1",null,"Vidoe"):a["default"].createElement(u,o({},this.props,{height:n,width:t}))},propTypes:{autoplay:a["default"].PropTypes.bool,width:a["default"].PropTypes.number,height:a["default"].PropTypes.number,aspectRatio:a["default"].PropTypes.string,coverUrl:a["default"].PropTypes.string,mediaUrl:a["default"].PropTypes.string,water:a["default"].PropTypes.bool},getDefaultProps:function(){return{mediaUrl:"//placehold.it/380x570",aspectRatio:"2:3"}}});n.MediaItem=c},{react:171}],4:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.MediaSlider=void 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},i=e("react"),a=r(i),s=e("lodash"),u=r(s),c=e("./media-item.jsx"),l=a["default"].createClass({displayName:"MediaSlider",render:function(){var e=this.props;return a["default"].createElement("ul",{className:"slider"},u["default"].map(this.state.data,function(t,n){return a["default"].createElement("li",{className:"item transition-opacity-1",key:n},a["default"].createElement(c.MediaItem,o({},e,{mediaUrl:t.coverUrlWeb})))}),a["default"].createElement("div",{className:"point-box"},u["default"].map(this.state.data,function(e,t){return a["default"].createElement("li",{key:t,className:"point"})})))},propTypes:{dataUrl:a["default"].PropTypes.string},getDefaultProps:function(){return{dataUrl:void 0}},getInitialState:function(){return{data:[{coverUrlWeb:"//placehold.it/1920x450"}]}},componentDidMount:function(){var e=this;void 0!==this.props.dataUrl&&fetch(this.props.baseUrl+this.props.dataUrl).then(function(e){return e.json()}).then(function(t){e.setState({data:t.data},function(){$("#slider_top").length>0&&$("#slider_top").Slider()})})}});n.MediaSlider=l},{"./media-item.jsx":3,lodash:41,react:171}],5:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.SchemeListItem=void 0;var o=e("react"),i=r(o),a=e("lodash"),s=r(a),u=e("./media-item.jsx"),c=i["default"].createClass({displayName:"SchemeListItem",render:function(){return i["default"].createElement("ul",{className:"cases-list"},s["default"].map(this.state.data,function(e,t){return i["default"].createElement("li",{className:"item-box",key:t},i["default"].createElement("div",{className:"img-box"},i["default"].createElement(u.MediaItem,{aspectRatio:"3:2",width:380,mediaUrl:e.coverUrlWeb||"//placehold.it/380x253"}),i["default"].createElement("a",{className:"layer-box",href:"/",target:"_blank"},i["default"].createElement("div",{className:"layer"}),i["default"].createElement("div",{className:"info"},i["default"].createElement("h3",null,e.name),i["default"].createElement("div",{className:"date"},i["default"].createElement("b",null,e.price||""),i["default"].createElement("span",null,"(",e.holdingTime,")"))))))}))},getInitialState:function(){return{data:[]}},componentDidMount:function(){var e=this;void 0!==this.props.dataUrl&&fetch(this.props.baseUrl+this.props.dataUrl).then(function(e){return e.json()},function(e){console.log("network is down:",e)}).then(function(t){e.setState({data:t.data}),$(".J_Count").html(s["default"].size(t.data))})}});n.SchemeListItem=c},{"./media-item.jsx":3,lodash:41,react:171}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={baseUrl:"//cd.jsbn.com:7001/api/"};n.BaseConfig=r},{}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={"/":[{cn:"婚纱摄影",en:"PHOTO",link:"/shot"},{cn:"婚宴预订",en:"BANQUET",link:"/hotel"},{cn:"婚庆定制",en:"WEDDING",link:"/scheme"},{cn:"婚纱礼服",en:"DRESS",link:"/dress"},{cn:"微电影",en:"MOVIE",link:"/movie"},{cn:"婚介钻石",en:"DIAMOND",link:"http://www.chinad9.com"},{cn:"婚礼用品",en:"SUPPLIES",link:"/supply"},{cn:"婚车租赁",en:"CAR",link:"/car"}],"/home":[{cn:"婚纱摄影",en:"PHOTO",link:"/shot"},{cn:"婚宴预订",en:"BANQUET",link:"/hotel"},{cn:"婚庆定制",en:"WEDDING",link:"/scheme"},{cn:"婚纱礼服",en:"DRESS",link:"/dress"},{cn:"微电影",en:"MOVIE",link:"/movie"},{cn:"婚介钻石",en:"DIAMOND",link:"http://www.chinad9.com"},{cn:"婚礼用品",en:"SUPPLIES",link:"/supply"},{cn:"婚车租赁",en:"CAR",link:"/car"}],"/shot":[{cn:"全站首页",en:"HOME",link:"/"},{cn:"婚纱摄影首页",en:"PHOTO",link:"/shot"},{cn:"作品欣赏",en:"WORKS",link:"/sample"},{cn:"客片欣赏",en:"PRINGLES",link:"/pringles"},{cn:"套系报价",en:"SUITE",link:"/suite"},{cn:"旅拍",en:"TRIP",link:"http://trip.jsbn.com"},{cn:"婚纱纪实",en:"MV",link:"/weddingmv"},{cn:"婚照技巧",en:"TIPS",link:"/weddingclass/1"}],"/hotel":[{cn:"全站首页",en:"HOME",link:"/"},{cn:"婚宴预订首页",en:"BANQUET",link:"/hotel"},{cn:"提交需求",en:"REQUIRE",link:"/hotel-require"},{cn:"大礼包",en:"GIFT",link:"/activity?type=gift"},{cn:"婚宴知识",en:"CLASS",link:"/weddingclass/2"}],"/scheme":[{cn:"全站首页",en:"HOME",link:"/"},{cn:"婚庆首页",en:"WEDDING",link:"/scheme"},{cn:"实景案例",en:"CASES",link:"/cases"},{cn:"婚礼跟拍",en:"FOLLOW",link:"/weddingpat"},{cn:"婚礼视频",en:"VIDEO",link:"/weddingvideo"},{cn:"提交需求",en:"REQUIRE",link:"/scheme-require"},{cn:"选婚礼人",en:"F4",link:"/f4"},{cn:"婚宴知识",en:"CLASS",link:"/weddingclass/3"}],"/dress":[{cn:"全站首页",en:"HOME",link:"/"},{cn:"婚纱礼服",en:"DRESS",link:"/dress"},{cn:"礼服知识",en:"CLASS",link:"/weddingclass/4"}],"/movie":[{cn:"全站首页",en:"HOME",link:"/"},{cn:"微电影首页",en:"MOVIE",link:"/movie"},{cn:"表演技巧",en:"CLASS",link:"/weddingclass/5"}],"/supply":[{cn:"全站首页",en:"HOME",link:"/"},{cn:"婚礼用品首页",en:"SUPPLIES",link:"/supply"},{cn:"用品贴士",en:"TIPS",link:"/weddingclass/7"}],"/car":[{cn:"全站首页",en:"HOME",link:"/"},{cn:"婚车租赁首页",en:"CAR",link:"/car"},{cn:"租车经验",en:"TIPS",link:"/weddingclass/8"}]};n.MenuConfig=r},{}],8:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.WeddingPatConfig=void 0;var o=e("./base"),i=e("lodash"),a=r(i),s={Banner:[{imageUrl:"//image.jsbn.com/static/hlgp.jpg"}],MediaSlider:a["default"].merge({dataUrl:"adv/weddingpat_top",aspectRatio:"192:45",height:450},o.BaseConfig),CasesList:a["default"].merge({dataUrl:"followPhoto/weddingpat_list"},o.BaseConfig)};n.WeddingPatConfig=s},{"./base":6,lodash:41}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Navigation=void 0;var o=e("react"),i=r(o),a=e("./config/menu-config.js"),s=e("lodash"),u=r(s),c=i["default"].createClass({displayName:"Navigation",render:function(){var e=this.props.currentKey;return i["default"].createElement("div",null,u["default"].map(a.MenuConfig[this.props.menuKey],function(t,n){var r="item";return r="/"===t.link||"/home"===t.link?"item":t.link===e?"item sec-nav-ch item-current":"item sec-nav-ch",i["default"].createElement("a",{key:n,href:t.link},i["default"].createElement("div",{className:r},i["default"].createElement("div",{className:"ch"},i["default"].createElement("span",null,t.cn),i["default"].createElement("div",{className:"en"},t.en),i["default"].createElement("div",{className:"arrow-5-js triangle"}))))}))},propTypes:{menuKey:i["default"].PropTypes.string,currentKey:i["default"].PropTypes.string},getDefaultProps:function(){return{menuKey:"/",currentKey:"/"}},componentWillReceiveProps:function(e){}});n.Navigation=c},{"./config/menu-config.js":7,lodash:41,react:171}],10:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0}),n.WeddingPat=void 0;var o=e("react"),i=r(o),a=e("./common/media-slider.jsx"),s=e("./common/banner.jsx"),u=e("./config/wedding-pat-config"),c=e("./common/cases-list.jsx"),l=i["default"].createClass({displayName:"WeddingPat",render:function(){return i["default"].createElement("div",{className:"hlgp-view"},i["default"].createElement("div",{className:"bannar-all-box"},i["default"].createElement("div",{id:"slider_top",className:"slider-box bannar",style:{height:"450px"}},i["default"].createElement(a.MediaSlider,u.WeddingPatConfig.MediaSlider))),i["default"].createElement("div",{className:"layout-center-box"},i["default"].createElement(s.Banner,u.WeddingPatConfig.Banner[0]),i["default"].createElement(c.CasesList,u.WeddingPatConfig.CasesList),i["default"].createElement("div",{onClick:this.loadMore,id:"J_MoreButton"},i["default"].createElement("div",{className:"more-btn"},i["default"].createElement("span",null,"点击查看更多")))))}});n.WeddingPat=l},{"./common/banner.jsx":1,"./common/cases-list.jsx":2,"./common/media-slider.jsx":4,"./config/wedding-pat-config":8,react:171}],11:[function(e,t,n){(function(n,r){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function a(e){K=e}function s(e){$=e}function u(){return function(){n.nextTick(f)}}function c(){return function(){q(f)}}function l(){var e=0,t=new J(f),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function p(){var e=new MessageChannel;return e.port1.onmessage=f,function(){e.port2.postMessage(0)}}function d(){return function(){setTimeout(f,1)}}function f(){for(var e=0;G>e;e+=2){var t=te[e],n=te[e+1];t(n),te[e]=void 0,te[e+1]=void 0}G=0}function h(){try{var t=e,n=t("vertx");return q=n.runOnLoop||n.runOnContext,c()}catch(r){return d()}}function v(e,t){var n=this,r=n._state;if(r===ie&&!e||r===ae&&!t)return this;var o=new this.constructor(g),i=n._result;if(r){var a=arguments[r-1];$(function(){T(r,o,a,i)})}else M(n,o,e,t);return o}function m(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(g);return D(n,e),n}function g(){}function y(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(t){return se.error=t,se}}function E(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function N(e,t,n){$(function(e){var r=!1,o=E(n,t,function(n){r||(r=!0,t!==n?D(e,n):w(e,n))},function(t){r||(r=!0,x(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,x(e,o))},e)}function C(e,t){t._state===ie?w(e,t._result):t._state===ae?x(e,t._result):M(t,void 0,function(t){D(e,t)},function(t){x(e,t)})}function O(e,t,n){t.constructor===e.constructor&&n===ne&&constructor.resolve===re?C(e,t):n===se?x(e,se.error):void 0===n?w(e,t):i(n)?N(e,t,n):w(e,t)}function D(e,t){e===t?x(e,y()):o(t)?O(e,t,b(t)):w(e,t)}function R(e){e._onerror&&e._onerror(e._result),P(e)}function w(e,t){e._state===oe&&(e._result=t,e._state=ie,0!==e._subscribers.length&&$(P,e))}function x(e,t){e._state===oe&&(e._state=ae,e._result=t,$(R,e))}function M(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ie]=n,o[i+ae]=r,0===i&&e._state&&$(P,e)}function P(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?T(n,r,o,i):o(i);e._subscribers.length=0}}function I(){this.error=null}function S(e,t){try{return e(t)}catch(n){return ue.error=n,ue}}function T(e,t,n,r){var o,a,s,u,c=i(n);if(c){if(o=S(n,r),o===ue?(u=!0,a=o.error,o=null):s=!0,t===o)return void x(t,_())}else o=r,s=!0;t._state!==oe||(c&&s?D(t,o):u?x(t,a):e===ie?w(t,o):e===ae&&x(t,o))}function k(e,t){try{t(function(t){D(e,t)},function(t){x(e,t)})}catch(n){x(e,n)}}function j(e){return new he(this,e).promise}function A(e){function t(e){D(o,e)}function n(e){x(o,e)}var r=this,o=new r(g);if(!Y(e))return x(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,a=0;o._state===oe&&i>a;a++)M(r.resolve(e[a]),void 0,t,n);return o}function V(e){var t=this,n=new t(g);return x(n,e),n}function U(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function L(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function F(e){this._id=de++,this._state=void 0,this._result=void 0,this._subscribers=[],g!==e&&("function"!=typeof e&&U(),this instanceof F?k(this,e):L())}function B(e,t){this._instanceConstructor=e,this.promise=new e(g),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?w(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&w(this.promise,this._result))):x(this.promise,this._validationError())}function W(){var e;if("undefined"!=typeof r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(e.Promise=fe)}var H;H=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var q,K,z,Y=H,G=0,$=function(e,t){te[G]=e,te[G+1]=t,G+=2,2===G&&(K?K(f):z())},Q="undefined"!=typeof window?window:void 0,X=Q||{},J=X.MutationObserver||X.WebKitMutationObserver,Z="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);z=Z?u():J?l():ee?p():void 0===Q&&"function"==typeof e?h():d();var ne=v,re=m,oe=void 0,ie=1,ae=2,se=new I,ue=new I,ce=j,le=A,pe=V,de=0,fe=F;F.all=ce,F.race=le,F.resolve=re,F.reject=pe,F._setScheduler=a,F._setAsap=s,F._asap=$,F.prototype={constructor:F,then:ne,"catch":function(e){return this.then(null,e)}};var he=B;B.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},B.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===oe&&e>n;n++)this._eachEntry(t[n],n)},B.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===re){var o=b(e);if(o===ne&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===fe){var i=new n(g);O(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},B.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===oe&&(this._remaining--,e===ae?x(r,n):this._result[t]=n),0===this._remaining&&w(r,this._result)},B.prototype._willSettleAt=function(e,t){var n=this;M(e,void 0,function(e){n._settledAt(ie,t,e)},function(e){n._settledAt(ae,t,e)})};var ve=W,me={Promise:fe,polyfill:ve};"function"==typeof define&&define.amd?define(function(){return me}):"undefined"!=typeof t&&t.exports?t.exports=me:"undefined"!=typeof this&&(this.ES6Promise=me),ve()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:42}],12:[function(e,t,n){(function(n){"use strict";var r=e("./emptyFunction"),o={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,o){return e.addEventListener?(e.addEventListener(t,o,!0),{remove:function(){e.removeEventListener(t,o,!0)}}):("production"!==n.env.NODE_ENV&&console.error("Attempted to listen to events during the capture phase on a browser that does not support the capture phase. Your application will not receive some events."),{remove:r})},registerDefault:function(){}};t.exports=o}).call(this,e("_process"))},{"./emptyFunction":19,_process:42}],13:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],14:[function(e,t,n){"use strict";function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;t.exports=r},{}],15:[function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=e("./camelize"),i=/^-ms-/;t.exports=r},{"./camelize":14}],16:[function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,i=t;if(n=!1,r&&i){if(r===i)return!0;if(o(r))return!1;if(o(i)){e=r,t=i.parentNode,n=!0;continue e}return r.contains?r.contains(i):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(i)):!1}return!1}}var o=e("./isTextNode");t.exports=r},{"./isTextNode":29}],17:[function(e,t,n){"use strict";function r(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 r(e)?Array.isArray(e)?e.slice():i(e):[e]}var i=e("./toArray");t.exports=o},{"./toArray":37}],18:[function(e,t,n){(function(n){"use strict";function r(e){var t=e.match(l);return t&&t[1].toLowerCase()}function o(e,t){var o=c;c?void 0:"production"!==n.env.NODE_ENV?u(!1,"createNodesFromMarkup dummy not initialized"):u(!1);var i=r(e),l=i&&s(i);if(l){o.innerHTML=l[1]+e+l[2];for(var p=l[0];p--;)o=o.lastChild}else o.innerHTML=e;var d=o.getElementsByTagName("script");d.length&&(t?void 0:"production"!==n.env.NODE_ENV?u(!1,"createNodesFromMarkup(...): Unexpected <script> element rendered."):u(!1),a(d).forEach(t));for(var f=a(o.childNodes);o.lastChild;)o.removeChild(o.lastChild);return f}var i=e("./ExecutionEnvironment"),a=e("./createArrayFromMixed"),s=e("./getMarkupWrap"),u=e("./invariant"),c=i.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=o}).call(this,e("_process"))},{"./ExecutionEnvironment":13,"./createArrayFromMixed":17,"./getMarkupWrap":23,"./invariant":27,_process:42}],19:[function(e,t,n){"use strict";function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],20:[function(e,t,n){(function(e){"use strict";var n={};"production"!==e.env.NODE_ENV&&Object.freeze(n),t.exports=n}).call(this,e("_process"))},{_process:42}],21:[function(e,t,n){"use strict";function r(e){try{e.focus()}catch(t){}}t.exports=r},{}],22:[function(e,t,n){"use strict";function r(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=r},{}],23:[function(e,t,n){(function(n){"use strict";function r(e){return a?void 0:"production"!==n.env.NODE_ENV?i(!1,"Markup wrapping node not initialized"):i(!1),d.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=e("./ExecutionEnvironment"),i=e("./invariant"),a=o.canUseDOM?document.createElement("div"):null,s={},u=[1,'<select multiple="true">',"</select>"],c=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,s[e]=!0}),t.exports=r}).call(this,e("_process"))},{"./ExecutionEnvironment":13,"./invariant":27,_process:42}],24:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],25:[function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],26:[function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=e("./hyphenate"),i=/^ms-/;t.exports=r},{"./hyphenate":25}],27:[function(e,t,n){(function(e){"use strict";function n(t,n,r,o,i,a,s,u){if("production"!==e.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!t){var c;if(void 0===n)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,o,i,a,s,u],p=0;c=new Error(n.replace(/%s/g,function(){return l[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}t.exports=n}).call(this,e("_process"))},{_process:42}],28:[function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],29:[function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=e("./isNode");t.exports=r},{"./isNode":28}],30:[function(e,t,n){(function(n){"use strict";var r=e("./invariant"),o=function(e){var t,o={};e instanceof Object&&!Array.isArray(e)?void 0:"production"!==n.env.NODE_ENV?r(!1,"keyMirror(...): Argument must be an object."):r(!1);for(t in e)e.hasOwnProperty(t)&&(o[t]=t);return o};t.exports=o}).call(this,e("_process"))},{"./invariant":27,_process:42}],31:[function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],32:[function(e,t,n){"use strict";function r(e,t,n){if(!e)return null;var r={};for(var i in e)o.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],33:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],34:[function(e,t,n){"use strict";var r,o=e("./ExecutionEnvironment");o.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),t.exports=r||{}},{"./ExecutionEnvironment":13}],35:[function(e,t,n){"use strict";var r,o=e("./performance");r=o.now?function(){return o.now()}:function(){return Date.now()},t.exports=r},{"./performance":34}],36:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=o.bind(t),a=0;a<n.length;a++)if(!i(n[a])||e[n[a]]!==t[n[a]])return!1;return!0}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],37:[function(e,t,n){(function(n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?"production"!==n.env.NODE_ENV?o(!1,"toArray: Array-like object expected"):o(!1):void 0,"number"!=typeof t?"production"!==n.env.NODE_ENV?o(!1,"toArray: Object needs a length property"):o(!1):void 0,0===t||t-1 in e?void 0:"production"!==n.env.NODE_ENV?o(!1,"toArray: Object should have keys for indices"):o(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(r){}for(var i=Array(t),a=0;t>a;a++)i[a]=e[a];return i}var o=e("./invariant");t.exports=r}).call(this,e("_process"))},{"./invariant":27,_process:42}],38:[function(e,t,n){(function(n){"use strict";var r=e("./emptyFunction"),o=r;"production"!==n.env.NODE_ENV&&(o=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){var i=0,a="Warning: "+t.replace(/%s/g,function(){return r[i++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(s){}}}),t.exports=o}).call(this,e("_process"))},{"./emptyFunction":19,_process:42}],39:[function(e,t,n){var r=navigator.userAgent||"",o=navigator.appVersion||"",i=navigator.vendor||"",a=(r+" "+o+" "+i).toLowerCase(),s=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],u=s[0],c=s[2].split(".")[0];0===u.indexOf("chrome")&&c>=46?window.__disableNativeFetch=!1:0===u.indexOf("mozilla")&&c>=39?window.__disableNativeFetch=!1:window.__disableNativeFetch=!0},{}],40:[function(e,t,n){!function(){"use strict";function e(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){this.map={},e instanceof r?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function i(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),i(t)}function s(e){var t=new FileReader,n=e.type.match(/charset\=[0-9a-zA-Z\-\_]*;?/),r=[e];return n&&r.push(n[0].replace(/^charset\=/,"").replace(/;$/,"")),t.readAsText.apply(t,r),i(t)}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(h.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(h.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},h.blob?(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return s(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=o(this);return e?e:Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var n=t.body;if(l.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new r(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",(t.headers||!this.headers)&&(this.headers=new r(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function d(e){var t=new r,n=e.getAllResponseHeaders().trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),o=n.join(":").trim();t.append(r,o)}),t}function f(e,t){t||(t={}),this._initBody(e),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof r?t.headers:new r(t.headers),this.url=t.url||""}if(self.__disableNativeFetch||!self.fetch){r.prototype.append=function(t,r){t=e(t),r=n(r);var o=this.map[t];o||(o=[],this.map[t]=o),o.push(r)},r.prototype["delete"]=function(t){delete this.map[e(t)]},r.prototype.get=function(t){var n=this.map[e(t)];return n?n[0]:null},r.prototype.getAll=function(t){return this.map[e(t)]||[]},r.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},r.prototype.set=function(t,r){this.map[e(t)]=[n(r)]},r.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)};var h={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self},v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},u.call(l.prototype),u.call(f.prototype),f.prototype.clone=function(){return new f(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},f.error=function(){var e=new f(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];f.redirect=function(e,t){ if(-1===m.indexOf(t))throw new RangeError("Invalid status code");return new f(null,{status:t,headers:{location:e}})},self.Headers=r,self.Request=l,self.Response=f,self.fetch=function(e,t){return new Promise(function(n,r){function o(){return"responseURL"in s?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):void 0}function i(){if(4===s.readyState){var e=1223===s.status?204:s.status;if(100>e||e>599){if(u)return;return u=!0,void r(new TypeError("Network request failed"))}var t={status:e,statusText:s.statusText,headers:d(s),url:o()},i="response"in s?s.response:s.responseText;u||(u=!0,n(new f(i,t)))}}var a;a=l.prototype.isPrototypeOf(e)&&!t?e:new l(e,t);var s=new XMLHttpRequest,u=!1;s.onreadystatechange=i,s.onload=i,s.onerror=function(){u||(u=!0,r(new TypeError("Network request failed")))},s.open(a.method,a.url,!0);try{"include"===a.credentials&&("withCredentials"in s?s.withCredentials=!0:console&&console.warn&&console.warn("withCredentials is not supported, you can ignore this warning"))}catch(c){console&&console.warn&&console.warn("set withCredentials error:"+c)}"responseType"in s&&h.blob&&(s.responseType="blob"),a.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),s.send("undefined"==typeof a._bodyInit?null:a._bodyInit)})},self.fetch.polyfill=!0,"undefined"!=typeof t&&t.exports&&(t.exports=fetch)}}()},{}],41:[function(e,t,n){(function(e){(function(){function r(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function i(e,t,n){var r=n.length;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function a(e,t,n,r){for(var o=-1,i=e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function s(e,t){for(var n=-1,r=e.length,o=-1,i=t.length,a=Array(r+i);++n<r;)a[n]=e[n];for(;++o<i;)a[n++]=t[o];return a}function u(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function c(e,t){for(var n=e.length;n--&&t(e[n],n,e)!==!1;);return e}function l(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function p(e,t){for(var n=-1,r=e.length,o=-1,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[++o]=a)}return i}function d(e,t){return!!e.length&&N(e,t,0)>-1}function f(e,t,n){for(var r=-1,o=e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function h(e,t){for(var n=-1,r=e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function v(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function m(e,t,n,r){var o=-1,i=e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function g(e,t,n,r){var o=e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function y(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function _(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(s===$?a===a:n(a,s)))var s=a,u=i}return u}function b(e,t,n,r){var o;return n(e,function(e,n,i){return t(e,n,i)?(o=r?n:e,!1):void 0}),o}function E(e,t,n){for(var r=e.length,o=n?r:-1;n?o--:++o<r;)if(t(e[o],o,e))return o;return-1}function N(e,t,n){if(t!==t)return U(e,n);for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function C(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function O(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function D(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);i!==$&&(n=n===$?i:n+i)}return n}function R(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function w(e,t){return h(t,function(t){return[t,e[t]]})}function x(e){return function(t){return e(t)}}function M(e,t){return h(t,function(t){return e[t]})}function P(e,t){for(var n=-1,r=e.length;++n<r&&N(t,e[n],0)>-1;);return n}function I(e,t){for(var n=e.length;n--&&N(t,e[n],0)>-1;);return n}function S(e){return e&&e.Object===Object?e:null}function T(e,t){if(e!==t){var n=null===e,r=e===$,o=e===e,i=null===t,a=t===$,s=t===t;if(e>t&&!i||!o||n&&!a&&s||r&&s)return 1;if(t>e&&!n||!s||i&&!r&&o||a&&o)return-1}return 0}function k(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=T(o[r],i[r]);if(u){if(r>=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return e.index-t.index}function j(e){return bn[e]}function A(e){return En[e]}function V(e){return"\\"+On[e]}function U(e,t,n){for(var r=e.length,o=t+(n?0:-1);n?o--:++o<r;){var i=e[o];if(i!==i)return o}return-1}function L(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function F(e,t){return e="number"==typeof e||Dt.test(e)?+e:-1,t=null==t?be:t,e>-1&&e%1==0&&t>e}function B(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function W(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function H(e,t){for(var n=-1,r=e.length,o=-1,i=[];++n<r;)e[n]===t&&(e[n]=Re,i[++o]=n);return i}function q(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function K(e){if(!e||!dn.test(e))return e.length;for(var t=pn.lastIndex=0;pn.test(e);)t++;return t}function z(e){return e.match(pn)}function Y(e){return Nn[e]}function G(e){function t(e){if(ka(e)&&!ml(e)&&!(e instanceof Dt)){if(e instanceof S)return e;if(Lu.call(e,"__wrapped__"))return Io(e)}return new S(e)}function n(){}function S(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=$}function Dt(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ce,this.__views__=[]}function Mt(){var e=new Dt(this.__wrapped__);return e.__actions__=kr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=kr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=kr(this.__views__),e}function Pt(){if(this.__filtered__){var e=new Dt(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function It(){var e=this.__wrapped__.value(),t=this.__dir__,n=ml(e),r=0>t,o=n?e.length:0,i=po(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,p=l.length,d=0,f=cc(u,this.__takeCount__);if(!n||fe>o||o==u&&f==u)return Nr(e,this.__actions__);var h=[];e:for(;u--&&f>d;){c+=t;for(var v=-1,m=e[c];++v<p;){var g=l[v],y=g.iteratee,_=g.type,b=y(m);if(_==ve)m=b;else if(!b){if(_==he)continue e;break e}}h[d++]=m}return h}function St(){}function Tt(e,t){return jt(e,t)&&delete e[t]}function kt(e,t){if(mc){var n=e[t];return n===ye?$:n}return Lu.call(e,t)?e[t]:$}function jt(e,t){return mc?e[t]!==$:Lu.call(e,t)}function At(e,t,n){e[t]=mc&&n===$?ye:n}function Vt(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ut(){this.__data__={hash:new St,map:fc?new fc:[],string:new St}}function Lt(e){var t=this.__data__;return bo(e)?Tt("string"==typeof e?t.string:t.hash,e):fc?t.map["delete"](e):Jt(t.map,e)}function Ft(e){var t=this.__data__;return bo(e)?kt("string"==typeof e?t.string:t.hash,e):fc?t.map.get(e):Zt(t.map,e)}function Bt(e){var t=this.__data__;return bo(e)?jt("string"==typeof e?t.string:t.hash,e):fc?t.map.has(e):en(t.map,e)}function Wt(e,t){var n=this.__data__;return bo(e)?At("string"==typeof e?n.string:n.hash,e,t):fc?n.map.set(e,t):nn(n.map,e,t),this}function Ht(e){var t=-1,n=e?e.length:0;for(this.__data__=new Vt;++t<n;)this.push(e[t])}function qt(e,t){var n=e.__data__;if(bo(t)){var r=n.__data__,o="string"==typeof t?r.string:r.hash;return o[t]===ye}return n.has(t)}function Kt(e){var t=this.__data__;if(bo(e)){var n=t.__data__,r="string"==typeof e?n.string:n.hash;r[e]=ye}else t.set(e,ye)}function zt(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yt(){this.__data__={array:[],map:null}}function Gt(e){var t=this.__data__,n=t.array;return n?Jt(n,e):t.map["delete"](e)}function $t(e){var t=this.__data__,n=t.array;return n?Zt(n,e):t.map.get(e)}function Qt(e){var t=this.__data__,n=t.array;return n?en(n,e):t.map.has(e)}function Xt(e,t){var n=this.__data__,r=n.array;r&&(r.length<fe-1?nn(r,e,t):(n.array=null,n.map=new Vt(r)));var o=n.map;return o&&o.set(e,t),this}function Jt(e,t){var n=tn(e,t);if(0>n)return!1;var r=e.length-1;return n==r?e.pop():nc.call(e,n,1),!0}function Zt(e,t){var n=tn(e,t);return 0>n?$:e[n][1]}function en(e,t){return tn(e,t)>-1}function tn(e,t){for(var n=e.length;n--;)if(va(e[n][0],t))return n;return-1}function nn(e,t,n){var r=tn(e,t);0>r?e.push([t,n]):e[r][1]=n}function rn(e,t,n,r){return e===$||va(e,Vu[n])&&!Lu.call(r,n)?t:e}function on(e,t,n){(n!==$&&!va(e[t],n)||"number"==typeof t&&n===$&&!(t in e))&&(e[t]=n)}function an(e,t,n){var r=e[t];(!va(r,n)||va(r,Vu[t])&&!Lu.call(e,t)||n===$&&!(t in e))&&(e[t]=n)}function sn(e,t,n,r){return Rc(e,function(e,o,i){t(r,e,n(e),i)}),r}function un(e,t){return e&&jr(t,bs(t),e)}function cn(e,t){for(var n=-1,r=null==e,o=t.length,i=Array(o);++n<o;)i[n]=r?$:gs(e,t[n]);return i}function pn(e,t,n){return e===e&&(n!==$&&(e=n>=e?e:n),t!==$&&(e=e>=t?e:t)),e}function bn(e,t,n,r,o,i){var a;if(n&&(a=o?n(e,r,o,i):n(e)),a!==$)return a;if(!Ta(e))return e;var s=ml(e);if(s){if(a=ho(e),!t)return kr(e,a)}else{var c=lo(e),l=c==Se||c==Te;if(gl(e))return Dr(e,t);if(c!=Ae&&c!=we&&(!l||o))return _n[c]?mo(e,c,t):o?e:{};if(L(e))return o?e:{};if(a=vo(l?{}:e),!t)return Vr(e,un(a,e))}i||(i=new zt);var p=i.get(e);return p?p:(i.set(e,a),(s?u:In)(e,function(r,o){an(a,o,bn(r,t,n,o,e,i))}),s?a:Vr(e,a))}function En(e){var t=bs(e),n=t.length;return function(r){if(null==r)return!n;for(var o=n;o--;){var i=t[o],a=e[i],s=r[i];if(s===$&&!(i in Object(r))||!a(s))return!1}return!0}}function Nn(e,t,n){if("function"!=typeof e)throw new ju(ge);return tc(function(){e.apply($,n)},t)}function Cn(e,t,n,r){var o=-1,i=d,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=h(t,x(n))),r?(i=f,a=!1):t.length>=fe&&(i=qt,a=!1,t=new Ht(t));e:for(;++o<s;){var l=e[o],p=n?n(l):l;if(a&&p===p){for(var v=c;v--;)if(t[v]===p)continue e;u.push(l)}else i(t,p,r)||u.push(l)}return u}function On(e,t){var n=!0;return Rc(e,function(e,r,o){return n=!!t(e,r,o)}),n}function wn(e,t,n,r){var o=e.length;for(n=ns(n),0>n&&(n=-n>o?0:o+n),r=r===$||r>o?o:ns(r),0>r&&(r+=o),r=n>r?0:rs(r);r>n;)e[n++]=t;return e}function xn(e,t){var n=[];return Rc(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function Mn(e,t,n,r){r||(r=[]);for(var o=-1,i=e.length;++o<i;){var a=e[o];Ea(a)&&(n||ml(a)||ya(a))?t?Mn(a,t,n,r):v(r,a):n||(r[r.length]=a)}return r}function Pn(e,t){return null==e?e:xc(e,t,Es)}function In(e,t){return e&&xc(e,t,bs)}function Tn(e,t){return e&&Mc(e,t,bs)}function An(e,t){return p(t,function(t){return Pa(e[t])})}function Vn(e,t){t=_o(t,e)?[t+""]:yr(t);for(var n=0,r=t.length;null!=e&&r>n;)e=e[t[n++]];return n&&n==r?e:$}function Un(e,t){return Lu.call(e,t)||"object"==typeof e&&t in e&&null===Xu(e)}function Ln(e,t){return t in Object(e)}function Fn(e,t,n){return e>=cc(t,n)&&e<uc(t,n)}function Bn(e,t,n){for(var r=n?f:d,o=e.length,i=o,a=Array(o),s=[];i--;){var u=e[i];i&&t&&(u=h(u,x(t))),a[i]=!n&&(t||u.length>=120)?new Ht(i&&u):$}u=e[0];var c=-1,l=u.length,p=a[0];e:for(;++c<l;){var v=u[c],m=t?t(v):v;if(!(p?qt(p,m):r(s,m,n))){for(var i=o;--i;){var g=a[i];if(!(g?qt(g,m):r(e[i],m,n)))continue e}p&&p.push(m),s.push(v)}}return s}function Wn(e,t,n,r){return In(e,function(e,o,i){t(r,n(e),o,i)}),r}function Hn(e,t,n){_o(t,e)||(t=yr(t),e=Ro(e,t),t=Go(t));var r=null==e?e:e[t];return null==r?$:i(r,e,n)}function qn(e,t,n,r,o){return e===t?!0:null==e||null==t||!Ta(e)&&!ka(t)?e!==e&&t!==t:Kn(e,t,qn,n,r,o)}function Kn(e,t,n,r,o,i){var a=ml(e),s=ml(t),u=xe,c=xe;a||(u=lo(e),u==we?u=Ae:u!=Ae&&(a=$a(e))),s||(c=lo(t),c==we?c=Ae:c!=Ae&&(s=$a(t)));var l=u==Ae&&!L(e),p=c==Ae&&!L(t),d=u==c;if(d&&!a&&!l)return oo(e,t,u,n,r,o);var f=o&ue;if(!f){var h=l&&Lu.call(e,"__wrapped__"),v=p&&Lu.call(t,"__wrapped__");if(h||v)return n(h?e.value():e,v?t.value():t,r,o,i)}return d?(i||(i=new zt),(a?ro:io)(e,t,n,r,o,i)):!1}function zn(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=n[o];var u=s[0],c=e[u],l=s[1];if(a&&s[2]){if(c===$&&!(u in e))return!1}else{var p=new zt,d=r?r(c,l,u,e,t,p):$;if(!(d===$?qn(l,c,r,se|ue,p):d))return!1}}return!0}function Yn(e){var t=typeof e;return"function"==t?e:null==e?cu:"object"==t?ml(e)?Jn(e[0],e[1]):Xn(e):gu(e)}function Gn(e){return sc(Object(e))}function $n(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function Qn(e,t){var n=-1,r=ba(e)?Array(e.length):[];return Rc(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Xn(e){var t=uo(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null==e?!1:e[n]===r&&(r!==$||n in Object(e))}}return function(n){return n===e||zn(n,e,t)}}function Jn(e,t){return function(n){var r=gs(n,e);return r===$&&r===t?_s(n,e):qn(t,r,$,se|ue)}}function Zn(e,t,n,r,o){if(e!==t){var i=ml(t)||$a(t)?$:Es(t);u(i||t,function(a,s){if(i&&(s=a,a=t[s]),Ta(a))o||(o=new zt),er(e,t,s,n,Zn,r,o);else{var u=r?r(e[s],a,s+"",e,t,o):$;u===$&&(u=a),on(e,s,u)}})}}function er(e,t,n,r,o,i,a){var s=e[n],u=t[n],c=a.get(u);if(c)return void on(e,n,c);var l=i?i(s,u,n+"",e,t,a):$,p=l===$;p&&(l=u,ml(u)||$a(u)?ml(s)?l=r?kr(s):s:Ea(s)?l=kr(s):(p=!1,l=bn(u)):Ha(u)||ya(u)?ya(s)?l=is(s):!Ta(s)||r&&Pa(s)?(p=!1,l=bn(u)):l=r?bn(s):s:p=!1),a.set(u,l),p&&o(l,u,r,i,a),on(e,n,l)}function tr(e,t,n){var r=-1,o=so();t=h(t.length?t:Array(1),function(e){return o(e)});var i=Qn(e,function(e,n,o){var i=h(t,function(t){return t(e)});return{criteria:i,index:++r,value:e}});return O(i,function(e,t){return k(e,t,n)})}function nr(e,t){return e=Object(e),m(t,function(t,n){return n in e&&(t[n]=e[n]),t},{})}function rr(e,t){var n={};return Pn(e,function(e,r){t(e,r)&&(n[r]=e)}),n}function or(e){return function(t){return null==t?$:t[e]}}function ir(e){return function(t){return Vn(t,e)}}function ar(e,t){return sr(e,t)}function sr(e,t,n){var r=-1,o=t.length,i=e;for(n&&(i=h(e,function(e){return n(e)}));++r<o;)for(var a=0,s=t[r],u=n?n(s):s;(a=N(i,u,a))>-1;)i!==e&&nc.call(i,a,1),nc.call(e,a,1);return e}function ur(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(r==n||o!=i){var i=o;if(F(o))nc.call(e,o,1);else if(_o(o,e))delete e[o];else{var a=yr(o),s=Ro(e,a);null!=s&&delete s[Go(a)]}}}return e}function cr(e,t){return e+oc(pc()*(t-e+1))}function lr(e,t,n,r){for(var o=-1,i=uc(rc((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}function pr(e,t,n,r){t=_o(t,e)?[t+""]:yr(t);for(var o=-1,i=t.length,a=i-1,s=e;null!=s&&++o<i;){var u=t[o];if(Ta(s)){var c=n;if(o!=a){var l=s[u];c=r?r(l,u,s):$,c===$&&(c=null==l?F(t[o+1])?[]:{}:l)}an(s,u,c)}s=s[u]}return e}function dr(e,t,n){var r=-1,o=e.length;0>t&&(t=-t>o?0:o+t),n=n>o?o:n,0>n&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}function fr(e,t){var n;return Rc(e,function(e,r,o){return n=t(e,r,o),!n}),!!n}function hr(e,t,n){var r=0,o=e?e.length:r;if("number"==typeof t&&t===t&&De>=o){for(;o>r;){var i=r+o>>>1,a=e[i];(n?t>=a:t>a)&&null!==a?r=i+1:o=i}return o}return vr(e,t,cu,n)}function vr(e,t,n,r){t=n(t);for(var o=0,i=e?e.length:0,a=t!==t,s=null===t,u=t===$;i>o;){var c=oc((o+i)/2),l=n(e[c]),p=l!==$,d=l===l;if(a)var f=d||r;else f=s?d&&p&&(r||null!=l):u?d&&(r||p):null==l?!1:r?t>=l:t>l;f?o=c+1:i=c}return cc(i,Oe)}function mr(e){return gr(e)}function gr(e,t){for(var n=0,r=e.length,o=e[0],i=t?t(o):o,a=i,s=0,u=[o];++n<r;)o=e[n],i=t?t(o):o,va(i,a)||(a=i,u[++s]=o);return u}function yr(e){return ml(e)?e:xo(e)}function _r(e,t,n){var r=-1,o=d,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=f;else if(i>=fe){var c=t?null:Ic(e);if(c)return q(c);a=!1,o=qt,u=new Ht}else u=t?[]:s;e:for(;++r<i;){var l=e[r],p=t?t(l):l;if(a&&p===p){for(var h=u.length;h--;)if(u[h]===p)continue e;t&&u.push(p),s.push(l)}else o(u,p,n)||(u!==s&&u.push(p),s.push(l))}return s}function br(e,t){t=_o(t,e)?[t+""]:yr(t),e=Ro(e,t);var n=Go(t);return null!=e&&ys(e,n)?delete e[n]:!0}function Er(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?dr(e,r?0:i,r?i+1:o):dr(e,r?i+1:0,r?o:i)}function Nr(e,t){var n=e;return n instanceof Dt&&(n=n.value()),m(t,function(e,t){return t.func.apply(t.thisArg,v([e],t.args))},n)}function Cr(e,t,n){for(var r=-1,o=e.length;++r<o;)var i=i?v(Cn(i,e[r],t,n),Cn(e[r],i,t,n)):e[r];return i&&i.length?_r(i,t,n):[]}function Or(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;)n(a,e[r],i>r?t[r]:$);return a}function Dr(e,t){if(t)return e.slice();var n=e.constructor,r=new n(e.length);return e.copy(r),r}function Rr(e){var t=e.constructor,n=new t(e.byteLength),r=new Gu(n);return r.set(new Gu(e)),n}function wr(e){var t=e.constructor;return m(W(e),r,new t)}function xr(e){var t=e.constructor,n=new t(e.source,_t.exec(e));return n.lastIndex=e.lastIndex,n}function Mr(e){var t=e.constructor;return m(q(e),o,new t)}function Pr(e){return Yu?Object(Nc.call(e)):{}}function Ir(e,t){var n=e.buffer,r=e.constructor;return new r(t?Rr(n):n,e.byteOffset,e.length)}function Sr(e,t,n){for(var r=n.length,o=-1,i=uc(e.length-r,0),a=-1,s=t.length,u=Array(s+i);++a<s;)u[a]=t[a];for(;++o<r;)u[n[o]]=e[o];for(;i--;)u[a++]=e[o++];return u}function Tr(e,t,n){for(var r=-1,o=n.length,i=-1,a=uc(e.length-o,0),s=-1,u=t.length,c=Array(a+u);++i<a;)c[i]=e[i];for(var l=i;++s<u;)c[l+s]=t[s];for(;++r<o;)c[l+n[r]]=e[i++];return c}function kr(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function jr(e,t,n){return Ar(e,t,n)}function Ar(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=r?r(n[a],e[a],a,n,e):e[a];an(n,a,s)}return n}function Vr(e,t){return jr(e,kc(e),t)}function Ur(e,t){return function(n,r){var o=ml(n)?a:sn,i=t?t():{};return o(n,e,so(r),i)}}function Lr(e){return aa(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:$,a=o>2?n[2]:$;for(i="function"==typeof i?(o--,i):$,a&&yo(n[0],n[1],a)&&(i=3>o?$:i,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t})}function Fr(e,t){return function(n,r){if(null==n)return n;if(!ba(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&r(a[i],i,a)!==!1;);return n}}function Br(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(n(i[u],u,i)===!1)break}return t}}function Wr(e,t,n){function r(){var t=this&&this!==kn&&this instanceof r?i:e;return t.apply(o?n:this,arguments)}var o=t&X,i=Kr(e);return r}function Hr(e){return function(t){t=ss(t);var n=dn.test(t)?z(t):$,r=n?n[0]:t.charAt(0),o=n?n.slice(1).join(""):t.slice(1);return r[e]()+o}}function qr(e){return function(t){return m(iu(Ls(t)),e,"")}}function Kr(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=Dc(e.prototype),r=e.apply(n,t);return Ta(r)?r:n}}function zr(e,n,r){function o(){for(var s=arguments.length,u=s,c=Array(s),l=this&&this!==kn&&this instanceof o?a:e,p=t.placeholder||o.placeholder;u--;)c[u]=arguments[u];var d=3>s&&c[0]!==p&&c[s-1]!==p?[]:H(c,p);return s-=d.length,r>s?eo(e,n,Gr,p,$,c,d,$,$,r-s):i(l,this,c)}var a=Kr(e);return o}function Yr(e){return aa(function(t){t=Mn(t);var n=t.length,r=n,o=S.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new ju(ge);if(o&&!a&&"wrapper"==ao(i))var a=new S([],!0)}for(r=a?r:n;++r<n;){i=t[r];var s=ao(i),u="wrapper"==s?Sc(i):$;a=u&&Eo(u[0])&&u[1]==(oe|ee|ne|ie)&&!u[4].length&&1==u[9]?a[ao(u[0])].apply(a,u[3]):1==i.length&&Eo(i)?a[s]():a.thru(i)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&ml(r)&&r.length>=fe)return a.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}})}function Gr(e,n,r,o,i,a,s,u,c,l){function p(){for(var _=arguments.length,b=_,E=Array(_);b--;)E[b]=arguments[b];if(o&&(E=Sr(E,o,i)),a&&(E=Tr(E,a,s)),v||m){var N=t.placeholder||p.placeholder,C=H(E,N);if(_-=C.length,l>_)return eo(e,n,Gr,N,r,E,C,u,c,l-_)}var O=f?r:this,D=h?O[e]:e;return u?E=wo(E,u):g&&E.length>1&&E.reverse(),d&&c<E.length&&(E.length=c),this&&this!==kn&&this instanceof p&&(D=y||Kr(D)),D.apply(O,E)}var d=n&oe,f=n&X,h=n&J,v=n&ee,m=n&te,g=n&ae,y=h?$:Kr(e);return p}function $r(e,t){return function(n,r){return Wn(n,e,t(r),{})}}function Qr(e){return aa(function(t){return t=h(Mn(t),so()),aa(function(n){var r=this;return e(t,function(e){return i(e,r,n)})})})}function Xr(e,t,n){t=ns(t);var r=K(e);if(!t||r>=t)return"";var o=t-r;n=n===$?" ":n+"";var i=Ys(n,rc(o/K(n)));return dn.test(n)?z(i).slice(0,o).join(""):i.slice(0,o)}function Jr(e,t,n,r){function o(){for(var t=-1,u=arguments.length,c=-1,l=r.length,p=Array(l+u),d=this&&this!==kn&&this instanceof o?s:e;++c<l;)p[c]=r[c];for(;u--;)p[c++]=arguments[++t];return i(d,a?n:this,p)}var a=t&X,s=Kr(e);return o}function Zr(e){return function(t,n,r){return r&&"number"!=typeof r&&yo(t,n,r)&&(n=r=$),t=os(t),t=t===t?t:0,n===$?(n=t,t=0):n=os(n)||0,r=r===$?n>t?1:-1:os(r)||0,lr(t,n,r,e)}}function eo(e,t,n,r,o,i,a,s,u,c){var l=t&ee,p=s?kr(s):$,d=l?a:$,f=l?$:a,h=l?i:$,v=l?$:i;t|=l?ne:re,t&=~(l?re:ne),t&Z||(t&=~(X|J));var m=[e,t,o,h,d,v,f,p,u,c],g=n.apply($,m);return Eo(e)&&jc(g,m),g.placeholder=r,g}function to(e){var t=Tu[e];return function(e,n){if(e=os(e),n=ns(n)){var r=(ss(e)+"e").split("e"),o=t(r[0]+"e"+(+r[1]+n));return r=(ss(o)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return t(e)}}function no(e,t,n,r,o,i,a,s){var u=t&J;if(!u&&"function"!=typeof e)throw new ju(ge);var c=r?r.length:0;if(c||(t&=~(ne|re),r=o=$),a=a===$?a:uc(ns(a),0),s=s===$?s:ns(s),c-=o?o.length:0,t&re){var l=r,p=o;r=o=$}var d=u?$:Sc(e),f=[e,t,n,r,o,l,p,i,a,s];if(d&&Oo(f,d),e=f[0],t=f[1],n=f[2],r=f[3],o=f[4],s=f[9]=null==f[9]?u?0:e.length:uc(f[9]-c,0),!s&&t&(ee|te)&&(t&=~(ee|te)),t&&t!=X)h=t==ee||t==te?zr(e,t,s):t!=ne&&t!=(X|ne)||o.length?Gr.apply($,f):Jr(e,t,n,r);else var h=Wr(e,t,n);var v=d?Pc:jc;return v(h,f)}function ro(e,t,n,r,o,i){var a=-1,s=o&ue,u=o&se,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var p=i.get(e);if(p)return p==t;var d=!0;for(i.set(e,t);++a<c;){var f=e[a],h=t[a];if(r)var v=s?r(h,f,a,t,e,i):r(f,h,a,e,t,i);if(v!==$){if(v)continue;d=!1;break}if(u){if(!y(t,function(e){return f===e||n(f,e,r,o,i)})){d=!1;break}}else if(f!==h&&!n(f,h,r,o,i)){d=!1;break}}return i["delete"](e),d}function oo(e,t,n,r,o,i){switch(n){case He:return e.byteLength==t.byteLength&&r(new Gu(e),new Gu(t))?!0:!1;case Me:case Pe:return+e==+t;case Ie:return e.name==t.name&&e.message==t.message;case je:return e!=+e?t!=+t:e==+t;case Ve:case Le:return e==t+"";case ke:var a=W;case Ue:var s=i&ue;return a||(a=q),(s||e.size==t.size)&&r(a(e),a(t),o,i|se);case Fe:return!!Yu&&Nc.call(e)==Nc.call(t)}return!1}function io(e,t,n,r,o,i){var a=o&ue,s=bs(e),u=s.length,c=bs(t),l=c.length;if(u!=l&&!a)return!1;for(var p=u;p--;){var d=s[p];if(!(a?d in t:Un(t,d)))return!1}var f=i.get(e);if(f)return f==t;var h=!0;i.set(e,t);for(var v=a;++p<u;){d=s[p];var m=e[d],g=t[d];if(r)var y=a?r(g,m,d,t,e,i):r(m,g,d,e,t,i);if(!(y===$?m===g||n(m,g,r,o,i):y)){h=!1;break}v||(v="constructor"==d)}if(h&&!v){var _=e.constructor,b=t.constructor;_!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(h=!1)}return i["delete"](e),h}function ao(e){for(var t=e.name+"",n=Oc[t],r=Lu.call(Oc,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function so(){var e=t.iteratee||lu;return e=e===lu?Yn:e,arguments.length?e(arguments[0],arguments[1]):e}function uo(e){for(var t=Ms(e),n=t.length;n--;)t[n][2]=Co(t[n][1]);return t}function co(e,t){var n=null==e?$:e[t];return La(n)?n:$}function lo(e){return Wu.call(e)}function po(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=cc(t,e+a);break;case"takeRight":e=uc(e,t-a)}}return{start:e,end:t}}function fo(e,t,n){if(null==e)return!1;var r=n(e,t);r||_o(t)||(t=yr(t),e=Ro(e,t),null!=e&&(t=Go(t),r=n(e,t)));var o=e?e.length:$;return r||!!o&&Sa(o)&&F(t,o)&&(ml(e)||Ya(e)||ya(e))}function ho(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Lu.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function vo(e){if(No(e))return{};var t=e.constructor;return Dc(Pa(t)?t.prototype:$)}function mo(e,t,n){var r=e.constructor;switch(t){case He:return Rr(e);case Me:case Pe:return new r(+e);case qe:case Ke:case ze:case Ye:case Ge:case $e:case Qe:case Xe:case Je:return Ir(e,n);case ke:return wr(e);case je:case Le:return new r(e);case Ve:return xr(e);case Ue:return Mr(e);case Fe:return Pr(e)}}function go(e){var t=e?e.length:$;return Sa(t)&&(ml(e)||Ya(e)||ya(e))?R(t,String):null}function yo(e,t,n){if(!Ta(n))return!1;var r=typeof t;return("number"==r?ba(n)&&F(t,n.length):"string"==r&&t in n)?va(n[t],e):!1}function _o(e,t){return"number"==typeof e?!0:!ml(e)&&(lt.test(e)||!ct.test(e)||null!=t&&e in Object(t))}function bo(e){var t=typeof e;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!==e||null==e}function Eo(e){var n=ao(e),r=t[n];if("function"!=typeof r||!(n in Dt.prototype))return!1;if(e===r)return!0;var o=Sc(r);return!!o&&e===o[0]}function No(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||Vu;return e===n}function Co(e){return e===e&&!Ta(e)}function Oo(e,t){var n=e[1],r=t[1],o=n|r,i=(X|J|oe)>o,a=r==oe&&n==ee||r==oe&&n==ie&&e[7].length<=t[8]||r==(oe|ie)&&t[7].length<=t[8]&&n==ee;if(!i&&!a)return e;r&X&&(e[2]=t[2],o|=n&X?0:Z);var s=t[3];if(s){var u=e[3];e[3]=u?Sr(u,s,t[4]):kr(s),e[4]=u?H(e[3],Re):kr(t[4])}return s=t[5],s&&(u=e[5],e[5]=u?Tr(u,s,t[6]):kr(s),e[6]=u?H(e[5],Re):kr(t[6])),s=t[7],s&&(e[7]=kr(s)),r&oe&&(e[8]=null==e[8]?t[8]:cc(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function Do(e,t,n,r,o,i){return Ta(e)&&Ta(t)&&(i.set(t,e),Zn(e,t,$,Do,i)),e}function Ro(e,t){return 1==t.length?e:gs(e,dr(t,0,-1))}function wo(e,t){for(var n=e.length,r=cc(t.length,n),o=kr(e);r--;){var i=t[r];e[r]=F(i,n)?o[i]:$}return e}function xo(e){var t=[];return ss(e).replace(pt,function(e,n,r,o){t.push(r?o.replace(gt,"$1"):n||e)}),t}function Mo(e){return Ea(e)?e:[]}function Po(e){return"function"==typeof e?e:cu}function Io(e){if(e instanceof Dt)return e.clone();var t=new S(e.__wrapped__,e.__chain__);return t.__actions__=kr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function So(e,t){t=uc(ns(t),0);var n=e?e.length:0;if(!n||1>t)return[];for(var r=0,o=-1,i=Array(rc(n/t));n>r;)i[++o]=dr(e,r,r+=t);return i}function To(e){for(var t=-1,n=e?e.length:0,r=-1,o=[];++t<n;){var i=e[t];i&&(o[++r]=i)}return o}function ko(e,t,n){var r=e?e.length:0;return r?(t=n||t===$?1:ns(t),dr(e,0>t?0:t,r)):[]}function jo(e,t,n){var r=e?e.length:0;return r?(t=n||t===$?1:ns(t),t=r-t,dr(e,0,0>t?0:t)):[]}function Ao(e,t){return e&&e.length?Er(e,so(t,3),!0,!0):[]}function Vo(e,t){return e&&e.length?Er(e,so(t,3),!0):[]}function Uo(e,t,n,r){var o=e?e.length:0;return o?(n&&"number"!=typeof n&&yo(e,t,n)&&(n=0,r=o),wn(e,t,n,r)):[]}function Lo(e,t){return e&&e.length?E(e,so(t,3)):-1}function Fo(e,t){return e&&e.length?E(e,so(t,3),!0):-1}function Bo(e){var t=e?e.length:0;return t?Mn(e):[]}function Wo(e){var t=e?e.length:0;return t?Mn(e,!0):[]}function Ho(e){for(var t=-1,n=e?e.length:0,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r}function qo(e){return e?e[0]:$}function Ko(e,t,n){var r=e?e.length:0;return r?(n=ns(n),0>n&&(n=uc(r+n,0)),N(e,t,n)):-1}function zo(e){return jo(e,1)}function Yo(e,t){return e?ac.call(e,t):""}function Go(e){var t=e?e.length:0;return t?e[t-1]:$}function $o(e,t,n){var r=e?e.length:0;if(!r)return-1;var o=r;if(n!==$&&(o=ns(n),o=(0>o?uc(r+o,0):cc(o,r-1))+1),t!==t)return U(e,o,!0);for(;o--;)if(e[o]===t)return o;return-1}function Qo(e,t){return e&&e.length&&t&&t.length?ar(e,t):e}function Xo(e,t,n){return e&&e.length&&t&&t.length?sr(e,t,so(n)):e}function Jo(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=so(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return ur(e,o),n}function Zo(e){return e?dc.call(e):e}function ei(e,t,n){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&yo(e,t,n)?(t=0,n=r):(t=null==t?0:ns(t),n=n===$?r:ns(n)),dr(e,t,n)):[]}function ti(e,t){return hr(e,t)}function ni(e,t,n){return vr(e,t,so(n))}function ri(e,t){var n=e?e.length:0;if(n){var r=hr(e,t);if(n>r&&va(e[r],t))return r}return-1}function oi(e,t){return hr(e,t,!0)}function ii(e,t,n){return vr(e,t,so(n),!0)}function ai(e,t){var n=e?e.length:0;if(n){var r=hr(e,t,!0)-1;if(va(e[r],t))return r}return-1}function si(e){return e&&e.length?mr(e):[]}function ui(e,t){return e&&e.length?gr(e,so(t)):[]}function ci(e){return ko(e,1)}function li(e,t,n){return e&&e.length?(t=n||t===$?1:ns(t),dr(e,0,0>t?0:t)):[]}function pi(e,t,n){var r=e?e.length:0;return r?(t=n||t===$?1:ns(t),t=r-t,dr(e,0>t?0:t,r)):[]}function di(e,t){return e&&e.length?Er(e,so(t,3),!1,!0):[]}function fi(e,t){return e&&e.length?Er(e,so(t,3)):[]}function hi(e){return e&&e.length?_r(e):[]}function vi(e,t){return e&&e.length?_r(e,so(t)):[]}function mi(e,t){return e&&e.length?_r(e,$,t):[]}function gi(e){if(!e||!e.length)return[];var t=0;return e=p(e,function(e){return Ea(e)?(t=uc(e.length,t),!0):void 0}),R(t,function(t){return h(e,or(t))})}function yi(e,t){if(!e||!e.length)return[];var n=gi(e);return null==t?n:h(n,function(e){return i(t,$,e)})}function _i(e,t){return Or(e||[],t||[],an)}function bi(e,t){return Or(e||[],t||[],pr)}function Ei(e){var n=t(e);return n.__chain__=!0,n}function Ni(e,t){return t(e),e}function Ci(e,t){return t(e)}function Oi(){return Ei(this)}function Di(){return new S(this.value(),this.__chain__)}function Ri(e){return this.map(e).flatten()}function wi(){this.__values__===$&&(this.__values__=ts(this.value()));var e=this.__index__>=this.__values__.length,t=e?$:this.__values__[this.__index__++];return{done:e,value:t}}function xi(){return this}function Mi(e){for(var t,r=this;r instanceof n;){var o=Io(r);o.__index__=0,o.__values__=$,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t}function Pi(){var e=this.__wrapped__;if(e instanceof Dt){var t=e;return this.__actions__.length&&(t=new Dt(this)),t=t.reverse(),t.__actions__.push({func:Ci,args:[Zo],thisArg:$}),new S(t,this.__chain__)}return this.thru(Zo)}function Ii(){return Nr(this.__wrapped__,this.__actions__)}function Si(e,t,n){var r=ml(e)?l:On;return n&&yo(e,t,n)&&(t=$),r(e,so(t,3))}function Ti(e,t){var n=ml(e)?p:xn;return n(e,so(t,3))}function ki(e,t){if(t=so(t,3),ml(e)){var n=E(e,t);return n>-1?e[n]:$}return b(e,t,Rc)}function ji(e,t){if(t=so(t,3),ml(e)){var n=E(e,t,!0);return n>-1?e[n]:$}return b(e,t,wc)}function Ai(e,t){return Mn(Fi(e,t))}function Vi(e,t){return"function"==typeof t&&ml(e)?u(e,t):Rc(e,Po(t))}function Ui(e,t){return"function"==typeof t&&ml(e)?c(e,t):wc(e,Po(t))}function Li(e,t,n,r){e=ba(e)?e:Ts(e),n=n&&!r?ns(n):0;var o=e.length;return 0>n&&(n=uc(o+n,0)),Ya(e)?o>=n&&e.indexOf(t,n)>-1:!!o&&N(e,t,n)>-1}function Fi(e,t){var n=ml(e)?h:Qn;return n(e,so(t,3))}function Bi(e,t,n,r){return null==e?[]:(ml(t)||(t=null==t?[]:[t]),n=r?$:n,ml(n)||(n=null==n?[]:[n]),tr(e,t,n))}function Wi(e,t,n){var r=ml(e)?m:C,o=arguments.length<3;return r(e,so(t,4),n,o,Rc)}function Hi(e,t,n){var r=ml(e)?g:C,o=arguments.length<3;return r(e,so(t,4),n,o,wc)}function qi(e,t){var n=ml(e)?p:xn;return t=so(t,3),n(e,function(e,n,r){return!t(e,n,r)})}function Ki(e){var t=ba(e)?e:Ts(e),n=t.length;return n>0?t[cr(0,n-1)]:$}function zi(e,t){var n=-1,r=ts(e),o=r.length,i=o-1;for(t=pn(ns(t),0,o);++n<t;){var a=cr(n,i),s=r[a];r[a]=r[n],r[n]=s}return r.length=t,r}function Yi(e){return zi(e,Ce)}function Gi(e){if(null==e)return 0;if(ba(e)){var t=e.length;return t&&Ya(e)?K(e):t}return bs(e).length}function $i(e,t,n){var r=ml(e)?y:fr;return n&&yo(e,t,n)&&(t=$),r(e,so(t,3))}function Qi(e,t){if("function"!=typeof t)throw new ju(ge);return e=ns(e),function(){return--e<1?t.apply(this,arguments):void 0}}function Xi(e,t,n){return t=n?$:t,t=e&&null==t?e.length:t,no(e,oe,$,$,$,$,t)}function Ji(e,t){var n;if("function"!=typeof t)throw new ju(ge);return e=ns(e),function(){return--e>0&&(n=t.apply(this,arguments)), 1>=e&&(t=$),n}}function Zi(e,n,r){n=r?$:n;var o=no(e,ee,$,$,$,$,$,n);return o.placeholder=t.placeholder||Zi.placeholder,o}function ea(e,n,r){n=r?$:n;var o=no(e,te,$,$,$,$,$,n);return o.placeholder=t.placeholder||ea.placeholder,o}function ta(e,t,n){function r(){h&&$u(h),l&&$u(l),m=0,c=l=f=h=v=$}function o(t,n){n&&$u(n),l=h=v=$,t&&(m=sl(),p=e.apply(f,c),h||l||(c=f=$))}function i(){var e=t-(sl()-d);0>=e||e>t?o(v,l):h=tc(i,e)}function a(){return(h&&v||l&&_)&&(p=e.apply(f,c)),r(),p}function s(){o(_,h)}function u(){if(c=arguments,d=sl(),f=this,v=_&&(h||!g),y===!1)var n=g&&!h;else{m||l||g||(m=d);var r=y-(d-m),o=0>=r||r>y;o?(l&&(l=$u(l)),m=d,p=e.apply(f,c)):l||(l=tc(s,r))}return o&&h?h=$u(h):h||t===y||(h=tc(i,t)),n&&(o=!0,p=e.apply(f,c)),!o||h||l||(c=f=$),p}var c,l,p,d,f,h,v,m=0,g=!1,y=!1,_=!0;if("function"!=typeof e)throw new ju(ge);return t=os(t)||0,Ta(n)&&(g=!!n.leading,y="maxWait"in n&&uc(os(n.maxWait)||0,t),_="trailing"in n?!!n.trailing:_),u.cancel=r,u.flush=a,u}function na(e){return no(e,ae)}function ra(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new ju(ge);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new ra.Cache,n}function oa(e){if("function"!=typeof e)throw new ju(ge);return function(){return!e.apply(this,arguments)}}function ia(e){return Ji(2,e)}function aa(e,t){if("function"!=typeof e)throw new ju(ge);return t=uc(t===$?e.length-1:ns(t),0),function(){for(var n=arguments,r=-1,o=uc(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,i(e,this,s)}}function sa(e,t){if("function"!=typeof e)throw new ju(ge);return t=t===$?0:uc(ns(t),0),aa(function(n){var r=n[t],o=n.slice(0,t);return r&&v(o,r),i(e,this,o)})}function ua(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new ju(ge);return Ta(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ta(e,t,{leading:r,maxWait:t,trailing:o})}function ca(e){return Xi(e,1)}function la(e,t){return t=null==t?cu:t,fl(t,e)}function pa(e){return bn(e)}function da(e,t){return bn(e,!1,t)}function fa(e){return bn(e,!0)}function ha(e,t){return bn(e,!0,t)}function va(e,t){return e===t||e!==e&&t!==t}function ma(e,t){return e>t}function ga(e,t){return e>=t}function ya(e){return Ea(e)&&Lu.call(e,"callee")&&(!ec.call(e,"callee")||Wu.call(e)==we)}function _a(e){return ka(e)&&Wu.call(e)==He}function ba(e){return null!=e&&!("function"==typeof e&&Pa(e))&&Sa(Tc(e))}function Ea(e){return ka(e)&&ba(e)}function Na(e){return e===!0||e===!1||ka(e)&&Wu.call(e)==Me}function Ca(e){return ka(e)&&Wu.call(e)==Pe}function Oa(e){return!!e&&1===e.nodeType&&ka(e)&&!Ha(e)}function Da(e){if(ba(e)&&(ml(e)||Ya(e)||Pa(e.splice)||ya(e)))return!e.length;for(var t in e)if(Lu.call(e,t))return!1;return!0}function Ra(e,t){return qn(e,t)}function wa(e,t,n){n="function"==typeof n?n:$;var r=n?n(e,t):$;return r===$?qn(e,t,n):!!r}function xa(e){return ka(e)&&"string"==typeof e.message&&Wu.call(e)==Ie}function Ma(e){return"number"==typeof e&&ic(e)}function Pa(e){var t=Ta(e)?Wu.call(e):"";return t==Se||t==Te}function Ia(e){return"number"==typeof e&&e==ns(e)}function Sa(e){return"number"==typeof e&&e>-1&&e%1==0&&be>=e}function Ta(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ka(e){return!!e&&"object"==typeof e}function ja(e){return ka(e)&&lo(e)==ke}function Aa(e,t){return e===t||zn(e,t,uo(t))}function Va(e,t,n){return n="function"==typeof n?n:$,zn(e,t,uo(t),n)}function Ua(e){return Wa(e)&&e!=+e}function La(e){return null==e?!1:Pa(e)?qu.test(Uu.call(e)):ka(e)&&(L(e)?qu:Ct).test(e)}function Fa(e){return null===e}function Ba(e){return null==e}function Wa(e){return"number"==typeof e||ka(e)&&Wu.call(e)==je}function Ha(e){if(!ka(e)||Wu.call(e)!=Ae||L(e))return!1;var t=Vu;if("function"==typeof e.constructor&&(t=Xu(e)),null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&Uu.call(n)==Bu}function qa(e){return Ta(e)&&Wu.call(e)==Ve}function Ka(e){return Ia(e)&&e>=-be&&be>=e}function za(e){return ka(e)&&lo(e)==Ue}function Ya(e){return"string"==typeof e||!ml(e)&&ka(e)&&Wu.call(e)==Le}function Ga(e){return"symbol"==typeof e||ka(e)&&Wu.call(e)==Fe}function $a(e){return ka(e)&&Sa(e.length)&&!!yn[Wu.call(e)]}function Qa(e){return e===$}function Xa(e){return ka(e)&&lo(e)==Be}function Ja(e){return ka(e)&&Wu.call(e)==We}function Za(e,t){return t>e}function es(e,t){return t>=e}function ts(e){if(!e)return[];if(ba(e))return Ya(e)?z(e):kr(e);if(Zu&&e[Zu])return B(e[Zu]());var t=lo(e),n=t==ke?W:t==Ue?q:Ts;return n(e)}function ns(e){if(!e)return 0===e?e:0;if(e=os(e),e===_e||e===-_e){var t=0>e?-1:1;return t*Ee}var n=e%1;return e===e?n?e-n:e:0}function rs(e){return e?pn(ns(e),0,Ce):0}function os(e){if(Ta(e)){var t=Pa(e.valueOf)?e.valueOf():e;e=Ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(ht,"");var n=Nt.test(e);return n||Ot.test(e)?Rn(e.slice(2),n?2:8):Et.test(e)?Ne:+e}function is(e){return jr(e,Es(e))}function as(e){return pn(ns(e),-be,be)}function ss(e){if("string"==typeof e)return e;if(null==e)return"";if(Ga(e))return Yu?Cc.call(e):"";var t=e+"";return"0"==t&&1/e==-_e?"-0":t}function us(e,t){var n=Dc(e);return t?un(n,t):n}function cs(e,t){return b(e,so(t,3),In,!0)}function ls(e,t){return b(e,so(t,3),Tn,!0)}function ps(e,t){return null==e?e:xc(e,Po(t),Es)}function ds(e,t){return null==e?e:Mc(e,Po(t),Es)}function fs(e,t){return e&&In(e,Po(t))}function hs(e,t){return e&&Tn(e,Po(t))}function vs(e){return null==e?[]:An(e,bs(e))}function ms(e){return null==e?[]:An(e,Es(e))}function gs(e,t,n){var r=null==e?$:Vn(e,t);return r===$?n:r}function ys(e,t){return fo(e,t,Un)}function _s(e,t){return fo(e,t,Ln)}function bs(e){var t=No(e);if(!t&&!ba(e))return Gn(e);var n=go(e),r=!!n,o=n||[],i=o.length;for(var a in e)!Un(e,a)||r&&("length"==a||F(a,i))||t&&"constructor"==a||o.push(a);return o}function Es(e){for(var t=-1,n=No(e),r=$n(e),o=r.length,i=go(e),a=!!i,s=i||[],u=s.length;++t<o;){var c=r[t];a&&("length"==c||F(c,u))||"constructor"==c&&(n||!Lu.call(e,c))||s.push(c)}return s}function Ns(e,t){var n={};return t=so(t,3),In(e,function(e,r,o){n[t(e,r,o)]=e}),n}function Cs(e,t){var n={};return t=so(t,3),In(e,function(e,r,o){n[r]=t(e,r,o)}),n}function Os(e,t){return t=so(t,2),rr(e,function(e,n){return!t(e,n)})}function Ds(e,t){return null==e?{}:rr(e,so(t,2))}function Rs(e,t,n){if(_o(t,e))r=null==e?$:e[t];else{t=yr(t);var r=gs(e,t);e=Ro(e,t)}return r===$&&(r=n),Pa(r)?r.call(e):r}function ws(e,t,n){return null==e?e:pr(e,t,n)}function xs(e,t,n,r){return r="function"==typeof r?r:$,null==e?e:pr(e,t,n,r)}function Ms(e){return w(e,bs(e))}function Ps(e){return w(e,Es(e))}function Is(e,t,n){var r=ml(e)||$a(e);if(t=so(t,4),null==n)if(r||Ta(e)){var o=e.constructor;n=r?ml(e)?new o:[]:Dc(Pa(o)?o.prototype:$)}else n={};return(r?u:In)(e,function(e,r,o){return t(n,e,r,o)}),n}function Ss(e,t){return null==e?!0:br(e,t)}function Ts(e){return e?M(e,bs(e)):[]}function ks(e){return null==e?M(e,Es(e)):[]}function js(e,t,n){return n===$&&(n=t,t=$),n!==$&&(n=os(n),n=n===n?n:0),t!==$&&(t=os(t),t=t===t?t:0),pn(os(e),t,n)}function As(e,t,n){return t=os(t)||0,n===$?(n=t,t=0):n=os(n)||0,e=os(e),Fn(e,t,n)}function Vs(e,t,n){if(n&&"boolean"!=typeof n&&yo(e,t,n)&&(t=n=$),n===$&&("boolean"==typeof t?(n=t,t=$):"boolean"==typeof e&&(n=e,e=$)),e===$&&t===$?(e=0,t=1):(e=os(e)||0,t===$?(t=e,e=0):t=os(t)||0),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=pc();return cc(e+o*(t-e+Dn("1e-"+((o+"").length-1))),t)}return cr(e,t)}function Us(e){return Al(ss(e).toLowerCase())}function Ls(e){return e=ss(e),e&&e.replace(Rt,j).replace(ln,"")}function Fs(e,t,n){e=ss(e),t="string"==typeof t?t:t+"";var r=e.length;return n=n===$?r:pn(ns(n),0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function Bs(e){return e=ss(e),e&&it.test(e)?e.replace(rt,A):e}function Ws(e){return e=ss(e),e&&ft.test(e)?e.replace(dt,"\\$&"):e}function Hs(e,t,n){e=ss(e),t=ns(t);var r=K(e);if(!t||r>=t)return e;var o=(t-r)/2,i=oc(o),a=rc(o);return Xr("",i,n)+e+Xr("",a,n)}function qs(e,t,n){return e=ss(e),e+Xr(e,t,n)}function Ks(e,t,n){return e=ss(e),Xr(e,t,n)+e}function zs(e,t,n){return n||null==t?t=0:t&&(t=+t),e=ss(e).replace(ht,""),lc(e,t||(bt.test(e)?16:10))}function Ys(e,t){e=ss(e),t=ns(t);var n="";if(!e||1>t||t>be)return n;do t%2&&(n+=e),t=oc(t/2),e+=e;while(t);return n}function Gs(){var e=arguments,t=ss(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function $s(e,t,n){return ss(e).split(t,n)}function Qs(e,t,n){return e=ss(e),n=pn(ns(n),0,e.length),e.lastIndexOf(t,n)==n}function Xs(e,n,r){var o=t.templateSettings;r&&yo(e,n,r)&&(n=$),e=ss(e),n=bl({},n,o,rn);var i,a,s=bl({},n.imports,o.imports,rn),u=bs(s),c=M(s,u),l=0,p=n.interpolate||wt,d="__p += '",f=ku((n.escape||wt).source+"|"+p.source+"|"+(p===ut?yt:wt).source+"|"+(n.evaluate||wt).source+"|$","g"),h="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++gn+"]")+"\n";e.replace(f,function(t,n,r,o,s,u){return r||(r=o),d+=e.slice(l,u).replace(xt,V),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),d+="';\n";var v=n.variable;v||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(Ze,""):d).replace(et,"$1").replace(tt,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Fl(function(){return Function(u,h+"return "+d).apply($,c)});if(m.source=d,xa(m))throw m;return m}function Js(e){return ss(e).toLowerCase()}function Zs(e){return ss(e).toUpperCase()}function eu(e,t,n){if(e=ss(e),!e)return e;if(n||t===$)return e.replace(ht,"");if(t+="",!t)return e;var r=z(e),o=z(t);return r.slice(P(r,o),I(r,o)+1).join("")}function tu(e,t,n){if(e=ss(e),!e)return e;if(n||t===$)return e.replace(mt,"");if(t+="",!t)return e;var r=z(e);return r.slice(0,I(r,z(t))+1).join("")}function nu(e,t,n){if(e=ss(e),!e)return e;if(n||t===$)return e.replace(vt,"");if(t+="",!t)return e;var r=z(e);return r.slice(P(r,z(t))).join("")}function ru(e,t){var n=ce,r=le;if(Ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ns(t.length):n,r="omission"in t?ss(t.omission):r}e=ss(e);var i=e.length;if(dn.test(e)){var a=z(e);i=a.length}if(n>=i)return e;var s=n-K(r);if(1>s)return r;var u=a?a.slice(0,s).join(""):e.slice(0,s);if(o===$)return u+r;if(a&&(s+=u.length-s),qa(o)){if(e.slice(s).search(o)){var c,l=u;for(o.global||(o=ku(o.source,ss(_t.exec(o))+"g")),o.lastIndex=0;c=o.exec(l);)var p=c.index;u=u.slice(0,p===$?s:p)}}else if(e.indexOf(o,s)!=s){var d=u.lastIndexOf(o);d>-1&&(u=u.slice(0,d))}return u+r}function ou(e){return e=ss(e),e&&ot.test(e)?e.replace(nt,Y):e}function iu(e,t,n){return e=ss(e),t=n?$:t,t===$&&(t=vn.test(e)?hn:fn),e.match(t)||[]}function au(e){var t=e?e.length:0,n=so();return e=t?h(e,function(e){if("function"!=typeof e[1])throw new ju(ge);return[n(e[0]),e[1]]}):[],aa(function(n){for(var r=-1;++r<t;){var o=e[r];if(i(o[0],this,n))return i(o[1],this,n)}})}function su(e){return En(bn(e,!0))}function uu(e){return function(){return e}}function cu(e){return e}function lu(e){return Yn("function"==typeof e?e:bn(e,!0))}function pu(e){return Xn(bn(e,!0))}function du(e,t){return Jn(e,bn(t,!0))}function fu(e,t,n){var r=bs(t),o=An(t,r);null!=n||Ta(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=An(t,bs(t)));var i=Ta(n)&&"chain"in n?n.chain:!0,a=Pa(e);return u(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=kr(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,v([this.value()],arguments))})}),e}function hu(){return kn._===this&&(kn._=Hu),this}function vu(){}function mu(e){return e=ns(e),function(){return arguments[e]}}function gu(e){return _o(e)?or(e):ir(e)}function yu(e){return function(t){return null==e?$:Vn(e,t)}}function _u(e,t){if(e=ns(e),1>e||e>be)return[];var n=Ce,r=cc(e,Ce);t=Po(t),e-=Ce;for(var o=R(r,t);++n<e;)t(n);return o}function bu(e){return ml(e)?h(e,String):xo(e)}function Eu(e){var t=++Fu;return ss(e)+t}function Nu(e,t){var n;return e===$&&t===$?0:(e!==$&&(n=e),t!==$&&(n=n===$?t:n+t),n)}function Cu(e){return e&&e.length?_(e,cu,ma):$}function Ou(e,t){return e&&e.length?_(e,so(t),ma):$}function Du(e){return Mu(e)/(e?e.length:0)}function Ru(e){return e&&e.length?_(e,cu,Za):$}function wu(e,t){return e&&e.length?_(e,so(t),Za):$}function xu(e,t){var n;return e===$&&t===$?0:(e!==$&&(n=e),t!==$&&(n=n===$?t:n-t),n)}function Mu(e){return e&&e.length?D(e,cu):0}function Pu(e,t){return e&&e.length?D(e,so(t)):0}e=e?jn.defaults({},e,jn.pick(kn,mn)):kn;var Iu=e.Date,Su=e.Error,Tu=e.Math,ku=e.RegExp,ju=e.TypeError,Au=e.Array.prototype,Vu=e.Object.prototype,Uu=e.Function.prototype.toString,Lu=Vu.hasOwnProperty,Fu=0,Bu=Uu.call(Object),Wu=Vu.toString,Hu=kn._,qu=ku("^"+Uu.call(Lu).replace(dt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ku=Sn?e.Buffer:$,zu=e.Reflect,Yu=e.Symbol,Gu=e.Uint8Array,$u=e.clearTimeout,Qu=zu?zu.enumerate:$,Xu=Object.getPrototypeOf,Ju=Object.getOwnPropertySymbols,Zu="symbol"==typeof(Zu=Yu&&Yu.iterator)?Zu:$,ec=Vu.propertyIsEnumerable,tc=e.setTimeout,nc=Au.splice,rc=Tu.ceil,oc=Tu.floor,ic=e.isFinite,ac=Au.join,sc=Object.keys,uc=Tu.max,cc=Tu.min,lc=e.parseInt,pc=Tu.random,dc=Au.reverse,fc=co(e,"Map"),hc=co(e,"Set"),vc=co(e,"WeakMap"),mc=co(Object,"create"),gc=vc&&new vc,yc=fc?Uu.call(fc):"",_c=hc?Uu.call(hc):"",bc=vc?Uu.call(vc):"",Ec=Yu?Yu.prototype:$,Nc=Yu?Ec.valueOf:$,Cc=Yu?Ec.toString:$,Oc={};t.templateSettings={escape:at,evaluate:st,interpolate:ut,variable:"",imports:{_:t}};var Dc=function(){function e(){}return function(t){if(Ta(t)){e.prototype=t;var n=new e;e.prototype=$}return n||{}}}(),Rc=Fr(In),wc=Fr(Tn,!0),xc=Br(),Mc=Br(!0);Qu&&!ec.call({valueOf:1},"valueOf")&&($n=function(e){return B(Qu(e))});var Pc=gc?function(e,t){return gc.set(e,t),e}:cu,Ic=hc&&2===new hc([1,2]).size?function(e){return new hc(e)}:vu,Sc=gc?function(e){return gc.get(e)}:vu,Tc=or("length"),kc=Ju||function(){return[]};(fc&&lo(new fc)!=ke||hc&&lo(new hc)!=Ue||vc&&lo(new vc)!=Be)&&(lo=function(e){var t=Wu.call(e),n=t==Ae?e.constructor:null,r="function"==typeof n?Uu.call(n):"";if(r)switch(r){case yc:return ke;case _c:return Ue;case bc:return Be}return t});var jc=function(){var e=0,t=0;return function(n,r){var o=sl(),i=de-(o-t);if(t=o,i>0){if(++e>=pe)return n}else e=0;return Pc(n,r)}}(),Ac=aa(function(e,t){return ml(e)||(e=null==e?[]:[Object(e)]),t=Mn(t),s(e,t)}),Vc=aa(function(e,t){return Ea(e)?Cn(e,Mn(t,!1,!0)):[]}),Uc=aa(function(e,t){var n=Go(t);return Ea(n)&&(n=$),Ea(e)?Cn(e,Mn(t,!1,!0),so(n)):[]}),Lc=aa(function(e,t){var n=Go(t);return Ea(n)&&(n=$),Ea(e)?Cn(e,Mn(t,!1,!0),$,n):[]}),Fc=aa(function(e){var t=h(e,Mo);return t.length&&t[0]===e[0]?Bn(t):[]}),Bc=aa(function(e){var t=Go(e),n=h(e,Mo);return t===Go(n)?t=$:n.pop(),n.length&&n[0]===e[0]?Bn(n,so(t)):[]}),Wc=aa(function(e){var t=Go(e),n=h(e,Mo);return t===Go(n)?t=$:n.pop(),n.length&&n[0]===e[0]?Bn(n,$,t):[]}),Hc=aa(Qo),qc=aa(function(e,t){t=h(Mn(t),String);var n=cn(e,t);return ur(e,t.sort(T)),n}),Kc=aa(function(e){return _r(Mn(e,!1,!0))}),zc=aa(function(e){var t=Go(e);return Ea(t)&&(t=$),_r(Mn(e,!1,!0),so(t))}),Yc=aa(function(e){var t=Go(e);return Ea(t)&&(t=$),_r(Mn(e,!1,!0),$,t)}),Gc=aa(function(e,t){return Ea(e)?Cn(e,t):[]}),$c=aa(function(e){return Cr(p(e,Ea))}),Qc=aa(function(e){var t=Go(e);return Ea(t)&&(t=$),Cr(p(e,Ea),so(t))}),Xc=aa(function(e){var t=Go(e);return Ea(t)&&(t=$),Cr(p(e,Ea),$,t)}),Jc=aa(gi),Zc=aa(function(e){var t=e.length,n=t>1?e[t-1]:$;return n="function"==typeof n?(e.pop(),n):$,yi(e,n)}),el=aa(function(e){e=Mn(e);var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return cn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Dt&&F(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:Ci,args:[o],thisArg:$}),new S(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push($),e})):this.thru(o)}),tl=Ur(function(e,t,n){Lu.call(e,n)?++e[n]:e[n]=1}),nl=Ur(function(e,t,n){Lu.call(e,n)?e[n].push(t):e[n]=[t]}),rl=aa(function(e,t,n){var r=-1,o="function"==typeof t,a=_o(t),s=ba(e)?Array(e.length):[];return Rc(e,function(e){var u=o?t:a&&null!=e?e[t]:$;s[++r]=u?i(u,e,n):Hn(e,t,n)}),s}),ol=Ur(function(e,t,n){e[n]=t}),il=Ur(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),al=aa(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t.length=1),tr(e,Mn(t),[])}),sl=Iu.now,ul=aa(function(e,n,r){var o=X;if(r.length){var i=t.placeholder||ul.placeholder,a=H(r,i);o|=ne}return no(e,o,n,r,a)}),cl=aa(function(e,n,r){var o=X|J;if(r.length){var i=t.placeholder||cl.placeholder,a=H(r,i);o|=ne}return no(n,o,e,r,a)}),ll=aa(function(e,t){return Nn(e,1,t)}),pl=aa(function(e,t,n){return Nn(e,os(t)||0,n)}),dl=aa(function(e,t){t=h(Mn(t),so());var n=t.length;return aa(function(r){for(var o=-1,a=cc(r.length,n);++o<a;)r[o]=t[o].call(this,r[o]);return i(e,this,r)})}),fl=aa(function(e,n){var r=t.placeholder||fl.placeholder,o=H(n,r);return no(e,ne,$,n,o)}),hl=aa(function(e,n){var r=t.placeholder||hl.placeholder,o=H(n,r);return no(e,re,$,n,o)}),vl=aa(function(e,t){return no(e,ie,$,$,$,Mn(t))}),ml=Array.isArray,gl=Ku?function(e){return e instanceof Ku}:uu(!1),yl=Lr(function(e,t){jr(t,bs(t),e)}),_l=Lr(function(e,t){jr(t,Es(t),e)}),bl=Lr(function(e,t,n,r){Ar(t,Es(t),e,r)}),El=Lr(function(e,t,n,r){Ar(t,bs(t),e,r)}),Nl=aa(function(e,t){return cn(e,Mn(t))}),Cl=aa(function(e){return e.push($,rn),i(bl,$,e)}),Ol=aa(function(e){return e.push($,Do),i(Ml,$,e)}),Dl=$r(function(e,t,n){e[t]=n},uu(cu)),Rl=$r(function(e,t,n){Lu.call(e,t)?e[t].push(n):e[t]=[n]},so),wl=aa(Hn),xl=Lr(function(e,t,n){Zn(e,t,n)}),Ml=Lr(function(e,t,n,r){Zn(e,t,n,r)}),Pl=aa(function(e,t){return null==e?{}:(t=h(Mn(t),String),nr(e,Cn(Es(e),t)))}),Il=aa(function(e,t){return null==e?{}:nr(e,Mn(t))}),Sl=qr(function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)}),Tl=qr(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),kl=qr(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),jl=Hr("toLowerCase"),Al=Hr("toUpperCase"),Vl=qr(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Ul=qr(function(e,t,n){return e+(n?" ":"")+Us(t)}),Ll=qr(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fl=aa(function(e,t){try{return i(e,$,t)}catch(n){return Ta(n)?n:new Su(n)}}),Bl=aa(function(e,t){return u(Mn(t),function(t){e[t]=ul(e[t],e)}),e}),Wl=Yr(),Hl=Yr(!0),ql=aa(function(e,t){return function(n){return Hn(n,e,t)}}),Kl=aa(function(e,t){return function(n){return Hn(e,n,t)}}),zl=Qr(h),Yl=Qr(l),Gl=Qr(y),$l=Zr(),Ql=Zr(!0),Xl=to("ceil"),Jl=to("floor"),Zl=to("round");return t.prototype=n.prototype,S.prototype=Dc(n.prototype),S.prototype.constructor=S,Dt.prototype=Dc(n.prototype),Dt.prototype.constructor=Dt,St.prototype=mc?mc(null):Vu,Vt.prototype.clear=Ut,Vt.prototype["delete"]=Lt,Vt.prototype.get=Ft,Vt.prototype.has=Bt,Vt.prototype.set=Wt,Ht.prototype.push=Kt,zt.prototype.clear=Yt,zt.prototype["delete"]=Gt,zt.prototype.get=$t,zt.prototype.has=Qt,zt.prototype.set=Xt,ra.Cache=Vt,t.after=Qi,t.ary=Xi,t.assign=yl,t.assignIn=_l,t.assignInWith=bl,t.assignWith=El,t.at=Nl,t.before=Ji,t.bind=ul,t.bindAll=Bl,t.bindKey=cl,t.chain=Ei,t.chunk=So,t.compact=To,t.concat=Ac,t.cond=au,t.conforms=su,t.constant=uu,t.countBy=tl,t.create=us,t.curry=Zi,t.curryRight=ea,t.debounce=ta,t.defaults=Cl,t.defaultsDeep=Ol,t.defer=ll,t.delay=pl,t.difference=Vc,t.differenceBy=Uc,t.differenceWith=Lc,t.drop=ko,t.dropRight=jo,t.dropRightWhile=Ao,t.dropWhile=Vo,t.fill=Uo,t.filter=Ti,t.flatMap=Ai,t.flatten=Bo,t.flattenDeep=Wo,t.flip=na,t.flow=Wl,t.flowRight=Hl,t.fromPairs=Ho,t.functions=vs,t.functionsIn=ms,t.groupBy=nl,t.initial=zo,t.intersection=Fc,t.intersectionBy=Bc,t.intersectionWith=Wc,t.invert=Dl,t.invertBy=Rl,t.invokeMap=rl,t.iteratee=lu,t.keyBy=ol,t.keys=bs,t.keysIn=Es,t.map=Fi,t.mapKeys=Ns,t.mapValues=Cs,t.matches=pu,t.matchesProperty=du,t.memoize=ra,t.merge=xl,t.mergeWith=Ml,t.method=ql,t.methodOf=Kl,t.mixin=fu,t.negate=oa,t.nthArg=mu,t.omit=Pl,t.omitBy=Os,t.once=ia,t.orderBy=Bi,t.over=zl,t.overArgs=dl,t.overEvery=Yl,t.overSome=Gl,t.partial=fl,t.partialRight=hl,t.partition=il,t.pick=Il,t.pickBy=Ds,t.property=gu,t.propertyOf=yu,t.pull=Hc,t.pullAll=Qo,t.pullAllBy=Xo,t.pullAt=qc,t.range=$l,t.rangeRight=Ql,t.rearg=vl,t.reject=qi,t.remove=Jo,t.rest=aa,t.reverse=Zo,t.sampleSize=zi,t.set=ws,t.setWith=xs,t.shuffle=Yi,t.slice=ei,t.sortBy=al,t.sortedUniq=si,t.sortedUniqBy=ui,t.split=$s,t.spread=sa,t.tail=ci,t.take=li,t.takeRight=pi,t.takeRightWhile=di,t.takeWhile=fi,t.tap=Ni,t.throttle=ua,t.thru=Ci,t.toArray=ts,t.toPairs=Ms,t.toPairsIn=Ps,t.toPath=bu,t.toPlainObject=is,t.transform=Is,t.unary=ca,t.union=Kc,t.unionBy=zc,t.unionWith=Yc,t.uniq=hi,t.uniqBy=vi,t.uniqWith=mi,t.unset=Ss,t.unzip=gi,t.unzipWith=yi,t.values=Ts,t.valuesIn=ks,t.without=Gc,t.words=iu,t.wrap=la,t.xor=$c,t.xorBy=Qc,t.xorWith=Xc,t.zip=Jc,t.zipObject=_i,t.zipObjectDeep=bi,t.zipWith=Zc,t.extend=_l,t.extendWith=bl,fu(t,t),t.add=Nu,t.attempt=Fl,t.camelCase=Sl,t.capitalize=Us,t.ceil=Xl,t.clamp=js,t.clone=pa,t.cloneDeep=fa,t.cloneDeepWith=ha,t.cloneWith=da,t.deburr=Ls,t.endsWith=Fs,t.eq=va,t.escape=Bs,t.escapeRegExp=Ws,t.every=Si,t.find=ki,t.findIndex=Lo,t.findKey=cs,t.findLast=ji,t.findLastIndex=Fo,t.findLastKey=ls,t.floor=Jl,t.forEach=Vi,t.forEachRight=Ui,t.forIn=ps,t.forInRight=ds,t.forOwn=fs,t.forOwnRight=hs,t.get=gs,t.gt=ma,t.gte=ga,t.has=ys,t.hasIn=_s,t.head=qo,t.identity=cu,t.includes=Li,t.indexOf=Ko,t.inRange=As,t.invoke=wl,t.isArguments=ya,t.isArray=ml,t.isArrayBuffer=_a,t.isArrayLike=ba,t.isArrayLikeObject=Ea,t.isBoolean=Na,t.isBuffer=gl,t.isDate=Ca,t.isElement=Oa,t.isEmpty=Da,t.isEqual=Ra,t.isEqualWith=wa,t.isError=xa,t.isFinite=Ma,t.isFunction=Pa,t.isInteger=Ia,t.isLength=Sa,t.isMap=ja,t.isMatch=Aa,t.isMatchWith=Va,t.isNaN=Ua,t.isNative=La,t.isNil=Ba,t.isNull=Fa,t.isNumber=Wa,t.isObject=Ta,t.isObjectLike=ka,t.isPlainObject=Ha,t.isRegExp=qa,t.isSafeInteger=Ka,t.isSet=za,t.isString=Ya,t.isSymbol=Ga,t.isTypedArray=$a,t.isUndefined=Qa,t.isWeakMap=Xa,t.isWeakSet=Ja,t.join=Yo,t.kebabCase=Tl,t.last=Go,t.lastIndexOf=$o,t.lowerCase=kl,t.lowerFirst=jl,t.lt=Za,t.lte=es,t.max=Cu,t.maxBy=Ou,t.mean=Du,t.min=Ru,t.minBy=wu,t.noConflict=hu,t.noop=vu,t.now=sl,t.pad=Hs,t.padEnd=qs,t.padStart=Ks,t.parseInt=zs,t.random=Vs,t.reduce=Wi,t.reduceRight=Hi,t.repeat=Ys,t.replace=Gs,t.result=Rs,t.round=Zl,t.runInContext=G,t.sample=Ki,t.size=Gi,t.snakeCase=Vl,t.some=$i,t.sortedIndex=ti,t.sortedIndexBy=ni,t.sortedIndexOf=ri,t.sortedLastIndex=oi,t.sortedLastIndexBy=ii,t.sortedLastIndexOf=ai,t.startCase=Ul,t.startsWith=Qs,t.subtract=xu,t.sum=Mu,t.sumBy=Pu,t.template=Xs,t.times=_u,t.toInteger=ns,t.toLength=rs,t.toLower=Js,t.toNumber=os,t.toSafeInteger=as,t.toString=ss,t.toUpper=Zs,t.trim=eu,t.trimEnd=tu,t.trimStart=nu,t.truncate=ru,t.unescape=ou,t.uniqueId=Eu,t.upperCase=Ll,t.upperFirst=Al,t.each=Vi,t.eachRight=Ui,t.first=qo,fu(t,function(){var e={};return In(t,function(n,r){Lu.call(t.prototype,r)||(e[r]=n)}),e}(),{chain:!1}),t.VERSION=Q,u(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){t[e].placeholder=t}),u(["drop","take"],function(e,t){Dt.prototype[e]=function(n){var r=this.__filtered__;if(r&&!t)return new Dt(this);n=n===$?1:uc(ns(n),0);var o=this.clone();return r?o.__takeCount__=cc(n,o.__takeCount__):o.__views__.push({size:cc(n,Ce),type:e+(o.__dir__<0?"Right":"")}),o},Dt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),u(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==he||n==me;Dt.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),u(["head","last"],function(e,t){var n="take"+(t?"Right":"");Dt.prototype[e]=function(){return this[n](1).value()[0]}}),u(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Dt.prototype[e]=function(){return this.__filtered__?new Dt(this):this[n](1)}}),Dt.prototype.compact=function(){return this.filter(cu)},Dt.prototype.find=function(e){return this.filter(e).head()},Dt.prototype.findLast=function(e){return this.reverse().find(e)},Dt.prototype.invokeMap=aa(function(e,t){return"function"==typeof e?new Dt(this):this.map(function(n){return Hn(n,e,t)})}),Dt.prototype.reject=function(e){return e=so(e,3),this.filter(function(t){return!e(t)})},Dt.prototype.slice=function(e,t){e=ns(e);var n=this;return n.__filtered__&&(e>0||0>t)?new Dt(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==$&&(t=ns(t),n=0>t?n.dropRight(-t):n.take(t-e)),n)},Dt.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Dt.prototype.toArray=function(){return this.take(Ce)},In(Dt.prototype,function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=t[o?"take"+("last"==n?"Right":""):n],a=o||/^find/.test(n);i&&(t.prototype[n]=function(){var n=this.__wrapped__,s=o?[1]:arguments,u=n instanceof Dt,c=s[0],l=u||ml(n),p=function(e){var n=i.apply(t,v([e],s));return o&&d?n[0]:n};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,f=!!this.__actions__.length,h=a&&!d,m=u&&!f;if(!a&&l){n=m?n:new Dt(this);var g=e.apply(n,s);return g.__actions__.push({func:Ci,args:[p],thisArg:$}),new S(g,d)}return h&&m?e.apply(this,s):(g=this.thru(p),h?o?g.value()[0]:g.value():g)})}),u(["pop","push","shift","sort","splice","unshift"],function(e){var n=Au[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);t.prototype[e]=function(){var e=arguments;return o&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),In(Dt.prototype,function(e,n){var r=t[n];if(r){var o=r.name+"",i=Oc[o]||(Oc[o]=[]);i.push({name:n,func:r})}}),Oc[Gr($,J).name]=[{name:"wrapper",func:$}],Dt.prototype.clone=Mt,Dt.prototype.reverse=Pt,Dt.prototype.value=It,t.prototype.at=el,t.prototype.chain=Oi,t.prototype.commit=Di,t.prototype.flatMap=Ri,t.prototype.next=wi,t.prototype.plant=Mi,t.prototype.reverse=Pi,t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Ii,Zu&&(t.prototype[Zu]=xi),t}var $,Q="4.3.0",X=1,J=2,Z=4,ee=8,te=16,ne=32,re=64,oe=128,ie=256,ae=512,se=1,ue=2,ce=30,le="...",pe=150,de=16,fe=200,he=1,ve=2,me=3,ge="Expected a function",ye="__lodash_hash_undefined__",_e=1/0,be=9007199254740991,Ee=1.7976931348623157e308,Ne=NaN,Ce=4294967295,Oe=Ce-1,De=Ce>>>1,Re="__lodash_placeholder__",we="[object Arguments]",xe="[object Array]",Me="[object Boolean]",Pe="[object Date]",Ie="[object Error]",Se="[object Function]",Te="[object GeneratorFunction]",ke="[object Map]",je="[object Number]",Ae="[object Object]",Ve="[object RegExp]",Ue="[object Set]",Le="[object String]",Fe="[object Symbol]",Be="[object WeakMap]",We="[object WeakSet]",He="[object ArrayBuffer]",qe="[object Float32Array]",Ke="[object Float64Array]",ze="[object Int8Array]",Ye="[object Int16Array]",Ge="[object Int32Array]",$e="[object Uint8Array]",Qe="[object Uint8ClampedArray]",Xe="[object Uint16Array]",Je="[object Uint32Array]",Ze=/\b__p \+= '';/g,et=/\b(__p \+=) '' \+/g,tt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,nt=/&(?:amp|lt|gt|quot|#39|#96);/g,rt=/[&<>"'`]/g,ot=RegExp(nt.source),it=RegExp(rt.source),at=/<%-([\s\S]+?)%>/g,st=/<%([\s\S]+?)%>/g,ut=/<%=([\s\S]+?)%>/g,ct=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lt=/^\w*$/,pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,dt=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(dt.source),ht=/^\s+|\s+$/g,vt=/^\s+/,mt=/\s+$/,gt=/\\(\\)?/g,yt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_t=/\w*$/,bt=/^0x/i,Et=/^[-+]0x[0-9a-f]+$/i,Nt=/^0b[01]+$/i,Ct=/^\[object .+?Constructor\]$/,Ot=/^0o[0-7]+$/i,Dt=/^(?:0|[1-9]\d*)$/,Rt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,Mt="\\ud800-\\udfff",Pt="\\u0300-\\u036f\\ufe20-\\ufe23",It="\\u20d0-\\u20f0",St="\\u2700-\\u27bf",Tt="a-z\\xdf-\\xf6\\xf8-\\xff",kt="\\xac\\xb1\\xd7\\xf7",jt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",At="\\u2018\\u2019\\u201c\\u201d",Vt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ut="A-Z\\xc0-\\xd6\\xd8-\\xde",Lt="\\ufe0e\\ufe0f",Ft=kt+jt+At+Vt,Bt="["+Mt+"]",Wt="["+Ft+"]",Ht="["+Pt+It+"]",qt="\\d+",Kt="["+St+"]",zt="["+Tt+"]",Yt="[^"+Mt+Ft+qt+St+Tt+Ut+"]",Gt="\\ud83c[\\udffb-\\udfff]",$t="(?:"+Ht+"|"+Gt+")",Qt="[^"+Mt+"]",Xt="(?:\\ud83c[\\udde6-\\uddff]){2}",Jt="[\\ud800-\\udbff][\\udc00-\\udfff]",Zt="["+Ut+"]",en="\\u200d",tn="(?:"+zt+"|"+Yt+")",nn="(?:"+Zt+"|"+Yt+")",rn=$t+"?",on="["+Lt+"]?",an="(?:"+en+"(?:"+[Qt,Xt,Jt].join("|")+")"+on+rn+")*",sn=on+rn+an,un="(?:"+[Kt,Xt,Jt].join("|")+")"+sn,cn="(?:"+[Qt+Ht+"?",Ht,Xt,Jt,Bt].join("|")+")",ln=RegExp(Ht,"g"),pn=RegExp(Gt+"(?="+Gt+")|"+cn+sn,"g"),dn=RegExp("["+en+Mt+Pt+It+Lt+"]"),fn=/[a-zA-Z0-9]+/g,hn=RegExp([Zt+"?"+zt+"+(?="+[Wt,Zt,"$"].join("|")+")",nn+"+(?="+[Wt,Zt+tn,"$"].join("|")+")",Zt+"?"+tn+"+",Zt+"+",qt,un].join("|"),"g"),vn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mn=["Array","Buffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],gn=-1,yn={};yn[qe]=yn[Ke]=yn[ze]=yn[Ye]=yn[Ge]=yn[$e]=yn[Qe]=yn[Xe]=yn[Je]=!0,yn[we]=yn[xe]=yn[He]=yn[Me]=yn[Pe]=yn[Ie]=yn[Se]=yn[ke]=yn[je]=yn[Ae]=yn[Ve]=yn[Ue]=yn[Le]=yn[Be]=!1;var _n={};_n[we]=_n[xe]=_n[He]=_n[Me]=_n[Pe]=_n[qe]=_n[Ke]=_n[ze]=_n[Ye]=_n[Ge]=_n[ke]=_n[je]=_n[Ae]=_n[Ve]=_n[Ue]=_n[Le]=_n[Fe]=_n[$e]=_n[Qe]=_n[Xe]=_n[Je]=!0,_n[Ie]=_n[Se]=_n[Be]=!1;var bn={"À":"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"},En={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Nn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Cn={"function":!0,object:!0},On={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Dn=parseFloat,Rn=parseInt,wn=Cn[typeof n]&&n&&!n.nodeType?n:null,xn=Cn[typeof t]&&t&&!t.nodeType?t:null,Mn=S(wn&&xn&&"object"==typeof e&&e),Pn=S(Cn[typeof self]&&self),In=S(Cn[typeof window]&&window),Sn=xn&&xn.exports===wn?wn:null,Tn=S(Cn[typeof this]&&this),kn=Mn||In!==(Tn&&Tn.window)&&In||Pn||Tn||Function("return this")(),jn=G();(In||Pn||{})._=jn,"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return jn}):wn&&xn?(Sn&&((xn.exports=jn)._=jn),wn._=jn):kn._=jn}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],42:[function(e,t,n){function r(){l=!1,s.length?c=s.concat(c):p=-1,c.length&&o()}function o(){if(!l){var e=setTimeout(r);l=!0;for(var t=c.length;t;){for(s=c,c=[];++p<t;)s&&s[p].run();p=-1,t=c.length}s=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function a(){}var s,u=t.exports={},c=[],l=!1,p=-1;u.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];c.push(new i(e,t)),1!==c.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=a,u.addListener=a,u.once=a,u.off=a,u.removeListener=a,u.removeAllListeners=a,u.emit=a,u.binding=function(e){throw new Error("process.binding is not supported"); },u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],43:[function(e,t,n){"use strict";var r=e("./ReactMount"),o=e("./findDOMNode"),i=e("fbjs/lib/focusNode"),a={componentDidMount:function(){this.props.autoFocus&&i(o(this))}},s={Mixin:a,focusDOMComponent:function(){i(r.getNode(this._rootNodeID))}};t.exports=s},{"./ReactMount":107,"./findDOMNode":150,"fbjs/lib/focusNode":21}],44:[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 o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function i(e){switch(e){case x.topCompositionStart:return M.compositionStart;case x.topCompositionEnd:return M.compositionEnd;case x.topCompositionUpdate:return M.compositionUpdate}}function a(e,t){return e===x.topKeyDown&&t.keyCode===E}function s(e,t){switch(e){case x.topKeyUp:return-1!==b.indexOf(t.keyCode);case x.topKeyDown:return t.keyCode!==E;case x.topKeyPress:case x.topMouseDown:case x.topBlur:return!0;default:return!1}}function u(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function c(e,t,n,r,o){var c,l;if(N?c=i(e):I?s(e,r)&&(c=M.compositionEnd):a(e,r)&&(c=M.compositionStart),!c)return null;D&&(I||c!==M.compositionStart?c===M.compositionEnd&&I&&(l=I.getData()):I=m.getPooled(t));var p=g.getPooled(c,n,r,o);if(l)p.data=l;else{var d=u(r);null!==d&&(p.data=d)}return h.accumulateTwoPhaseDispatches(p),p}function l(e,t){switch(e){case x.topCompositionEnd:return u(t);case x.topKeyPress:var n=t.which;return n!==R?null:(P=!0,w);case x.topTextInput:var r=t.data;return r===w&&P?null:r;default:return null}}function p(e,t){if(I){if(e===x.topCompositionEnd||s(e,t)){var n=I.getData();return m.release(I),I=null,n}return null}switch(e){case x.topPaste:return null;case x.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case x.topCompositionEnd:return D?null:t.data;default:return null}}function d(e,t,n,r,o){var i;if(i=O?l(e,r):p(e,r),!i)return null;var a=y.getPooled(M.beforeInput,n,r,o);return a.data=i,h.accumulateTwoPhaseDispatches(a),a}var f=e("./EventConstants"),h=e("./EventPropagators"),v=e("fbjs/lib/ExecutionEnvironment"),m=e("./FallbackCompositionState"),g=e("./SyntheticCompositionEvent"),y=e("./SyntheticInputEvent"),_=e("fbjs/lib/keyOf"),b=[9,13,27,32],E=229,N=v.canUseDOM&&"CompositionEvent"in window,C=null;v.canUseDOM&&"documentMode"in document&&(C=document.documentMode);var O=v.canUseDOM&&"TextEvent"in window&&!C&&!r(),D=v.canUseDOM&&(!N||C&&C>8&&11>=C),R=32,w=String.fromCharCode(R),x=f.topLevelTypes,M={beforeInput:{phasedRegistrationNames:{bubbled:_({onBeforeInput:null}),captured:_({onBeforeInputCapture:null})},dependencies:[x.topCompositionEnd,x.topKeyPress,x.topTextInput,x.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:_({onCompositionEnd:null}),captured:_({onCompositionEndCapture:null})},dependencies:[x.topBlur,x.topCompositionEnd,x.topKeyDown,x.topKeyPress,x.topKeyUp,x.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:_({onCompositionStart:null}),captured:_({onCompositionStartCapture:null})},dependencies:[x.topBlur,x.topCompositionStart,x.topKeyDown,x.topKeyPress,x.topKeyUp,x.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:_({onCompositionUpdate:null}),captured:_({onCompositionUpdateCapture:null})},dependencies:[x.topBlur,x.topCompositionUpdate,x.topKeyDown,x.topKeyPress,x.topKeyUp,x.topMouseDown]}},P=!1,I=null,S={eventTypes:M,extractEvents:function(e,t,n,r,o){return[c(e,t,n,r,o),d(e,t,n,r,o)]}};t.exports=S},{"./EventConstants":56,"./EventPropagators":60,"./FallbackCompositionState":61,"./SyntheticCompositionEvent":132,"./SyntheticInputEvent":136,"fbjs/lib/ExecutionEnvironment":13,"fbjs/lib/keyOf":31}],45:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){i.forEach(function(t){o[r(t,e)]=o[e]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:a};t.exports=s},{}],46:[function(e,t,n){(function(n){"use strict";var r=e("./CSSProperty"),o=e("fbjs/lib/ExecutionEnvironment"),i=e("./ReactPerf"),a=e("fbjs/lib/camelizeStyleName"),s=e("./dangerousStyleValue"),u=e("fbjs/lib/hyphenateStyleName"),c=e("fbjs/lib/memoizeStringOnly"),l=e("fbjs/lib/warning"),p=c(function(e){return u(e)}),d=!1,f="cssFloat";if(o.canUseDOM){var h=document.createElement("div").style;try{h.font=""}catch(v){d=!0}void 0===document.documentElement.style.cssFloat&&(f="styleFloat")}if("production"!==n.env.NODE_ENV)var m=/^(?:webkit|moz|o)[A-Z]/,g=/;\s*$/,y={},_={},b=function(e){y.hasOwnProperty(e)&&y[e]||(y[e]=!0,"production"!==n.env.NODE_ENV?l(!1,"Unsupported style property %s. Did you mean %s?",e,a(e)):void 0)},E=function(e){y.hasOwnProperty(e)&&y[e]||(y[e]=!0,"production"!==n.env.NODE_ENV?l(!1,"Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)):void 0)},N=function(e,t){_.hasOwnProperty(t)&&_[t]||(_[t]=!0,"production"!==n.env.NODE_ENV?l(!1,'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,t.replace(g,"")):void 0)},C=function(e,t){e.indexOf("-")>-1?b(e):m.test(e)?E(e):g.test(t)&&N(e,t)};var O={createMarkupForStyles:function(e){var t="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];"production"!==n.env.NODE_ENV&&C(r,o),null!=o&&(t+=p(r)+":",t+=s(r,o)+";")}return t||null},setValueForStyles:function(e,t){var o=e.style;for(var i in t)if(t.hasOwnProperty(i)){"production"!==n.env.NODE_ENV&&C(i,t[i]);var a=s(i,t[i]);if("float"===i&&(i=f),a)o[i]=a;else{var u=d&&r.shorthandPropertyExpansions[i];if(u)for(var c in u)o[c]="";else o[i]=""}}}};i.measureMethods(O,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),t.exports=O}).call(this,e("_process"))},{"./CSSProperty":45,"./ReactPerf":113,"./dangerousStyleValue":147,_process:42,"fbjs/lib/ExecutionEnvironment":13,"fbjs/lib/camelizeStyleName":15,"fbjs/lib/hyphenateStyleName":26,"fbjs/lib/memoizeStringOnly":33,"fbjs/lib/warning":38}],47:[function(e,t,n){(function(n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e("./PooledClass"),i=e("./Object.assign"),a=e("fbjs/lib/invariant");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?"production"!==n.env.NODE_ENV?a(!1,"Mismatched list of contexts in callback queue"):a(!1):void 0,this._callbacks=null,this._contexts=null;for(var r=0;r<e.length;r++)e[r].call(t[r]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),t.exports=r}).call(this,e("_process"))},{"./Object.assign":64,"./PooledClass":65,_process:42,"fbjs/lib/invariant":27}],48:[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 o(e){var t=C.getPooled(M.change,I,e,O(e));b.accumulateTwoPhaseDispatches(t),N.batchedUpdates(i,t)}function i(e){_.enqueueEvents(e),_.processEventQueue(!1)}function a(e,t){P=e,I=t,P.attachEvent("onchange",o)}function s(){P&&(P.detachEvent("onchange",o),P=null,I=null)}function u(e,t,n){return e===x.topChange?n:void 0}function c(e,t,n){e===x.topFocus?(s(),a(t,n)):e===x.topBlur&&s()}function l(e,t){P=e,I=t,S=e.value,T=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(P,"value",A),P.attachEvent("onpropertychange",d)}function p(){P&&(delete P.value,P.detachEvent("onpropertychange",d),P=null,I=null,S=null,T=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==S&&(S=t,o(e))}}function f(e,t,n){return e===x.topInput?n:void 0}function h(e,t,n){e===x.topFocus?(p(),l(t,n)):e===x.topBlur&&p()}function v(e,t,n){return e!==x.topSelectionChange&&e!==x.topKeyUp&&e!==x.topKeyDown||!P||P.value===S?void 0:(S=P.value,I)}function m(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===x.topClick?n:void 0}var y=e("./EventConstants"),_=e("./EventPluginHub"),b=e("./EventPropagators"),E=e("fbjs/lib/ExecutionEnvironment"),N=e("./ReactUpdates"),C=e("./SyntheticEvent"),O=e("./getEventTarget"),D=e("./isEventSupported"),R=e("./isTextInputElement"),w=e("fbjs/lib/keyOf"),x=y.topLevelTypes,M={change:{phasedRegistrationNames:{bubbled:w({onChange:null}),captured:w({onChangeCapture:null})},dependencies:[x.topBlur,x.topChange,x.topClick,x.topFocus,x.topInput,x.topKeyDown,x.topKeyUp,x.topSelectionChange]}},P=null,I=null,S=null,T=null,k=!1;E.canUseDOM&&(k=D("change")&&(!("documentMode"in document)||document.documentMode>8));var j=!1;E.canUseDOM&&(j=D("input")&&(!("documentMode"in document)||document.documentMode>9));var A={get:function(){return T.get.call(this)},set:function(e){S=""+e,T.set.call(this,e)}},V={eventTypes:M,extractEvents:function(e,t,n,o,i){var a,s;if(r(t)?k?a=u:s=c:R(t)?j?a=f:(a=v,s=h):m(t)&&(a=g),a){var l=a(e,t,n);if(l){var p=C.getPooled(M.change,l,o,i);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}s&&s(e,t,n)}};t.exports=V},{"./EventConstants":56,"./EventPluginHub":57,"./EventPropagators":60,"./ReactUpdates":125,"./SyntheticEvent":134,"./getEventTarget":156,"./isEventSupported":161,"./isTextInputElement":162,"fbjs/lib/ExecutionEnvironment":13,"fbjs/lib/keyOf":31}],49:[function(e,t,n){"use strict";var r=0,o={createReactRootIndex:function(){return r++}};t.exports=o},{}],50:[function(e,t,n){(function(n){"use strict";function r(e,t,n){var r=n>=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var o=e("./Danger"),i=e("./ReactMultiChildUpdateTypes"),a=e("./ReactPerf"),s=e("./setInnerHTML"),u=e("./setTextContent"),c=e("fbjs/lib/invariant"),l={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:u,processUpdates:function(e,t){for(var a,l=null,p=null,d=0;d<e.length;d++)if(a=e[d],a.type===i.MOVE_EXISTING||a.type===i.REMOVE_NODE){var f=a.fromIndex,h=a.parentNode.childNodes[f],v=a.parentID;h?void 0:"production"!==n.env.NODE_ENV?c(!1,"processUpdates(): Unable to find child %s of element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.",f,v):c(!1),l=l||{},l[v]=l[v]||[],l[v][f]=h,p=p||[],p.push(h)}var m;if(m=t.length&&"string"==typeof t[0]?o.dangerouslyRenderMarkup(t):t,p)for(var g=0;g<p.length;g++)p[g].parentNode.removeChild(p[g]);for(var y=0;y<e.length;y++)switch(a=e[y],a.type){case i.INSERT_MARKUP:r(a.parentNode,m[a.markupIndex],a.toIndex);break;case i.MOVE_EXISTING:r(a.parentNode,l[a.parentID][a.fromIndex],a.toIndex);break;case i.SET_MARKUP:s(a.parentNode,a.content);break;case i.TEXT_CONTENT:u(a.parentNode,a.content);break;case i.REMOVE_NODE:}}};a.measureMethods(l,"DOMChildrenOperations",{updateTextContent:"updateTextContent"}),t.exports=l}).call(this,e("_process"))},{"./Danger":53,"./ReactMultiChildUpdateTypes":109,"./ReactPerf":113,"./setInnerHTML":166,"./setTextContent":167,_process:42,"fbjs/lib/invariant":27}],51:[function(e,t,n){(function(n){"use strict";function r(e,t){return(e&t)===t}var o=e("fbjs/lib/invariant"),i={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=i,a=e.Properties||{},u=e.DOMAttributeNamespaces||{},c=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},p=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var d in a){s.properties.hasOwnProperty(d)?"production"!==n.env.NODE_ENV?o(!1,"injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.",d):o(!1):void 0;var f=d.toLowerCase(),h=a[d],v={attributeName:f,attributeNamespace:null,propertyName:d,mutationMethod:null,mustUseAttribute:r(h,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(h,t.MUST_USE_PROPERTY),hasSideEffects:r(h,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(h,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(h,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(h,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(h,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(v.mustUseAttribute&&v.mustUseProperty?"production"!==n.env.NODE_ENV?o(!1,"DOMProperty: Cannot require using both attribute and property: %s",d):o(!1):void 0,!v.mustUseProperty&&v.hasSideEffects?"production"!==n.env.NODE_ENV?o(!1,"DOMProperty: Properties that have side effects must use property: %s",d):o(!1):void 0,v.hasBooleanValue+v.hasNumericValue+v.hasOverloadedBooleanValue<=1?void 0:"production"!==n.env.NODE_ENV?o(!1,"DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s",d):o(!1),"production"!==n.env.NODE_ENV&&(s.getPossibleStandardName[f]=d),c.hasOwnProperty(d)){var m=c[d];v.attributeName=m,"production"!==n.env.NODE_ENV&&(s.getPossibleStandardName[m]=d)}u.hasOwnProperty(d)&&(v.attributeNamespace=u[d]),l.hasOwnProperty(d)&&(v.propertyName=l[d]),p.hasOwnProperty(d)&&(v.mutationMethod=p[d]),s.properties[d]=v}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:"production"!==n.env.NODE_ENV?{}: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},getDefaultValueForProperty:function(e,t){var n,r=a[e];return r||(a[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:i};t.exports=s}).call(this,e("_process"))},{_process:42,"fbjs/lib/invariant":27}],52:[function(e,t,n){(function(n){"use strict";function r(e){return p.hasOwnProperty(e)?!0:l.hasOwnProperty(e)?!1:c.test(e)?(p[e]=!0,!0):(l[e]=!0,"production"!==n.env.NODE_ENV?u(!1,"Invalid attribute name: `%s`",e):void 0,!1)}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&1>t||e.hasOverloadedBooleanValue&&t===!1}var i=e("./DOMProperty"),a=e("./ReactPerf"),s=e("./quoteAttributeValueForBrowser"),u=e("fbjs/lib/warning"),c=/^[a-zA-Z_][\w\.\-]*$/,l={},p={};if("production"!==n.env.NODE_ENV)var d={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0},f={},h=function(e){if(!(d.hasOwnProperty(e)&&d[e]||f.hasOwnProperty(e)&&f[e])){f[e]=!0;var t=e.toLowerCase(),r=i.isCustomAttribute(t)?t:i.getPossibleStandardName.hasOwnProperty(t)?i.getPossibleStandardName[t]:null;"production"!==n.env.NODE_ENV?u(null==r,"Unknown DOM property %s. Did you mean %s?",e,r):void 0}};var v={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var r=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(r){if(o(r,t))return"";var a=r.attributeName;return r.hasBooleanValue||r.hasOverloadedBooleanValue&&t===!0?a+'=""':a+"="+s(t)}return i.isCustomAttribute(e)?null==t?"":e+"="+s(t):("production"!==n.env.NODE_ENV&&h(e),null)},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,r){var a=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(a){var s=a.mutationMethod;if(s)s(e,r);else if(o(a,r))this.deleteValueForProperty(e,t);else if(a.mustUseAttribute){var u=a.attributeName,c=a.attributeNamespace;c?e.setAttributeNS(c,u,""+r):a.hasBooleanValue||a.hasOverloadedBooleanValue&&r===!0?e.setAttribute(u,""):e.setAttribute(u,""+r)}else{var l=a.propertyName;a.hasSideEffects&&""+e[l]==""+r||(e[l]=r)}}else i.isCustomAttribute(t)?v.setValueForAttribute(e,t,r):"production"!==n.env.NODE_ENV&&h(t)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var r=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var o=r.mutationMethod;if(o)o(e,void 0);else if(r.mustUseAttribute)e.removeAttribute(r.attributeName);else{var a=r.propertyName,s=i.getDefaultValueForProperty(e.nodeName,a);r.hasSideEffects&&""+e[a]===s||(e[a]=s)}}else i.isCustomAttribute(t)?e.removeAttribute(t):"production"!==n.env.NODE_ENV&&h(t)}};a.measureMethods(v,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),t.exports=v}).call(this,e("_process"))},{"./DOMProperty":51,"./ReactPerf":113,"./quoteAttributeValueForBrowser":164,_process:42,"fbjs/lib/warning":38}],53:[function(e,t,n){(function(n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=e("fbjs/lib/ExecutionEnvironment"),i=e("fbjs/lib/createNodesFromMarkup"),a=e("fbjs/lib/emptyFunction"),s=e("fbjs/lib/getMarkupWrap"),u=e("fbjs/lib/invariant"),c=/^(<[^ \/>]+)/,l="data-danger-index",p={dangerouslyRenderMarkup:function(e){o.canUseDOM?void 0:"production"!==n.env.NODE_ENV?u(!1,"dangerouslyRenderMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString for server rendering."):u(!1);for(var t,p={},d=0;d<e.length;d++)e[d]?void 0:"production"!==n.env.NODE_ENV?u(!1,"dangerouslyRenderMarkup(...): Missing markup."):u(!1),t=r(e[d]),t=s(t)?t:"*",p[t]=p[t]||[],p[t][d]=e[d];var f=[],h=0;for(t in p)if(p.hasOwnProperty(t)){var v,m=p[t];for(v in m)if(m.hasOwnProperty(v)){var g=m[v];m[v]=g.replace(c,"$1 "+l+'="'+v+'" ')}for(var y=i(m.join(""),a),_=0;_<y.length;++_){var b=y[_];b.hasAttribute&&b.hasAttribute(l)?(v=+b.getAttribute(l),b.removeAttribute(l),f.hasOwnProperty(v)?"production"!==n.env.NODE_ENV?u(!1,"Danger: Assigning to an already-occupied result index."):u(!1):void 0,f[v]=b,h+=1):"production"!==n.env.NODE_ENV&&console.error("Danger: Discarding unexpected node:",b)}}return h!==f.length?"production"!==n.env.NODE_ENV?u(!1,"Danger: Did not assign to every index of resultList."):u(!1):void 0,f.length!==e.length?"production"!==n.env.NODE_ENV?u(!1,"Danger: Expected markup to render %s nodes, but rendered %s.",e.length,f.length):u(!1):void 0,f},dangerouslyReplaceNodeWithMarkup:function(e,t){o.canUseDOM?void 0:"production"!==n.env.NODE_ENV?u(!1,"dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering."):u(!1),t?void 0:"production"!==n.env.NODE_ENV?u(!1,"dangerouslyReplaceNodeWithMarkup(...): Missing markup."):u(!1),"html"===e.tagName.toLowerCase()?"production"!==n.env.NODE_ENV?u(!1,"dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString()."):u(!1):void 0;var r;r="string"==typeof t?i(t,a)[0]:t,e.parentNode.replaceChild(r,e)}};t.exports=p}).call(this,e("_process"))},{_process:42,"fbjs/lib/ExecutionEnvironment":13,"fbjs/lib/createNodesFromMarkup":18,"fbjs/lib/emptyFunction":19,"fbjs/lib/getMarkupWrap":23,"fbjs/lib/invariant":27}],54:[function(e,t,n){"use strict";var r=e("fbjs/lib/keyOf"),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];t.exports=o},{"fbjs/lib/keyOf":31}],55:[function(e,t,n){"use strict";var r=e("./EventConstants"),o=e("./EventPropagators"),i=e("./SyntheticMouseEvent"),a=e("./ReactMount"),s=e("fbjs/lib/keyOf"),u=r.topLevelTypes,c=a.getFirstReactDOM,l={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},p=[null,null],d={eventTypes:l,extractEvents:function(e,t,n,r,s){if(e===u.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var d;if(t.window===t)d=t;else{var f=t.ownerDocument;d=f?f.defaultView||f.parentWindow:window}var h,v,m="",g="";if(e===u.topMouseOut?(h=t,m=n,v=c(r.relatedTarget||r.toElement),v?g=a.getID(v):v=d,v=v||d):(h=d,v=t,g=n),h===v)return null;var y=i.getPooled(l.mouseLeave,m,r,s);y.type="mouseleave",y.target=h,y.relatedTarget=v;var _=i.getPooled(l.mouseEnter,g,r,s);return _.type="mouseenter",_.target=v,_.relatedTarget=h,o.accumulateEnterLeaveDispatches(y,_,m,g),p[0]=y,p[1]=_,p}};t.exports=d},{"./EventConstants":56,"./EventPropagators":60,"./ReactMount":107,"./SyntheticMouseEvent":138,"fbjs/lib/keyOf":31}],56:[function(e,t,n){"use strict";var r=e("fbjs/lib/keyMirror"),o=r({bubbled:null,captured:null}),i=r({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};t.exports=a},{"fbjs/lib/keyMirror":30}],57:[function(e,t,n){(function(n){"use strict";function r(){var e=m&&m.traverseTwoPhase&&m.traverseEnterLeave;"production"!==n.env.NODE_ENV?l(e,"InstanceHandle not injected before use!"):void 0}var o=e("./EventPluginRegistry"),i=e("./EventPluginUtils"),a=e("./ReactErrorUtils"),s=e("./accumulateInto"),u=e("./forEachAccumulated"),c=e("fbjs/lib/invariant"),l=e("fbjs/lib/warning"),p={},d=null,f=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},h=function(e){return f(e,!0)},v=function(e){return f(e,!1)},m=null,g={injection:{injectMount:i.injection.injectMount,injectInstanceHandle:function(e){m=e,"production"!==n.env.NODE_ENV&&r()},getInstanceHandle:function(){return"production"!==n.env.NODE_ENV&&r(),m},injectEventPluginOrder:o.injectEventPluginOrder,injectEventPluginsByName:o.injectEventPluginsByName},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:function(e,t,r){"function"!=typeof r?"production"!==n.env.NODE_ENV?c(!1,"Expected %s listener to be a function, instead got type %s",t,typeof r):c(!1):void 0;var i=p[t]||(p[t]={});i[e]=r;var a=o.registrationNameModules[t];a&&a.didPutListener&&a.didPutListener(e,t,r)},getListener:function(e,t){var n=p[t];return n&&n[e]},deleteListener:function(e,t){var n=o.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=p[t];r&&delete r[e]},deleteAllListeners:function(e){for(var t in p)if(p[t][e]){var n=o.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete p[t][e]}},extractEvents:function(e,t,n,r,i){for(var a,u=o.plugins,c=0;c<u.length;c++){var l=u[c];if(l){var p=l.extractEvents(e,t,n,r,i);p&&(a=s(a,p))}}return a},enqueueEvents:function(e){e&&(d=s(d,e))},processEventQueue:function(e){var t=d;d=null,e?u(t,h):u(t,v),d?"production"!==n.env.NODE_ENV?c(!1,"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."):c(!1):void 0,a.rethrowCaughtError()},__purge:function(){p={}},__getListenerBank:function(){return p}};t.exports=g}).call(this,e("_process"))},{"./EventPluginRegistry":58,"./EventPluginUtils":59,"./ReactErrorUtils":98,"./accumulateInto":144,"./forEachAccumulated":152,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],58:[function(e,t,n){(function(n){"use strict";function r(){if(s)for(var e in u){var t=u[e],r=s.indexOf(e);if(r>-1?void 0:"production"!==n.env.NODE_ENV?a(!1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e):a(!1),!c.plugins[r]){t.extractEvents?void 0:"production"!==n.env.NODE_ENV?a(!1,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e):a(!1),c.plugins[r]=t;var i=t.eventTypes;for(var l in i)o(i[l],t,l)?void 0:"production"!==n.env.NODE_ENV?a(!1,"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",l,e):a(!1)}}}function o(e,t,r){c.eventNameDispatchConfigs.hasOwnProperty(r)?"production"!==n.env.NODE_ENV?a(!1,"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",r):a(!1):void 0,c.eventNameDispatchConfigs[r]=e;var o=e.phasedRegistrationNames;if(o){for(var s in o)if(o.hasOwnProperty(s)){var u=o[s];i(u,t,r)}return!0}return e.registrationName?(i(e.registrationName,t,r),!0):!1}function i(e,t,r){c.registrationNameModules[e]?"production"!==n.env.NODE_ENV?a(!1,"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e):a(!1):void 0,c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[r].dependencies}var a=e("fbjs/lib/invariant"),s=null,u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){s?"production"!==n.env.NODE_ENV?a(!1,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):a(!1):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o];u.hasOwnProperty(o)&&u[o]===i||(u[o]?"production"!==n.env.NODE_ENV?a(!1,"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",o):a(!1):void 0,u[o]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=c.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=c}).call(this,e("_process"))},{_process:42,"fbjs/lib/invariant":27}],59:[function(e,t,n){(function(n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function o(e){return e===y.topMouseMove||e===y.topTouchMove}function i(e){return e===y.topMouseDown||e===y.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=g.Mount.getNode(r),t?h.invokeGuardedCallbackWithCatch(o,n,e,r):h.invokeGuardedCallback(o,n,e,r),e.currentTarget=null}function s(e,t){var r=e._dispatchListeners,o=e._dispatchIDs;if("production"!==n.env.NODE_ENV&&d(e),Array.isArray(r))for(var i=0;i<r.length&&!e.isPropagationStopped();i++)a(e,t,r[i],o[i]);else r&&a(e,t,r,o);e._dispatchListeners=null,e._dispatchIDs=null}function u(e){var t=e._dispatchListeners,r=e._dispatchIDs;if("production"!==n.env.NODE_ENV&&d(e),Array.isArray(t)){for(var o=0;o<t.length&&!e.isPropagationStopped();o++)if(t[o](e,r[o]))return r[o]}else if(t&&t(e,r))return r;return null}function c(e){var t=u(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function l(e){"production"!==n.env.NODE_ENV&&d(e);var t=e._dispatchListeners,r=e._dispatchIDs;Array.isArray(t)?"production"!==n.env.NODE_ENV?v(!1,"executeDirectDispatch(...): Invalid `event`."):v(!1):void 0;var o=t?t(e,r):null;return e._dispatchListeners=null,e._dispatchIDs=null,o}function p(e){return!!e._dispatchListeners}var d,f=e("./EventConstants"),h=e("./ReactErrorUtils"),v=e("fbjs/lib/invariant"),m=e("fbjs/lib/warning"),g={Mount:null,injectMount:function(e){g.Mount=e,"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?m(e&&e.getNode&&e.getID,"EventPluginUtils.injection.injectMount(...): Injected Mount module is missing getNode or getID."):void 0)}},y=f.topLevelTypes;"production"!==n.env.NODE_ENV&&(d=function(e){var t=e._dispatchListeners,r=e._dispatchIDs,o=Array.isArray(t),i=Array.isArray(r),a=i?r.length:r?1:0,s=o?t.length:t?1:0;"production"!==n.env.NODE_ENV?m(i===o&&a===s,"EventPluginUtils: Invalid `event`."):void 0});var _={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:l,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:c,hasDispatches:p,getNode:function(e){return g.Mount.getNode(e)},getID:function(e){return g.Mount.getID(e)},injection:g};t.exports=_}).call(this,e("_process"))},{"./EventConstants":56,"./ReactErrorUtils":98,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],60:[function(e,t,n){(function(n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return _(e,r)}function o(e,t,o){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?v(e,"Dispatching id must not be null"):void 0);var i=t?y.bubbled:y.captured,a=r(e,o,i);a&&(o._dispatchListeners=m(o._dispatchListeners,a),o._dispatchIDs=m(o._dispatchIDs,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function a(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(e.dispatchMarker,o,e)}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=_(e,r);o&&(n._dispatchListeners=m(n._dispatchListeners,o),n._dispatchIDs=m(n._dispatchIDs,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e.dispatchMarker,null,e)}function c(e){g(e,i)}function l(e){g(e,a)}function p(e,t,n,r){h.injection.getInstanceHandle().traverseEnterLeave(n,r,s,e,t)}function d(e){g(e,u)}var f=e("./EventConstants"),h=e("./EventPluginHub"),v=e("fbjs/lib/warning"),m=e("./accumulateInto"),g=e("./forEachAccumulated"),y=f.PropagationPhases,_=h.getListener,b={ accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:p};t.exports=b}).call(this,e("_process"))},{"./EventConstants":56,"./EventPluginHub":57,"./accumulateInto":144,"./forEachAccumulated":152,_process:42,"fbjs/lib/warning":38}],61:[function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=e("./PooledClass"),i=e("./Object.assign"),a=e("./getTextContentAccessor");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,o=this.getText(),i=o.length;for(e=0;r>e&&n[e]===o[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===o[i-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),t.exports=r},{"./Object.assign":64,"./PooledClass":65,"./getTextContentAccessor":159}],62:[function(e,t,n){"use strict";var r,o=e("./DOMProperty"),i=e("fbjs/lib/ExecutionEnvironment"),a=o.injection.MUST_USE_ATTRIBUTE,s=o.injection.MUST_USE_PROPERTY,u=o.injection.HAS_BOOLEAN_VALUE,c=o.injection.HAS_SIDE_EFFECTS,l=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,capture:a|u,cellPadding:null,cellSpacing:null,charSet:a,challenge:a,checked:s|u,classID:a,className:r?a:s,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,"default":u,defer:u,dir:null,disabled:a|u,download:d,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|u,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,inputMode:a,integrity:null,is:a,keyParams:a,keyType:a,kind:null,label:null,lang:null,list:a,loop:s|u,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,minLength:a,multiple:s|u,muted:s|u,name:null,nonce:a,noValidate:u,open:u,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,reversed:u,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scoped:u,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:s,srcLang:null,srcSet:a,start:l,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|c,width:a,wmode:a,wrap:null,about:a,datatype:a,inlist:a,prefix:a,property:a,resource:a,"typeof":a,vocab:a,autoCapitalize:a,autoCorrect:a,autoSave:null,color:null,itemProp:a,itemScope:a|u,itemType:a,itemID:a,itemRef:a,results:null,security:a,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=h},{"./DOMProperty":51,"fbjs/lib/ExecutionEnvironment":13}],63:[function(e,t,n){(function(n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?"production"!==n.env.NODE_ENV?c(!1,"Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa."):c(!1):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?"production"!==n.env.NODE_ENV?c(!1,"Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink."):c(!1):void 0}function i(e){r(e),null!=e.checked||null!=e.onChange?"production"!==n.env.NODE_ENV?c(!1,"Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink"):c(!1):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=e("./ReactPropTypes"),u=e("./ReactPropTypeLocations"),c=e("fbjs/lib/invariant"),l=e("fbjs/lib/warning"),p={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},d={value:function(e,t,n){return!e[t]||p[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={},h={checkPropTypes:function(e,t,r){for(var o in d){if(d.hasOwnProperty(o))var i=d[o](t,o,e,u.prop);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;var s=a(r);"production"!==n.env.NODE_ENV?l(!1,"Failed form propType: %s%s",i.message,s):void 0}}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=h}).call(this,e("_process"))},{"./ReactPropTypeLocations":115,"./ReactPropTypes":116,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],64:[function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var i=arguments[o];if(null!=i){var a=Object(i);for(var s in a)r.call(a,s)&&(n[s]=a[s])}}return n}t.exports=r},{}],65:[function(e,t,n){(function(n){"use strict";var r=e("fbjs/lib/invariant"),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},i=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 o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},c=function(e){var t=this;e instanceof t?void 0:"production"!==n.env.NODE_ENV?r(!1,"Trying to release an instance into a pool of a different type."):r(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},l=10,p=o,d=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=l),n.release=c,n},f={addPoolingTo:d,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s,fiveArgumentPooler:u};t.exports=f}).call(this,e("_process"))},{_process:42,"fbjs/lib/invariant":27}],66:[function(e,t,n){"use strict";var r=e("./ReactDOM"),o=e("./ReactDOMServer"),i=e("./ReactIsomorphic"),a=e("./Object.assign"),s=e("./deprecated"),u={};a(u,i),a(u,{findDOMNode:s("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:s("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:s("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:s("renderToString","ReactDOMServer","react-dom/server",o,o.renderToString),renderToStaticMarkup:s("renderToStaticMarkup","ReactDOMServer","react-dom/server",o,o.renderToStaticMarkup)}),u.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,u.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=o,t.exports=u},{"./Object.assign":64,"./ReactDOM":77,"./ReactDOMServer":87,"./ReactIsomorphic":105,"./deprecated":148}],67:[function(e,t,n){(function(n){"use strict";var r=e("./ReactInstanceMap"),o=e("./findDOMNode"),i=e("fbjs/lib/warning"),a="_getDOMNodeDidWarn",s={getDOMNode:function(){return"production"!==n.env.NODE_ENV?i(this.constructor[a],"%s.getDOMNode(...) is deprecated. Please use ReactDOM.findDOMNode(instance) instead.",r.get(this).getName()||this.tagName||"Unknown"):void 0,this.constructor[a]=!0,o(this)}};t.exports=s}).call(this,e("_process"))},{"./ReactInstanceMap":104,"./findDOMNode":150,_process:42,"fbjs/lib/warning":38}],68:[function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=h++,d[e[m]]={}),d[e[m]]}var o=e("./EventConstants"),i=e("./EventPluginHub"),a=e("./EventPluginRegistry"),s=e("./ReactEventEmitterMixin"),u=e("./ReactPerf"),c=e("./ViewportMetrics"),l=e("./Object.assign"),p=e("./isEventSupported"),d={},f=!1,h=0,v={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),g=l({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=r(n),s=a.registrationNameDependencies[e],u=o.topLevelTypes,c=0;c<s.length;c++){var l=s[c];i.hasOwnProperty(l)&&i[l]||(l===u.topWheel?p("wheel")?g.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",n):p("mousewheel")?g.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",n):g.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",n):l===u.topScroll?p("scroll",!0)?g.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):g.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",g.ReactEventListener.WINDOW_HANDLE):l===u.topFocus||l===u.topBlur?(p("focus",!0)?(g.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",n),g.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",n)):p("focusin")&&(g.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",n),g.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",n)),i[u.topBlur]=!0,i[u.topFocus]=!0):v.hasOwnProperty(l)&&g.ReactEventListener.trapBubbledEvent(l,v[l],n),i[l]=!0)}},trapBubbledEvent:function(e,t,n){return g.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return g.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!f){var e=c.refreshScrollValues;g.ReactEventListener.monitorScrollValue(e),f=!0}},eventNameDispatchConfigs:i.eventNameDispatchConfigs,registrationNameModules:i.registrationNameModules,putListener:i.putListener,getListener:i.getListener,deleteListener:i.deleteListener,deleteAllListeners:i.deleteAllListeners});u.measureMethods(g,"ReactBrowserEventEmitter",{putListener:"putListener",deleteListener:"deleteListener"}),t.exports=g},{"./EventConstants":56,"./EventPluginHub":57,"./EventPluginRegistry":58,"./Object.assign":64,"./ReactEventEmitterMixin":99,"./ReactPerf":113,"./ViewportMetrics":143,"./isEventSupported":161}],69:[function(e,t,n){(function(n){"use strict";function r(e,t,r){var o=void 0===e[r];"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?u(o,"flattenChildren(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",r):void 0),null!=t&&o&&(e[r]=i(t,null))}var o=e("./ReactReconciler"),i=e("./instantiateReactComponent"),a=e("./shouldUpdateReactComponent"),s=e("./traverseAllChildren"),u=e("fbjs/lib/warning"),c={instantiateChildren:function(e,t,n){if(null==e)return null;var o={};return s(e,r,o),o},updateChildren:function(e,t,n,r){if(!t&&!e)return null;var s;for(s in t)if(t.hasOwnProperty(s)){var u=e&&e[s],c=u&&u._currentElement,l=t[s];if(null!=u&&a(c,l))o.receiveComponent(u,l,n,r),t[s]=u;else{u&&o.unmountComponent(u,s);var p=i(l,null);t[s]=p}}for(s in e)!e.hasOwnProperty(s)||t&&t.hasOwnProperty(s)||o.unmountComponent(e[s]);return t},unmountChildren:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];o.unmountComponent(n)}}};t.exports=c}).call(this,e("_process"))},{"./ReactReconciler":118,"./instantiateReactComponent":160,"./shouldUpdateReactComponent":168,"./traverseAllChildren":169,_process:42,"fbjs/lib/warning":38}],70:[function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"//")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);g(e,i,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?c(u,o,n,m.thatReturnsArgument):null!=u&&(v.isValidElement(u)&&(u=v.cloneAndReplaceKey(u,i+(u!==t?r(u.key||"")+"/":"")+n)),o.push(u))}function c(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=s.getPooled(t,a,o,i);g(e,u,c),s.release(c)}function l(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function p(e,t,n){return null}function d(e,t){return g(e,p,null)}function f(e){var t=[];return c(e,t,null,m.thatReturnsArgument),t}var h=e("./PooledClass"),v=e("./ReactElement"),m=e("fbjs/lib/emptyFunction"),g=e("./traverseAllChildren"),y=h.twoArgumentPooler,_=h.fourArgumentPooler,b=/\/(?!\/)/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,y),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,_);var E={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:d,toArray:f};t.exports=E},{"./PooledClass":65,"./ReactElement":94,"./traverseAllChildren":169,"fbjs/lib/emptyFunction":19}],71:[function(e,t,n){(function(n){"use strict";function r(){w||(w=!0,"production"!==n.env.NODE_ENV?C(!1,"setProps(...) and replaceProps(...) are deprecated. Instead, call render again at the top level."):void 0)}function o(e,t,r){for(var o in t)t.hasOwnProperty(o)&&("production"!==n.env.NODE_ENV?C("function"==typeof t[o],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactClass",m[r],o):void 0)}function i(e,t){var r=x.hasOwnProperty(t)?x[t]:null;P.hasOwnProperty(t)&&(r!==D.OVERRIDE_BASE?"production"!==n.env.NODE_ENV?b(!1,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t):b(!1):void 0),e.hasOwnProperty(t)&&(r!==D.DEFINE_MANY&&r!==D.DEFINE_MANY_MERGED?"production"!==n.env.NODE_ENV?b(!1,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t):b(!1):void 0)}function a(e,t){if(t){"function"==typeof t?"production"!==n.env.NODE_ENV?b(!1,"ReactClass: You're attempting to use a component class as a mixin. Instead, just use a regular object."):b(!1):void 0,h.isValidElement(t)?"production"!==n.env.NODE_ENV?b(!1,"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object."):b(!1):void 0;var r=e.prototype;t.hasOwnProperty(O)&&M.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==O){var a=t[o];if(i(r,o),M.hasOwnProperty(o))M[o](e,a);else{var s=x.hasOwnProperty(o),u=r.hasOwnProperty(o),p="function"==typeof a,d=p&&!s&&!u&&t.autobind!==!1;if(d)r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[o]=a,r[o]=a;else if(u){var f=x[o];!s||f!==D.DEFINE_MANY_MERGED&&f!==D.DEFINE_MANY?"production"!==n.env.NODE_ENV?b(!1,"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",f,o):b(!1):void 0,f===D.DEFINE_MANY_MERGED?r[o]=c(r[o],a):f===D.DEFINE_MANY&&(r[o]=l(r[o],a))}else r[o]=a,"production"!==n.env.NODE_ENV&&"function"==typeof a&&t.displayName&&(r[o].displayName=t.displayName+"_"+o)}}}}function s(e,t){if(t)for(var r in t){var o=t[r];if(t.hasOwnProperty(r)){var i=r in M;i?"production"!==n.env.NODE_ENV?b(!1,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',r):b(!1):void 0;var a=r in e;a?"production"!==n.env.NODE_ENV?b(!1,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",r):b(!1):void 0,e[r]=o}}}function u(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:"production"!==n.env.NODE_ENV?b(!1,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."):b(!1);for(var r in t)t.hasOwnProperty(r)&&(void 0!==e[r]?"production"!==n.env.NODE_ENV?b(!1,"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",r):b(!1):void 0,e[r]=t[r]);return e}function c(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 o={};return u(o,n),u(o,r),o}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function p(e,t){var r=t.bind(e);if("production"!==n.env.NODE_ENV){r.__reactBoundContext=e,r.__reactBoundMethod=t,r.__reactBoundArguments=null;var o=e.constructor.displayName,i=r.bind;r.bind=function(a){for(var s=arguments.length,u=Array(s>1?s-1:0),c=1;s>c;c++)u[c-1]=arguments[c];if(a!==e&&null!==a)"production"!==n.env.NODE_ENV?C(!1,"bind(): React component methods may only be bound to the component instance. See %s",o):void 0;else if(!u.length)return"production"!==n.env.NODE_ENV?C(!1,"bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See %s",o):void 0,r;var l=i.apply(r,arguments);return l.__reactBoundContext=e,l.__reactBoundMethod=t,l.__reactBoundArguments=u,l}}return r}function d(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=p(e,n)}}var f=e("./ReactComponent"),h=e("./ReactElement"),v=e("./ReactPropTypeLocations"),m=e("./ReactPropTypeLocationNames"),g=e("./ReactNoopUpdateQueue"),y=e("./Object.assign"),_=e("fbjs/lib/emptyObject"),b=e("fbjs/lib/invariant"),E=e("fbjs/lib/keyMirror"),N=e("fbjs/lib/keyOf"),C=e("fbjs/lib/warning"),O=N({mixins:null}),D=E({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),R=[],w=!1,x={mixins:D.DEFINE_MANY,statics:D.DEFINE_MANY,propTypes:D.DEFINE_MANY,contextTypes:D.DEFINE_MANY,childContextTypes:D.DEFINE_MANY,getDefaultProps:D.DEFINE_MANY_MERGED,getInitialState:D.DEFINE_MANY_MERGED,getChildContext:D.DEFINE_MANY_MERGED,render:D.DEFINE_ONCE,componentWillMount:D.DEFINE_MANY,componentDidMount:D.DEFINE_MANY,componentWillReceiveProps:D.DEFINE_MANY,shouldComponentUpdate:D.DEFINE_ONCE,componentWillUpdate:D.DEFINE_MANY,componentDidUpdate:D.DEFINE_MANY,componentWillUnmount:D.DEFINE_MANY,updateComponent:D.OVERRIDE_BASE},M={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)a(e,t[n])},childContextTypes:function(e,t){"production"!==n.env.NODE_ENV&&o(e,t,v.childContext),e.childContextTypes=y({},e.childContextTypes,t)},contextTypes:function(e,t){"production"!==n.env.NODE_ENV&&o(e,t,v.context),e.contextTypes=y({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=c(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){"production"!==n.env.NODE_ENV&&o(e,t,v.prop),e.propTypes=y({},e.propTypes,t)},statics:function(e,t){s(e,t)},autobind:function(){}},P={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t)},isMounted:function(){return this.updater.isMounted(this)},setProps:function(e,t){"production"!==n.env.NODE_ENV&&r(),this.updater.enqueueSetProps(this,e),t&&this.updater.enqueueCallback(this,t)},replaceProps:function(e,t){"production"!==n.env.NODE_ENV&&r(),this.updater.enqueueReplaceProps(this,e),t&&this.updater.enqueueCallback(this,t)}},I=function(){};y(I.prototype,f.prototype,P);var S={createClass:function(e){var t=function(e,r,o){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?C(this instanceof t,"Something is calling a React component directly. Use a factory or JSX instead. See: https://fb.me/react-legacyfactory"):void 0),this.__reactAutoBindMap&&d(this),this.props=e,this.context=r,this.refs=_,this.updater=o||g,this.state=null;var i=this.getInitialState?this.getInitialState():null;"production"!==n.env.NODE_ENV&&"undefined"==typeof i&&this.getInitialState._isMockFunction&&(i=null),"object"!=typeof i||Array.isArray(i)?"production"!==n.env.NODE_ENV?b(!1,"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"):b(!1):void 0,this.state=i};t.prototype=new I,t.prototype.constructor=t,R.forEach(a.bind(null,t)),a(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),"production"!==n.env.NODE_ENV&&(t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved={}),t.prototype.getInitialState&&(t.prototype.getInitialState.isReactClassApproved={})),t.prototype.render?void 0:"production"!==n.env.NODE_ENV?b(!1,"createClass(...): Class specification must implement a `render` method."):b(!1),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?C(!t.prototype.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",e.displayName||"A component"):void 0,"production"!==n.env.NODE_ENV?C(!t.prototype.componentWillRecieveProps,"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",e.displayName||"A component"):void 0);for(var r in x)t.prototype[r]||(t.prototype[r]=null);return t},injection:{injectMixin:function(e){R.push(e)}}};t.exports=S}).call(this,e("_process"))},{"./Object.assign":64,"./ReactComponent":72,"./ReactElement":94,"./ReactNoopUpdateQueue":111,"./ReactPropTypeLocationNames":114,"./ReactPropTypeLocations":115,_process:42,"fbjs/lib/emptyObject":20,"fbjs/lib/invariant":27,"fbjs/lib/keyMirror":30,"fbjs/lib/keyOf":31,"fbjs/lib/warning":38}],72:[function(e,t,n){(function(n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||o}var o=e("./ReactNoopUpdateQueue"),i=e("./canDefineProperty"),a=e("fbjs/lib/emptyObject"),s=e("fbjs/lib/invariant"),u=e("fbjs/lib/warning");if(r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?"production"!==n.env.NODE_ENV?s(!1,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."):s(!1):void 0,"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?u(null!=e,"setState(...): You passed an undefined or null state object; instead, use forceUpdate()."):void 0),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t)},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e)},"production"!==n.env.NODE_ENV){var c={getDOMNode:["getDOMNode","Use ReactDOM.findDOMNode(component) instead."],isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceProps:["replaceProps","Instead, call render again at the top level."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."],setProps:["setProps","Instead, call render again at the top level."]},l=function(e,t){i&&Object.defineProperty(r.prototype,e,{get:function(){"production"!==n.env.NODE_ENV?u(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1]):void 0}})};for(var p in c)c.hasOwnProperty(p)&&l(p,c[p])}t.exports=r}).call(this,e("_process"))},{"./ReactNoopUpdateQueue":111,"./canDefineProperty":146,_process:42,"fbjs/lib/emptyObject":20,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],73:[function(e,t,n){"use strict";var r=e("./ReactDOMIDOperations"),o=e("./ReactMount"),i={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){o.purgeID(e)}};t.exports=i},{"./ReactDOMIDOperations":82,"./ReactMount":107}],74:[function(e,t,n){(function(n){"use strict";var r=e("fbjs/lib/invariant"),o=!1,i={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?"production"!==n.env.NODE_ENV?r(!1,"ReactCompositeComponent: injectEnvironment() can only be called once."):r(!1):void 0,i.unmountIDFromEnvironment=e.unmountIDFromEnvironment,i.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};t.exports=i}).call(this,e("_process"))},{_process:42,"fbjs/lib/invariant":27}],75:[function(e,t,n){(function(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 o(e){}var i=e("./ReactComponentEnvironment"),a=e("./ReactCurrentOwner"),s=e("./ReactElement"),u=e("./ReactInstanceMap"),c=e("./ReactPerf"),l=e("./ReactPropTypeLocations"),p=e("./ReactPropTypeLocationNames"),d=e("./ReactReconciler"),f=e("./ReactUpdateQueue"),h=e("./Object.assign"),v=e("fbjs/lib/emptyObject"),m=e("fbjs/lib/invariant"),g=e("./shouldUpdateReactComponent"),y=e("fbjs/lib/warning");o.prototype.render=function(){var e=u.get(this)._currentElement.type;return e(this.props,this.context,this.updater)};var _=1,b={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null},mountComponent:function(e,t,r){this._context=r,this._mountOrder=_++,this._rootNodeID=e;var i,c,l=this._processProps(this._currentElement.props),p=this._processContext(r),h=this._currentElement.type,g="prototype"in h;if(g)if("production"!==n.env.NODE_ENV){a.current=this;try{i=new h(l,p,f)}finally{a.current=null}}else i=new h(l,p,f);(!g||null===i||i===!1||s.isValidElement(i))&&(c=i,i=new o(h)),"production"!==n.env.NODE_ENV&&(null==i.render?"production"!==n.env.NODE_ENV?y(!1,"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`, returned null/false from a stateless component, or tried to render an element whose type is a function that isn't a React component.",h.displayName||h.name||"Component"):void 0:"production"!==n.env.NODE_ENV?y(h.prototype&&h.prototype.isReactComponent||!g||!(i instanceof h),"%s(...): React component classes must extend React.Component.",h.displayName||h.name||"Component"):void 0),i.props=l,i.context=p,i.refs=v,i.updater=f,this._instance=i,u.set(i,this),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?y(!i.getInitialState||i.getInitialState.isReactClassApproved,"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",this.getName()||"a component"):void 0,"production"!==n.env.NODE_ENV?y(!i.getDefaultProps||i.getDefaultProps.isReactClassApproved,"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",this.getName()||"a component"):void 0,"production"!==n.env.NODE_ENV?y(!i.propTypes,"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",this.getName()||"a component"):void 0,"production"!==n.env.NODE_ENV?y(!i.contextTypes,"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",this.getName()||"a component"):void 0,"production"!==n.env.NODE_ENV?y("function"!=typeof i.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",this.getName()||"A component"):void 0,"production"!==n.env.NODE_ENV?y("function"!=typeof i.componentDidUnmount,"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",this.getName()||"A component"):void 0,"production"!==n.env.NODE_ENV?y("function"!=typeof i.componentWillRecieveProps,"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",this.getName()||"A component"):void 0);var b=i.state;void 0===b&&(i.state=b=null),"object"!=typeof b||Array.isArray(b)?"production"!==n.env.NODE_ENV?m(!1,"%s.state: must be set to an object or null",this.getName()||"ReactCompositeComponent"):m(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===c&&(c=this._renderValidatedComponent()),this._renderedComponent=this._instantiateReactComponent(c);var E=d.mountComponent(this._renderedComponent,e,t,this._processChildContext(r));return i.componentDidMount&&t.getReactMountReady().enqueue(i.componentDidMount,i),E},unmountComponent:function(){var e=this._instance;e.componentWillUnmount&&e.componentWillUnmount(),d.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._instance=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null, this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,u.remove(e)},_maskContext:function(e){var t=null,n=this._currentElement.type,r=n.contextTypes;if(!r)return v;t={};for(var o in r)t[o]=e[o];return t},_processContext:function(e){var t=this._maskContext(e);if("production"!==n.env.NODE_ENV){var r=this._currentElement.type;r.contextTypes&&this._checkPropTypes(r.contextTypes,t,l.context)}return t},_processChildContext:function(e){var t=this._currentElement.type,r=this._instance,o=r.getChildContext&&r.getChildContext();if(o){"object"!=typeof t.childContextTypes?"production"!==n.env.NODE_ENV?m(!1,"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",this.getName()||"ReactCompositeComponent"):m(!1):void 0,"production"!==n.env.NODE_ENV&&this._checkPropTypes(t.childContextTypes,o,l.childContext);for(var i in o)i in t.childContextTypes?void 0:"production"!==n.env.NODE_ENV?m(!1,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',this.getName()||"ReactCompositeComponent",i):m(!1);return h({},e,o)}return e},_processProps:function(e){if("production"!==n.env.NODE_ENV){var t=this._currentElement.type;t.propTypes&&this._checkPropTypes(t.propTypes,e,l.prop)}return e},_checkPropTypes:function(e,t,o){var i=this.getName();for(var a in e)if(e.hasOwnProperty(a)){var s;try{"function"!=typeof e[a]?"production"!==n.env.NODE_ENV?m(!1,"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",i||"React class",p[o],a):m(!1):void 0,s=e[a](t,a,i,o)}catch(u){s=u}if(s instanceof Error){var c=r(this);o===l.prop?"production"!==n.env.NODE_ENV?y(!1,"Failed Composite propType: %s%s",s.message,c):void 0:"production"!==n.env.NODE_ENV?y(!1,"Failed Context Types: %s%s",s.message,c):void 0}}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&d.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(e,t,r,o,i){var a,s=this._instance,u=this._context===i?s.context:this._processContext(i);t===r?a=r.props:(a=this._processProps(r.props),s.componentWillReceiveProps&&s.componentWillReceiveProps(a,u));var c=this._processPendingState(a,u),l=this._pendingForceUpdate||!s.shouldComponentUpdate||s.shouldComponentUpdate(a,c,u);"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?y("undefined"!=typeof l,"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",this.getName()||"ReactCompositeComponent"):void 0),l?(this._pendingForceUpdate=!1,this._performComponentUpdate(r,a,c,u,e,i)):(this._currentElement=r,this._context=i,s.props=a,s.state=c,s.context=u)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=h({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];h(i,"function"==typeof s?s.call(n,i,e,t):s)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a,s,u,c=this._instance,l=Boolean(c.componentDidUpdate);l&&(a=c.props,s=c.state,u=c.context),c.componentWillUpdate&&c.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,c.props=t,c.state=n,c.context=r,this._updateRenderedComponent(o,i),l&&o.getReactMountReady().enqueue(c.componentDidUpdate.bind(c,a,s,u),c)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(g(r,o))d.receiveComponent(n,o,e,this._processChildContext(t));else{var i=this._rootNodeID,a=n._rootNodeID;d.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(o);var s=d.mountComponent(this._renderedComponent,i,e,this._processChildContext(t));this._replaceNodeWithMarkupByID(a,s)}},_replaceNodeWithMarkupByID:function(e,t){i.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return"production"!==n.env.NODE_ENV&&"undefined"==typeof t&&e.render._isMockFunction&&(t=null),t},_renderValidatedComponent:function(){var e;a.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{a.current=null}return null===e||e===!1||s.isValidElement(e)?void 0:"production"!==n.env.NODE_ENV?m(!1,"%s.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.",this.getName()||"ReactCompositeComponent"):m(!1),e},attachRef:function(e,t){var r=this.getPublicInstance();null==r?"production"!==n.env.NODE_ENV?m(!1,"Stateless function components cannot have refs."):m(!1):void 0;var o=t.getPublicInstance();if("production"!==n.env.NODE_ENV){var i=t&&t.getName?t.getName():"a component";"production"!==n.env.NODE_ENV?y(null!=o,'Stateless function components cannot be given refs (See ref "%s" in %s created by %s). Attempts to access this ref will fail.',e,i,this.getName()):void 0}var a=r.refs===v?r.refs={}:r.refs;a[e]=o},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 o?null:e},_instantiateReactComponent:null};c.measureMethods(b,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var E={Mixin:b};t.exports=E}).call(this,e("_process"))},{"./Object.assign":64,"./ReactComponentEnvironment":74,"./ReactCurrentOwner":76,"./ReactElement":94,"./ReactInstanceMap":104,"./ReactPerf":113,"./ReactPropTypeLocationNames":114,"./ReactPropTypeLocations":115,"./ReactReconciler":118,"./ReactUpdateQueue":124,"./shouldUpdateReactComponent":168,_process:42,"fbjs/lib/emptyObject":20,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],76:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],77:[function(e,t,n){(function(n){"use strict";var r=e("./ReactCurrentOwner"),o=e("./ReactDOMTextComponent"),i=e("./ReactDefaultInjection"),a=e("./ReactInstanceHandles"),s=e("./ReactMount"),u=e("./ReactPerf"),c=e("./ReactReconciler"),l=e("./ReactUpdates"),p=e("./ReactVersion"),d=e("./findDOMNode"),f=e("./renderSubtreeIntoContainer"),h=e("fbjs/lib/warning");i.inject();var v=u.measure("React","render",s.render),m={findDOMNode:d,render:v,unmountComponentAtNode:s.unmountComponentAtNode,version:p,unstable_batchedUpdates:l.batchedUpdates,unstable_renderSubtreeIntoContainer:f};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:r,InstanceHandles:a,Mount:s,Reconciler:c,TextComponent:o}),"production"!==n.env.NODE_ENV){var g=e("fbjs/lib/ExecutionEnvironment");if(g.canUseDOM&&window.top===window.self){"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&(navigator.userAgent.indexOf("Chrome")>-1&&-1===navigator.userAgent.indexOf("Edge")||navigator.userAgent.indexOf("Firefox")>-1)&&console.debug("Download the React DevTools for a better development experience: https://fb.me/react-devtools");var y=document.documentMode&&document.documentMode<8;"production"!==n.env.NODE_ENV?h(!y,'Internet Explorer is running in compatibility mode; please add the following tag to your HTML to prevent this from happening: <meta http-equiv="X-UA-Compatible" content="IE=edge" />'):void 0;for(var _=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze],b=0;b<_.length;b++)if(!_[b]){console.error("One or more ES5 shim/shams expected by React are not available: https://fb.me/react-warning-polyfills");break}}}t.exports=m}).call(this,e("_process"))},{"./ReactCurrentOwner":76,"./ReactDOMTextComponent":88,"./ReactDefaultInjection":91,"./ReactInstanceHandles":103,"./ReactMount":107,"./ReactPerf":113,"./ReactReconciler":118,"./ReactUpdates":125,"./ReactVersion":126,"./findDOMNode":150,"./renderSubtreeIntoContainer":165,_process:42,"fbjs/lib/ExecutionEnvironment":13,"fbjs/lib/warning":38}],78:[function(e,t,n){"use strict";var r={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},o={getNativeProps:function(e,t,n){if(!t.disabled)return t;var o={};for(var i in t)t.hasOwnProperty(i)&&!r[i]&&(o[i]=t[i]);return o}};t.exports=o},{}],79:[function(e,t,n){(function(n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(){if("production"!==n.env.NODE_ENV){var e=this._reactInternalComponent;"production"!==n.env.NODE_ENV?G(!1,"ReactDOMComponent: Do not access .getDOMNode() of a DOM node; instead, use the node directly.%s",r(e)):void 0}return this}function i(){var e=this._reactInternalComponent;return"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?G(!1,"ReactDOMComponent: Do not access .isMounted() of a DOM node.%s",r(e)):void 0),!!e}function a(){if("production"!==n.env.NODE_ENV){var e=this._reactInternalComponent;"production"!==n.env.NODE_ENV?G(!1,"ReactDOMComponent: Do not access .setState(), .replaceState(), or .forceUpdate() of a DOM node. This is a no-op.%s",r(e)):void 0}}function s(e,t){var o=this._reactInternalComponent;"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?G(!1,"ReactDOMComponent: Do not access .setProps() of a DOM node. Instead, call ReactDOM.render again at the top level.%s",r(o)):void 0),o&&(V.enqueueSetPropsInternal(o,e),t&&V.enqueueCallbackInternal(o,t))}function u(e,t){var o=this._reactInternalComponent;"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?G(!1,"ReactDOMComponent: Do not access .replaceProps() of a DOM node. Instead, call ReactDOM.render again at the top level.%s",r(o)):void 0),o&&(V.enqueueReplacePropsInternal(o,e),t&&V.enqueueCallbackInternal(o,t))}function c(e){if("object"==typeof e){if(Array.isArray(e))return"["+e.map(c).join(", ")+"]";var t=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=/^[a-z$_][\w$_]*$/i.test(n)?n:JSON.stringify(n);t.push(r+": "+c(e[n]))}return"{"+t.join(", ")+"}"}return"string"==typeof e?JSON.stringify(e):"function"==typeof e?"[function object]":String(e)}function l(e,t,r){if(null!=e&&null!=t&&!z(e,t)){var o,i=r._tag,a=r._currentElement._owner;a&&(o=a.getName());var s=o+"|"+i;re.hasOwnProperty(s)||(re[s]=!0,"production"!==n.env.NODE_ENV?G(!1,"`%s` was passed a style object that has previously been mutated. Mutating `style` is deprecated. Consider cloning it beforehand. Check the `render` %s. Previous style: %s. Mutated style: %s.",i,a?"of `"+o+"`":"using <"+i+">",c(e),c(t)):void 0)}}function p(e,t){t&&("production"!==n.env.NODE_ENV&&se[e._tag]&&("production"!==n.env.NODE_ENV?G(null==t.children&&null==t.dangerouslySetInnerHTML,"%s is a void element tag and must not have `children` or use `props.dangerouslySetInnerHTML`.%s",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?"production"!==n.env.NODE_ENV?B(!1,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):B(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&te in t.dangerouslySetInnerHTML?void 0:"production"!==n.env.NODE_ENV?B(!1,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information."):B(!1)),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?G(null==t.innerHTML,"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."):void 0,"production"!==n.env.NODE_ENV?G(!t.contentEditable||null==t.children,"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."):void 0),null!=t.style&&"object"!=typeof t.style?"production"!==n.env.NODE_ENV?B(!1,"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.%s",r(e)):B(!1):void 0)}function d(e,t,r,o){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?G("onScroll"!==t||W("scroll",!0),"This browser doesn't support the `onScroll` event"):void 0);var i=k.findReactContainerForID(e);if(i){var a=i.nodeType===ne?i.ownerDocument:i;Q(t,a)}o.getReactMountReady().enqueue(f,{id:e,registrationName:t,listener:r})}function f(){var e=this;w.putListener(e.id,e.registrationName,e.listener)}function h(){var e=this;e._rootNodeID?void 0:"production"!==n.env.NODE_ENV?B(!1,"Must be mounted to trap events"):B(!1);var t=k.getNode(e._rootNodeID);switch(t?void 0:"production"!==n.env.NODE_ENV?B(!1,"trapBubbledEvent(...): Requires node to be rendered."):B(!1),e._tag){case"iframe":e._wrapperState.listeners=[w.trapBubbledEvent(R.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var r in oe)oe.hasOwnProperty(r)&&e._wrapperState.listeners.push(w.trapBubbledEvent(R.topLevelTypes[r],oe[r],t));break;case"img":e._wrapperState.listeners=[w.trapBubbledEvent(R.topLevelTypes.topError,"error",t),w.trapBubbledEvent(R.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[w.trapBubbledEvent(R.topLevelTypes.topReset,"reset",t),w.trapBubbledEvent(R.topLevelTypes.topSubmit,"submit",t)]}}function v(){P.mountReadyWrapper(this)}function m(){S.postUpdateWrapper(this)}function g(e){le.call(ce,e)||(ue.test(e)?void 0:"production"!==n.env.NODE_ENV?B(!1,"Invalid tag: %s",e):B(!1),ce[e]=!0)}function y(e,t){e=U({},e);var n=e[Y.ancestorInfoContextKey];return e[Y.ancestorInfoContextKey]=Y.updatedAncestorInfo(n,t._tag,t),e}function _(e,t){return e.indexOf("-")>=0||null!=t.is}function b(e){g(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null,"production"!==n.env.NODE_ENV&&(this._unprocessedContextDev=null,this._processedContextDev=null)}var E,N=e("./AutoFocusUtils"),C=e("./CSSPropertyOperations"),O=e("./DOMProperty"),D=e("./DOMPropertyOperations"),R=e("./EventConstants"),w=e("./ReactBrowserEventEmitter"),x=e("./ReactComponentBrowserEnvironment"),M=e("./ReactDOMButton"),P=e("./ReactDOMInput"),I=e("./ReactDOMOption"),S=e("./ReactDOMSelect"),T=e("./ReactDOMTextarea"),k=e("./ReactMount"),j=e("./ReactMultiChild"),A=e("./ReactPerf"),V=e("./ReactUpdateQueue"),U=e("./Object.assign"),L=e("./canDefineProperty"),F=e("./escapeTextContentForBrowser"),B=e("fbjs/lib/invariant"),W=e("./isEventSupported"),H=e("fbjs/lib/keyOf"),q=e("./setInnerHTML"),K=e("./setTextContent"),z=e("fbjs/lib/shallowEqual"),Y=e("./validateDOMNesting"),G=e("fbjs/lib/warning"),$=w.deleteListener,Q=w.listenTo,X=w.registrationNameModules,J={string:!0,number:!0},Z=H({children:null}),ee=H({style:null}),te=H({__html:null}),ne=1;"production"!==n.env.NODE_ENV&&(E={props:{enumerable:!1,get:function(){var e=this._reactInternalComponent;return"production"!==n.env.NODE_ENV?G(!1,"ReactDOMComponent: Do not access .props of a DOM node; instead, recreate the props as `render` did originally or read the DOM properties/attributes directly from this node (e.g., this.refs.box.className).%s",r(e)):void 0,e._currentElement.props}}});var re={},oe={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"},ie={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},ae={listing:!0,pre:!0,textarea:!0},se=U({menuitem:!0},ie),ue=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ce={},le={}.hasOwnProperty;b.displayName="ReactDOMComponent",b.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,r){this._rootNodeID=e;var o=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(h,this);break;case"button":o=M.getNativeProps(this,o,r);break;case"input":P.mountWrapper(this,o,r),o=P.getNativeProps(this,o,r);break;case"option":I.mountWrapper(this,o,r),o=I.getNativeProps(this,o,r);break;case"select":S.mountWrapper(this,o,r),o=S.getNativeProps(this,o,r),r=S.processChildContext(this,o,r);break;case"textarea":T.mountWrapper(this,o,r),o=T.getNativeProps(this,o,r)}p(this,o),"production"!==n.env.NODE_ENV&&r[Y.ancestorInfoContextKey]&&Y(this._tag,this,r[Y.ancestorInfoContextKey]),"production"!==n.env.NODE_ENV&&(this._unprocessedContextDev=r,this._processedContextDev=y(r,this),r=this._processedContextDev);var i;if(t.useCreateElement){var a=r[k.ownerDocumentContextKey],s=a.createElement(this._currentElement.type);D.setAttributeForID(s,this._rootNodeID),k.getID(s),this._updateDOMProperties({},o,t,s),this._createInitialChildren(t,o,r,s),i=s}else{var u=this._createOpenTagMarkupAndPutListeners(t,o),c=this._createContentMarkup(t,o,r);i=!c&&ie[this._tag]?u+"/>":u+">"+c+"</"+this._currentElement.type+">"}switch(this._tag){case"input":t.getReactMountReady().enqueue(v,this);case"button":case"select":case"textarea":o.autoFocus&&t.getReactMountReady().enqueue(N.focusDOMComponent,this)}return i},_createOpenTagMarkupAndPutListeners:function(e,t){var r="<"+this._currentElement.type;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];if(null!=i)if(X.hasOwnProperty(o))i&&d(this._rootNodeID,o,i,e);else{o===ee&&(i&&("production"!==n.env.NODE_ENV&&(this._previousStyle=i),i=this._previousStyleCopy=U({},t.style)),i=C.createMarkupForStyles(i));var a=null;null!=this._tag&&_(this._tag,t)?o!==Z&&(a=D.createMarkupForCustomAttribute(o,i)):a=D.createMarkupForProperty(o,i),a&&(r+=" "+a)}}if(e.renderToStaticMarkup)return r;var s=D.createMarkupForID(this._rootNodeID);return r+" "+s},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=J[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=F(i);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return ae[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&q(r,o.__html);else{var i=J[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)K(r,i);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u<s.length;u++)r.appendChild(s[u])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,r,o){var i=t.props,a=this._currentElement.props;switch(this._tag){case"button":i=M.getNativeProps(this,i),a=M.getNativeProps(this,a);break;case"input":P.updateWrapper(this),i=P.getNativeProps(this,i),a=P.getNativeProps(this,a);break;case"option":i=I.getNativeProps(this,i),a=I.getNativeProps(this,a);break;case"select":i=S.getNativeProps(this,i),a=S.getNativeProps(this,a);break;case"textarea":T.updateWrapper(this),i=T.getNativeProps(this,i),a=T.getNativeProps(this,a)}"production"!==n.env.NODE_ENV&&(this._unprocessedContextDev!==o&&(this._unprocessedContextDev=o,this._processedContextDev=y(o,this)),o=this._processedContextDev),p(this,a),this._updateDOMProperties(i,a,e,null),this._updateDOMChildren(i,a,e,o),!L&&this._nodeWithLegacyProperties&&(this._nodeWithLegacyProperties.props=a),"select"===this._tag&&e.getReactMountReady().enqueue(m,this)},_updateDOMProperties:function(e,t,r,o){var i,a,s;for(i in e)if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i))if(i===ee){var u=this._previousStyleCopy;for(a in u)u.hasOwnProperty(a)&&(s=s||{},s[a]="");this._previousStyleCopy=null}else X.hasOwnProperty(i)?e[i]&&$(this._rootNodeID,i):(O.properties[i]||O.isCustomAttribute(i))&&(o||(o=k.getNode(this._rootNodeID)),D.deleteValueForProperty(o,i));for(i in t){var c=t[i],p=i===ee?this._previousStyleCopy:e[i];if(t.hasOwnProperty(i)&&c!==p)if(i===ee)if(c?("production"!==n.env.NODE_ENV&&(l(this._previousStyleCopy,this._previousStyle,this),this._previousStyle=c),c=this._previousStyleCopy=U({},c)):this._previousStyleCopy=null,p){for(a in p)!p.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(s=s||{},s[a]="");for(a in c)c.hasOwnProperty(a)&&p[a]!==c[a]&&(s=s||{},s[a]=c[a])}else s=c;else X.hasOwnProperty(i)?c?d(this._rootNodeID,i,c,r):p&&$(this._rootNodeID,i):_(this._tag,t)?(o||(o=k.getNode(this._rootNodeID)),i===Z&&(c=null),D.setValueForAttribute(o,i,c)):(O.properties[i]||O.isCustomAttribute(i))&&(o||(o=k.getNode(this._rootNodeID)),null!=c?D.setValueForProperty(o,i,c):D.deleteValueForProperty(o,i))}s&&(o||(o=k.getNode(this._rootNodeID)),C.setValueForStyles(o,s))},_updateDOMChildren:function(e,t,n,r){var o=J[typeof e.children]?e.children:null,i=J[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,c=null!=i?null:t.children,l=null!=o||null!=a,p=null!=i||null!=s;null!=u&&null==c?this.updateChildren(null,n,r):l&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=s?a!==s&&this.updateMarkup(""+s):null!=c&&this.updateChildren(c,n,r)},unmountComponent:function(){switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":var e=this._wrapperState.listeners;if(e)for(var t=0;t<e.length;t++)e[t].remove();break;case"input":P.unmountWrapper(this);break;case"html":case"head":case"body":"production"!==n.env.NODE_ENV?B(!1,"<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",this._tag):B(!1)}if(this.unmountChildren(),w.deleteAllListeners(this._rootNodeID),x.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._wrapperState=null,this._nodeWithLegacyProperties){var r=this._nodeWithLegacyProperties;r._reactInternalComponent=null,this._nodeWithLegacyProperties=null}},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var e=k.getNode(this._rootNodeID);e._reactInternalComponent=this,e.getDOMNode=o,e.isMounted=i,e.setState=a,e.replaceState=a,e.forceUpdate=a,e.setProps=s,e.replaceProps=u,"production"!==n.env.NODE_ENV&&L?Object.defineProperties(e,E):e.props=this._currentElement.props,this._nodeWithLegacyProperties=e}return this._nodeWithLegacyProperties}},A.measureMethods(b,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),U(b.prototype,b.Mixin,j.Mixin),t.exports=b}).call(this,e("_process"))},{"./AutoFocusUtils":43,"./CSSPropertyOperations":46,"./DOMProperty":51,"./DOMPropertyOperations":52,"./EventConstants":56,"./Object.assign":64,"./ReactBrowserEventEmitter":68,"./ReactComponentBrowserEnvironment":73,"./ReactDOMButton":78,"./ReactDOMInput":83,"./ReactDOMOption":84,"./ReactDOMSelect":85,"./ReactDOMTextarea":89,"./ReactMount":107,"./ReactMultiChild":108,"./ReactPerf":113,"./ReactUpdateQueue":124,"./canDefineProperty":146,"./escapeTextContentForBrowser":149,"./isEventSupported":161,"./setInnerHTML":166,"./setTextContent":167,"./validateDOMNesting":170,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/keyOf":31,"fbjs/lib/shallowEqual":36,"fbjs/lib/warning":38}],80:[function(e,t,n){(function(n){"use strict";function r(e){return"production"!==n.env.NODE_ENV?i.createFactory(e):o.createFactory(e)}var o=e("./ReactElement"),i=e("./ReactElementValidator"),a=e("fbjs/lib/mapObject"),s=a({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);t.exports=s}).call(this,e("_process"))},{"./ReactElement":94,"./ReactElementValidator":95,_process:42,"fbjs/lib/mapObject":32}],81:[function(e,t,n){"use strict";var r={useCreateElement:!1};t.exports=r},{}],82:[function(e,t,n){(function(n){"use strict";var r=e("./DOMChildrenOperations"),o=e("./DOMPropertyOperations"),i=e("./ReactMount"),a=e("./ReactPerf"),s=e("fbjs/lib/invariant"),u={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},c={updatePropertyByID:function(e,t,r){var a=i.getNode(e);u.hasOwnProperty(t)?"production"!==n.env.NODE_ENV?s(!1,"updatePropertyByID(...): %s",u[t]):s(!1):void 0,null!=r?o.setValueForProperty(a,t,r):o.deleteValueForProperty(a,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=i.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=i.getNode(e[n].parentID);r.processUpdates(e,t)}};a.measureMethods(c,"ReactDOMIDOperations",{dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=c}).call(this,e("_process"))},{"./DOMChildrenOperations":50,"./DOMPropertyOperations":52,"./ReactMount":107,"./ReactPerf":113,_process:42,"fbjs/lib/invariant":27}],83:[function(e,t,n){(function(n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,o=a.executeOnChange(t,e);u.asap(r,this);var i=t.name;if("radio"===t.type&&null!=i){for(var c=s.getNode(this._rootNodeID),d=c;d.parentNode;)d=d.parentNode;for(var f=d.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),h=0;h<f.length;h++){var v=f[h];if(v!==c&&v.form===c.form){var m=s.getID(v);m?void 0:"production"!==n.env.NODE_ENV?l(!1,"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."):l(!1);var g=p[m];g?void 0:"production"!==n.env.NODE_ENV?l(!1,"ReactDOMInput: Unknown radio button ID %s.",m):l(!1),u.asap(r,g)}}}return o}var i=e("./ReactDOMIDOperations"),a=e("./LinkedValueUtils"),s=e("./ReactMount"),u=e("./ReactUpdates"),c=e("./Object.assign"),l=e("fbjs/lib/invariant"),p={},d={getNativeProps:function(e,t,n){var r=a.getValue(t),o=a.getChecked(t),i=c({},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=r?r:e._wrapperState.initialValue,checked:null!=o?o:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return i},mountWrapper:function(e,t){"production"!==n.env.NODE_ENV&&a.checkPropTypes("input",t,e._currentElement._owner);var r=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=r?r:null,onChange:o.bind(e)}},mountReadyWrapper:function(e){p[e._rootNodeID]=e},unmountWrapper:function(e){delete p[e._rootNodeID]},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&i.updatePropertyByID(e._rootNodeID,"checked",n||!1);var r=a.getValue(t);null!=r&&i.updatePropertyByID(e._rootNodeID,"value",""+r)}};t.exports=d}).call(this,e("_process"))},{"./LinkedValueUtils":63,"./Object.assign":64,"./ReactDOMIDOperations":82,"./ReactMount":107,"./ReactUpdates":125,_process:42,"fbjs/lib/invariant":27}],84:[function(e,t,n){(function(n){"use strict";var r=e("./ReactChildren"),o=e("./ReactDOMSelect"),i=e("./Object.assign"),a=e("fbjs/lib/warning"),s=o.valueContextKey,u={mountWrapper:function(e,t,r){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?a(null==t.selected,"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."):void 0);var o=r[s],i=null;if(null!=o)if(i=!1,Array.isArray(o)){for(var u=0;u<o.length;u++)if(""+o[u]==""+t.value){i=!0;break}}else i=""+o==""+t.value;e._wrapperState={selected:i}},getNativeProps:function(e,t,o){var s=i({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(s.selected=e._wrapperState.selected);var u="";return r.forEach(t.children,function(e){null!=e&&("string"==typeof e||"number"==typeof e?u+=e:"production"!==n.env.NODE_ENV?a(!1,"Only strings and numbers are supported as <option> children."):void 0)}),u&&(s.children=u),s}};t.exports=u}).call(this,e("_process"))},{"./Object.assign":64,"./ReactChildren":70,"./ReactDOMSelect":85,_process:42,"fbjs/lib/warning":38}],85:[function(e,t,n){(function(n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=u.getValue(e);null!=t&&a(this,Boolean(e.multiple),t)}}function o(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function i(e,t){var r=e._currentElement._owner;u.checkPropTypes("select",t,r);for(var i=0;i<h.length;i++){var a=h[i];null!=t[a]&&(t.multiple?"production"!==n.env.NODE_ENV?d(Array.isArray(t[a]),"The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",a,o(r)):void 0:"production"!==n.env.NODE_ENV?d(!Array.isArray(t[a]),"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",a,o(r)):void 0)}}function a(e,t,n){var r,o,i=c.getNode(e._rootNodeID).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<i.length;o++){var a=r.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(r=""+n,o=0;o<i.length;o++)if(i[o].value===r)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}function s(e){var t=this._currentElement.props,n=u.executeOnChange(t,e);return this._wrapperState.pendingUpdate=!0, l.asap(r,this),n}var u=e("./LinkedValueUtils"),c=e("./ReactMount"),l=e("./ReactUpdates"),p=e("./Object.assign"),d=e("fbjs/lib/warning"),f="__ReactDOMSelect_value$"+Math.random().toString(36).slice(2),h=["value","defaultValue"],v={valueContextKey:f,getNativeProps:function(e,t,n){return p({},t,{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){"production"!==n.env.NODE_ENV&&i(e,t);var r=u.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=r?r:t.defaultValue,onChange:s.bind(e),wasMultiple:Boolean(t.multiple)}},processChildContext:function(e,t,n){var r=p({},n);return r[f]=e._wrapperState.initialValue,r},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=u.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,a(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?a(e,Boolean(t.multiple),t.defaultValue):a(e,Boolean(t.multiple),t.multiple?[]:""))}};t.exports=v}).call(this,e("_process"))},{"./LinkedValueUtils":63,"./Object.assign":64,"./ReactMount":107,"./ReactUpdates":125,_process:42,"fbjs/lib/warning":38}],86:[function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0);try{s.startContainer.nodeType,s.endContainer.nodeType}catch(u){return null}var c=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),l=c?0:s.toString().length,p=s.cloneRange();p.selectNodeContents(e),p.setEnd(s.startContainer,s.startOffset);var d=r(p.startContainer,p.startOffset,p.endContainer,p.endOffset),f=d?0:p.toString().length,h=f+l,v=document.createRange();v.setStart(n,o),v.setEnd(i,a);var m=v.collapsed;return{start:m?h:f,end:m?f:h}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=c(e,o),u=c(e,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=e("fbjs/lib/ExecutionEnvironment"),c=e("./getNodeForCharacterOffset"),l=e("./getTextContentAccessor"),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:i,setOffsets:p?a:s};t.exports=d},{"./getNodeForCharacterOffset":158,"./getTextContentAccessor":159,"fbjs/lib/ExecutionEnvironment":13}],87:[function(e,t,n){"use strict";var r=e("./ReactDefaultInjection"),o=e("./ReactServerRendering"),i=e("./ReactVersion");r.inject();var a={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:i};t.exports=a},{"./ReactDefaultInjection":91,"./ReactServerRendering":122,"./ReactVersion":126}],88:[function(e,t,n){(function(n){"use strict";var r=e("./DOMChildrenOperations"),o=e("./DOMPropertyOperations"),i=e("./ReactComponentBrowserEnvironment"),a=e("./ReactMount"),s=e("./Object.assign"),u=e("./escapeTextContentForBrowser"),c=e("./setTextContent"),l=e("./validateDOMNesting"),p=function(e){};s(p.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,r){if("production"!==n.env.NODE_ENV&&r[l.ancestorInfoContextKey]&&l("span",null,r[l.ancestorInfoContextKey]),this._rootNodeID=e,t.useCreateElement){var i=r[a.ownerDocumentContextKey],s=i.createElement("span");return o.setAttributeForID(s,e),a.getID(s),c(s,this._stringText),s}var p=u(this._stringText);return t.renderToStaticMarkup?p:"<span "+o.createMarkupForID(e)+">"+p+"</span>"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=a.getNode(this._rootNodeID);r.updateTextContent(o,n)}}},unmountComponent:function(){i.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=p}).call(this,e("_process"))},{"./DOMChildrenOperations":50,"./DOMPropertyOperations":52,"./Object.assign":64,"./ReactComponentBrowserEnvironment":73,"./ReactMount":107,"./escapeTextContentForBrowser":149,"./setTextContent":167,"./validateDOMNesting":170,_process:42}],89:[function(e,t,n){(function(n){"use strict";function r(){this._rootNodeID&&p.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=i.executeOnChange(t,e);return s.asap(r,this),n}var i=e("./LinkedValueUtils"),a=e("./ReactDOMIDOperations"),s=e("./ReactUpdates"),u=e("./Object.assign"),c=e("fbjs/lib/invariant"),l=e("fbjs/lib/warning"),p={getNativeProps:function(e,t,r){null!=t.dangerouslySetInnerHTML?"production"!==n.env.NODE_ENV?c(!1,"`dangerouslySetInnerHTML` does not make sense on <textarea>."):c(!1):void 0;var o=u({},t,{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return o},mountWrapper:function(e,t){"production"!==n.env.NODE_ENV&&i.checkPropTypes("textarea",t,e._currentElement._owner);var r=t.defaultValue,a=t.children;null!=a&&("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?l(!1,"Use the `defaultValue` or `value` props instead of setting children on <textarea>."):void 0),null!=r?"production"!==n.env.NODE_ENV?c(!1,"If you supply `defaultValue` on a <textarea>, do not pass children."):c(!1):void 0,Array.isArray(a)&&(a.length<=1?void 0:"production"!==n.env.NODE_ENV?c(!1,"<textarea> can only have at most one child."):c(!1),a=a[0]),r=""+a),null==r&&(r="");var s=i.getValue(t);e._wrapperState={initialValue:""+(null!=s?s:r),onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=i.getValue(t);null!=n&&a.updatePropertyByID(e._rootNodeID,"value",""+n)}};t.exports=p}).call(this,e("_process"))},{"./LinkedValueUtils":63,"./Object.assign":64,"./ReactDOMIDOperations":82,"./ReactUpdates":125,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],90:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e("./ReactUpdates"),i=e("./Transaction"),a=e("./Object.assign"),s=e("fbjs/lib/emptyFunction"),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},c={initialize:s,close:o.flushBatchedUpdates.bind(o)},l=[c,u];a(r.prototype,i.Mixin,{getTransactionWrappers:function(){return l}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=d.isBatchingUpdates;d.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};t.exports=d},{"./Object.assign":64,"./ReactUpdates":125,"./Transaction":142,"fbjs/lib/emptyFunction":19}],91:[function(e,t,n){(function(n){"use strict";function r(){if(!D&&(D=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(s),g.EventPluginHub.injectInstanceHandle(y),g.EventPluginHub.injectMount(_),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:C,EnterLeaveEventPlugin:u,ChangeEventPlugin:i,SelectEventPlugin:E,BeforeInputEventPlugin:o}),g.NativeComponent.injectGenericComponentClass(h),g.NativeComponent.injectTextComponentClass(v),g.Class.injectMixin(p),g.DOMProperty.injectDOMPropertyConfig(l),g.DOMProperty.injectDOMPropertyConfig(O),g.EmptyComponent.injectEmptyComponent("noscript"),g.Updates.injectReconcileTransaction(b),g.Updates.injectBatchingStrategy(f),g.RootIndex.injectCreateReactRootIndex(c.canUseDOM?a.createReactRootIndex:N.createReactRootIndex),g.Component.injectEnvironment(d),"production"!==n.env.NODE_ENV)){var t=c.canUseDOM&&window.location.href||"";if(/[?&]react_perf\b/.test(t)){var r=e("./ReactDefaultPerf");r.start()}}}var o=e("./BeforeInputEventPlugin"),i=e("./ChangeEventPlugin"),a=e("./ClientReactRootIndex"),s=e("./DefaultEventPluginOrder"),u=e("./EnterLeaveEventPlugin"),c=e("fbjs/lib/ExecutionEnvironment"),l=e("./HTMLDOMPropertyConfig"),p=e("./ReactBrowserComponentMixin"),d=e("./ReactComponentBrowserEnvironment"),f=e("./ReactDefaultBatchingStrategy"),h=e("./ReactDOMComponent"),v=e("./ReactDOMTextComponent"),m=e("./ReactEventListener"),g=e("./ReactInjection"),y=e("./ReactInstanceHandles"),_=e("./ReactMount"),b=e("./ReactReconcileTransaction"),E=e("./SelectEventPlugin"),N=e("./ServerReactRootIndex"),C=e("./SimpleEventPlugin"),O=e("./SVGDOMPropertyConfig"),D=!1;t.exports={inject:r}}).call(this,e("_process"))},{"./BeforeInputEventPlugin":44,"./ChangeEventPlugin":48,"./ClientReactRootIndex":49,"./DefaultEventPluginOrder":54,"./EnterLeaveEventPlugin":55,"./HTMLDOMPropertyConfig":62,"./ReactBrowserComponentMixin":67,"./ReactComponentBrowserEnvironment":73,"./ReactDOMComponent":79,"./ReactDOMTextComponent":88,"./ReactDefaultBatchingStrategy":90,"./ReactDefaultPerf":92,"./ReactEventListener":100,"./ReactInjection":101,"./ReactInstanceHandles":103,"./ReactMount":107,"./ReactReconcileTransaction":117,"./SVGDOMPropertyConfig":127,"./SelectEventPlugin":128,"./ServerReactRootIndex":129,"./SimpleEventPlugin":130,_process:42,"fbjs/lib/ExecutionEnvironment":13}],92:[function(e,t,n){"use strict";function r(e){return Math.floor(100*e)/100}function o(e,t,n){e[t]=(e[t]||0)+n}var i=e("./DOMProperty"),a=e("./ReactDefaultPerfAnalysis"),s=e("./ReactMount"),u=e("./ReactPerf"),c=e("fbjs/lib/performanceNow"),l={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){l._injected||u.injection.injectMeasure(l.measure),l._allMeasurements.length=0,u.enableMeasure=!0},stop:function(){u.enableMeasure=!1},getLastMeasurements:function(){return l._allMeasurements},printExclusive:function(e){e=e||l._allMeasurements;var t=a.getExclusiveSummary(e);console.table(t.map(function(e){return{"Component class name":e.componentName,"Total inclusive time (ms)":r(e.inclusive),"Exclusive mount time (ms)":r(e.exclusive),"Exclusive render time (ms)":r(e.render),"Mount time per instance (ms)":r(e.exclusive/e.count),"Render time per instance (ms)":r(e.render/e.count),Instances:e.count}}))},printInclusive:function(e){e=e||l._allMeasurements;var t=a.getInclusiveSummary(e);console.table(t.map(function(e){return{"Owner > component":e.componentName,"Inclusive time (ms)":r(e.time),Instances:e.count}})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(e){var t=a.getInclusiveSummary(e,!0);return t.map(function(e){return{"Owner > component":e.componentName,"Wasted time (ms)":e.time,Instances:e.count}})},printWasted:function(e){e=e||l._allMeasurements,console.table(l.getMeasurementsSummaryMap(e)),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},printDOM:function(e){e=e||l._allMeasurements;var t=a.getDOMSummary(e);console.table(t.map(function(e){var t={};return t[i.ID_ATTRIBUTE_NAME]=e.id,t.type=e.type,t.args=JSON.stringify(e.args),t})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},_recordWrite:function(e,t,n,r){var o=l._allMeasurements[l._allMeasurements.length-1].writes;o[e]=o[e]||[],o[e].push({type:t,time:n,args:r})},measure:function(e,t,n){return function(){for(var r=arguments.length,i=Array(r),a=0;r>a;a++)i[a]=arguments[a];var u,p,d;if("_renderNewRootComponent"===t||"flushBatchedUpdates"===t)return l._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0,created:{}}),d=c(),p=n.apply(this,i),l._allMeasurements[l._allMeasurements.length-1].totalTime=c()-d,p;if("_mountImageIntoNode"===t||"ReactBrowserEventEmitter"===e||"ReactDOMIDOperations"===e||"CSSPropertyOperations"===e||"DOMChildrenOperations"===e||"DOMPropertyOperations"===e){if(d=c(),p=n.apply(this,i),u=c()-d,"_mountImageIntoNode"===t){var f=s.getID(i[1]);l._recordWrite(f,t,u,i[0])}else if("dangerouslyProcessChildrenUpdates"===t)i[0].forEach(function(e){var t={};null!==e.fromIndex&&(t.fromIndex=e.fromIndex),null!==e.toIndex&&(t.toIndex=e.toIndex),null!==e.textContent&&(t.textContent=e.textContent),null!==e.markupIndex&&(t.markup=i[1][e.markupIndex]),l._recordWrite(e.parentID,e.type,u,t)});else{var h=i[0];"object"==typeof h&&(h=s.getID(i[0])),l._recordWrite(h,t,u,Array.prototype.slice.call(i,1))}return p}if("ReactCompositeComponent"!==e||"mountComponent"!==t&&"updateComponent"!==t&&"_renderValidatedComponent"!==t)return n.apply(this,i);if(this._currentElement.type===s.TopLevelWrapper)return n.apply(this,i);var v="mountComponent"===t?i[0]:this._rootNodeID,m="_renderValidatedComponent"===t,g="mountComponent"===t,y=l._mountStack,_=l._allMeasurements[l._allMeasurements.length-1];if(m?o(_.counts,v,1):g&&(_.created[v]=!0,y.push(0)),d=c(),p=n.apply(this,i),u=c()-d,m)o(_.render,v,u);else if(g){var b=y.pop();y[y.length-1]+=u,o(_.exclusive,v,u-b),o(_.inclusive,v,u)}else o(_.inclusive,v,u);return _.displayNames[v]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():"<root>"},p}}};t.exports=l},{"./DOMProperty":51,"./ReactDefaultPerfAnalysis":93,"./ReactMount":107,"./ReactPerf":113,"fbjs/lib/performanceNow":35}],93:[function(e,t,n){"use strict";function r(e){for(var t=0,n=0;n<e.length;n++){var r=e[n];t+=r.totalTime}return t}function o(e){var t=[];return e.forEach(function(e){Object.keys(e.writes).forEach(function(n){e.writes[n].forEach(function(e){t.push({id:n,type:l[e.type]||e.type,args:e.args})})})}),t}function i(e){for(var t,n={},r=0;r<e.length;r++){var o=e[r],i=u({},o.exclusive,o.inclusive);for(var a in i)t=o.displayNames[a].current,n[t]=n[t]||{componentName:t,inclusive:0,exclusive:0,render:0,count:0},o.render[a]&&(n[t].render+=o.render[a]),o.exclusive[a]&&(n[t].exclusive+=o.exclusive[a]),o.inclusive[a]&&(n[t].inclusive+=o.inclusive[a]),o.counts[a]&&(n[t].count+=o.counts[a])}var s=[];for(t in n)n[t].exclusive>=c&&s.push(n[t]);return s.sort(function(e,t){return t.exclusive-e.exclusive}),s}function a(e,t){for(var n,r={},o=0;o<e.length;o++){var i,a=e[o],l=u({},a.exclusive,a.inclusive);t&&(i=s(a));for(var p in l)if(!t||i[p]){var d=a.displayNames[p];n=d.owner+" > "+d.current,r[n]=r[n]||{componentName:n,time:0,count:0},a.inclusive[p]&&(r[n].time+=a.inclusive[p]),a.counts[p]&&(r[n].count+=a.counts[p])}}var f=[];for(n in r)r[n].time>=c&&f.push(r[n]);return f.sort(function(e,t){return t.time-e.time}),f}function s(e){var t={},n=Object.keys(e.writes),r=u({},e.exclusive,e.inclusive);for(var o in r){for(var i=!1,a=0;a<n.length;a++)if(0===n[a].indexOf(o)){i=!0;break}e.created[o]&&(i=!0),!i&&e.counts[o]>0&&(t[o]=!0)}return t}var u=e("./Object.assign"),c=1.2,l={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",SET_MARKUP:"set innerHTML",TEXT_CONTENT:"set textContent",setValueForProperty:"update attribute",setValueForAttribute:"update attribute",deleteValueForProperty:"remove attribute",setValueForStyles:"update styles",replaceNodeWithMarkup:"replace",updateTextContent:"set textContent"},p={getExclusiveSummary:i,getInclusiveSummary:a,getDOMSummary:o,getTotalTime:r};t.exports=p},{"./Object.assign":64}],94:[function(e,t,n){(function(n){"use strict";var r=e("./ReactCurrentOwner"),o=e("./Object.assign"),i=e("./canDefineProperty"),a="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,s={key:!0,ref:!0,__self:!0,__source:!0},u=function(e,t,r,o,s,u,c){var l={$$typeof:a,type:e,key:t,ref:r,props:c,_owner:u};return"production"!==n.env.NODE_ENV&&(l._store={},i?(Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s})):(l._store.validated=!1,l._self=o,l._source=s),Object.freeze(l.props),Object.freeze(l)),l};u.createElement=function(e,t,n){var o,i={},a=null,c=null,l=null,p=null;if(null!=t){c=void 0===t.ref?null:t.ref,a=void 0===t.key?null:""+t.key,l=void 0===t.__self?null:t.__self,p=void 0===t.__source?null:t.__source;for(o in t)t.hasOwnProperty(o)&&!s.hasOwnProperty(o)&&(i[o]=t[o])}var d=arguments.length-2;if(1===d)i.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];i.children=f}if(e&&e.defaultProps){var v=e.defaultProps;for(o in v)"undefined"==typeof i[o]&&(i[o]=v[o])}return u(e,a,c,l,p,r.current,i)},u.createFactory=function(e){var t=u.createElement.bind(null,e);return t.type=e,t},u.cloneAndReplaceKey=function(e,t){var n=u(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},u.cloneAndReplaceProps=function(e,t){var r=u(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return"production"!==n.env.NODE_ENV&&(r._store.validated=e._store.validated),r},u.cloneElement=function(e,t,n){var i,a=o({},e.props),c=e.key,l=e.ref,p=e._self,d=e._source,f=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,f=r.current),void 0!==t.key&&(c=""+t.key);for(i in t)t.hasOwnProperty(i)&&!s.hasOwnProperty(i)&&(a[i]=t[i])}var h=arguments.length-2;if(1===h)a.children=n;else if(h>1){for(var v=Array(h),m=0;h>m;m++)v[m]=arguments[m+2];a.children=v}return u(e.type,c,l,p,d,f,a)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.exports=u}).call(this,e("_process"))},{"./Object.assign":64,"./ReactCurrentOwner":76,"./canDefineProperty":146,_process:42}],95:[function(e,t,n){(function(n){"use strict";function r(){if(d.current){var e=d.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=i("uniqueKey",e,t);null!==r&&("production"!==n.env.NODE_ENV?m(!1,'Each child in an array or iterator should have a unique "key" prop.%s%s%s',r.parentOrOwner||"",r.childOwner||"",r.url||""):void 0)}}function i(e,t,n){var o=r();if(!o){var i="string"==typeof n?n:n.displayName||n.name;i&&(o=" Check the top-level render call using <"+i+">.")}var a=g[e]||(g[e]={});if(a[o])return null;a[o]=!0;var s={parentOrOwner:o,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];c.isValidElement(r)&&o(r,t)}else if(c.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var i=h(e);if(i&&i!==e.entries)for(var a,s=i.call(e);!(a=s.next()).done;)c.isValidElement(a.value)&&o(a.value,t)}}function s(e,t,o,i){for(var a in t)if(t.hasOwnProperty(a)){var s;try{"function"!=typeof t[a]?"production"!==n.env.NODE_ENV?v(!1,"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e||"React class",p[i],a):v(!1):void 0,s=t[a](o,a,e,i)}catch(u){s=u}if("production"!==n.env.NODE_ENV?m(!s||s instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",e||"React class",p[i],a,typeof s):void 0,s instanceof Error&&!(s.message in y)){y[s.message]=!0;var c=r();"production"!==n.env.NODE_ENV?m(!1,"Failed propType: %s%s",s.message,c):void 0}}}function u(e){var t=e.type;if("function"==typeof t){var r=t.displayName||t.name;t.propTypes&&s(r,t.propTypes,e.props,l.prop),"function"==typeof t.getDefaultProps&&("production"!==n.env.NODE_ENV?m(t.getDefaultProps.isReactClassApproved,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."):void 0)}}var c=e("./ReactElement"),l=e("./ReactPropTypeLocations"),p=e("./ReactPropTypeLocationNames"),d=e("./ReactCurrentOwner"),f=e("./canDefineProperty"),h=e("./getIteratorFn"),v=e("fbjs/lib/invariant"),m=e("fbjs/lib/warning"),g={},y={},_={createElement:function(e,t,o){var i="string"==typeof e||"function"==typeof e;"production"!==n.env.NODE_ENV?m(i,"React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).%s",r()):void 0;var s=c.createElement.apply(this,arguments);if(null==s)return s;if(i)for(var l=2;l<arguments.length;l++)a(arguments[l],e);return u(s),s},createFactory:function(e){var t=_.createElement.bind(null,e);return t.type=e,"production"!==n.env.NODE_ENV&&f&&Object.defineProperty(t,"type",{enumerable:!1,get:function(){return"production"!==n.env.NODE_ENV?m(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."):void 0,Object.defineProperty(this,"type",{value:e}),e}}),t},cloneElement:function(e,t,n){for(var r=c.cloneElement.apply(this,arguments),o=2;o<arguments.length;o++)a(arguments[o],r.type);return u(r),r}};t.exports=_}).call(this,e("_process"))},{"./ReactCurrentOwner":76,"./ReactElement":94,"./ReactPropTypeLocationNames":114,"./ReactPropTypeLocations":115,"./canDefineProperty":146,"./getIteratorFn":157,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],96:[function(e,t,n){"use strict";var r,o=e("./ReactElement"),i=e("./ReactEmptyComponentRegistry"),a=e("./ReactReconciler"),s=e("./Object.assign"),u={injectEmptyComponent:function(e){r=o.createElement(e)}},c=function(e){this._currentElement=null,this._rootNodeID=null,this._renderedComponent=e(r)};s(c.prototype,{construct:function(e){},mountComponent:function(e,t,n){return i.registerNullComponentID(e),this._rootNodeID=e,a.mountComponent(this._renderedComponent,e,t,n)},receiveComponent:function(){},unmountComponent:function(e,t,n){a.unmountComponent(this._renderedComponent),i.deregisterNullComponentID(this._rootNodeID),this._rootNodeID=null,this._renderedComponent=null}}),c.injection=u,t.exports=c},{"./Object.assign":64,"./ReactElement":94,"./ReactEmptyComponentRegistry":97,"./ReactReconciler":118}],97:[function(e,t,n){"use strict";function r(e){return!!a[e]}function o(e){a[e]=!0}function i(e){delete a[e]}var a={},s={isNullComponentID:r,registerNullComponentID:o,deregisterNullComponentID:i};t.exports=s},{}],98:[function(e,t,n){(function(e){"use strict";function n(e,t,n,o){try{return t(n,o)}catch(i){return void(null===r&&(r=i))}}var r=null,o={invokeGuardedCallback:n,invokeGuardedCallbackWithCatch:n,rethrowCaughtError:function(){if(r){var e=r;throw r=null,e}}};if("production"!==e.env.NODE_ENV&&"undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"undefined"!=typeof document&&"function"==typeof document.createEvent){var i=document.createElement("react");o.invokeGuardedCallback=function(e,t,n,r){var o=t.bind(null,n,r),a="react-"+e;i.addEventListener(a,o,!1);var s=document.createEvent("Event");s.initEvent(a,!1,!1),i.dispatchEvent(s),i.removeEventListener(a,o,!1)}}t.exports=o}).call(this,e("_process"))},{_process:42}],99:[function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=e("./EventPluginHub"),i={handleTopLevel:function(e,t,n,i,a){var s=o.extractEvents(e,t,n,i,a);r(s)}};t.exports=i},{"./EventPluginHub":57}],100:[function(e,t,n){"use strict";function r(e){var t=d.getID(e),n=p.getReactRootIDFromNodeID(t),r=d.findReactContainerForID(n),o=d.getFirstReactDOM(r);return o}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){a(e)}function a(e){for(var t=d.getFirstReactDOM(v(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var o=0;o<e.ancestors.length;o++){t=e.ancestors[o];var i=d.getID(t)||"";g._handleTopLevel(e.topLevelType,t,i,e.nativeEvent,v(e.nativeEvent))}}function s(e){var t=m(window);e(t)}var u=e("fbjs/lib/EventListener"),c=e("fbjs/lib/ExecutionEnvironment"),l=e("./PooledClass"),p=e("./ReactInstanceHandles"),d=e("./ReactMount"),f=e("./ReactUpdates"),h=e("./Object.assign"),v=e("./getEventTarget"),m=e("fbjs/lib/getUnboundedScrollPosition");h(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(o,l.twoArgumentPooler);var g={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:c.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?u.listen(r,t,g.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?u.capture(r,t,g.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=s.bind(null,e);u.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(g._enabled){var n=o.getPooled(e,t);try{f.batchedUpdates(i,n)}finally{o.release(n)}}}};t.exports=g},{"./Object.assign":64,"./PooledClass":65,"./ReactInstanceHandles":103,"./ReactMount":107,"./ReactUpdates":125,"./getEventTarget":156,"fbjs/lib/EventListener":12,"fbjs/lib/ExecutionEnvironment":13,"fbjs/lib/getUnboundedScrollPosition":24}],101:[function(e,t,n){"use strict";var r=e("./DOMProperty"),o=e("./EventPluginHub"),i=e("./ReactComponentEnvironment"),a=e("./ReactClass"),s=e("./ReactEmptyComponent"),u=e("./ReactBrowserEventEmitter"),c=e("./ReactNativeComponent"),l=e("./ReactPerf"),p=e("./ReactRootIndex"),d=e("./ReactUpdates"),f={Component:i.injection,Class:a.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventEmitter:u.injection,NativeComponent:c.injection,Perf:l.injection,RootIndex:p.injection,Updates:d.injection};t.exports=f},{"./DOMProperty":51,"./EventPluginHub":57,"./ReactBrowserEventEmitter":68,"./ReactClass":71,"./ReactComponentEnvironment":74,"./ReactEmptyComponent":96,"./ReactNativeComponent":110,"./ReactPerf":113,"./ReactRootIndex":120,"./ReactUpdates":125}],102:[function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=e("./ReactDOMSelection"),i=e("fbjs/lib/containsNode"),a=e("fbjs/lib/focusNode"),s=e("fbjs/lib/getActiveElement"),u={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:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,o),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=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof 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 i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};t.exports=u},{"./ReactDOMSelection":86,"fbjs/lib/containsNode":16,"fbjs/lib/focusNode":21,"fbjs/lib/getActiveElement":22}],103:[function(e,t,n){(function(n){"use strict";function r(e){return f+e.toString(36)}function o(e,t){return e.charAt(t)===f||t===e.length}function i(e){return""===e||e.charAt(0)===f&&e.charAt(e.length-1)!==f}function a(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function s(e){return e?e.substr(0,e.lastIndexOf(f)):""}function u(e,t){if(i(e)&&i(t)?void 0:"production"!==n.env.NODE_ENV?d(!1,"getNextDescendantID(%s, %s): Received an invalid React DOM ID.",e,t):d(!1),a(e,t)?void 0:"production"!==n.env.NODE_ENV?d(!1,"getNextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.",e,t):d(!1),e===t)return e;var r,s=e.length+h;for(r=s;r<t.length&&!o(t,r);r++);return t.substr(0,r)}function c(e,t){var r=Math.min(e.length,t.length);if(0===r)return"";for(var a=0,s=0;r>=s;s++)if(o(e,s)&&o(t,s))a=s;else if(e.charAt(s)!==t.charAt(s))break;var u=e.substr(0,a);return i(u)?void 0:"production"!==n.env.NODE_ENV?d(!1,"getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",e,t,u):d(!1),u}function l(e,t,r,o,i,c){e=e||"",t=t||"",e===t?"production"!==n.env.NODE_ENV?d(!1,"traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",e):d(!1):void 0;var l=a(t,e);l||a(e,t)?void 0:"production"!==n.env.NODE_ENV?d(!1,"traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.",e,t):d(!1);for(var p=0,f=l?s:u,h=e;;h=f(h,t)){var m;if(i&&h===e||c&&h===t||(m=r(h,l,o)),m===!1||h===t)break;p++<v?void 0:"production"!==n.env.NODE_ENV?d(!1,"traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s",e,t,h):d(!1)}}var p=e("./ReactRootIndex"),d=e("fbjs/lib/invariant"),f=".",h=f.length,v=1e4,m={createReactRootID:function(){return r(p.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===f&&e.length>1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=c(e,t);i!==e&&l(e,i,n,r,!1,!0),i!==t&&l(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(l("",e,t,n,!0,!1),l(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(l("",e,t,n,!0,!0),l(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){l("",e,t,n,!0,!1)},getFirstCommonAncestorID:c,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:f};t.exports=m}).call(this,e("_process"))},{"./ReactRootIndex":120,_process:42,"fbjs/lib/invariant":27}],104:[function(e,t,n){"use strict";var r={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}};t.exports=r},{}],105:[function(e,t,n){(function(n){"use strict";var r=e("./ReactChildren"),o=e("./ReactComponent"),i=e("./ReactClass"),a=e("./ReactDOMFactories"),s=e("./ReactElement"),u=e("./ReactElementValidator"),c=e("./ReactPropTypes"),l=e("./ReactVersion"),p=e("./Object.assign"),d=e("./onlyChild"),f=s.createElement,h=s.createFactory,v=s.cloneElement;"production"!==n.env.NODE_ENV&&(f=u.createElement,h=u.createFactory,v=u.cloneElement);var m={Children:{map:r.map,forEach:r.forEach,count:r.count,toArray:r.toArray,only:d},Component:o,createElement:f,cloneElement:v,isValidElement:s.isValidElement,PropTypes:c,createClass:i.createClass,createFactory:h,createMixin:function(e){return e},DOM:a,version:l,__spread:p};t.exports=m}).call(this,e("_process"))},{"./Object.assign":64,"./ReactChildren":70,"./ReactClass":71,"./ReactComponent":72,"./ReactDOMFactories":80,"./ReactElement":94,"./ReactElementValidator":95,"./ReactPropTypes":116,"./ReactVersion":126,"./onlyChild":163,_process:42}],106:[function(e,t,n){"use strict";var r=e("./adler32"),o=/\/?>/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(i.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=i},{"./adler32":145}],107:[function(e,t,n){(function(n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===K?e.documentElement:e.firstChild:null}function i(e){var t=o(e);return t&&ee.getID(t)}function a(e){var t=s(e);if(t)if(H.hasOwnProperty(t)){var r=H[t];r!==e&&(p(r,t)?"production"!==n.env.NODE_ENV?V(!1,"ReactMount: Two valid but unequal nodes with the same `%s`: %s",W,t):V(!1):void 0, H[t]=e)}else H[t]=e;return t}function s(e){return e&&e.getAttribute&&e.getAttribute(W)||""}function u(e,t){var n=s(e);n!==t&&delete H[n],e.setAttribute(W,t),H[t]=e}function c(e){return H.hasOwnProperty(e)&&p(H[e],e)||(H[e]=ee.findReactNodeByID(e)),H[e]}function l(e){var t=w.get(e)._rootNodeID;return D.isNullComponentID(t)?null:(H.hasOwnProperty(t)&&p(H[t],t)||(H[t]=ee.findReactNodeByID(t)),H[t])}function p(e,t){if(e){s(e)!==t?"production"!==n.env.NODE_ENV?V(!1,"ReactMount: Unexpected modification of `%s`",W):V(!1):void 0;var r=ee.findReactContainerForID(t);if(r&&j(r,e))return!0}return!1}function d(e){delete H[e]}function f(e){var t=H[e];return t&&p(t,e)?void(J=t):!1}function h(e){J=null,R.traverseAncestors(e,f);var t=J;return J=null,t}function v(e,t,r,o,i,a){if(C.useCreateElement&&(a=T({},a),r.nodeType===K?a[Y]=r:a[Y]=r.ownerDocument),"production"!==n.env.NODE_ENV){a===k&&(a={});var s=r.nodeName.toLowerCase();a[F.ancestorInfoContextKey]=F.updatedAncestorInfo(null,s,null)}var u=P.mountComponent(e,t,o,a);e._renderedComponent._topLevelWrapper=e,ee._mountImageIntoNode(u,r,i,o)}function m(e,t,n,r,o){var i=S.ReactReconcileTransaction.getPooled(r);i.perform(v,null,e,t,n,i,r,o),S.ReactReconcileTransaction.release(i)}function g(e,t){for(P.unmountComponent(e),t.nodeType===K&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=i(e);return t?t!==R.getReactRootIDFromNodeID(t):!1}function _(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=s(e);if(t){var n,r=R.getReactRootIDFromNodeID(t),o=e;do if(n=s(o),o=o.parentNode,null==o)return null;while(n!==r);if(o===$[r])return e}}return null}var b=e("./DOMProperty"),E=e("./ReactBrowserEventEmitter"),N=e("./ReactCurrentOwner"),C=e("./ReactDOMFeatureFlags"),O=e("./ReactElement"),D=e("./ReactEmptyComponentRegistry"),R=e("./ReactInstanceHandles"),w=e("./ReactInstanceMap"),x=e("./ReactMarkupChecksum"),M=e("./ReactPerf"),P=e("./ReactReconciler"),I=e("./ReactUpdateQueue"),S=e("./ReactUpdates"),T=e("./Object.assign"),k=e("fbjs/lib/emptyObject"),j=e("fbjs/lib/containsNode"),A=e("./instantiateReactComponent"),V=e("fbjs/lib/invariant"),U=e("./setInnerHTML"),L=e("./shouldUpdateReactComponent"),F=e("./validateDOMNesting"),B=e("fbjs/lib/warning"),W=b.ID_ATTRIBUTE_NAME,H={},q=1,K=9,z=11,Y="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),G={},$={};if("production"!==n.env.NODE_ENV)var Q={};var X=[],J=null,Z=function(){};Z.prototype.isReactComponent={},"production"!==n.env.NODE_ENV&&(Z.displayName="TopLevelWrapper"),Z.prototype.render=function(){return this.props};var ee={TopLevelWrapper:Z,_instancesByReactRootID:G,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,r,a){return ee.scrollMonitor(r,function(){I.enqueueElementInternal(e,t),a&&I.enqueueCallbackInternal(e,a)}),"production"!==n.env.NODE_ENV&&(Q[i(r)]=o(r)),e},_registerComponent:function(e,t){!t||t.nodeType!==q&&t.nodeType!==K&&t.nodeType!==z?"production"!==n.env.NODE_ENV?V(!1,"_registerComponent(...): Target container is not a DOM element."):V(!1):void 0,E.ensureScrollValueMonitoring();var r=ee.registerContainer(t);return G[r]=e,r},_renderNewRootComponent:function(e,t,r,i){"production"!==n.env.NODE_ENV?B(null==N.current,"_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. Check the render method of %s.",N.current&&N.current.getName()||"ReactCompositeComponent"):void 0;var a=A(e,null),s=ee._registerComponent(a,t);return S.batchedUpdates(m,a,s,t,r,i),"production"!==n.env.NODE_ENV&&(Q[s]=o(t)),a},renderSubtreeIntoContainer:function(e,t,r,o){return null==e||null==e._reactInternalInstance?"production"!==n.env.NODE_ENV?V(!1,"parentComponent must be a valid React Component"):V(!1):void 0,ee._renderSubtreeIntoContainer(e,t,r,o)},_renderSubtreeIntoContainer:function(e,t,r,a){O.isValidElement(t)?void 0:"production"!==n.env.NODE_ENV?V(!1,"ReactDOM.render(): Invalid component element.%s","string"==typeof t?" Instead of passing an element string, make sure to instantiate it by passing it to React.createElement.":"function"==typeof t?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":""):V(!1),"production"!==n.env.NODE_ENV?B(!r||!r.tagName||"BODY"!==r.tagName.toUpperCase(),"render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app."):void 0;var u=new O(Z,null,null,null,null,null,t),c=G[i(r)];if(c){var l=c._currentElement,p=l.props;if(L(p,t)){var d=c._renderedComponent.getPublicInstance(),f=a&&function(){a.call(d)};return ee._updateRootComponent(c,u,r,f),d}ee.unmountComponentAtNode(r)}var h=o(r),v=h&&!!s(h),m=y(r);if("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?B(!m,"render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."):void 0,!v||h.nextSibling))for(var g=h;g;){if(s(g)){"production"!==n.env.NODE_ENV?B(!1,"render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup."):void 0;break}g=g.nextSibling}var _=v&&!c&&!m,b=ee._renderNewRootComponent(u,r,_,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):k)._renderedComponent.getPublicInstance();return a&&a.call(b),b},render:function(e,t,n){return ee._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=i(e);return t&&(t=R.getReactRootIDFromNodeID(t)),t||(t=R.createReactRootID()),$[t]=e,t},unmountComponentAtNode:function(e){"production"!==n.env.NODE_ENV?B(null==N.current,"unmountComponentAtNode(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. Check the render method of %s.",N.current&&N.current.getName()||"ReactCompositeComponent"):void 0,!e||e.nodeType!==q&&e.nodeType!==K&&e.nodeType!==z?"production"!==n.env.NODE_ENV?V(!1,"unmountComponentAtNode(...): Target container is not a DOM element."):V(!1):void 0;var t=i(e),r=G[t];if(!r){var o=y(e),a=s(e),u=a&&a===R.getReactRootIDFromNodeID(a);return"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?B(!o,"unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",u?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component."):void 0),!1}return S.batchedUpdates(g,r,e),delete G[t],delete $[t],"production"!==n.env.NODE_ENV&&delete Q[t],!0},findReactContainerForID:function(e){var t=R.getReactRootIDFromNodeID(e),r=$[t];if("production"!==n.env.NODE_ENV){var o=Q[t];if(o&&o.parentNode!==r){"production"!==n.env.NODE_ENV?B(s(o)===t,"ReactMount: Root element ID differed from reactRootID."):void 0;var i=r.firstChild;i&&t===s(i)?Q[t]=i:"production"!==n.env.NODE_ENV?B(!1,"ReactMount: Root element has been removed from its original container. New container: %s",o.parentNode):void 0}}return r},findReactNodeByID:function(e){var t=ee.findReactContainerForID(e);return ee.findComponentRoot(t,e)},getFirstReactDOM:function(e){return _(e)},findComponentRoot:function(e,t){var r=X,o=0,i=h(t)||e;for("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?B(null!=i,"React can't find the root component node for data-reactid value `%s`. If you're seeing this message, it probably means that you've loaded two copies of React on the page. At this time, only a single copy of React can be loaded at a time.",t):void 0),r[0]=i.firstChild,r.length=1;o<r.length;){for(var a,s=r[o++];s;){var u=ee.getID(s);u?t===u?a=s:R.isAncestorIDOf(u,t)&&(r.length=o=0,r.push(s.firstChild)):r.push(s.firstChild),s=s.nextSibling}if(a)return r.length=0,a}r.length=0,"production"!==n.env.NODE_ENV?V(!1,"findComponentRoot(..., %s): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.",t,ee.getID(e)):V(!1)},_mountImageIntoNode:function(e,t,i,a){if(!t||t.nodeType!==q&&t.nodeType!==K&&t.nodeType!==z?"production"!==n.env.NODE_ENV?V(!1,"mountComponentIntoNode(...): Target container is not valid."):V(!1):void 0,i){var s=o(t);if(x.canReuseMarkup(e,s))return;var u=s.getAttribute(x.CHECKSUM_ATTR_NAME);s.removeAttribute(x.CHECKSUM_ATTR_NAME);var c=s.outerHTML;s.setAttribute(x.CHECKSUM_ATTR_NAME,u);var l=e;if("production"!==n.env.NODE_ENV){var p;t.nodeType===q?(p=document.createElement("div"),p.innerHTML=e,l=p.innerHTML):(p=document.createElement("iframe"),document.body.appendChild(p),p.contentDocument.write(e),l=p.contentDocument.documentElement.outerHTML,document.body.removeChild(p))}var d=r(l,c),f=" (client) "+l.substring(d-20,d+20)+"\n (server) "+c.substring(d-20,d+20);t.nodeType===K?"production"!==n.env.NODE_ENV?V(!1,"You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s",f):V(!1):void 0,"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?B(!1,"React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:\n%s",f):void 0)}if(t.nodeType===K?"production"!==n.env.NODE_ENV?V(!1,"You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering."):V(!1):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);t.appendChild(e)}else U(t,e)},ownerDocumentContextKey:Y,getReactRootID:i,getID:a,setID:u,getNode:c,getNodeFromInstance:l,isValid:p,purgeID:d};M.measureMethods(ee,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),t.exports=ee}).call(this,e("_process"))},{"./DOMProperty":51,"./Object.assign":64,"./ReactBrowserEventEmitter":68,"./ReactCurrentOwner":76,"./ReactDOMFeatureFlags":81,"./ReactElement":94,"./ReactEmptyComponentRegistry":97,"./ReactInstanceHandles":103,"./ReactInstanceMap":104,"./ReactMarkupChecksum":106,"./ReactPerf":113,"./ReactReconciler":118,"./ReactUpdateQueue":124,"./ReactUpdates":125,"./instantiateReactComponent":160,"./setInnerHTML":166,"./shouldUpdateReactComponent":168,"./validateDOMNesting":170,_process:42,"fbjs/lib/containsNode":16,"fbjs/lib/emptyObject":20,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],108:[function(e,t,n){(function(n){"use strict";function r(e,t,n){g.push({parentID:e,parentNode:null,type:p.INSERT_MARKUP,markupIndex:y.push(t)-1,content:null,fromIndex:null,toIndex:n})}function o(e,t,n){g.push({parentID:e,parentNode:null,type:p.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:t,toIndex:n})}function i(e,t){g.push({parentID:e,parentNode:null,type:p.REMOVE_NODE,markupIndex:null,content:null,fromIndex:t,toIndex:null})}function a(e,t){g.push({parentID:e,parentNode:null,type:p.SET_MARKUP,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function s(e,t){g.push({parentID:e,parentNode:null,type:p.TEXT_CONTENT,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function u(){g.length&&(l.processChildrenUpdates(g,y),c())}function c(){g.length=0,y.length=0}var l=e("./ReactComponentEnvironment"),p=e("./ReactMultiChildUpdateTypes"),d=e("./ReactCurrentOwner"),f=e("./ReactReconciler"),h=e("./ReactChildReconciler"),v=e("./flattenChildren"),m=0,g=[],y=[],_={Mixin:{_reconcilerInstantiateChildren:function(e,t,r){if("production"!==n.env.NODE_ENV&&this._currentElement)try{return d.current=this._currentElement._owner,h.instantiateChildren(e,t,r)}finally{d.current=null}return h.instantiateChildren(e,t,r)},_reconcilerUpdateChildren:function(e,t,r,o){var i;if("production"!==n.env.NODE_ENV&&this._currentElement){try{d.current=this._currentElement._owner,i=v(t)}finally{d.current=null}return h.updateChildren(e,i,r,o)}return i=v(t),h.updateChildren(e,i,r,o)},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=this._rootNodeID+a,c=f.mountComponent(s,u,t,n);s._mountIndex=i++,o.push(c)}return o},updateTextContent:function(e){m++;var t=!0;try{var n=this._renderedChildren;h.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChild(n[r]);this.setTextContent(e),t=!1}finally{m--,m||(t?c():u())}},updateMarkup:function(e){m++;var t=!0;try{var n=this._renderedChildren;h.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setMarkup(e),t=!1}finally{m--,m||(t?c():u())}},updateChildren:function(e,t,n){m++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{m--,m||(r?c():u())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=this._reconcilerUpdateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var i,a=0,s=0;for(i in o)if(o.hasOwnProperty(i)){var u=r&&r[i],c=o[i];u===c?(this.moveChild(u,s,a),a=Math.max(u._mountIndex,a),u._mountIndex=s):(u&&(a=Math.max(u._mountIndex,a),this._unmountChild(u)),this._mountChildByNameAtIndex(c,i,s,t,n)),s++}for(i in r)!r.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||this._unmountChild(r[i])}},unmountChildren:function(){var e=this._renderedChildren;h.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&o(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){r(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){i(this._rootNodeID,e._mountIndex)},setTextContent:function(e){s(this._rootNodeID,e)},setMarkup:function(e){a(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,o){var i=this._rootNodeID+t,a=f.mountComponent(e,i,r,o);e._mountIndex=n,this.createChild(e,a)},_unmountChild:function(e){this.removeChild(e),e._mountIndex=null}}};t.exports=_}).call(this,e("_process"))},{"./ReactChildReconciler":69,"./ReactComponentEnvironment":74,"./ReactCurrentOwner":76,"./ReactMultiChildUpdateTypes":109,"./ReactReconciler":118,"./flattenChildren":151,_process:42}],109:[function(e,t,n){"use strict";var r=e("fbjs/lib/keyMirror"),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});t.exports=o},{"fbjs/lib/keyMirror":30}],110:[function(e,t,n){(function(n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=c(t)),n}function o(e){return l?void 0:"production"!==n.env.NODE_ENV?u(!1,"There is no registered component for the tag %s",e.type):u(!1),new l(e.type,e.props)}function i(e){return new d(e)}function a(e){return e instanceof d}var s=e("./Object.assign"),u=e("fbjs/lib/invariant"),c=null,l=null,p={},d=null,f={injectGenericComponentClass:function(e){l=e},injectTextComponentClass:function(e){d=e},injectComponentClasses:function(e){s(p,e)}},h={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:i,isTextComponent:a,injection:f};t.exports=h}).call(this,e("_process"))},{"./Object.assign":64,_process:42,"fbjs/lib/invariant":27}],111:[function(e,t,n){(function(n){"use strict";function r(e,t){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?o(!1,"%s(...): Can only update a mounted or mounting component. This usually means you called %s() on an unmounted component. This is a no-op. Please check the code for the %s component.",t,t,e.constructor&&e.constructor.displayName||""):void 0)}var o=e("fbjs/lib/warning"),i={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")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}};t.exports=i}).call(this,e("_process"))},{_process:42,"fbjs/lib/warning":38}],112:[function(e,t,n){(function(n){"use strict";var r=e("fbjs/lib/invariant"),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,i){o.isValidOwner(i)?void 0:"production"!==n.env.NODE_ENV?r(!1,"addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner)."):r(!1),i.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,i){o.isValidOwner(i)?void 0:"production"!==n.env.NODE_ENV?r(!1,"removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner)."):r(!1),i.getPublicInstance().refs[t]===e.getPublicInstance()&&i.detachRef(t)}};t.exports=o}).call(this,e("_process"))},{_process:42,"fbjs/lib/invariant":27}],113:[function(e,t,n){(function(e){"use strict";function n(e,t,n){return n}var r={enableMeasure:!1,storedMeasure:n,measureMethods:function(t,n,o){if("production"!==e.env.NODE_ENV)for(var i in o)o.hasOwnProperty(i)&&(t[i]=r.measure(n,o[i],t[i]))},measure:function(t,n,o){if("production"!==e.env.NODE_ENV){var i=null,a=function(){return r.enableMeasure?(i||(i=r.storedMeasure(t,n,o)),i.apply(this,arguments)):o.apply(this,arguments)};return a.displayName=t+"_"+n,a}return o},injection:{injectMeasure:function(e){r.storedMeasure=e}}};t.exports=r}).call(this,e("_process"))},{_process:42}],114:[function(e,t,n){(function(e){"use strict";var n={};"production"!==e.env.NODE_ENV&&(n={prop:"prop",context:"context",childContext:"child context"}),t.exports=n}).call(this,e("_process"))},{_process:42}],115:[function(e,t,n){"use strict";var r=e("fbjs/lib/keyMirror"),o=r({prop:null,context:null,childContext:null});t.exports=o},{"fbjs/lib/keyMirror":30}],116:[function(e,t,n){"use strict";function r(e){function t(t,n,r,o,i,a){if(o=o||N,a=a||r,null==n[r]){var s=_[i];return t?new Error("Required "+s+" `"+a+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,i){var a=t[n],s=v(a);if(s!==e){var u=_[o],c=m(a);return new Error("Invalid "+u+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function i(){return r(b.thatReturns(null))}function a(e){function t(t,n,r,o,i){var a=t[n];if(!Array.isArray(a)){var s=_[o],u=v(a);return new Error("Invalid "+s+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<a.length;c++){var l=e(a,c,r,o,i+"["+c+"]");if(l instanceof Error)return l}return null}return r(t)}function s(){function e(e,t,n,r,o){if(!y.isValidElement(e[t])){var i=_[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return r(e)}function u(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=_[o],s=e.name||N,u=g(t[n]);return new Error("Invalid "+a+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+s+"`."))}return null}return r(t)}function c(e){function t(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(a===e[s])return null;var u=_[o],c=JSON.stringify(e);return new Error("Invalid "+u+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+c+"."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function l(e){function t(t,n,r,o,i){var a=t[n],s=v(a);if("object"!==s){var u=_[o];return new Error("Invalid "+u+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an object."))}for(var c in a)if(a.hasOwnProperty(c)){var l=e(a,c,r,o,i+"."+c);if(l instanceof Error)return l}return null}return r(t)}function p(e){function t(t,n,r,o,i){for(var a=0;a<e.length;a++){var s=e[a];if(null==s(t,n,r,o,i))return null}var u=_[o];return new Error("Invalid "+u+" `"+i+"` supplied to "+("`"+r+"`."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function d(){function e(e,t,n,r,o){if(!h(e[t])){var i=_[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e)}function f(e){function t(t,n,r,o,i){var a=t[n],s=v(a);if("object"!==s){var u=_[o];return new Error("Invalid "+u+" `"+i+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."))}for(var c in e){var l=e[c];if(l){var p=l(a,c,r,o,i+"."+c);if(p)return p}}return null}return r(t)}function h(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(h);if(null===e||y.isValidElement(e))return!0;var t=E(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!h(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!h(o[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function m(e){var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){return e.constructor&&e.constructor.name?e.constructor.name:"<<anonymous>>"}var y=e("./ReactElement"),_=e("./ReactPropTypeLocationNames"),b=e("fbjs/lib/emptyFunction"),E=e("./getIteratorFn"),N="<<anonymous>>",C={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:s(),instanceOf:u,node:d(),objectOf:l,oneOf:c,oneOfType:p,shape:f};t.exports=C},{"./ReactElement":94,"./ReactPropTypeLocationNames":114,"./getIteratorFn":157,"fbjs/lib/emptyFunction":19}],117:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.useCreateElement=!e&&s.useCreateElement}var o=e("./CallbackQueue"),i=e("./PooledClass"),a=e("./ReactBrowserEventEmitter"),s=e("./ReactDOMFeatureFlags"),u=e("./ReactInputSelection"),c=e("./Transaction"),l=e("./Object.assign"),p={initialize:u.getSelectionInformation,close:u.restoreSelection},d={initialize:function(){var e=a.isEnabled();return a.setEnabled(!1),e},close:function(e){a.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,d,f],v={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};l(r.prototype,c.Mixin,v),i.addPoolingTo(r),t.exports=r},{"./CallbackQueue":47,"./Object.assign":64,"./PooledClass":65,"./ReactBrowserEventEmitter":68,"./ReactDOMFeatureFlags":81,"./ReactInputSelection":102,"./Transaction":142}],118:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e("./ReactRef"),i={mountComponent:function(e,t,n,o){var i=e.mountComponent(t,n,o);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),i},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var s=o.shouldUpdateRefs(a,t);s&&o.detachRefs(e,a),e.receiveComponent(t,n,i),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};t.exports=i},{"./ReactRef":119}],119:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=e("./ReactOwner"),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&&o(n,e,t._owner)}},t.exports=a},{"./ReactOwner":112}],120:[function(e,t,n){"use strict";var r={injectCreateReactRootIndex:function(e){o.createReactRootIndex=e}},o={createReactRootIndex:null,injection:r};t.exports=o},{}],121:[function(e,t,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(e){}};t.exports=r},{}],122:[function(e,t,n){(function(n){"use strict";function r(e){a.isValidElement(e)?void 0:"production"!==n.env.NODE_ENV?h(!1,"renderToString(): You must pass a valid ReactElement."):h(!1);var t;try{p.injection.injectBatchingStrategy(c);var r=s.createReactRootID();return t=l.getPooled(!1),t.perform(function(){var n=f(e,null),o=n.mountComponent(r,t,d);return u.addChecksumToMarkup(o)},null)}finally{l.release(t),p.injection.injectBatchingStrategy(i)}}function o(e){a.isValidElement(e)?void 0:"production"!==n.env.NODE_ENV?h(!1,"renderToStaticMarkup(): You must pass a valid ReactElement."):h(!1);var t;try{p.injection.injectBatchingStrategy(c);var r=s.createReactRootID();return t=l.getPooled(!0),t.perform(function(){var n=f(e,null);return n.mountComponent(r,t,d)},null)}finally{l.release(t),p.injection.injectBatchingStrategy(i)}}var i=e("./ReactDefaultBatchingStrategy"),a=e("./ReactElement"),s=e("./ReactInstanceHandles"),u=e("./ReactMarkupChecksum"),c=e("./ReactServerBatchingStrategy"),l=e("./ReactServerRenderingTransaction"),p=e("./ReactUpdates"),d=e("fbjs/lib/emptyObject"),f=e("./instantiateReactComponent"),h=e("fbjs/lib/invariant");t.exports={renderToString:r,renderToStaticMarkup:o}}).call(this,e("_process"))},{"./ReactDefaultBatchingStrategy":90,"./ReactElement":94,"./ReactInstanceHandles":103,"./ReactMarkupChecksum":106,"./ReactServerBatchingStrategy":121,"./ReactServerRenderingTransaction":123,"./ReactUpdates":125,"./instantiateReactComponent":160,_process:42,"fbjs/lib/emptyObject":20,"fbjs/lib/invariant":27}],123:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=i.getPooled(null),this.useCreateElement=!1}var o=e("./PooledClass"),i=e("./CallbackQueue"),a=e("./Transaction"),s=e("./Object.assign"),u=e("fbjs/lib/emptyFunction"),c={initialize:function(){this.reactMountReady.reset()},close:u},l=[c],p={getTransactionWrappers:function(){return l},getReactMountReady:function(){return this.reactMountReady},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};s(r.prototype,a.Mixin,p),o.addPoolingTo(r),t.exports=r},{"./CallbackQueue":47,"./Object.assign":64,"./PooledClass":65,"./Transaction":142,"fbjs/lib/emptyFunction":19}],124:[function(e,t,n){(function(n){"use strict";function r(e){u.enqueueUpdate(e)}function o(e,t){var r=s.get(e);return r?("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?p(null==i.current,"%s(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.",t):void 0),r):("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?p(!t,"%s(...): Can only update a mounted or mounting component. This usually means you called %s() on an unmounted component. This is a no-op. Please check the code for the %s component.",t,t,e.constructor.displayName):void 0),null)}var i=e("./ReactCurrentOwner"),a=e("./ReactElement"),s=e("./ReactInstanceMap"),u=e("./ReactUpdates"),c=e("./Object.assign"),l=e("fbjs/lib/invariant"),p=e("fbjs/lib/warning"),d={isMounted:function(e){if("production"!==n.env.NODE_ENV){var t=i.current;null!==t&&("production"!==n.env.NODE_ENV?p(t._warnedAboutRefsInRender,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",t.getName()||"A component"):void 0,t._warnedAboutRefsInRender=!0)}var r=s.get(e);return r?!!r._renderedComponent:!1},enqueueCallback:function(e,t){"function"!=typeof t?"production"!==n.env.NODE_ENV?l(!1,"enqueueCallback(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."):l(!1):void 0;var i=o(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,t){"function"!=typeof t?"production"!==n.env.NODE_ENV?l(!1,"enqueueCallback(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."):l(!1):void 0,e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueSetProps:function(e,t){var n=o(e,"setProps");n&&d.enqueueSetPropsInternal(n,t)},enqueueSetPropsInternal:function(e,t){var o=e._topLevelWrapper;o?void 0:"production"!==n.env.NODE_ENV?l(!1,"setProps(...): You called `setProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):l(!1);var i=o._pendingElement||o._currentElement,s=i.props,u=c({},s.props,t);o._pendingElement=a.cloneAndReplaceProps(i,a.cloneAndReplaceProps(s,u)),r(o)},enqueueReplaceProps:function(e,t){var n=o(e,"replaceProps");n&&d.enqueueReplacePropsInternal(n,t)},enqueueReplacePropsInternal:function(e,t){var o=e._topLevelWrapper;o?void 0:"production"!==n.env.NODE_ENV?l(!1,"replaceProps(...): You called `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):l(!1);var i=o._pendingElement||o._currentElement,s=i.props;o._pendingElement=a.cloneAndReplaceProps(i,a.cloneAndReplaceProps(s,t)),r(o)},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}};t.exports=d}).call(this,e("_process"))},{"./Object.assign":64,"./ReactCurrentOwner":76,"./ReactElement":94,"./ReactInstanceMap":104,"./ReactUpdates":125,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],125:[function(e,t,n){ (function(n){"use strict";function r(){R.ReactReconcileTransaction&&b?void 0:"production"!==n.env.NODE_ENV?m(!1,"ReactUpdates: must inject a reconcile transaction class and batching strategy"):m(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=l.getPooled(),this.reconcileTransaction=R.ReactReconcileTransaction.getPooled(!1)}function i(e,t,n,o,i,a){r(),b.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?"production"!==n.env.NODE_ENV?m(!1,"Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).",t,g.length):m(!1):void 0,g.sort(a);for(var r=0;t>r;r++){var o=g[r],i=o._pendingCallbacks;if(o._pendingCallbacks=null,f.performUpdateIfNecessary(o,e.reconcileTransaction),i)for(var s=0;s<i.length;s++)e.callbackQueue.enqueue(i[s],o.getPublicInstance())}}function u(e){return r(),b.isBatchingUpdates?void g.push(e):void b.batchedUpdates(u,e)}function c(e,t){b.isBatchingUpdates?void 0:"production"!==n.env.NODE_ENV?m(!1,"ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."):m(!1),y.enqueue(e,t),_=!0}var l=e("./CallbackQueue"),p=e("./PooledClass"),d=e("./ReactPerf"),f=e("./ReactReconciler"),h=e("./Transaction"),v=e("./Object.assign"),m=e("fbjs/lib/invariant"),g=[],y=l.getPooled(),_=!1,b=null,E={initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),O()):g.length=0}},N={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},C=[E,N];v(o.prototype,h.Mixin,{getTransactionWrappers:function(){return C},destructor:function(){this.dirtyComponentsLength=null,l.release(this.callbackQueue),this.callbackQueue=null,R.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return h.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),p.addPoolingTo(o);var O=function(){for(;g.length||_;){if(g.length){var e=o.getPooled();e.perform(s,null,e),o.release(e)}if(_){_=!1;var t=y;y=l.getPooled(),t.notifyAll(),l.release(t)}}};O=d.measure("ReactUpdates","flushBatchedUpdates",O);var D={injectReconcileTransaction:function(e){e?void 0:"production"!==n.env.NODE_ENV?m(!1,"ReactUpdates: must provide a reconcile transaction class"):m(!1),R.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:"production"!==n.env.NODE_ENV?m(!1,"ReactUpdates: must provide a batching strategy"):m(!1),"function"!=typeof e.batchedUpdates?"production"!==n.env.NODE_ENV?m(!1,"ReactUpdates: must provide a batchedUpdates() function"):m(!1):void 0,"boolean"!=typeof e.isBatchingUpdates?"production"!==n.env.NODE_ENV?m(!1,"ReactUpdates: must provide an isBatchingUpdates boolean attribute"):m(!1):void 0,b=e}},R={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:u,flushBatchedUpdates:O,injection:D,asap:c};t.exports=R}).call(this,e("_process"))},{"./CallbackQueue":47,"./Object.assign":64,"./PooledClass":65,"./ReactPerf":113,"./ReactReconciler":118,"./Transaction":142,_process:42,"fbjs/lib/invariant":27}],126:[function(e,t,n){"use strict";t.exports="0.14.7"},{}],127:[function(e,t,n){"use strict";var r=e("./DOMProperty"),o=r.injection.MUST_USE_ATTRIBUTE,i={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},a={Properties:{clipPath:o,cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,xlinkActuate:o,xlinkArcrole:o,xlinkHref:o,xlinkRole:o,xlinkShow:o,xlinkTitle:o,xlinkType:o,xmlBase:o,xmlLang:o,xmlSpace:o,y1:o,y2:o,y:o},DOMAttributeNamespaces:{xlinkActuate:i.xlink,xlinkArcrole:i.xlink,xlinkHref:i.xlink,xlinkRole:i.xlink,xlinkShow:i.xlink,xlinkTitle:i.xlink,xlinkType:i.xlink,xmlBase:i.xml,xmlLang:i.xml,xmlSpace:i.xml},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}};t.exports=a},{"./DOMProperty":51}],128:[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 o(e,t){if(b||null==g||g!==l())return null;var n=r(g);if(!_||!f(_,n)){_=n;var o=c.getPooled(m.select,y,e,t);return o.type="select",o.target=g,a.accumulateTwoPhaseDispatches(o),o}return null}var i=e("./EventConstants"),a=e("./EventPropagators"),s=e("fbjs/lib/ExecutionEnvironment"),u=e("./ReactInputSelection"),c=e("./SyntheticEvent"),l=e("fbjs/lib/getActiveElement"),p=e("./isTextInputElement"),d=e("fbjs/lib/keyOf"),f=e("fbjs/lib/shallowEqual"),h=i.topLevelTypes,v=s.canUseDOM&&"documentMode"in document&&document.documentMode<=11,m={select:{phasedRegistrationNames:{bubbled:d({onSelect:null}),captured:d({onSelectCapture:null})},dependencies:[h.topBlur,h.topContextMenu,h.topFocus,h.topKeyDown,h.topMouseDown,h.topMouseUp,h.topSelectionChange]}},g=null,y=null,_=null,b=!1,E=!1,N=d({onSelect:null}),C={eventTypes:m,extractEvents:function(e,t,n,r,i){if(!E)return null;switch(e){case h.topFocus:(p(t)||"true"===t.contentEditable)&&(g=t,y=n,_=null);break;case h.topBlur:g=null,y=null,_=null;break;case h.topMouseDown:b=!0;break;case h.topContextMenu:case h.topMouseUp:return b=!1,o(r,i);case h.topSelectionChange:if(v)break;case h.topKeyDown:case h.topKeyUp:return o(r,i)}return null},didPutListener:function(e,t,n){t===N&&(E=!0)}};t.exports=C},{"./EventConstants":56,"./EventPropagators":60,"./ReactInputSelection":102,"./SyntheticEvent":134,"./isTextInputElement":162,"fbjs/lib/ExecutionEnvironment":13,"fbjs/lib/getActiveElement":22,"fbjs/lib/keyOf":31,"fbjs/lib/shallowEqual":36}],129:[function(e,t,n){"use strict";var r=Math.pow(2,53),o={createReactRootIndex:function(){return Math.ceil(Math.random()*r)}};t.exports=o},{}],130:[function(e,t,n){(function(n){"use strict";var r=e("./EventConstants"),o=e("fbjs/lib/EventListener"),i=e("./EventPropagators"),a=e("./ReactMount"),s=e("./SyntheticClipboardEvent"),u=e("./SyntheticEvent"),c=e("./SyntheticFocusEvent"),l=e("./SyntheticKeyboardEvent"),p=e("./SyntheticMouseEvent"),d=e("./SyntheticDragEvent"),f=e("./SyntheticTouchEvent"),h=e("./SyntheticUIEvent"),v=e("./SyntheticWheelEvent"),m=e("fbjs/lib/emptyFunction"),g=e("./getEventCharCode"),y=e("fbjs/lib/invariant"),_=e("fbjs/lib/keyOf"),b=r.topLevelTypes,E={abort:{phasedRegistrationNames:{bubbled:_({onAbort:!0}),captured:_({onAbortCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:_({onBlur:!0}),captured:_({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:_({onCanPlay:!0}),captured:_({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:_({onCanPlayThrough:!0}),captured:_({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:_({onClick:!0}),captured:_({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:_({onContextMenu:!0}),captured:_({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:_({onCopy:!0}),captured:_({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:_({onCut:!0}),captured:_({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:_({onDoubleClick:!0}),captured:_({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:_({onDrag:!0}),captured:_({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:_({onDragEnd:!0}),captured:_({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:_({onDragEnter:!0}),captured:_({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:_({onDragExit:!0}),captured:_({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:_({onDragLeave:!0}),captured:_({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:_({onDragOver:!0}),captured:_({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:_({onDragStart:!0}),captured:_({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:_({onDrop:!0}),captured:_({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:_({onDurationChange:!0}),captured:_({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:_({onEmptied:!0}),captured:_({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:_({onEncrypted:!0}),captured:_({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:_({onEnded:!0}),captured:_({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:_({onError:!0}),captured:_({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:_({onFocus:!0}),captured:_({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:_({onInput:!0}),captured:_({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:_({onKeyDown:!0}),captured:_({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:_({onKeyPress:!0}),captured:_({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:_({onKeyUp:!0}),captured:_({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:_({onLoad:!0}),captured:_({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:_({onLoadedData:!0}),captured:_({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:_({onLoadedMetadata:!0}),captured:_({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:_({onLoadStart:!0}),captured:_({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:_({onMouseDown:!0}),captured:_({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:_({onMouseMove:!0}),captured:_({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:_({onMouseOut:!0}),captured:_({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:_({onMouseOver:!0}),captured:_({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:_({onMouseUp:!0}),captured:_({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:_({onPaste:!0}),captured:_({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:_({onPause:!0}),captured:_({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:_({onPlay:!0}),captured:_({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:_({onPlaying:!0}),captured:_({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:_({onProgress:!0}),captured:_({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:_({onRateChange:!0}),captured:_({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:_({onReset:!0}),captured:_({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:_({onScroll:!0}),captured:_({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:_({onSeeked:!0}),captured:_({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:_({onSeeking:!0}),captured:_({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:_({onStalled:!0}),captured:_({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:_({onSubmit:!0}),captured:_({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:_({onSuspend:!0}),captured:_({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:_({onTimeUpdate:!0}),captured:_({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:_({onTouchCancel:!0}),captured:_({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:_({onTouchEnd:!0}),captured:_({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:_({onTouchMove:!0}),captured:_({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:_({onTouchStart:!0}),captured:_({onTouchStartCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:_({onVolumeChange:!0}),captured:_({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:_({onWaiting:!0}),captured:_({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:_({onWheel:!0}),captured:_({onWheelCapture:!0})}}},N={topAbort:E.abort,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,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,topVolumeChange:E.volumeChange,topWaiting:E.waiting,topWheel:E.wheel};for(var C in N)N[C].dependencies=[C];var O=_({onClick:null}),D={},R={eventTypes:E,extractEvents:function(e,t,r,o,a){var m=N[e];if(!m)return null;var _;switch(e){case b.topAbort:case b.topCanPlay:case b.topCanPlayThrough:case b.topDurationChange:case b.topEmptied:case b.topEncrypted:case b.topEnded:case b.topError:case b.topInput:case b.topLoad:case b.topLoadedData:case b.topLoadedMetadata:case b.topLoadStart:case b.topPause:case b.topPlay:case b.topPlaying:case b.topProgress:case b.topRateChange:case b.topReset:case b.topSeeked:case b.topSeeking:case b.topStalled:case b.topSubmit:case b.topSuspend:case b.topTimeUpdate:case b.topVolumeChange:case b.topWaiting:_=u;break;case b.topKeyPress:if(0===g(o))return null;case b.topKeyDown:case b.topKeyUp:_=l;break;case b.topBlur:case b.topFocus:_=c;break;case b.topClick:if(2===o.button)return null;case b.topContextMenu:case b.topDoubleClick:case b.topMouseDown:case b.topMouseMove:case b.topMouseOut:case b.topMouseOver:case b.topMouseUp:_=p;break;case b.topDrag:case b.topDragEnd:case b.topDragEnter:case b.topDragExit:case b.topDragLeave:case b.topDragOver:case b.topDragStart:case b.topDrop:_=d;break;case b.topTouchCancel:case b.topTouchEnd:case b.topTouchMove:case b.topTouchStart:_=f;break;case b.topScroll:_=h;break;case b.topWheel:_=v;break;case b.topCopy:case b.topCut:case b.topPaste:_=s}_?void 0:"production"!==n.env.NODE_ENV?y(!1,"SimpleEventPlugin: Unhandled event type, `%s`.",e):y(!1);var E=_.getPooled(m,r,o,a);return i.accumulateTwoPhaseDispatches(E),E},didPutListener:function(e,t,n){if(t===O){var r=a.getNode(e);D[e]||(D[e]=o.listen(r,"click",m))}},willDeleteListener:function(e,t){t===O&&(D[e].remove(),delete D[e])}};t.exports=R}).call(this,e("_process"))},{"./EventConstants":56,"./EventPropagators":60,"./ReactMount":107,"./SyntheticClipboardEvent":131,"./SyntheticDragEvent":133,"./SyntheticEvent":134,"./SyntheticFocusEvent":135,"./SyntheticKeyboardEvent":137,"./SyntheticMouseEvent":138,"./SyntheticTouchEvent":139,"./SyntheticUIEvent":140,"./SyntheticWheelEvent":141,"./getEventCharCode":153,_process:42,"fbjs/lib/EventListener":12,"fbjs/lib/emptyFunction":19,"fbjs/lib/invariant":27,"fbjs/lib/keyOf":31}],131:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticEvent"),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),t.exports=r},{"./SyntheticEvent":134}],132:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticEvent"),i={data:null};o.augmentClass(r,i),t.exports=r},{"./SyntheticEvent":134}],133:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticMouseEvent"),i={dataTransfer:null};o.augmentClass(r,i),t.exports=r},{"./SyntheticMouseEvent":138}],134:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];s?this[i]=s(n):"target"===i?this.target=r:this[i]=n[i]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var o=e("./PooledClass"),i=e("./Object.assign"),a=e("fbjs/lib/emptyFunction"),s=e("fbjs/lib/warning"),u={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;"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?s(e,"This synthetic event is reused for performance reasons. If you're seeing this, you're calling `preventDefault` on a released/nullified synthetic event. This is a no-op. See https://fb.me/react-event-pooling for more information."):void 0),e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?s(e,"This synthetic event is reused for performance reasons. If you're seeing this, you're calling `stopPropagation` on a released/nullified synthetic event. This is a no-op. See https://fb.me/react-event-pooling for more information."):void 0),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;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);i(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.fourArgumentPooler)},o.addPoolingTo(r,o.fourArgumentPooler),t.exports=r}).call(this,e("_process"))},{"./Object.assign":64,"./PooledClass":65,_process:42,"fbjs/lib/emptyFunction":19,"fbjs/lib/warning":38}],135:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticUIEvent"),i={relatedTarget:null};o.augmentClass(r,i),t.exports=r},{"./SyntheticUIEvent":140}],136:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticEvent"),i={data:null};o.augmentClass(r,i),t.exports=r},{"./SyntheticEvent":134}],137:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticUIEvent"),i=e("./getEventCharCode"),a=e("./getEventKey"),s=e("./getEventModifierState"),u={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?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,u),t.exports=r},{"./SyntheticUIEvent":140,"./getEventCharCode":153,"./getEventKey":154,"./getEventModifierState":155}],138:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticUIEvent"),i=e("./ViewportMetrics"),a=e("./getEventModifierState"),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+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,s),t.exports=r},{"./SyntheticUIEvent":140,"./ViewportMetrics":143,"./getEventModifierState":155}],139:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticUIEvent"),i=e("./getEventModifierState"),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),t.exports=r},{"./SyntheticUIEvent":140,"./getEventModifierState":155}],140:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticEvent"),i=e("./getEventTarget"),a={view:function(e){if(e.view)return e.view;var t=i(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}};o.augmentClass(r,a),t.exports=r},{"./SyntheticEvent":134,"./getEventTarget":156}],141:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e("./SyntheticMouseEvent"),i={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};o.augmentClass(r,i),t.exports=r},{"./SyntheticMouseEvent":138}],142:[function(e,t,n){(function(n){"use strict";var r=e("fbjs/lib/invariant"),o={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,o,i,a,s,u,c){this.isInTransaction()?"production"!==n.env.NODE_ENV?r(!1,"Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction."):r(!1):void 0;var l,p;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),p=e.call(t,o,i,a,s,u,c),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(d){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return p},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=i.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){this.isInTransaction()?void 0:"production"!==n.env.NODE_ENV?r(!1,"Transaction.closeAll(): Cannot close transaction when none are open."):r(!1);for(var t=this.transactionWrappers,o=e;o<t.length;o++){var a,s=t[o],u=this.wrapperInitData[o];try{a=!0,u!==i.OBSERVED_ERROR&&s.close&&s.close.call(this,u),a=!1}finally{if(a)try{this.closeAll(o+1)}catch(c){}}}this.wrapperInitData.length=0}},i={Mixin:o,OBSERVED_ERROR:{}};t.exports=i}).call(this,e("_process"))},{_process:42,"fbjs/lib/invariant":27}],143:[function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};t.exports=r},{}],144:[function(e,t,n){(function(n){"use strict";function r(e,t){if(null==t?"production"!==n.env.NODE_ENV?o(!1,"accumulateInto(...): Accumulated items must not be null or undefined."):o(!1):void 0,null==e)return t;var r=Array.isArray(e),i=Array.isArray(t);return r&&i?(e.push.apply(e,t),e):r?(e.push(t),e):i?[e].concat(t):[e,t]}var o=e("fbjs/lib/invariant");t.exports=r}).call(this,e("_process"))},{_process:42,"fbjs/lib/invariant":27}],145:[function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0,i=e.length,a=-4&i;a>r;){for(;r<Math.min(r+4096,a);r+=4)n+=(t+=e.charCodeAt(r))+(t+=e.charCodeAt(r+1))+(t+=e.charCodeAt(r+2))+(t+=e.charCodeAt(r+3));t%=o,n%=o}for(;i>r;r++)n+=t+=e.charCodeAt(r);return t%=o,n%=o,t|n<<16}var o=65521;t.exports=r},{}],146:[function(e,t,n){(function(e){"use strict";var n=!1;if("production"!==e.env.NODE_ENV)try{Object.defineProperty({},"x",{get:function(){}}),n=!0}catch(r){}t.exports=n}).call(this,e("_process"))},{_process:42}],147:[function(e,t,n){"use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=e("./CSSProperty"),i=o.isUnitlessNumber;t.exports=r},{"./CSSProperty":45}],148:[function(e,t,n){(function(n){"use strict";function r(e,t,r,a,s){var u=!1;if("production"!==n.env.NODE_ENV){var c=function(){return"production"!==n.env.NODE_ENV?i(u,"React.%s is deprecated. Please use %s.%s from require('%s') instead.",e,t,e,r):void 0,u=!0,s.apply(a,arguments)};return o(c,s)}return s}var o=e("./Object.assign"),i=e("fbjs/lib/warning");t.exports=r}).call(this,e("_process"))},{"./Object.assign":64,_process:42,"fbjs/lib/warning":38}],149:[function(e,t,n){"use strict";function r(e){return i[e]}function o(e){return(""+e).replace(a,r)}var i={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},a=/[&><"']/g;t.exports=o},{}],150:[function(e,t,n){(function(n){"use strict";function r(e){if("production"!==n.env.NODE_ENV){var t=o.current;null!==t&&("production"!==n.env.NODE_ENV?u(t._warnedAboutRefsInRender,"%s is accessing getDOMNode or findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",t.getName()||"A component"):void 0,t._warnedAboutRefsInRender=!0)}return null==e?null:1===e.nodeType?e:i.has(e)?a.getNodeFromInstance(e):(null!=e.render&&"function"==typeof e.render?"production"!==n.env.NODE_ENV?s(!1,"findDOMNode was called on an unmounted component."):s(!1):void 0,void("production"!==n.env.NODE_ENV?s(!1,"Element appears to be neither ReactComponent nor DOMNode (keys: %s)",Object.keys(e)):s(!1)))}var o=e("./ReactCurrentOwner"),i=e("./ReactInstanceMap"),a=e("./ReactMount"),s=e("fbjs/lib/invariant"),u=e("fbjs/lib/warning");t.exports=r}).call(this,e("_process"))},{"./ReactCurrentOwner":76,"./ReactInstanceMap":104,"./ReactMount":107,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],151:[function(e,t,n){(function(n){"use strict";function r(e,t,r){var o=e,i=void 0===o[r];"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?a(i,"flattenChildren(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",r):void 0),i&&null!=t&&(o[r]=t)}function o(e){if(null==e)return e;var t={};return i(e,r,t),t}var i=e("./traverseAllChildren"),a=e("fbjs/lib/warning");t.exports=o}).call(this,e("_process"))},{"./traverseAllChildren":169,_process:42,"fbjs/lib/warning":38}],152:[function(e,t,n){"use strict";var r=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=r},{}],153:[function(e,t,n){"use strict";function r(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}t.exports=r},{}],154:[function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=e("./getEventCharCode"),i={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"};t.exports=r},{"./getEventCharCode":153}],155:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return r?!!n[r]:!1}function o(e){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],156:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=r},{}],157:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);return"function"==typeof t?t:void 0}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},{}],158:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var n=r(e),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,t>=i&&a>=t)return{node:n,offset:t-i};i=a}n=r(o(n))}}t.exports=i},{}],159:[function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=e("fbjs/lib/ExecutionEnvironment"),i=null;t.exports=r},{"fbjs/lib/ExecutionEnvironment":13}],160:[function(e,t,n){(function(n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(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=new s(i);else if("object"==typeof e){var a=e;!a||"function"!=typeof a.type&&"string"!=typeof a.type?"production"!==n.env.NODE_ENV?l(!1,"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",null==a.type?a.type:typeof a.type,r(a._owner)):l(!1):void 0,t="string"==typeof a.type?u.createInternalComponent(a):o(a.type)?new a.type(a):new d}else"string"==typeof e||"number"==typeof e?t=u.createInstanceForText(e):"production"!==n.env.NODE_ENV?l(!1,"Encountered invalid React node of type %s",typeof e):l(!1);return"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?p("function"==typeof t.construct&&"function"==typeof t.mountComponent&&"function"==typeof t.receiveComponent&&"function"==typeof t.unmountComponent,"Only React Components can be mounted."):void 0),t.construct(e),t._mountIndex=0,t._mountImage=null,"production"!==n.env.NODE_ENV&&(t._isOwnerNecessary=!1,t._warnedAboutRefsInRender=!1),"production"!==n.env.NODE_ENV&&Object.preventExtensions&&Object.preventExtensions(t), t}var a=e("./ReactCompositeComponent"),s=e("./ReactEmptyComponent"),u=e("./ReactNativeComponent"),c=e("./Object.assign"),l=e("fbjs/lib/invariant"),p=e("fbjs/lib/warning"),d=function(){};c(d.prototype,a.Mixin,{_instantiateReactComponent:i}),t.exports=i}).call(this,e("_process"))},{"./Object.assign":64,"./ReactCompositeComponent":75,"./ReactEmptyComponent":96,"./ReactNativeComponent":110,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],161:[function(e,t,n){"use strict";function r(e,t){if(!i.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&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=e("fbjs/lib/ExecutionEnvironment");i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{"fbjs/lib/ExecutionEnvironment":13}],162:[function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&o[e.type]||"textarea"===t)}var o={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};t.exports=r},{}],163:[function(e,t,n){(function(n){"use strict";function r(e){return o.isValidElement(e)?void 0:"production"!==n.env.NODE_ENV?i(!1,"onlyChild must be passed a children with exactly one child."):i(!1),e}var o=e("./ReactElement"),i=e("fbjs/lib/invariant");t.exports=r}).call(this,e("_process"))},{"./ReactElement":94,_process:42,"fbjs/lib/invariant":27}],164:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e("./escapeTextContentForBrowser");t.exports=r},{"./escapeTextContentForBrowser":149}],165:[function(e,t,n){"use strict";var r=e("./ReactMount");t.exports=r.renderSubtreeIntoContainer},{"./ReactMount":107}],166:[function(e,t,n){"use strict";var r=e("fbjs/lib/ExecutionEnvironment"),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.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})}t.exports=a},{"fbjs/lib/ExecutionEnvironment":13}],167:[function(e,t,n){"use strict";var r=e("fbjs/lib/ExecutionEnvironment"),o=e("./escapeTextContentForBrowser"),i=e("./setInnerHTML"),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),t.exports=a},{"./escapeTextContentForBrowser":149,"./setInnerHTML":166,"fbjs/lib/ExecutionEnvironment":13}],168:[function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}t.exports=r},{}],169:[function(e,t,n){(function(n){"use strict";function r(e){return g[e]}function o(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function i(e){return(""+e).replace(y,r)}function a(e){return"$"+i(e)}function s(e,t,r,i){var u=typeof e;if(("undefined"===u||"boolean"===u)&&(e=null),null===e||"string"===u||"number"===u||l.isValidElement(e))return r(i,e,""===t?v+o(e,0):t),1;var p,g,y=0,b=""===t?v:t+m;if(Array.isArray(e))for(var E=0;E<e.length;E++)p=e[E],g=b+o(p,E),y+=s(p,g,r,i);else{var N=d(e);if(N){var C,O=N.call(e);if(N!==e.entries)for(var D=0;!(C=O.next()).done;)p=C.value,g=b+o(p,D++),y+=s(p,g,r,i);else for("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?h(_,"Using Maps as children is not yet fully supported. It is an experimental feature that might be removed. Convert it to a sequence / iterable of keyed ReactElements instead."):void 0,_=!0);!(C=O.next()).done;){var R=C.value;R&&(p=R[1],g=b+a(R[0])+m+o(p,0),y+=s(p,g,r,i))}}else if("object"===u){var w="";if("production"!==n.env.NODE_ENV&&(w=" If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons.",e._isReactElement&&(w=" It looks like you're using an element created by a different version of React. Make sure to use only one copy of React."),c.current)){var x=c.current.getName();x&&(w+=" Check the render method of `"+x+"`.")}var M=String(e);"production"!==n.env.NODE_ENV?f(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===M?"object with keys {"+Object.keys(e).join(", ")+"}":M,w):f(!1)}}return y}function u(e,t,n){return null==e?0:s(e,"",t,n)}var c=e("./ReactCurrentOwner"),l=e("./ReactElement"),p=e("./ReactInstanceHandles"),d=e("./getIteratorFn"),f=e("fbjs/lib/invariant"),h=e("fbjs/lib/warning"),v=p.SEPARATOR,m=":",g={"=":"=0",".":"=1",":":"=2"},y=/[=.:]/g,_=!1;t.exports=u}).call(this,e("_process"))},{"./ReactCurrentOwner":76,"./ReactElement":94,"./ReactInstanceHandles":103,"./getIteratorFn":157,_process:42,"fbjs/lib/invariant":27,"fbjs/lib/warning":38}],170:[function(e,t,n){(function(n){"use strict";var r=e("./Object.assign"),o=e("fbjs/lib/emptyFunction"),i=e("fbjs/lib/warning"),a=o;if("production"!==n.env.NODE_ENV){var s=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],u=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],c=u.concat(["button"]),l=["dd","dt","li","option","optgroup","p","rp","rt"],p={parentTag:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null},d=function(e,t,n){var o=r({},e||p),i={tag:t,instance:n};return-1!==u.indexOf(t)&&(o.aTagInScope=null,o.buttonTagInScope=null,o.nobrTagInScope=null),-1!==c.indexOf(t)&&(o.pTagInButtonScope=null),-1!==s.indexOf(t)&&"address"!==t&&"div"!==t&&"p"!==t&&(o.listItemTagAutoclosing=null,o.dlItemTagAutoclosing=null),o.parentTag=i,"form"===t&&(o.formTag=i),"a"===t&&(o.aTagInScope=i),"button"===t&&(o.buttonTagInScope=i),"nobr"===t&&(o.nobrTagInScope=i),"p"===t&&(o.pTagInButtonScope=i),"li"===t&&(o.listItemTagAutoclosing=i),("dd"===t||"dt"===t)&&(o.dlItemTagAutoclosing=i),o},f=function(e,t){switch(t){case"select":return"option"===e||"optgroup"===e||"#text"===e;case"optgroup":return"option"===e||"#text"===e;case"option":return"#text"===e;case"tr":return"th"===e||"td"===e||"style"===e||"script"===e||"template"===e;case"tbody":case"thead":case"tfoot":return"tr"===e||"style"===e||"script"===e||"template"===e;case"colgroup":return"col"===e||"template"===e;case"table":return"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e;case"head":return"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e;case"html":return"head"===e||"body"===e}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t;case"rp":case"rt":return-1===l.indexOf(t);case"caption":case"col":case"colgroup":case"frame":case"head":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==t}return!0},h=function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null},v=function(e){if(!e)return[];var t=[];do t.push(e);while(e=e._currentElement._owner);return t.reverse(),t},m={};a=function(e,t,r){r=r||p;var o=r.parentTag,a=o&&o.tag,s=f(e,a)?null:o,u=s?null:h(e,r),c=s||u;if(c){var l,d=c.tag,g=c.instance,y=t&&t._currentElement._owner,_=g&&g._currentElement._owner,b=v(y),E=v(_),N=Math.min(b.length,E.length),C=-1;for(l=0;N>l&&b[l]===E[l];l++)C=l;var O="(unknown)",D=b.slice(C+1).map(function(e){return e.getName()||O}),R=E.slice(C+1).map(function(e){return e.getName()||O}),w=[].concat(-1!==C?b[C].getName()||O:[],R,d,u?["..."]:[],D,e).join(" > "),x=!!s+"|"+e+"|"+d+"|"+w;if(m[x])return;if(m[x]=!0,s){var M="";"table"===d&&"tr"===e&&(M+=" Add a <tbody> to your code to match the DOM tree generated by the browser."),"production"!==n.env.NODE_ENV?i(!1,"validateDOMNesting(...): <%s> cannot appear as a child of <%s>. See %s.%s",e,d,w,M):void 0}else"production"!==n.env.NODE_ENV?i(!1,"validateDOMNesting(...): <%s> cannot appear as a descendant of <%s>. See %s.",e,d,w):void 0}},a.ancestorInfoContextKey="__validateDOMNesting_ancestorInfo$"+Math.random().toString(36).slice(2),a.updatedAncestorInfo=d,a.isTagValidInContext=function(e,t){t=t||p;var n=t.parentTag,r=n&&n.tag;return f(e,r)&&!h(e,t)}}t.exports=a}).call(this,e("_process"))},{"./Object.assign":64,_process:42,"fbjs/lib/emptyFunction":19,"fbjs/lib/warning":38}],171:[function(e,t,n){"use strict";t.exports=e("./lib/React")},{"./lib/React":66}],172:[function(e,t,n){"use strict";var r=e("../../components/wedding-pat.jsx"),o=e("../../components/navigation.jsx");e("es6-promise"),e("fetch-detector"),e("fetch-ie8"),ReactDOM.render(React.createElement(o.Navigation,{menuKey:"/scheme",currentKey:"/weddingpat"}),document.getElementById("J_Nav")),ReactDOM.render(React.createElement(r.WeddingPat,null),document.getElementById("J_Main"))},{"../../components/navigation.jsx":9,"../../components/wedding-pat.jsx":10,"es6-promise":11,"fetch-detector":39,"fetch-ie8":40}]},{},[172]);
test/react-test/post-likes.js
clbn/freefeed-react-client
import test from 'tape' import React from 'react' import PostLikes from 'src/components/post-likes' import sd from 'skin-deep' const renderLikes = (likes, omittedLikes = 0) => { const post = {omittedLikes} const tree = sd.shallowRender(React.createElement(PostLikes, {likes, post})) return tree.getRenderOutput().props.children[1].props.children } const getRenderedOmmitedLikes = (likes, omittedLikes) => { const likeList = renderLikes(likes, omittedLikes) const lastLike = likeList[likeList.length - 1] const ommitedLikesNode = lastLike.props.children[1] const ommitedLikesNumber = ommitedLikesNode.props.children[0].props.children[1].props.children[0] return ommitedLikesNumber } test('PostLikes renders all likes', t => { let likes = [] for (var i = 0; i < 6; i++) { likes.push({}) const renderedLikes = renderLikes(likes) t.equals(renderedLikes.length, likes.length) } t.end() }) test('PostLikes renders omitted likes number', t => { const ommitLikes = 10 const ommitedLikes = getRenderedOmmitedLikes([{}], ommitLikes) t.equals(ommitedLikes, ommitLikes) t.end() })
4.2.0/src/examples/WizardForm.js
erikras/redux-form-docs
import React, { Component, PropTypes } from 'react' import WizardFormFirstPage from './WizardFormFirstPage' import WizardFormSecondPage from './WizardFormSecondPage' import WizardFormThirdPage from './WizardFormThirdPage' class WizardForm extends Component { constructor(props) { super(props) // Pro tip: The best place to bind your member functions is in the component constructor this.nextPage = this.nextPage.bind(this) this.previousPage = this.previousPage.bind(this) this.state = { page: 1 } } nextPage() { this.setState({ page: this.state.page + 1 }) } previousPage() { this.setState({ page: this.state.page - 1 }) } render() { const { onSubmit } = this.props const { page } = this.state return (<div> {page === 1 && <WizardFormFirstPage onSubmit={this.nextPage}/>} {page === 2 && <WizardFormSecondPage previousPage={this.previousPage} onSubmit={this.nextPage}/>} {page === 3 && <WizardFormThirdPage previousPage={this.previousPage} onSubmit={onSubmit}/>} </div> ) } } WizardForm.propTypes = { onSubmit: PropTypes.func.isRequired } export default WizardForm
ajax/libs/react-highcharts/8.3.2/ReactHighcharts.src.js
sreym/cdnjs
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("highcharts")); else if(typeof define === 'function' && define.amd) define(["react", "highcharts"], factory); else if(typeof exports === 'object') exports["ReactHighcharts"] = factory(require("react"), require("highcharts")); else root["ReactHighcharts"] = factory(root["React"], root["Highcharts"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(1); /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; module.exports = __webpack_require__(2)('Chart', __webpack_require__(4)); /***/ }, /* 2 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = __webpack_require__(3); module.exports = function (chartType, Highcharts) { var displayName = 'Highcharts' + chartType; var result = React.createClass({ displayName: displayName, propTypes: { config: React.PropTypes.object.isRequired, isPureConfig: React.PropTypes.bool, neverReflow: React.PropTypes.bool, callback: React.PropTypes.func }, defaultProps: { callback: function callback() {} }, renderChart: function renderChart(config) { var _this = this; if (!config) { throw new Error('Config must be specified for the ' + displayName + ' component'); } var chartConfig = config.chart; this.chart = new Highcharts[chartType](_extends({}, config, { chart: _extends({}, chartConfig, { renderTo: this.refs.chart }) }), this.props.callback); global.requestAnimationFrame && requestAnimationFrame(function () { _this.chart && _this.chart.options && _this.chart.reflow(); }); }, shouldComponentUpdate: function shouldComponentUpdate(nextProps) { if (nextProps.neverReflow || nextProps.isPureConfig && this.props.config === nextProps.config) { return true; } this.renderChart(nextProps.config); return false; }, getChart: function getChart() { if (!this.chart) { throw new Error('getChart() should not be called before the component is mounted'); } return this.chart; }, componentDidMount: function componentDidMount() { this.renderChart(this.props.config); }, componentWillUnmount: function componentWillUnmount() { this.chart.destroy(); }, render: function render() { var props = this.props; props = _extends({}, props, { ref: 'chart' }); return React.createElement('div', props); } }); result.Highcharts = Highcharts; return result; }; /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, /* 3 */ /***/ function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_3__; /***/ }, /* 4 */ /***/ function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_4__; /***/ } /******/ ]) }); ;
ajax/libs/angular-google-maps/1.2.3/angular-google-maps.js
mikelambert/cdnjs
/*! angular-google-maps 1.2.3 2014-10-05 * AngularJS directives for Google Maps * git: https://github.com/nlaplante/angular-google-maps.git */ /** * @name InfoBox * @version 1.1.12 [December 11, 2012] * @author Gary Little (inspired by proof-of-concept code from Pamela Fox of Google) * @copyright Copyright 2010 Gary Little [gary at luxcentral.com] * @fileoverview InfoBox extends the Google Maps JavaScript API V3 <tt>OverlayView</tt> class. * <p> * An InfoBox behaves like a <tt>google.maps.InfoWindow</tt>, but it supports several * additional properties for advanced styling. An InfoBox can also be used as a map label. * <p> * An InfoBox also fires the same events as a <tt>google.maps.InfoWindow</tt>. */ /*! * * 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. */ /*jslint browser:true */ /*global google */ /** * @name InfoBoxOptions * @class This class represents the optional parameter passed to the {@link InfoBox} constructor. * @property {string|Node} content The content of the InfoBox (plain text or an HTML DOM node). * @property {boolean} [disableAutoPan=false] Disable auto-pan on <tt>open</tt>. * @property {number} maxWidth The maximum width (in pixels) of the InfoBox. Set to 0 if no maximum. * @property {Size} pixelOffset The offset (in pixels) from the top left corner of the InfoBox * (or the bottom left corner if the <code>alignBottom</code> property is <code>true</code>) * to the map pixel corresponding to <tt>position</tt>. * @property {LatLng} position The geographic location at which to display the InfoBox. * @property {number} zIndex The CSS z-index style value for the InfoBox. * Note: This value overrides a zIndex setting specified in the <tt>boxStyle</tt> property. * @property {string} [boxClass="infoBox"] The name of the CSS class defining the styles for the InfoBox container. * @property {Object} [boxStyle] An object literal whose properties define specific CSS * style values to be applied to the InfoBox. Style values defined here override those that may * be defined in the <code>boxClass</code> style sheet. If this property is changed after the * InfoBox has been created, all previously set styles (except those defined in the style sheet) * are removed from the InfoBox before the new style values are applied. * @property {string} closeBoxMargin The CSS margin style value for the close box. * The default is "2px" (a 2-pixel margin on all sides). * @property {string} closeBoxURL The URL of the image representing the close box. * Note: The default is the URL for Google's standard close box. * Set this property to "" if no close box is required. * @property {Size} infoBoxClearance Minimum offset (in pixels) from the InfoBox to the * map edge after an auto-pan. * @property {boolean} [isHidden=false] Hide the InfoBox on <tt>open</tt>. * [Deprecated in favor of the <tt>visible</tt> property.] * @property {boolean} [visible=true] Show the InfoBox on <tt>open</tt>. * @property {boolean} alignBottom Align the bottom left corner of the InfoBox to the <code>position</code> * location (default is <tt>false</tt> which means that the top left corner of the InfoBox is aligned). * @property {string} pane The pane where the InfoBox is to appear (default is "floatPane"). * Set the pane to "mapPane" if the InfoBox is being used as a map label. * Valid pane names are the property names for the <tt>google.maps.MapPanes</tt> object. * @property {boolean} enableEventPropagation Propagate mousedown, mousemove, mouseover, mouseout, * mouseup, click, dblclick, touchstart, touchend, touchmove, and contextmenu events in the InfoBox * (default is <tt>false</tt> to mimic the behavior of a <tt>google.maps.InfoWindow</tt>). Set * this property to <tt>true</tt> if the InfoBox is being used as a map label. */ /** * Creates an InfoBox with the options specified in {@link InfoBoxOptions}. * Call <tt>InfoBox.open</tt> to add the box to the map. * @constructor * @param {InfoBoxOptions} [opt_opts] */ function InfoBox(opt_opts) { opt_opts = opt_opts || {}; google.maps.OverlayView.apply(this, arguments); // Standard options (in common with google.maps.InfoWindow): // this.content_ = opt_opts.content || ""; this.disableAutoPan_ = opt_opts.disableAutoPan || false; this.maxWidth_ = opt_opts.maxWidth || 0; this.pixelOffset_ = opt_opts.pixelOffset || new google.maps.Size(0, 0); this.position_ = opt_opts.position || new google.maps.LatLng(0, 0); this.zIndex_ = opt_opts.zIndex || null; // Additional options (unique to InfoBox): // this.boxClass_ = opt_opts.boxClass || "infoBox"; this.boxStyle_ = opt_opts.boxStyle || {}; this.closeBoxMargin_ = opt_opts.closeBoxMargin || "2px"; this.closeBoxURL_ = opt_opts.closeBoxURL || "http://www.google.com/intl/en_us/mapfiles/close.gif"; if (opt_opts.closeBoxURL === "") { this.closeBoxURL_ = ""; } this.infoBoxClearance_ = opt_opts.infoBoxClearance || new google.maps.Size(1, 1); if (typeof opt_opts.visible === "undefined") { if (typeof opt_opts.isHidden === "undefined") { opt_opts.visible = true; } else { opt_opts.visible = !opt_opts.isHidden; } } this.isHidden_ = !opt_opts.visible; this.alignBottom_ = opt_opts.alignBottom || false; this.pane_ = opt_opts.pane || "floatPane"; this.enableEventPropagation_ = opt_opts.enableEventPropagation || false; this.div_ = null; this.closeListener_ = null; this.moveListener_ = null; this.contextListener_ = null; this.eventListeners_ = null; this.fixedWidthSet_ = null; } /* InfoBox extends OverlayView in the Google Maps API v3. */ InfoBox.prototype = new google.maps.OverlayView(); /** * Creates the DIV representing the InfoBox. * @private */ InfoBox.prototype.createInfoBoxDiv_ = function () { var i; var events; var bw; var me = this; // This handler prevents an event in the InfoBox from being passed on to the map. // var cancelHandler = function (e) { e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); } }; // This handler ignores the current event in the InfoBox and conditionally prevents // the event from being passed on to the map. It is used for the contextmenu event. // var ignoreHandler = function (e) { e.returnValue = false; if (e.preventDefault) { e.preventDefault(); } if (!me.enableEventPropagation_) { cancelHandler(e); } }; if (!this.div_) { this.div_ = document.createElement("div"); this.setBoxStyle_(); if (typeof this.content_.nodeType === "undefined") { this.div_.innerHTML = this.getCloseBoxImg_() + this.content_; } else { this.div_.innerHTML = this.getCloseBoxImg_(); this.div_.appendChild(this.content_); } // Add the InfoBox DIV to the DOM this.getPanes()[this.pane_].appendChild(this.div_); this.addClickHandler_(); if (this.div_.style.width) { this.fixedWidthSet_ = true; } else { if (this.maxWidth_ !== 0 && this.div_.offsetWidth > this.maxWidth_) { this.div_.style.width = this.maxWidth_; this.div_.style.overflow = "auto"; this.fixedWidthSet_ = true; } else { // The following code is needed to overcome problems with MSIE bw = this.getBoxWidths_(); this.div_.style.width = (this.div_.offsetWidth - bw.left - bw.right) + "px"; this.fixedWidthSet_ = false; } } this.panBox_(this.disableAutoPan_); if (!this.enableEventPropagation_) { this.eventListeners_ = []; // Cancel event propagation. // // Note: mousemove not included (to resolve Issue 152) events = ["mousedown", "mouseover", "mouseout", "mouseup", "click", "dblclick", "touchstart", "touchend", "touchmove"]; for (i = 0; i < events.length; i++) { this.eventListeners_.push(google.maps.event.addDomListener(this.div_, events[i], cancelHandler)); } // Workaround for Google bug that causes the cursor to change to a pointer // when the mouse moves over a marker underneath InfoBox. this.eventListeners_.push(google.maps.event.addDomListener(this.div_, "mouseover", function (e) { this.style.cursor = "default"; })); } this.contextListener_ = google.maps.event.addDomListener(this.div_, "contextmenu", ignoreHandler); /** * This event is fired when the DIV containing the InfoBox's content is attached to the DOM. * @name InfoBox#domready * @event */ google.maps.event.trigger(this, "domready"); } }; /** * Returns the HTML <IMG> tag for the close box. * @private */ InfoBox.prototype.getCloseBoxImg_ = function () { var img = ""; if (this.closeBoxURL_ !== "") { img = "<img"; img += " src='" + this.closeBoxURL_ + "'"; img += " align=right"; // Do this because Opera chokes on style='float: right;' img += " style='"; img += " position: relative;"; // Required by MSIE img += " cursor: pointer;"; img += " margin: " + this.closeBoxMargin_ + ";"; img += "'>"; } return img; }; /** * Adds the click handler to the InfoBox close box. * @private */ InfoBox.prototype.addClickHandler_ = function () { var closeBox; if (this.closeBoxURL_ !== "") { closeBox = this.div_.firstChild; this.closeListener_ = google.maps.event.addDomListener(closeBox, "click", this.getCloseClickHandler_()); } else { this.closeListener_ = null; } }; /** * Returns the function to call when the user clicks the close box of an InfoBox. * @private */ InfoBox.prototype.getCloseClickHandler_ = function () { var me = this; return function (e) { // 1.0.3 fix: Always prevent propagation of a close box click to the map: e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); } /** * This event is fired when the InfoBox's close box is clicked. * @name InfoBox#closeclick * @event */ google.maps.event.trigger(me, "closeclick"); me.close(); }; }; /** * Pans the map so that the InfoBox appears entirely within the map's visible area. * @private */ InfoBox.prototype.panBox_ = function (disablePan) { var map; var bounds; var xOffset = 0, yOffset = 0; if (!disablePan) { map = this.getMap(); if (map instanceof google.maps.Map) { // Only pan if attached to map, not panorama if (!map.getBounds().contains(this.position_)) { // Marker not in visible area of map, so set center // of map to the marker position first. map.setCenter(this.position_); } bounds = map.getBounds(); var mapDiv = map.getDiv(); var mapWidth = mapDiv.offsetWidth; var mapHeight = mapDiv.offsetHeight; var iwOffsetX = this.pixelOffset_.width; var iwOffsetY = this.pixelOffset_.height; var iwWidth = this.div_.offsetWidth; var iwHeight = this.div_.offsetHeight; var padX = this.infoBoxClearance_.width; var padY = this.infoBoxClearance_.height; var pixPosition = this.getProjection().fromLatLngToContainerPixel(this.position_); if (pixPosition.x < (-iwOffsetX + padX)) { xOffset = pixPosition.x + iwOffsetX - padX; } else if ((pixPosition.x + iwWidth + iwOffsetX + padX) > mapWidth) { xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth; } if (this.alignBottom_) { if (pixPosition.y < (-iwOffsetY + padY + iwHeight)) { yOffset = pixPosition.y + iwOffsetY - padY - iwHeight; } else if ((pixPosition.y + iwOffsetY + padY) > mapHeight) { yOffset = pixPosition.y + iwOffsetY + padY - mapHeight; } } else { if (pixPosition.y < (-iwOffsetY + padY)) { yOffset = pixPosition.y + iwOffsetY - padY; } else if ((pixPosition.y + iwHeight + iwOffsetY + padY) > mapHeight) { yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight; } } if (!(xOffset === 0 && yOffset === 0)) { // Move the map to the shifted center. // var c = map.getCenter(); map.panBy(xOffset, yOffset); } } } }; /** * Sets the style of the InfoBox by setting the style sheet and applying * other specific styles requested. * @private */ InfoBox.prototype.setBoxStyle_ = function () { var i, boxStyle; if (this.div_) { // Apply style values from the style sheet defined in the boxClass parameter: this.div_.className = this.boxClass_; // Clear existing inline style values: this.div_.style.cssText = ""; // Apply style values defined in the boxStyle parameter: boxStyle = this.boxStyle_; for (i in boxStyle) { if (boxStyle.hasOwnProperty(i)) { this.div_.style[i] = boxStyle[i]; } } // Fix up opacity style for benefit of MSIE: // if (typeof this.div_.style.opacity !== "undefined" && this.div_.style.opacity !== "") { this.div_.style.filter = "alpha(opacity=" + (this.div_.style.opacity * 100) + ")"; } // Apply required styles: // this.div_.style.position = "absolute"; this.div_.style.visibility = 'hidden'; if (this.zIndex_ !== null) { this.div_.style.zIndex = this.zIndex_; } } }; /** * Get the widths of the borders of the InfoBox. * @private * @return {Object} widths object (top, bottom left, right) */ InfoBox.prototype.getBoxWidths_ = function () { var computedStyle; var bw = {top: 0, bottom: 0, left: 0, right: 0}; var box = this.div_; if (document.defaultView && document.defaultView.getComputedStyle) { computedStyle = box.ownerDocument.defaultView.getComputedStyle(box, ""); if (computedStyle) { // The computed styles are always in pixel units (good!) bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0; bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0; bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0; } } else if (document.documentElement.currentStyle) { // MSIE if (box.currentStyle) { // The current styles may not be in pixel units, but assume they are (bad!) bw.top = parseInt(box.currentStyle.borderTopWidth, 10) || 0; bw.bottom = parseInt(box.currentStyle.borderBottomWidth, 10) || 0; bw.left = parseInt(box.currentStyle.borderLeftWidth, 10) || 0; bw.right = parseInt(box.currentStyle.borderRightWidth, 10) || 0; } } return bw; }; /** * Invoked when <tt>close</tt> is called. Do not call it directly. */ InfoBox.prototype.onRemove = function () { if (this.div_) { this.div_.parentNode.removeChild(this.div_); this.div_ = null; } }; /** * Draws the InfoBox based on the current map projection and zoom level. */ InfoBox.prototype.draw = function () { this.createInfoBoxDiv_(); var pixPosition = this.getProjection().fromLatLngToDivPixel(this.position_); this.div_.style.left = (pixPosition.x + this.pixelOffset_.width) + "px"; if (this.alignBottom_) { this.div_.style.bottom = -(pixPosition.y + this.pixelOffset_.height) + "px"; } else { this.div_.style.top = (pixPosition.y + this.pixelOffset_.height) + "px"; } if (this.isHidden_) { this.div_.style.visibility = 'hidden'; } else { this.div_.style.visibility = "visible"; } }; /** * Sets the options for the InfoBox. Note that changes to the <tt>maxWidth</tt>, * <tt>closeBoxMargin</tt>, <tt>closeBoxURL</tt>, and <tt>enableEventPropagation</tt> * properties have no affect until the current InfoBox is <tt>close</tt>d and a new one * is <tt>open</tt>ed. * @param {InfoBoxOptions} opt_opts */ InfoBox.prototype.setOptions = function (opt_opts) { if (typeof opt_opts.boxClass !== "undefined") { // Must be first this.boxClass_ = opt_opts.boxClass; this.setBoxStyle_(); } if (typeof opt_opts.boxStyle !== "undefined") { // Must be second this.boxStyle_ = opt_opts.boxStyle; this.setBoxStyle_(); } if (typeof opt_opts.content !== "undefined") { this.setContent(opt_opts.content); } if (typeof opt_opts.disableAutoPan !== "undefined") { this.disableAutoPan_ = opt_opts.disableAutoPan; } if (typeof opt_opts.maxWidth !== "undefined") { this.maxWidth_ = opt_opts.maxWidth; } if (typeof opt_opts.pixelOffset !== "undefined") { this.pixelOffset_ = opt_opts.pixelOffset; } if (typeof opt_opts.alignBottom !== "undefined") { this.alignBottom_ = opt_opts.alignBottom; } if (typeof opt_opts.position !== "undefined") { this.setPosition(opt_opts.position); } if (typeof opt_opts.zIndex !== "undefined") { this.setZIndex(opt_opts.zIndex); } if (typeof opt_opts.closeBoxMargin !== "undefined") { this.closeBoxMargin_ = opt_opts.closeBoxMargin; } if (typeof opt_opts.closeBoxURL !== "undefined") { this.closeBoxURL_ = opt_opts.closeBoxURL; } if (typeof opt_opts.infoBoxClearance !== "undefined") { this.infoBoxClearance_ = opt_opts.infoBoxClearance; } if (typeof opt_opts.isHidden !== "undefined") { this.isHidden_ = opt_opts.isHidden; } if (typeof opt_opts.visible !== "undefined") { this.isHidden_ = !opt_opts.visible; } if (typeof opt_opts.enableEventPropagation !== "undefined") { this.enableEventPropagation_ = opt_opts.enableEventPropagation; } if (this.div_) { this.draw(); } }; /** * Sets the content of the InfoBox. * The content can be plain text or an HTML DOM node. * @param {string|Node} content */ InfoBox.prototype.setContent = function (content) { this.content_ = content; if (this.div_) { if (this.closeListener_) { google.maps.event.removeListener(this.closeListener_); this.closeListener_ = null; } // Odd code required to make things work with MSIE. // if (!this.fixedWidthSet_) { this.div_.style.width = ""; } if (typeof content.nodeType === "undefined") { this.div_.innerHTML = this.getCloseBoxImg_() + content; } else { this.div_.innerHTML = this.getCloseBoxImg_(); this.div_.appendChild(content); } // Perverse code required to make things work with MSIE. // (Ensures the close box does, in fact, float to the right.) // if (!this.fixedWidthSet_) { this.div_.style.width = this.div_.offsetWidth + "px"; if (typeof content.nodeType === "undefined") { this.div_.innerHTML = this.getCloseBoxImg_() + content; } else { this.div_.innerHTML = this.getCloseBoxImg_(); this.div_.appendChild(content); } } this.addClickHandler_(); } /** * This event is fired when the content of the InfoBox changes. * @name InfoBox#content_changed * @event */ google.maps.event.trigger(this, "content_changed"); }; /** * Sets the geographic location of the InfoBox. * @param {LatLng} latlng */ InfoBox.prototype.setPosition = function (latlng) { this.position_ = latlng; if (this.div_) { this.draw(); } /** * This event is fired when the position of the InfoBox changes. * @name InfoBox#position_changed * @event */ google.maps.event.trigger(this, "position_changed"); }; /** * Sets the zIndex style for the InfoBox. * @param {number} index */ InfoBox.prototype.setZIndex = function (index) { this.zIndex_ = index; if (this.div_) { this.div_.style.zIndex = index; } /** * This event is fired when the zIndex of the InfoBox changes. * @name InfoBox#zindex_changed * @event */ google.maps.event.trigger(this, "zindex_changed"); }; /** * Sets the visibility of the InfoBox. * @param {boolean} isVisible */ InfoBox.prototype.setVisible = function (isVisible) { this.isHidden_ = !isVisible; if (this.div_) { this.div_.style.visibility = (this.isHidden_ ? "hidden" : "visible"); } }; /** * Returns the content of the InfoBox. * @returns {string} */ InfoBox.prototype.getContent = function () { return this.content_; }; /** * Returns the geographic location of the InfoBox. * @returns {LatLng} */ InfoBox.prototype.getPosition = function () { return this.position_; }; /** * Returns the zIndex for the InfoBox. * @returns {number} */ InfoBox.prototype.getZIndex = function () { return this.zIndex_; }; /** * Returns a flag indicating whether the InfoBox is visible. * @returns {boolean} */ InfoBox.prototype.getVisible = function () { var isVisible; if ((typeof this.getMap() === "undefined") || (this.getMap() === null)) { isVisible = false; } else { isVisible = !this.isHidden_; } return isVisible; }; /** * Shows the InfoBox. [Deprecated; use <tt>setVisible</tt> instead.] */ InfoBox.prototype.show = function () { this.isHidden_ = false; if (this.div_) { this.div_.style.visibility = "visible"; } }; /** * Hides the InfoBox. [Deprecated; use <tt>setVisible</tt> instead.] */ InfoBox.prototype.hide = function () { this.isHidden_ = true; if (this.div_) { this.div_.style.visibility = "hidden"; } }; /** * Adds the InfoBox to the specified map or Street View panorama. If <tt>anchor</tt> * (usually a <tt>google.maps.Marker</tt>) is specified, the position * of the InfoBox is set to the position of the <tt>anchor</tt>. If the * anchor is dragged to a new location, the InfoBox moves as well. * @param {Map|StreetViewPanorama} map * @param {MVCObject} [anchor] */ InfoBox.prototype.open = function (map, anchor) { var me = this; if (anchor) { this.position_ = anchor.getPosition(); this.moveListener_ = google.maps.event.addListener(anchor, "position_changed", function () { me.setPosition(this.getPosition()); }); } this.setMap(map); if (this.div_) { this.panBox_(); } }; /** * Removes the InfoBox from the map. */ InfoBox.prototype.close = function () { var i; if (this.closeListener_) { google.maps.event.removeListener(this.closeListener_); this.closeListener_ = null; } if (this.eventListeners_) { for (i = 0; i < this.eventListeners_.length; i++) { google.maps.event.removeListener(this.eventListeners_[i]); } this.eventListeners_ = null; } if (this.moveListener_) { google.maps.event.removeListener(this.moveListener_); this.moveListener_ = null; } if (this.contextListener_) { google.maps.event.removeListener(this.contextListener_); this.contextListener_ = null; } this.setMap(null); };;/** * @name MarkerClustererPlus for Google Maps V3 * @version 2.1.1 [November 4, 2013] * @author Gary Little * @fileoverview * The library creates and manages per-zoom-level clusters for large amounts of markers. * <p> * This is an enhanced V3 implementation of the * <a href="http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/" * >V2 MarkerClusterer</a> by Xiaoxi Wu. It is based on the * <a href="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/" * >V3 MarkerClusterer</a> port by Luke Mahe. MarkerClustererPlus was created by Gary Little. * <p> * v2.0 release: MarkerClustererPlus v2.0 is backward compatible with MarkerClusterer v1.0. It * adds support for the <code>ignoreHidden</code>, <code>title</code>, <code>batchSizeIE</code>, * and <code>calculator</code> properties as well as support for four more events. It also allows * greater control over the styling of the text that appears on the cluster marker. The * documentation has been significantly improved and the overall code has been simplified and * polished. Very large numbers of markers can now be managed without causing Javascript timeout * errors on Internet Explorer. Note that the name of the <code>clusterclick</code> event has been * deprecated. The new name is <code>click</code>, so please change your application code now. */ /** * 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. */ /** * @name ClusterIconStyle * @class This class represents the object for values in the <code>styles</code> array passed * to the {@link MarkerClusterer} constructor. The element in this array that is used to * style the cluster icon is determined by calling the <code>calculator</code> function. * * @property {string} url The URL of the cluster icon image file. Required. * @property {number} height The display height (in pixels) of the cluster icon. Required. * @property {number} width The display width (in pixels) of the cluster icon. Required. * @property {Array} [anchorText] The position (in pixels) from the center of the cluster icon to * where the text label is to be centered and drawn. The format is <code>[yoffset, xoffset]</code> * where <code>yoffset</code> increases as you go down from center and <code>xoffset</code> * increases to the right of center. The default is <code>[0, 0]</code>. * @property {Array} [anchorIcon] The anchor position (in pixels) of the cluster icon. This is the * spot on the cluster icon that is to be aligned with the cluster position. The format is * <code>[yoffset, xoffset]</code> where <code>yoffset</code> increases as you go down and * <code>xoffset</code> increases to the right of the top-left corner of the icon. The default * anchor position is the center of the cluster icon. * @property {string} [textColor="black"] The color of the label text shown on the * cluster icon. * @property {number} [textSize=11] The size (in pixels) of the label text shown on the * cluster icon. * @property {string} [textDecoration="none"] The value of the CSS <code>text-decoration</code> * property for the label text shown on the cluster icon. * @property {string} [fontWeight="bold"] The value of the CSS <code>font-weight</code> * property for the label text shown on the cluster icon. * @property {string} [fontStyle="normal"] The value of the CSS <code>font-style</code> * property for the label text shown on the cluster icon. * @property {string} [fontFamily="Arial,sans-serif"] The value of the CSS <code>font-family</code> * property for the label text shown on the cluster icon. * @property {string} [backgroundPosition="0 0"] The position of the cluster icon image * within the image defined by <code>url</code>. The format is <code>"xpos ypos"</code> * (the same format as for the CSS <code>background-position</code> property). You must set * this property appropriately when the image defined by <code>url</code> represents a sprite * containing multiple images. Note that the position <i>must</i> be specified in px units. */ /** * @name ClusterIconInfo * @class This class is an object containing general information about a cluster icon. This is * the object that a <code>calculator</code> function returns. * * @property {string} text The text of the label to be shown on the cluster icon. * @property {number} index The index plus 1 of the element in the <code>styles</code> * array to be used to style the cluster icon. * @property {string} title The tooltip to display when the mouse moves over the cluster icon. * If this value is <code>undefined</code> or <code>""</code>, <code>title</code> is set to the * value of the <code>title</code> property passed to the MarkerClusterer. */ /** * A cluster icon. * * @constructor * @extends google.maps.OverlayView * @param {Cluster} cluster The cluster with which the icon is to be associated. * @param {Array} [styles] An array of {@link ClusterIconStyle} defining the cluster icons * to use for various cluster sizes. * @private */ function ClusterIcon(cluster, styles) { cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView); this.cluster_ = cluster; this.className_ = cluster.getMarkerClusterer().getClusterClass(); this.styles_ = styles; this.center_ = null; this.div_ = null; this.sums_ = null; this.visible_ = false; this.setMap(cluster.getMap()); // Note: this causes onAdd to be called } /** * Adds the icon to the DOM. */ ClusterIcon.prototype.onAdd = function () { var cClusterIcon = this; var cMouseDownInCluster; var cDraggingMapByCluster; this.div_ = document.createElement("div"); this.div_.className = this.className_; if (this.visible_) { this.show(); } this.getPanes().overlayMouseTarget.appendChild(this.div_); // Fix for Issue 157 this.boundsChangedListener_ = google.maps.event.addListener(this.getMap(), "bounds_changed", function () { cDraggingMapByCluster = cMouseDownInCluster; }); google.maps.event.addDomListener(this.div_, "mousedown", function () { cMouseDownInCluster = true; cDraggingMapByCluster = false; }); google.maps.event.addDomListener(this.div_, "click", function (e) { cMouseDownInCluster = false; if (!cDraggingMapByCluster) { var theBounds; var mz; var mc = cClusterIcon.cluster_.getMarkerClusterer(); /** * This event is fired when a cluster marker is clicked. * @name MarkerClusterer#click * @param {Cluster} c The cluster that was clicked. * @event */ google.maps.event.trigger(mc, "click", cClusterIcon.cluster_); google.maps.event.trigger(mc, "clusterclick", cClusterIcon.cluster_); // deprecated name // The default click handler follows. Disable it by setting // the zoomOnClick property to false. if (mc.getZoomOnClick()) { // Zoom into the cluster. mz = mc.getMaxZoom(); theBounds = cClusterIcon.cluster_.getBounds(); mc.getMap().fitBounds(theBounds); // There is a fix for Issue 170 here: setTimeout(function () { mc.getMap().fitBounds(theBounds); // Don't zoom beyond the max zoom level if (mz !== null && (mc.getMap().getZoom() > mz)) { mc.getMap().setZoom(mz + 1); } }, 100); } // Prevent event propagation to the map: e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); } } }); google.maps.event.addDomListener(this.div_, "mouseover", function () { var mc = cClusterIcon.cluster_.getMarkerClusterer(); /** * This event is fired when the mouse moves over a cluster marker. * @name MarkerClusterer#mouseover * @param {Cluster} c The cluster that the mouse moved over. * @event */ google.maps.event.trigger(mc, "mouseover", cClusterIcon.cluster_); }); google.maps.event.addDomListener(this.div_, "mouseout", function () { var mc = cClusterIcon.cluster_.getMarkerClusterer(); /** * This event is fired when the mouse moves out of a cluster marker. * @name MarkerClusterer#mouseout * @param {Cluster} c The cluster that the mouse moved out of. * @event */ google.maps.event.trigger(mc, "mouseout", cClusterIcon.cluster_); }); }; /** * Removes the icon from the DOM. */ ClusterIcon.prototype.onRemove = function () { if (this.div_ && this.div_.parentNode) { this.hide(); google.maps.event.removeListener(this.boundsChangedListener_); google.maps.event.clearInstanceListeners(this.div_); this.div_.parentNode.removeChild(this.div_); this.div_ = null; } }; /** * Draws the icon. */ ClusterIcon.prototype.draw = function () { if (this.visible_) { var pos = this.getPosFromLatLng_(this.center_); this.div_.style.top = pos.y + "px"; this.div_.style.left = pos.x + "px"; } }; /** * Hides the icon. */ ClusterIcon.prototype.hide = function () { if (this.div_) { this.div_.style.display = "none"; } this.visible_ = false; }; /** * Positions and shows the icon. */ ClusterIcon.prototype.show = function () { if (this.div_) { var img = ""; // NOTE: values must be specified in px units var bp = this.backgroundPosition_.split(" "); var spriteH = parseInt(bp[0].trim(), 10); var spriteV = parseInt(bp[1].trim(), 10); var pos = this.getPosFromLatLng_(this.center_); this.div_.style.cssText = this.createCss(pos); img = "<img src='" + this.url_ + "' style='position: absolute; top: " + spriteV + "px; left: " + spriteH + "px; "; if (!this.cluster_.getMarkerClusterer().enableRetinaIcons_) { img += "clip: rect(" + (-1 * spriteV) + "px, " + ((-1 * spriteH) + this.width_) + "px, " + ((-1 * spriteV) + this.height_) + "px, " + (-1 * spriteH) + "px);"; } img += "'>"; this.div_.innerHTML = img + "<div style='" + "position: absolute;" + "top: " + this.anchorText_[0] + "px;" + "left: " + this.anchorText_[1] + "px;" + "color: " + this.textColor_ + ";" + "font-size: " + this.textSize_ + "px;" + "font-family: " + this.fontFamily_ + ";" + "font-weight: " + this.fontWeight_ + ";" + "font-style: " + this.fontStyle_ + ";" + "text-decoration: " + this.textDecoration_ + ";" + "text-align: center;" + "width: " + this.width_ + "px;" + "line-height:" + this.height_ + "px;" + "'>" + this.sums_.text + "</div>"; if (typeof this.sums_.title === "undefined" || this.sums_.title === "") { this.div_.title = this.cluster_.getMarkerClusterer().getTitle(); } else { this.div_.title = this.sums_.title; } this.div_.style.display = ""; } this.visible_ = true; }; /** * Sets the icon styles to the appropriate element in the styles array. * * @param {ClusterIconInfo} sums The icon label text and styles index. */ ClusterIcon.prototype.useStyle = function (sums) { this.sums_ = sums; var index = Math.max(0, sums.index - 1); index = Math.min(this.styles_.length - 1, index); var style = this.styles_[index]; this.url_ = style.url; this.height_ = style.height; this.width_ = style.width; this.anchorText_ = style.anchorText || [0, 0]; this.anchorIcon_ = style.anchorIcon || [parseInt(this.height_ / 2, 10), parseInt(this.width_ / 2, 10)]; this.textColor_ = style.textColor || "black"; this.textSize_ = style.textSize || 11; this.textDecoration_ = style.textDecoration || "none"; this.fontWeight_ = style.fontWeight || "bold"; this.fontStyle_ = style.fontStyle || "normal"; this.fontFamily_ = style.fontFamily || "Arial,sans-serif"; this.backgroundPosition_ = style.backgroundPosition || "0 0"; }; /** * Sets the position at which to center the icon. * * @param {google.maps.LatLng} center The latlng to set as the center. */ ClusterIcon.prototype.setCenter = function (center) { this.center_ = center; }; /** * Creates the cssText style parameter based on the position of the icon. * * @param {google.maps.Point} pos The position of the icon. * @return {string} The CSS style text. */ ClusterIcon.prototype.createCss = function (pos) { var style = []; style.push("cursor: pointer;"); style.push("position: absolute; top: " + pos.y + "px; left: " + pos.x + "px;"); style.push("width: " + this.width_ + "px; height: " + this.height_ + "px;"); return style.join(""); }; /** * Returns the position at which to place the DIV depending on the latlng. * * @param {google.maps.LatLng} latlng The position in latlng. * @return {google.maps.Point} The position in pixels. */ ClusterIcon.prototype.getPosFromLatLng_ = function (latlng) { var pos = this.getProjection().fromLatLngToDivPixel(latlng); pos.x -= this.anchorIcon_[1]; pos.y -= this.anchorIcon_[0]; pos.x = parseInt(pos.x, 10); pos.y = parseInt(pos.y, 10); return pos; }; /** * Creates a single cluster that manages a group of proximate markers. * Used internally, do not call this constructor directly. * @constructor * @param {MarkerClusterer} mc The <code>MarkerClusterer</code> object with which this * cluster is associated. */ function Cluster(mc) { this.markerClusterer_ = mc; this.map_ = mc.getMap(); this.gridSize_ = mc.getGridSize(); this.minClusterSize_ = mc.getMinimumClusterSize(); this.averageCenter_ = mc.getAverageCenter(); this.markers_ = []; this.center_ = null; this.bounds_ = null; this.clusterIcon_ = new ClusterIcon(this, mc.getStyles()); } /** * Returns the number of markers managed by the cluster. You can call this from * a <code>click</code>, <code>mouseover</code>, or <code>mouseout</code> event handler * for the <code>MarkerClusterer</code> object. * * @return {number} The number of markers in the cluster. */ Cluster.prototype.getSize = function () { return this.markers_.length; }; /** * Returns the array of markers managed by the cluster. You can call this from * a <code>click</code>, <code>mouseover</code>, or <code>mouseout</code> event handler * for the <code>MarkerClusterer</code> object. * * @return {Array} The array of markers in the cluster. */ Cluster.prototype.getMarkers = function () { return this.markers_; }; /** * Returns the center of the cluster. You can call this from * a <code>click</code>, <code>mouseover</code>, or <code>mouseout</code> event handler * for the <code>MarkerClusterer</code> object. * * @return {google.maps.LatLng} The center of the cluster. */ Cluster.prototype.getCenter = function () { return this.center_; }; /** * Returns the map with which the cluster is associated. * * @return {google.maps.Map} The map. * @ignore */ Cluster.prototype.getMap = function () { return this.map_; }; /** * Returns the <code>MarkerClusterer</code> object with which the cluster is associated. * * @return {MarkerClusterer} The associated marker clusterer. * @ignore */ Cluster.prototype.getMarkerClusterer = function () { return this.markerClusterer_; }; /** * Returns the bounds of the cluster. * * @return {google.maps.LatLngBounds} the cluster bounds. * @ignore */ Cluster.prototype.getBounds = function () { var i; var bounds = new google.maps.LatLngBounds(this.center_, this.center_); var markers = this.getMarkers(); for (i = 0; i < markers.length; i++) { bounds.extend(markers[i].getPosition()); } return bounds; }; /** * Removes the cluster from the map. * * @ignore */ Cluster.prototype.remove = function () { this.clusterIcon_.setMap(null); this.markers_ = []; delete this.markers_; }; /** * Adds a marker to the cluster. * * @param {google.maps.Marker} marker The marker to be added. * @return {boolean} True if the marker was added. * @ignore */ Cluster.prototype.addMarker = function (marker) { var i; var mCount; var mz; if (this.isMarkerAlreadyAdded_(marker)) { return false; } if (!this.center_) { this.center_ = marker.getPosition(); this.calculateBounds_(); } else { if (this.averageCenter_) { var l = this.markers_.length + 1; var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l; var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l; this.center_ = new google.maps.LatLng(lat, lng); this.calculateBounds_(); } } marker.isAdded = true; this.markers_.push(marker); mCount = this.markers_.length; mz = this.markerClusterer_.getMaxZoom(); if (mz !== null && this.map_.getZoom() > mz) { // Zoomed in past max zoom, so show the marker. if (marker.getMap() !== this.map_) { marker.setMap(this.map_); } } else if (mCount < this.minClusterSize_) { // Min cluster size not reached so show the marker. if (marker.getMap() !== this.map_) { marker.setMap(this.map_); } } else if (mCount === this.minClusterSize_) { // Hide the markers that were showing. for (i = 0; i < mCount; i++) { this.markers_[i].setMap(null); } } else { marker.setMap(null); } this.updateIcon_(); return true; }; /** * Determines if a marker lies within the cluster's bounds. * * @param {google.maps.Marker} marker The marker to check. * @return {boolean} True if the marker lies in the bounds. * @ignore */ Cluster.prototype.isMarkerInClusterBounds = function (marker) { return this.bounds_.contains(marker.getPosition()); }; /** * Calculates the extended bounds of the cluster with the grid. */ Cluster.prototype.calculateBounds_ = function () { var bounds = new google.maps.LatLngBounds(this.center_, this.center_); this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds); }; /** * Updates the cluster icon. */ Cluster.prototype.updateIcon_ = function () { var mCount = this.markers_.length; var mz = this.markerClusterer_.getMaxZoom(); if (mz !== null && this.map_.getZoom() > mz) { this.clusterIcon_.hide(); return; } if (mCount < this.minClusterSize_) { // Min cluster size not yet reached. this.clusterIcon_.hide(); return; } var numStyles = this.markerClusterer_.getStyles().length; var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles); this.clusterIcon_.setCenter(this.center_); this.clusterIcon_.useStyle(sums); this.clusterIcon_.show(); }; /** * Determines if a marker has already been added to the cluster. * * @param {google.maps.Marker} marker The marker to check. * @return {boolean} True if the marker has already been added. */ Cluster.prototype.isMarkerAlreadyAdded_ = function (marker) { var i; if (this.markers_.indexOf) { return this.markers_.indexOf(marker) !== -1; } else { for (i = 0; i < this.markers_.length; i++) { if (marker === this.markers_[i]) { return true; } } } return false; }; /** * @name MarkerClustererOptions * @class This class represents the optional parameter passed to * the {@link MarkerClusterer} constructor. * @property {number} [gridSize=60] The grid size of a cluster in pixels. The grid is a square. * @property {number} [maxZoom=null] The maximum zoom level at which clustering is enabled or * <code>null</code> if clustering is to be enabled at all zoom levels. * @property {boolean} [zoomOnClick=true] Whether to zoom the map when a cluster marker is * clicked. You may want to set this to <code>false</code> if you have installed a handler * for the <code>click</code> event and it deals with zooming on its own. * @property {boolean} [averageCenter=false] Whether the position of a cluster marker should be * the average position of all markers in the cluster. If set to <code>false</code>, the * cluster marker is positioned at the location of the first marker added to the cluster. * @property {number} [minimumClusterSize=2] The minimum number of markers needed in a cluster * before the markers are hidden and a cluster marker appears. * @property {boolean} [ignoreHidden=false] Whether to ignore hidden markers in clusters. You * may want to set this to <code>true</code> to ensure that hidden markers are not included * in the marker count that appears on a cluster marker (this count is the value of the * <code>text</code> property of the result returned by the default <code>calculator</code>). * If set to <code>true</code> and you change the visibility of a marker being clustered, be * sure to also call <code>MarkerClusterer.repaint()</code>. * @property {string} [title=""] The tooltip to display when the mouse moves over a cluster * marker. (Alternatively, you can use a custom <code>calculator</code> function to specify a * different tooltip for each cluster marker.) * @property {function} [calculator=MarkerClusterer.CALCULATOR] The function used to determine * the text to be displayed on a cluster marker and the index indicating which style to use * for the cluster marker. The input parameters for the function are (1) the array of markers * represented by a cluster marker and (2) the number of cluster icon styles. It returns a * {@link ClusterIconInfo} object. The default <code>calculator</code> returns a * <code>text</code> property which is the number of markers in the cluster and an * <code>index</code> property which is one higher than the lowest integer such that * <code>10^i</code> exceeds the number of markers in the cluster, or the size of the styles * array, whichever is less. The <code>styles</code> array element used has an index of * <code>index</code> minus 1. For example, the default <code>calculator</code> returns a * <code>text</code> value of <code>"125"</code> and an <code>index</code> of <code>3</code> * for a cluster icon representing 125 markers so the element used in the <code>styles</code> * array is <code>2</code>. A <code>calculator</code> may also return a <code>title</code> * property that contains the text of the tooltip to be used for the cluster marker. If * <code>title</code> is not defined, the tooltip is set to the value of the <code>title</code> * property for the MarkerClusterer. * @property {string} [clusterClass="cluster"] The name of the CSS class defining general styles * for the cluster markers. Use this class to define CSS styles that are not set up by the code * that processes the <code>styles</code> array. * @property {Array} [styles] An array of {@link ClusterIconStyle} elements defining the styles * of the cluster markers to be used. The element to be used to style a given cluster marker * is determined by the function defined by the <code>calculator</code> property. * The default is an array of {@link ClusterIconStyle} elements whose properties are derived * from the values for <code>imagePath</code>, <code>imageExtension</code>, and * <code>imageSizes</code>. * @property {boolean} [enableRetinaIcons=false] Whether to allow the use of cluster icons that * have sizes that are some multiple (typically double) of their actual display size. Icons such * as these look better when viewed on high-resolution monitors such as Apple's Retina displays. * Note: if this property is <code>true</code>, sprites cannot be used as cluster icons. * @property {number} [batchSize=MarkerClusterer.BATCH_SIZE] Set this property to the * number of markers to be processed in a single batch when using a browser other than * Internet Explorer (for Internet Explorer, use the batchSizeIE property instead). * @property {number} [batchSizeIE=MarkerClusterer.BATCH_SIZE_IE] When Internet Explorer is * being used, markers are processed in several batches with a small delay inserted between * each batch in an attempt to avoid Javascript timeout errors. Set this property to the * number of markers to be processed in a single batch; select as high a number as you can * without causing a timeout error in the browser. This number might need to be as low as 100 * if 15,000 markers are being managed, for example. * @property {string} [imagePath=MarkerClusterer.IMAGE_PATH] * The full URL of the root name of the group of image files to use for cluster icons. * The complete file name is of the form <code>imagePath</code>n.<code>imageExtension</code> * where n is the image file number (1, 2, etc.). * @property {string} [imageExtension=MarkerClusterer.IMAGE_EXTENSION] * The extension name for the cluster icon image files (e.g., <code>"png"</code> or * <code>"jpg"</code>). * @property {Array} [imageSizes=MarkerClusterer.IMAGE_SIZES] * An array of numbers containing the widths of the group of * <code>imagePath</code>n.<code>imageExtension</code> image files. * (The images are assumed to be square.) */ /** * Creates a MarkerClusterer object with the options specified in {@link MarkerClustererOptions}. * @constructor * @extends google.maps.OverlayView * @param {google.maps.Map} map The Google map to attach to. * @param {Array.<google.maps.Marker>} [opt_markers] The markers to be added to the cluster. * @param {MarkerClustererOptions} [opt_options] The optional parameters. */ function MarkerClusterer(map, opt_markers, opt_options) { // MarkerClusterer implements google.maps.OverlayView interface. We use the // extend function to extend MarkerClusterer with google.maps.OverlayView // because it might not always be available when the code is defined so we // look for it at the last possible moment. If it doesn't exist now then // there is no point going ahead :) this.extend(MarkerClusterer, google.maps.OverlayView); opt_markers = opt_markers || []; opt_options = opt_options || {}; this.markers_ = []; this.clusters_ = []; this.listeners_ = []; this.activeMap_ = null; this.ready_ = false; this.gridSize_ = opt_options.gridSize || 60; this.minClusterSize_ = opt_options.minimumClusterSize || 2; this.maxZoom_ = opt_options.maxZoom || null; this.styles_ = opt_options.styles || []; this.title_ = opt_options.title || ""; this.zoomOnClick_ = true; if (opt_options.zoomOnClick !== undefined) { this.zoomOnClick_ = opt_options.zoomOnClick; } this.averageCenter_ = false; if (opt_options.averageCenter !== undefined) { this.averageCenter_ = opt_options.averageCenter; } this.ignoreHidden_ = false; if (opt_options.ignoreHidden !== undefined) { this.ignoreHidden_ = opt_options.ignoreHidden; } this.enableRetinaIcons_ = false; if (opt_options.enableRetinaIcons !== undefined) { this.enableRetinaIcons_ = opt_options.enableRetinaIcons; } this.imagePath_ = opt_options.imagePath || MarkerClusterer.IMAGE_PATH; this.imageExtension_ = opt_options.imageExtension || MarkerClusterer.IMAGE_EXTENSION; this.imageSizes_ = opt_options.imageSizes || MarkerClusterer.IMAGE_SIZES; this.calculator_ = opt_options.calculator || MarkerClusterer.CALCULATOR; this.batchSize_ = opt_options.batchSize || MarkerClusterer.BATCH_SIZE; this.batchSizeIE_ = opt_options.batchSizeIE || MarkerClusterer.BATCH_SIZE_IE; this.clusterClass_ = opt_options.clusterClass || "cluster"; if (navigator.userAgent.toLowerCase().indexOf("msie") !== -1) { // Try to avoid IE timeout when processing a huge number of markers: this.batchSize_ = this.batchSizeIE_; } this.setupStyles_(); this.addMarkers(opt_markers, true); this.setMap(map); // Note: this causes onAdd to be called } /** * Implementation of the onAdd interface method. * @ignore */ MarkerClusterer.prototype.onAdd = function () { var cMarkerClusterer = this; this.activeMap_ = this.getMap(); this.ready_ = true; this.repaint(); // Add the map event listeners this.listeners_ = [ google.maps.event.addListener(this.getMap(), "zoom_changed", function () { cMarkerClusterer.resetViewport_(false); // Workaround for this Google bug: when map is at level 0 and "-" of // zoom slider is clicked, a "zoom_changed" event is fired even though // the map doesn't zoom out any further. In this situation, no "idle" // event is triggered so the cluster markers that have been removed // do not get redrawn. Same goes for a zoom in at maxZoom. if (this.getZoom() === (this.get("minZoom") || 0) || this.getZoom() === this.get("maxZoom")) { google.maps.event.trigger(this, "idle"); } }), google.maps.event.addListener(this.getMap(), "idle", function () { cMarkerClusterer.redraw_(); }) ]; }; /** * Implementation of the onRemove interface method. * Removes map event listeners and all cluster icons from the DOM. * All managed markers are also put back on the map. * @ignore */ MarkerClusterer.prototype.onRemove = function () { var i; // Put all the managed markers back on the map: for (i = 0; i < this.markers_.length; i++) { if (this.markers_[i].getMap() !== this.activeMap_) { this.markers_[i].setMap(this.activeMap_); } } // Remove all clusters: for (i = 0; i < this.clusters_.length; i++) { this.clusters_[i].remove(); } this.clusters_ = []; // Remove map event listeners: for (i = 0; i < this.listeners_.length; i++) { google.maps.event.removeListener(this.listeners_[i]); } this.listeners_ = []; this.activeMap_ = null; this.ready_ = false; }; /** * Implementation of the draw interface method. * @ignore */ MarkerClusterer.prototype.draw = function () {}; /** * Sets up the styles object. */ MarkerClusterer.prototype.setupStyles_ = function () { var i, size; if (this.styles_.length > 0) { return; } for (i = 0; i < this.imageSizes_.length; i++) { size = this.imageSizes_[i]; this.styles_.push({ url: this.imagePath_ + (i + 1) + "." + this.imageExtension_, height: size, width: size }); } }; /** * Fits the map to the bounds of the markers managed by the clusterer. */ MarkerClusterer.prototype.fitMapToMarkers = function () { var i; var markers = this.getMarkers(); var bounds = new google.maps.LatLngBounds(); for (i = 0; i < markers.length; i++) { bounds.extend(markers[i].getPosition()); } this.getMap().fitBounds(bounds); }; /** * Returns the value of the <code>gridSize</code> property. * * @return {number} The grid size. */ MarkerClusterer.prototype.getGridSize = function () { return this.gridSize_; }; /** * Sets the value of the <code>gridSize</code> property. * * @param {number} gridSize The grid size. */ MarkerClusterer.prototype.setGridSize = function (gridSize) { this.gridSize_ = gridSize; }; /** * Returns the value of the <code>minimumClusterSize</code> property. * * @return {number} The minimum cluster size. */ MarkerClusterer.prototype.getMinimumClusterSize = function () { return this.minClusterSize_; }; /** * Sets the value of the <code>minimumClusterSize</code> property. * * @param {number} minimumClusterSize The minimum cluster size. */ MarkerClusterer.prototype.setMinimumClusterSize = function (minimumClusterSize) { this.minClusterSize_ = minimumClusterSize; }; /** * Returns the value of the <code>maxZoom</code> property. * * @return {number} The maximum zoom level. */ MarkerClusterer.prototype.getMaxZoom = function () { return this.maxZoom_; }; /** * Sets the value of the <code>maxZoom</code> property. * * @param {number} maxZoom The maximum zoom level. */ MarkerClusterer.prototype.setMaxZoom = function (maxZoom) { this.maxZoom_ = maxZoom; }; /** * Returns the value of the <code>styles</code> property. * * @return {Array} The array of styles defining the cluster markers to be used. */ MarkerClusterer.prototype.getStyles = function () { return this.styles_; }; /** * Sets the value of the <code>styles</code> property. * * @param {Array.<ClusterIconStyle>} styles The array of styles to use. */ MarkerClusterer.prototype.setStyles = function (styles) { this.styles_ = styles; }; /** * Returns the value of the <code>title</code> property. * * @return {string} The content of the title text. */ MarkerClusterer.prototype.getTitle = function () { return this.title_; }; /** * Sets the value of the <code>title</code> property. * * @param {string} title The value of the title property. */ MarkerClusterer.prototype.setTitle = function (title) { this.title_ = title; }; /** * Returns the value of the <code>zoomOnClick</code> property. * * @return {boolean} True if zoomOnClick property is set. */ MarkerClusterer.prototype.getZoomOnClick = function () { return this.zoomOnClick_; }; /** * Sets the value of the <code>zoomOnClick</code> property. * * @param {boolean} zoomOnClick The value of the zoomOnClick property. */ MarkerClusterer.prototype.setZoomOnClick = function (zoomOnClick) { this.zoomOnClick_ = zoomOnClick; }; /** * Returns the value of the <code>averageCenter</code> property. * * @return {boolean} True if averageCenter property is set. */ MarkerClusterer.prototype.getAverageCenter = function () { return this.averageCenter_; }; /** * Sets the value of the <code>averageCenter</code> property. * * @param {boolean} averageCenter The value of the averageCenter property. */ MarkerClusterer.prototype.setAverageCenter = function (averageCenter) { this.averageCenter_ = averageCenter; }; /** * Returns the value of the <code>ignoreHidden</code> property. * * @return {boolean} True if ignoreHidden property is set. */ MarkerClusterer.prototype.getIgnoreHidden = function () { return this.ignoreHidden_; }; /** * Sets the value of the <code>ignoreHidden</code> property. * * @param {boolean} ignoreHidden The value of the ignoreHidden property. */ MarkerClusterer.prototype.setIgnoreHidden = function (ignoreHidden) { this.ignoreHidden_ = ignoreHidden; }; /** * Returns the value of the <code>enableRetinaIcons</code> property. * * @return {boolean} True if enableRetinaIcons property is set. */ MarkerClusterer.prototype.getEnableRetinaIcons = function () { return this.enableRetinaIcons_; }; /** * Sets the value of the <code>enableRetinaIcons</code> property. * * @param {boolean} enableRetinaIcons The value of the enableRetinaIcons property. */ MarkerClusterer.prototype.setEnableRetinaIcons = function (enableRetinaIcons) { this.enableRetinaIcons_ = enableRetinaIcons; }; /** * Returns the value of the <code>imageExtension</code> property. * * @return {string} The value of the imageExtension property. */ MarkerClusterer.prototype.getImageExtension = function () { return this.imageExtension_; }; /** * Sets the value of the <code>imageExtension</code> property. * * @param {string} imageExtension The value of the imageExtension property. */ MarkerClusterer.prototype.setImageExtension = function (imageExtension) { this.imageExtension_ = imageExtension; }; /** * Returns the value of the <code>imagePath</code> property. * * @return {string} The value of the imagePath property. */ MarkerClusterer.prototype.getImagePath = function () { return this.imagePath_; }; /** * Sets the value of the <code>imagePath</code> property. * * @param {string} imagePath The value of the imagePath property. */ MarkerClusterer.prototype.setImagePath = function (imagePath) { this.imagePath_ = imagePath; }; /** * Returns the value of the <code>imageSizes</code> property. * * @return {Array} The value of the imageSizes property. */ MarkerClusterer.prototype.getImageSizes = function () { return this.imageSizes_; }; /** * Sets the value of the <code>imageSizes</code> property. * * @param {Array} imageSizes The value of the imageSizes property. */ MarkerClusterer.prototype.setImageSizes = function (imageSizes) { this.imageSizes_ = imageSizes; }; /** * Returns the value of the <code>calculator</code> property. * * @return {function} the value of the calculator property. */ MarkerClusterer.prototype.getCalculator = function () { return this.calculator_; }; /** * Sets the value of the <code>calculator</code> property. * * @param {function(Array.<google.maps.Marker>, number)} calculator The value * of the calculator property. */ MarkerClusterer.prototype.setCalculator = function (calculator) { this.calculator_ = calculator; }; /** * Returns the value of the <code>batchSizeIE</code> property. * * @return {number} the value of the batchSizeIE property. */ MarkerClusterer.prototype.getBatchSizeIE = function () { return this.batchSizeIE_; }; /** * Sets the value of the <code>batchSizeIE</code> property. * * @param {number} batchSizeIE The value of the batchSizeIE property. */ MarkerClusterer.prototype.setBatchSizeIE = function (batchSizeIE) { this.batchSizeIE_ = batchSizeIE; }; /** * Returns the value of the <code>clusterClass</code> property. * * @return {string} the value of the clusterClass property. */ MarkerClusterer.prototype.getClusterClass = function () { return this.clusterClass_; }; /** * Sets the value of the <code>clusterClass</code> property. * * @param {string} clusterClass The value of the clusterClass property. */ MarkerClusterer.prototype.setClusterClass = function (clusterClass) { this.clusterClass_ = clusterClass; }; /** * Returns the array of markers managed by the clusterer. * * @return {Array} The array of markers managed by the clusterer. */ MarkerClusterer.prototype.getMarkers = function () { return this.markers_; }; /** * Returns the number of markers managed by the clusterer. * * @return {number} The number of markers. */ MarkerClusterer.prototype.getTotalMarkers = function () { return this.markers_.length; }; /** * Returns the current array of clusters formed by the clusterer. * * @return {Array} The array of clusters formed by the clusterer. */ MarkerClusterer.prototype.getClusters = function () { return this.clusters_; }; /** * Returns the number of clusters formed by the clusterer. * * @return {number} The number of clusters formed by the clusterer. */ MarkerClusterer.prototype.getTotalClusters = function () { return this.clusters_.length; }; /** * Adds a marker to the clusterer. The clusters are redrawn unless * <code>opt_nodraw</code> is set to <code>true</code>. * * @param {google.maps.Marker} marker The marker to add. * @param {boolean} [opt_nodraw] Set to <code>true</code> to prevent redrawing. */ MarkerClusterer.prototype.addMarker = function (marker, opt_nodraw) { this.pushMarkerTo_(marker); if (!opt_nodraw) { this.redraw_(); } }; /** * Adds an array of markers to the clusterer. The clusters are redrawn unless * <code>opt_nodraw</code> is set to <code>true</code>. * * @param {Array.<google.maps.Marker>} markers The markers to add. * @param {boolean} [opt_nodraw] Set to <code>true</code> to prevent redrawing. */ MarkerClusterer.prototype.addMarkers = function (markers, opt_nodraw) { var key; for (key in markers) { if (markers.hasOwnProperty(key)) { this.pushMarkerTo_(markers[key]); } } if (!opt_nodraw) { this.redraw_(); } }; /** * Pushes a marker to the clusterer. * * @param {google.maps.Marker} marker The marker to add. */ MarkerClusterer.prototype.pushMarkerTo_ = function (marker) { // If the marker is draggable add a listener so we can update the clusters on the dragend: if (marker.getDraggable()) { var cMarkerClusterer = this; google.maps.event.addListener(marker, "dragend", function () { if (cMarkerClusterer.ready_) { this.isAdded = false; cMarkerClusterer.repaint(); } }); } marker.isAdded = false; this.markers_.push(marker); }; /** * Removes a marker from the cluster. The clusters are redrawn unless * <code>opt_nodraw</code> is set to <code>true</code>. Returns <code>true</code> if the * marker was removed from the clusterer. * * @param {google.maps.Marker} marker The marker to remove. * @param {boolean} [opt_nodraw] Set to <code>true</code> to prevent redrawing. * @return {boolean} True if the marker was removed from the clusterer. */ MarkerClusterer.prototype.removeMarker = function (marker, opt_nodraw) { var removed = this.removeMarker_(marker); if (!opt_nodraw && removed) { this.repaint(); } return removed; }; /** * Removes an array of markers from the cluster. The clusters are redrawn unless * <code>opt_nodraw</code> is set to <code>true</code>. Returns <code>true</code> if markers * were removed from the clusterer. * * @param {Array.<google.maps.Marker>} markers The markers to remove. * @param {boolean} [opt_nodraw] Set to <code>true</code> to prevent redrawing. * @return {boolean} True if markers were removed from the clusterer. */ MarkerClusterer.prototype.removeMarkers = function (markers, opt_nodraw) { var i, r; var removed = false; for (i = 0; i < markers.length; i++) { r = this.removeMarker_(markers[i]); removed = removed || r; } if (!opt_nodraw && removed) { this.repaint(); } return removed; }; /** * Removes a marker and returns true if removed, false if not. * * @param {google.maps.Marker} marker The marker to remove * @return {boolean} Whether the marker was removed or not */ MarkerClusterer.prototype.removeMarker_ = function (marker) { var i; var index = -1; if (this.markers_.indexOf) { index = this.markers_.indexOf(marker); } else { for (i = 0; i < this.markers_.length; i++) { if (marker === this.markers_[i]) { index = i; break; } } } if (index === -1) { // Marker is not in our list of markers, so do nothing: return false; } marker.setMap(null); this.markers_.splice(index, 1); // Remove the marker from the list of managed markers return true; }; /** * Removes all clusters and markers from the map and also removes all markers * managed by the clusterer. */ MarkerClusterer.prototype.clearMarkers = function () { this.resetViewport_(true); this.markers_ = []; }; /** * Recalculates and redraws all the marker clusters from scratch. * Call this after changing any properties. */ MarkerClusterer.prototype.repaint = function () { var oldClusters = this.clusters_.slice(); this.clusters_ = []; this.resetViewport_(false); this.redraw_(); // Remove the old clusters. // Do it in a timeout to prevent blinking effect. setTimeout(function () { var i; for (i = 0; i < oldClusters.length; i++) { oldClusters[i].remove(); } }, 0); }; /** * Returns the current bounds extended by the grid size. * * @param {google.maps.LatLngBounds} bounds The bounds to extend. * @return {google.maps.LatLngBounds} The extended bounds. * @ignore */ MarkerClusterer.prototype.getExtendedBounds = function (bounds) { var projection = this.getProjection(); // Turn the bounds into latlng. var tr = new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng()); var bl = new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng()); // Convert the points to pixels and the extend out by the grid size. var trPix = projection.fromLatLngToDivPixel(tr); trPix.x += this.gridSize_; trPix.y -= this.gridSize_; var blPix = projection.fromLatLngToDivPixel(bl); blPix.x -= this.gridSize_; blPix.y += this.gridSize_; // Convert the pixel points back to LatLng var ne = projection.fromDivPixelToLatLng(trPix); var sw = projection.fromDivPixelToLatLng(blPix); // Extend the bounds to contain the new bounds. bounds.extend(ne); bounds.extend(sw); return bounds; }; /** * Redraws all the clusters. */ MarkerClusterer.prototype.redraw_ = function () { this.createClusters_(0); }; /** * Removes all clusters from the map. The markers are also removed from the map * if <code>opt_hide</code> is set to <code>true</code>. * * @param {boolean} [opt_hide] Set to <code>true</code> to also remove the markers * from the map. */ MarkerClusterer.prototype.resetViewport_ = function (opt_hide) { var i, marker; // Remove all the clusters for (i = 0; i < this.clusters_.length; i++) { this.clusters_[i].remove(); } this.clusters_ = []; // Reset the markers to not be added and to be removed from the map. for (i = 0; i < this.markers_.length; i++) { marker = this.markers_[i]; marker.isAdded = false; if (opt_hide) { marker.setMap(null); } } }; /** * Calculates the distance between two latlng locations in km. * * @param {google.maps.LatLng} p1 The first lat lng point. * @param {google.maps.LatLng} p2 The second lat lng point. * @return {number} The distance between the two points in km. * @see http://www.movable-type.co.uk/scripts/latlong.html */ MarkerClusterer.prototype.distanceBetweenPoints_ = function (p1, p2) { var R = 6371; // Radius of the Earth in km var dLat = (p2.lat() - p1.lat()) * Math.PI / 180; var dLon = (p2.lng() - p1.lng()) * Math.PI / 180; var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var d = R * c; return d; }; /** * Determines if a marker is contained in a bounds. * * @param {google.maps.Marker} marker The marker to check. * @param {google.maps.LatLngBounds} bounds The bounds to check against. * @return {boolean} True if the marker is in the bounds. */ MarkerClusterer.prototype.isMarkerInBounds_ = function (marker, bounds) { return bounds.contains(marker.getPosition()); }; /** * Adds a marker to a cluster, or creates a new cluster. * * @param {google.maps.Marker} marker The marker to add. */ MarkerClusterer.prototype.addToClosestCluster_ = function (marker) { var i, d, cluster, center; var distance = 40000; // Some large number var clusterToAddTo = null; for (i = 0; i < this.clusters_.length; i++) { cluster = this.clusters_[i]; center = cluster.getCenter(); if (center) { d = this.distanceBetweenPoints_(center, marker.getPosition()); if (d < distance) { distance = d; clusterToAddTo = cluster; } } } if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) { clusterToAddTo.addMarker(marker); } else { cluster = new Cluster(this); cluster.addMarker(marker); this.clusters_.push(cluster); } }; /** * Creates the clusters. This is done in batches to avoid timeout errors * in some browsers when there is a huge number of markers. * * @param {number} iFirst The index of the first marker in the batch of * markers to be added to clusters. */ MarkerClusterer.prototype.createClusters_ = function (iFirst) { var i, marker; var mapBounds; var cMarkerClusterer = this; if (!this.ready_) { return; } // Cancel previous batch processing if we're working on the first batch: if (iFirst === 0) { /** * This event is fired when the <code>MarkerClusterer</code> begins * clustering markers. * @name MarkerClusterer#clusteringbegin * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. * @event */ google.maps.event.trigger(this, "clusteringbegin", this); if (typeof this.timerRefStatic !== "undefined") { clearTimeout(this.timerRefStatic); delete this.timerRefStatic; } } // Get our current map view bounds. // Create a new bounds object so we don't affect the map. // // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug: if (this.getMap().getZoom() > 3) { mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), this.getMap().getBounds().getNorthEast()); } else { mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625)); } var bounds = this.getExtendedBounds(mapBounds); var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length); for (i = iFirst; i < iLast; i++) { marker = this.markers_[i]; if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) { if (!this.ignoreHidden_ || (this.ignoreHidden_ && marker.getVisible())) { this.addToClosestCluster_(marker); } } } if (iLast < this.markers_.length) { this.timerRefStatic = setTimeout(function () { cMarkerClusterer.createClusters_(iLast); }, 0); } else { delete this.timerRefStatic; /** * This event is fired when the <code>MarkerClusterer</code> stops * clustering markers. * @name MarkerClusterer#clusteringend * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. * @event */ google.maps.event.trigger(this, "clusteringend", this); } }; /** * Extends an object's prototype by another's. * * @param {Object} obj1 The object to be extended. * @param {Object} obj2 The object to extend with. * @return {Object} The new extended object. * @ignore */ MarkerClusterer.prototype.extend = function (obj1, obj2) { return (function (object) { var property; for (property in object.prototype) { this.prototype[property] = object.prototype[property]; } return this; }).apply(obj1, [obj2]); }; /** * The default function for determining the label text and style * for a cluster icon. * * @param {Array.<google.maps.Marker>} markers The array of markers represented by the cluster. * @param {number} numStyles The number of marker styles available. * @return {ClusterIconInfo} The information resource for the cluster. * @constant * @ignore */ MarkerClusterer.CALCULATOR = function (markers, numStyles) { var index = 0; var title = ""; var count = markers.length.toString(); var dv = count; while (dv !== 0) { dv = parseInt(dv / 10, 10); index++; } index = Math.min(index, numStyles); return { text: count, index: index, title: title }; }; /** * The number of markers to process in one batch. * * @type {number} * @constant */ MarkerClusterer.BATCH_SIZE = 2000; /** * The number of markers to process in one batch (IE only). * * @type {number} * @constant */ MarkerClusterer.BATCH_SIZE_IE = 500; /** * The default root name for the marker cluster images. * * @type {string} * @constant */ MarkerClusterer.IMAGE_PATH = "http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m"; /** * The default extension name for the marker cluster images. * * @type {string} * @constant */ MarkerClusterer.IMAGE_EXTENSION = "png"; /** * The default array of sizes for the marker cluster images. * * @type {Array.<number>} * @constant */ MarkerClusterer.IMAGE_SIZES = [53, 56, 66, 78, 90]; if (typeof String.prototype.trim !== 'function') { /** * IE hack since trim() doesn't exist in all browsers * @return {string} The string with removed whitespace */ String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); } } ;/** * 1.1.9-patched * @name MarkerWithLabel for V3 * @version 1.1.8 [February 26, 2013] * @author Gary Little (inspired by code from Marc Ridey of Google). * @copyright Copyright 2012 Gary Little [gary at luxcentral.com] * @fileoverview MarkerWithLabel extends the Google Maps JavaScript API V3 * <code>google.maps.Marker</code> class. * <p> * MarkerWithLabel allows you to define markers with associated labels. As you would expect, * if the marker is draggable, so too will be the label. In addition, a marker with a label * responds to all mouse events in the same manner as a regular marker. It also fires mouse * events and "property changed" events just as a regular marker would. Version 1.1 adds * support for the raiseOnDrag feature introduced in API V3.3. * <p> * If you drag a marker by its label, you can cancel the drag and return the marker to its * original position by pressing the <code>Esc</code> key. This doesn't work if you drag the marker * itself because this feature is not (yet) supported in the <code>google.maps.Marker</code> class. */ /*! * * 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. */ /*jslint browser:true */ /*global document,google */ /** * @param {Function} childCtor Child class. * @param {Function} parentCtor Parent class. */ function inherits(childCtor, parentCtor) { /** @constructor */ function tempCtor() {} tempCtor.prototype = parentCtor.prototype; childCtor.superClass_ = parentCtor.prototype; childCtor.prototype = new tempCtor(); /** @override */ childCtor.prototype.constructor = childCtor; } /** * This constructor creates a label and associates it with a marker. * It is for the private use of the MarkerWithLabel class. * @constructor * @param {Marker} marker The marker with which the label is to be associated. * @param {string} crossURL The URL of the cross image =. * @param {string} handCursor The URL of the hand cursor. * @private */ function MarkerLabel_(marker, crossURL, handCursorURL) { this.marker_ = marker; this.handCursorURL_ = marker.handCursorURL; this.labelDiv_ = document.createElement("div"); this.labelDiv_.style.cssText = "position: absolute; overflow: hidden;"; // Set up the DIV for handling mouse events in the label. This DIV forms a transparent veil // in the "overlayMouseTarget" pane, a veil that covers just the label. This is done so that // events can be captured even if the label is in the shadow of a google.maps.InfoWindow. // Code is included here to ensure the veil is always exactly the same size as the label. this.eventDiv_ = document.createElement("div"); this.eventDiv_.style.cssText = this.labelDiv_.style.cssText; // This is needed for proper behavior on MSIE: this.eventDiv_.setAttribute("onselectstart", "return false;"); this.eventDiv_.setAttribute("ondragstart", "return false;"); // Get the DIV for the "X" to be displayed when the marker is raised. this.crossDiv_ = MarkerLabel_.getSharedCross(crossURL); } inherits(MarkerLabel_, google.maps.OverlayView); /** * Returns the DIV for the cross used when dragging a marker when the * raiseOnDrag parameter set to true. One cross is shared with all markers. * @param {string} crossURL The URL of the cross image =. * @private */ MarkerLabel_.getSharedCross = function (crossURL) { var div; if (typeof MarkerLabel_.getSharedCross.crossDiv === "undefined") { div = document.createElement("img"); div.style.cssText = "position: absolute; z-index: 1000002; display: none;"; // Hopefully Google never changes the standard "X" attributes: div.style.marginLeft = "-8px"; div.style.marginTop = "-9px"; div.src = crossURL; MarkerLabel_.getSharedCross.crossDiv = div; } return MarkerLabel_.getSharedCross.crossDiv; }; /** * Adds the DIV representing the label to the DOM. This method is called * automatically when the marker's <code>setMap</code> method is called. * @private */ MarkerLabel_.prototype.onAdd = function () { var me = this; var cMouseIsDown = false; var cDraggingLabel = false; var cSavedZIndex; var cLatOffset, cLngOffset; var cIgnoreClick; var cRaiseEnabled; var cStartPosition; var cStartCenter; // Constants: var cRaiseOffset = 20; var cDraggingCursor = "url(" + this.handCursorURL_ + ")"; // Stops all processing of an event. // var cAbortEvent = function (e) { if (e.preventDefault) { e.preventDefault(); } e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); } }; var cStopBounce = function () { me.marker_.setAnimation(null); }; this.getPanes().overlayImage.appendChild(this.labelDiv_); this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_); // One cross is shared with all markers, so only add it once: if (typeof MarkerLabel_.getSharedCross.processed === "undefined") { this.getPanes().overlayImage.appendChild(this.crossDiv_); MarkerLabel_.getSharedCross.processed = true; } this.listeners_ = [ google.maps.event.addDomListener(this.eventDiv_, "mouseover", function (e) { if (me.marker_.getDraggable() || me.marker_.getClickable()) { this.style.cursor = "pointer"; google.maps.event.trigger(me.marker_, "mouseover", e); } }), google.maps.event.addDomListener(this.eventDiv_, "mouseout", function (e) { if ((me.marker_.getDraggable() || me.marker_.getClickable()) && !cDraggingLabel) { this.style.cursor = me.marker_.getCursor(); google.maps.event.trigger(me.marker_, "mouseout", e); } }), google.maps.event.addDomListener(this.eventDiv_, "mousedown", function (e) { cDraggingLabel = false; if (me.marker_.getDraggable()) { cMouseIsDown = true; this.style.cursor = cDraggingCursor; } if (me.marker_.getDraggable() || me.marker_.getClickable()) { google.maps.event.trigger(me.marker_, "mousedown", e); cAbortEvent(e); // Prevent map pan when starting a drag on a label } }), google.maps.event.addDomListener(document, "mouseup", function (mEvent) { var position; if (cMouseIsDown) { cMouseIsDown = false; me.eventDiv_.style.cursor = "pointer"; google.maps.event.trigger(me.marker_, "mouseup", mEvent); } if (cDraggingLabel) { if (cRaiseEnabled) { // Lower the marker & label position = me.getProjection().fromLatLngToDivPixel(me.marker_.getPosition()); position.y += cRaiseOffset; me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position)); // This is not the same bouncing style as when the marker portion is dragged, // but it will have to do: try { // Will fail if running Google Maps API earlier than V3.3 me.marker_.setAnimation(google.maps.Animation.BOUNCE); setTimeout(cStopBounce, 1406); } catch (e) {} } me.crossDiv_.style.display = "none"; me.marker_.setZIndex(cSavedZIndex); cIgnoreClick = true; // Set flag to ignore the click event reported after a label drag cDraggingLabel = false; mEvent.latLng = me.marker_.getPosition(); google.maps.event.trigger(me.marker_, "dragend", mEvent); } }), google.maps.event.addListener(me.marker_.getMap(), "mousemove", function (mEvent) { var position; if (cMouseIsDown) { if (cDraggingLabel) { // Change the reported location from the mouse position to the marker position: mEvent.latLng = new google.maps.LatLng(mEvent.latLng.lat() - cLatOffset, mEvent.latLng.lng() - cLngOffset); position = me.getProjection().fromLatLngToDivPixel(mEvent.latLng); if (cRaiseEnabled) { me.crossDiv_.style.left = position.x + "px"; me.crossDiv_.style.top = position.y + "px"; me.crossDiv_.style.display = ""; position.y -= cRaiseOffset; } me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position)); if (cRaiseEnabled) { // Don't raise the veil; this hack needed to make MSIE act properly me.eventDiv_.style.top = (position.y + cRaiseOffset) + "px"; } google.maps.event.trigger(me.marker_, "drag", mEvent); } else { // Calculate offsets from the click point to the marker position: cLatOffset = mEvent.latLng.lat() - me.marker_.getPosition().lat(); cLngOffset = mEvent.latLng.lng() - me.marker_.getPosition().lng(); cSavedZIndex = me.marker_.getZIndex(); cStartPosition = me.marker_.getPosition(); cStartCenter = me.marker_.getMap().getCenter(); cRaiseEnabled = me.marker_.get("raiseOnDrag"); cDraggingLabel = true; me.marker_.setZIndex(1000000); // Moves the marker & label to the foreground during a drag mEvent.latLng = me.marker_.getPosition(); google.maps.event.trigger(me.marker_, "dragstart", mEvent); } } }), google.maps.event.addDomListener(document, "keydown", function (e) { if (cDraggingLabel) { if (e.keyCode === 27) { // Esc key cRaiseEnabled = false; me.marker_.setPosition(cStartPosition); me.marker_.getMap().setCenter(cStartCenter); google.maps.event.trigger(document, "mouseup", e); } } }), google.maps.event.addDomListener(this.eventDiv_, "click", function (e) { if (me.marker_.getDraggable() || me.marker_.getClickable()) { if (cIgnoreClick) { // Ignore the click reported when a label drag ends cIgnoreClick = false; } else { google.maps.event.trigger(me.marker_, "click", e); cAbortEvent(e); // Prevent click from being passed on to map } } }), google.maps.event.addDomListener(this.eventDiv_, "dblclick", function (e) { if (me.marker_.getDraggable() || me.marker_.getClickable()) { google.maps.event.trigger(me.marker_, "dblclick", e); cAbortEvent(e); // Prevent map zoom when double-clicking on a label } }), google.maps.event.addListener(this.marker_, "dragstart", function (mEvent) { if (!cDraggingLabel) { cRaiseEnabled = this.get("raiseOnDrag"); } }), google.maps.event.addListener(this.marker_, "drag", function (mEvent) { if (!cDraggingLabel) { if (cRaiseEnabled) { me.setPosition(cRaiseOffset); // During a drag, the marker's z-index is temporarily set to 1000000 to // ensure it appears above all other markers. Also set the label's z-index // to 1000000 (plus or minus 1 depending on whether the label is supposed // to be above or below the marker). me.labelDiv_.style.zIndex = 1000000 + (this.get("labelInBackground") ? -1 : +1); } } }), google.maps.event.addListener(this.marker_, "dragend", function (mEvent) { if (!cDraggingLabel) { if (cRaiseEnabled) { me.setPosition(0); // Also restores z-index of label } } }), google.maps.event.addListener(this.marker_, "position_changed", function () { me.setPosition(); }), google.maps.event.addListener(this.marker_, "zindex_changed", function () { me.setZIndex(); }), google.maps.event.addListener(this.marker_, "visible_changed", function () { me.setVisible(); }), google.maps.event.addListener(this.marker_, "labelvisible_changed", function () { me.setVisible(); }), google.maps.event.addListener(this.marker_, "title_changed", function () { me.setTitle(); }), google.maps.event.addListener(this.marker_, "labelcontent_changed", function () { me.setContent(); }), google.maps.event.addListener(this.marker_, "labelanchor_changed", function () { me.setAnchor(); }), google.maps.event.addListener(this.marker_, "labelclass_changed", function () { me.setStyles(); }), google.maps.event.addListener(this.marker_, "labelstyle_changed", function () { me.setStyles(); }) ]; }; /** * Removes the DIV for the label from the DOM. It also removes all event handlers. * This method is called automatically when the marker's <code>setMap(null)</code> * method is called. * @private */ MarkerLabel_.prototype.onRemove = function () { var i; if (this.labelDiv_.parentNode !== null) this.labelDiv_.parentNode.removeChild(this.labelDiv_); if (this.eventDiv_.parentNode !== null) this.eventDiv_.parentNode.removeChild(this.eventDiv_); // Remove event listeners: for (i = 0; i < this.listeners_.length; i++) { google.maps.event.removeListener(this.listeners_[i]); } }; /** * Draws the label on the map. * @private */ MarkerLabel_.prototype.draw = function () { this.setContent(); this.setTitle(); this.setStyles(); }; /** * Sets the content of the label. * The content can be plain text or an HTML DOM node. * @private */ MarkerLabel_.prototype.setContent = function () { var content = this.marker_.get("labelContent"); if (typeof content.nodeType === "undefined") { this.labelDiv_.innerHTML = content; this.eventDiv_.innerHTML = this.labelDiv_.innerHTML; } else { this.labelDiv_.innerHTML = ""; // Remove current content this.labelDiv_.appendChild(content); content = content.cloneNode(true); this.eventDiv_.appendChild(content); } }; /** * Sets the content of the tool tip for the label. It is * always set to be the same as for the marker itself. * @private */ MarkerLabel_.prototype.setTitle = function () { this.eventDiv_.title = this.marker_.getTitle() || ""; }; /** * Sets the style of the label by setting the style sheet and applying * other specific styles requested. * @private */ MarkerLabel_.prototype.setStyles = function () { var i, labelStyle; // Apply style values from the style sheet defined in the labelClass parameter: this.labelDiv_.className = this.marker_.get("labelClass"); this.eventDiv_.className = this.labelDiv_.className; // Clear existing inline style values: this.labelDiv_.style.cssText = ""; this.eventDiv_.style.cssText = ""; // Apply style values defined in the labelStyle parameter: labelStyle = this.marker_.get("labelStyle"); for (i in labelStyle) { if (labelStyle.hasOwnProperty(i)) { this.labelDiv_.style[i] = labelStyle[i]; this.eventDiv_.style[i] = labelStyle[i]; } } this.setMandatoryStyles(); }; /** * Sets the mandatory styles to the DIV representing the label as well as to the * associated event DIV. This includes setting the DIV position, z-index, and visibility. * @private */ MarkerLabel_.prototype.setMandatoryStyles = function () { this.labelDiv_.style.position = "absolute"; this.labelDiv_.style.overflow = "hidden"; // Make sure the opacity setting causes the desired effect on MSIE: if (typeof this.labelDiv_.style.opacity !== "undefined" && this.labelDiv_.style.opacity !== "") { this.labelDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")\""; this.labelDiv_.style.filter = "alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")"; } this.eventDiv_.style.position = this.labelDiv_.style.position; this.eventDiv_.style.overflow = this.labelDiv_.style.overflow; this.eventDiv_.style.opacity = 0.01; // Don't use 0; DIV won't be clickable on MSIE this.eventDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=1)\""; this.eventDiv_.style.filter = "alpha(opacity=1)"; // For MSIE this.setAnchor(); this.setPosition(); // This also updates z-index, if necessary. this.setVisible(); }; /** * Sets the anchor point of the label. * @private */ MarkerLabel_.prototype.setAnchor = function () { var anchor = this.marker_.get("labelAnchor"); this.labelDiv_.style.marginLeft = -anchor.x + "px"; this.labelDiv_.style.marginTop = -anchor.y + "px"; this.eventDiv_.style.marginLeft = -anchor.x + "px"; this.eventDiv_.style.marginTop = -anchor.y + "px"; }; /** * Sets the position of the label. The z-index is also updated, if necessary. * @private */ MarkerLabel_.prototype.setPosition = function (yOffset) { var position = this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition()); if (typeof yOffset === "undefined") { yOffset = 0; } this.labelDiv_.style.left = Math.round(position.x) + "px"; this.labelDiv_.style.top = Math.round(position.y - yOffset) + "px"; this.eventDiv_.style.left = this.labelDiv_.style.left; this.eventDiv_.style.top = this.labelDiv_.style.top; this.setZIndex(); }; /** * Sets the z-index of the label. If the marker's z-index property has not been defined, the z-index * of the label is set to the vertical coordinate of the label. This is in keeping with the default * stacking order for Google Maps: markers to the south are in front of markers to the north. * @private */ MarkerLabel_.prototype.setZIndex = function () { var zAdjust = (this.marker_.get("labelInBackground") ? -1 : +1); if (typeof this.marker_.getZIndex() === "undefined") { this.labelDiv_.style.zIndex = parseInt(this.labelDiv_.style.top, 10) + zAdjust; this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex; } else { this.labelDiv_.style.zIndex = this.marker_.getZIndex() + zAdjust; this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex; } }; /** * Sets the visibility of the label. The label is visible only if the marker itself is * visible (i.e., its visible property is true) and the labelVisible property is true. * @private */ MarkerLabel_.prototype.setVisible = function () { if (this.marker_.get("labelVisible")) { this.labelDiv_.style.display = this.marker_.getVisible() ? "block" : "none"; } else { this.labelDiv_.style.display = "none"; } this.eventDiv_.style.display = this.labelDiv_.style.display; }; /** * @name MarkerWithLabelOptions * @class This class represents the optional parameter passed to the {@link MarkerWithLabel} constructor. * The properties available are the same as for <code>google.maps.Marker</code> with the addition * of the properties listed below. To change any of these additional properties after the labeled * marker has been created, call <code>google.maps.Marker.set(propertyName, propertyValue)</code>. * <p> * When any of these properties changes, a property changed event is fired. The names of these * events are derived from the name of the property and are of the form <code>propertyname_changed</code>. * For example, if the content of the label changes, a <code>labelcontent_changed</code> event * is fired. * <p> * @property {string|Node} [labelContent] The content of the label (plain text or an HTML DOM node). * @property {Point} [labelAnchor] By default, a label is drawn with its anchor point at (0,0) so * that its top left corner is positioned at the anchor point of the associated marker. Use this * property to change the anchor point of the label. For example, to center a 50px-wide label * beneath a marker, specify a <code>labelAnchor</code> of <code>google.maps.Point(25, 0)</code>. * (Note: x-values increase to the right and y-values increase to the top.) * @property {string} [labelClass] The name of the CSS class defining the styles for the label. * Note that style values for <code>position</code>, <code>overflow</code>, <code>top</code>, * <code>left</code>, <code>zIndex</code>, <code>display</code>, <code>marginLeft</code>, and * <code>marginTop</code> are ignored; these styles are for internal use only. * @property {Object} [labelStyle] An object literal whose properties define specific CSS * style values to be applied to the label. Style values defined here override those that may * be defined in the <code>labelClass</code> style sheet. If this property is changed after the * label has been created, all previously set styles (except those defined in the style sheet) * are removed from the label before the new style values are applied. * Note that style values for <code>position</code>, <code>overflow</code>, <code>top</code>, * <code>left</code>, <code>zIndex</code>, <code>display</code>, <code>marginLeft</code>, and * <code>marginTop</code> are ignored; these styles are for internal use only. * @property {boolean} [labelInBackground] A flag indicating whether a label that overlaps its * associated marker should appear in the background (i.e., in a plane below the marker). * The default is <code>false</code>, which causes the label to appear in the foreground. * @property {boolean} [labelVisible] A flag indicating whether the label is to be visible. * The default is <code>true</code>. Note that even if <code>labelVisible</code> is * <code>true</code>, the label will <i>not</i> be visible unless the associated marker is also * visible (i.e., unless the marker's <code>visible</code> property is <code>true</code>). * @property {boolean} [raiseOnDrag] A flag indicating whether the label and marker are to be * raised when the marker is dragged. The default is <code>true</code>. If a draggable marker is * being created and a version of Google Maps API earlier than V3.3 is being used, this property * must be set to <code>false</code>. * @property {boolean} [optimized] A flag indicating whether rendering is to be optimized for the * marker. <b>Important: The optimized rendering technique is not supported by MarkerWithLabel, * so the value of this parameter is always forced to <code>false</code>. * @property {string} [crossImage="http://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"] * The URL of the cross image to be displayed while dragging a marker. * @property {string} [handCursor="http://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"] * The URL of the cursor to be displayed while dragging a marker. */ /** * Creates a MarkerWithLabel with the options specified in {@link MarkerWithLabelOptions}. * @constructor * @param {MarkerWithLabelOptions} [opt_options] The optional parameters. */ function MarkerWithLabel(opt_options) { opt_options = opt_options || {}; opt_options.labelContent = opt_options.labelContent || ""; opt_options.labelAnchor = opt_options.labelAnchor || new google.maps.Point(0, 0); opt_options.labelClass = opt_options.labelClass || "markerLabels"; opt_options.labelStyle = opt_options.labelStyle || {}; opt_options.labelInBackground = opt_options.labelInBackground || false; if (typeof opt_options.labelVisible === "undefined") { opt_options.labelVisible = true; } if (typeof opt_options.raiseOnDrag === "undefined") { opt_options.raiseOnDrag = true; } if (typeof opt_options.clickable === "undefined") { opt_options.clickable = true; } if (typeof opt_options.draggable === "undefined") { opt_options.draggable = false; } if (typeof opt_options.optimized === "undefined") { opt_options.optimized = false; } opt_options.crossImage = opt_options.crossImage || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"; opt_options.handCursor = opt_options.handCursor || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"; opt_options.optimized = false; // Optimized rendering is not supported this.label = new MarkerLabel_(this, opt_options.crossImage, opt_options.handCursor); // Bind the label to the marker // Call the parent constructor. It calls Marker.setValues to initialize, so all // the new parameters are conveniently saved and can be accessed with get/set. // Marker.set triggers a property changed event (called "propertyname_changed") // that the marker label listens for in order to react to state changes. google.maps.Marker.apply(this, arguments); } inherits(MarkerWithLabel, google.maps.Marker); /** * Overrides the standard Marker setMap function. * @param {Map} theMap The map to which the marker is to be added. * @private */ MarkerWithLabel.prototype.setMap = function (theMap) { // Call the inherited function... google.maps.Marker.prototype.setMap.apply(this, arguments); // ... then deal with the label: this.label.setMap(theMap); };; /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ (function() { angular.module("google-maps.wrapped", []); angular.module("google-maps.extensions", ["google-maps.wrapped"]); angular.module("google-maps.directives.api.utils", ['google-maps.extensions']); angular.module("google-maps.directives.api.managers", []); angular.module("google-maps.directives.api.models.child", ["google-maps.directives.api.utils"]); angular.module("google-maps.directives.api.models.parent", ["google-maps.directives.api.managers", "google-maps.directives.api.models.child"]); angular.module("google-maps.directives.api", ["google-maps.directives.api.models.parent"]); angular.module("google-maps", ["google-maps.directives.api"]).factory("debounce", [ "$timeout", function($timeout) { return function(fn) { var nthCall; nthCall = 0; return function() { var argz, later, that; that = this; argz = arguments; nthCall++; later = (function(version) { return function() { if (version === nthCall) { return fn.apply(that, argz); } }; })(nthCall); return $timeout(later, 0, true); }; }; } ]); }).call(this); (function() { angular.module("google-maps.extensions").service('ExtendGWin', function() { return { init: _.once(function() { if (!(google || (typeof google !== "undefined" && google !== null ? google.maps : void 0) || (google.maps.InfoWindow != null))) { return; } google.maps.InfoWindow.prototype._open = google.maps.InfoWindow.prototype.open; google.maps.InfoWindow.prototype._close = google.maps.InfoWindow.prototype.close; google.maps.InfoWindow.prototype._isOpen = false; google.maps.InfoWindow.prototype.open = function(map, anchor) { this._isOpen = true; this._open(map, anchor); }; google.maps.InfoWindow.prototype.close = function() { this._isOpen = false; this._close(); }; google.maps.InfoWindow.prototype.isOpen = function(val) { if (val == null) { val = void 0; } if (val == null) { return this._isOpen; } else { return this._isOpen = val; } }; /* Do the same for InfoBox TODO: Clean this up so the logic is defined once, wait until develop becomes master as this will be easier */ if (!window.InfoBox) { return; } window.InfoBox.prototype._open = window.InfoBox.prototype.open; window.InfoBox.prototype._close = window.InfoBox.prototype.close; window.InfoBox.prototype._isOpen = false; window.InfoBox.prototype.open = function(map, anchor) { this._isOpen = true; this._open(map, anchor); }; window.InfoBox.prototype.close = function() { this._isOpen = false; this._close(); }; window.InfoBox.prototype.isOpen = function(val) { if (val == null) { val = void 0; } if (val == null) { return this._isOpen; } else { return this._isOpen = val; } }; MarkerLabel_.prototype.setContent = function() { var content; content = this.marker_.get("labelContent"); if (!content || _.isEqual(this.oldContent, content)) { return; } if (typeof (content != null ? content.nodeType : void 0) === "undefined") { this.labelDiv_.innerHTML = content; this.eventDiv_.innerHTML = this.labelDiv_.innerHTML; this.oldContent = content; } else { this.labelDiv_.innerHTML = ""; this.labelDiv_.appendChild(content); content = content.cloneNode(true); this.eventDiv_.appendChild(content); this.oldContent = content; } }; /* Removes the DIV for the label from the DOM. It also removes all event handlers. This method is called automatically when the marker's <code>setMap(null)</code> method is called. @private */ return MarkerLabel_.prototype.onRemove = function() { if (this.labelDiv_.parentNode != null) { this.labelDiv_.parentNode.removeChild(this.labelDiv_); } if (this.eventDiv_.parentNode != null) { this.eventDiv_.parentNode.removeChild(this.eventDiv_); } if (!this.listeners_) { return; } if (!this.listeners_.length) { return; } this.listeners_.forEach(function(l) { return google.maps.event.removeListener(l); }); }; }) }; }); }).call(this); /* Author Nick McCready Intersection of Objects if the arrays have something in common each intersecting object will be returned in an new array. */ (function() { _.intersectionObjects = function(array1, array2, comparison) { var res; if (comparison == null) { comparison = void 0; } res = _.map(array1, (function(_this) { return function(obj1) { return _.find(array2, function(obj2) { if (comparison != null) { return comparison(obj1, obj2); } else { return _.isEqual(obj1, obj2); } }); }; })(this)); return _.filter(res, function(o) { return o != null; }); }; _.containsObject = _.includeObject = function(obj, target, comparison) { if (comparison == null) { comparison = void 0; } if (obj === null) { return false; } return _.any(obj, (function(_this) { return function(value) { if (comparison != null) { return comparison(value, target); } else { return _.isEqual(value, target); } }; })(this)); }; _.differenceObjects = function(array1, array2, comparison) { if (comparison == null) { comparison = void 0; } return _.filter(array1, function(value) { return !_.containsObject(array2, value, comparison); }); }; _.withoutObjects = _.differenceObjects; _.indexOfObject = function(array, item, comparison, isSorted) { var i, length; if (array == null) { return -1; } i = 0; length = array.length; if (isSorted) { if (typeof isSorted === "number") { i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted); } else { i = _.sortedIndex(array, item); return (array[i] === item ? i : -1); } } while (i < length) { if (comparison != null) { if (comparison(array[i], item)) { return i; } } else { if (_.isEqual(array[i], item)) { return i; } } i++; } return -1; }; _["extends"] = function(arrayOfObjectsToCombine) { return _.reduce(arrayOfObjectsToCombine, function(combined, toAdd) { return _.extend(combined, toAdd); }, {}); }; _.isNullOrUndefined = function(thing) { return _.isNull(thing || _.isUndefined(thing)); }; }).call(this); (function() { String.prototype.contains = function(value, fromIndex) { return this.indexOf(value, fromIndex) !== -1; }; String.prototype.flare = function(flare) { if (flare == null) { flare = 'nggmap'; } return flare + this; }; String.prototype.ns = String.prototype.flare; }).call(this); /* Author: Nicholas McCready & jfriend00 _async handles things asynchronous-like :), to allow the UI to be free'd to do other things Code taken from http://stackoverflow.com/questions/10344498/best-way-to-iterate-over-an-array-without-blocking-the-ui The design of any funcitonality of _async is to be like lodash/underscore and replicate it but call things asynchronously underneath. Each should be sufficient for most things to be derrived from. TODO: Handle Object iteration like underscore and lodash as well.. not that important right now */ (function() { var async; async = { each: function(array, callback, doneCallBack, pausedCallBack, chunk, index, pause) { var doChunk; if (chunk == null) { chunk = 20; } if (index == null) { index = 0; } if (pause == null) { pause = 1; } if (!pause) { throw "pause (delay) must be set from _async!"; return; } if (array === void 0 || (array != null ? array.length : void 0) <= 0) { doneCallBack(); return; } doChunk = function() { var cnt, i; cnt = chunk; i = index; while (cnt-- && i < (array ? array.length : i + 1)) { callback(array[i], i); ++i; } if (array) { if (i < array.length) { index = i; if (pausedCallBack != null) { pausedCallBack(); } return setTimeout(doChunk, pause); } else { if (doneCallBack) { return doneCallBack(); } } } }; return doChunk(); }, map: function(objs, iterator, doneCallBack, pausedCallBack, chunk) { var results; results = []; if (objs == null) { return results; } return _async.each(objs, function(o) { return results.push(iterator(o)); }, function() { return doneCallBack(results); }, pausedCallBack, chunk); } }; window._async = async; angular.module("google-maps.directives.api.utils").factory("async", function() { return window._async; }); }).call(this); (function() { var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; angular.module("google-maps.directives.api.utils").factory("BaseObject", function() { var BaseObject, baseObjectKeywords; baseObjectKeywords = ['extended', 'included']; BaseObject = (function() { function BaseObject() {} BaseObject.extend = function(obj) { var key, value, _ref; for (key in obj) { value = obj[key]; if (__indexOf.call(baseObjectKeywords, key) < 0) { this[key] = value; } } if ((_ref = obj.extended) != null) { _ref.apply(this); } return this; }; BaseObject.include = function(obj) { var key, value, _ref; for (key in obj) { value = obj[key]; if (__indexOf.call(baseObjectKeywords, key) < 0) { this.prototype[key] = value; } } if ((_ref = obj.included) != null) { _ref.apply(this); } return this; }; return BaseObject; })(); return BaseObject; }); }).call(this); /* Useful function callbacks that should be defined at later time. Mainly to be used for specs to verify creation / linking. This is to lead a common design in notifying child stuff. */ (function() { angular.module("google-maps.directives.api.utils").factory("ChildEvents", function() { return { onChildCreation: function(child) {} }; }); }).call(this); (function() { angular.module("google-maps.directives.api.utils").service('CtrlHandle', [ '$q', function($q) { var CtrlHandle; return CtrlHandle = { handle: function($scope, $element) { $scope.deferred = $q.defer(); return { getScope: function() { return $scope; } }; }, mapPromise: function(scope, ctrl) { var mapScope; mapScope = ctrl.getScope(); mapScope.deferred.promise.then(function(map) { return scope.map = map; }); return mapScope.deferred.promise; } }; } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils").service("EventsHelper", [ "Logger", function($log) { return { setEvents: function(gObject, scope, model, ignores) { if (angular.isDefined(scope.events) && (scope.events != null) && angular.isObject(scope.events)) { return _.compact(_.map(scope.events, function(eventHandler, eventName) { var doIgnore; if (ignores) { doIgnore = _(ignores).contains(eventName); } if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName]) && !doIgnore) { return google.maps.event.addListener(gObject, eventName, function() { return eventHandler.apply(scope, [gObject, eventName, model, arguments]); }); } else { return $log.info("EventHelper: invalid event listener " + eventName); } })); } }, removeEvents: function(listeners) { return listeners != null ? listeners.forEach(function(l) { return google.maps.event.removeListener(l); }) : void 0; } }; } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.utils").factory("FitHelper", [ "BaseObject", "Logger", function(BaseObject, $log) { var FitHelper; return FitHelper = (function(_super) { __extends(FitHelper, _super); function FitHelper() { return FitHelper.__super__.constructor.apply(this, arguments); } FitHelper.prototype.fit = function(gMarkers, gMap) { var bounds, everSet; if (gMap && gMarkers && gMarkers.length > 0) { bounds = new google.maps.LatLngBounds(); everSet = false; return _async.each(gMarkers, (function(_this) { return function(gMarker) { if (gMarker) { if (!everSet) { everSet = true; } return bounds.extend(gMarker.getPosition()); } }; })(this), (function(_this) { return function() { if (everSet) { return gMap.fitBounds(bounds); } }; })(this)); } }; return FitHelper; })(BaseObject); } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils").service("GmapUtil", [ "Logger", "$compile", function(Logger, $compile) { var getCoords, getLatitude, getLongitude, setCoordsFromEvent, validateCoords; getLatitude = function(value) { if (Array.isArray(value) && value.length === 2) { return value[1]; } else if (angular.isDefined(value.type) && value.type === "Point") { return value.coordinates[1]; } else { return value.latitude; } }; getLongitude = function(value) { if (Array.isArray(value) && value.length === 2) { return value[0]; } else if (angular.isDefined(value.type) && value.type === "Point") { return value.coordinates[0]; } else { return value.longitude; } }; getCoords = function(value) { if (!value) { return; } if (Array.isArray(value) && value.length === 2) { return new google.maps.LatLng(value[1], value[0]); } else if (angular.isDefined(value.type) && value.type === "Point") { return new google.maps.LatLng(value.coordinates[1], value.coordinates[0]); } else { return new google.maps.LatLng(value.latitude, value.longitude); } }; setCoordsFromEvent = function(prevValue, newLatLon) { if (!prevValue) { return; } if (Array.isArray(prevValue) && prevValue.length === 2) { prevValue[1] = newLatLon.lat(); prevValue[0] = newLatLon.lng(); } else if (angular.isDefined(prevValue.type) && prevValue.type === "Point") { prevValue.coordinates[1] = newLatLon.lat(); prevValue.coordinates[0] = newLatLon.lng(); } else { prevValue.latitude = newLatLon.lat(); prevValue.longitude = newLatLon.lng(); } return prevValue; }; validateCoords = function(coords) { if (angular.isUndefined(coords)) { return false; } if (_.isArray(coords)) { if (coords.length === 2) { return true; } } else if ((coords != null) && (coords != null ? coords.type : void 0)) { if (coords.type === "Point" && _.isArray(coords.coordinates) && coords.coordinates.length === 2) { return true; } } if (coords && angular.isDefined((coords != null ? coords.latitude : void 0) && angular.isDefined(coords != null ? coords.longitude : void 0))) { return true; } return false; }; return { getLabelPositionPoint: function(anchor) { var xPos, yPos; if (anchor === void 0) { return void 0; } anchor = /^([-\d\.]+)\s([-\d\.]+)$/.exec(anchor); xPos = parseFloat(anchor[1]); yPos = parseFloat(anchor[2]); if ((xPos != null) && (yPos != null)) { return new google.maps.Point(xPos, yPos); } }, createMarkerOptions: function(coords, icon, defaults, map) { var opts; if (map == null) { map = void 0; } if (defaults == null) { defaults = {}; } opts = angular.extend({}, defaults, { position: defaults.position != null ? defaults.position : getCoords(coords), visible: defaults.visible != null ? defaults.visible : validateCoords(coords) }); if ((defaults.icon != null) || (icon != null)) { opts = angular.extend(opts, { icon: defaults.icon != null ? defaults.icon : icon }); } if (map != null) { opts.map = map; } return opts; }, createWindowOptions: function(gMarker, scope, content, defaults) { if ((content != null) && (defaults != null) && ($compile != null)) { return angular.extend({}, defaults, { content: this.buildContent(scope, defaults, content), position: defaults.position != null ? defaults.position : angular.isObject(gMarker) ? gMarker.getPosition() : getCoords(scope.coords) }); } else { if (!defaults) { Logger.error("infoWindow defaults not defined"); if (!content) { return Logger.error("infoWindow content not defined"); } } else { return defaults; } } }, buildContent: function(scope, defaults, content) { var parsed, ret; if (defaults.content != null) { ret = defaults.content; } else { if ($compile != null) { parsed = $compile(content)(scope); if (parsed.length > 0) { ret = parsed[0]; } } else { ret = content; } } return ret; }, defaultDelay: 50, isTrue: function(val) { return angular.isDefined(val) && val !== null && val === true || val === "1" || val === "y" || val === "true"; }, isFalse: function(value) { return ['false', 'FALSE', 0, 'n', 'N', 'no', 'NO'].indexOf(value) !== -1; }, getCoords: getCoords, validateCoords: validateCoords, equalCoords: function(coord1, coord2) { return getLatitude(coord1) === getLatitude(coord2) && getLongitude(coord1) === getLongitude(coord2); }, validatePath: function(path) { var array, i, polygon, trackMaxVertices; i = 0; if (angular.isUndefined(path.type)) { if (!Array.isArray(path) || path.length < 2) { return false; } while (i < path.length) { if (!((angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) || (typeof path[i].lat === "function" && typeof path[i].lng === "function"))) { return false; } i++; } return true; } else { if (angular.isUndefined(path.coordinates)) { return false; } if (path.type === "Polygon") { if (path.coordinates[0].length < 4) { return false; } array = path.coordinates[0]; } else if (path.type === "MultiPolygon") { trackMaxVertices = { max: 0, index: 0 }; _.forEach(path.coordinates, function(polygon, index) { if (polygon[0].length > this.max) { this.max = polygon[0].length; return this.index = index; } }, trackMaxVertices); polygon = path.coordinates[trackMaxVertices.index]; array = polygon[0]; if (array.length < 4) { return false; } } else if (path.type === "LineString") { if (path.coordinates.length < 2) { return false; } array = path.coordinates; } else { return false; } while (i < array.length) { if (array[i].length !== 2) { return false; } i++; } return true; } }, convertPathPoints: function(path) { var array, i, latlng, result, trackMaxVertices; i = 0; result = new google.maps.MVCArray(); if (angular.isUndefined(path.type)) { while (i < path.length) { latlng; if (angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) { latlng = new google.maps.LatLng(path[i].latitude, path[i].longitude); } else if (typeof path[i].lat === "function" && typeof path[i].lng === "function") { latlng = path[i]; } result.push(latlng); i++; } } else { array; if (path.type === "Polygon") { array = path.coordinates[0]; } else if (path.type === "MultiPolygon") { trackMaxVertices = { max: 0, index: 0 }; _.forEach(path.coordinates, function(polygon, index) { if (polygon[0].length > this.max) { this.max = polygon[0].length; return this.index = index; } }, trackMaxVertices); array = path.coordinates[trackMaxVertices.index][0]; } else if (path.type === "LineString") { array = path.coordinates; } while (i < array.length) { result.push(new google.maps.LatLng(array[i][1], array[i][0])); i++; } } return result; }, extendMapBounds: function(map, points) { var bounds, i; bounds = new google.maps.LatLngBounds(); i = 0; while (i < points.length) { bounds.extend(points.getAt(i)); i++; } return map.fitBounds(bounds); }, getPath: function(object, key) { var obj; obj = object; _.each(key.split("."), function(value) { if (obj) { return obj = obj[value]; } }); return obj; }, setCoordsFromEvent: setCoordsFromEvent }; } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils").service("IsReady".ns(), [ '$q', '$timeout', function($q, $timeout) { var ctr, promises, proms; ctr = 0; proms = []; promises = function() { return $q.all(proms); }; return { spawn: function() { var d; d = $q.defer(); proms.push(d.promise); ctr += 1; return { instance: ctr, deferred: d }; }, promises: promises, instances: function() { return ctr; }, promise: function(expect) { var d, ohCrap; if (expect == null) { expect = 1; } d = $q.defer(); ohCrap = function() { return $timeout(function() { if (ctr !== expect) { return ohCrap(); } else { return d.resolve(promises()); } }); }; ohCrap(); return d.promise; } }; } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.utils").factory("Linked", [ "BaseObject", function(BaseObject) { var Linked; Linked = (function(_super) { __extends(Linked, _super); function Linked(scope, element, attrs, ctrls) { this.scope = scope; this.element = element; this.attrs = attrs; this.ctrls = ctrls; } return Linked; })(BaseObject); return Linked; } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils").service("Logger", [ "$log", function($log) { return { doLog: false, info: function(msg) { if (this.doLog) { if ($log != null) { return $log.info(msg); } else { return console.info(msg); } } }, error: function(msg) { if (this.doLog) { if ($log != null) { return $log.error(msg); } else { return console.error(msg); } } }, warn: function(msg) { if (this.doLog) { if ($log != null) { return $log.warn(msg); } else { return console.warn(msg); } } } }; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.utils").factory("ModelKey", [ "BaseObject", "GmapUtil", function(BaseObject, GmapUtil) { var ModelKey; return ModelKey = (function(_super) { __extends(ModelKey, _super); function ModelKey(scope) { this.scope = scope; this.setIdKey = __bind(this.setIdKey, this); this.modelKeyComparison = __bind(this.modelKeyComparison, this); ModelKey.__super__.constructor.call(this); this.defaultIdKey = "id"; this.idKey = void 0; } ModelKey.prototype.evalModelHandle = function(model, modelKey) { if (model === void 0 || modelKey === void 0) { return void 0; } if (modelKey === 'self') { return model; } else { return GmapUtil.getPath(model, modelKey); } }; ModelKey.prototype.modelKeyComparison = function(model1, model2) { var scope; scope = this.scope.coords != null ? this.scope : this.parentScope; if (scope == null) { throw "No scope or parentScope set!"; } return GmapUtil.equalCoords(this.evalModelHandle(model1, scope.coords), this.evalModelHandle(model2, scope.coords)); }; ModelKey.prototype.setIdKey = function(scope) { return this.idKey = scope.idKey != null ? scope.idKey : this.defaultIdKey; }; ModelKey.prototype.setVal = function(model, key, newValue) { var thingToSet; thingToSet = this.modelOrKey(model, key); thingToSet = newValue; return model; }; ModelKey.prototype.modelOrKey = function(model, key) { var thing; thing = key !== 'self' ? model[key] : model; return thing; }; return ModelKey; })(BaseObject); } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils").factory("ModelsWatcher", [ "Logger", function(Logger) { return { figureOutState: function(idKey, scope, childObjects, comparison, callBack) { var adds, mappedScopeModelIds, removals, updates; adds = []; mappedScopeModelIds = {}; removals = []; updates = []; return _async.each(scope.models, function(m) { var child; if (m[idKey] != null) { mappedScopeModelIds[m[idKey]] = {}; if (childObjects[m[idKey]] == null) { return adds.push(m); } else { child = childObjects[m[idKey]]; if (!comparison(m, child.model)) { return updates.push({ model: m, child: child }); } } } else { return Logger.error("id missing for model " + (m.toString()) + ", can not use do comparison/insertion"); } }, (function(_this) { return function() { return _async.each(childObjects.values(), function(c) { var id; if (c == null) { Logger.error("child undefined in ModelsWatcher."); return; } if (c.model == null) { Logger.error("child.model undefined in ModelsWatcher."); return; } id = c.model[idKey]; if (mappedScopeModelIds[id] == null) { return removals.push(c); } }, function() { return callBack({ adds: adds, removals: removals, updates: updates }); }); }; })(this)); } }; } ]); }).call(this); /* Simple Object Map with a lenght property to make it easy to track length/size */ (function() { var propsToPop, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; propsToPop = ['get', 'put', 'remove', 'values', 'keys', 'length', 'push', 'didValueStateChange', 'didKeyStateChange', 'slice', 'removeAll', 'allVals', 'allKeys', 'stateChanged']; window.PropMap = (function() { function PropMap() { this.removeAll = __bind(this.removeAll, this); this.slice = __bind(this.slice, this); this.push = __bind(this.push, this); this.keys = __bind(this.keys, this); this.values = __bind(this.values, this); this.remove = __bind(this.remove, this); this.put = __bind(this.put, this); this.stateChanged = __bind(this.stateChanged, this); this.get = __bind(this.get, this); this.length = 0; this.didValueStateChange = false; this.didKeyStateChange = false; this.allVals = []; this.allKeys = []; } PropMap.prototype.get = function(key) { return this[key]; }; PropMap.prototype.stateChanged = function() { this.didValueStateChange = true; return this.didKeyStateChange = true; }; PropMap.prototype.put = function(key, value) { if (this.get(key) == null) { this.length++; } this.stateChanged(); return this[key] = value; }; PropMap.prototype.remove = function(key, isSafe) { var value; if (isSafe == null) { isSafe = false; } if (isSafe && !this.get(key)) { return void 0; } value = this[key]; delete this[key]; this.length--; this.stateChanged(); return value; }; PropMap.prototype.values = function() { var all; if (!this.didValueStateChange) { return this.allVals; } all = []; this.keys().forEach((function(_this) { return function(key) { if (_.indexOf(propsToPop, key) === -1) { return all.push(_this[key]); } }; })(this)); all; this.didValueStateChange = false; this.keys(); return this.allVals = all; }; PropMap.prototype.keys = function() { var all, keys; if (!this.didKeyStateChange) { return this.allKeys; } keys = _.keys(this); all = []; _.each(keys, (function(_this) { return function(prop) { if (_.indexOf(propsToPop, prop) === -1) { return all.push(prop); } }; })(this)); this.didKeyStateChange = false; this.values(); return this.allKeys = all; }; PropMap.prototype.push = function(obj, key) { if (key == null) { key = "key"; } return this.put(obj[key], obj); }; PropMap.prototype.slice = function() { return this.keys().map((function(_this) { return function(k) { return _this.remove(k); }; })(this)); }; PropMap.prototype.removeAll = function() { return this.slice(); }; return PropMap; })(); angular.module("google-maps.directives.api.utils").factory("PropMap", function() { return window.PropMap; }); }).call(this); (function() { angular.module("google-maps.directives.api.utils").factory("nggmap-PropertyAction", [ "Logger", function(Logger) { var PropertyAction; PropertyAction = function(setterFn, isFirstSet) { this.setIfChange = function(newVal, oldVal) { if (!_.isEqual(oldVal, newVal || isFirstSet)) { return setterFn(newVal); } }; this.sic = (function(_this) { return function(oldVal, newVal) { return _this.setIfChange(oldVal, newVal); }; })(this); return this; }; return PropertyAction; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.managers").factory("ClustererMarkerManager", [ "Logger", "FitHelper", "PropMap", function($log, FitHelper, PropMap) { var ClustererMarkerManager; ClustererMarkerManager = (function(_super) { __extends(ClustererMarkerManager, _super); function ClustererMarkerManager(gMap, opt_markers, opt_options, opt_events) { var self; this.opt_events = opt_events; this.checkSync = __bind(this.checkSync, this); this.getGMarkers = __bind(this.getGMarkers, this); this.fit = __bind(this.fit, this); this.destroy = __bind(this.destroy, this); this.clear = __bind(this.clear, this); this.draw = __bind(this.draw, this); this.removeMany = __bind(this.removeMany, this); this.remove = __bind(this.remove, this); this.addMany = __bind(this.addMany, this); this.add = __bind(this.add, this); ClustererMarkerManager.__super__.constructor.call(this); self = this; this.opt_options = opt_options; if ((opt_options != null) && opt_markers === void 0) { this.clusterer = new NgMapMarkerClusterer(gMap, void 0, opt_options); } else if ((opt_options != null) && (opt_markers != null)) { this.clusterer = new NgMapMarkerClusterer(gMap, opt_markers, opt_options); } else { this.clusterer = new NgMapMarkerClusterer(gMap); } this.propMapGMarkers = new PropMap(); this.attachEvents(this.opt_events, "opt_events"); this.clusterer.setIgnoreHidden(true); this.noDrawOnSingleAddRemoves = true; $log.info(this); } ClustererMarkerManager.prototype.checkKey = function(gMarker) { var msg; if (gMarker.key == null) { msg = "gMarker.key undefined and it is REQUIRED!!"; return Logger.error(msg); } }; ClustererMarkerManager.prototype.add = function(gMarker) { var exists; this.checkKey(gMarker); exists = this.propMapGMarkers.get(gMarker.key) != null; this.clusterer.addMarker(gMarker, this.noDrawOnSingleAddRemoves); this.propMapGMarkers.put(gMarker.key, gMarker); return this.checkSync(); }; ClustererMarkerManager.prototype.addMany = function(gMarkers) { return gMarkers.forEach((function(_this) { return function(gMarker) { return _this.add(gMarker); }; })(this)); }; ClustererMarkerManager.prototype.remove = function(gMarker) { var exists; this.checkKey(gMarker); exists = this.propMapGMarkers.get(gMarker.key); if (exists) { this.clusterer.removeMarker(gMarker, this.noDrawOnSingleAddRemoves); this.propMapGMarkers.remove(gMarker.key); } return this.checkSync(); }; ClustererMarkerManager.prototype.removeMany = function(gMarkers) { return gMarkers.forEach((function(_this) { return function(gMarker) { return _this.remove(gMarker); }; })(this)); }; ClustererMarkerManager.prototype.draw = function() { return this.clusterer.repaint(); }; ClustererMarkerManager.prototype.clear = function() { this.removeMany(this.getGMarkers()); return this.clusterer.repaint(); }; ClustererMarkerManager.prototype.attachEvents = function(options, optionsName) { var eventHandler, eventName, _results; if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { _results = []; for (eventName in options) { eventHandler = options[eventName]; if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { $log.info("" + optionsName + ": Attaching event: " + eventName + " to clusterer"); _results.push(google.maps.event.addListener(this.clusterer, eventName, options[eventName])); } else { _results.push(void 0); } } return _results; } }; ClustererMarkerManager.prototype.clearEvents = function(options) { var eventHandler, eventName, _results; if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { _results = []; for (eventName in options) { eventHandler = options[eventName]; if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { $log.info("" + optionsName + ": Clearing event: " + eventName + " to clusterer"); _results.push(google.maps.event.clearListeners(this.clusterer, eventName)); } else { _results.push(void 0); } } return _results; } }; ClustererMarkerManager.prototype.destroy = function() { this.clearEvents(this.opt_events); this.clearEvents(this.opt_internal_events); return this.clear(); }; ClustererMarkerManager.prototype.fit = function() { return ClustererMarkerManager.__super__.fit.call(this, this.getGMarkers(), this.clusterer.getMap()); }; ClustererMarkerManager.prototype.getGMarkers = function() { return this.clusterer.getMarkers().values(); }; ClustererMarkerManager.prototype.checkSync = function() { if (this.getGMarkers().length !== this.propMapGMarkers.length) { throw "GMarkers out of Sync in MarkerClusterer"; } }; return ClustererMarkerManager; })(FitHelper); return ClustererMarkerManager; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.managers").factory("MarkerManager", [ "Logger", "FitHelper", "PropMap", function(Logger, FitHelper, PropMap) { var MarkerManager; MarkerManager = (function(_super) { __extends(MarkerManager, _super); MarkerManager.include(FitHelper); function MarkerManager(gMap, opt_markers, opt_options) { this.getGMarkers = __bind(this.getGMarkers, this); this.fit = __bind(this.fit, this); this.handleOptDraw = __bind(this.handleOptDraw, this); this.clear = __bind(this.clear, this); this.draw = __bind(this.draw, this); this.removeMany = __bind(this.removeMany, this); this.remove = __bind(this.remove, this); this.addMany = __bind(this.addMany, this); this.add = __bind(this.add, this); MarkerManager.__super__.constructor.call(this); this.gMap = gMap; this.gMarkers = new PropMap(); this.$log = Logger; this.$log.info(this); } MarkerManager.prototype.add = function(gMarker, optDraw) { var exists, msg; if (optDraw == null) { optDraw = true; } if (gMarker.key == null) { msg = "gMarker.key undefined and it is REQUIRED!!"; Logger.error(msg); throw msg; } exists = (this.gMarkers.get(gMarker.key)) != null; if (!exists) { this.handleOptDraw(gMarker, optDraw, true); return this.gMarkers.put(gMarker.key, gMarker); } }; MarkerManager.prototype.addMany = function(gMarkers) { return gMarkers.forEach((function(_this) { return function(gMarker) { return _this.add(gMarker); }; })(this)); }; MarkerManager.prototype.remove = function(gMarker, optDraw) { if (optDraw == null) { optDraw = true; } this.handleOptDraw(gMarker, optDraw, false); if (this.gMarkers.get(gMarker.key)) { return this.gMarkers.remove(gMarker.key); } }; MarkerManager.prototype.removeMany = function(gMarkers) { return this.gMarkers.values().forEach((function(_this) { return function(marker) { return _this.remove(marker); }; })(this)); }; MarkerManager.prototype.draw = function() { var deletes; deletes = []; this.gMarkers.values().forEach((function(_this) { return function(gMarker) { if (!gMarker.isDrawn) { if (gMarker.doAdd) { gMarker.setMap(_this.gMap); return gMarker.isDrawn = true; } else { return deletes.push(gMarker); } } }; })(this)); return deletes.forEach((function(_this) { return function(gMarker) { gMarker.isDrawn = false; return _this.remove(gMarker, true); }; })(this)); }; MarkerManager.prototype.clear = function() { this.gMarkers.values().forEach(function(gMarker) { return gMarker.setMap(null); }); delete this.gMarkers; return this.gMarkers = new PropMap(); }; MarkerManager.prototype.handleOptDraw = function(gMarker, optDraw, doAdd) { if (optDraw === true) { if (doAdd) { gMarker.setMap(this.gMap); } else { gMarker.setMap(null); } return gMarker.isDrawn = true; } else { gMarker.isDrawn = false; return gMarker.doAdd = doAdd; } }; MarkerManager.prototype.fit = function() { return MarkerManager.__super__.fit.call(this, this.getGMarkers(), this.gMap); }; MarkerManager.prototype.getGMarkers = function() { return this.gMarkers.values(); }; return MarkerManager; })(FitHelper); return MarkerManager; } ]); }).call(this); (function() { angular.module("google-maps").factory("array-sync", [ "add-events", function(mapEvents) { return function(mapArray, scope, pathEval, pathChangedFn) { var geojsonArray, geojsonHandlers, geojsonWatcher, isSetFromScope, legacyHandlers, legacyWatcher, mapArrayListener, scopePath, watchListener; isSetFromScope = false; scopePath = scope.$eval(pathEval); if (!scope["static"]) { legacyHandlers = { set_at: function(index) { var value; if (isSetFromScope) { return; } value = mapArray.getAt(index); if (!value) { return; } if (!value.lng || !value.lat) { return scopePath[index] = value; } else { scopePath[index].latitude = value.lat(); return scopePath[index].longitude = value.lng(); } }, insert_at: function(index) { var value; if (isSetFromScope) { return; } value = mapArray.getAt(index); if (!value) { return; } if (!value.lng || !value.lat) { return scopePath.splice(index, 0, value); } else { return scopePath.splice(index, 0, { latitude: value.lat(), longitude: value.lng() }); } }, remove_at: function(index) { if (isSetFromScope) { return; } return scopePath.splice(index, 1); } }; geojsonArray; if (scopePath.type === "Polygon") { geojsonArray = scopePath.coordinates[0]; } else if (scopePath.type === "LineString") { geojsonArray = scopePath.coordinates; } geojsonHandlers = { set_at: function(index) { var value; if (isSetFromScope) { return; } value = mapArray.getAt(index); if (!value) { return; } if (!value.lng || !value.lat) { return; } geojsonArray[index][1] = value.lat(); return geojsonArray[index][0] = value.lng(); }, insert_at: function(index) { var value; if (isSetFromScope) { return; } value = mapArray.getAt(index); if (!value) { return; } if (!value.lng || !value.lat) { return; } return geojsonArray.splice(index, 0, [value.lng(), value.lat()]); }, remove_at: function(index) { if (isSetFromScope) { return; } return geojsonArray.splice(index, 1); } }; mapArrayListener = mapEvents(mapArray, angular.isUndefined(scopePath.type) ? legacyHandlers : geojsonHandlers); } legacyWatcher = function(newPath) { var changed, i, l, newLength, newValue, oldArray, oldLength, oldValue; isSetFromScope = true; oldArray = mapArray; changed = false; if (newPath) { i = 0; oldLength = oldArray.getLength(); newLength = newPath.length; l = Math.min(oldLength, newLength); newValue = void 0; while (i < l) { oldValue = oldArray.getAt(i); newValue = newPath[i]; if (typeof newValue.equals === "function") { if (!newValue.equals(oldValue)) { oldArray.setAt(i, newValue); changed = true; } } else { if ((oldValue.lat() !== newValue.latitude) || (oldValue.lng() !== newValue.longitude)) { oldArray.setAt(i, new google.maps.LatLng(newValue.latitude, newValue.longitude)); changed = true; } } i++; } while (i < newLength) { newValue = newPath[i]; if (typeof newValue.lat === "function" && typeof newValue.lng === "function") { oldArray.push(newValue); } else { oldArray.push(new google.maps.LatLng(newValue.latitude, newValue.longitude)); } changed = true; i++; } while (i < oldLength) { oldArray.pop(); changed = true; i++; } } isSetFromScope = false; if (changed) { return pathChangedFn(oldArray); } }; geojsonWatcher = function(newPath) { var array, changed, i, l, newLength, newValue, oldArray, oldLength, oldValue; isSetFromScope = true; oldArray = mapArray; changed = false; if (newPath) { array; if (scopePath.type === "Polygon") { array = newPath.coordinates[0]; } else if (scopePath.type === "LineString") { array = newPath.coordinates; } i = 0; oldLength = oldArray.getLength(); newLength = array.length; l = Math.min(oldLength, newLength); newValue = void 0; while (i < l) { oldValue = oldArray.getAt(i); newValue = array[i]; if ((oldValue.lat() !== newValue[1]) || (oldValue.lng() !== newValue[0])) { oldArray.setAt(i, new google.maps.LatLng(newValue[1], newValue[0])); changed = true; } i++; } while (i < newLength) { newValue = array[i]; oldArray.push(new google.maps.LatLng(newValue[1], newValue[0])); changed = true; i++; } while (i < oldLength) { oldArray.pop(); changed = true; i++; } } isSetFromScope = false; if (changed) { return pathChangedFn(oldArray); } }; watchListener; if (!scope["static"]) { if (angular.isUndefined(scopePath.type)) { watchListener = scope.$watchCollection(pathEval, legacyWatcher); } else { watchListener = scope.$watch(pathEval, geojsonWatcher, true); } } return function() { if (mapArrayListener) { mapArrayListener(); mapArrayListener = null; } if (watchListener) { watchListener(); return watchListener = null; } }; }; } ]); }).call(this); (function() { angular.module("google-maps").factory("add-events", [ "$timeout", function($timeout) { var addEvent, addEvents; addEvent = function(target, eventName, handler) { return google.maps.event.addListener(target, eventName, function() { handler.apply(this, arguments); return $timeout((function() {}), true); }); }; addEvents = function(target, eventName, handler) { var remove; if (handler) { return addEvent(target, eventName, handler); } remove = []; angular.forEach(eventName, function(_handler, key) { return remove.push(addEvent(target, key, _handler)); }); return function() { angular.forEach(remove, function(listener) { return google.maps.event.removeListener(listener); }); return remove = null; }; }; return addEvents; } ]); }).call(this); /* angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicholas McCready - https://twitter.com/nmccready Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawing-freehand , & http://jsfiddle.net/YsQdh/88/ */ (function() { angular.module("google-maps.directives.api.models.child").factory("DrawFreeHandChildModel", [ 'Logger', '$q', function($log, $q) { var drawFreeHand, freeHandMgr; drawFreeHand = function(map, polys, enable) { var move, poly; this.polys = polys; poly = new google.maps.Polyline({ map: map, clickable: false }); move = google.maps.event.addListener(map, 'mousemove', function(e) { return poly.getPath().push(e.latLng); }); google.maps.event.addListenerOnce(map, 'mouseup', function(e) { var path; google.maps.event.removeListener(move); path = poly.getPath(); poly.setMap(null); polys.push(new google.maps.Polygon({ map: map, path: path })); poly = null; google.maps.event.clearListeners(map.getDiv(), 'mousedown'); return enable(); }); return void 0; }; freeHandMgr = function(map) { var disableMap, enable; this.map = map; enable = (function(_this) { return function() { var _ref; if ((_ref = _this.deferred) != null) { _ref.resolve(); } return _this.map.setOptions(_this.oldOptions); }; })(this); disableMap = (function(_this) { return function() { $log.info('disabling map move'); _this.oldOptions = map.getOptions(); return _this.map.setOptions({ draggable: false, zoomControl: false, scrollwheel: false, disableDoubleClickZoom: false }); }; })(this); this.engage = (function(_this) { return function(polys) { _this.polys = polys; _this.deferred = $q.defer(); disableMap(); $log.info('DrawFreeHandChildModel is engaged (drawing).'); google.maps.event.addDomListener(_this.map.getDiv(), 'mousedown', function(e) { return drawFreeHand(_this.map, _this.polys, enable); }); return _this.deferred.promise; }; })(this); return this; }; return freeHandMgr; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.child").factory("MarkerLabelChildModel", [ "BaseObject", "GmapUtil", function(BaseObject, GmapUtil) { var MarkerLabelChildModel; MarkerLabelChildModel = (function(_super) { __extends(MarkerLabelChildModel, _super); MarkerLabelChildModel.include(GmapUtil); function MarkerLabelChildModel(gMarker, options, map) { this.destroy = __bind(this.destroy, this); this.setOptions = __bind(this.setOptions, this); var self; MarkerLabelChildModel.__super__.constructor.call(this); self = this; this.gMarker = gMarker; this.setOptions(options); this.gMarkerLabel = new MarkerLabel_(this.gMarker, options.crossImage, options.handCursor); this.gMarker.set("setMap", function(theMap) { self.gMarkerLabel.setMap(theMap); return google.maps.Marker.prototype.setMap.apply(this, arguments); }); this.gMarker.setMap(map); } MarkerLabelChildModel.prototype.setOption = function(optStr, content) { /* COMENTED CODE SHOWS AWFUL CHROME BUG in Google Maps SDK 3, still happens in version 3.16 any animation will cause markers to disappear */ return this.gMarker.set(optStr, content); }; MarkerLabelChildModel.prototype.setOptions = function(options) { var _ref, _ref1; if (options != null ? options.labelContent : void 0) { this.gMarker.set("labelContent", options.labelContent); } if (options != null ? options.labelAnchor : void 0) { this.gMarker.set("labelAnchor", this.getLabelPositionPoint(options.labelAnchor)); } this.gMarker.set("labelClass", options.labelClass || 'labels'); this.gMarker.set("labelStyle", options.labelStyle || { opacity: 100 }); this.gMarker.set("labelInBackground", options.labelInBackground || false); if (!options.labelVisible) { this.gMarker.set("labelVisible", true); } if (!options.raiseOnDrag) { this.gMarker.set("raiseOnDrag", true); } if (!options.clickable) { this.gMarker.set("clickable", true); } if (!options.draggable) { this.gMarker.set("draggable", false); } if (!options.optimized) { this.gMarker.set("optimized", false); } options.crossImage = (_ref = options.crossImage) != null ? _ref : document.location.protocol + "//maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"; return options.handCursor = (_ref1 = options.handCursor) != null ? _ref1 : document.location.protocol + "//maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"; }; MarkerLabelChildModel.prototype.destroy = function() { if ((this.gMarkerLabel.labelDiv_.parentNode != null) && (this.gMarkerLabel.eventDiv_.parentNode != null)) { return this.gMarkerLabel.onRemove(); } }; return MarkerLabelChildModel; })(BaseObject); return MarkerLabelChildModel; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.child").factory("MarkerChildModel", [ "ModelKey", "GmapUtil", "Logger", "$injector", "EventsHelper", function(ModelKey, GmapUtil, $log, $injector, EventsHelper) { var MarkerChildModel; MarkerChildModel = (function(_super) { __extends(MarkerChildModel, _super); MarkerChildModel.include(GmapUtil); MarkerChildModel.include(EventsHelper); function MarkerChildModel(model, parentScope, gMap, $timeout, defaults, doClick, gMarkerManager, idKey, doDrawSelf) { this.model = model; this.parentScope = parentScope; this.gMap = gMap; this.$timeout = $timeout; this.defaults = defaults; this.doClick = doClick; this.gMarkerManager = gMarkerManager; this.idKey = idKey != null ? idKey : "id"; this.doDrawSelf = doDrawSelf != null ? doDrawSelf : true; this.watchDestroy = __bind(this.watchDestroy, this); this.internalEvents = __bind(this.internalEvents, this); this.setLabelOptions = __bind(this.setLabelOptions, this); this.setOptions = __bind(this.setOptions, this); this.setIcon = __bind(this.setIcon, this); this.setCoords = __bind(this.setCoords, this); this.destroy = __bind(this.destroy, this); this.maybeSetScopeValue = __bind(this.maybeSetScopeValue, this); this.createMarker = __bind(this.createMarker, this); this.setMyScope = __bind(this.setMyScope, this); if (this.model[this.idKey] != null) { this.id = this.model[this.idKey]; } this.iconKey = this.parentScope.icon; this.coordsKey = this.parentScope.coords; this.clickKey = this.parentScope.click(); this.optionsKey = this.parentScope.options; this.needRedraw = false; MarkerChildModel.__super__.constructor.call(this, this.parentScope.$new(false)); this.scope.model = this.model; this.setMyScope(this.model, void 0, true); this.createMarker(this.model); this.scope.$watch('model', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.setMyScope(newValue, oldValue); return _this.needRedraw = true; } }; })(this), true); $log.info(this); this.watchDestroy(this.scope); } MarkerChildModel.prototype.setMyScope = function(model, oldModel, isInit) { if (oldModel == null) { oldModel = void 0; } if (isInit == null) { isInit = false; } this.maybeSetScopeValue('icon', model, oldModel, this.iconKey, this.evalModelHandle, isInit, this.setIcon); this.maybeSetScopeValue('coords', model, oldModel, this.coordsKey, this.evalModelHandle, isInit, this.setCoords); if (_.isFunction(this.clickKey) && $injector) { return this.scope.click = (function(_this) { return function() { return $injector.invoke(_this.clickKey, void 0, { "$markerModel": model }); }; })(this); } else { this.maybeSetScopeValue('click', model, oldModel, this.clickKey, this.evalModelHandle, isInit); return this.createMarker(model, oldModel, isInit); } }; MarkerChildModel.prototype.createMarker = function(model, oldModel, isInit) { if (oldModel == null) { oldModel = void 0; } if (isInit == null) { isInit = false; } this.maybeSetScopeValue('options', model, oldModel, this.optionsKey, this.evalModelHandle, isInit, this.setOptions); if (this.parentScope.options && !this.scope.options) { return $log.error('Options not found on model!'); } }; MarkerChildModel.prototype.maybeSetScopeValue = function(scopePropName, model, oldModel, modelKey, evaluate, isInit, gSetter) { var newValue, oldVal; if (gSetter == null) { gSetter = void 0; } if (oldModel === void 0) { this.scope[scopePropName] = evaluate(model, modelKey); if (!isInit) { if (gSetter != null) { gSetter(this.scope); } } return; } oldVal = evaluate(oldModel, modelKey); newValue = evaluate(model, modelKey); if (newValue !== oldVal) { this.scope[scopePropName] = newValue; if (!isInit) { if (gSetter != null) { gSetter(this.scope); } if (this.doDrawSelf) { return this.gMarkerManager.draw(); } } } }; MarkerChildModel.prototype.destroy = function() { if (this.gMarker != null) { this.removeEvents(this.externalListeners); this.removeEvents(this.internalListeners); this.gMarkerManager.remove(this.gMarker, true); delete this.gMarker; if (!this.scope.$$destroyed) { return this.scope.$destroy(); } } }; MarkerChildModel.prototype.setCoords = function(scope) { if (scope.$id !== this.scope.$id || this.gMarker === void 0) { return; } if (scope.coords != null) { if (!this.validateCoords(this.scope.coords)) { $log.error("MarkerChildMarker cannot render marker as scope.coords as no position on marker: " + (JSON.stringify(this.model))); return; } this.gMarker.setPosition(this.getCoords(scope.coords)); this.gMarker.setVisible(this.validateCoords(scope.coords)); return this.gMarkerManager.add(this.gMarker); } else { return this.gMarkerManager.remove(this.gMarker); } }; MarkerChildModel.prototype.setIcon = function(scope) { if (scope.$id !== this.scope.$id || this.gMarker === void 0) { return; } this.gMarkerManager.remove(this.gMarker); this.gMarker.setIcon(scope.icon); this.gMarkerManager.add(this.gMarker); this.gMarker.setPosition(this.getCoords(scope.coords)); return this.gMarker.setVisible(this.validateCoords(scope.coords)); }; MarkerChildModel.prototype.setOptions = function(scope) { var ignore, _ref; if (scope.$id !== this.scope.$id) { return; } if (this.gMarker != null) { this.gMarkerManager.remove(this.gMarker); delete this.gMarker; } if (!((_ref = scope.coords) != null ? _ref : typeof scope.icon === "function" ? scope.icon(scope.options != null) : void 0)) { return; } this.opts = this.createMarkerOptions(scope.coords, scope.icon, scope.options); delete this.gMarker; if (scope.isLabel) { this.gMarker = new MarkerWithLabel(this.setLabelOptions(this.opts)); } else { this.gMarker = new google.maps.Marker(this.opts); } this.externalListeners = this.setEvents(this.gMarker, this.parentScope, this.model, ignore = ['dragend']); this.internalListeners = this.setEvents(this.gMarker, { events: this.internalEvents() }, this.model); if (this.id != null) { this.gMarker.key = this.id; } return this.gMarkerManager.add(this.gMarker); }; MarkerChildModel.prototype.setLabelOptions = function(opts) { opts.labelAnchor = this.getLabelPositionPoint(opts.labelAnchor); return opts; }; MarkerChildModel.prototype.internalEvents = function() { return { dragend: (function(_this) { return function(marker, eventName, model, mousearg) { var newCoords, _ref, _ref1; newCoords = _this.setCoordsFromEvent(_this.modelOrKey(_this.scope.model, _this.coordsKey), _this.gMarker.getPosition()); _this.scope.model = _this.setVal(model, _this.coordsKey, newCoords); if (((_ref = _this.parentScope.events) != null ? _ref.dragend : void 0) != null) { if ((_ref1 = _this.parentScope.events) != null) { _ref1.dragend(marker, eventName, _this.scope.model, mousearg); } } return _this.scope.$apply(); }; })(this), click: (function(_this) { return function() { if (_this.doClick && (_this.scope.click != null)) { _this.scope.click(); return _this.scope.$apply(); } }; })(this) }; }; MarkerChildModel.prototype.watchDestroy = function(scope) { return scope.$on("$destroy", this.destroy); }; return MarkerChildModel; })(ModelKey); return MarkerChildModel; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("PolylineChildModel", [ "BaseObject", "Logger", "$timeout", "array-sync", "GmapUtil", "EventsHelper", function(BaseObject, $log, $timeout, arraySync, GmapUtil, EventsHelper) { var PolylineChildModel; return PolylineChildModel = (function(_super) { __extends(PolylineChildModel, _super); PolylineChildModel.include(GmapUtil); PolylineChildModel.include(EventsHelper); function PolylineChildModel(scope, attrs, map, defaults, model) { this.scope = scope; this.attrs = attrs; this.map = map; this.defaults = defaults; this.model = model; this.clean = __bind(this.clean, this); this.buildOpts = __bind(this.buildOpts, this); scope.$watch('path', (function(_this) { return function(newValue, oldValue) { var pathPoints; if (!_.isEqual(newValue, oldValue) || !_this.polyline) { pathPoints = _this.convertPathPoints(scope.path); if (pathPoints.length > 0) { _this.polyline = new google.maps.Polyline(_this.buildOpts(pathPoints)); } if (_this.polyline) { if (scope.fit) { _this.extendMapBounds(map, pathPoints); } arraySync(_this.polyline.getPath(), scope, "path", function(pathPoints) { if (scope.fit) { return _this.extendMapBounds(map, pathPoints); } }); return _this.listeners = _this.model ? _this.setEvents(_this.polyline, scope, _this.model) : _this.setEvents(_this.polyline, scope, scope); } } }; })(this)); if (!scope["static"] && angular.isDefined(scope.editable)) { scope.$watch("editable", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setEditable(newValue) : void 0; } }; })(this)); } if (angular.isDefined(scope.draggable)) { scope.$watch("draggable", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setDraggable(newValue) : void 0; } }; })(this)); } if (angular.isDefined(scope.visible)) { scope.$watch("visible", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setVisible(newValue) : void 0; } }; })(this)); } if (angular.isDefined(scope.geodesic)) { scope.$watch("geodesic", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.weight)) { scope.$watch("stroke.weight", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.color)) { scope.$watch("stroke.color", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.opacity)) { scope.$watch("stroke.opacity", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } if (angular.isDefined(scope.icons)) { scope.$watch("icons", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } scope.$on("$destroy", (function(_this) { return function() { _this.clean(); return _this.scope = null; }; })(this)); $log.info(this); } PolylineChildModel.prototype.buildOpts = function(pathPoints) { var opts; opts = angular.extend({}, this.defaults, { map: this.map, path: pathPoints, icons: this.scope.icons, strokeColor: this.scope.stroke && this.scope.stroke.color, strokeOpacity: this.scope.stroke && this.scope.stroke.opacity, strokeWeight: this.scope.stroke && this.scope.stroke.weight }); angular.forEach({ clickable: true, draggable: false, editable: false, geodesic: false, visible: true, "static": false, fit: false }, (function(_this) { return function(defaultValue, key) { if (angular.isUndefined(_this.scope[key]) || _this.scope[key] === null) { return opts[key] = defaultValue; } else { return opts[key] = _this.scope[key]; } }; })(this)); if (opts["static"]) { opts.editable = false; } return opts; }; PolylineChildModel.prototype.clean = function() { var arraySyncer; this.removeEvents(this.listeners); this.polyline.setMap(null); this.polyline = null; if (arraySyncer) { arraySyncer(); return arraySyncer = null; } }; PolylineChildModel.prototype.destroy = function() { return this.scope.$destroy(); }; return PolylineChildModel; })(BaseObject); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.child").factory("WindowChildModel", [ "BaseObject", "GmapUtil", "Logger", "$compile", "$http", "$templateCache", function(BaseObject, GmapUtil, Logger, $compile, $http, $templateCache) { var WindowChildModel; WindowChildModel = (function(_super) { __extends(WindowChildModel, _super); WindowChildModel.include(GmapUtil); function WindowChildModel(model, scope, opts, isIconVisibleOnClick, mapCtrl, markerCtrl, element, needToManualDestroy, markerIsVisibleAfterWindowClose) { this.model = model; this.scope = scope; this.opts = opts; this.isIconVisibleOnClick = isIconVisibleOnClick; this.mapCtrl = mapCtrl; this.markerCtrl = markerCtrl; this.element = element; this.needToManualDestroy = needToManualDestroy != null ? needToManualDestroy : false; this.markerIsVisibleAfterWindowClose = markerIsVisibleAfterWindowClose != null ? markerIsVisibleAfterWindowClose : true; this.destroy = __bind(this.destroy, this); this.remove = __bind(this.remove, this); this.hideWindow = __bind(this.hideWindow, this); this.getLatestPosition = __bind(this.getLatestPosition, this); this.showWindow = __bind(this.showWindow, this); this.handleClick = __bind(this.handleClick, this); this.watchOptions = __bind(this.watchOptions, this); this.watchCoords = __bind(this.watchCoords, this); this.watchShow = __bind(this.watchShow, this); this.getGWin = __bind(this.getGWin, this); this.createGWin = __bind(this.createGWin, this); this.watchElement = __bind(this.watchElement, this); this.googleMapsHandles = []; this.$log = Logger; this.createGWin(); if (this.markerCtrl != null) { this.markerCtrl.setClickable(true); } this.watchElement(); this.watchOptions(); this.watchShow(); this.watchCoords(); this.scope.$on("$destroy", (function(_this) { return function() { return _this.destroy(); }; })(this)); this.$log.info(this); } WindowChildModel.prototype.watchElement = function() { return this.scope.$watch((function(_this) { return function() { var _ref; if (!_this.element || !_this.html) { return; } if (_this.html !== _this.element.html()) { if (_this.gWin) { if ((_ref = _this.opts) != null) { _ref.content = void 0; } _this.remove(); _this.createGWin(); return _this.showHide(); } } }; })(this)); }; WindowChildModel.prototype.createGWin = function() { var defaults, _opts; if (this.gWin == null) { defaults = {}; if (this.opts != null) { if (this.scope.coords) { this.opts.position = this.getCoords(this.scope.coords); } defaults = this.opts; } if (this.element) { this.html = _.isObject(this.element) ? this.element.html() : this.element; } _opts = this.scope.options ? this.scope.options : defaults; this.opts = this.createWindowOptions(this.markerCtrl, this.scope, this.html, _opts); } if ((this.opts != null) && !this.gWin) { if (this.opts.boxClass && (window.InfoBox && typeof window.InfoBox === 'function')) { this.gWin = new window.InfoBox(this.opts); } else { this.gWin = new google.maps.InfoWindow(this.opts); } if (this.gWin) { this.handleClick(); } return this.googleMapsHandles.push(google.maps.event.addListener(this.gWin, 'closeclick', (function(_this) { return function() { if (_this.markerCtrl) { _this.markerCtrl.setAnimation(_this.oldMarkerAnimation); if (_this.markerIsVisibleAfterWindowClose) { _.delay(function() { _this.markerCtrl.setVisible(false); return _this.markerCtrl.setVisible(_this.markerIsVisibleAfterWindowClose); }, 250); } } _this.gWin.isOpen(false); if (_this.scope.closeClick != null) { return _this.scope.closeClick(); } }; })(this))); } }; WindowChildModel.prototype.getGWin = function() { return this.gWin; }; WindowChildModel.prototype.watchShow = function() { return this.scope.$watch('show', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { if (newValue) { return _this.showWindow(); } else { return _this.hideWindow(); } } else { if (_this.gWin != null) { if (newValue && !_this.gWin.getMap()) { return _this.showWindow(); } } } }; })(this), true); }; WindowChildModel.prototype.watchCoords = function() { var scope; scope = this.markerCtrl != null ? this.scope.$parent : this.scope; return scope.$watch('coords', (function(_this) { return function(newValue, oldValue) { var pos; if (newValue !== oldValue) { if (newValue == null) { return _this.hideWindow(); } else { if (!_this.validateCoords(newValue)) { _this.$log.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: " + (JSON.stringify(_this.model))); return; } pos = _this.getCoords(newValue); _this.gWin.setPosition(pos); if (_this.opts) { return _this.opts.position = pos; } } } }; })(this), true); }; WindowChildModel.prototype.watchOptions = function() { var scope; scope = this.markerCtrl != null ? this.scope.$parent : this.scope; return scope.$watch('options', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.opts = newValue; if (_this.gWin != null) { return _this.gWin.setOptions(_this.opts); } } }; })(this), true); }; WindowChildModel.prototype.handleClick = function(forceClick) { var click; click = (function(_this) { return function() { var pos; if (_this.gWin == null) { _this.createGWin(); } pos = _this.markerCtrl.getPosition(); if (_this.gWin != null) { _this.gWin.setPosition(pos); if (_this.opts) { _this.opts.position = pos; } _this.showWindow(); } _this.initialMarkerVisibility = _this.markerCtrl.getVisible(); _this.oldMarkerAnimation = _this.markerCtrl.getAnimation(); return _this.markerCtrl.setVisible(_this.isIconVisibleOnClick); }; })(this); if (this.markerCtrl != null) { if (forceClick) { click(); } return this.googleMapsHandles.push(google.maps.event.addListener(this.markerCtrl, 'click', click)); } }; WindowChildModel.prototype.showWindow = function() { var compiled, show, templateScope; show = (function(_this) { return function() { if (_this.gWin) { if ((_this.scope.show || (_this.scope.show == null)) && !_this.gWin.isOpen()) { return _this.gWin.open(_this.mapCtrl); } } }; })(this); if (this.scope.templateUrl) { if (this.gWin) { $http.get(this.scope.templateUrl, { cache: $templateCache }).then((function(_this) { return function(content) { var compiled, templateScope; templateScope = _this.scope.$new(); if (angular.isDefined(_this.scope.templateParameter)) { templateScope.parameter = _this.scope.templateParameter; } compiled = $compile(content.data)(templateScope); return _this.gWin.setContent(compiled[0]); }; })(this)); } } else if (this.scope.template) { if (this.gWin) { templateScope = this.scope.$new(); if (angular.isDefined(this.scope.templateParameter)) { templateScope.parameter = this.scope.templateParameter; } compiled = $compile(this.scope.template)(templateScope); this.gWin.setContent(compiled[0]); } } return show(); }; WindowChildModel.prototype.showHide = function() { if (this.scope.show || (this.scope.show == null)) { return this.showWindow(); } else { return this.hideWindow(); } }; WindowChildModel.prototype.getLatestPosition = function(overridePos) { if ((this.gWin != null) && (this.markerCtrl != null) && !overridePos) { return this.gWin.setPosition(this.markerCtrl.getPosition()); } else { if (overridePos) { return this.gWin.setPosition(overridePos); } } }; WindowChildModel.prototype.hideWindow = function() { if ((this.gWin != null) && this.gWin.isOpen()) { return this.gWin.close(); } }; WindowChildModel.prototype.remove = function() { this.hideWindow(); _.each(this.googleMapsHandles, function(h) { return google.maps.event.removeListener(h); }); this.googleMapsHandles.length = 0; delete this.gWin; return delete this.opts; }; WindowChildModel.prototype.destroy = function(manualOverride) { var self; if (manualOverride == null) { manualOverride = false; } this.remove(); if ((this.scope != null) && (this.needToManualDestroy || manualOverride)) { this.scope.$destroy(); } return self = void 0; }; return WindowChildModel; })(BaseObject); return WindowChildModel; } ]); }).call(this); /* - interface for all markers to derrive from - to enforce a minimum set of requirements - attributes - coords - icon - implementation needed on watches */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent").factory("IMarkerParentModel", [ "ModelKey", "Logger", function(ModelKey, Logger) { var IMarkerParentModel; IMarkerParentModel = (function(_super) { __extends(IMarkerParentModel, _super); IMarkerParentModel.prototype.DEFAULTS = {}; function IMarkerParentModel(scope, element, attrs, map, $timeout) { var self; this.scope = scope; this.element = element; this.attrs = attrs; this.map = map; this.$timeout = $timeout; this.onDestroy = __bind(this.onDestroy, this); this.onWatch = __bind(this.onWatch, this); this.watch = __bind(this.watch, this); this.validateScope = __bind(this.validateScope, this); IMarkerParentModel.__super__.constructor.call(this, this.scope); self = this; this.$log = Logger; if (!this.validateScope(scope)) { throw new String("Unable to construct IMarkerParentModel due to invalid scope"); } this.doClick = angular.isDefined(attrs.click); if (scope.options != null) { this.DEFAULTS = scope.options; } this.watch('coords', this.scope); this.watch('icon', this.scope); this.watch('options', this.scope); scope.$on("$destroy", (function(_this) { return function() { return _this.onDestroy(scope); }; })(this)); } IMarkerParentModel.prototype.validateScope = function(scope) { var ret; if (scope == null) { this.$log.error(this.constructor.name + ": invalid scope used"); return false; } ret = scope.coords != null; if (!ret) { this.$log.error(this.constructor.name + ": no valid coords attribute found"); return false; } return ret; }; IMarkerParentModel.prototype.watch = function(propNameToWatch, scope) { return scope.$watch(propNameToWatch, (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { return _this.onWatch(propNameToWatch, scope, newValue, oldValue); } }; })(this), true); }; IMarkerParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) { throw new String("OnWatch Not Implemented!!"); }; IMarkerParentModel.prototype.onDestroy = function(scope) { throw new String("OnDestroy Not Implemented!!"); }; return IMarkerParentModel; })(ModelKey); return IMarkerParentModel; } ]); }).call(this); /* - interface directive for all window(s) to derrive from */ (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent").factory("IWindowParentModel", [ "ModelKey", "GmapUtil", "Logger", function(ModelKey, GmapUtil, Logger) { var IWindowParentModel; IWindowParentModel = (function(_super) { __extends(IWindowParentModel, _super); IWindowParentModel.include(GmapUtil); IWindowParentModel.prototype.DEFAULTS = {}; function IWindowParentModel(scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache) { var self; IWindowParentModel.__super__.constructor.call(this, scope); self = this; this.$log = Logger; this.$timeout = $timeout; this.$compile = $compile; this.$http = $http; this.$templateCache = $templateCache; if (scope.options != null) { this.DEFAULTS = scope.options; } } return IWindowParentModel; })(ModelKey); return IWindowParentModel; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent").factory("LayerParentModel", [ "BaseObject", "Logger", '$timeout', function(BaseObject, Logger, $timeout) { var LayerParentModel; LayerParentModel = (function(_super) { __extends(LayerParentModel, _super); function LayerParentModel(scope, element, attrs, gMap, onLayerCreated, $log) { this.scope = scope; this.element = element; this.attrs = attrs; this.gMap = gMap; this.onLayerCreated = onLayerCreated != null ? onLayerCreated : void 0; this.$log = $log != null ? $log : Logger; this.createGoogleLayer = __bind(this.createGoogleLayer, this); if (this.attrs.type == null) { this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!"); return; } this.createGoogleLayer(); this.doShow = true; if (angular.isDefined(this.attrs.show)) { this.doShow = this.scope.show; } if (this.doShow && (this.gMap != null)) { this.layer.setMap(this.gMap); } this.scope.$watch("show", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.doShow = newValue; if (newValue) { return _this.layer.setMap(_this.gMap); } else { return _this.layer.setMap(null); } } }; })(this), true); this.scope.$watch("options", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.layer.setMap(null); _this.layer = null; return _this.createGoogleLayer(); } }; })(this), true); this.scope.$on("$destroy", (function(_this) { return function() { return _this.layer.setMap(null); }; })(this)); } LayerParentModel.prototype.createGoogleLayer = function() { var fn; if (this.attrs.options == null) { this.layer = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type]() : new google.maps[this.attrs.namespace][this.attrs.type](); } else { this.layer = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type](this.scope.options) : new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options); } if ((this.layer != null) && (this.onLayerCreated != null)) { fn = this.onLayerCreated(this.scope, this.layer); if (fn) { return fn(this.layer); } } }; return LayerParentModel; })(BaseObject); return LayerParentModel; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent").factory("MapTypeParentModel", [ "BaseObject", "Logger", '$timeout', function(BaseObject, Logger, $timeout) { var MapTypeParentModel; MapTypeParentModel = (function(_super) { __extends(MapTypeParentModel, _super); function MapTypeParentModel(scope, element, attrs, gMap, $log) { this.scope = scope; this.element = element; this.attrs = attrs; this.gMap = gMap; this.$log = $log != null ? $log : Logger; this.hideOverlay = __bind(this.hideOverlay, this); this.showOverlay = __bind(this.showOverlay, this); this.refreshMapType = __bind(this.refreshMapType, this); this.createMapType = __bind(this.createMapType, this); if (this.attrs.options == null) { this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!"); return; } this.id = this.gMap.overlayMapTypesCount = this.gMap.overlayMapTypesCount + 1 || 0; this.doShow = true; this.createMapType(); if (angular.isDefined(this.attrs.show)) { this.doShow = this.scope.show; } if (this.doShow && (this.gMap != null)) { this.showOverlay(); } this.scope.$watch("show", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.doShow = newValue; if (newValue) { return _this.showOverlay(); } else { return _this.hideOverlay(); } } }; })(this), true); this.scope.$watch("options", (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { return _this.refreshMapType(); } }; })(this), true); if (angular.isDefined(this.attrs.refresh)) { this.scope.$watch("refresh", (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { return _this.refreshMapType(); } }; })(this), true); } this.scope.$on("$destroy", (function(_this) { return function() { _this.hideOverlay(); return _this.mapType = null; }; })(this)); } MapTypeParentModel.prototype.createMapType = function() { if (this.scope.options.getTile != null) { this.mapType = this.scope.options; } else if (this.scope.options.getTileUrl != null) { this.mapType = new google.maps.ImageMapType(this.scope.options); } else { this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!"); return; } if (this.attrs.id && this.scope.id) { this.gMap.mapTypes.set(this.scope.id, this.mapType); if (!angular.isDefined(this.attrs.show)) { this.doShow = false; } } return this.mapType.layerId = this.id; }; MapTypeParentModel.prototype.refreshMapType = function() { this.hideOverlay(); this.mapType = null; this.createMapType(); if (this.doShow && (this.gMap != null)) { return this.showOverlay(); } }; MapTypeParentModel.prototype.showOverlay = function() { return this.gMap.overlayMapTypes.push(this.mapType); }; MapTypeParentModel.prototype.hideOverlay = function() { var found; found = false; return this.gMap.overlayMapTypes.forEach((function(_this) { return function(mapType, index) { if (!found && mapType.layerId === _this.id) { found = true; _this.gMap.overlayMapTypes.removeAt(index); } }; })(this)); }; return MapTypeParentModel; })(BaseObject); return MapTypeParentModel; } ]); }).call(this); /* Basic Directive api for a marker. Basic in the sense that this directive contains 1:1 on scope and model. Thus there will be one html element per marker within the directive. */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent").factory("MarkerParentModel", [ "IMarkerParentModel", "GmapUtil", "EventsHelper", "ModelKey", function(IMarkerParentModel, GmapUtil, EventsHelper) { var MarkerParentModel; MarkerParentModel = (function(_super) { __extends(MarkerParentModel, _super); MarkerParentModel.include(GmapUtil); MarkerParentModel.include(EventsHelper); function MarkerParentModel(scope, element, attrs, map, $timeout, gMarkerManager, doFit) { var opts; this.gMarkerManager = gMarkerManager; this.doFit = doFit; this.onDestroy = __bind(this.onDestroy, this); this.setGMarker = __bind(this.setGMarker, this); this.onWatch = __bind(this.onWatch, this); MarkerParentModel.__super__.constructor.call(this, scope, element, attrs, map, $timeout); opts = this.createMarkerOptions(scope.coords, scope.icon, scope.options, this.map); this.setGMarker(new google.maps.Marker(opts)); this.listener = google.maps.event.addListener(this.scope.gMarker, 'click', (function(_this) { return function() { if (_this.doClick && (scope.click != null)) { return _this.scope.click(); } }; })(this)); this.setEvents(this.scope.gMarker, scope, scope); this.$log.info(this); } MarkerParentModel.prototype.onWatch = function(propNameToWatch, scope) { var old, pos, _ref; switch (propNameToWatch) { case 'coords': if (this.validateCoords(scope.coords) && (this.scope.gMarker != null)) { pos = (_ref = this.scope.gMarker) != null ? _ref.getPosition() : void 0; if (pos.lat() === this.scope.coords.latitude && this.scope.coords.longitude === pos.lng()) { return; } old = this.scope.gMarker.getAnimation(); this.scope.gMarker.setMap(this.map); this.scope.gMarker.setPosition(this.getCoords(scope.coords)); this.scope.gMarker.setVisible(this.validateCoords(scope.coords)); return this.scope.gMarker.setAnimation(old); } else { return this.scope.gMarker.setMap(null); } break; case 'icon': if ((scope.icon != null) && this.validateCoords(scope.coords) && (this.scope.gMarker != null)) { this.scope.gMarker.setIcon(scope.icon); this.scope.gMarker.setMap(null); this.scope.gMarker.setMap(this.map); this.scope.gMarker.setPosition(this.getCoords(scope.coords)); return this.scope.gMarker.setVisible(this.validateCoords(scope.coords)); } break; case 'options': if (this.validateCoords(scope.coords) && scope.options) { if (this.scope.gMarker != null) { this.scope.gMarker.setMap(null); } return this.setGMarker(new google.maps.Marker(this.createMarkerOptions(scope.coords, scope.icon, scope.options, this.map))); } } }; MarkerParentModel.prototype.setGMarker = function(gMarker) { var ret; if (this.scope.gMarker) { ret = this.gMarkerManager.remove(this.scope.gMarker, false); delete this.scope.gMarker; ret; } this.scope.gMarker = gMarker; if (this.scope.gMarker) { this.scope.gMarker.key = this.scope.idKey; this.gMarkerManager.add(this.scope.gMarker, false); if (this.doFit) { return this.gMarkerManager.fit(); } } }; MarkerParentModel.prototype.onDestroy = function(scope) { var self; if (!this.scope.gMarker) { self = void 0; return; } this.scope.gMarker.setMap(null); google.maps.event.removeListener(this.listener); this.listener = null; this.gMarkerManager.remove(this.scope.gMarker, false); delete this.scope.gMarker; return self = void 0; }; return MarkerParentModel; })(IMarkerParentModel); return MarkerParentModel; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent").factory("MarkersParentModel", [ "IMarkerParentModel", "ModelsWatcher", "PropMap", "MarkerChildModel", "ClustererMarkerManager", "MarkerManager", function(IMarkerParentModel, ModelsWatcher, PropMap, MarkerChildModel, ClustererMarkerManager, MarkerManager) { var MarkersParentModel; MarkersParentModel = (function(_super) { __extends(MarkersParentModel, _super); MarkersParentModel.include(ModelsWatcher); function MarkersParentModel(scope, element, attrs, map, $timeout) { this.onDestroy = __bind(this.onDestroy, this); this.newChildMarker = __bind(this.newChildMarker, this); this.updateChild = __bind(this.updateChild, this); this.pieceMeal = __bind(this.pieceMeal, this); this.reBuildMarkers = __bind(this.reBuildMarkers, this); this.createMarkersFromScratch = __bind(this.createMarkersFromScratch, this); this.validateScope = __bind(this.validateScope, this); this.onWatch = __bind(this.onWatch, this); var self; MarkersParentModel.__super__.constructor.call(this, scope, element, attrs, map, $timeout); self = this; this.scope.markerModels = new PropMap(); this.$timeout = $timeout; this.$log.info(this); this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false; this.setIdKey(scope); this.scope.$watch('doRebuildAll', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return _this.doRebuildAll = newValue; } }; })(this)); this.watch('models', scope); this.watch('doCluster', scope); this.watch('clusterOptions', scope); this.watch('clusterEvents', scope); this.watch('fit', scope); this.watch('idKey', scope); this.gMarkerManager = void 0; this.createMarkersFromScratch(scope); } MarkersParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) { if (propNameToWatch === "idKey" && newValue !== oldValue) { this.idKey = newValue; } if (this.doRebuildAll) { return this.reBuildMarkers(scope); } else { return this.pieceMeal(scope); } }; MarkersParentModel.prototype.validateScope = function(scope) { var modelsNotDefined; modelsNotDefined = angular.isUndefined(scope.models) || scope.models === void 0; if (modelsNotDefined) { this.$log.error(this.constructor.name + ": no valid models attribute found"); } return MarkersParentModel.__super__.validateScope.call(this, scope) || modelsNotDefined; }; MarkersParentModel.prototype.createMarkersFromScratch = function(scope) { if (scope.doCluster) { if (scope.clusterEvents) { this.clusterInternalOptions = _.once((function(_this) { return function() { var self, _ref, _ref1, _ref2; self = _this; if (!_this.origClusterEvents) { _this.origClusterEvents = { click: (_ref = scope.clusterEvents) != null ? _ref.click : void 0, mouseout: (_ref1 = scope.clusterEvents) != null ? _ref1.mouseout : void 0, mouseover: (_ref2 = scope.clusterEvents) != null ? _ref2.mouseover : void 0 }; return _.extend(scope.clusterEvents, { click: function(cluster) { return self.maybeExecMappedEvent(cluster, 'click'); }, mouseout: function(cluster) { return self.maybeExecMappedEvent(cluster, 'mouseout'); }, mouseover: function(cluster) { return self.maybeExecMappedEvent(cluster, 'mouseover'); } }); } }; })(this))(); } if (scope.clusterOptions || scope.clusterEvents) { if (this.gMarkerManager === void 0) { this.gMarkerManager = new ClustererMarkerManager(this.map, void 0, scope.clusterOptions, this.clusterInternalOptions); } else { if (this.gMarkerManager.opt_options !== scope.clusterOptions) { this.gMarkerManager = new ClustererMarkerManager(this.map, void 0, scope.clusterOptions, this.clusterInternalOptions); } } } else { this.gMarkerManager = new ClustererMarkerManager(this.map); } } else { this.gMarkerManager = new MarkerManager(this.map); } return _async.each(scope.models, (function(_this) { return function(model) { return _this.newChildMarker(model, scope); }; })(this), (function(_this) { return function() { _this.gMarkerManager.draw(); if (scope.fit) { return _this.gMarkerManager.fit(); } }; })(this)); }; MarkersParentModel.prototype.reBuildMarkers = function(scope) { if (!scope.doRebuild && scope.doRebuild !== void 0) { return; } this.onDestroy(scope); return this.createMarkersFromScratch(scope); }; MarkersParentModel.prototype.pieceMeal = function(scope) { if ((this.scope.models != null) && this.scope.models.length > 0 && this.scope.markerModels.length > 0) { return this.figureOutState(this.idKey, scope, this.scope.markerModels, this.modelKeyComparison, (function(_this) { return function(state) { var payload; payload = state; return _async.each(payload.removals, function(child) { if (child != null) { if (child.destroy != null) { child.destroy(); } return _this.scope.markerModels.remove(child.id); } }, function() { return _async.each(payload.adds, function(modelToAdd) { return _this.newChildMarker(modelToAdd, scope); }, function() { return _async.each(payload.updates, function(update) { return _this.updateChild(update.child, update.model); }, function() { if (payload.adds.length > 0 || payload.removals.length > 0 || payload.updates.length > 0) { _this.gMarkerManager.draw(); return scope.markerModels = _this.scope.markerModels; } }); }); }); }; })(this)); } else { return this.reBuildMarkers(scope); } }; MarkersParentModel.prototype.updateChild = function(child, model) { if (model[this.idKey] == null) { this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); return; } return child.setMyScope(model, child.model, false); }; MarkersParentModel.prototype.newChildMarker = function(model, scope) { var child, doDrawSelf; if (model[this.idKey] == null) { this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); return; } this.$log.info('child', child, 'markers', this.scope.markerModels); child = new MarkerChildModel(model, scope, this.map, this.$timeout, this.DEFAULTS, this.doClick, this.gMarkerManager, this.idKey, doDrawSelf = false); this.scope.markerModels.put(model[this.idKey], child); return child; }; MarkersParentModel.prototype.onDestroy = function(scope) { _.each(this.scope.markerModels.values(), function(model) { if (model != null) { return model.destroy(); } }); delete this.scope.markerModels; this.scope.markerModels = new PropMap(); if (this.gMarkerManager != null) { return this.gMarkerManager.clear(); } }; MarkersParentModel.prototype.maybeExecMappedEvent = function(cluster, fnName) { var pair, _ref; if (_.isFunction((_ref = this.scope.clusterEvents) != null ? _ref[fnName] : void 0)) { pair = this.mapClusterToMarkerModels(cluster); if (this.origClusterEvents[fnName]) { return this.origClusterEvents[fnName](pair.cluster, pair.mapped); } } }; MarkersParentModel.prototype.mapClusterToMarkerModels = function(cluster) { var gMarkers, mapped; gMarkers = cluster.getMarkers().values(); mapped = gMarkers.map((function(_this) { return function(g) { return _this.scope.markerModels[g.key].model; }; })(this)); return { cluster: cluster, mapped: mapped }; }; return MarkersParentModel; })(IMarkerParentModel); return MarkersParentModel; } ]); }).call(this); /* Windows directive where many windows map to the models property */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent").factory("PolylinesParentModel", [ "$timeout", "Logger", "ModelKey", "ModelsWatcher", "PropMap", "PolylineChildModel", function($timeout, Logger, ModelKey, ModelsWatcher, PropMap, PolylineChildModel) { var PolylinesParentModel; return PolylinesParentModel = (function(_super) { __extends(PolylinesParentModel, _super); PolylinesParentModel.include(ModelsWatcher); function PolylinesParentModel(scope, element, attrs, gMap, defaults) { var self; this.scope = scope; this.element = element; this.attrs = attrs; this.gMap = gMap; this.defaults = defaults; this.modelKeyComparison = __bind(this.modelKeyComparison, this); this.setChildScope = __bind(this.setChildScope, this); this.createChild = __bind(this.createChild, this); this.pieceMeal = __bind(this.pieceMeal, this); this.createAllNew = __bind(this.createAllNew, this); this.watchIdKey = __bind(this.watchIdKey, this); this.createChildScopes = __bind(this.createChildScopes, this); this.watchOurScope = __bind(this.watchOurScope, this); this.watchDestroy = __bind(this.watchDestroy, this); this.rebuildAll = __bind(this.rebuildAll, this); this.doINeedToWipe = __bind(this.doINeedToWipe, this); this.watchModels = __bind(this.watchModels, this); this.watch = __bind(this.watch, this); PolylinesParentModel.__super__.constructor.call(this, scope); self = this; this.$log = Logger; this.plurals = new PropMap(); this.scopePropNames = ['path', 'stroke', 'clickable', 'draggable', 'editable', 'geodesic', 'icons', 'visible']; _.each(this.scopePropNames, (function(_this) { return function(name) { return _this[name + 'Key'] = void 0; }; })(this)); this.models = void 0; this.firstTime = true; this.$log.info(this); this.watchOurScope(scope); this.createChildScopes(); } PolylinesParentModel.prototype.watch = function(scope, name, nameKey) { return scope.$watch(name, (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this[nameKey] = typeof newValue === 'function' ? newValue() : newValue; return _async.each(_.values(_this.plurals), function(model) { return model.scope[name] = _this[nameKey] === 'self' ? model : model[_this[nameKey]]; }, function() {}); } }; })(this)); }; PolylinesParentModel.prototype.watchModels = function(scope) { return scope.$watch('models', (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { if (_this.doINeedToWipe(newValue)) { return _this.rebuildAll(scope, true, true); } else { return _this.createChildScopes(false); } } }; })(this), true); }; PolylinesParentModel.prototype.doINeedToWipe = function(newValue) { var newValueIsEmpty; newValueIsEmpty = newValue != null ? newValue.length === 0 : true; return this.plurals.length > 0 && newValueIsEmpty; }; PolylinesParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) { return _async.each(this.plurals.values(), (function(_this) { return function(model) { return model.destroy(); }; })(this), (function(_this) { return function() { if (doDelete) { delete _this.plurals; } _this.plurals = new PropMap(); if (doCreate) { return _this.createChildScopes(); } }; })(this)); }; PolylinesParentModel.prototype.watchDestroy = function(scope) { return scope.$on("$destroy", (function(_this) { return function() { return _this.rebuildAll(scope, false, true); }; })(this)); }; PolylinesParentModel.prototype.watchOurScope = function(scope) { return _.each(this.scopePropNames, (function(_this) { return function(name) { var nameKey; nameKey = name + 'Key'; _this[nameKey] = typeof scope[name] === 'function' ? scope[name]() : scope[name]; return _this.watch(scope, name, nameKey); }; })(this)); }; PolylinesParentModel.prototype.createChildScopes = function(isCreatingFromScratch) { if (isCreatingFromScratch == null) { isCreatingFromScratch = true; } if (angular.isUndefined(this.scope.models)) { this.$log.error("No models to create polylines from! I Need direct models!"); return; } if (this.gMap != null) { if (this.scope.models != null) { this.watchIdKey(this.scope); if (isCreatingFromScratch) { return this.createAllNew(this.scope, false); } else { return this.pieceMeal(this.scope, false); } } } }; PolylinesParentModel.prototype.watchIdKey = function(scope) { this.setIdKey(scope); return scope.$watch('idKey', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue && (newValue == null)) { _this.idKey = newValue; return _this.rebuildAll(scope, true, true); } }; })(this)); }; PolylinesParentModel.prototype.createAllNew = function(scope, isArray) { if (isArray == null) { isArray = false; } this.models = scope.models; if (this.firstTime) { this.watchModels(scope); this.watchDestroy(scope); } return _async.each(scope.models, (function(_this) { return function(model) { return _this.createChild(model, _this.gMap); }; })(this), (function(_this) { return function() { return _this.firstTime = false; }; })(this)); }; PolylinesParentModel.prototype.pieceMeal = function(scope, isArray) { if (isArray == null) { isArray = true; } this.models = scope.models; if ((scope != null) && (scope.models != null) && scope.models.length > 0 && this.plurals.length > 0) { return this.figureOutState(this.idKey, scope, this.plurals, this.modelKeyComparison, (function(_this) { return function(state) { var payload; payload = state; return _async.each(payload.removals, function(id) { var child; child = _this.plurals[id]; if (child != null) { child.destroy(); return _this.plurals.remove(id); } }, function() { return _async.each(payload.adds, function(modelToAdd) { return _this.createChild(modelToAdd, _this.gMap); }, function() {}); }); }; })(this)); } else { return this.rebuildAll(this.scope, true, true); } }; PolylinesParentModel.prototype.createChild = function(model, gMap) { var child, childScope; childScope = this.scope.$new(false); this.setChildScope(childScope, model); childScope.$watch('model', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return _this.setChildScope(childScope, newValue); } }; })(this), true); childScope["static"] = this.scope["static"]; child = new PolylineChildModel(childScope, this.attrs, gMap, this.defaults, model); if (model[this.idKey] == null) { this.$log.error("Polyline model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); return; } this.plurals.put(model[this.idKey], child); return child; }; PolylinesParentModel.prototype.setChildScope = function(childScope, model) { _.each(this.scopePropNames, (function(_this) { return function(name) { var nameKey, newValue; nameKey = name + 'Key'; newValue = _this[nameKey] === 'self' ? model : model[_this[nameKey]]; if (newValue !== childScope[name]) { return childScope[name] = newValue; } }; })(this)); return childScope.model = model; }; PolylinesParentModel.prototype.modelKeyComparison = function(model1, model2) { return _.isEqual(this.evalModelHandle(model1, this.scope.path), this.evalModelHandle(model2, this.scope.path)); }; return PolylinesParentModel; })(ModelKey); } ]); }).call(this); /* Windows directive where many windows map to the models property */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent").factory("WindowsParentModel", [ "IWindowParentModel", "ModelsWatcher", "PropMap", "WindowChildModel", "Linked", function(IWindowParentModel, ModelsWatcher, PropMap, WindowChildModel, Linked) { var WindowsParentModel; WindowsParentModel = (function(_super) { __extends(WindowsParentModel, _super); WindowsParentModel.include(ModelsWatcher); function WindowsParentModel(scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache, $interpolate) { var mapScope, self; this.$interpolate = $interpolate; this.interpolateContent = __bind(this.interpolateContent, this); this.setChildScope = __bind(this.setChildScope, this); this.createWindow = __bind(this.createWindow, this); this.setContentKeys = __bind(this.setContentKeys, this); this.pieceMealWindows = __bind(this.pieceMealWindows, this); this.createAllNewWindows = __bind(this.createAllNewWindows, this); this.watchIdKey = __bind(this.watchIdKey, this); this.createChildScopesWindows = __bind(this.createChildScopesWindows, this); this.watchOurScope = __bind(this.watchOurScope, this); this.watchDestroy = __bind(this.watchDestroy, this); this.rebuildAll = __bind(this.rebuildAll, this); this.doINeedToWipe = __bind(this.doINeedToWipe, this); this.watchModels = __bind(this.watchModels, this); this.watch = __bind(this.watch, this); this.go = __bind(this.go, this); WindowsParentModel.__super__.constructor.call(this, scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache); self = this; this.windows = new PropMap(); this.scopePropNames = ['show', 'coords', 'templateUrl', 'templateParameter', 'isIconVisibleOnClick', 'closeClick']; _.each(this.scopePropNames, (function(_this) { return function(name) { return _this[name + 'Key'] = void 0; }; })(this)); this.linked = new Linked(scope, element, attrs, ctrls); this.models = void 0; this.contentKeys = void 0; this.isIconVisibleOnClick = void 0; this.firstTime = true; this.$log.info(self); this.parentScope = void 0; mapScope = ctrls[0].getScope(); mapScope.deferred.promise.then((function(_this) { return function(map) { var markerCtrl; _this.gMap = map; markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0; if (!markerCtrl) { _this.go(scope); return; } return markerCtrl.getScope().deferred.promise.then(function() { _this.markerScope = markerCtrl.getScope(); return _this.go(scope); }); }; })(this)); } WindowsParentModel.prototype.go = function(scope) { this.watchOurScope(scope); this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false; scope.$watch('doRebuildAll', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return _this.doRebuildAll = newValue; } }; })(this)); return this.createChildScopesWindows(); }; WindowsParentModel.prototype.watch = function(scope, name, nameKey) { return scope.$watch(name, (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this[nameKey] = typeof newValue === 'function' ? newValue() : newValue; return _async.each(_.values(_this.windows), function(model) { return model.scope[name] = _this[nameKey] === 'self' ? model : model[_this[nameKey]]; }, function() {}); } }; })(this)); }; WindowsParentModel.prototype.watchModels = function(scope) { return scope.$watch('models', (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { if (_this.doRebuildAll || _this.doINeedToWipe(newValue)) { return _this.rebuildAll(scope, true, true); } else { return _this.createChildScopesWindows(false); } } }; })(this)); }; WindowsParentModel.prototype.doINeedToWipe = function(newValue) { var newValueIsEmpty; newValueIsEmpty = newValue != null ? newValue.length === 0 : true; return this.windows.length > 0 && newValueIsEmpty; }; WindowsParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) { return _async.each(this.windows.values(), (function(_this) { return function(model) { return model.destroy(); }; })(this), (function(_this) { return function() { if (doDelete) { delete _this.windows; } _this.windows = new PropMap(); if (doCreate) { return _this.createChildScopesWindows(); } }; })(this)); }; WindowsParentModel.prototype.watchDestroy = function(scope) { return scope.$on("$destroy", (function(_this) { return function() { return _this.rebuildAll(scope, false, true); }; })(this)); }; WindowsParentModel.prototype.watchOurScope = function(scope) { return _.each(this.scopePropNames, (function(_this) { return function(name) { var nameKey; nameKey = name + 'Key'; _this[nameKey] = typeof scope[name] === 'function' ? scope[name]() : scope[name]; return _this.watch(scope, name, nameKey); }; })(this)); }; WindowsParentModel.prototype.createChildScopesWindows = function(isCreatingFromScratch) { var markersScope, modelsNotDefined; if (isCreatingFromScratch == null) { isCreatingFromScratch = true; } /* being that we cannot tell the difference in Key String vs. a normal value string (TemplateUrl) we will assume that all scope values are string expressions either pointing to a key (propName) or using 'self' to point the model as container/object of interest. This may force redundant information into the model, but this appears to be the most flexible approach. */ this.isIconVisibleOnClick = true; if (angular.isDefined(this.linked.attrs.isiconvisibleonclick)) { this.isIconVisibleOnClick = this.linked.scope.isIconVisibleOnClick; } markersScope = this.markerScope; modelsNotDefined = angular.isUndefined(this.linked.scope.models); if (modelsNotDefined && (markersScope === void 0 || (markersScope.markerModels === void 0 || markersScope.models === void 0))) { this.$log.error("No models to create windows from! Need direct models or models derrived from markers!"); return; } if (this.gMap != null) { if (this.linked.scope.models != null) { this.watchIdKey(this.linked.scope); if (isCreatingFromScratch) { return this.createAllNewWindows(this.linked.scope, false); } else { return this.pieceMealWindows(this.linked.scope, false); } } else { this.parentScope = markersScope; this.watchIdKey(this.parentScope); if (isCreatingFromScratch) { return this.createAllNewWindows(markersScope, true, 'markerModels', false); } else { return this.pieceMealWindows(markersScope, true, 'markerModels', false); } } } }; WindowsParentModel.prototype.watchIdKey = function(scope) { this.setIdKey(scope); return scope.$watch('idKey', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue && (newValue == null)) { _this.idKey = newValue; return _this.rebuildAll(scope, true, true); } }; })(this)); }; WindowsParentModel.prototype.createAllNewWindows = function(scope, hasGMarker, modelsPropToIterate, isArray) { if (modelsPropToIterate == null) { modelsPropToIterate = 'models'; } if (isArray == null) { isArray = false; } this.models = scope.models; if (this.firstTime) { this.watchModels(scope); this.watchDestroy(scope); } this.setContentKeys(scope.models); return _async.each(scope.models, (function(_this) { return function(model) { var gMarker; gMarker = hasGMarker ? scope[modelsPropToIterate][[model[_this.idKey]]].gMarker : void 0; return _this.createWindow(model, gMarker, _this.gMap); }; })(this), (function(_this) { return function() { return _this.firstTime = false; }; })(this)); }; WindowsParentModel.prototype.pieceMealWindows = function(scope, hasGMarker, modelsPropToIterate, isArray) { if (modelsPropToIterate == null) { modelsPropToIterate = 'models'; } if (isArray == null) { isArray = true; } this.models = scope.models; if ((scope != null) && (scope.models != null) && scope.models.length > 0 && this.windows.length > 0) { return this.figureOutState(this.idKey, scope, this.windows, this.modelKeyComparison, (function(_this) { return function(state) { var payload; payload = state; return _async.each(payload.removals, function(child) { if (child != null) { if (child.destroy != null) { child.destroy(); } return _this.windows.remove(child.id); } }, function() { return _async.each(payload.adds, function(modelToAdd) { var gMarker; gMarker = scope[modelsPropToIterate][modelToAdd[_this.idKey]].gMarker; return _this.createWindow(modelToAdd, gMarker, _this.gMap); }, function() {}); }); }; })(this)); } else { return this.rebuildAll(this.scope, true, true); } }; WindowsParentModel.prototype.setContentKeys = function(models) { if (models.length > 0) { return this.contentKeys = Object.keys(models[0]); } }; WindowsParentModel.prototype.createWindow = function(model, gMarker, gMap) { var child, childScope, fakeElement, opts; childScope = this.linked.scope.$new(false); this.setChildScope(childScope, model); childScope.$watch('model', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.setChildScope(childScope, newValue); if (_this.markerScope) { return _this.windows[newValue[_this.idKey]].markerCtrl = _this.markerScope.markerModels[newValue[_this.idKey]].gMarker; } } }; })(this), true); fakeElement = { html: (function(_this) { return function() { return _this.interpolateContent(_this.linked.element.html(), model); }; })(this) }; opts = this.createWindowOptions(gMarker, childScope, fakeElement.html(), this.DEFAULTS); child = new WindowChildModel(model, childScope, opts, this.isIconVisibleOnClick, gMap, gMarker, fakeElement, false, true); if (model[this.idKey] == null) { this.$log.error("Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); return; } this.windows.put(model[this.idKey], child); return child; }; WindowsParentModel.prototype.setChildScope = function(childScope, model) { _.each(this.scopePropNames, (function(_this) { return function(name) { var nameKey, newValue; nameKey = name + 'Key'; newValue = _this[nameKey] === 'self' ? model : model[_this[nameKey]]; if (newValue !== childScope[name]) { return childScope[name] = newValue; } }; })(this)); return childScope.model = model; }; WindowsParentModel.prototype.interpolateContent = function(content, model) { var exp, interpModel, key, _i, _len, _ref; if (this.contentKeys === void 0 || this.contentKeys.length === 0) { return; } exp = this.$interpolate(content); interpModel = {}; _ref = this.contentKeys; for (_i = 0, _len = _ref.length; _i < _len; _i++) { key = _ref[_i]; interpModel[key] = model[key]; } return exp(interpModel); }; return WindowsParentModel; })(IWindowParentModel); return WindowsParentModel; } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("Control", [ "IControl", "$http", "$templateCache", "$compile", "$controller", function(IControl, $http, $templateCache, $compile, $controller) { var Control; return Control = (function(_super) { __extends(Control, _super); function Control() { var self; Control.__super__.constructor.call(this); self = this; } Control.prototype.link = function(scope, element, attrs, ctrl) { var index, position; if (angular.isUndefined(scope.template)) { this.$log.error('mapControl: could not find a valid template property'); return; } index = angular.isDefined(scope.index && !isNaN(parseInt(scope.index))) ? parseInt(scope.index) : void 0; position = angular.isDefined(scope.position) ? scope.position.toUpperCase().replace(/-/g, '_') : 'TOP_CENTER'; if (!google.maps.ControlPosition[position]) { this.$log.error('mapControl: invalid position property'); return; } return IControl.mapPromise(scope, ctrl).then((function(_this) { return function(map) { var control, controlDiv; control = void 0; controlDiv = angular.element('<div></div>'); return $http.get(scope.template, { cache: $templateCache }).success(function(template) { var templateCtrl, templateScope; templateScope = scope.$new(); controlDiv.append(template); if (index) { controlDiv[0].index = index; } if (angular.isDefined(scope.controller)) { templateCtrl = $controller(scope.controller, { $scope: templateScope }); controlDiv.children().data('$ngControllerController', templateCtrl); } return control = $compile(controlDiv.contents())(templateScope); }).error(function(error) { return _this.$log.error('mapControl: template could not be found'); }).then(function() { return map.controls[google.maps.ControlPosition[position]].push(control[0]); }); }; })(this)); }; return Control; })(IControl); } ]); }).call(this); /* - Link up Polygons to be sent back to a controller - inject the draw function into a controllers scope so that controller can call the directive to draw on demand - draw function creates the DrawFreeHandChildModel which manages itself */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory('FreeDrawPolygons', [ 'Logger', 'BaseObject', 'CtrlHandle', 'DrawFreeHandChildModel', function($log, BaseObject, CtrlHandle, DrawFreeHandChildModel) { var FreeDrawPolygons; return FreeDrawPolygons = (function(_super) { __extends(FreeDrawPolygons, _super); function FreeDrawPolygons() { this.link = __bind(this.link, this); return FreeDrawPolygons.__super__.constructor.apply(this, arguments); } FreeDrawPolygons.include(CtrlHandle); FreeDrawPolygons.prototype.restrict = 'EA'; FreeDrawPolygons.prototype.replace = true; FreeDrawPolygons.prototype.require = '^googleMap'; FreeDrawPolygons.prototype.scope = { polygons: '=', draw: '=' }; FreeDrawPolygons.prototype.link = function(scope, element, attrs, ctrl) { return this.mapPromise(scope, ctrl).then((function(_this) { return function(map) { var freeHand, listener; if (!scope.polygons) { return $log.error("No polygons to bind to!"); } if (!_.isArray(scope.polygons)) { return $log.error("Free Draw Polygons must be of type Array!"); } freeHand = new DrawFreeHandChildModel(map, scope.originalMapOpts); listener = void 0; return scope.draw = function() { if (typeof listener === "function") { listener(); } return freeHand.engage(scope.polygons).then(function() { var firstTime; firstTime = true; return listener = scope.$watch('polygons', function(newValue, oldValue) { var removals; if (firstTime) { firstTime = false; return; } removals = _.differenceObjects(oldValue, newValue); return removals.forEach(function(p) { return p.setMap(null); }); }); }); }; }; })(this)); }; return FreeDrawPolygons; })(BaseObject); } ]); }).call(this); /* - interface for all controls to derive from - to enforce a minimum set of requirements - attributes - template - position - controller - index */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("IControl", [ "BaseObject", "Logger", "CtrlHandle", function(BaseObject, Logger, CtrlHandle) { var IControl; return IControl = (function(_super) { __extends(IControl, _super); IControl.extend(CtrlHandle); function IControl() { this.link = __bind(this.link, this); this.restrict = 'EA'; this.replace = true; this.require = '^googleMap'; this.scope = { template: '@template', position: '@position', controller: '@controller', index: '@index' }; this.$log = Logger; } IControl.prototype.link = function(scope, element, attrs, ctrl) { throw new Exception("Not implemented!!"); }; return IControl; })(BaseObject); } ]); }).call(this); /* - interface for all labels to derrive from - to enforce a minimum set of requirements - attributes - content - anchor - implementation needed on watches */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("ILabel", [ "BaseObject", "Logger", function(BaseObject, Logger) { var ILabel; return ILabel = (function(_super) { __extends(ILabel, _super); function ILabel($timeout) { this.link = __bind(this.link, this); var self; self = this; this.restrict = 'EMA'; this.replace = true; this.template = void 0; this.require = void 0; this.transclude = true; this.priority = -100; this.scope = { labelContent: '=content', labelAnchor: '@anchor', labelClass: '@class', labelStyle: '=style' }; this.$log = Logger; this.$timeout = $timeout; } ILabel.prototype.link = function(scope, element, attrs, ctrl) { throw new Exception("Not Implemented!!"); }; return ILabel; })(BaseObject); } ]); }).call(this); /* - interface for all markers to derrive from - to enforce a minimum set of requirements - attributes - coords - icon - implementation needed on watches */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("IMarker", [ "Logger", "BaseObject", "CtrlHandle", function(Logger, BaseObject, CtrlHandle) { var IMarker; return IMarker = (function(_super) { __extends(IMarker, _super); IMarker.extend(CtrlHandle); function IMarker() { this.link = __bind(this.link, this); this.$log = Logger; this.restrict = 'EMA'; this.require = '^googleMap'; this.priority = -1; this.transclude = true; this.replace = true; this.scope = { coords: '=coords', icon: '=icon', click: '&click', options: '=options', events: '=events', fit: '=fit', idKey: '=idkey', control: '=control' }; } IMarker.prototype.link = function(scope, element, attrs, ctrl) { if (!ctrl) { throw new Error("No Map Control! Marker Directive Must be inside the map!"); } }; return IMarker; })(BaseObject); } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("IPolyline", [ "GmapUtil", "BaseObject", "Logger", 'CtrlHandle', function(GmapUtil, BaseObject, Logger, CtrlHandle) { var IPolyline; return IPolyline = (function(_super) { __extends(IPolyline, _super); IPolyline.include(GmapUtil); IPolyline.extend(CtrlHandle); function IPolyline() {} IPolyline.prototype.restrict = "EA"; IPolyline.prototype.replace = true; IPolyline.prototype.require = "^googleMap"; IPolyline.prototype.scope = { path: "=", stroke: "=", clickable: "=", draggable: "=", editable: "=", geodesic: "=", icons: "=", visible: "=", "static": "=", fit: "=", events: "=" }; IPolyline.prototype.DEFAULTS = {}; IPolyline.prototype.$log = Logger; return IPolyline; })(BaseObject); } ]); }).call(this); /* - interface directive for all window(s) to derive from */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("IWindow", [ "BaseObject", "ChildEvents", "Logger", function(BaseObject, ChildEvents, Logger) { var IWindow; return IWindow = (function(_super) { __extends(IWindow, _super); IWindow.include(ChildEvents); function IWindow($timeout, $compile, $http, $templateCache) { this.$timeout = $timeout; this.$compile = $compile; this.$http = $http; this.$templateCache = $templateCache; this.link = __bind(this.link, this); this.restrict = 'EMA'; this.template = void 0; this.transclude = true; this.priority = -100; this.require = void 0; this.replace = true; this.scope = { coords: '=coords', show: '=show', templateUrl: '=templateurl', template: '=template', templateParameter: '=templateparameter', isIconVisibleOnClick: '=isiconvisibleonclick', closeClick: '&closeclick', options: '=options', control: '=control' }; this.$log = Logger; } IWindow.prototype.link = function(scope, element, attrs, ctrls) { throw new Exception("Not Implemented!!"); }; return IWindow; })(BaseObject); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("Map", [ "$timeout", '$q', 'Logger', "GmapUtil", "BaseObject", "ExtendGWin", "CtrlHandle", 'IsReady'.ns(), "uuid".ns(), function($timeout, $q, Logger, GmapUtil, BaseObject, ExtendGWin, CtrlHandle, IsReady, uuid) { "use strict"; var $log, DEFAULTS, Map; $log = Logger; DEFAULTS = { mapTypeId: google.maps.MapTypeId.ROADMAP }; return Map = (function(_super) { __extends(Map, _super); Map.include(GmapUtil); function Map() { this.link = __bind(this.link, this); var ctrlFn, self; ctrlFn = function($scope) { var ctrlObj; ctrlObj = CtrlHandle.handle($scope); $scope.ctrlType = 'Map'; $scope.deferred.promise.then(function() { return ExtendGWin.init(); }); ctrlObj.getMap = function() { return $scope.map; }; return _.extend(this, ctrlObj); }; this.controller = ["$scope", ctrlFn]; self = this; } Map.prototype.restrict = "EMA"; Map.prototype.transclude = true; Map.prototype.replace = false; Map.prototype.template = '<div class="angular-google-map"><div class="angular-google-map-container"></div><div ng-transclude style="display: none"></div></div>'; Map.prototype.scope = { center: "=", zoom: "=", dragging: "=", control: "=", windows: "=", options: "=", events: "=", styles: "=", draggable: "=", bounds: "=" }; /* @param scope @param element @param attrs */ Map.prototype.link = function(scope, element, attrs) { var dragging, el, eventName, getEventHandler, mapOptions, opts, resolveSpawned, settingCenterFromScope, spawned, type, _m; spawned = IsReady.spawn(); resolveSpawned = (function(_this) { return function() { return spawned.deferred.resolve({ instance: spawned.instance, map: _m }); }; })(this); if (!this.validateCoords(scope.center)) { $log.error("angular-google-maps: could not find a valid center property"); return; } if (!angular.isDefined(scope.zoom)) { $log.error("angular-google-maps: map zoom property not set"); return; } el = angular.element(element); el.addClass("angular-google-map"); opts = { options: {} }; if (attrs.options) { opts.options = scope.options; } if (attrs.styles) { opts.styles = scope.styles; } if (attrs.type) { type = attrs.type.toUpperCase(); if (google.maps.MapTypeId.hasOwnProperty(type)) { opts.mapTypeId = google.maps.MapTypeId[attrs.type.toUpperCase()]; } else { $log.error("angular-google-maps: invalid map type \"" + attrs.type + "\""); } } mapOptions = angular.extend({}, DEFAULTS, opts, { center: this.getCoords(scope.center), draggable: attrs.draggable != null ? this.isTrue(scope.draggable) : true, zoom: scope.zoom, bounds: scope.bounds }); _m = new google.maps.Map(el.find("div")[1], mapOptions); _m.nggmap_id = uuid.generate(); dragging = false; if (!_m) { google.maps.event.addListener(_m, 'tilesloaded ', function(map) { scope.deferred.resolve(map); return resolveSpawned(); }); } else { scope.deferred.resolve(_m); resolveSpawned(); } google.maps.event.addListener(_m, "dragstart", function() { dragging = true; return _.defer(function() { return scope.$apply(function(s) { if (s.dragging != null) { return s.dragging = dragging; } }); }); }); google.maps.event.addListener(_m, "dragend", function() { dragging = false; return _.defer(function() { return scope.$apply(function(s) { if (s.dragging != null) { return s.dragging = dragging; } }); }); }); google.maps.event.addListener(_m, "drag", function() { var c; c = _m.center; return _.defer(function() { return scope.$apply(function(s) { if (angular.isDefined(s.center.type)) { s.center.coordinates[1] = c.lat(); return s.center.coordinates[0] = c.lng(); } else { s.center.latitude = c.lat(); return s.center.longitude = c.lng(); } }); }); }); google.maps.event.addListener(_m, "zoom_changed", function() { if (scope.zoom !== _m.zoom) { return _.defer(function() { return scope.$apply(function(s) { return s.zoom = _m.zoom; }); }); } }); settingCenterFromScope = false; google.maps.event.addListener(_m, "center_changed", function() { var c; c = _m.center; if (settingCenterFromScope) { return; } return _.defer(function() { return scope.$apply(function(s) { if (!_m.dragging) { if (angular.isDefined(s.center.type)) { if (s.center.coordinates[1] !== c.lat()) { s.center.coordinates[1] = c.lat(); } if (s.center.coordinates[0] !== c.lng()) { return s.center.coordinates[0] = c.lng(); } } else { if (s.center.latitude !== c.lat()) { s.center.latitude = c.lat(); } if (s.center.longitude !== c.lng()) { return s.center.longitude = c.lng(); } } } }); }); }); google.maps.event.addListener(_m, "idle", function() { var b, ne, sw; b = _m.getBounds(); ne = b.getNorthEast(); sw = b.getSouthWest(); return _.defer(function() { return scope.$apply(function(s) { if (s.bounds !== null && s.bounds !== undefined && s.bounds !== void 0) { s.bounds.northeast = { latitude: ne.lat(), longitude: ne.lng() }; return s.bounds.southwest = { latitude: sw.lat(), longitude: sw.lng() }; } }); }); }); if (angular.isDefined(scope.events) && scope.events !== null && angular.isObject(scope.events)) { getEventHandler = function(eventName) { return function() { return scope.events[eventName].apply(scope, [_m, eventName, arguments]); }; }; for (eventName in scope.events) { if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName])) { google.maps.event.addListener(_m, eventName, getEventHandler(eventName)); } } } _m.getOptions = function() { return mapOptions; }; scope.map = _m; if ((attrs.control != null) && (scope.control != null)) { scope.control.refresh = (function(_this) { return function(maybeCoords) { var coords; if (_m == null) { return; } google.maps.event.trigger(_m, "resize"); if (((maybeCoords != null ? maybeCoords.latitude : void 0) != null) && ((maybeCoords != null ? maybeCoords.latitude : void 0) != null)) { coords = _this.getCoords(maybeCoords); if (_this.isTrue(attrs.pan)) { return _m.panTo(coords); } else { return _m.setCenter(coords); } } }; })(this); /* I am sure you all will love this. You want the instance here you go.. BOOM! */ scope.control.getGMap = (function(_this) { return function() { return _m; }; })(this); scope.control.getMapOptions = function() { return mapOptions; }; } scope.$watch("center", ((function(_this) { return function(newValue, oldValue) { var coords; coords = _this.getCoords(newValue); if (coords.lat() === _m.center.lat() && coords.lng() === _m.center.lng()) { return; } settingCenterFromScope = true; if (!dragging) { if (!_this.validateCoords(newValue)) { $log.error("Invalid center for newValue: " + (JSON.stringify(newValue))); } if (_this.isTrue(attrs.pan) && scope.zoom === _m.zoom) { _m.panTo(coords); } else { _m.setCenter(coords); } } return settingCenterFromScope = false; }; })(this)), true); scope.$watch("zoom", function(newValue, oldValue) { if (newValue === _m.zoom) { return; } return _.defer(function() { return _m.setZoom(newValue); }); }); scope.$watch("bounds", function(newValue, oldValue) { var bounds, ne, sw; if (newValue === oldValue) { return; } if ((newValue.northeast.latitude == null) || (newValue.northeast.longitude == null) || (newValue.southwest.latitude == null) || (newValue.southwest.longitude == null)) { $log.error("Invalid map bounds for new value: " + (JSON.stringify(newValue))); return; } ne = new google.maps.LatLng(newValue.northeast.latitude, newValue.northeast.longitude); sw = new google.maps.LatLng(newValue.southwest.latitude, newValue.southwest.longitude); bounds = new google.maps.LatLngBounds(sw, ne); return _m.fitBounds(bounds); }); scope.$watch("options", (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { opts.options = newValue; if (_m != null) { return _m.setOptions(opts); } } }; })(this), true); return scope.$watch("styles", (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { opts.styles = newValue; if (_m != null) { return _m.setOptions(opts); } } }; })(this), true); }; return Map; })(BaseObject); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("Marker", [ "IMarker", "MarkerParentModel", "MarkerManager", function(IMarker, MarkerParentModel, MarkerManager) { var Marker; return Marker = (function(_super) { __extends(Marker, _super); function Marker() { this.link = __bind(this.link, this); Marker.__super__.constructor.call(this); this.template = '<span class="angular-google-map-marker" ng-transclude></span>'; this.$log.info(this); } Marker.prototype.controller = [ '$scope', '$element', function($scope, $element) { $scope.ctrlType = 'Marker'; return _.extend(Marker, IMarker.handle($scope, $element)); } ]; Marker.prototype.link = function(scope, element, attrs, ctrl) { var doFit; if (scope.fit) { doFit = true; } return IMarker.mapPromise(scope, ctrl).then((function(_this) { return function(map) { if (!_this.gMarkerManager) { _this.gMarkerManager = new MarkerManager(map); } new MarkerParentModel(scope, element, attrs, map, _this.$timeout, _this.gMarkerManager, doFit); scope.deferred.resolve(); if (scope.control != null) { return scope.control.getGMarkers = _this.gMarkerManager.getGMarkers; } }; })(this)); }; return Marker; })(IMarker); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("Markers", [ "IMarker", "MarkersParentModel", function(IMarker, MarkersParentModel) { var Markers; return Markers = (function(_super) { __extends(Markers, _super); function Markers($timeout) { this.link = __bind(this.link, this); Markers.__super__.constructor.call(this, $timeout); this.template = '<span class="angular-google-map-markers" ng-transclude></span>'; this.scope = _.extend(this.scope || {}, { idKey: '=idkey', doRebuildAll: '=dorebuildall', models: '=models', doCluster: '=docluster', clusterOptions: '=clusteroptions', clusterEvents: '=clusterevents', isLabel: '=islabel' }); this.$timeout = $timeout; this.$log.info(this); } Markers.prototype.controller = [ '$scope', '$element', function($scope, $element) { $scope.ctrlType = 'Markers'; return _.extend(this, IMarker.handle($scope, $element)); } ]; Markers.prototype.link = function(scope, element, attrs, ctrl) { return IMarker.mapPromise(scope, ctrl).then((function(_this) { return function(map) { var parentModel; parentModel = new MarkersParentModel(scope, element, attrs, map, _this.$timeout); scope.deferred.resolve(); if (scope.control != null) { scope.control.getGMarkers = function() { var _ref; return (_ref = parentModel.gMarkerManager) != null ? _ref.getGMarkers() : void 0; }; return scope.control.getChildMarkers = function() { return parentModel.markerModels; }; } }; })(this)); }; return Markers; })(IMarker); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("Polyline", [ "IPolyline", "$timeout", "array-sync", "PolylineChildModel", function(IPolyline, $timeout, arraySync, PolylineChildModel) { var Polyline; return Polyline = (function(_super) { __extends(Polyline, _super); function Polyline() { this.link = __bind(this.link, this); return Polyline.__super__.constructor.apply(this, arguments); } Polyline.prototype.link = function(scope, element, attrs, mapCtrl) { if (angular.isUndefined(scope.path) || scope.path === null || !this.validatePath(scope.path)) { this.$log.error("polyline: no valid path attribute found"); return; } return IPolyline.mapPromise(scope, mapCtrl).then((function(_this) { return function(map) { return new PolylineChildModel(scope, attrs, map, _this.DEFAULTS); }; })(this)); }; return Polyline; })(IPolyline); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("Polylines", [ "IPolyline", "$timeout", "array-sync", "PolylinesParentModel", function(IPolyline, $timeout, arraySync, PolylinesParentModel) { var Polylines; return Polylines = (function(_super) { __extends(Polylines, _super); function Polylines() { this.link = __bind(this.link, this); Polylines.__super__.constructor.call(this); this.scope.idKey = '=idkey'; this.scope.models = '=models'; this.$log.info(this); } Polylines.prototype.link = function(scope, element, attrs, mapCtrl) { if (angular.isUndefined(scope.path) || scope.path === null) { this.$log.error("polylines: no valid path attribute found"); return; } if (!scope.models) { this.$log.error("polylines: no models found to create from"); return; } return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { return new PolylinesParentModel(scope, element, attrs, map, _this.DEFAULTS); }; })(this)); }; return Polylines; })(IPolyline); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("Window", [ "IWindow", "GmapUtil", "WindowChildModel", function(IWindow, GmapUtil, WindowChildModel) { var Window; return Window = (function(_super) { __extends(Window, _super); Window.include(GmapUtil); function Window($timeout, $compile, $http, $templateCache) { this.init = __bind(this.init, this); this.link = __bind(this.link, this); Window.__super__.constructor.call(this, $timeout, $compile, $http, $templateCache); this.require = ['^googleMap', '^?marker']; this.template = '<span class="angular-google-maps-window" ng-transclude></span>'; this.$log.info(this); this.childWindows = []; } Window.prototype.link = function(scope, element, attrs, ctrls) { var mapScope; mapScope = ctrls[0].getScope(); return mapScope.deferred.promise.then((function(_this) { return function(mapCtrl) { var isIconVisibleOnClick, markerCtrl, markerScope; isIconVisibleOnClick = true; if (angular.isDefined(attrs.isiconvisibleonclick)) { isIconVisibleOnClick = scope.isIconVisibleOnClick; } markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0; if (!markerCtrl) { _this.init(scope, element, isIconVisibleOnClick, mapCtrl); return; } markerScope = markerCtrl.getScope(); return markerScope.deferred.promise.then(function() { return _this.init(scope, element, isIconVisibleOnClick, mapCtrl, markerScope); }); }; })(this)); }; Window.prototype.init = function(scope, element, isIconVisibleOnClick, mapCtrl, markerScope) { var defaults, gMarker, hasScopeCoords, opts, window; defaults = scope.options != null ? scope.options : {}; hasScopeCoords = (scope != null) && this.validateCoords(scope.coords); if (markerScope != null) { gMarker = markerScope.gMarker; markerScope.$watch('coords', (function(_this) { return function(newValue, oldValue) { if ((markerScope.gMarker != null) && !window.markerCtrl) { window.markerCtrl = gMarker; window.handleClick(true); } if (!_this.validateCoords(newValue)) { return window.hideWindow(); } if (!angular.equals(newValue, oldValue)) { return window.getLatestPosition(_this.getCoords(newValue)); } }; })(this), true); } opts = hasScopeCoords ? this.createWindowOptions(gMarker, scope, element.html(), defaults) : defaults; if (mapCtrl != null) { window = new WindowChildModel({}, scope, opts, isIconVisibleOnClick, mapCtrl, gMarker, element); this.childWindows.push(window); scope.$on("$destroy", (function(_this) { return function() { return _this.childWindows = _.withoutObjects(_this.childWindows, [window], function(child1, child2) { return child1.scope.$id === child2.scope.$id; }); }; })(this)); } if (scope.control != null) { scope.control.getGWindows = (function(_this) { return function() { return _this.childWindows.map(function(child) { return child.gWin; }); }; })(this); scope.control.getChildWindows = (function(_this) { return function() { return _this.childWindows; }; })(this); } if ((this.onChildCreation != null) && (window != null)) { return this.onChildCreation(window); } }; return Window; })(IWindow); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api").factory("Windows", [ "IWindow", "WindowsParentModel", function(IWindow, WindowsParentModel) { /* Windows directive where many windows map to the models property */ var Windows; return Windows = (function(_super) { __extends(Windows, _super); function Windows($timeout, $compile, $http, $templateCache, $interpolate) { this.link = __bind(this.link, this); var self; Windows.__super__.constructor.call(this, $timeout, $compile, $http, $templateCache); self = this; this.$interpolate = $interpolate; this.require = ['^googleMap', '^?markers']; this.template = '<span class="angular-google-maps-windows" ng-transclude></span>'; this.scope.idKey = '=idkey'; this.scope.doRebuildAll = '=dorebuildall'; this.scope.models = '=models'; this.$log.info(this); } Windows.prototype.link = function(scope, element, attrs, ctrls) { var parentModel; parentModel = new WindowsParentModel(scope, element, attrs, ctrls, this.$timeout, this.$compile, this.$http, this.$templateCache, this.$interpolate); if (scope.control != null) { scope.control.getGWindows = (function(_this) { return function() { return parentModel.windows.map(function(child) { return child.gWin; }); }; })(this); return scope.control.getChildWindows = (function(_this) { return function() { return parentModel.windows; }; })(this); } }; return Windows; })(IWindow); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready Nick Baugh - https://github.com/niftylettuce */ (function() { angular.module("google-maps").directive("googleMap", [ "Map", function(Map) { return new Map(); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ /* Map marker directive This directive is used to create a marker on an existing map. This directive creates a new scope. {attribute coords required} object containing latitude and longitude properties {attribute icon optional} string url to image used for marker icon {attribute animate optional} if set to false, the marker won't be animated (on by default) */ (function() { angular.module("google-maps").directive("marker", [ "$timeout", "Marker", function($timeout, Marker) { return new Marker($timeout); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ /* Map marker directive This directive is used to create a marker on an existing map. This directive creates a new scope. {attribute coords required} object containing latitude and longitude properties {attribute icon optional} string url to image used for marker icon {attribute animate optional} if set to false, the marker won't be animated (on by default) */ (function() { angular.module("google-maps").directive("markers", [ "$timeout", "Markers", function($timeout, Markers) { return new Markers($timeout); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Bruno Queiroz, creativelikeadog@gmail.com */ /* Marker label directive This directive is used to create a marker label on an existing map. {attribute content required} content of the label {attribute anchor required} string that contains the x and y point position of the label {attribute class optional} class to DOM object {attribute style optional} style for the label */ /* Basic Directive api for a label. Basic in the sense that this directive contains 1:1 on scope and model. Thus there will be one html element per marker within the directive. */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps").directive("markerLabel", [ "$timeout", "ILabel", "MarkerLabelChildModel", "GmapUtil", "nggmap-PropertyAction", function($timeout, ILabel, MarkerLabelChildModel, GmapUtil, PropertyAction) { var Label; Label = (function(_super) { __extends(Label, _super); function Label($timeout) { this.init = __bind(this.init, this); this.link = __bind(this.link, this); var self; Label.__super__.constructor.call(this, $timeout); self = this; this.require = '^marker'; this.template = '<span class="angular-google-maps-marker-label" ng-transclude></span>'; this.$log.info(this); } Label.prototype.link = function(scope, element, attrs, ctrl) { var markerScope; markerScope = ctrl.getScope(); if (markerScope) { return markerScope.deferred.promise.then((function(_this) { return function() { return _this.init(markerScope, scope); }; })(this)); } }; Label.prototype.init = function(markerScope, scope) { var createLabel, isFirstSet, label; label = null; createLabel = function() { if (!label) { return label = new MarkerLabelChildModel(markerScope.gMarker, scope, markerScope.map); } }; isFirstSet = true; return markerScope.$watch('gMarker', function(newVal, oldVal) { var anchorAction, classAction, contentAction, styleAction; if (markerScope.gMarker != null) { contentAction = new PropertyAction(function(newVal) { createLabel(); if (scope.labelContent) { return label != null ? label.setOption('labelContent', scope.labelContent) : void 0; } }, isFirstSet); anchorAction = new PropertyAction(function(newVal) { createLabel(); return label != null ? label.setOption('labelAnchor', scope.labelAnchor) : void 0; }, isFirstSet); classAction = new PropertyAction(function(newVal) { createLabel(); return label != null ? label.setOption('labelClass', scope.labelClass) : void 0; }, isFirstSet); styleAction = new PropertyAction(function(newVal) { createLabel(); return label != null ? label.setOption('labelStyle', scope.labelStyle) : void 0; }, isFirstSet); scope.$watch('labelContent', contentAction.sic); scope.$watch('labelAnchor', anchorAction.sic); scope.$watch('labelClass', classAction.sic); scope.$watch('labelStyle', styleAction.sic); isFirstSet = false; } return scope.$on('$destroy', function() { return label != null ? label.destroy() : void 0; }); }); }; return Label; })(ILabel); return new Label($timeout); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready Rick Huizinga - https://plus.google.com/+RickHuizinga */ (function() { angular.module("google-maps").directive("polygon", [ "$log", "$timeout", "array-sync", "GmapUtil", function($log, $timeout, arraySync, GmapUtil) { /* Check if a value is true */ var DEFAULTS, isTrue; isTrue = function(val) { return angular.isDefined(val) && val !== null && val === true || val === "1" || val === "y" || val === "true"; }; "use strict"; DEFAULTS = {}; return { restrict: "EA", replace: true, require: "^googleMap", scope: { path: "=path", stroke: "=stroke", clickable: "=", draggable: "=", editable: "=", geodesic: "=", fill: "=", icons: "=icons", visible: "=", "static": "=", events: "=", zIndex: "=zindex", fit: "=" }, link: function(scope, element, attrs, mapCtrl) { if (angular.isUndefined(scope.path) || scope.path === null || !GmapUtil.validatePath(scope.path)) { $log.error("polygon: no valid path attribute found"); return; } return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { var arraySyncer, buildOpts, eventName, getEventHandler, pathPoints, polygon; buildOpts = function(pathPoints) { var opts; opts = angular.extend({}, DEFAULTS, { map: map, path: pathPoints, strokeColor: scope.stroke && scope.stroke.color, strokeOpacity: scope.stroke && scope.stroke.opacity, strokeWeight: scope.stroke && scope.stroke.weight, fillColor: scope.fill && scope.fill.color, fillOpacity: scope.fill && scope.fill.opacity }); angular.forEach({ clickable: true, draggable: false, editable: false, geodesic: false, visible: true, "static": false, fit: false, zIndex: 0 }, function(defaultValue, key) { if (angular.isUndefined(scope[key]) || scope[key] === null) { return opts[key] = defaultValue; } else { return opts[key] = scope[key]; } }); if (opts["static"]) { opts.editable = false; } return opts; }; pathPoints = GmapUtil.convertPathPoints(scope.path); polygon = new google.maps.Polygon(buildOpts(pathPoints)); if (scope.fit) { GmapUtil.extendMapBounds(map, pathPoints); } if (!scope["static"] && angular.isDefined(scope.editable)) { scope.$watch("editable", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setEditable(newValue); } }); } if (angular.isDefined(scope.draggable)) { scope.$watch("draggable", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setDraggable(newValue); } }); } if (angular.isDefined(scope.visible)) { scope.$watch("visible", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setVisible(newValue); } }); } if (angular.isDefined(scope.geodesic)) { scope.$watch("geodesic", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(buildOpts(polygon.getPath())); } }); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.opacity)) { scope.$watch("stroke.opacity", function(newValue, oldValue) { return polygon.setOptions(buildOpts(polygon.getPath())); }); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.weight)) { scope.$watch("stroke.weight", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(buildOpts(polygon.getPath())); } }); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.color)) { scope.$watch("stroke.color", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(buildOpts(polygon.getPath())); } }); } if (angular.isDefined(scope.fill) && angular.isDefined(scope.fill.color)) { scope.$watch("fill.color", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(buildOpts(polygon.getPath())); } }); } if (angular.isDefined(scope.fill) && angular.isDefined(scope.fill.opacity)) { scope.$watch("fill.opacity", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(buildOpts(polygon.getPath())); } }); } if (angular.isDefined(scope.zIndex)) { scope.$watch("zIndex", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(buildOpts(polygon.getPath())); } }); } if (angular.isDefined(scope.events) && scope.events !== null && angular.isObject(scope.events)) { getEventHandler = function(eventName) { return function() { return scope.events[eventName].apply(scope, [polygon, eventName, arguments]); }; }; for (eventName in scope.events) { if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName])) { polygon.addListener(eventName, getEventHandler(eventName)); } } } arraySyncer = arraySync(polygon.getPath(), scope, "path", function(pathPoints) { if (scope.fit) { return GmapUtil.extendMapBounds(map, pathPoints); } }); return scope.$on("$destroy", function() { polygon.setMap(null); if (arraySyncer) { arraySyncer(); return arraySyncer = null; } }); }; })(this)); } }; } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @authors Julian Popescu - https://github.com/jpopesculian Rick Huizinga - https://plus.google.com/+RickHuizinga */ (function() { angular.module("google-maps").directive("circle", [ "$log", "$timeout", "GmapUtil", "EventsHelper", function($log, $timeout, GmapUtil, EventsHelper) { "use strict"; var DEFAULTS; DEFAULTS = {}; return { restrict: "EA", replace: true, require: "^googleMap", scope: { center: "=center", radius: "=radius", stroke: "=stroke", fill: "=fill", clickable: "=", draggable: "=", editable: "=", geodesic: "=", icons: "=icons", visible: "=", events: "=" }, link: function(scope, element, attrs, mapCtrl) { return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { var buildOpts, circle; buildOpts = function() { var opts; if (!GmapUtil.validateCoords(scope.center)) { $log.error("circle: no valid center attribute found"); return; } opts = angular.extend({}, DEFAULTS, { map: map, center: GmapUtil.getCoords(scope.center), radius: scope.radius, strokeColor: scope.stroke && scope.stroke.color, strokeOpacity: scope.stroke && scope.stroke.opacity, strokeWeight: scope.stroke && scope.stroke.weight, fillColor: scope.fill && scope.fill.color, fillOpacity: scope.fill && scope.fill.opacity }); angular.forEach({ clickable: true, draggable: false, editable: false, geodesic: false, visible: true }, function(defaultValue, key) { if (angular.isUndefined(scope[key]) || scope[key] === null) { return opts[key] = defaultValue; } else { return opts[key] = scope[key]; } }); return opts; }; circle = new google.maps.Circle(buildOpts()); scope.$watchCollection('center', function(newVals, oldVals) { if (newVals !== oldVals) { return circle.setOptions(buildOpts()); } }); scope.$watchCollection('stroke', function(newVals, oldVals) { if (newVals !== oldVals) { return circle.setOptions(buildOpts()); } }); scope.$watchCollection('fill', function(newVals, oldVals) { if (newVals !== oldVals) { return circle.setOptions(buildOpts()); } }); scope.$watch('radius', function(newVal, oldVal) { if (newVal !== oldVal) { return circle.setOptions(buildOpts()); } }); scope.$watch('clickable', function(newVal, oldVal) { if (newVal !== oldVal) { return circle.setOptions(buildOpts()); } }); scope.$watch('editable', function(newVal, oldVal) { if (newVal !== oldVal) { return circle.setOptions(buildOpts()); } }); scope.$watch('draggable', function(newVal, oldVal) { if (newVal !== oldVal) { return circle.setOptions(buildOpts()); } }); scope.$watch('visible', function(newVal, oldVal) { if (newVal !== oldVal) { return circle.setOptions(buildOpts()); } }); scope.$watch('geodesic', function(newVal, oldVal) { if (newVal !== oldVal) { return circle.setOptions(buildOpts()); } }); EventsHelper.setEvents(circle, scope, scope); google.maps.event.addListener(circle, 'radius_changed', function() { scope.radius = circle.getRadius(); return $timeout(function() { return scope.$apply(); }); }); google.maps.event.addListener(circle, 'center_changed', function() { if (angular.isDefined(scope.center.type)) { scope.center.coordinates[1] = circle.getCenter().lat(); scope.center.coordinates[0] = circle.getCenter().lng(); } else { scope.center.latitude = circle.getCenter().lat(); scope.center.longitude = circle.getCenter().lng(); } return $timeout(function() { return scope.$apply(); }); }); return scope.$on("$destroy", function() { return circle.setMap(null); }); }; })(this)); } }; } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ (function() { angular.module("google-maps").directive("polyline", [ "Polyline", function(Polyline) { return new Polyline(); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ (function() { angular.module("google-maps").directive("polylines", [ "Polylines", function(Polylines) { return new Polylines(); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready Chentsu Lin - https://github.com/ChenTsuLin */ (function() { angular.module("google-maps").directive("rectangle", [ "$log", "$timeout", function($log, $timeout) { var DEFAULTS, convertBoundPoints, fitMapBounds, isTrue, validateBoundPoints; validateBoundPoints = function(bounds) { if (angular.isUndefined(bounds.sw.latitude) || angular.isUndefined(bounds.sw.longitude) || angular.isUndefined(bounds.ne.latitude) || angular.isUndefined(bounds.ne.longitude)) { return false; } return true; }; convertBoundPoints = function(bounds) { var result; result = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.sw.latitude, bounds.sw.longitude), new google.maps.LatLng(bounds.ne.latitude, bounds.ne.longitude)); return result; }; fitMapBounds = function(map, bounds) { return map.fitBounds(bounds); }; /* Check if a value is true */ isTrue = function(val) { return angular.isDefined(val) && val !== null && val === true || val === "1" || val === "y" || val === "true"; }; "use strict"; DEFAULTS = {}; return { restrict: "ECA", require: "^googleMap", replace: true, scope: { bounds: "=", stroke: "=", clickable: "=", draggable: "=", editable: "=", fill: "=", visible: "=" }, link: function(scope, element, attrs, mapCtrl) { if (angular.isUndefined(scope.bounds) || scope.bounds === null || angular.isUndefined(scope.bounds.sw) || scope.bounds.sw === null || angular.isUndefined(scope.bounds.ne) || scope.bounds.ne === null || !validateBoundPoints(scope.bounds)) { $log.error("rectangle: no valid bound attribute found"); return; } return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { var buildOpts, dragging, rectangle, settingBoundsFromScope; buildOpts = function(bounds) { var opts; opts = angular.extend({}, DEFAULTS, { map: map, bounds: bounds, strokeColor: scope.stroke && scope.stroke.color, strokeOpacity: scope.stroke && scope.stroke.opacity, strokeWeight: scope.stroke && scope.stroke.weight, fillColor: scope.fill && scope.fill.color, fillOpacity: scope.fill && scope.fill.opacity }); angular.forEach({ clickable: true, draggable: false, editable: false, visible: true }, function(defaultValue, key) { if (angular.isUndefined(scope[key]) || scope[key] === null) { return opts[key] = defaultValue; } else { return opts[key] = scope[key]; } }); return opts; }; rectangle = new google.maps.Rectangle(buildOpts(convertBoundPoints(scope.bounds))); if (isTrue(attrs.fit)) { fitMapBounds(map, bounds); } dragging = false; google.maps.event.addListener(rectangle, "mousedown", function() { google.maps.event.addListener(rectangle, "mousemove", function() { dragging = true; return _.defer(function() { return scope.$apply(function(s) { if (s.dragging != null) { return s.dragging = dragging; } }); }); }); google.maps.event.addListener(rectangle, "mouseup", function() { google.maps.event.clearListeners(rectangle, 'mousemove'); google.maps.event.clearListeners(rectangle, 'mouseup'); dragging = false; return _.defer(function() { return scope.$apply(function(s) { if (s.dragging != null) { return s.dragging = dragging; } }); }); }); }); settingBoundsFromScope = false; google.maps.event.addListener(rectangle, "bounds_changed", function() { var b, ne, sw; b = rectangle.getBounds(); ne = b.getNorthEast(); sw = b.getSouthWest(); if (settingBoundsFromScope) { return; } return _.defer(function() { return scope.$apply(function(s) { if (!rectangle.dragging) { if (s.bounds !== null && s.bounds !== undefined && s.bounds !== void 0) { s.bounds.ne = { latitude: ne.lat(), longitude: ne.lng() }; s.bounds.sw = { latitude: sw.lat(), longitude: sw.lng() }; } } }); }); }); scope.$watch("bounds", (function(newValue, oldValue) { var bounds; if (_.isEqual(newValue, oldValue)) { return; } settingBoundsFromScope = true; if (!dragging) { if ((newValue.sw.latitude == null) || (newValue.sw.longitude == null) || (newValue.ne.latitude == null) || (newValue.ne.longitude == null)) { $log.error("Invalid bounds for newValue: " + (JSON.stringify(newValue))); } bounds = new google.maps.LatLngBounds(new google.maps.LatLng(newValue.sw.latitude, newValue.sw.longitude), new google.maps.LatLng(newValue.ne.latitude, newValue.ne.longitude)); rectangle.setBounds(bounds); } return settingBoundsFromScope = false; }), true); if (angular.isDefined(scope.editable)) { scope.$watch("editable", function(newValue, oldValue) { return rectangle.setEditable(newValue); }); } if (angular.isDefined(scope.draggable)) { scope.$watch("draggable", function(newValue, oldValue) { return rectangle.setDraggable(newValue); }); } if (angular.isDefined(scope.visible)) { scope.$watch("visible", function(newValue, oldValue) { return rectangle.setVisible(newValue); }); } if (angular.isDefined(scope.stroke)) { if (angular.isDefined(scope.stroke.color)) { scope.$watch("stroke.color", function(newValue, oldValue) { return rectangle.setOptions(buildOpts(rectangle.getBounds())); }); } if (angular.isDefined(scope.stroke.weight)) { scope.$watch("stroke.weight", function(newValue, oldValue) { return rectangle.setOptions(buildOpts(rectangle.getBounds())); }); } if (angular.isDefined(scope.stroke.opacity)) { scope.$watch("stroke.opacity", function(newValue, oldValue) { return rectangle.setOptions(buildOpts(rectangle.getBounds())); }); } } if (angular.isDefined(scope.fill)) { if (angular.isDefined(scope.fill.color)) { scope.$watch("fill.color", function(newValue, oldValue) { return rectangle.setOptions(buildOpts(rectangle.getBounds())); }); } if (angular.isDefined(scope.fill.opacity)) { scope.$watch("fill.opacity", function(newValue, oldValue) { return rectangle.setOptions(buildOpts(rectangle.getBounds())); }); } } return scope.$on("$destroy", function() { return rectangle.setMap(null); }); }; })(this)); } }; } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ /* Map info window directive This directive is used to create an info window on an existing map. This directive creates a new scope. {attribute coords required} object containing latitude and longitude properties {attribute show optional} map will show when this expression returns true */ (function() { angular.module("google-maps").directive("window", [ "$timeout", "$compile", "$http", "$templateCache", "Window", function($timeout, $compile, $http, $templateCache, Window) { return new Window($timeout, $compile, $http, $templateCache); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ /* Map info window directive This directive is used to create an info window on an existing map. This directive creates a new scope. {attribute coords required} object containing latitude and longitude properties {attribute show optional} map will show when this expression returns true */ (function() { angular.module("google-maps").directive("windows", [ "$timeout", "$compile", "$http", "$templateCache", "$interpolate", "Windows", function($timeout, $compile, $http, $templateCache, $interpolate, Windows) { return new Windows($timeout, $compile, $http, $templateCache, $interpolate); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors: - Nicolas Laplante https://plus.google.com/108189012221374960701 - Nicholas McCready - https://twitter.com/nmccready */ /* Map Layer directive This directive is used to create any type of Layer from the google maps sdk. This directive creates a new scope. {attribute show optional} true (default) shows the trafficlayer otherwise it is hidden */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; angular.module("google-maps").directive("layer", [ "$timeout", "Logger", "LayerParentModel", function($timeout, Logger, LayerParentModel) { var Layer; Layer = (function() { function Layer() { this.link = __bind(this.link, this); this.$log = Logger; this.restrict = "EMA"; this.require = "^googleMap"; this.priority = -1; this.transclude = true; this.template = '<span class=\"angular-google-map-layer\" ng-transclude></span>'; this.replace = true; this.scope = { show: "=show", type: "=type", namespace: "=namespace", options: '=options', onCreated: '&oncreated' }; } Layer.prototype.link = function(scope, element, attrs, mapCtrl) { return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { if (scope.onCreated != null) { return new LayerParentModel(scope, element, attrs, map, scope.onCreated); } else { return new LayerParentModel(scope, element, attrs, map); } }; })(this)); }; return Layer; })(); return new Layer(); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Adam Kreitals, kreitals@hotmail.com */ /* mapControl directive This directive is used to create a custom control element on an existing map. This directive creates a new scope. {attribute template required} string url of the template to be used for the control {attribute position optional} string position of the control of the form top-left or TOP_LEFT defaults to TOP_CENTER {attribute controller optional} string controller to be applied to the template {attribute index optional} number index for controlling the order of similarly positioned mapControl elements */ (function() { angular.module("google-maps").directive("mapControl", [ "Control", function(Control) { return new Control(); } ]); }).call(this); /* angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicholas McCready - https://twitter.com/nmccready * Brunt of the work is in DrawFreeHandChildModel */ (function() { angular.module('google-maps').directive('FreeDrawPolygons'.ns(), [ 'FreeDrawPolygons', function(FreeDrawPolygons) { return new FreeDrawPolygons(); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors: - Nicolas Laplante https://plus.google.com/108189012221374960701 - Nicholas McCready - https://twitter.com/nmccready */ /* Map Layer directive This directive is used to create any type of Layer from the google maps sdk. This directive creates a new scope. {attribute show optional} true (default) shows the trafficlayer otherwise it is hidden */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; angular.module("google-maps").directive("mapType", [ "$timeout", "Logger", "MapTypeParentModel", function($timeout, Logger, MapTypeParentModel) { var MapType; MapType = (function() { function MapType() { this.link = __bind(this.link, this); this.$log = Logger; this.restrict = "EMA"; this.require = '^' + 'googleMap'; this.priority = -1; this.transclude = true; this.template = '<span class=\"angular-google-map-layer\" ng-transclude></span>'; this.replace = true; this.scope = { show: "=show", options: '=options', refresh: '=refresh', id: '@' }; } MapType.prototype.link = function(scope, element, attrs, mapCtrl) { return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { return new MapTypeParentModel(scope, element, attrs, map); }; })(this)); }; return MapType; })(); return new MapType(); } ]); }).call(this); ;angular.module("google-maps.wrapped").service("uuid".ns(), function(){ /* Version: core-1.0 The MIT License: Copyright (c) 2012 LiosK. */ function UUID(){}UUID.generate=function(){var a=UUID._gri,b=UUID._ha;return b(a(32),8)+"-"+b(a(16),4)+"-"+b(16384|a(12),4)+"-"+b(32768|a(14),4)+"-"+b(a(48),12)};UUID._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<<a):53>=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<<a-30)):NaN};UUID._ha=function(a,b){for(var c=a.toString(16),d=b-c.length,e="0";0<d;d>>>=1,e+=e)d&1&&(c=e+c);return c}; return UUID; });;/** * Performance overrides on MarkerClusterer custom to Angular Google Maps * * Created by Petr Bruna ccg1415 and Nick McCready on 7/13/14. */ (function () { var __hasProp = {}.hasOwnProperty, __extends = function (child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; window.NgMapCluster = (function (_super) { __extends(NgMapCluster, _super); function NgMapCluster(opts) { NgMapCluster.__super__.constructor.call(this, opts); this.markers_ = new window.PropMap(); } /** * Adds a marker to the cluster. * * @param {google.maps.Marker} marker The marker to be added. * @return {boolean} True if the marker was added. * @ignore */ NgMapCluster.prototype.addMarker = function (marker) { var i; var mCount; var mz; if (this.isMarkerAlreadyAdded_(marker)) { var oldMarker = this.markers_.get(marker.key); if (oldMarker.getPosition().lat() == marker.getPosition().lat() && oldMarker.getPosition().lon() == marker.getPosition().lon()) //if nothing has changed return false; } if (!this.center_) { this.center_ = marker.getPosition(); this.calculateBounds_(); } else { if (this.averageCenter_) { var l = this.markers_.length + 1; var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l; var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l; this.center_ = new google.maps.LatLng(lat, lng); this.calculateBounds_(); } } marker.isAdded = true; this.markers_.push(marker); mCount = this.markers_.length; mz = this.markerClusterer_.getMaxZoom(); if (mz !== null && this.map_.getZoom() > mz) { // Zoomed in past max zoom, so show the marker. if (marker.getMap() !== this.map_) { marker.setMap(this.map_); } } else if (mCount < this.minClusterSize_) { // Min cluster size not reached so show the marker. if (marker.getMap() !== this.map_) { marker.setMap(this.map_); } } else if (mCount === this.minClusterSize_) { // Hide the markers that were showing. this.markers_.values().forEach(function(m){ m.setMap(null); }); } else { marker.setMap(null); } // this.updateIcon_(); return true; }; /** * Determines if a marker has already been added to the cluster. * * @param {google.maps.Marker} marker The marker to check. * @return {boolean} True if the marker has already been added. */ NgMapCluster.prototype.isMarkerAlreadyAdded_ = function (marker) { return _.isNullOrUndefined(this.markers_.get(marker.key)); }; /** * Returns the bounds of the cluster. * * @return {google.maps.LatLngBounds} the cluster bounds. * @ignore */ NgMapCluster.prototype.getBounds = function () { var i; var bounds = new google.maps.LatLngBounds(this.center_, this.center_); var markers = this.getMarkers().values(); for (i = 0; i < markers.length; i++) { bounds.extend(markers[i].getPosition()); } return bounds; }; /** * Removes the cluster from the map. * * @ignore */ NgMapCluster.prototype.remove = function () { this.clusterIcon_.setMap(null); this.markers_ = new PropMap(); delete this.markers_; }; return NgMapCluster; })(Cluster); window.NgMapMarkerClusterer = (function (_super) { __extends(NgMapMarkerClusterer, _super); function NgMapMarkerClusterer(map, opt_markers, opt_options) { NgMapMarkerClusterer.__super__.constructor.call(this, map, opt_markers, opt_options); this.markers_ = new window.PropMap(); } /** * Removes all clusters and markers from the map and also removes all markers * managed by the clusterer. */ NgMapMarkerClusterer.prototype.clearMarkers = function () { this.resetViewport_(true); this.markers_ = new PropMap(); }; /** * Removes a marker and returns true if removed, false if not. * * @param {google.maps.Marker} marker The marker to remove * @return {boolean} Whether the marker was removed or not */ NgMapMarkerClusterer.prototype.removeMarker_ = function (marker) { if (!this.markers_.get(marker.key)) { return false; } marker.setMap(null); this.markers_.remove(marker.key); // Remove the marker from the list of managed markers return true; }; /** * Creates the clusters. This is done in batches to avoid timeout errors * in some browsers when there is a huge number of markers. * * @param {number} iFirst The index of the first marker in the batch of * markers to be added to clusters. */ NgMapMarkerClusterer.prototype.createClusters_ = function (iFirst) { var i, marker; var mapBounds; var cMarkerClusterer = this; if (!this.ready_) { return; } // Cancel previous batch processing if we're working on the first batch: if (iFirst === 0) { /** * This event is fired when the <code>MarkerClusterer</code> begins * clustering markers. * @name MarkerClusterer#clusteringbegin * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. * @event */ google.maps.event.trigger(this, "clusteringbegin", this); if (typeof this.timerRefStatic !== "undefined") { clearTimeout(this.timerRefStatic); delete this.timerRefStatic; } } // Get our current map view bounds. // Create a new bounds object so we don't affect the map. // // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug: if (this.getMap().getZoom() > 3) { mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), this.getMap().getBounds().getNorthEast()); } else { mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625)); } var bounds = this.getExtendedBounds(mapBounds); var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length); for (i = iFirst; i < iLast; i++) { marker = this.markers_.values()[i]; if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) { if (!this.ignoreHidden_ || (this.ignoreHidden_ && marker.getVisible())) { this.addToClosestCluster_(marker); } } } if (iLast < this.markers_.length) { this.timerRefStatic = setTimeout(function () { cMarkerClusterer.createClusters_(iLast); }, 0); } else { // custom addition by ngmaps // update icon for all clusters for (i = 0; i < this.clusters_.length; i++) { this.clusters_[i].updateIcon_(); } delete this.timerRefStatic; /** * This event is fired when the <code>MarkerClusterer</code> stops * clustering markers. * @name MarkerClusterer#clusteringend * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. * @event */ google.maps.event.trigger(this, "clusteringend", this); } }; /** * Adds a marker to a cluster, or creates a new cluster. * * @param {google.maps.Marker} marker The marker to add. */ NgMapMarkerClusterer.prototype.addToClosestCluster_ = function (marker) { var i, d, cluster, center; var distance = 40000; // Some large number var clusterToAddTo = null; for (i = 0; i < this.clusters_.length; i++) { cluster = this.clusters_[i]; center = cluster.getCenter(); if (center) { d = this.distanceBetweenPoints_(center, marker.getPosition()); if (d < distance) { distance = d; clusterToAddTo = cluster; } } } if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) { clusterToAddTo.addMarker(marker); } else { cluster = new NgMapCluster(this); cluster.addMarker(marker); this.clusters_.push(cluster); } }; /** * Redraws all the clusters. */ NgMapMarkerClusterer.prototype.redraw_ = function () { this.createClusters_(0); }; /** * Removes all clusters from the map. The markers are also removed from the map * if <code>opt_hide</code> is set to <code>true</code>. * * @param {boolean} [opt_hide] Set to <code>true</code> to also remove the markers * from the map. */ NgMapMarkerClusterer.prototype.resetViewport_ = function (opt_hide) { var i, marker; // Remove all the clusters for (i = 0; i < this.clusters_.length; i++) { this.clusters_[i].remove(); } this.clusters_ = []; // Reset the markers to not be added and to be removed from the map. this.markers_.values().forEach(function (marker) { marker.isAdded = false; if (opt_hide) { marker.setMap(null); } }); }; /** * Extends an object's prototype by another's. * * @param {Object} obj1 The object to be extended. * @param {Object} obj2 The object to extend with. * @return {Object} The new extended object. * @ignore */ MarkerClusterer.prototype.extend = function (obj1, obj2) { return (function (object) { var property; for (property in object.prototype) { if(property !== 'constructor') this.prototype[property] = object.prototype[property]; } return this; }).apply(obj1, [obj2]); }; return NgMapMarkerClusterer; })(MarkerClusterer); }).call(this);
example/src/App.js
Tom910/react-async-loading
import React, { Component } from 'react'; import Button from './components/Button/ButtonAsync.js'; import Link from './components/Link/LinkAsync.js'; export default class App extends Component { render() { return ( <div> Test: <Button>BUTTON</Button> <Link href='http://google.com'>LINK</Link> </div> ); } }
ajax/libs/yui/3.5.1/event-focus/event-focus-min.js
CrossEye/cdnjs
YUI.add("event-focus",function(f){var d=f.Event,c=f.Lang,a=c.isString,e=f.Array.indexOf,b=c.isFunction(f.DOM.create('<p onbeforeactivate=";"/>').onbeforeactivate);function g(i,h,k){var j="_"+i+"Notifiers";f.Event.define(i,{_attach:function(m,n,l){if(f.DOM.isWindow(m)){return d._attach([i,function(o){n.fire(o);},m]);}else{return d._attach([h,this._proxy,m,this,n,l],{capture:true});}},_proxy:function(o,s,q){var p=o.target,m=o.currentTarget,r=p.getData(j),t=f.stamp(m._node),l=(b||p!==m),n;s.currentTarget=(q)?p:m;s.container=(q)?m:null;if(!r){r={};p.setData(j,r);if(l){n=d._attach([k,this._notify,p._node]).sub;n.once=true;}}else{l=true;}if(!r[t]){r[t]=[];}r[t].push(s);if(!l){this._notify(o);}},_notify:function(w,q){var C=w.currentTarget,l=C.getData(j),x=C.ancestors(),B=C.get("ownerDocument"),s=[],m=l?f.Object.keys(l).length:0,A,r,t,n,o,y,u,v,p,z;C.clearData(j);x.push(C);if(B){x.unshift(B);}x._nodes.reverse();y=m;x.some(function(H){var G=f.stamp(H),E=l[G],F,D;if(E){m--;for(F=0,D=E.length;F<D;++F){if(E[F].handle.sub.filter){s.push(E[F]);}}}return !m;});m=y;while(m&&(A=x.shift())){n=f.stamp(A);r=l[n];if(r){for(u=0,v=r.length;u<v;++u){t=r[u];p=t.handle.sub;o=true;w.currentTarget=A;if(p.filter){o=p.filter.apply(A,[A,w].concat(p.args||[]));s.splice(e(s,t),1);}if(o){w.container=t.container;z=t.fire(w);}if(z===false||w.stopped===2){break;}}delete r[n];m--;}if(w.stopped!==2){for(u=0,v=s.length;u<v;++u){t=s[u];p=t.handle.sub;if(p.filter.apply(A,[A,w].concat(p.args||[]))){w.container=t.container;w.currentTarget=A;z=t.fire(w);}if(z===false||w.stopped===2){break;}}}if(w.stopped){break;}}},on:function(n,l,m){l.handle=this._attach(n._node,m);},detach:function(m,l){l.handle.detach();},delegate:function(o,m,n,l){if(a(l)){m.filter=function(p){return f.Selector.test(p._node,l,o===p?null:o._node);};}m.handle=this._attach(o._node,n,true);},detachDelegate:function(m,l){l.handle.detach();}},true);}if(b){g("focus","beforeactivate","focusin");g("blur","beforedeactivate","focusout");}else{g("focus","focus","focus");g("blur","blur","blur");}},"@VERSION@",{requires:["event-synthetic"]});
packages/react-art/src/ReactART.js
rickbeerendonk/react
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import ReactVersion from 'shared/ReactVersion'; import {LegacyRoot} from 'shared/ReactRootTags'; import { createContainer, updateContainer, injectIntoDevTools, } from 'react-reconciler/inline.art'; import Transform from 'art/core/transform'; import Mode from 'art/modes/current'; import FastNoSideEffects from 'art/modes/fast-noSideEffects'; import {TYPES, childrenAsString} from './ReactARTInternals'; Mode.setCurrent( // Change to 'art/modes/dom' for easier debugging via SVG FastNoSideEffects, ); /** Declarative fill-type objects; API design not finalized */ const slice = Array.prototype.slice; class LinearGradient { constructor(stops, x1, y1, x2, y2) { this._args = slice.call(arguments); } applyFill(node) { node.fillLinear.apply(node, this._args); } } class RadialGradient { constructor(stops, fx, fy, rx, ry, cx, cy) { this._args = slice.call(arguments); } applyFill(node) { node.fillRadial.apply(node, this._args); } } class Pattern { constructor(url, width, height, left, top) { this._args = slice.call(arguments); } applyFill(node) { node.fillImage.apply(node, this._args); } } /** React Components */ class Surface extends React.Component { componentDidMount() { const {height, width} = this.props; this._surface = Mode.Surface(+width, +height, this._tagRef); this._mountNode = createContainer(this._surface, LegacyRoot, false, null); updateContainer(this.props.children, this._mountNode, this); } componentDidUpdate(prevProps, prevState) { const props = this.props; if (props.height !== prevProps.height || props.width !== prevProps.width) { this._surface.resize(+props.width, +props.height); } updateContainer(this.props.children, this._mountNode, this); if (this._surface.render) { this._surface.render(); } } componentWillUnmount() { updateContainer(null, this._mountNode, this); } render() { // This is going to be a placeholder because we don't know what it will // actually resolve to because ART may render canvas, vml or svg tags here. // We only allow a subset of properties since others might conflict with // ART's properties. const props = this.props; // TODO: ART's Canvas Mode overrides surface title and cursor const Tag = Mode.Surface.tagName; return ( <Tag ref={ref => (this._tagRef = ref)} accessKey={props.accessKey} className={props.className} draggable={props.draggable} role={props.role} style={props.style} tabIndex={props.tabIndex} title={props.title} /> ); } } class Text extends React.Component { constructor(props) { super(props); // We allow reading these props. Ideally we could expose the Text node as // ref directly. ['height', 'width', 'x', 'y'].forEach(key => { Object.defineProperty(this, key, { get: function() { return this._text ? this._text[key] : undefined; }, }); }); } render() { // This means you can't have children that render into strings... const T = TYPES.TEXT; return ( <T {...this.props} ref={t => (this._text = t)}> {childrenAsString(this.props.children)} </T> ); } } injectIntoDevTools({ findFiberByHostInstance: () => null, bundleType: __DEV__ ? 1 : 0, version: ReactVersion, rendererPackageName: 'react-art', }); /** API */ export const ClippingRectangle = TYPES.CLIPPING_RECTANGLE; export const Group = TYPES.GROUP; export const Shape = TYPES.SHAPE; export const Path = Mode.Path; export {LinearGradient, Pattern, RadialGradient, Surface, Text, Transform};
src/chapters/02-pogojna-verjetnost/diagram.js
medja/ovs-prirocnik
import React, { Component } from 'react'; import Formula from 'components/formula'; import { External, Line, Rectangle, Surface } from 'components/graphics'; import Event from './event'; class Diagram extends Component { state = { selected: null, focused: null }; box = { width: 100, height: 60, stroke: '#000000', strokeWidth: 1 }; external = { width: this.box.width, height: this.box.height }; colors = { white: '#ffffff', orange: '#ff9800', green: '#4caf50', blue: '#03a9f4' }; events = { 'G#1': { x: 0, y: 200 }, 'A_1': { x: 225, y: 100 }, 'A_2': { x: 225, y: 200 }, 'A_3': { x: 225, y: 300 }, 'A_1B': { x: 450, y: 0 }, 'A_1!B': { x: 450, y: 80 }, 'A_2B': { x: 450, y: 160 }, 'A_2!B': { x: 450, y: 240 }, 'A_3B': { x: 450, y: 320 }, 'A_3!B': { x: 450, y: 400 }, 'B': { x: 675, y: 100 }, '!B': { x: 675, y: 300 }, 'G#2': { x: 900, y: 200 } }; paths = [ ['G#1', 'A_1'], ['G#1', 'A_2'], ['G#1', 'A_3'], ['A_1', 'A_1B'], ['A_1', 'A_1!B'], ['A_2', 'A_2B'], ['A_2', 'A_2!B'], ['A_3', 'A_3B'], ['A_3', 'A_3!B'], ['A_1B', 'B'], ['A_2B', 'B'], ['A_3B', 'B'], ['A_1!B', '!B'], ['A_2!B', '!B'], ['A_3!B', '!B'], ['B', 'G#2'], ['!B', 'G#2'] ]; onMouseEnter(name) { const focused = new Set(this.findSiblings(name, 1)); this.setState({ selected: name, focused }); } onMouseLeave(name) { this.setState({ selected: null, focused: null }); } findSiblings(name, depth) { const handleSibling = (siblings, sibling) => { if (depth > 1) { return siblings.concat(this.findSiblings(sibling, depth - 1)); } else { return siblings.concat(sibling); } }; return this.paths .filter(path => path.includes(name)) .map(([from, to]) => from != name ? from : to) .reduce(handleSibling, [name]) } getColor(name) { const { focused } = this.state; if (focused == null || focused.has(name)) { return this.findColor(name); } return this.colors.white; } findColor(name) { const A = name.includes('A'); const B = name.includes('B'); return do { if (A && B) this.colors.green; else if (A) this.colors.orange; else if (B) this.colors.blue; else this.colors.white; }; } parseEvent(name) { const A = this.parseIndex(name, /A_(\d)/); const B = this.parseIndex(name, /(!?)B/); const G = this.parseIndex(name, /G#(\d)/); return { A, B, G }; } parseIndex(name, pattern) { const match = name.match(pattern); if (!match) return null; else if (match[1] === '') return true; else if (match[1] === '!') return false; else return parseInt(match[1], 10); } formatEvent({ A, B }) { if (A == null && B == null) { return 'G'; } let event = ''; if (A != null) { event += `A_${A}`; } if (B != null) { event += B ? 'B' : `\\overline{B}`; } return event; } render() { // Do not use KaTex inside foreignObject because it uses // relative positioning for displaying its output! // https://bugs.chromium.org/p/chromium/issues/detail?id=578682 const events = Object.entries(this.events).map(([name, event]) => ({ ...event, name, fill: this.getColor(name) })); return ( <div> <Surface width="1000" height="460"> { this.paths.map(this.renderPath, this) } { events.map(this.renderEvent, this) } </Surface> { this.renderFormulas() } </div> ); } renderPath([left, right]) { const from = this.events[left]; const to = this.events[right]; const x1 = from.x + this.box.width - 1; const y1 = from.y + this.box.height / 2; const x2 = to.x + 1; const y2 = to.y + this.box.height / 2; const key = [left, right].join('-'); return ( <Line key={key} from={[x1, y1]} to={[x2, y2]} strokeWidth="1.4" /> ); } renderEvent({name, ...props}) { return ( <Rectangle key={name} {...this.box} {...props}> <External {...this.external} onMouseEnter={() => this.onMouseEnter(name)} onMouseLeave={() => this.onMouseLeave(name)}> <Event name={name} /> </External> </Rectangle> ); } renderFormulas() { return ( <Formula name="Sistem dogodkov" math={this.renderMath()} /> ); } renderMath() { const { selected } = this.state; if (!selected) { return [ 'P(AB) = P(A/B) \\cdot P(B)', 'P(AB) = P(B/A) \\cdot P(A)', ]; } const { A, B, G } = this.parseEvent(selected); const event = this.formatEvent({ A, B }); if (G == 1) { return `P(${event}) = \\sum_{i=1}^3 P(A_i)`; } if (G == 2) { return `P(${event}) = P(B) + P(\\overline{B})`; } if (A == null) { return `P(${event}) = \\sum_{i=1}^3 P(A_i ${event})`; } if (B == null) { return `P(${event}) = P(${event} B) + P(${event} \\overline{B})`; } const eventA = this.formatEvent({ A }); const eventB = this.formatEvent({ B }); return [ `P(${event}) = P(${eventA}/${eventB}) \\cdot P(${eventB})`, `P(${event}) = P(${eventB}/${eventA}) \\cdot P(${eventA})` ]; } } export default Diagram;
src/components/Navbar/Navbar.js
semenov/tasks
/* * React.js Starter Kit * Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; // eslint-disable-line no-unused-vars class Navbar { render() { return ( <div className="navbar-top" role="navigation"> <div className="container"> <a className="navbar-brand row" href="/"> <img src={require('./logo-small.png')} width="38" height="38" alt="React" /> <span>Tasks App</span> </a> </div> </div> ); } } export default Navbar;
src/svg-icons/action/alarm-add.js
hwo411/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAlarmAdd = (props) => ( <SvgIcon {...props}> <path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"/> </SvgIcon> ); ActionAlarmAdd = pure(ActionAlarmAdd); ActionAlarmAdd.displayName = 'ActionAlarmAdd'; ActionAlarmAdd.muiName = 'SvgIcon'; export default ActionAlarmAdd;
frontend/src/Settings/Indexers/Restrictions/RestrictionsConnector.js
geogolem/Radarr
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { deleteRestriction, fetchRestrictions } from 'Store/Actions/settingsActions'; import createTagsSelector from 'Store/Selectors/createTagsSelector'; import Restrictions from './Restrictions'; function createMapStateToProps() { return createSelector( (state) => state.settings.restrictions, createTagsSelector(), (restrictions, tagList) => { return { ...restrictions, tagList }; } ); } const mapDispatchToProps = { fetchRestrictions, deleteRestriction }; class RestrictionsConnector extends Component { // // Lifecycle componentDidMount() { this.props.fetchRestrictions(); } // // Listeners onConfirmDeleteRestriction = (id) => { this.props.deleteRestriction({ id }); } // // Render render() { return ( <Restrictions {...this.props} onConfirmDeleteRestriction={this.onConfirmDeleteRestriction} /> ); } } RestrictionsConnector.propTypes = { fetchRestrictions: PropTypes.func.isRequired, deleteRestriction: PropTypes.func.isRequired }; export default connect(createMapStateToProps, mapDispatchToProps)(RestrictionsConnector);
react/reactRedux/redux-master/examples/universal/client/index.js
huxinmin/PracticeMakesPerfect
import 'babel-polyfill' import React from 'react' import { render } from 'react-dom' import { Provider } from 'react-redux' import configureStore from '../common/store/configureStore' import App from '../common/containers/App' const preloadedState = window.__PRELOADED_STATE__ const store = configureStore(preloadedState) const rootElement = document.getElementById('app') render( <Provider store={store}> <App/> </Provider>, rootElement )
ajax/libs/jquery/1.4.0/jquery.min.js
nareshs435/cdnjs
/*! * jQuery JavaScript Library v1.4 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://docs.jquery.com/License * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Wed Jan 13 15:23:05 2010 -0500 */ (function(A,w){function oa(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(oa,1);return}c.ready()}}function La(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function $(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var o in b)$(a,o,b[o],f,e,d);return a}if(d!==w){f=!i&&f&&c.isFunction(d);for(o=0;o<j;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,i);return a}return j? e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget); n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType=== 11}function ta(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ua(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:s;f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]= i?f:1;return{fragment:f,cacheable:e}}function T(a){for(var b=0,d,f;(d=a[b])!=null;b++)if(!c.noData[d.nodeName.toLowerCase()]&&(f=d[H]))delete c.cache[f]}function L(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ma=A.jQuery,Na=A.$,s=A.document,U,Oa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Pa=/^.[^:#\[\.,]*$/,Qa=/\S/, Ra=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Sa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])]; c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ua([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return U.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||U).find(a):c(b).find(a);else if(c.isFunction(a))return U.ready(a);if(a.selector!==w){this.selector=a.selector; this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length= 0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject|| c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]= o}return a};c.extend({noConflict:function(a){A.$=Na;if(a)A.jQuery=Ma;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",M,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange", M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)}, isEmptyObject:function(a){for(var b in a)return false;return true},noop:function(){},globalEval:function(a){if(a&&Qa.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===w||c.isFunction(a); if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Ra,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ea.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d= 0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b=== "string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&& !/compatible/.test(a))b={browser:"mozilla",version:/rv:([\w.]+)/};b.version=(b.version&&b.version.exec(a)||[0,"0"])[1];return b},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(V)c.inArray=function(a,b){return V.call(b,a)};U=c(s);if(s.addEventListener)M=function(){s.removeEventListener("DOMContentLoaded",M,false);c.ready()};else if(s.attachEvent)M=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange", M);c.ready()}};if(V)c.inArray=function(a,b){return V.call(b,a)};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+K();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length, htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b, a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in p;if(!n){p.setAttribute(o,"return;");n=typeof p[o]==="function"}return n};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var H="jQuery"+K(),Ta=0,ya={},Ua={};c.extend({cache:{},expando:H,noData:{embed:true,object:true,applet:true},data:function(a, b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var f=a[H],e=c.cache;if(!b&&!f)return null;f||(f=++Ta);if(typeof b==="object"){a[H]=f;e=e[f]=c.extend(true,{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Ua:(e[f]={});if(d!==w){a[H]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var d=a[H],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[H]}catch(i){a.removeAttribute&& a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this, a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this, a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a, b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,o=b.length;j<o;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+= " "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a, b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a= " "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&& !c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex= -1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue; if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType=== 3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):w};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var o,p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var t=e[o],z=this.special[o]||{};if(!t){t=e[o]={}; if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,t))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}t[d.guid]=d;this.global[o]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/); for(var o=0;i=b[o++];){var p=i.split(".");i=p.shift();var n=!p.length,t=c.map(p.slice(0).sort(),$a);t=new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.)?")+"(\\.|$)");var z=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var B in f[i])if(n||t.test(f[i][B].type))delete f[i][B];z.remove&&z.remove.call(a,p,j);for(e in f[i])break;if(!e){if(!z.teardown||z.teardown.call(a,p)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+ i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(B=c.data(a,"handle"))B.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[H]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType=== 8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;var i=c.data(d,"handle");i&&i.apply(d,b);var j,o;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){j=d[e];o=d["on"+e]}}catch(p){}i=c.nodeName(d,"a")&&e==="click";if(!f&&j&&!a.isDefaultPrevented()&&!i){this.triggered=true;try{d[e]()}catch(n){}}else if(o&&d["on"+e].apply(d,b)===false)a.result=false;this.triggered=false;if(!a.isPropagationStopped())(d=d.parentNode||d.ownerDocument)&&c.event.trigger(a,b,d,true)}, handle:function(a){var b,d;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result}, props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[H])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement|| s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&& a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,qa,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],qa)}},special:{}},beforeunload:{setup:function(a, b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=K();this[H]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped= ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:aa,isPropagationStopped:aa,isImmediatePropagationStopped:aa};var Ba=function(a){for(var b=a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ca=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover", mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ca:Ba,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ca:Ba)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return pa("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+ d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return pa("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var ga=/textarea|input|select/i;function Da(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex> -1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ha(a,b){var d=a.target,f,e;if(!(!ga.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Da(d);if(e!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(d.type!=="select"&&(f!=null||e)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ha,click:function(a){var b=a.target,d=b.type;if(d=== "radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ha.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ha.call(this,a)},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Da(a))}},setup:function(a,b,d){for(var f in W)c.event.add(this,f+".specialChange."+d.guid,W[f]);return ga.test(this.nodeName)}, remove:function(a,b){for(var d in W)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),W[d]);return ga.test(this.nodeName)}};var W=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d, f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a, b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b|| a)},live:function(a,b,d){if(c.isFunction(b)){d=b;b=w}c(this.context).bind(ra(a,this.selector),{data:b,selector:this.selector,live:a},d);return this},die:function(a,b){c(this.context).unbind(ra(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});c.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".split(" "),function(a,b){c.fn[b]=function(d){return d? this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache=== k){y=m[u.sizset];break}if(u.nodeType===1&&!q){u.sizcache=k;u.sizset=r}if(u.nodeName.toLowerCase()===h){y=u;break}u=u[g]}m[r]=y}}}function d(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===k){y=m[u.sizset];break}if(u.nodeType===1){if(!q){u.sizcache=k;u.sizset=r}if(typeof h!=="string"){if(u===h){y=true;break}}else if(p.filter(h,[u]).length>0){y=u;break}}u=u[g]}m[r]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, e=0,i=Object.prototype.toString,j=false,o=true;[0,0].sort(function(){o=false;return 0});var p=function(g,h,k,m){k=k||[];var r=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return k;for(var q=[],v,u,y,S,I=true,N=x(h),J=g;(f.exec(""),v=f.exec(J))!==null;){J=v[3];q.push(v[1]);if(v[2]){S=v[3];break}}if(q.length>1&&t.exec(g))if(q.length===2&&n.relative[q[0]])u=ia(q[0]+q[1],h);else for(u=n.relative[q[0]]?[h]:p(q.shift(),h);q.length;){g=q.shift();if(n.relative[g])g+=q.shift(); u=ia(g,u)}else{if(!m&&q.length>1&&h.nodeType===9&&!N&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){v=p.find(q.shift(),h,N);h=v.expr?p.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:q.pop(),set:B(m)}:p.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&h.parentNode?h.parentNode:h,N);u=v.expr?p.filter(v.expr,v.set):v.set;if(q.length>0)y=B(u);else I=false;for(;q.length;){var E=q.pop();v=E;if(n.relative[E])v=q.pop();else E="";if(v==null)v=h;n.relative[E](y,v,N)}}else y=[]}y||(y=u);if(!y)throw"Syntax error, unrecognized expression: "+ (E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[]; for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length- 1)!=="\\"){if(v===q)q=[];if(n.preFilter[I])if(u=n.preFilter[I](u,v,k,q,m,S)){if(u===true)continue}else y=J=true;if(u)for(var X=0;(E=v[X])!=null;X++)if(E){J=N(E,u,X,v);var Ea=m^!!J;if(k&&J!=null)if(Ea)y=true;else v[X]=false;else if(Ea){q.push(E);y=true}}if(J!==w){k||(v=q);g=g.replace(n.match[I],"");if(!y)return[];break}}}if(g===r)if(y==null)throw"Syntax error, unrecognized expression: "+g;else break;r=g}return v};var n=p.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}}, relative:{"+":function(g,h){var k=typeof h==="string",m=k&&!/\W/.test(h);k=k&&!m;if(m)h=h.toLowerCase();m=0;for(var r=g.length,q;m<r;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=k||q&&q.nodeName.toLowerCase()===h?q||false:q===h}k&&p.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,r=g.length;m<r;m++){var q=g[m];if(q){k=q.parentNode;g[m]=k.nodeName.toLowerCase()===h?k:false}}}else{m=0;for(r=g.length;m<r;m++)if(q=g[m])g[m]= k?q.parentNode:q.parentNode===h;k&&p.filter(h,g,true)}},"":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("parentNode",h,m,g,q,k)},"~":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("previousSibling",h,m,g,q,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[]; h=h.getElementsByName(g[1]);for(var m=0,r=h.length;m<r;m++)h[m].getAttribute("name")===g[1]&&k.push(h[m]);return k.length===0?null:k}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,m,r,q){g=" "+g[1].replace(/\\/g,"")+" ";if(q)return g;q=0;for(var v;(v=h[q])!=null;q++)if(v)if(r^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||m.push(v);else if(k)h[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,m,r,q){h=g[1].replace(/\\/g,"");if(!q&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,m,r){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=p(g[3],null,null,h);else{g=p.filter(g[3],h,k,true^r);k||m.push.apply(m, g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!p(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, setFilters:{first:function(g,h){return h===0},last:function(g,h,k,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,m){var r=h[1],q=n.filters[r];if(q)return q(g,k,h,m);else if(r==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(r==="not"){h= h[3];k=0;for(m=h.length;k<m;k++)if(h[k]===g)return false;return true}else throw"Syntax error, unrecognized expression: "+r;},CHILD:function(g,h){var k=h[1],m=g;switch(k){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(k==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":k=h[2];var r=h[3];if(k===1&&r===0)return true;h=h[0];var q=g.parentNode;if(q&&(q.sizcache!==h||!g.nodeIndex)){var v=0;for(m=q.firstChild;m;m= m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;q.sizcache=h}g=g.nodeIndex-r;return k===0?g===0:g%k===0&&g/k>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=n.attrHandle[k]?n.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== "="?k===h:m==="*="?k.indexOf(h)>=0:m==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:m==="!="?k!==h:m==="^="?k.indexOf(h)===0:m==="$="?k.substr(k.length-h.length)===h:m==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,m){var r=n.setFilters[h[2]];if(r)return r(g,k,h,m)}}},t=n.match.POS;for(var z in n.match){n.match[z]=new RegExp(n.match[z].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[z]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[z].source.replace(/\\(\d+)/g,function(g, h){return"\\"+(h-0+1)}))}var B=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){B=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,m=g.length;k<m;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var D;if(s.documentElement.compareDocumentPosition)D=function(g,h){if(!g.compareDocumentPosition|| !h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in s.documentElement)D=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(s.createRange)D=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),m= h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)j=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=s.documentElement;k.insertBefore(g,k.firstChild);if(s.getElementById(h)){n.find.ID=function(m,r,q){if(typeof r.getElementById!=="undefined"&&!q)return(r=r.getElementById(m[1]))?r.id===m[1]||typeof r.getAttributeNode!=="undefined"&& r.getAttributeNode("id").nodeValue===m[1]?[r]:w:[]};n.filter.ID=function(m,r){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===r}}k.removeChild(g);k=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;k[m];m++)k[m].nodeType===1&&h.push(k[m]);k=h}return k};g.innerHTML="<a href='#'></a>"; if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=p,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){p=function(m,r,q,v){r=r||s;if(!v&&r.nodeType===9&&!x(r))try{return B(r.querySelectorAll(m),q)}catch(u){}return g(m,r,q,v)};for(var k in g)p[k]=g[k];h=null}}(); (function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,k,m){if(typeof k.getElementsByClassName!=="undefined"&&!m)return k.getElementsByClassName(h[1])};g=null}}})();var F=s.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g, h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ia=function(g,h){var k=[],m="",r;for(h=h.nodeType?[h]:h;r=n.match.PSEUDO.exec(g);){m+=r[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;r=0;for(var q=h.length;r<q;r++)p(g,h[r],k);return p.filter(m,k)};c.find=p;c.expr=p.selectors;c.expr[":"]=c.expr.filters;c.unique=p.uniqueSort;c.getText=a;c.isXMLDoc=x;c.contains=F})();var ab=/Until$/,bb=/^(?:parents|prevUntil|prevAll)/, cb=/,/;R=Array.prototype.slice;var Fa=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Pa.test(b))return c.filter(b,f,!d);else b=c.filter(b,a)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length; c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Fa(this,a,false),"not",a)},filter:function(a){return this.pushStack(Fa(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i= {},j;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var p=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,t){for(;t&&t.ownerDocument&&t!==b;){if(p?p.index(t)>-1:c(t).is(a))return t;t=t.parentNode}return null})},index:function(a){if(!a||typeof a=== "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(sa(a[0])||sa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);ab.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||cb.test(f))&&bb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||!c(a).is(d));){a.nodeType=== 1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ga=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,db=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,hb=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},G={option:[1,"<select multiple='multiple'>","</select>"], legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};G.optgroup=G.option;G.tbody=G.tfoot=G.colgroup=G.caption=G.thead;G.th=G.td;if(!c.support.htmlSerialize)G._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this); return d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.getText(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, wrapInner:function(a){return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&& this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this, "after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ga,"").replace(Y,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ta(this,b);ta(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType=== 1?this[0].innerHTML.replace(Ga,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!Y.test(a))&&!G[(Ha.exec(a)||["",""])[1].toLowerCase()])try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){T(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z= c(this);a[0]=j.call(this,t,b?z.html():w);return z.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ua(a,this,o);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var p=0,n=this.length;p<n;p++)d.call(b?f(this[p],i):this[p],e.cacheable||this.length>1||p>0?e.fragment.cloneNode(true):e.fragment)}o&&c.each(o,La)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"}, function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){T(this.getElementsByTagName("*"));T([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&T(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}}, function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j==="string"){j=j.replace(db,hb);var o=(Ha.exec(j)||["",""])[1].toLowerCase(),p=G[o]||G._default,n=p[0];i=b.createElement("div");for(i.innerHTML=p[1]+j+p[2];n--;)i=i.lastChild; if(!c.support.tbody){n=fb.test(j);o=o==="table"&&!n?i.firstChild&&i.firstChild.childNodes:p[1]==="<table>"&&!n?i.childNodes:[];for(p=o.length-1;p>=0;--p)c.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!c.support.leadingWhitespace&&Y.test(j)&&i.insertBefore(b.createTextNode(Y.exec(j)[0]),i.firstChild);j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()=== "text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e}});var ib=/z-?index|font-?weight|opacity|zoom|line-?height/i,Ia=/alpha\([^)]*\)/,Ja=/opacity=([^)]*)/,ja=/float/i,ka=/-([a-z])/ig,jb=/([A-Z])/g,kb=/^-?\d+(?:px)?$/i,lb=/^-?\d/,mb={position:"absolute",visibility:"hidden",display:"block"},nb=["Left","Right"],ob=["Top","Bottom"],pb=s.defaultView&& s.defaultView.getComputedStyle,Ka=c.support.cssFloat?"cssFloat":"styleFloat",la=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return $(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!ib.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""=== "NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ia.test(a)?a.replace(Ia,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ja.exec(f.filter)[1])/100+"":""}if(ja.test(b))b=Ka;b=b.replace(ka,la);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?nb:ob;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+= parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,mb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Ja.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ja.test(b))b=Ka;if(!d&&e&&e[b])f=e[b];else if(pb){if(ja.test(b))b="float";b=b.replace(jb,"-$1").toLowerCase();e= a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ka,la);f=a.currentStyle[b]||a.currentStyle[d];if(!kb.test(f)&&lb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]= f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var qb=K(),rb=/<script(.|\s)*?\/script>/gi,sb=/select|textarea/i,tb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,O=/=\?(&|$)/,ma=/\?/,ub=/(\?|&)_=.*?(&|$)/,vb=/^(\w+:)?\/\/([^\/?#]+)/, wb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}c.ajax({url:a,type:f,dataType:"html",data:b,context:this,complete:function(i,j){if(j==="success"||j==="notmodified")this.html(e?c("<div />").append(i.responseText.replace(rb, "")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}}); c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})}, ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript", text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(p,o,j,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(p,x,j);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(r,q){(e.context?c(e.context):c.event).trigger(r,q)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,o,p=e.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data, e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&& B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script"); C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type", e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}t||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ia){}if(e.beforeSend&&e.beforeSend.call(p,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend", [x,e]);var g=x.onreadystatechange=function(r){if(!x||x.readyState===0){F||d();F=true;if(x)x.onreadystatechange=c.noop}else if(!F&&x&&(x.readyState===4||r==="timeout")){F=true;x.onreadystatechange=c.noop;j=r==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";if(j==="success")try{o=c.httpData(x,e.dataType,e)}catch(q){j="parsererror"}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,x,j);d();r==="timeout"&&x.abort();if(e.async)x= null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol=== "file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;if(e&&a.documentElement.nodeName==="parsererror")throw"parsererror";if(d&& d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))a=A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+a))();else throw"Invalid JSON: "+a;else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(e,i){i= c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/, Z,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a!=null)return this.animate(L("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(na[d])f=na[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove(); na[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a!=null)return this.animate(L("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&& c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"), p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a); else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle", 1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a, b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]== null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=K();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!Z)Z=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop=== "width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=K(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow= this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos= c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(Z);Z=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!= null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(), f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f= b,e=b.ownerDocument,i,j=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;n-=b.scrollLeft;if(b===d){p+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){p+=parseFloat(i.borderTopWidth)|| 0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"), d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild); d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop}, bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left- e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a= this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}}); c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+ b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
catalog/app/containers/Auth/PassReset.js
quiltdata/quilt
import * as FF from 'final-form' import React from 'react' import * as RF from 'react-final-form' import * as redux from 'react-redux' import * as Config from 'utils/Config' import * as NamedRoutes from 'utils/NamedRoutes' import * as Sentry from 'utils/Sentry' import Link from 'utils/StyledLink' import defer from 'utils/defer' import * as validators from 'utils/validators' import { resetPassword } from './actions' import * as errors from './errors' import * as Layout from './Layout' const Container = Layout.mkLayout('Reset Password') export default function PassReset() { const [done, setDone] = React.useState(false) const sentry = Sentry.use() const dispatch = redux.useDispatch() const cfg = Config.useConfig() const { urls } = NamedRoutes.use() const onSubmit = React.useCallback( // eslint-disable-next-line consistent-return async (values) => { try { const result = defer() dispatch(resetPassword(values.email, result.resolver)) await result.promise setDone(true) } catch (e) { if (e instanceof errors.SMTPError) { return { [FF.FORM_ERROR]: 'smtp', } } sentry('captureException', e) return { [FF.FORM_ERROR]: 'unexpected', } } }, [dispatch, sentry, setDone], ) if (done) { return ( <Container> <Layout.Message> You have requested a password reset. Check your email for further instructions. </Layout.Message> </Container> ) } return ( <Container> <RF.Form onSubmit={onSubmit}> {({ error, handleSubmit, hasSubmitErrors, hasValidationErrors, modifiedSinceLastSubmit, submitFailed, submitting, }) => ( <form onSubmit={handleSubmit}> <RF.Field component={Layout.Field} name="email" validate={validators.required} disabled={submitting} floatingLabelText="Email" errors={{ required: 'Enter your email', }} /> <Layout.Error {...{ submitFailed, error }} errors={{ unexpected: 'Something went wrong. Try again later.', smtp: 'SMTP error: contact your administrator', }} /> <Layout.Actions> <Layout.Submit label="Reset" disabled={ submitting || (hasValidationErrors && submitFailed) || (hasSubmitErrors && !modifiedSinceLastSubmit) } busy={submitting} /> </Layout.Actions> {(cfg.passwordAuth === true || cfg.ssoAuth === true) && ( <Layout.Hint> <> Don&apos;t have an account? <Link to={urls.signUp()}>Sign up</Link> </> </Layout.Hint> )} </form> )} </RF.Form> </Container> ) }
src/svg-icons/av/add-to-queue.js
igorbt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvAddToQueue = (props) => ( <SvgIcon {...props}> <path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-7v2h-3v3h-2v-3H8v-2h3V7h2v3h3z"/> </SvgIcon> ); AvAddToQueue = pure(AvAddToQueue); AvAddToQueue.displayName = 'AvAddToQueue'; AvAddToQueue.muiName = 'SvgIcon'; export default AvAddToQueue;
app/routes.js
AmazingHorse/ee-toolkit
/* eslint flowtype-errors/show-errors: 0 */ import React from 'react'; import { Switch, Route } from 'react-router'; import App from './containers/App'; import HomePage from './containers/HomePage'; import CounterPage from './containers/CounterPage'; export default () => ( <App> <Switch> <Route path="/counter" component={CounterPage} /> <Route path="/" component={HomePage} /> </Switch> </App> );
src/main/webapp/bower_components/modernizr/test/js/lib/jquery-1.7b2.js
GIP-RECIA/esup-publisher-ui
/*! * jQuery JavaScript Library v1.7b2 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Thu Oct 13 21:12:55 2011 -0400 */ (function( window, undefined ) { // Use the correct document accordingly with window argument (sandbox) var document = window.document, navigator = window.navigator, location = window.location; var jQuery = (function() { // Define a local copy of jQuery var jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); }, // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$, // A central reference to the root jQuery(document) rootjQuery, // A simple way to check for HTML strings or ID strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, // Check if a string has a non-whitespace character in it rnotwhite = /\S/, // Used for trimming whitespace trimLeft = /^\s+/, trimRight = /\s+$/, // Check for digits rdigit = /\d/, // Match a standalone tag rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, // JSON RegExp rvalidchars = /^[\],:{}\s]*$/, rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, // Useragent RegExp rwebkit = /(webkit)[ \/]([\w.]+)/, ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, rmsie = /(msie) ([\w.]+)/, rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, // Matches dashed string for camelizing rdashAlpha = /-([a-z]|[0-9])/ig, rmsPrefix = /^-ms-/, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return ( letter + "" ).toUpperCase(); }, // Keep a UserAgent string for use with jQuery.browser userAgent = navigator.userAgent, // For matching the engine and version of the browser browserMatch, // The deferred used on DOM ready readyList, // The ready event handler DOMContentLoaded, // Save a reference to some core methods toString = Object.prototype.toString, hasOwn = Object.prototype.hasOwnProperty, push = Array.prototype.push, slice = Array.prototype.slice, trim = String.prototype.trim, indexOf = Array.prototype.indexOf, // [[Class]] -> type pairs class2type = {}; jQuery.fn = jQuery.prototype = { constructor: jQuery, init: function( selector, context, rootjQuery ) { var match, elem, ret, doc; // Handle $(""), $(null), or $(undefined) if ( !selector ) { return this; } // Handle $(DOMElement) if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; } // The body element only exists once, optimize finding it if ( selector === "body" && !context && document.body ) { this.context = document; this[0] = document.body; this.selector = selector; this.length = 1; return this; } // Handle HTML strings if ( typeof selector === "string" ) { // Are we dealing with HTML string or an ID? if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = quickExpr.exec( selector ); } // Verify a match, and that no context was specified for #id if ( match && (match[1] || !context) ) { // HANDLE: $(html) -> $(array) if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; doc = (context ? context.ownerDocument || context : document); // If a single string is passed in and it's a single tag // just do a createElement and skip the rest ret = rsingleTag.exec( selector ); if ( ret ) { if ( jQuery.isPlainObject( context ) ) { selector = [ document.createElement( ret[1] ) ]; jQuery.fn.attr.call( selector, context, true ); } else { selector = [ doc.createElement( ret[1] ) ]; } } else { ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; } return jQuery.merge( this, selector ); // HANDLE: $("#id") } else { elem = document.getElementById( match[2] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id !== match[2] ) { return rootjQuery.find( selector ); } // Otherwise, we inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return (context || rootjQuery).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return rootjQuery.ready( selector ); } if (selector.selector !== undefined) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }, // Start with an empty selector selector: "", // The current version of jQuery being used jquery: "1.7b2", // The default length of a jQuery object is 0 length: 0, // The number of elements contained in the matched element set size: function() { return this.length; }, toArray: function() { return slice.call( this, 0 ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num == null ? // Return a 'clean' array this.toArray() : // Return just the object ( num < 0 ? this[ this.length + num ] : this[ num ] ); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems, name, selector ) { // Build a new jQuery matched element set var ret = this.constructor(); if ( jQuery.isArray( elems ) ) { push.apply( ret, elems ); } else { jQuery.merge( ret, elems ); } // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; if ( name === "find" ) { ret.selector = this.selector + (this.selector ? " " : "") + selector; } else if ( name ) { ret.selector = this.selector + "." + name + "(" + selector + ")"; } // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. // (You can seed the arguments with an array of args, but this is // only used internally.) each: function( callback, args ) { return jQuery.each( this, callback, args ); }, ready: function( fn ) { // Attach the listeners jQuery.bindReady(); // Add the callback readyList.add( fn ); return this; }, eq: function( i ) { return i === -1 ? this.slice( i ) : this.slice( i, +i + 1 ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ), "slice", slice.call(arguments).join(",") ); }, map: function( callback ) { return this.pushStack( jQuery.map(this, function( elem, i ) { return callback.call( elem, i, elem ); })); }, end: function() { return this.prevObject || this.constructor(null); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: [].sort, splice: [].splice }; // Give the init function the jQuery prototype for later instantiation jQuery.fn.init.prototype = jQuery.fn; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction(target) ) { target = {}; } // extend jQuery itself if only one argument is passed if ( length === i ) { target = this; --i; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && jQuery.isArray(src) ? src : []; } else { clone = src && jQuery.isPlainObject(src) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend({ noConflict: function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }, // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Either a released hold or an DOMready/load event and not yet ready if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( !document.body ) { return setTimeout( jQuery.ready, 1 ); } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.fireWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.trigger ) { jQuery( document ).trigger( "ready" ).unbind( "ready" ); } } }, bindReady: function() { if ( readyList ) { return; } readyList = jQuery.Callbacks( "once memory" ); // Catch cases where $(document).ready() is called after the // browser event has already occurred. if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready return setTimeout( jQuery.ready, 1 ); } // Mozilla, Opera and webkit nightlies currently support this event if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", jQuery.ready, false ); // If IE event model is used } else if ( document.attachEvent ) { // ensure firing before onload, // maybe late but safe also for iframes document.attachEvent( "onreadystatechange", DOMContentLoaded ); // A fallback to window.onload, that will always work window.attachEvent( "onload", jQuery.ready ); // If IE and not a frame // continually check to see if the document is ready var toplevel = false; try { toplevel = window.frameElement == null; } catch(e) {} if ( document.documentElement.doScroll && toplevel ) { doScrollCheck(); } } }, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { return jQuery.type(obj) === "function"; }, isArray: Array.isArray || function( obj ) { return jQuery.type(obj) === "array"; }, // A crude way of determining if an object is a window isWindow: function( obj ) { return obj && typeof obj === "object" && "setInterval" in obj; }, isNumeric: function( obj ) { return obj != null && rdigit.test( obj ) && !isNaN( obj ); }, type: function( obj ) { return obj == null ? String( obj ) : class2type[ toString.call(obj) ] || "object"; }, isPlainObject: function( obj ) { // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { return false; } try { // Not own constructor property must be Object if ( obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { return false; } } catch ( e ) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. var key; for ( key in obj ) {} return key === undefined || hasOwn.call( obj, key ); }, isEmptyObject: function( obj ) { for ( var name in obj ) { return false; } return true; }, error: function( msg ) { throw msg; }, parseJSON: function( data ) { if ( typeof data !== "string" || !data ) { return null; } // Make sure leading/trailing whitespace is removed (IE can't handle it) data = jQuery.trim( data ); // Attempt to parse using the native JSON parser first if ( window.JSON && window.JSON.parse ) { return window.JSON.parse( data ); } // Make sure the incoming data is actual JSON // Logic borrowed from http://json.org/json2.js if ( rvalidchars.test( data.replace( rvalidescape, "@" ) .replace( rvalidtokens, "]" ) .replace( rvalidbraces, "")) ) { return (new Function( "return " + data ))(); } jQuery.error( "Invalid JSON: " + data ); }, // Cross-browser xml parsing parseXML: function( data ) { var xml, tmp; try { if ( window.DOMParser ) { // Standard tmp = new DOMParser(); xml = tmp.parseFromString( data , "text/xml" ); } else { // IE xml = new ActiveXObject( "Microsoft.XMLDOM" ); xml.async = "false"; xml.loadXML( data ); } } catch( e ) { xml = undefined; } if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }, noop: function() {}, // Evaluates a script in a global context // Workarounds based on findings by Jim Driscoll // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function( data ) { if ( data && rnotwhite.test( data ) ) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); } )( data ); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); }, // args is for internal usage only each: function( object, callback, args ) { var name, i = 0, length = object.length, isObj = length === undefined || jQuery.isFunction( object ); if ( args ) { if ( isObj ) { for ( name in object ) { if ( callback.apply( object[ name ], args ) === false ) { break; } } } else { for ( ; i < length; ) { if ( callback.apply( object[ i++ ], args ) === false ) { break; } } } // A special, fast, case for the most common use of each } else { if ( isObj ) { for ( name in object ) { if ( callback.call( object[ name ], name, object[ name ] ) === false ) { break; } } } else { for ( ; i < length; ) { if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { break; } } } } return object; }, // Use native String.trim function wherever possible trim: trim ? function( text ) { return text == null ? "" : trim.call( text ); } : // Otherwise use our own trimming functionality function( text ) { return text == null ? "" : text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); }, // results is for internal usage only makeArray: function( array, results ) { var ret = results || []; if ( array != null ) { // The window, strings (and functions) also have 'length' // The extra typeof function check is to prevent crashes // in Safari 2 (See: #3039) // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 var type = jQuery.type( array ); if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { push.call( ret, array ); } else { jQuery.merge( ret, array ); } } return ret; }, inArray: function( elem, array, i ) { var len; if ( array ) { if ( indexOf ) { return indexOf.call( array, elem, i ); } len = array.length; i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; for ( ; i < len; i++ ) { // Skip accessing in sparse arrays if ( i in array && array[ i ] === elem ) { return i; } } } return -1; }, merge: function( first, second ) { var i = first.length, j = 0; if ( typeof second.length === "number" ) { for ( var l = second.length; j < l; j++ ) { first[ i++ ] = second[ j ]; } } else { while ( second[j] !== undefined ) { first[ i++ ] = second[ j++ ]; } } first.length = i; return first; }, grep: function( elems, callback, inv ) { var ret = [], retVal; inv = !!inv; // Go through the array, only saving the items // that pass the validator function for ( var i = 0, length = elems.length; i < length; i++ ) { retVal = !!callback( elems[ i ], i ); if ( inv !== retVal ) { ret.push( elems[ i ] ); } } return ret; }, // arg is for internal usage only map: function( elems, callback, arg ) { var value, key, ret = [], i = 0, length = elems.length, // jquery objects are treated as arrays isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; // Go through the array, translating each of the items to their if ( isArray ) { for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret[ ret.length ] = value; } } // Go through every key on the object, } else { for ( key in elems ) { value = callback( elems[ key ], key, arg ); if ( value != null ) { ret[ ret.length ] = value; } } } // Flatten any nested arrays return ret.concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { if ( typeof context === "string" ) { var tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind var args = slice.call( arguments, 2 ), proxy = function() { return fn.apply( context, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; return proxy; }, // Mutifunctional method to get and set values to a collection // The value/s can optionally be executed if it's a function access: function( elems, key, value, exec, fn, pass ) { var length = elems.length; // Setting many attributes if ( typeof key === "object" ) { for ( var k in key ) { jQuery.access( elems, k, key[k], exec, fn, value ); } return elems; } // Setting one attribute if ( value !== undefined ) { // Optionally, function values get executed if exec is true exec = !pass && exec && jQuery.isFunction(value); for ( var i = 0; i < length; i++ ) { fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); } return elems; } // Getting an attribute return length ? fn( elems[0], key ) : undefined; }, now: function() { return (new Date()).getTime(); }, // Use of jQuery.browser is frowned upon. // More details: http://docs.jquery.com/Utilities/jQuery.browser uaMatch: function( ua ) { ua = ua.toLowerCase(); var match = rwebkit.exec( ua ) || ropera.exec( ua ) || rmsie.exec( ua ) || ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || []; return { browser: match[1] || "", version: match[2] || "0" }; }, sub: function() { function jQuerySub( selector, context ) { return new jQuerySub.fn.init( selector, context ); } jQuery.extend( true, jQuerySub, this ); jQuerySub.superclass = this; jQuerySub.fn = jQuerySub.prototype = this(); jQuerySub.fn.constructor = jQuerySub; jQuerySub.sub = this.sub; jQuerySub.fn.init = function init( selector, context ) { if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { context = jQuerySub( context ); } return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); }; jQuerySub.fn.init.prototype = jQuerySub.fn; var rootjQuerySub = jQuerySub(document); return jQuerySub; }, browser: {} }); // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); }); browserMatch = jQuery.uaMatch( userAgent ); if ( browserMatch.browser ) { jQuery.browser[ browserMatch.browser ] = true; jQuery.browser.version = browserMatch.version; } // Deprecated, use jQuery.browser.webkit instead if ( jQuery.browser.webkit ) { jQuery.browser.safari = true; } // IE doesn't match non-breaking spaces with \s if ( rnotwhite.test( "\xA0" ) ) { trimLeft = /^[\s\xA0]+/; trimRight = /[\s\xA0]+$/; } // All jQuery objects should point back to these rootjQuery = jQuery(document); // Cleanup functions for the document ready method if ( document.addEventListener ) { DOMContentLoaded = function() { document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); jQuery.ready(); }; } else if ( document.attachEvent ) { DOMContentLoaded = function() { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( document.readyState === "complete" ) { document.detachEvent( "onreadystatechange", DOMContentLoaded ); jQuery.ready(); } }; } // The DOM ready check for Internet Explorer function doScrollCheck() { if ( jQuery.isReady ) { return; } try { // If IE is used, use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ document.documentElement.doScroll("left"); } catch(e) { setTimeout( doScrollCheck, 1 ); return; } // and execute any waiting functions jQuery.ready(); } // Expose jQuery as an AMD module, but only for AMD loaders that // understand the issues with loading multiple versions of jQuery // in a page that all might call define(). The loader will indicate // they have special allowances for multiple jQuery versions by // specifying define.amd.jQuery = true. Register as a named module, // since jQuery can be concatenated with other files that may use define, // but not use a proper concatenation script that understands anonymous // AMD modules. A named AMD is safest and most robust way to register. // Lowercase jquery is used because AMD module names are derived from // file names, and jQuery is normally delivered in a lowercase file name. if ( typeof define === "function" && define.amd && define.amd.jQuery ) { define( "jquery", [], function () { return jQuery; } ); } return jQuery; })(); // String to Object flags format cache var flagsCache = {}; // Convert String-formatted flags into Object-formatted ones and store in cache function createFlags( flags ) { var object = flagsCache[ flags ] = {}, i, length; flags = flags.split( /\s+/ ); for ( i = 0, length = flags.length; i < length; i++ ) { object[ flags[i] ] = true; } return object; } /* * Create a callback list using the following parameters: * * flags: an optional list of space-separated flags that will change how * the callback list behaves * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible flags: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( flags ) { // Convert flags from String-formatted to Object-formatted // (we check in cache first) flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; var // Actual callback list list = [], // Stack of fire calls for repeatable lists stack = [], // Last fire value (for non-forgettable lists) memory, // Flag to know if list is currently firing firing, // First callback to fire (used internally by add and fireWith) firingStart, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, // Add one or several callbacks to the list add = function( args ) { var i, length, elem, type, actual; for ( i = 0, length = args.length; i < length; i++ ) { elem = args[ i ]; type = jQuery.type( elem ); if ( type === "array" ) { // Inspect recursively add( elem ); } else if ( type === "function" ) { // Add if not in unique mode and callback is not in if ( !flags.unique || !self.has( elem ) ) { list.push( elem ); } } } }, // Fire callbacks fire = function( context, args ) { args = args || []; memory = !flags.memory || [ context, args ]; firing = true; firingIndex = firingStart || 0; firingStart = 0; firingLength = list.length; for ( ; list && firingIndex < firingLength; firingIndex++ ) { if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { memory = true; // Mark as halted break; } } firing = false; if ( list ) { if ( !flags.once ) { if ( stack && stack.length ) { memory = stack.shift(); self.fireWith( memory[ 0 ], memory[ 1 ] ); } } else if ( memory === true ) { self.disable(); } else { list = []; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { var length = list.length; add( arguments ); // Do we need to add the callbacks to the // current firing batch? if ( firing ) { firingLength = list.length; // With memory, if we're not firing then // we should call right away, unless previous // firing was halted (stopOnFalse) } else if ( memory && memory !== true ) { firingStart = length; fire( memory[ 0 ], memory[ 1 ] ); } } return this; }, // Remove a callback from the list remove: function() { if ( list ) { var args = arguments, argIndex = 0, argLength = args.length; for ( ; argIndex < argLength ; argIndex++ ) { for ( var i = 0; i < list.length; i++ ) { if ( args[ argIndex ] === list[ i ] ) { // Handle firingIndex and firingLength if ( firing ) { if ( i <= firingLength ) { firingLength--; if ( i <= firingIndex ) { firingIndex--; } } } // Remove the element list.splice( i--, 1 ); // If we have some unicity property then // we only need to do this once if ( flags.unique ) { break; } } } } } return this; }, // Control if a given callback is in the list has: function( fn ) { if ( list ) { var i = 0, length = list.length; for ( ; i < length; i++ ) { if ( fn === list[ i ] ) { return true; } } } return false; }, // Remove all callbacks from the list empty: function() { list = []; return this; }, // Have the list do nothing anymore disable: function() { list = stack = memory = undefined; return this; }, // Is it disabled? disabled: function() { return !list; }, // Lock the list in its current state lock: function() { stack = undefined; if ( !memory || memory === true ) { self.disable(); } return this; }, // Is it locked? locked: function() { return !stack; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( stack ) { if ( firing ) { if ( !flags.once ) { stack.push( [ context, args ] ); } } else if ( !( flags.once && memory ) ) { fire( context, args ); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!memory; } }; return self; }; var // Static reference to slice sliceDeferred = [].slice; jQuery.extend({ Deferred: function( func ) { var doneList = jQuery.Callbacks( "once memory" ), failList = jQuery.Callbacks( "once memory" ), progressList = jQuery.Callbacks( "memory" ), state = "pending", lists = { resolve: doneList, reject: failList, notify: progressList }, promise = { done: doneList.add, fail: failList.add, progress: progressList.add, state: function() { return state; }, // Deprecated isResolved: doneList.fired, isRejected: failList.fired, then: function( doneCallbacks, failCallbacks, progressCallbacks ) { deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); return this; }, always: function() { return deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); }, pipe: function( fnDone, fnFail, fnProgress ) { return jQuery.Deferred(function( newDefer ) { jQuery.each( { done: [ fnDone, "resolve" ], fail: [ fnFail, "reject" ], progress: [ fnProgress, "notify" ] }, function( handler, data ) { var fn = data[ 0 ], action = data[ 1 ], returned; if ( jQuery.isFunction( fn ) ) { deferred[ handler ](function() { returned = fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); } else { newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); } }); } else { deferred[ handler ]( newDefer[ action ] ); } }); }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { if ( obj == null ) { obj = promise; } else { for( var key in promise ) { obj[ key ] = promise[ key ]; } } return obj; } }, deferred = promise.promise({}), key; for ( key in lists ) { deferred[ key ] = lists[ key ].fire; deferred[ key + "With" ] = lists[ key ].fireWith; } // Handle state deferred.done( function() { state = "resolved"; }, failList.disable, progressList.lock ).fail( function() { state = "rejected"; }, doneList.disable, progressList.lock ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( firstParam ) { var args = sliceDeferred.call( arguments, 0 ), i = 0, length = args.length, pValues = new Array( length ), count = length, pCount = length, deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? firstParam : jQuery.Deferred(), promise = deferred.promise(); function resolveFunc( i ) { return function( value ) { args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; if ( !( --count ) ) { deferred.resolveWith( deferred, args ); } }; } function progressFunc( i ) { return function( value ) { pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; deferred.notifyWith( promise, pValues ); }; } if ( length > 1 ) { for( ; i < length; i++ ) { if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); } else { --count; } } if ( !count ) { deferred.resolveWith( deferred, args ); } } else if ( deferred !== firstParam ) { deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); } return promise; } }); jQuery.support = (function() { var div = document.createElement( "div" ), documentElement = document.documentElement, all, a, select, opt, input, marginDiv, support, fragment, body, testElementParent, testElement, testElementStyle, tds, events, eventName, i, isSupported, offsetSupport; // Preliminary tests div.setAttribute("className", "t"); div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>"; all = div.getElementsByTagName( "*" ); a = div.getElementsByTagName( "a" )[ 0 ]; // Can't get basic test support if ( !all || !all.length || !a ) { return {}; } // First batch of supports tests select = document.createElement( "select" ); opt = select.appendChild( document.createElement("option") ); input = div.getElementsByTagName( "input" )[ 0 ]; support = { // IE strips leading whitespace when .innerHTML is used leadingWhitespace: ( div.firstChild.nodeType === 3 ), // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables tbody: !div.getElementsByTagName( "tbody" ).length, // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE htmlSerialize: !!div.getElementsByTagName( "link" ).length, // Get the style information from getAttribute // (IE uses .cssText instead) style: /top/.test( a.getAttribute("style") ), // Make sure that URLs aren't manipulated // (IE normalizes it by default) hrefNormalized: ( a.getAttribute( "href" ) === "/a" ), // Make sure that element opacity exists // (IE uses filter instead) // Use a regex to work around a WebKit issue. See #5145 opacity: /^0.55/.test( a.style.opacity ), // Verify style float existence // (IE uses styleFloat instead of cssFloat) cssFloat: !!a.style.cssFloat, // Make sure unknown elements (like HTML5 elems) are handled appropriately unknownElems: !!div.getElementsByTagName( "nav" ).length, // Make sure that if no value is specified for a checkbox // that it defaults to "on". // (WebKit defaults to "" instead) checkOn: ( input.value === "on" ), // Make sure that a selected-by-default option has a working selected property. // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) optSelected: opt.selected, // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) getSetAttribute: div.className !== "t", // Will be defined later submitBubbles: true, changeBubbles: true, focusinBubbles: false, deleteExpando: true, noCloneEvent: true, inlineBlockNeedsLayout: false, shrinkWrapBlocks: false, reliableMarginRight: true }; // Make sure checked status is properly cloned input.checked = true; support.noCloneChecked = input.cloneNode( true ).checked; // Make sure that the options inside disabled selects aren't marked as disabled // (WebKit marks them as disabled) select.disabled = true; support.optDisabled = !opt.disabled; // Test to see if it's possible to delete an expando from an element // Fails in Internet Explorer try { delete div.test; } catch( e ) { support.deleteExpando = false; } if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { div.attachEvent( "onclick", function() { // Cloning a node shouldn't copy over any // bound event handlers (IE does this) support.noCloneEvent = false; }); div.cloneNode( true ).fireEvent( "onclick" ); } // Check if a radio maintains its value // after being appended to the DOM input = document.createElement("input"); input.value = "t"; input.setAttribute("type", "radio"); support.radioValue = input.value === "t"; input.setAttribute("checked", "checked"); div.appendChild( input ); fragment = document.createDocumentFragment(); fragment.appendChild( div.firstChild ); // WebKit doesn't clone checked state correctly in fragments support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; div.innerHTML = ""; // Figure out if the W3C box model works as expected div.style.width = div.style.paddingLeft = "1px"; // We don't want to do body-related feature tests on frameset // documents, which lack a body. So we use // document.getElementsByTagName("body")[0], which is undefined in // frameset documents, while document.body isn’t. (7398) body = document.getElementsByTagName("body")[ 0 ]; // We use our own, invisible, body unless the body is already present // in which case we use a div (#9239) testElement = document.createElement( body ? "div" : "body" ); testElementStyle = { visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none" }; if ( body ) { jQuery.extend( testElementStyle, { position: "absolute", left: "-999px", top: "-999px" }); } for ( i in testElementStyle ) { testElement.style[ i ] = testElementStyle[ i ]; } testElement.appendChild( div ); testElementParent = body || documentElement; testElementParent.insertBefore( testElement, testElementParent.firstChild ); // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) support.appendChecked = input.checked; support.boxModel = div.offsetWidth === 2; if ( "zoom" in div.style ) { // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving // them layout // (IE < 8 does this) div.style.display = "inline"; div.style.zoom = 1; support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); // Check if elements with layout shrink-wrap their children // (IE 6 does this) div.style.display = ""; div.innerHTML = "<div style='width:4px;'></div>"; support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); } div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>"; tds = div.getElementsByTagName( "td" ); // Check if table cells still have offsetWidth/Height when they are set // to display:none and there are still other visible table cells in a // table row; if so, offsetWidth/Height are not reliable for use when // determining if an element has been hidden directly using // display:none (it is still safe to use offsets if a parent element is // hidden; don safety goggles and see bug #4512 for more information). // (only IE 8 fails this test) isSupported = ( tds[ 0 ].offsetHeight === 0 ); tds[ 0 ].style.display = ""; tds[ 1 ].style.display = "none"; // Check if empty table cells still have offsetWidth/Height // (IE < 8 fail this test) support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); div.innerHTML = ""; // Check if div with explicit width and no margin-right incorrectly // gets computed margin-right based on width of container. For more // info see bug #3333 // Fails in WebKit before Feb 2011 nightlies // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right if ( document.defaultView && document.defaultView.getComputedStyle ) { marginDiv = document.createElement( "div" ); marginDiv.style.width = "0"; marginDiv.style.marginRight = "0"; div.appendChild( marginDiv ); support.reliableMarginRight = ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; } // Remove the body element we added testElement.innerHTML = ""; // Technique from Juriy Zaytsev // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ // We only care about the case where non-standard event systems // are used, namely in IE. Short-circuiting here helps us to // avoid an eval call (in setAttribute) which can cause CSP // to go haywire. See: https://developer.mozilla.org/en/Security/CSP if ( div.attachEvent ) { for( i in { submit: 1, change: 1, focusin: 1 } ) { eventName = "on" + i; isSupported = ( eventName in div ); if ( !isSupported ) { div.setAttribute( eventName, "return;" ); isSupported = ( typeof div[ eventName ] === "function" ); } support[ i + "Bubbles" ] = isSupported; } } // Determine fixed-position support early testElement.style.position = "static"; testElement.style.top = "0px"; testElement.style.marginTop = "1px"; offsetSupport = (function( body, container ) { var outer, inner, table, td, supports, bodyMarginTop = parseFloat( body.style.marginTop ) || 0, ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;", style = "style='" + ptlm + "border:5px solid #000;padding:0;'", html = "<div " + style + "><div></div></div>" + "<table " + style + " cellpadding='0' cellspacing='0'>" + "<tr><td></td></tr></table>"; container.style.cssText = ptlm + "border:0;visibility:hidden"; container.innerHTML = html; body.insertBefore( container, body.firstChild ); outer = container.firstChild; inner = outer.firstChild; td = outer.nextSibling.firstChild.firstChild; supports = { doesNotAddBorder: (inner.offsetTop !== 5), doesAddBorderForTableAndCells: (td.offsetTop === 5) }; inner.style.position = "fixed"; inner.style.top = "20px"; // safari subtracts parent border width here which is 5px supports.supportsFixedPosition = (inner.offsetTop === 20 || inner.offsetTop === 15); inner.style.position = inner.style.top = ""; outer.style.overflow = "hidden"; outer.style.position = "relative"; supports.subtractsBorderForOverflowNotVisible = (inner.offsetTop === -5); supports.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop); return supports; })( testElement, div ); jQuery.extend( support, offsetSupport ); testElementParent.removeChild( testElement ); // Null connected elements to avoid leaks in IE testElement = fragment = select = opt = body = marginDiv = div = input = null; return support; })(); // Keep track of boxModel jQuery.boxModel = jQuery.support.boxModel; var rbrace = /^(?:\{.*\}|\[.*\])$/, rmultiDash = /([A-Z])/g; jQuery.extend({ cache: {}, // Please use with caution uuid: 0, // Unique for each copy of jQuery on the page // Non-digits removed to match rinlinejQuery expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), // The following elements throw uncatchable exceptions if you // attempt to add expando properties to them. noData: { "embed": true, // Ban all objects except for Flash (which handle expandos) "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", "applet": true }, hasData: function( elem ) { elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; return !!elem && !isEmptyDataObject( elem ); }, data: function( elem, name, data, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, ret, internalKey = jQuery.expando, getByName = typeof name === "string", // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { return; } if ( !id ) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if ( isNode ) { elem[ jQuery.expando ] = id = ++jQuery.uuid; } else { id = jQuery.expando; } } if ( !cache[ id ] ) { cache[ id ] = {}; // Avoids exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify if ( !isNode ) { cache[ id ].toJSON = jQuery.noop; } } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if ( typeof name === "object" || typeof name === "function" ) { if ( pvt ) { cache[ id ] = jQuery.extend( cache[ id ], name ); } else { cache[ id ].data = jQuery.extend( cache[ id ].data, name ); } } thisCache = cache[ id ]; // jQuery data() is stored in a separate object inside the object's internal data // cache in order to avoid key collisions between internal data and user-defined // data. if ( !pvt ) { if ( !thisCache.data ) { thisCache.data = {}; } thisCache = thisCache.data; } if ( data !== undefined ) { thisCache[ jQuery.camelCase( name ) ] = data; } // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should // not attempt to inspect the internal events object using jQuery.data, as this // internal data object is undocumented and subject to change. if ( name === "events" && !thisCache[name] ) { return thisCache[ internalKey ] && thisCache[ internalKey ].events; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if ( getByName ) { // First Try to find as-is property data ret = thisCache[ name ]; // Test for null|undefined property data if ( ret == null ) { // Try to find the camelCased property ret = thisCache[ jQuery.camelCase( name ) ]; } } else { ret = thisCache; } return ret; }, removeData: function( elem, name, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, i, l, // Reference to internal data cache key internalKey = jQuery.expando, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, // See jQuery.data for more information id = isNode ? elem[ jQuery.expando ] : jQuery.expando; // If there is already no cache entry for this object, there is no // purpose in continuing if ( !cache[ id ] ) { return; } if ( name ) { thisCache = pvt ? cache[ id ] : cache[ id ].data; if ( thisCache ) { // Support space separated names if ( jQuery.isArray( name ) ) { name = name; } else if ( name in thisCache ) { name = [ name ]; } else { // split the camel cased version by spaces name = jQuery.camelCase( name ); if ( name in thisCache ) { name = [ name ]; } else { name = name.split( " " ); } } for ( i = 0, l = name.length; i < l; i++ ) { delete thisCache[ name[i] ]; } // If there is no data left in the cache, we want to continue // and let the cache object itself get destroyed if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { return; } } } // See jQuery.data for more information if ( !pvt ) { delete cache[ id ].data; // Don't destroy the parent cache unless the internal data object // had been the only thing left in it if ( !isEmptyDataObject(cache[ id ]) ) { return; } } // Browsers that fail expando deletion also refuse to delete expandos on // the window, but it will allow it on all other JS objects; other browsers // don't care // Ensure that `cache` is not a window object #10080 if ( jQuery.support.deleteExpando || !cache.setInterval ) { delete cache[ id ]; } else { cache[ id ] = null; } // We destroyed the cache and need to eliminate the expando on the node to avoid // false lookups in the cache for entries that no longer exist if ( isNode ) { // IE does not allow us to delete expando properties from nodes, // nor does it have a removeAttribute function on Document nodes; // we must handle all of these cases if ( jQuery.support.deleteExpando ) { delete elem[ jQuery.expando ]; } else if ( elem.removeAttribute ) { elem.removeAttribute( jQuery.expando ); } else { elem[ jQuery.expando ] = null; } } }, // For internal use only. _data: function( elem, name, data ) { return jQuery.data( elem, name, data, true ); }, // A method for determining if a DOM node can handle the data expando acceptData: function( elem ) { if ( elem.nodeName ) { var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; if ( match ) { return !(match === true || elem.getAttribute("classid") !== match); } } return true; } }); jQuery.fn.extend({ data: function( key, value ) { var parts, attr, name, data = null; if ( typeof key === "undefined" ) { if ( this.length ) { data = jQuery.data( this[0] ); if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) { attr = this[0].attributes; for ( var i = 0, l = attr.length; i < l; i++ ) { name = attr[i].name; if ( name.indexOf( "data-" ) === 0 ) { name = jQuery.camelCase( name.substring(5) ); dataAttr( this[0], name, data[ name ] ); } } jQuery._data( this[0], "parsedAttrs", true ); } } return data; } else if ( typeof key === "object" ) { return this.each(function() { jQuery.data( this, key ); }); } parts = key.split("."); parts[1] = parts[1] ? "." + parts[1] : ""; if ( value === undefined ) { data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); // Try to fetch any internally stored data first if ( data === undefined && this.length ) { data = jQuery.data( this[0], key ); data = dataAttr( this[0], key, data ); } return data === undefined && parts[1] ? this.data( parts[0] ) : data; } else { return this.each(function() { var $this = jQuery( this ), args = [ parts[0], value ]; $this.triggerHandler( "setData" + parts[1] + "!", args ); jQuery.data( this, key, value ); $this.triggerHandler( "changeData" + parts[1] + "!", args ); }); } }, removeData: function( key ) { return this.each(function() { jQuery.removeData( this, key ); }); } }); function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : jQuery.isNumeric( data ) ? parseFloat( data ) : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} // Make sure we set the data so it isn't changed later jQuery.data( elem, key, data ); } else { data = undefined; } } return data; } // checks a cache object for emptiness function isEmptyDataObject( obj ) { for ( var name in obj ) { // if the public data object is empty, the private is still empty if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { continue; } if ( name !== "toJSON" ) { return false; } } return true; } function handleQueueMarkDefer( elem, type, src ) { var deferDataKey = type + "defer", queueDataKey = type + "queue", markDataKey = type + "mark", defer = jQuery._data( elem, deferDataKey ); if ( defer && ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { // Give room for hard-coded callbacks to fire first // and eventually mark/queue something else on the element setTimeout( function() { if ( !jQuery._data( elem, queueDataKey ) && !jQuery._data( elem, markDataKey ) ) { jQuery.removeData( elem, deferDataKey, true ); defer.fire(); } }, 0 ); } } jQuery.extend({ _mark: function( elem, type ) { if ( elem ) { type = (type || "fx") + "mark"; jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); } }, _unmark: function( force, elem, type ) { if ( force !== true ) { type = elem; elem = force; force = false; } if ( elem ) { type = type || "fx"; var key = type + "mark", count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); if ( count ) { jQuery._data( elem, key, count ); } else { jQuery.removeData( elem, key, true ); handleQueueMarkDefer( elem, type, "mark" ); } } }, queue: function( elem, type, data ) { var q; if ( elem ) { type = (type || "fx") + "queue"; q = jQuery._data( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !q || jQuery.isArray(data) ) { q = jQuery._data( elem, type, jQuery.makeArray(data) ); } else { q.push( data ); } } return q || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), fn = queue.shift(), runner = {}; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } jQuery._data( elem, type + ".run", runner ); fn.call( elem, function() { jQuery.dequeue( elem, type ); }, runner ); } if ( !queue.length ) { jQuery.removeData( elem, type + "queue " + type + ".run", true ); handleQueueMarkDefer( elem, type, "queue" ); } } }); jQuery.fn.extend({ queue: function( type, data ) { if ( typeof type !== "string" ) { data = type; type = "fx"; } if ( data === undefined ) { return jQuery.queue( this[0], type ); } return this.each(function() { var queue = jQuery.queue( this, type, data ); if ( type === "fx" && queue[0] !== "inprogress" ) { jQuery.dequeue( this, type ); } }); }, dequeue: function( type ) { return this.each(function() { jQuery.dequeue( this, type ); }); }, // Based off of the plugin by Clint Helfers, with permission. // http://blindsignals.com/index.php/2009/07/jquery-delay/ delay: function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, runner ) { var timeout = setTimeout( next, time ); runner.stop = function() { clearTimeout( timeout ); }; }); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, object ) { if ( typeof type !== "string" ) { object = type; type = undefined; } type = type || "fx"; var defer = jQuery.Deferred(), elements = this, i = elements.length, count = 1, deferDataKey = type + "defer", queueDataKey = type + "queue", markDataKey = type + "mark", tmp; function resolve() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } } while( i-- ) { if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { count++; tmp.add( resolve ); } } resolve(); return defer.promise(); } }); var rclass = /[\n\t\r]/g, rspace = /\s+/, rreturn = /\r/g, rtype = /^(?:button|input)$/i, rfocusable = /^(?:button|input|object|select|textarea)$/i, rclickable = /^a(?:rea)?$/i, rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, nodeHook, boolHook, fixSpecified; jQuery.fn.extend({ attr: function( name, value ) { return jQuery.access( this, name, value, true, jQuery.attr ); }, removeAttr: function( name ) { return this.each(function() { jQuery.removeAttr( this, name ); }); }, prop: function( name, value ) { return jQuery.access( this, name, value, true, jQuery.prop ); }, removeProp: function( name ) { name = jQuery.propFix[ name ] || name; return this.each(function() { // try/catch handles cases where IE balks (such as removing a property on window) try { this[ name ] = undefined; delete this[ name ]; } catch( e ) {} }); }, addClass: function( value ) { var classNames, i, l, elem, setClass, c, cl; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).addClass( value.call(this, j, this.className) ); }); } if ( value && typeof value === "string" ) { classNames = value.split( rspace ); for ( i = 0, l = this.length; i < l; i++ ) { elem = this[ i ]; if ( elem.nodeType === 1 ) { if ( !elem.className && classNames.length === 1 ) { elem.className = value; } else { setClass = " " + elem.className + " "; for ( c = 0, cl = classNames.length; c < cl; c++ ) { if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { setClass += classNames[ c ] + " "; } } elem.className = jQuery.trim( setClass ); } } } } return this; }, removeClass: function( value ) { var classNames, i, l, elem, className, c, cl; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).removeClass( value.call(this, j, this.className) ); }); } if ( (value && typeof value === "string") || value === undefined ) { classNames = (value || "").split( rspace ); for ( i = 0, l = this.length; i < l; i++ ) { elem = this[ i ]; if ( elem.nodeType === 1 && elem.className ) { if ( value ) { className = (" " + elem.className + " ").replace( rclass, " " ); for ( c = 0, cl = classNames.length; c < cl; c++ ) { className = className.replace(" " + classNames[ c ] + " ", " "); } elem.className = jQuery.trim( className ); } else { elem.className = ""; } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value, isBool = typeof stateVal === "boolean"; if ( jQuery.isFunction( value ) ) { return this.each(function( i ) { jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); }); } return this.each(function() { if ( type === "string" ) { // toggle individual class names var className, i = 0, self = jQuery( this ), state = stateVal, classNames = value.split( rspace ); while ( (className = classNames[ i++ ]) ) { // check each className given, space seperated list state = isBool ? state : !self.hasClass( className ); self[ state ? "addClass" : "removeClass" ]( className ); } } else if ( type === "undefined" || type === "boolean" ) { if ( this.className ) { // store className if set jQuery._data( this, "__className__", this.className ); } // toggle whole className this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; } }); }, hasClass: function( selector ) { var className = " " + selector + " "; for ( var i = 0, l = this.length; i < l; i++ ) { if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { return true; } } return false; }, val: function( value ) { var hooks, ret, elem = this[0]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { return ret; } ret = elem.value; return typeof ret === "string" ? // handle most common string cases ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } return undefined; } var isFunction = jQuery.isFunction( value ); return this.each(function( i ) { var self = jQuery(this), val; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, self.val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( jQuery.isArray( val ) ) { val = jQuery.map(val, function ( value ) { return value == null ? "" : value + ""; }); } hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; // If set returns undefined, fall back to normal setting if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } }); } }); jQuery.extend({ valHooks: { option: { get: function( elem ) { // attributes.value is undefined in Blackberry 4.7 but // uses .value. See #6932 var val = elem.attributes.value; return !val || val.specified ? elem.value : elem.text; } }, select: { get: function( elem ) { var value, index = elem.selectedIndex, values = [], options = elem.options, one = elem.type === "select-one"; // Nothing was selected if ( index < 0 ) { return null; } // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; // Don't return options that are disabled or in a disabled optgroup if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } // Fixes Bug #2551 -- select.val() broken in IE after form.reset() if ( one && !values.length && options.length ) { return jQuery( options[ index ] ).val(); } return values; }, set: function( elem, value ) { var values = jQuery.makeArray( value ); jQuery(elem).find("option").each(function() { this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; }); if ( !values.length ) { elem.selectedIndex = -1; } return values; } } }, attrFn: { val: true, css: true, html: true, text: true, data: true, width: true, height: true, offset: true }, attr: function( elem, name, value, pass ) { var nType = elem.nodeType; // don't get/set attributes on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return undefined; } if ( pass && name in jQuery.attrFn ) { return jQuery( elem )[ name ]( value ); } // Fallback to prop when attributes are not supported if ( !("getAttribute" in elem) ) { return jQuery.prop( elem, name, value ); } var ret, hooks, notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); // Normalize the name if needed if ( notxml ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || (rboolean.test( name ) ? boolHook : nodeHook); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return undefined; } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { elem.setAttribute( name, "" + value ); return value; } } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { ret = elem.getAttribute( name ); // Non-existent attributes return null, we normalize to undefined return ret === null ? undefined : ret; } }, removeAttr: function( elem, value ) { var propName, attrNames, name, l, i = 0; if ( elem.nodeType === 1 ) { attrNames = (value || "").split( rspace ); l = attrNames.length; for ( ; i < l; i++ ) { name = attrNames[ i ].toLowerCase(); // See #9699 for explanation of this approach (setting first, then removal) jQuery.attr( elem, name, "" ); elem.removeAttribute( name ); // Set corresponding property to false for boolean attributes if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) { elem[ propName ] = false; } } } }, attrHooks: { type: { set: function( elem, value ) { // We can't allow the type property to be changed (since it causes problems in IE) if ( rtype.test( elem.nodeName ) && elem.parentNode ) { jQuery.error( "type property can't be changed" ); } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { // Setting the type on a radio button after the value resets the value in IE6-9 // Reset value to it's default in case type is set after value // This is for element creation var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } }, // Use the value property for back compat // Use the nodeHook for button elements in IE6/7 (#1954) value: { get: function( elem, name ) { if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { return nodeHook.get( elem, name ); } return name in elem ? elem.value : null; }, set: function( elem, value, name ) { if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { return nodeHook.set( elem, value, name ); } // Does not return so that setAttribute is also used elem.value = value; } } }, propFix: { tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable" }, prop: function( elem, name, value ) { var nType = elem.nodeType; // don't get/set properties on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return undefined; } var ret, hooks, notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); if ( notxml ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { return (elem[ name ] = value); } } else { if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { return elem[ name ]; } } }, propHooks: { tabIndex: { get: function( elem ) { // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ var attributeNode = elem.getAttributeNode("tabindex"); return attributeNode && attributeNode.specified ? parseInt( attributeNode.value, 10 ) : rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 0 : undefined; } } } }); // Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; // Hook for boolean attributes boolHook = { get: function( elem, name ) { // Align boolean attributes with corresponding properties // Fall back to attribute presence where some booleans are not supported var attrNode, property = jQuery.prop( elem, name ); return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? name.toLowerCase() : undefined; }, set: function( elem, value, name ) { var propName; if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { // value is true since we know at this point it's type boolean and not false // Set boolean attributes to the same name and set the DOM property propName = jQuery.propFix[ name ] || name; if ( propName in elem ) { // Only set the IDL specifically if it already exists on the element elem[ propName ] = true; } elem.setAttribute( name, name.toLowerCase() ); } return name; } }; // IE6/7 do not support getting/setting some attributes with get/setAttribute if ( !jQuery.support.getSetAttribute ) { fixSpecified = { name: true, id: true }; // Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret; ret = elem.getAttributeNode( name ); return ret && (fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified) ? ret.nodeValue : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { ret = document.createAttribute( name ); elem.setAttributeNode( ret ); } return (ret.nodeValue = value + ""); } }; // Apply the nodeHook to tabindex jQuery.attrHooks.tabindex.set = nodeHook.set; // Set width and height to auto instead of 0 on empty string( Bug #8150 ) // This is for removals jQuery.each([ "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { set: function( elem, value ) { if ( value === "" ) { elem.setAttribute( name, "auto" ); return value; } } }); }); // Set contenteditable to false on removals(#10429) // Setting to empty string throws an error as an invalid value jQuery.attrHooks.contenteditable = { get: nodeHook.get, set: function( elem, value, name ) { if ( value === "" ) { value = "false"; } nodeHook.set( elem, value, name ); } }; } // Some attributes require a special call on IE if ( !jQuery.support.hrefNormalized ) { jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { get: function( elem ) { var ret = elem.getAttribute( name, 2 ); return ret === null ? undefined : ret; } }); }); } if ( !jQuery.support.style ) { jQuery.attrHooks.style = { get: function( elem ) { // Return undefined in the case of empty string // Normalize to lowercase since IE uppercases css property names return elem.style.cssText.toLowerCase() || undefined; }, set: function( elem, value ) { return (elem.style.cssText = "" + value); } }; } // Safari mis-reports the default selected property of an option // Accessing the parent's selectedIndex property fixes it if ( !jQuery.support.optSelected ) { jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { get: function( elem ) { var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; // Make sure that it also works with optgroups, see #5701 if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } return null; } }); } // Radios and checkboxes getter/setter if ( !jQuery.support.checkOn ) { jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { get: function( elem ) { // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified return elem.getAttribute("value") === null ? "on" : elem.value; } }; }); } jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { set: function( elem, value ) { if ( jQuery.isArray( value ) ) { return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0); } } }); }); var rnamespaces = /\.(.*)$/, rformElems = /^(?:textarea|input|select)$/i, rperiod = /\./g, rspaces = / /g, rescape = /[^\w\s.|`]/g, rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, rhoverHack = /\bhover(\.\S+)?/, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|contextmenu)|click/, rquickIs = /^([\w\-]+)?(?:#([\w\-]+))?(?:\.([\w\-]+))?(?:\[([\w+\-]+)=["']?([\w\-]*)["']?\])?$/, quickParse = function( selector ) { var quick = rquickIs.exec( selector ); if ( quick ) { // 0 1 2 3 4 5 // [ _, tag, id, class, attrName, attrValue ] quick[1] = ( quick[1] || "" ).toLowerCase(); quick[3] = quick[3] && new RegExp( "\\b" + quick[3] + "\\b" ); } return quick; }, quickIs = function( elem, m ) { return ( (!m[1] || elem.nodeName.toLowerCase() === m[1]) && (!m[2] || elem.id === m[2]) && (!m[3] || m[3].test( elem.className )) && (!m[4] || elem.getAttribute( m[4] ) == m[5]) ); }; /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { add: function( elem, types, handler, data, selector ) { var elemData, eventHandle, events, t, tns, type, namespaces, handleObj, handleObjIn, quick, handlers, special; // Don't attach events to noData or text/comment nodes (allow plain objects tho) if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first events = elemData.events; if ( !events ) { elemData.events = events = {}; } eventHandle = elemData.handle; if ( !eventHandle ) { elemData.handle = eventHandle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.handle.apply( eventHandle.elem, arguments ) : undefined; }; // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events eventHandle.elem = elem; } // Handle multiple events separated by a space // jQuery(...).bind("mouseover mouseout", fn); types = types.replace( rhoverHack, "mouseover$1 mouseout$1" ).split( " " ); for ( t = 0; t < types.length; t++ ) { tns = rtypenamespace.exec( types[t] ) || []; type = tns[1]; namespaces = (tns[2] || "").split( "." ).sort(); // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend({ type: type, origType: tns[1], data: data, handler: handler, guid: handler.guid, selector: selector, namespace: namespaces.join(".") }, handleObjIn ); // Delegated event; pre-analyze selector so it's processed quickly on event dispatch if ( selector ) { handleObj.quick = quickParse( selector ); if ( !handleObj.quick && jQuery.expr.match.POS.test( selector ) ) { handleObj.isPositional = true; } } // Init the event handler queue if we're the first handlers = events[ type ]; if ( !handlers ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener/attachEvent if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { // Bind the global event handler to the element if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } // Nullify elem to prevent memory leaks in IE elem = null; }, global: {}, // Detach an event or set of events from an element remove: function( elem, types, handler, selector ) { var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), t, tns, type, namespaces, origCount, j, events, special, handle, eventType, handleObj; if ( !elemData || !(events = elemData.events) ) { return; } // For removal, types can be an Event object if ( types && types.type && types.handler ) { handler = types.handler; types = types.type; selector = types.selector; } // Once for each type.namespace in types; type may be omitted types = (types || "").replace( rhoverHack, "mouseover$1 mouseout$1" ).split(" "); for ( t = 0; t < types.length; t++ ) { tns = rtypenamespace.exec( types[t] ) || []; type = tns[1]; namespaces = tns[2]; // Unbind all events (on this namespace, if provided) for the element if ( !type ) { namespaces = namespaces? "." + namespaces : ""; for ( j in events ) { jQuery.event.remove( elem, j + namespaces, handler, selector ); } return; } special = jQuery.event.special[ type ] || {}; type = ( selector? special.delegateType : special.bindType ) || type; eventType = events[ type ] || []; origCount = eventType.length; namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; // Only need to loop for special events or selective removal if ( handler || namespaces || selector || special.remove ) { for ( j = 0; j < eventType.length; j++ ) { handleObj = eventType[ j ]; if ( !handler || handler.guid === handleObj.guid ) { if ( !namespaces || namespaces.test( handleObj.namespace ) ) { if ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) { eventType.splice( j--, 1 ); if ( handleObj.selector ) { eventType.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } } } } else { // Removing all events eventType.length = 0; } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( eventType.length === 0 && origCount !== eventType.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { handle = elemData.handle; if ( handle ) { handle.elem = null; } // removeData also checks for emptiness and clears the expando if empty // so use it instead of delete jQuery.removeData( elem, [ "events", "handle" ], true ); } }, // Events that are safe to short-circuit if no handlers are attached. // Native DOM events should not be added, they may have inline handlers. customEvent: { "getData": true, "setData": true, "changeData": true }, trigger: function( event, data, elem, onlyHandlers ) { // Don't do events on text and comment nodes if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { return; } // Event object or event type var type = event.type || event, namespaces = [], cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; if ( type.indexOf( "!" ) >= 0 ) { // Exclusive events trigger only for the exact event (no namespaces) type = type.slice(0, -1); exclusive = true; } if ( type.indexOf( "." ) >= 0 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { // No jQuery handlers for this event type, and it can't have inline handlers return; } // Caller can pass in an Event, Object, or just an event type string event = typeof event === "object" ? // jQuery.Event object event[ jQuery.expando ] ? event : // Object literal new jQuery.Event( type, event ) : // Just the event type (string) new jQuery.Event( type ); event.type = type; event.isTrigger = true; event.exclusive = exclusive; event.namespace = namespaces.join( "." ); event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; // triggerHandler() and global events don't bubble or run the default action if ( onlyHandlers || !elem ) { event.preventDefault(); } // Handle a global trigger if ( !elem ) { // TODO: Stop taunting the data cache; remove global events and always attach to document cache = jQuery.cache; event.stopPropagation(); for ( i in cache ) { if ( cache[ i ].events && cache[ i ].events[ type ] ) { jQuery.event.trigger( event, data, cache[ i ].handle.elem ); } } return; } // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data != null ? jQuery.makeArray( data ) : []; data.unshift( event ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) eventPath = [[ elem, special.bindType || type ]]; if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; old = null; for ( cur = elem.parentNode; cur; cur = cur.parentNode ) { eventPath.push([ cur, bubbleType ]); old = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( old && old === elem.ownerDocument ) { eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); } } // Fire handlers on the event path for ( i = 0; i < eventPath.length; i++ ) { cur = eventPath[i][0]; event.type = eventPath[i][1]; handle = (jQuery._data( cur, "events" ) || {})[ event.type ] && jQuery._data( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } handle = ontype && cur[ ontype ]; if ( handle && jQuery.acceptData( cur ) ) { handle.apply( cur, data ); } if ( event.isPropagationStopped() ) { break; } } event.type = type; // If nobody prevented the default action, do it now if ( !event.isDefaultPrevented() ) { if ( (!special._default || special._default.call( elem.ownerDocument, event, data ) === false) && !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. // Can't use an .isFunction() check here because IE6/7 fails that test. // Don't do default actions on window, that's where global variables be (#6170) // IE<9 dies on focus/blur to hidden element (#1486) if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method old = elem[ ontype ]; if ( old ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; elem[ type ](); jQuery.event.triggered = undefined; if ( old ) { elem[ ontype ] = old; } } } } return event.result; }, handle: function( event ) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event || window.event ); var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []), delegateCount = handlers.delegateCount, args = [].slice.call( arguments, 0 ), handlerQueue = [], i, cur, selMatch, matches, handleObj, sel, hit, related; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[0] = event; // Determine handlers that should run if there are delegated events // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861) if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { selMatch = {}; matches = []; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; sel = handleObj.selector; hit = selMatch[ sel ]; if ( handleObj.isPositional ) { // Since .is() does not work for positionals; see http://jsfiddle.net/eJ4yd/3/ hit = ( hit || (selMatch[ sel ] = jQuery( sel )) ).index( cur ) >= 0; } else if ( hit === undefined ) { hit = selMatch[ sel ] = ( handleObj.quick ? quickIs( cur, handleObj.quick ) : jQuery( cur ).is( sel ) ); } if ( hit ) { matches.push( handleObj ); } } if ( matches.length ) { handlerQueue.push({ elem: cur, matches: matches }); } } } // Copy the remaining (bound) handlers in case they're changed handlers = handlers.slice( delegateCount ); // Run delegates first; they may want to stop propagation beneath us event.delegateTarget = this; for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { matched = handlerQueue[ i ]; dispatch( matched.elem, event, matched.matches, args ); } delete event.delegateTarget; // Run non-delegated handlers for this level if ( handlers.length ) { dispatch( this, event, handlers, args ); } return event.result; }, // Includes some event props shared by KeyEvent and MouseEvent // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function( event, original ) { // Add which for key events if ( event.which == null ) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: "button buttons clientX clientY fromElement layerX layerY offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "), filter: function( event, original ) { var eventDoc, doc, body, button = original.button, fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); } // Add relatedTarget, if necessary if ( !event.relatedTarget && fromElement ) { event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); } return event; } }, fix: function( event ) { if ( event[ jQuery.expando ] ) { return event; } // Create a writable copy of the event object and normalize some properties var i, prop, originalEvent = event, fixHook = jQuery.event.fixHooks[ event.type ] || {}, copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; event = jQuery.Event( originalEvent ); for ( i = copy.length; i; ) { prop = copy[ --i ]; event[ prop ] = originalEvent[ prop ]; } // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) if ( !event.target ) { event.target = originalEvent.srcElement || document; } // Target should not be a text node (#504, Safari) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; } // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) if ( event.metaKey === undefined ) { event.metaKey = event.ctrlKey; } return fixHook.filter? fixHook.filter( event, originalEvent ) : event; }, special: { ready: { // Make sure the ready event is setup setup: jQuery.bindReady }, focus: { delegateType: "focusin", noBubble: true }, blur: { delegateType: "focusout", noBubble: true }, beforeunload: { setup: function( data, namespaces, eventHandle ) { // We only want to do this special case on windows if ( jQuery.isWindow( this ) ) { this.onbeforeunload = eventHandle; } }, teardown: function( namespaces, eventHandle ) { if ( this.onbeforeunload === eventHandle ) { this.onbeforeunload = null; } } } }, simulate: function( type, elem, event, bubble ) { // Piggyback on a donor event to simulate a different one. // Fake originalEvent to avoid donor's stopPropagation, but if the // simulated event prevents default then we do the same on the donor. var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true, originalEvent: {} } ); if ( bubble ) { jQuery.event.trigger( e, null, elem ); } else { jQuery.event.handle.call( elem, e ); } if ( e.isDefaultPrevented() ) { event.preventDefault(); } } }; // Run jQuery handler functions; called from jQuery.event.handle function dispatch( target, event, handlers, args ) { var run_all = !event.exclusive && !event.namespace, specialHandle = ( jQuery.event.special[ event.type ] || {} ).handle, j, handleObj, ret; event.currentTarget = target; for ( j = 0; j < handlers.length && !event.isImmediatePropagationStopped(); j++ ) { handleObj = handlers[ j ]; // Triggered event must either 1) be non-exclusive and have no namespace, or // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { // Pass in a reference to the handler function itself // So that we can later remove it event.handler = handleObj.handler; event.data = handleObj.data; event.handleObj = handleObj; ret = ( specialHandle || handleObj.handler ).apply( target, args ); if ( ret !== undefined ) { event.result = ret; if ( ret === false ) { event.preventDefault(); event.stopPropagation(); } } } } } jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); } } : function( elem, type, handle ) { if ( elem.detachEvent ) { elem.detachEvent( "on" + type, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !(this instanceof jQuery.Event) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; function returnFalse() { return false; } function returnTrue() { return true; } // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = returnTrue; var e = this.originalEvent; if ( !e ) { return; } // if preventDefault exists run it on the original event if ( e.preventDefault ) { e.preventDefault(); // otherwise set the returnValue property of the original event to false (IE) } else { e.returnValue = false; } }, stopPropagation: function() { this.isPropagationStopped = returnTrue; var e = this.originalEvent; if ( !e ) { return; } // if stopPropagation exists run it on the original event if ( e.stopPropagation ) { e.stopPropagation(); } // otherwise set the cancelBubble property of the original event to true (IE) e.cancelBubble = true; }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = returnTrue; this.stopPropagation(); }, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse }; // Create mouseenter/leave events using mouseover/out and event-time checks jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function( orig, fix ) { jQuery.event.special[ orig ] = jQuery.event.special[ fix ] = { delegateType: fix, bindType: fix, handle: function( event ) { var target = this, related = event.relatedTarget, handleObj = event.handleObj, selector = handleObj.selector, oldType, ret; // For a real mouseover/out, always call the handler; for // mousenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || handleObj.origType === event.type || (related !== target && !jQuery.contains( target, related )) ) { oldType = event.type; event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = oldType; } return ret; } }; }); // IE submit delegation if ( !jQuery.support.submitBubbles ) { jQuery.event.special.submit = { setup: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Lazy-add a submit handler when a descendant form may potentially be submitted jQuery.event.add( this, "click._submit keypress._submit", function( e ) { // Node name check avoids a VML-related crash in IE (#9807) var elem = e.target, form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; if ( form && !form._submit_attached ) { jQuery.event.add( form, "submit._submit", function( event ) { // Form was submitted, bubble the event up the tree if ( this.parentNode ) { jQuery.event.simulate( "submit", this.parentNode, event, true ); } }); form._submit_attached = true; } }); // return undefined since we don't need an event listener }, teardown: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Remove delegated handlers; cleanData eventually reaps submit handlers attached above jQuery.event.remove( this, "._submit" ); } }; } // IE change delegation and checkbox/radio fix if ( !jQuery.support.changeBubbles ) { jQuery.event.special.change = { setup: function() { if ( rformElems.test( this.nodeName ) ) { // IE doesn't fire change on a check/radio until blur; trigger it on click // after a propertychange. Eat the blur-change in special.change.handle. // This still fires onchange a second time for check/radio after blur. if ( this.type === "checkbox" || this.type === "radio" ) { jQuery.event.add( this, "propertychange._change", function( event ) { if ( event.originalEvent.propertyName === "checked" ) { this._just_changed = true; } }); jQuery.event.add( this, "click._change", function( event ) { if ( this._just_changed ) { this._just_changed = false; jQuery.event.simulate( "change", this, event, true ); } }); } return false; } // Delegated event; lazy-add a change handler on descendant inputs jQuery.event.add( this, "beforeactivate._change", function( e ) { var elem = e.target; if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { jQuery.event.add( elem, "change._change", function( event ) { if ( this.parentNode && !event.isSimulated ) { jQuery.event.simulate( "change", this.parentNode, event, true ); } }); elem._change_attached = true; } }); }, handle: function( event ) { var elem = event.target; // Swallow native change events from checkbox/radio, we already triggered them above if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { return event.handleObj.handler.apply( this, arguments ); } }, teardown: function() { jQuery.event.remove( this, "._change" ); return rformElems.test( this.nodeName ); } }; } // Create "bubbling" focus and blur events if ( !jQuery.support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler while someone wants focusin/focusout var attaches = 0, handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); }; jQuery.event.special[ fix ] = { setup: function() { if ( attaches++ === 0 ) { document.addEventListener( orig, handler, true ); } }, teardown: function() { if ( --attaches === 0 ) { document.removeEventListener( orig, handler, true ); } } }; }); } jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = selector; selector = undefined; } for ( type in types ) { this.on( type, selector, data, types[ type ], one ); } return this; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return this; } if ( one === 1 ) { origFn = fn; fn = function( event ) { jQuery.event.remove( event.delegateTarget || this, event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return this.each( function() { jQuery.event.add( this, types, fn, data, selector ); }); }, one: function( types, selector, data, fn ) { return this.on.call( this, types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { if ( types && types.preventDefault ) { // ( event ) native or jQuery.Event return this.off( types.type, types.handler, types.selector ); } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( var type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each(function() { jQuery.event.remove( this, types, fn, selector ); }); }, bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, live: function( types, data, fn ) { jQuery( this.context ).on( types, this.selector, data, fn ); return this; }, die: function( types, fn ) { jQuery( this.context ).off( types, this.selector || "**", fn ); return this; }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); }, trigger: function( type, data ) { return this.each(function() { jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { if ( this[0] ) { return jQuery.event.trigger( type, data, this[0], true ); } }, toggle: function( fn ) { // Save reference to arguments for access in closure var args = arguments, guid = fn.guid || jQuery.guid++, i = 0, toggler = function( event ) { // Figure out which function to execute var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); // Make sure that clicks stop event.preventDefault(); // and execute the function return args[ lastToggle ].apply( this, arguments ) || false; }; // link all the functions, so any of them can unbind this click handler toggler.guid = guid; while ( i < args.length ) { args[ i++ ].guid = guid; } return this.click( toggler ); }, hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } }); jQuery.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( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { if ( fn == null ) { fn = data; data = null; } return arguments.length > 0 ? this.bind( name, data, fn ) : this.trigger( name ); }; if ( jQuery.attrFn ) { jQuery.attrFn[ name ] = true; } if ( rkeyEvent.test( name ) ) { jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; } if ( rmouseEvent.test( name ) ) { jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; } }); /*! * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, expando = "sizcache" + (Math.random() + '').replace('.', ''), done = 0, toString = Object.prototype.toString, hasDuplicate = false, baseHasDuplicate = true, rBackslash = /\\/g, rReturn = /\r\n/g, rNonWord = /\W/; // Here we check if the JavaScript engine is using some sort of // optimization where it does not always call our comparision // function. If that is the case, discard the hasDuplicate value. // Thus far that includes Google Chrome. [0, 0].sort(function() { baseHasDuplicate = false; return 0; }); var Sizzle = function( selector, context, results, seed ) { results = results || []; context = context || document; var origContext = context; if ( context.nodeType !== 1 && context.nodeType !== 9 ) { return []; } if ( !selector || typeof selector !== "string" ) { return results; } var m, set, checkSet, extra, ret, cur, pop, i, prune = true, contextXML = Sizzle.isXML( context ), parts = [], soFar = selector; // Reset the position of the chunker regexp (start from head) do { chunker.exec( "" ); m = chunker.exec( soFar ); if ( m ) { soFar = m[3]; parts.push( m[1] ); if ( m[2] ) { extra = m[3]; break; } } } while ( m ); if ( parts.length > 1 && origPOS.exec( selector ) ) { if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { set = posProcess( parts[0] + parts[1], context, seed ); } else { set = Expr.relative[ parts[0] ] ? [ context ] : Sizzle( parts.shift(), context ); while ( parts.length ) { selector = parts.shift(); if ( Expr.relative[ selector ] ) { selector += parts.shift(); } set = posProcess( selector, set, seed ); } } } else { // Take a shortcut and set the context if the root selector is an ID // (but not if it'll be faster if the inner selector is an ID) if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { ret = Sizzle.find( parts.shift(), context, contextXML ); context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0]; } if ( context ) { ret = seed ? { expr: parts.pop(), set: makeArray(seed) } : Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set; if ( parts.length > 0 ) { checkSet = makeArray( set ); } else { prune = false; } while ( parts.length ) { cur = parts.pop(); pop = cur; if ( !Expr.relative[ cur ] ) { cur = ""; } else { pop = parts.pop(); } if ( pop == null ) { pop = context; } Expr.relative[ cur ]( checkSet, pop, contextXML ); } } else { checkSet = parts = []; } } if ( !checkSet ) { checkSet = set; } if ( !checkSet ) { Sizzle.error( cur || selector ); } if ( toString.call(checkSet) === "[object Array]" ) { if ( !prune ) { results.push.apply( results, checkSet ); } else if ( context && context.nodeType === 1 ) { for ( i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { results.push( set[i] ); } } } else { for ( i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && checkSet[i].nodeType === 1 ) { results.push( set[i] ); } } } } else { makeArray( checkSet, results ); } if ( extra ) { Sizzle( extra, origContext, results, seed ); Sizzle.uniqueSort( results ); } return results; }; Sizzle.uniqueSort = function( results ) { if ( sortOrder ) { hasDuplicate = baseHasDuplicate; results.sort( sortOrder ); if ( hasDuplicate ) { for ( var i = 1; i < results.length; i++ ) { if ( results[i] === results[ i - 1 ] ) { results.splice( i--, 1 ); } } } } return results; }; Sizzle.matches = function( expr, set ) { return Sizzle( expr, null, null, set ); }; Sizzle.matchesSelector = function( node, expr ) { return Sizzle( expr, null, null, [node] ).length > 0; }; Sizzle.find = function( expr, context, isXML ) { var set, i, len, match, type, left; if ( !expr ) { return []; } for ( i = 0, len = Expr.order.length; i < len; i++ ) { type = Expr.order[i]; if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { left = match[1]; match.splice( 1, 1 ); if ( left.substr( left.length - 1 ) !== "\\" ) { match[1] = (match[1] || "").replace( rBackslash, "" ); set = Expr.find[ type ]( match, context, isXML ); if ( set != null ) { expr = expr.replace( Expr.match[ type ], "" ); break; } } } } if ( !set ) { set = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( "*" ) : []; } return { set: set, expr: expr }; }; Sizzle.filter = function( expr, set, inplace, not ) { var match, anyFound, type, found, item, filter, left, i, pass, old = expr, result = [], curLoop = set, isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); while ( expr && set.length ) { for ( type in Expr.filter ) { if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { filter = Expr.filter[ type ]; left = match[1]; anyFound = false; match.splice(1,1); if ( left.substr( left.length - 1 ) === "\\" ) { continue; } if ( curLoop === result ) { result = []; } if ( Expr.preFilter[ type ] ) { match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); if ( !match ) { anyFound = found = true; } else if ( match === true ) { continue; } } if ( match ) { for ( i = 0; (item = curLoop[i]) != null; i++ ) { if ( item ) { found = filter( item, match, i, curLoop ); pass = not ^ found; if ( inplace && found != null ) { if ( pass ) { anyFound = true; } else { curLoop[i] = false; } } else if ( pass ) { result.push( item ); anyFound = true; } } } } if ( found !== undefined ) { if ( !inplace ) { curLoop = result; } expr = expr.replace( Expr.match[ type ], "" ); if ( !anyFound ) { return []; } break; } } } // Improper expression if ( expr === old ) { if ( anyFound == null ) { Sizzle.error( expr ); } else { break; } } old = expr; } return curLoop; }; Sizzle.error = function( msg ) { throw "Syntax error, unrecognized expression: " + msg; }; /** * Utility function for retreiving the text value of an array of DOM nodes * @param {Array|Element} elem */ var getText = Sizzle.getText = function( elem ) { var i, node, nodeType = elem.nodeType, ret = ""; if ( nodeType ) { if ( nodeType === 1 ) { // Use textContent || innerText for elements if ( typeof elem.textContent === 'string' ) { return elem.textContent; } else if ( typeof elem.innerText === 'string' ) { // Replace IE's carriage returns return elem.innerText.replace( rReturn, '' ); } else { // Traverse it's children for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } } else { // If no nodeType, this is expected to be an array for ( i = 0; (node = elem[i]); i++ ) { // Do not traverse comment nodes if ( node.nodeType !== 8 ) { ret += getText( node ); } } } return ret; }; var Expr = Sizzle.selectors = { order: [ "ID", "NAME", "TAG" ], match: { ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ }, leftMatch: {}, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function( elem ) { return elem.getAttribute( "href" ); }, type: function( elem ) { return elem.getAttribute( "type" ); } }, relative: { "+": function(checkSet, part){ var isPartStr = typeof part === "string", isTag = isPartStr && !rNonWord.test( part ), isPartStrNotTag = isPartStr && !isTag; if ( isTag ) { part = part.toLowerCase(); } for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { if ( (elem = checkSet[i]) ) { while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? elem || false : elem === part; } } if ( isPartStrNotTag ) { Sizzle.filter( part, checkSet, true ); } }, ">": function( checkSet, part ) { var elem, isPartStr = typeof part === "string", i = 0, l = checkSet.length; if ( isPartStr && !rNonWord.test( part ) ) { part = part.toLowerCase(); for ( ; i < l; i++ ) { elem = checkSet[i]; if ( elem ) { var parent = elem.parentNode; checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; } } } else { for ( ; i < l; i++ ) { elem = checkSet[i]; if ( elem ) { checkSet[i] = isPartStr ? elem.parentNode : elem.parentNode === part; } } if ( isPartStr ) { Sizzle.filter( part, checkSet, true ); } } }, "": function(checkSet, part, isXML){ var nodeCheck, doneName = done++, checkFn = dirCheck; if ( typeof part === "string" && !rNonWord.test( part ) ) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; } checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); }, "~": function( checkSet, part, isXML ) { var nodeCheck, doneName = done++, checkFn = dirCheck; if ( typeof part === "string" && !rNonWord.test( part ) ) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; } checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); } }, find: { ID: function( match, context, isXML ) { if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 return m && m.parentNode ? [m] : []; } }, NAME: function( match, context ) { if ( typeof context.getElementsByName !== "undefined" ) { var ret = [], results = context.getElementsByName( match[1] ); for ( var i = 0, l = results.length; i < l; i++ ) { if ( results[i].getAttribute("name") === match[1] ) { ret.push( results[i] ); } } return ret.length === 0 ? null : ret; } }, TAG: function( match, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( match[1] ); } } }, preFilter: { CLASS: function( match, curLoop, inplace, result, not, isXML ) { match = " " + match[1].replace( rBackslash, "" ) + " "; if ( isXML ) { return match; } for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { if ( elem ) { if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { if ( !inplace ) { result.push( elem ); } } else if ( inplace ) { curLoop[i] = false; } } } return false; }, ID: function( match ) { return match[1].replace( rBackslash, "" ); }, TAG: function( match, curLoop ) { return match[1].replace( rBackslash, "" ).toLowerCase(); }, CHILD: function( match ) { if ( match[1] === "nth" ) { if ( !match[2] ) { Sizzle.error( match[0] ); } match[2] = match[2].replace(/^\+|\s*/g, ''); // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); // calculate the numbers (first)n+(last) including if they are negative match[2] = (test[1] + (test[2] || 1)) - 0; match[3] = test[3] - 0; } else if ( match[2] ) { Sizzle.error( match[0] ); } // TODO: Move to normal caching system match[0] = done++; return match; }, ATTR: function( match, curLoop, inplace, result, not, isXML ) { var name = match[1] = match[1].replace( rBackslash, "" ); if ( !isXML && Expr.attrMap[name] ) { match[1] = Expr.attrMap[name]; } // Handle if an un-quoted value was used match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); if ( match[2] === "~=" ) { match[4] = " " + match[4] + " "; } return match; }, PSEUDO: function( match, curLoop, inplace, result, not ) { if ( match[1] === "not" ) { // If we're dealing with a complex expression, or a simple one if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { match[3] = Sizzle(match[3], null, null, curLoop); } else { var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); if ( !inplace ) { result.push.apply( result, ret ); } return false; } } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { return true; } return match; }, POS: function( match ) { match.unshift( true ); return match; } }, filters: { enabled: function( elem ) { return elem.disabled === false && elem.type !== "hidden"; }, disabled: function( elem ) { return elem.disabled === true; }, checked: function( elem ) { return elem.checked === true; }, selected: function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, parent: function( elem ) { return !!elem.firstChild; }, empty: function( elem ) { return !elem.firstChild; }, has: function( elem, i, match ) { return !!Sizzle( match[3], elem ).length; }, header: function( elem ) { return (/h\d/i).test( elem.nodeName ); }, text: function( elem ) { var attr = elem.getAttribute( "type" ), type = elem.type; // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); }, radio: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; }, checkbox: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; }, file: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; }, password: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; }, submit: function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "submit" === elem.type; }, image: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; }, reset: function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "reset" === elem.type; }, button: function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && "button" === elem.type || name === "button"; }, input: function( elem ) { return (/input|select|textarea|button/i).test( elem.nodeName ); }, focus: function( elem ) { return elem === elem.ownerDocument.activeElement; } }, setFilters: { first: function( elem, i ) { return i === 0; }, last: function( elem, i, match, array ) { return i === array.length - 1; }, even: function( elem, i ) { return i % 2 === 0; }, odd: function( elem, i ) { return i % 2 === 1; }, lt: function( elem, i, match ) { return i < match[3] - 0; }, gt: function( elem, i, match ) { return i > match[3] - 0; }, nth: function( elem, i, match ) { return match[3] - 0 === i; }, eq: function( elem, i, match ) { return match[3] - 0 === i; } }, filter: { PSEUDO: function( elem, match, i, array ) { var name = match[1], filter = Expr.filters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } else if ( name === "contains" ) { return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; } else if ( name === "not" ) { var not = match[3]; for ( var j = 0, l = not.length; j < l; j++ ) { if ( not[j] === elem ) { return false; } } return true; } else { Sizzle.error( name ); } }, CHILD: function( elem, match ) { var first, last, doneName, parent, cache, count, diff, type = match[1], node = elem; switch ( type ) { case "only": case "first": while ( (node = node.previousSibling) ) { if ( node.nodeType === 1 ) { return false; } } if ( type === "first" ) { return true; } node = elem; case "last": while ( (node = node.nextSibling) ) { if ( node.nodeType === 1 ) { return false; } } return true; case "nth": first = match[2]; last = match[3]; if ( first === 1 && last === 0 ) { return true; } doneName = match[0]; parent = elem.parentNode; if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { count = 0; for ( node = parent.firstChild; node; node = node.nextSibling ) { if ( node.nodeType === 1 ) { node.nodeIndex = ++count; } } parent[ expando ] = doneName; } diff = elem.nodeIndex - last; if ( first === 0 ) { return diff === 0; } else { return ( diff % first === 0 && diff / first >= 0 ); } } }, ID: function( elem, match ) { return elem.nodeType === 1 && elem.getAttribute("id") === match; }, TAG: function( elem, match ) { return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; }, CLASS: function( elem, match ) { return (" " + (elem.className || elem.getAttribute("class")) + " ") .indexOf( match ) > -1; }, ATTR: function( elem, match ) { var name = match[1], result = Sizzle.attr ? Sizzle.attr( elem, name ) : Expr.attrHandle[ name ] ? Expr.attrHandle[ name ]( elem ) : elem[ name ] != null ? elem[ name ] : elem.getAttribute( name ), value = result + "", type = match[2], check = match[4]; return result == null ? type === "!=" : !type && Sizzle.attr ? result != null : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value !== check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false; }, POS: function( elem, match, i, array ) { var name = match[2], filter = Expr.setFilters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } } } }; var origPOS = Expr.match.POS, fescape = function(all, num){ return "\\" + (num - 0 + 1); }; for ( var type in Expr.match ) { Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); } var makeArray = function( array, results ) { array = Array.prototype.slice.call( array, 0 ); if ( results ) { results.push.apply( results, array ); return results; } return array; }; // Perform a simple check to determine if the browser is capable of // converting a NodeList to an array using builtin methods. // Also verifies that the returned array holds DOM nodes // (which is not the case in the Blackberry browser) try { Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; // Provide a fallback method if it does not work } catch( e ) { makeArray = function( array, results ) { var i = 0, ret = results || []; if ( toString.call(array) === "[object Array]" ) { Array.prototype.push.apply( ret, array ); } else { if ( typeof array.length === "number" ) { for ( var l = array.length; i < l; i++ ) { ret.push( array[i] ); } } else { for ( ; array[i]; i++ ) { ret.push( array[i] ); } } } return ret; }; } var sortOrder, siblingCheck; if ( document.documentElement.compareDocumentPosition ) { sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; return 0; } if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { return a.compareDocumentPosition ? -1 : 1; } return a.compareDocumentPosition(b) & 4 ? -1 : 1; }; } else { sortOrder = function( a, b ) { // The nodes are identical, we can exit early if ( a === b ) { hasDuplicate = true; return 0; // Fallback to using sourceIndex (in IE) if it's available on both nodes } else if ( a.sourceIndex && b.sourceIndex ) { return a.sourceIndex - b.sourceIndex; } var al, bl, ap = [], bp = [], aup = a.parentNode, bup = b.parentNode, cur = aup; // If the nodes are siblings (or identical) we can do a quick check if ( aup === bup ) { return siblingCheck( a, b ); // If no parents were found then the nodes are disconnected } else if ( !aup ) { return -1; } else if ( !bup ) { return 1; } // Otherwise they're somewhere else in the tree so we need // to build up a full list of the parentNodes for comparison while ( cur ) { ap.unshift( cur ); cur = cur.parentNode; } cur = bup; while ( cur ) { bp.unshift( cur ); cur = cur.parentNode; } al = ap.length; bl = bp.length; // Start walking down the tree looking for a discrepancy for ( var i = 0; i < al && i < bl; i++ ) { if ( ap[i] !== bp[i] ) { return siblingCheck( ap[i], bp[i] ); } } // We ended someplace up the tree so do a sibling check return i === al ? siblingCheck( a, bp[i], -1 ) : siblingCheck( ap[i], b, 1 ); }; siblingCheck = function( a, b, ret ) { if ( a === b ) { return ret; } var cur = a.nextSibling; while ( cur ) { if ( cur === b ) { return -1; } cur = cur.nextSibling; } return 1; }; } // Check to see if the browser returns elements by name when // querying by getElementById (and provide a workaround) (function(){ // We're going to inject a fake input element with a specified name var form = document.createElement("div"), id = "script" + (new Date()).getTime(), root = document.documentElement; form.innerHTML = "<a name='" + id + "'/>"; // Inject it into the root element, check its status, and remove it quickly root.insertBefore( form, root.firstChild ); // The workaround has to do additional checks after a getElementById // Which slows things down for other browsers (hence the branching) if ( document.getElementById( id ) ) { Expr.find.ID = function( match, context, isXML ) { if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; } }; Expr.filter.ID = function( elem, match ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return elem.nodeType === 1 && node && node.nodeValue === match; }; } root.removeChild( form ); // release memory in IE root = form = null; })(); (function(){ // Check to see if the browser returns only elements // when doing getElementsByTagName("*") // Create a fake element var div = document.createElement("div"); div.appendChild( document.createComment("") ); // Make sure no comments are found if ( div.getElementsByTagName("*").length > 0 ) { Expr.find.TAG = function( match, context ) { var results = context.getElementsByTagName( match[1] ); // Filter out possible comments if ( match[1] === "*" ) { var tmp = []; for ( var i = 0; results[i]; i++ ) { if ( results[i].nodeType === 1 ) { tmp.push( results[i] ); } } results = tmp; } return results; }; } // Check to see if an attribute returns normalized href attributes div.innerHTML = "<a href='#'></a>"; if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#" ) { Expr.attrHandle.href = function( elem ) { return elem.getAttribute( "href", 2 ); }; } // release memory in IE div = null; })(); if ( document.querySelectorAll ) { (function(){ var oldSizzle = Sizzle, div = document.createElement("div"), id = "__sizzle__"; div.innerHTML = "<p class='TEST'></p>"; // Safari can't handle uppercase or unicode characters when // in quirks mode. if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { return; } Sizzle = function( query, context, extra, seed ) { context = context || document; // Only use querySelectorAll on non-XML documents // (ID selectors don't work in non-HTML documents) if ( !seed && !Sizzle.isXML(context) ) { // See if we find a selector to speed up var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { // Speed-up: Sizzle("TAG") if ( match[1] ) { return makeArray( context.getElementsByTagName( query ), extra ); // Speed-up: Sizzle(".CLASS") } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { return makeArray( context.getElementsByClassName( match[2] ), extra ); } } if ( context.nodeType === 9 ) { // Speed-up: Sizzle("body") // The body element only exists once, optimize finding it if ( query === "body" && context.body ) { return makeArray( [ context.body ], extra ); // Speed-up: Sizzle("#ID") } else if ( match && match[3] ) { var elem = context.getElementById( match[3] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id === match[3] ) { return makeArray( [ elem ], extra ); } } else { return makeArray( [], extra ); } } try { return makeArray( context.querySelectorAll(query), extra ); } catch(qsaError) {} // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { var oldContext = context, old = context.getAttribute( "id" ), nid = old || id, hasParent = context.parentNode, relativeHierarchySelector = /^\s*[+~]/.test( query ); if ( !old ) { context.setAttribute( "id", nid ); } else { nid = nid.replace( /'/g, "\\$&" ); } if ( relativeHierarchySelector && hasParent ) { context = context.parentNode; } try { if ( !relativeHierarchySelector || hasParent ) { return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); } } catch(pseudoError) { } finally { if ( !old ) { oldContext.removeAttribute( "id" ); } } } } return oldSizzle(query, context, extra, seed); }; for ( var prop in oldSizzle ) { Sizzle[ prop ] = oldSizzle[ prop ]; } // release memory in IE div = null; })(); } (function(){ var html = document.documentElement, matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; if ( matches ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9 fails this) var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), pseudoWorks = false; try { // This should fail with an exception // Gecko does not error, returns false instead matches.call( document.documentElement, "[test!='']:sizzle" ); } catch( pseudoError ) { pseudoWorks = true; } Sizzle.matchesSelector = function( node, expr ) { // Make sure that attribute selectors are quoted expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if ( !Sizzle.isXML( node ) ) { try { if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { var ret = matches.call( node, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || !disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9, so check for that node.document && node.document.nodeType !== 11 ) { return ret; } } } catch(e) {} } return Sizzle(expr, null, null, [node]).length > 0; }; } })(); (function(){ var div = document.createElement("div"); div.innerHTML = "<div class='test e'></div><div class='test'></div>"; // Opera can't find a second classname (in 9.6) // Also, make sure that getElementsByClassName actually exists if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { return; } // Safari caches class attributes, doesn't catch changes (in 3.2) div.lastChild.className = "e"; if ( div.getElementsByClassName("e").length === 1 ) { return; } Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function( match, context, isXML ) { if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { return context.getElementsByClassName(match[1]); } }; // release memory in IE div = null; })(); function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { var match = false; elem = elem[dir]; while ( elem ) { if ( elem[ expando ] === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 && !isXML ){ elem[ expando ] = doneName; elem.sizset = i; } if ( elem.nodeName.toLowerCase() === cur ) { match = elem; break; } elem = elem[dir]; } checkSet[i] = match; } } } function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { var match = false; elem = elem[dir]; while ( elem ) { if ( elem[ expando ] === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 ) { if ( !isXML ) { elem[ expando ] = doneName; elem.sizset = i; } if ( typeof cur !== "string" ) { if ( elem === cur ) { match = true; break; } } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { match = elem; break; } } elem = elem[dir]; } checkSet[i] = match; } } } if ( document.documentElement.contains ) { Sizzle.contains = function( a, b ) { return a !== b && (a.contains ? a.contains(b) : true); }; } else if ( document.documentElement.compareDocumentPosition ) { Sizzle.contains = function( a, b ) { return !!(a.compareDocumentPosition(b) & 16); }; } else { Sizzle.contains = function() { return false; }; } Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; var posProcess = function( selector, context, seed ) { var match, tmpSet = [], later = "", root = context.nodeType ? [context] : context; // Position selectors must be done after the filter // And so must :not(positional) so we move all PSEUDOs to the end while ( (match = Expr.match.PSEUDO.exec( selector )) ) { later += match[0]; selector = selector.replace( Expr.match.PSEUDO, "" ); } selector = Expr.relative[selector] ? selector + "*" : selector; for ( var i = 0, l = root.length; i < l; i++ ) { Sizzle( selector, root[i], tmpSet, seed ); } return Sizzle.filter( later, tmpSet ); }; // EXPOSE // Override sizzle attribute retrieval Sizzle.attr = jQuery.attr; Sizzle.selectors.attrMap = {}; jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.filters; jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; })(); var runtil = /Until$/, rparentsprev = /^(?:parents|prevUntil|prevAll)/, // Note: This RegExp should be improved, or likely pulled from Sizzle rmultiselector = /,/, isSimple = /^.[^:#\[\.,]*$/, slice = Array.prototype.slice, POS = jQuery.expr.match.POS, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend({ find: function( selector ) { var self = this, i, l; if ( typeof selector !== "string" ) { return jQuery( selector ).filter(function() { for ( i = 0, l = self.length; i < l; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }); } var ret = this.pushStack( "", "find", selector ), length, n, r; for ( i = 0, l = this.length; i < l; i++ ) { length = ret.length; jQuery.find( selector, this[i], ret ); if ( i > 0 ) { // Make sure that the results are unique for ( n = length; n < ret.length; n++ ) { for ( r = 0; r < length; r++ ) { if ( ret[r] === ret[n] ) { ret.splice(n--, 1); break; } } } } } return ret; }, has: function( target ) { var targets = jQuery( target ); return this.filter(function() { for ( var i = 0, l = targets.length; i < l; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, not: function( selector ) { return this.pushStack( winnow(this, selector, false), "not", selector); }, filter: function( selector ) { return this.pushStack( winnow(this, selector, true), "filter", selector ); }, is: function( selector ) { return !!selector && ( typeof selector === "string" ? // If this is a positional selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". POS.test( selector ) ? jQuery( selector, this.context ).index( this[0] ) >= 0 : jQuery.filter( selector, this ).length > 0 : this.filter( selector ).length > 0 ); }, closest: function( selectors, context ) { var ret = [], i, l, cur = this[0]; // Array (deprecated as of jQuery 1.7) if ( jQuery.isArray( selectors ) ) { var level = 1; while ( cur && cur.ownerDocument && cur !== context ) { for ( i = 0; i < selectors.length; i++ ) { if ( jQuery( cur ).is( selectors[ i ] ) ) { ret.push({ selector: selectors[ i ], elem: cur, level: level }); } } cur = cur.parentNode; level++; } return ret; } // String var pos = POS.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( i = 0, l = this.length; i < l; i++ ) { cur = this[i]; while ( cur ) { if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { ret.push( cur ); break; } else { cur = cur.parentNode; if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { break; } } } } ret = ret.length > 1 ? jQuery.unique( ret ) : ret; return this.pushStack( ret, "closest", selectors ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; } // index in selector if ( typeof elem === "string" ) { return jQuery.inArray( this[0], jQuery( elem ) ); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this ); }, add: function( selector, context ) { var set = typeof selector === "string" ? jQuery( selector, context ) : jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), all = jQuery.merge( this.get(), set ); return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? all : jQuery.unique( all ) ); }, andSelf: function() { return this.add( this.prevObject ); } }); // A painfully simple check to see if an element is disconnected // from a document (should be improved, where feasible). function isDisconnected( node ) { return !node || !node.parentNode || node.parentNode.nodeType === 11; } jQuery.each({ parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return jQuery.dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return jQuery.dir( elem, "parentNode", until ); }, next: function( elem ) { return jQuery.nth( elem, 2, "nextSibling" ); }, prev: function( elem ) { return jQuery.nth( elem, 2, "previousSibling" ); }, nextAll: function( elem ) { return jQuery.dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return jQuery.dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return jQuery.dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return jQuery.dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return jQuery.sibling( elem.parentNode.firstChild, elem ); }, children: function( elem ) { return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { return jQuery.nodeName( elem, "iframe" ) ? elem.contentDocument || elem.contentWindow.document : jQuery.makeArray( elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var ret = jQuery.map( this, fn, until ), // The variable 'args' was introduced in // https://github.com/jquery/jquery/commit/52a0238 // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. // http://code.google.com/p/v8/issues/detail?id=1050 args = slice.call(arguments); if ( !runtil.test( name ) ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { ret = ret.reverse(); } return this.pushStack( ret, name, args.join(",") ); }; }); jQuery.extend({ filter: function( expr, elems, not ) { if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : jQuery.find.matches(expr, elems); }, dir: function( elem, dir, until ) { var matched = [], cur = elem[ dir ]; while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { if ( cur.nodeType === 1 ) { matched.push( cur ); } cur = cur[dir]; } return matched; }, nth: function( cur, result, dir, elem ) { result = result || 1; var num = 0; for ( ; cur; cur = cur[dir] ) { if ( cur.nodeType === 1 && ++num === result ) { break; } } return cur; }, sibling: function( n, elem ) { var r = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { r.push( n ); } } return r; } }); // Implement the identical functionality for filter and not function winnow( elements, qualifier, keep ) { // Can't pass null or undefined to indexOf in Firefox 4 // Set to 0 to skip string check qualifier = qualifier || 0; if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep(elements, function( elem, i ) { var retVal = !!qualifier.call( elem, i, elem ); return retVal === keep; }); } else if ( qualifier.nodeType ) { return jQuery.grep(elements, function( elem, i ) { return (elem === qualifier) === keep; }); } else if ( typeof qualifier === "string" ) { var filtered = jQuery.grep(elements, function( elem ) { return elem.nodeType === 1; }); if ( isSimple.test( qualifier ) ) { return jQuery.filter(qualifier, filtered, !keep); } else { qualifier = jQuery.filter( qualifier, filtered ); } } return jQuery.grep(elements, function( elem, i ) { return (jQuery.inArray( elem, qualifier ) >= 0) === keep; }); } function createSafeFragment( document ) { var nodeNames = ( "abbr article aside audio canvas datalist details figcaption figure footer " + "header hgroup mark meter nav output progress section summary time video" ).split( " " ), safeFrag = document.createDocumentFragment(); if ( safeFrag.createElement ) { while ( nodeNames.length ) { safeFrag.createElement( nodeNames.pop() ); } } return safeFrag; } var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rleadingWhitespace = /^\s+/, rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, rtagName = /<([\w:]+)/, rtbody = /<tbody/i, rhtml = /<|&#?\w+;/, rnoInnerhtml = /<(?:script|style)/i, rnocache = /<(?:script|object|embed|option|style)/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rscriptType = /\/(java|ecma)script/i, rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/, wrapMap = { option: [ 1, "<select multiple='multiple'>", "</select>" ], legend: [ 1, "<fieldset>", "</fieldset>" ], thead: [ 1, "<table>", "</table>" ], tr: [ 2, "<table><tbody>", "</tbody></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], area: [ 1, "<map>", "</map>" ], _default: [ 0, "", "" ] }, safeFragment = createSafeFragment( document ); wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; // IE can't serialize <link> and <script> tags normally if ( !jQuery.support.htmlSerialize ) { wrapMap._default = [ 1, "div<div>", "</div>" ]; } jQuery.fn.extend({ text: function( text ) { if ( jQuery.isFunction(text) ) { return this.each(function(i) { var self = jQuery( this ); self.text( text.call(this, i, self.text()) ); }); } if ( typeof text !== "object" && text !== undefined ) { return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); } return jQuery.text( this ); }, wrapAll: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapAll( html.call(this, i) ); }); } if ( this[0] ) { // The elements to wrap the target around var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); if ( this[0].parentNode ) { wrap.insertBefore( this[0] ); } wrap.map(function() { var elem = this; while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { elem = elem.firstChild; } return elem; }).append( this ); } return this; }, wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapInner( html.call(this, i) ); }); } return this.each(function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } }); }, wrap: function( html ) { return this.each(function() { jQuery( this ).wrapAll( html ); }); }, unwrap: function() { return this.parent().each(function() { if ( !jQuery.nodeName( this, "body" ) ) { jQuery( this ).replaceWith( this.childNodes ); } }).end(); }, append: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 ) { this.appendChild( elem ); } }); }, prepend: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 ) { this.insertBefore( elem, this.firstChild ); } }); }, before: function() { if ( this[0] && this[0].parentNode ) { return this.domManip(arguments, false, function( elem ) { this.parentNode.insertBefore( elem, this ); }); } else if ( arguments.length ) { var set = jQuery(arguments[0]); set.push.apply( set, this.toArray() ); return this.pushStack( set, "before", arguments ); } }, after: function() { if ( this[0] && this[0].parentNode ) { return this.domManip(arguments, false, function( elem ) { this.parentNode.insertBefore( elem, this.nextSibling ); }); } else if ( arguments.length ) { var set = this.pushStack( this, "after", arguments ); set.push.apply( set, jQuery(arguments[0]).toArray() ); return set; } }, // keepData is for internal use only--do not document remove: function( selector, keepData ) { for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { if ( !keepData && elem.nodeType === 1 ) { jQuery.cleanData( elem.getElementsByTagName("*") ); jQuery.cleanData( [ elem ] ); } if ( elem.parentNode ) { elem.parentNode.removeChild( elem ); } } } return this; }, empty: function() { for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( elem.getElementsByTagName("*") ); } // Remove any remaining nodes while ( elem.firstChild ) { elem.removeChild( elem.firstChild ); } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function () { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); }); }, html: function( value ) { if ( value === undefined ) { return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(rinlinejQuery, "") : null; // See if we can take a shortcut and just use innerHTML } else if ( typeof value === "string" && !rnoInnerhtml.test( value ) && (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) && !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) { value = value.replace(rxhtmlTag, "<$1></$2>"); try { for ( var i = 0, l = this.length; i < l; i++ ) { // Remove element nodes and prevent memory leaks if ( this[i].nodeType === 1 ) { jQuery.cleanData( this[i].getElementsByTagName("*") ); this[i].innerHTML = value; } } // If using innerHTML throws an exception, use the fallback method } catch(e) { this.empty().append( value ); } } else if ( jQuery.isFunction( value ) ) { this.each(function(i){ var self = jQuery( this ); self.html( value.call(this, i, self.html()) ); }); } else { this.empty().append( value ); } return this; }, replaceWith: function( value ) { if ( this[0] && this[0].parentNode ) { // Make sure that the elements are removed from the DOM before they are inserted // this can help fix replacing a parent with child elements if ( jQuery.isFunction( value ) ) { return this.each(function(i) { var self = jQuery(this), old = self.html(); self.replaceWith( value.call( this, i, old ) ); }); } if ( typeof value !== "string" ) { value = jQuery( value ).detach(); } return this.each(function() { var next = this.nextSibling, parent = this.parentNode; jQuery( this ).remove(); if ( next ) { jQuery(next).before( value ); } else { jQuery(parent).append( value ); } }); } else { return this.length ? this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : this; } }, detach: function( selector ) { return this.remove( selector, true ); }, domManip: function( args, table, callback ) { var results, first, fragment, parent, value = args[0], scripts = []; // We can't cloneNode fragments that contain checked, in WebKit if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) { return this.each(function() { jQuery(this).domManip( args, table, callback, true ); }); } if ( jQuery.isFunction(value) ) { return this.each(function(i) { var self = jQuery(this); args[0] = value.call(this, i, table ? self.html() : undefined); self.domManip( args, table, callback ); }); } if ( this[0] ) { parent = value && value.parentNode; // If we're in a fragment, just use that instead of building a new one if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) { results = { fragment: parent }; } else { results = jQuery.buildFragment( args, this, scripts ); } fragment = results.fragment; if ( fragment.childNodes.length === 1 ) { first = fragment = fragment.firstChild; } else { first = fragment.firstChild; } if ( first ) { table = table && jQuery.nodeName( first, "tr" ); for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) { callback.call( table ? root(this[i], first) : this[i], // Make sure that we do not leak memory by inadvertently discarding // the original fragment (which might have attached data) instead of // using it; in addition, use the original fragment object for the last // item instead of first because it can end up being emptied incorrectly // in certain situations (Bug #8070). // Fragments from the fragment cache must always be cloned and never used // in place. results.cacheable || (l > 1 && i < lastIndex) ? jQuery.clone( fragment, true, true ) : fragment ); } } if ( scripts.length ) { jQuery.each( scripts, evalScript ); } } return this; } }); function root( elem, cur ) { return jQuery.nodeName(elem, "table") ? (elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody"))) : elem; } function cloneCopyEvent( src, dest ) { if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { return; } var type, i, l, oldData = jQuery._data( src ), curData = jQuery._data( dest, oldData ), events = oldData.events; if ( events ) { delete curData.handle; curData.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data ); } } } // make the cloned public data object a copy from the original if ( curData.data ) { curData.data = jQuery.extend( {}, curData.data ); } } function cloneFixAttributes( src, dest ) { var nodeName; // We do not need to do anything for non-Elements if ( dest.nodeType !== 1 ) { return; } // clearAttributes removes the attributes, which we don't want, // but also removes the attachEvent events, which we *do* want if ( dest.clearAttributes ) { dest.clearAttributes(); } // mergeAttributes, in contrast, only merges back on the // original attributes, not the events if ( dest.mergeAttributes ) { dest.mergeAttributes( src ); } nodeName = dest.nodeName.toLowerCase(); // IE6-8 fail to clone children inside object elements that use // the proprietary classid attribute value (rather than the type // attribute) to identify the type of content to display if ( nodeName === "object" ) { dest.outerHTML = src.outerHTML; } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) { // IE6-8 fails to persist the checked state of a cloned checkbox // or radio button. Worse, IE6-7 fail to give the cloned element // a checked appearance if the defaultChecked value isn't also set if ( src.checked ) { dest.defaultChecked = dest.checked = src.checked; } // IE6-7 get confused and end up setting the value of a cloned // checkbox/radio button to an empty string instead of "on" if ( dest.value !== src.value ) { dest.value = src.value; } // IE6-8 fails to return the selected option to the default selected // state when cloning options } else if ( nodeName === "option" ) { dest.selected = src.defaultSelected; // IE6-8 fails to set the defaultValue to the correct value when // cloning other types of input fields } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } // Event data gets referenced instead of copied if the expando // gets copied too dest.removeAttribute( jQuery.expando ); } jQuery.buildFragment = function( args, nodes, scripts ) { var fragment, cacheable, cacheresults, doc; // nodes may contain either an explicit document object, // a jQuery collection or context object. // If nodes[0] contains a valid object to assign to doc if ( nodes && nodes[0] ) { doc = nodes[0].ownerDocument || nodes[0]; } // Ensure that an attr object doesn't incorrectly stand in as a document object // Chrome and Firefox seem to allow this to occur and will throw exception // Fixes #8950 if ( !doc.createDocumentFragment ) { doc = document; } // Only cache "small" (1/2 KB) HTML strings that are associated with the main document // Cloning options loses the selected state, so don't cache them // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document && args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) { cacheable = true; cacheresults = jQuery.fragments[ args[0] ]; if ( cacheresults && cacheresults !== 1 ) { fragment = cacheresults; } } if ( !fragment ) { fragment = doc.createDocumentFragment(); jQuery.clean( args, doc, fragment, scripts ); } if ( cacheable ) { jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1; } return { fragment: fragment, cacheable: cacheable }; }; jQuery.fragments = {}; jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var ret = [], insert = jQuery( selector ), parent = this.length === 1 && this[0].parentNode; if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { insert[ original ]( this[0] ); return this; } else { for ( var i = 0, l = insert.length; i < l; i++ ) { var elems = (i > 0 ? this.clone(true) : this).get(); jQuery( insert[i] )[ original ]( elems ); ret = ret.concat( elems ); } return this.pushStack( ret, name, insert.selector ); } }; }); function getAll( elem ) { if ( typeof elem.getElementsByTagName !== "undefined" ) { return elem.getElementsByTagName( "*" ); } else if ( typeof elem.querySelectorAll !== "undefined" ) { return elem.querySelectorAll( "*" ); } else { return []; } } // Used in clean, fixes the defaultChecked property function fixDefaultChecked( elem ) { if ( elem.type === "checkbox" || elem.type === "radio" ) { elem.defaultChecked = elem.checked; } } // Finds all inputs and passes them to fixDefaultChecked function findInputs( elem ) { var nodeName = (elem.nodeName || "").toLowerCase(); if ( nodeName === "input" ) { fixDefaultChecked( elem ); // Skip scripts, get other children } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) { jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); } } jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { var clone = elem.cloneNode(true), srcElements, destElements, i; if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { // IE copies events bound via attachEvent when using cloneNode. // Calling detachEvent on the clone will also remove the events // from the original. In order to get around this, we use some // proprietary methods to clear the events. Thanks to MooTools // guys for this hotness. cloneFixAttributes( elem, clone ); // Using Sizzle here is crazy slow, so we use getElementsByTagName // instead srcElements = getAll( elem ); destElements = getAll( clone ); // Weird iteration because IE will replace the length property // with an element if you are cloning the body and one of the // elements on the page has a name or id of "length" for ( i = 0; srcElements[i]; ++i ) { // Ensure that the destination node is not null; Fixes #9587 if ( destElements[i] ) { cloneFixAttributes( srcElements[i], destElements[i] ); } } } // Copy the events from the original to the clone if ( dataAndEvents ) { cloneCopyEvent( elem, clone ); if ( deepDataAndEvents ) { srcElements = getAll( elem ); destElements = getAll( clone ); for ( i = 0; srcElements[i]; ++i ) { cloneCopyEvent( srcElements[i], destElements[i] ); } } } srcElements = destElements = null; // Return the cloned set return clone; }, clean: function( elems, context, fragment, scripts ) { var checkScriptType; context = context || document; // !context.createElement fails in IE with an error but returns typeof 'object' if ( typeof context.createElement === "undefined" ) { context = context.ownerDocument || context[0] && context[0].ownerDocument || document; } var ret = [], j; for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { if ( typeof elem === "number" ) { elem += ""; } if ( !elem ) { continue; } // Convert html string into DOM nodes if ( typeof elem === "string" ) { if ( !rhtml.test( elem ) ) { elem = context.createTextNode( elem ); } else { // Fix "XHTML"-style tags in all browsers elem = elem.replace(rxhtmlTag, "<$1></$2>"); // Trim whitespace, otherwise indexOf won't work as expected var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(), wrap = wrapMap[ tag ] || wrapMap._default, depth = wrap[0], div = context.createElement("div"); // Append wrapper element to unknown element safe doc fragment if ( context === document ) { // Use the fragment we've already created for this document safeFragment.appendChild( div ); } else { // Use a fragment created with the owner document createSafeFragment( context ).appendChild( div ); } // Go to html and back, then peel off extra wrappers div.innerHTML = wrap[1] + elem + wrap[2]; // Move to the right depth while ( depth-- ) { div = div.lastChild; } // Remove IE's autoinserted <tbody> from table fragments if ( !jQuery.support.tbody ) { // String was a <table>, *may* have spurious <tbody> var hasBody = rtbody.test(elem), tbody = tag === "table" && !hasBody ? div.firstChild && div.firstChild.childNodes : // String was a bare <thead> or <tfoot> wrap[1] === "<table>" && !hasBody ? div.childNodes : []; for ( j = tbody.length - 1; j >= 0 ; --j ) { if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { tbody[ j ].parentNode.removeChild( tbody[ j ] ); } } } // IE completely kills leading whitespace when innerHTML is used if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); } elem = div.childNodes; } } // Resets defaultChecked for any radios and checkboxes // about to be appended to the DOM in IE 6/7 (#8060) var len; if ( !jQuery.support.appendChecked ) { if ( elem[0] && typeof (len = elem.length) === "number" ) { for ( j = 0; j < len; j++ ) { findInputs( elem[j] ); } } else { findInputs( elem ); } } if ( elem.nodeType ) { ret.push( elem ); } else { ret = jQuery.merge( ret, elem ); } } if ( fragment ) { checkScriptType = function( elem ) { return !elem.type || rscriptType.test( elem.type ); }; for ( i = 0; ret[i]; i++ ) { if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); } else { if ( ret[i].nodeType === 1 ) { var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType ); ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); } fragment.appendChild( ret[i] ); } } } return ret; }, cleanData: function( elems ) { var data, id, cache = jQuery.cache, special = jQuery.event.special, deleteExpando = jQuery.support.deleteExpando; for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { continue; } id = elem[ jQuery.expando ]; if ( id ) { data = cache[ id ]; if ( data && data.events ) { for ( var type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } // Null the DOM reference to avoid IE6/7/8 leak (#7054) if ( data.handle ) { data.handle.elem = null; } } if ( deleteExpando ) { delete elem[ jQuery.expando ]; } else if ( elem.removeAttribute ) { elem.removeAttribute( jQuery.expando ); } delete cache[ id ]; } } } }); function evalScript( i, elem ) { if ( elem.src ) { jQuery.ajax({ url: elem.src, async: false, dataType: "script" }); } else { jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) ); } if ( elem.parentNode ) { elem.parentNode.removeChild( elem ); } } var ralpha = /alpha\([^)]*\)/i, ropacity = /opacity=([^)]*)/, // fixed for IE9, see #8346 rupper = /([A-Z]|^ms)/g, rnumpx = /^-?\d+(?:px)?$/i, rnum = /^-?\d/, rrelNum = /^([\-+])=([\-+.\de]+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssWidth = [ "Left", "Right" ], cssHeight = [ "Top", "Bottom" ], curCSS, getComputedStyle, currentStyle; jQuery.fn.css = function( name, value ) { // Setting 'undefined' is a no-op if ( arguments.length === 2 && value === undefined ) { return this; } return jQuery.access( this, name, value, true, function( elem, name, value ) { return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }); }; jQuery.extend({ // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity", "opacity" ); return ret === "" ? "1" : ret; } else { return elem.style.opacity; } } } }, // Exclude the following css properties to add px cssNumber: { "fillOpacity": true, "fontWeight": true, "lineHeight": true, "opacity": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { // normalize float css property "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, origName = jQuery.camelCase( name ), style = elem.style, hooks = jQuery.cssHooks[ origName ]; name = jQuery.cssProps[ origName ] || origName; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // convert relative number strings (+= or -=) to relative numbers. #7345 if ( type === "string" && (ret = rrelNum.exec( value )) ) { value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) ); // Fixes bug #9237 type = "number"; } // Make sure that NaN and null values aren't set. See: #7116 if ( value == null || type === "number" && isNaN( value ) ) { return; } // If a number was passed in, add 'px' to the (except for certain CSS properties) if ( type === "number" && !jQuery.cssNumber[ origName ] ) { value += "px"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) { // Wrapped to prevent IE from throwing errors when 'invalid' values are provided // Fixes bug #5509 try { style[ name ] = value; } catch(e) {} } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra ) { var ret, hooks; // Make sure that we're working with the right name name = jQuery.camelCase( name ); hooks = jQuery.cssHooks[ name ]; name = jQuery.cssProps[ name ] || name; // cssFloat needs a special treatment if ( name === "cssFloat" ) { name = "float"; } // If a hook was provided get the computed value from there if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) { return ret; // Otherwise, if a way to get the computed value exists, use that } else if ( curCSS ) { return curCSS( elem, name ); } }, // A method for quickly swapping in/out CSS properties to get correct calculations swap: function( elem, options, callback ) { var old = {}; // Remember the old values, and insert the new ones for ( var name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } callback.call( elem ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } } }); // DEPRECATED, Use jQuery.css() instead jQuery.curCSS = jQuery.css; jQuery.each(["height", "width"], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { var val; if ( computed ) { if ( elem.offsetWidth !== 0 ) { return getWH( elem, name, extra ); } else { jQuery.swap( elem, cssShow, function() { val = getWH( elem, name, extra ); }); } return val; } }, set: function( elem, value ) { if ( rnumpx.test( value ) ) { // ignore negative width and height values #1599 value = parseFloat( value ); if ( value >= 0 ) { return value + "px"; } } else { return value; } } }; }); if ( !jQuery.support.opacity ) { jQuery.cssHooks.opacity = { get: function( elem, computed ) { // IE uses filters for opacity return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? ( parseFloat( RegExp.$1 ) / 100 ) + "" : computed ? "1" : ""; }, set: function( elem, value ) { var style = elem.style, currentStyle = elem.currentStyle, opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", filter = currentStyle && currentStyle.filter || style.filter || ""; // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level style.zoom = 1; // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) { // Setting style.filter to null, "" & " " still leave "filter:" in the cssText // if "filter:" is present at all, clearType is disabled, we want to avoid this // style.removeAttribute is IE Only, but so apparently is this code path... style.removeAttribute( "filter" ); // if there there is no filter style applied in a css rule, we are done if ( currentStyle && !currentStyle.filter ) { return; } } // otherwise, set new filter values style.filter = ralpha.test( filter ) ? filter.replace( ralpha, opacity ) : filter + " " + opacity; } }; } jQuery(function() { // This hook cannot be added until DOM ready because the support test // for it is not run until after DOM ready if ( !jQuery.support.reliableMarginRight ) { jQuery.cssHooks.marginRight = { get: function( elem, computed ) { // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // Work around by temporarily setting element display to inline-block var ret; jQuery.swap( elem, { "display": "inline-block" }, function() { if ( computed ) { ret = curCSS( elem, "margin-right", "marginRight" ); } else { ret = elem.style.marginRight; } }); return ret; } }; } }); if ( document.defaultView && document.defaultView.getComputedStyle ) { getComputedStyle = function( elem, name ) { var ret, defaultView, computedStyle; name = name.replace( rupper, "-$1" ).toLowerCase(); if ( !(defaultView = elem.ownerDocument.defaultView) ) { return undefined; } if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) { ret = computedStyle.getPropertyValue( name ); if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { ret = jQuery.style( elem, name ); } } return ret; }; } if ( document.documentElement.currentStyle ) { currentStyle = function( elem, name ) { var left, ret = elem.currentStyle && elem.currentStyle[ name ], rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ], style = elem.style; // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { // Remember the original values left = style.left; // Put in the new values to get a computed value out if ( rsLeft ) { elem.runtimeStyle.left = elem.currentStyle.left; } style.left = name === "fontSize" ? "1em" : (ret || 0); ret = style.pixelLeft + "px"; // Revert the changed values style.left = left; if ( rsLeft ) { elem.runtimeStyle.left = rsLeft; } } return ret === "" ? "auto" : ret; }; } curCSS = getComputedStyle || currentStyle; function getWH( elem, name, extra ) { // Start with offset property var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, which = name === "width" ? cssWidth : cssHeight; if ( val > 0 ) { if ( extra !== "border" ) { jQuery.each( which, function() { if ( !extra ) { val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0; } if ( extra === "margin" ) { val += parseFloat( jQuery.css( elem, extra + this ) ) || 0; } else { val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0; } }); } return val + "px"; } // Fall back to computed then uncomputed css if necessary val = curCSS( elem, name, name ); if ( val < 0 || val == null ) { val = elem.style[ name ] || 0; } // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; // Add padding, border, margin if ( extra ) { jQuery.each( which, function() { val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0; if ( extra !== "padding" ) { val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0; } if ( extra === "margin" ) { val += parseFloat( jQuery.css( elem, extra + this ) ) || 0; } }); } return val + "px"; } if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.hidden = function( elem ) { var width = elem.offsetWidth, height = elem.offsetHeight; return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); }; jQuery.expr.filters.visible = function( elem ) { return !jQuery.expr.filters.hidden( elem ); }; } var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rhash = /#.*$/, rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rquery = /\?/, rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, rselectTextarea = /^(?:select|textarea)/i, rspacesAjax = /\s+/, rts = /([?&])_=[^&]*/, rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, // Keep a copy of the old load method _load = jQuery.fn.load, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Document location ajaxLocation, // Document location segments ajaxLocParts, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = ["*/"] + ["*"]; // #8138, IE may throw an exception when accessing // a field from window.location if document.domain has been set try { ajaxLocation = location.href; } catch( e ) { // Use the href attribute of an A element // since IE will modify it given document.location ajaxLocation = document.createElement( "a" ); ajaxLocation.href = ""; ajaxLocation = ajaxLocation.href; } // Segment location into parts ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } if ( jQuery.isFunction( func ) ) { var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ), i = 0, length = dataTypes.length, dataType, list, placeBefore; // For each dataType in the dataTypeExpression for(; i < length; i++ ) { dataType = dataTypes[ i ]; // We control if we're asked to add before // any existing element placeBefore = /^\+/.test( dataType ); if ( placeBefore ) { dataType = dataType.substr( 1 ) || "*"; } list = structure[ dataType ] = structure[ dataType ] || []; // then we add to the structure accordingly list[ placeBefore ? "unshift" : "push" ]( func ); } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, dataType /* internal */, inspected /* internal */ ) { dataType = dataType || options.dataTypes[ 0 ]; inspected = inspected || {}; inspected[ dataType ] = true; var list = structure[ dataType ], i = 0, length = list ? list.length : 0, executeOnly = ( structure === prefilters ), selection; for(; i < length && ( executeOnly || !selection ); i++ ) { selection = list[ i ]( options, originalOptions, jqXHR ); // If we got redirected to another dataType // we try there if executing only and not done already if ( typeof selection === "string" ) { if ( !executeOnly || inspected[ selection ] ) { selection = undefined; } else { options.dataTypes.unshift( selection ); selection = inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, selection, inspected ); } } } // If we're only executing or nothing was selected // we try the catchall dataType if not done already if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { selection = inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, "*", inspected ); } // unnecessary when only executing (prefilters) // but it'll be ignored by the caller in that case return selection; } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } } jQuery.fn.extend({ load: function( url, params, callback ) { if ( typeof url !== "string" && _load ) { return _load.apply( this, arguments ); // Don't do a request if no elements are being requested } else if ( !this.length ) { return this; } var off = url.indexOf( " " ); if ( off >= 0 ) { var selector = url.slice( off, url.length ); url = url.slice( 0, off ); } // Default to a GET request var type = "GET"; // If the second parameter was provided if ( params ) { // If it's a function if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( typeof params === "object" ) { params = jQuery.param( params, jQuery.ajaxSettings.traditional ); type = "POST"; } } var self = this; // Request the remote document jQuery.ajax({ url: url, type: type, dataType: "html", data: params, // Complete callback (responseText is used internally) complete: function( jqXHR, status, responseText ) { // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; // If successful, inject the HTML into all the matched elements if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // See if a selector was specified self.html( selector ? // Create a dummy div to hold the results jQuery("<div>") // inject the contents of the document in, removing the scripts // to avoid any 'Permission Denied' errors in IE .append(responseText.replace(rscript, "")) // Locate the specified elements .find(selector) : // If not, just inject the full result responseText ); } if ( callback ) { self.each( callback, [ responseText, status, jqXHR ] ); } } }); return this; }, serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map(function(){ return this.elements ? jQuery.makeArray( this.elements ) : this; }) .filter(function(){ return this.name && !this.disabled && ( this.checked || rselectTextarea.test( this.nodeName ) || rinput.test( this.type ) ); }) .map(function( i, elem ){ var val = jQuery( this ).val(); return val == null ? null : jQuery.isArray( val ) ? jQuery.map( val, function( val, i ){ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }) : { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }).get(); } }); // Attach a bunch of functions for handling common AJAX events jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ jQuery.fn[ o ] = function( f ){ return this.bind( o, f ); }; }); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } return jQuery.ajax({ type: method, url: url, data: data, success: callback, dataType: type }); }; }); jQuery.extend({ getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { if ( settings ) { // Building a settings object ajaxExtend( target, jQuery.ajaxSettings ); } else { // Extending ajaxSettings settings = target; target = jQuery.ajaxSettings; } ajaxExtend( target, settings ); return target; }, ajaxSettings: { url: ajaxLocation, isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, traditional: false, headers: {}, */ accepts: { xml: "application/xml, text/xml", html: "text/html", text: "text/plain", json: "application/json, text/javascript", "*": allTypes }, contents: { xml: /xml/, html: /html/, json: /json/ }, responseFields: { xml: "responseXML", text: "responseText" }, // List of data converters // 1) key format is "source_type destination_type" (a single space in-between) // 2) the catchall symbol "*" can be used for source_type converters: { // Convert anything to text "* text": window.String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": jQuery.parseJSON, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { context: true, url: true } }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events // It's the callbackContext if one was provided in the options // and if it's a DOM node or a jQuery collection globalEventContext = callbackContext !== s && ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks( "once memory" ), // Status-dependent callbacks statusCode = s.statusCode || {}, // ifModified key ifModifiedKey, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // Response headers responseHeadersString, responseHeaders, // transport transport, // timeout handle timeoutTimer, // Cross-domain detection vars parts, // The jqXHR state state = 0, // To know if global events are to be dispatched fireGlobals, // Loop variable i, // Fake xhr jqXHR = { readyState: 0, // Caches the header setRequestHeader: function( name, value ) { if ( !state ) { var lname = name.toLowerCase(); name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; requestHeaders[ name ] = value; } return this; }, // Raw string getAllResponseHeaders: function() { return state === 2 ? responseHeadersString : null; }, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( state === 2 ) { if ( !responseHeaders ) { responseHeaders = {}; while( ( match = rheaders.exec( responseHeadersString ) ) ) { responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match === undefined ? null : match; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( !state ) { s.mimeType = type; } return this; }, // Cancel the request abort: function( statusText ) { statusText = statusText || "abort"; if ( transport ) { transport.abort( statusText ); } done( 0, statusText ); return this; } }; // Callback for when everything is done // It is defined here because jslint complains if it is declared // at the end of the function (which would be more logical and readable) function done( status, nativeStatusText, responses, headers ) { // Called once if ( state === 2 ) { return; } // State is "done" now state = 2; // Clear timeout if it exists if ( timeoutTimer ) { clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; var isSuccess, success, error, statusText = nativeStatusText, response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined, lastModified, etag; // If successful, handle type chaining if ( status >= 200 && status < 300 || status === 304 ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) { jQuery.lastModified[ ifModifiedKey ] = lastModified; } if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) { jQuery.etag[ ifModifiedKey ] = etag; } } // If not modified if ( status === 304 ) { statusText = "notmodified"; isSuccess = true; // If we have data } else { try { success = ajaxConvert( s, response ); statusText = "success"; isSuccess = true; } catch(e) { // We have a parsererror statusText = "parsererror"; error = e; } } } else { // We extract error from statusText // then normalize statusText and status for non-aborts error = statusText; if( !statusText || status ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = "" + ( nativeStatusText || statusText ); // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } } // Attach deferreds deferred.promise( jqXHR ); jqXHR.success = jqXHR.done; jqXHR.error = jqXHR.fail; jqXHR.complete = completeDeferred.add; // Status-dependent callbacks jqXHR.statusCode = function( map ) { if ( map ) { var tmp; if ( state < 2 ) { for( tmp in map ) { statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; } } else { tmp = map[ jqXHR.status ]; jqXHR.then( tmp, tmp ); } } return this; }; // Remove hash character (#7531: and string promotion) // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) // We also use the url parameter if available s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); // Extract dataTypes list s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax ); // Determine if a cross-domain request is in order if ( s.crossDomain == null ) { parts = rurl.exec( s.url.toLowerCase() ); s.crossDomain = !!( parts && ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) ); } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefiler, stop there if ( state === 2 ) { return false; } // We can fire global events as of now if asked to fireGlobals = s.global; // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger( "ajaxStart" ); } // More options handling for requests with no content if ( !s.hasContent ) { // If data is available, append data to url if ( s.data ) { s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Get ifModifiedKey before adding the anti-cache parameter ifModifiedKey = s.url; // Add anti-cache in url if needed if ( s.cache === false ) { var ts = jQuery.now(), // try replacing _= if it is there ret = s.url.replace( rts, "$1_=" + ts ); // if nothing was replaced, add timestamp to the end s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { ifModifiedKey = ifModifiedKey || s.url; if ( jQuery.lastModified[ ifModifiedKey ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); } if ( jQuery.etag[ ifModifiedKey ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); } } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { // Abort if not done already jqXHR.abort(); return false; } // Install callbacks on deferreds for ( i in { success: 1, error: 1, complete: 1 } ) { jqXHR[ i ]( s[ i ] ); } // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = setTimeout( function(){ jqXHR.abort( "timeout" ); }, s.timeout ); } try { state = 1; transport.send( requestHeaders, done ); } catch (e) { // Propagate exception as error if not done if ( state < 2 ) { done( -1, e ); // Simply rethrow otherwise } else { jQuery.error( e ); } } } return jqXHR; }, // Serialize an array of form elements or a set of // key/values into a query string param: function( a, traditional ) { var s = [], add = function( key, value ) { // If value is a function, invoke it and return its value value = jQuery.isFunction( value ) ? value() : value; s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); }; // Set traditional to true for jQuery <= 1.3.2 behavior. if ( traditional === undefined ) { traditional = jQuery.ajaxSettings.traditional; } // If an array was passed in, assume that it is an array of form elements. if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); }); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( var prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ).replace( r20, "+" ); } }); function buildParams( prefix, obj, traditional, add ) { if ( jQuery.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // If array item is non-scalar (array or object), encode its // numeric index to resolve deserialization ambiguity issues. // Note that rack (as of 1.0.0) can't currently deserialize // nested arrays properly, and attempting to do so may cause // a server error. Possible fixes are to modify rack's // deserialization algorithm or to provide an option or flag // to force array serialization to be shallow. buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add ); } }); } else if ( !traditional && obj != null && typeof obj === "object" ) { // Serialize object item. for ( var name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // This is still on the jQuery object... for now // Want to move this to jQuery.ajax some day jQuery.extend({ // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {} }); /* Handles responses to an ajax request: * - sets all responseXXX fields accordingly * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var contents = s.contents, dataTypes = s.dataTypes, responseFields = s.responseFields, ct, type, finalDataType, firstDataType; // Fill responseXXX fields for( type in responseFields ) { if ( type in responses ) { jqXHR[ responseFields[type] ] = responses[ type ]; } } // Remove auto dataType and get content-type in the process while( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } // Chain conversions given the request and the original response function ajaxConvert( s, response ) { // Apply the dataFilter if provided if ( s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } var dataTypes = s.dataTypes, converters = {}, i, key, length = dataTypes.length, tmp, // Current and previous dataTypes current = dataTypes[ 0 ], prev, // Conversion expression conversion, // Conversion function conv, // Conversion functions (transitive conversion) conv1, conv2; // For each dataType in the chain for( i = 1; i < length; i++ ) { // Create converters map // with lowercased keys if ( i === 1 ) { for( key in s.converters ) { if( typeof key === "string" ) { converters[ key.toLowerCase() ] = s.converters[ key ]; } } } // Get the dataTypes prev = current; current = dataTypes[ i ]; // If current is auto dataType, update it to prev if( current === "*" ) { current = prev; // If no auto and dataTypes are actually different } else if ( prev !== "*" && prev !== current ) { // Get the converter conversion = prev + " " + current; conv = converters[ conversion ] || converters[ "* " + current ]; // If there is no direct converter, search transitively if ( !conv ) { conv2 = undefined; for( conv1 in converters ) { tmp = conv1.split( " " ); if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) { conv2 = converters[ tmp[1] + " " + current ]; if ( conv2 ) { conv1 = converters[ conv1 ]; if ( conv1 === true ) { conv = conv2; } else if ( conv2 === true ) { conv = conv1; } break; } } } } // If we found no converter, dispatch an error if ( !( conv || conv2 ) ) { jQuery.error( "No conversion from " + conversion.replace(" "," to ") ); } // If found converter is not an equivalence if ( conv !== true ) { // Convert with 1 or 2 converters accordingly response = conv ? conv( response ) : conv2( conv1(response) ); } } } return response; } var jsc = jQuery.now(), jsre = /(\=)\?(&|$)|\?\?/i; // Default jsonp settings jQuery.ajaxSetup({ jsonp: "callback", jsonpCallback: function() { return jQuery.expando + "_" + ( jsc++ ); } }); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var inspectData = s.contentType === "application/x-www-form-urlencoded" && ( typeof s.data === "string" ); if ( s.dataTypes[ 0 ] === "jsonp" || s.jsonp !== false && ( jsre.test( s.url ) || inspectData && jsre.test( s.data ) ) ) { var responseContainer, jsonpCallback = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback, previous = window[ jsonpCallback ], url = s.url, data = s.data, replace = "$1" + jsonpCallback + "$2"; if ( s.jsonp !== false ) { url = url.replace( jsre, replace ); if ( s.url === url ) { if ( inspectData ) { data = data.replace( jsre, replace ); } if ( s.data === data ) { // Add callback manually url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback; } } } s.url = url; s.data = data; // Install callback window[ jsonpCallback ] = function( response ) { responseContainer = [ response ]; }; // Clean-up function jqXHR.always(function() { // Set callback back to previous value window[ jsonpCallback ] = previous; // Call if it was a function and we have a response if ( responseContainer && jQuery.isFunction( previous ) ) { window[ jsonpCallback ]( responseContainer[ 0 ] ); } }); // Use data converter to retrieve json after script execution s.converters["script json"] = function() { if ( !responseContainer ) { jQuery.error( jsonpCallback + " was not called" ); } return responseContainer[ 0 ]; }; // force json dataType s.dataTypes[ 0 ] = "json"; // Delegate to script return "script"; } }); // Install script dataType jQuery.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /javascript|ecmascript/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } }); // Handle cache's special case and global jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; s.global = false; } }); // Bind script tag hack transport jQuery.ajaxTransport( "script", function(s) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; return { send: function( _, callback ) { script = document.createElement( "script" ); script.async = "async"; if ( s.scriptCharset ) { script.charset = s.scriptCharset; } script.src = s.url; // Attach handlers for all browsers script.onload = script.onreadystatechange = function( _, isAbort ) { if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { // Handle memory leak in IE script.onload = script.onreadystatechange = null; // Remove the script if ( head && script.parentNode ) { head.removeChild( script ); } // Dereference the script script = undefined; // Callback if not abort if ( !isAbort ) { callback( 200, "success" ); } } }; // Use insertBefore instead of appendChild to circumvent an IE6 bug. // This arises when a base node is used (#2709 and #4378). head.insertBefore( script, head.firstChild ); }, abort: function() { if ( script ) { script.onload( 0, 1 ); } } }; } }); var // #5280: Internet Explorer will keep connections alive if we don't abort on unload xhrOnUnloadAbort = window.ActiveXObject ? function() { // Abort all pending requests for ( var key in xhrCallbacks ) { xhrCallbacks[ key ]( 0, 1 ); } } : false, xhrId = 0, xhrCallbacks; // Functions to create xhrs function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch( e ) {} } function createActiveXHR() { try { return new window.ActiveXObject( "Microsoft.XMLHTTP" ); } catch( e ) {} } // Create the request object // (This is still attached to ajaxSettings for backward compatibility) jQuery.ajaxSettings.xhr = window.ActiveXObject ? /* Microsoft failed to properly * implement the XMLHttpRequest in IE7 (can't request local files), * so we use the ActiveXObject when it is available * Additionally XMLHttpRequest can be disabled in IE7/IE8 so * we need a fallback. */ function() { return !this.isLocal && createStandardXHR() || createActiveXHR(); } : // For all other browsers, use the standard XMLHttpRequest object createStandardXHR; // Determine support properties (function( xhr ) { jQuery.extend( jQuery.support, { ajax: !!xhr, cors: !!xhr && ( "withCredentials" in xhr ) }); })( jQuery.ajaxSettings.xhr() ); // Create transport if the browser can provide an xhr if ( jQuery.support.ajax ) { jQuery.ajaxTransport(function( s ) { // Cross domain only allowed if supported through XMLHttpRequest if ( !s.crossDomain || jQuery.support.cors ) { var callback; return { send: function( headers, complete ) { // Get a new xhr var xhr = s.xhr(), handle, i; // Open the socket // Passing null username, generates a login popup on Opera (#2865) if ( s.username ) { xhr.open( s.type, s.url, s.async, s.username, s.password ); } else { xhr.open( s.type, s.url, s.async ); } // Apply custom fields if provided if ( s.xhrFields ) { for ( i in s.xhrFields ) { xhr[ i ] = s.xhrFields[ i ]; } } // Override mime type if needed if ( s.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( s.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !s.crossDomain && !headers["X-Requested-With"] ) { headers[ "X-Requested-With" ] = "XMLHttpRequest"; } // Need an extra try/catch for cross domain requests in Firefox 3 try { for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } } catch( _ ) {} // Do send the request // This may raise an exception which is actually // handled in jQuery.ajax (so no try/catch here) xhr.send( ( s.hasContent && s.data ) || null ); // Listener callback = function( _, isAbort ) { var status, statusText, responseHeaders, responses, xml; // Firefox throws exceptions when accessing properties // of an xhr when a network error occured // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) try { // Was never called and is aborted or complete if ( callback && ( isAbort || xhr.readyState === 4 ) ) { // Only called once callback = undefined; // Do not keep as active anymore if ( handle ) { xhr.onreadystatechange = jQuery.noop; if ( xhrOnUnloadAbort ) { delete xhrCallbacks[ handle ]; } } // If it's an abort if ( isAbort ) { // Abort it manually if needed if ( xhr.readyState !== 4 ) { xhr.abort(); } } else { status = xhr.status; responseHeaders = xhr.getAllResponseHeaders(); responses = {}; xml = xhr.responseXML; // Construct response list if ( xml && xml.documentElement /* #4958 */ ) { responses.xml = xml; } responses.text = xhr.responseText; // Firefox throws an exception when accessing // statusText for faulty cross-domain requests try { statusText = xhr.statusText; } catch( e ) { // We normalize with Webkit giving an empty statusText statusText = ""; } // Filter status for non standard behaviors // If the request is local and we have data: assume a success // (success with no data won't get notified, that's the best we // can do given current implementations) if ( !status && s.isLocal && !s.crossDomain ) { status = responses.text ? 200 : 404; // IE - #1450: sometimes returns 1223 when it should be 204 } else if ( status === 1223 ) { status = 204; } } } } catch( firefoxAccessException ) { if ( !isAbort ) { complete( -1, firefoxAccessException ); } } // Call complete if needed if ( responses ) { complete( status, statusText, responses, responseHeaders ); } }; // if we're in sync mode or it's in cache // and has been retrieved directly (IE6 & IE7) // we need to manually fire the callback if ( !s.async || xhr.readyState === 4 ) { callback(); } else { handle = ++xhrId; if ( xhrOnUnloadAbort ) { // Create the active xhrs callbacks list if needed // and attach the unload handler if ( !xhrCallbacks ) { xhrCallbacks = {}; jQuery( window ).unload( xhrOnUnloadAbort ); } // Add to list of active xhrs callbacks xhrCallbacks[ handle ] = callback; } xhr.onreadystatechange = callback; } }, abort: function() { if ( callback ) { callback(0,1); } } }; } }); } var elemdisplay = {}, iframe, iframeDoc, rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, timerId, fxAttrs = [ // height animations [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], // width animations [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], // opacity animations [ "opacity" ] ], fxNow; jQuery.fn.extend({ show: function( speed, easing, callback ) { var elem, display; if ( speed || speed === 0 ) { return this.animate( genFx("show", 3), speed, easing, callback); } else { for ( var i = 0, j = this.length; i < j; i++ ) { elem = this[i]; if ( elem.style ) { display = elem.style.display; // Reset the inline display of this element to learn if it is // being hidden by cascaded rules or not if ( !jQuery._data(elem, "olddisplay") && display === "none" ) { display = elem.style.display = ""; } // Set elements which have been overridden with display: none // in a stylesheet to whatever the default browser style is // for such an element if ( display === "none" || ( display === "" && jQuery.css( elem, "display" ) === "none" ) ) { jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName)); } } } // Set the display of most of the elements in a second loop // to avoid the constant reflow for ( i = 0; i < j; i++ ) { elem = this[i]; if ( elem.style ) { display = elem.style.display; if ( display === "" || display === "none" ) { elem.style.display = jQuery._data(elem, "olddisplay") || ""; } } } return this; } }, hide: function( speed, easing, callback ) { if ( speed || speed === 0 ) { return this.animate( genFx("hide", 3), speed, easing, callback); } else { for ( var i = 0, j = this.length; i < j; i++ ) { if ( this[i].style ) { var display = jQuery.css( this[i], "display" ); if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) { jQuery._data( this[i], "olddisplay", display ); } } } // Set the display of the elements in a second loop // to avoid the constant reflow for ( i = 0; i < j; i++ ) { if ( this[i].style ) { this[i].style.display = "none"; } } return this; } }, // Save the old toggle function _toggle: jQuery.fn.toggle, toggle: function( fn, fn2, callback ) { var bool = typeof fn === "boolean"; if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) { this._toggle.apply( this, arguments ); } else if ( fn == null || bool ) { this.each(function() { var state = bool ? fn : jQuery(this).is(":hidden"); jQuery(this)[ state ? "show" : "hide" ](); }); } else { this.animate(genFx("toggle", 3), fn, fn2, callback); } return this; }, fadeTo: function( speed, to, easing, callback ) { return this.filter(":hidden").css("opacity", 0).show().end() .animate({opacity: to}, speed, easing, callback); }, animate: function( prop, speed, easing, callback ) { var optall = jQuery.speed( speed, easing, callback ); if ( jQuery.isEmptyObject( prop ) ) { return this.each( optall.complete, [ false ] ); } // Do not change referenced properties as per-property easing will be lost prop = jQuery.extend( {}, prop ); function doAnimation() { // XXX 'this' does not always have a nodeName when running the // test suite if ( optall.queue === false ) { jQuery._mark( this ); } var opt = jQuery.extend( {}, optall ), isElement = this.nodeType === 1, hidden = isElement && jQuery(this).is(":hidden"), name, val, p, e, parts, start, end, unit, method; // will store per property easing and be used to determine when an animation is complete opt.animatedProperties = {}; for ( p in prop ) { // property name normalization name = jQuery.camelCase( p ); if ( p !== name ) { prop[ name ] = prop[ p ]; delete prop[ p ]; } val = prop[ name ]; // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default) if ( jQuery.isArray( val ) ) { opt.animatedProperties[ name ] = val[ 1 ]; val = prop[ name ] = val[ 0 ]; } else { opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing'; } if ( val === "hide" && hidden || val === "show" && !hidden ) { return opt.complete.call( this ); } if ( isElement && ( name === "height" || name === "width" ) ) { // Make sure that nothing sneaks out // Record all 3 overflow attributes because IE does not // change the overflow attribute when overflowX and // overflowY are set to the same value opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ]; // Set display property to inline-block for height/width // animations on inline elements that are having width/height animated if ( jQuery.css( this, "display" ) === "inline" && jQuery.css( this, "float" ) === "none" ) { // inline-level elements accept inline-block; // block-level elements need to be inline with layout if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) { this.style.display = "inline-block"; } else { this.style.zoom = 1; } } } } if ( opt.overflow != null ) { this.style.overflow = "hidden"; } for ( p in prop ) { e = new jQuery.fx( this, opt, p ); val = prop[ p ]; if ( rfxtypes.test( val ) ) { // Tracks whether to show or hide based on private // data attached to the element method = jQuery._data( this, "toggle" + p ) || (val === "toggle" ? hidden ? "show" : "hide" : 0); if ( method ) { jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" ); e[ method ](); } else { e[ val ](); } } else { parts = rfxnum.exec( val ); start = e.cur(); if ( parts ) { end = parseFloat( parts[2] ); unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" ); // We need to compute starting value if ( unit !== "px" ) { jQuery.style( this, p, (end || 1) + unit); start = ((end || 1) / e.cur()) * start; jQuery.style( this, p, start + unit); } // If a +=/-= token was provided, we're doing a relative animation if ( parts[1] ) { end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start; } e.custom( start, end, unit ); } else { e.custom( start, val, "" ); } } } // For JS strict compliance return true; } return optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each(function() { var i, hadTimers = false, timers = jQuery.timers, data = jQuery._data( this ); // clear marker counters if we know they won't be if ( !gotoEnd ) { jQuery._unmark( true, this ); } function stopQueue( elem, data, i ) { var runner = data[ i ]; jQuery.removeData( elem, i, true ); runner.stop( gotoEnd ); } if ( type == null ) { for ( i in data ) { if ( data[ i ].stop && i.indexOf(".run") === i.length - 4 ) { stopQueue( this, data, i ); } } } else if ( data[ i = type + ".run" ] && data[ i ].stop ){ stopQueue( this, data, i ); } for ( i = timers.length; i--; ) { if ( timers[ i ].elem === this && (type == null || timers[ i ].queue === type) ) { if ( gotoEnd ) { // force the next step to be the last timers[ i ]( true ); } else { timers[ i ].saveState(); } hadTimers = true; timers.splice( i, 1 ); } } // start the next in the queue if the last step wasn't forced // timers currently will call their complete callbacks, which will dequeue // but only if they were gotoEnd if ( !( gotoEnd && hadTimers ) ) { jQuery.dequeue( this, type ); } }); } }); // Animations created synchronously will run synchronously function createFxNow() { setTimeout( clearFxNow, 0 ); return ( fxNow = jQuery.now() ); } function clearFxNow() { fxNow = undefined; } // Generate parameters to create a standard animation function genFx( type, num ) { var obj = {}; jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() { obj[ this ] = type; }); return obj; } // Generate shortcuts for custom animations jQuery.each({ slideDown: genFx( "show", 1 ), slideUp: genFx( "hide", 1 ), slideToggle: genFx( "toggle", 1 ), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; }); jQuery.extend({ speed: function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing }; opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; // normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function( noUnmark ) { if ( jQuery.isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } else if ( noUnmark !== false ) { jQuery._unmark( this ); } }; return opt; }, easing: { linear: function( p, n, firstNum, diff ) { return firstNum + diff * p; }, swing: function( p, n, firstNum, diff ) { return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; } }, timers: [], fx: function( elem, options, prop ) { this.options = options; this.elem = elem; this.prop = prop; options.orig = options.orig || {}; } }); jQuery.fx.prototype = { // Simple function for setting a style value update: function() { if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } (jQuery.fx.step[ this.prop ] || jQuery.fx.step._default)( this ); }, // Get the current size cur: function() { if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) { return this.elem[ this.prop ]; } var parsed, r = jQuery.css( this.elem, this.prop ); // Empty strings, null, undefined and "auto" are converted to 0, // complex values such as "rotate(1rad)" are returned as is, // simple values such as "10px" are parsed to Float. return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed; }, // Start an animation from one number to another custom: function( from, to, unit ) { var self = this, fx = jQuery.fx; this.startTime = fxNow || createFxNow(); this.end = to; this.now = this.start = from; this.pos = this.state = 0; this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" ); function t( gotoEnd ) { return self.step( gotoEnd ); } t.queue = this.options.queue; t.elem = this.elem; t.saveState = function() { if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) { jQuery._data( self.elem, "fxshow" + self.prop, self.start ); } }; if ( t() && jQuery.timers.push(t) && !timerId ) { timerId = setInterval( fx.tick, fx.interval ); } }, // Simple 'show' function show: function() { var dataShow = jQuery._data( this.elem, "fxshow" + this.prop ); // Remember where we started, so that we can go back to it later this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop ); this.options.show = true; // Begin the animation // Make sure that we start at a small width/height to avoid any flash of content if ( dataShow !== undefined ) { // This show is picking up where a previous hide or show left off this.custom( this.cur(), dataShow ); } else { this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() ); } // Start by showing the element jQuery( this.elem ).show(); }, // Simple 'hide' function hide: function() { // Remember where we started, so that we can go back to it later this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop ); this.options.hide = true; // Begin the animation this.custom( this.cur(), 0 ); }, // Each step of an animation step: function( gotoEnd ) { var p, n, complete, t = fxNow || createFxNow(), done = true, elem = this.elem, options = this.options; if ( gotoEnd || t >= options.duration + this.startTime ) { this.now = this.end; this.pos = this.state = 1; this.update(); options.animatedProperties[ this.prop ] = true; for ( p in options.animatedProperties ) { if ( options.animatedProperties[ p ] !== true ) { done = false; } } if ( done ) { // Reset the overflow if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) { jQuery.each( [ "", "X", "Y" ], function( index, value ) { elem.style[ "overflow" + value ] = options.overflow[ index ]; }); } // Hide the element if the "hide" operation was done if ( options.hide ) { jQuery( elem ).hide(); } // Reset the properties, if the item has been hidden or shown if ( options.hide || options.show ) { for ( p in options.animatedProperties ) { jQuery.style( elem, p, options.orig[ p ] ); jQuery.removeData( elem, "fxshow" + p, true ); // Toggle data is no longer needed jQuery.removeData( elem, "toggle" + p, true ); } } // Execute the complete function // in the event that the complete function throws an exception // we must ensure it won't be called twice. #5684 complete = options.complete; if ( complete ) { options.complete = false; complete.call( elem ); } } return false; } else { // classical easing cannot be used with an Infinity duration if ( options.duration == Infinity ) { this.now = t; } else { n = t - this.startTime; this.state = n / options.duration; // Perform the easing function, defaults to swing this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration ); this.now = this.start + ( (this.end - this.start) * this.pos ); } // Perform the next step of the animation this.update(); } return true; } }; jQuery.extend( jQuery.fx, { tick: function() { var timer, timers = jQuery.timers, i = 0; for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Checks the timer has not already been removed if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } }, interval: 13, stop: function() { clearInterval( timerId ); timerId = null; }, speeds: { slow: 600, fast: 200, // Default speed _default: 400 }, step: { opacity: function( fx ) { jQuery.style( fx.elem, "opacity", fx.now ); }, _default: function( fx ) { if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { fx.elem.style[ fx.prop ] = fx.now + fx.unit; } else { fx.elem[ fx.prop ] = fx.now; } } } }); // Adds width/height step functions // Do not set anything below 0 jQuery.each([ "width", "height" ], function( i, prop ) { jQuery.fx.step[ prop ] = function( fx ) { jQuery.style( fx.elem, prop, Math.max(0, fx.now) ); }; }); if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; }).length; }; } // Try to restore the default display value of an element function defaultDisplay( nodeName ) { if ( !elemdisplay[ nodeName ] ) { var body = document.body, elem = jQuery( "<" + nodeName + ">" ).appendTo( body ), display = elem.css( "display" ); elem.remove(); // If the simple way fails, // get element's real default display by attaching it to a temp iframe if ( display === "none" || display === "" ) { // No iframe to use yet, so create it if ( !iframe ) { iframe = document.createElement( "iframe" ); iframe.frameBorder = iframe.width = iframe.height = 0; } body.appendChild( iframe ); // Create a cacheable copy of the iframe document on first call. // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML // document to it; WebKit & Firefox won't allow reusing the iframe document. if ( !iframeDoc || !iframe.createElement ) { iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" ); iframeDoc.close(); } elem = iframeDoc.createElement( nodeName ); iframeDoc.body.appendChild( elem ); display = jQuery.css( elem, "display" ); body.removeChild( iframe ); } // Store the correct default display elemdisplay[ nodeName ] = display; } return elemdisplay[ nodeName ]; } var rtable = /^t(?:able|d|h)$/i, rroot = /^(?:body|html)$/i; if ( "getBoundingClientRect" in document.documentElement ) { jQuery.fn.offset = function( options ) { var elem = this[0], box; if ( options ) { return this.each(function( i ) { jQuery.offset.setOffset( this, options, i ); }); } if ( !elem || !elem.ownerDocument ) { return null; } if ( elem === elem.ownerDocument.body ) { return jQuery.offset.bodyOffset( elem ); } try { box = elem.getBoundingClientRect(); } catch(e) {} var doc = elem.ownerDocument, docElem = doc.documentElement; // Make sure we're not dealing with a disconnected DOM node if ( !box || !jQuery.contains( docElem, elem ) ) { return box ? { top: box.top, left: box.left } : { top: 0, left: 0 }; } var body = doc.body, win = getWindow(doc), clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop, scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft, top = box.top + scrollTop - clientTop, left = box.left + scrollLeft - clientLeft; return { top: top, left: left }; }; } else { jQuery.fn.offset = function( options ) { var elem = this[0]; if ( options ) { return this.each(function( i ) { jQuery.offset.setOffset( this, options, i ); }); } if ( !elem || !elem.ownerDocument ) { return null; } if ( elem === elem.ownerDocument.body ) { return jQuery.offset.bodyOffset( elem ); } var computedStyle, offsetParent = elem.offsetParent, prevOffsetParent = elem, doc = elem.ownerDocument, docElem = doc.documentElement, body = doc.body, defaultView = doc.defaultView, prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle, top = elem.offsetTop, left = elem.offsetLeft; while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { break; } computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; top -= elem.scrollTop; left -= elem.scrollLeft; if ( elem === offsetParent ) { top += elem.offsetTop; left += elem.offsetLeft; if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) { top += parseFloat( computedStyle.borderTopWidth ) || 0; left += parseFloat( computedStyle.borderLeftWidth ) || 0; } prevOffsetParent = offsetParent; offsetParent = elem.offsetParent; } if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) { top += parseFloat( computedStyle.borderTopWidth ) || 0; left += parseFloat( computedStyle.borderLeftWidth ) || 0; } prevComputedStyle = computedStyle; } if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) { top += body.offsetTop; left += body.offsetLeft; } if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { top += Math.max( docElem.scrollTop, body.scrollTop ); left += Math.max( docElem.scrollLeft, body.scrollLeft ); } return { top: top, left: left }; }; } jQuery.offset = {}; jQuery.each( ( "doesAddBorderForTableAndCells doesNotAddBorder " + "doesNotIncludeMarginInBodyOffset subtractsBorderForOverflowNotVisible " + "supportsFixedPosition" ).split(" "), function( i, prop ) { jQuery.offset[ prop ] = jQuery.support[ prop ]; }); jQuery.extend( jQuery.offset, { bodyOffset: function( body ) { var top = body.offsetTop, left = body.offsetLeft; if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) { top += parseFloat( jQuery.css(body, "marginTop") ) || 0; left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; } return { top: top, left: left }; }, setOffset: function( elem, options, i ) { var position = jQuery.css( elem, "position" ); // set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } var curElem = jQuery( elem ), curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, props = {}, curPosition = {}, curTop, curLeft; // need to be able to calculate position if either top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } if ( jQuery.isFunction( options ) ) { options = options.call( elem, i, curOffset ); } if (options.top != null) { props.top = (options.top - curOffset.top) + curTop; } if (options.left != null) { props.left = (options.left - curOffset.left) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }); jQuery.fn.extend({ position: function() { if ( !this[0] ) { return null; } var elem = this[0], // Get *real* offsetParent offsetParent = this.offsetParent(), // Get correct offsets offset = this.offset(), parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); // Subtract element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; // Add offsetParent borders parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; // Subtract the two offsets return { top: offset.top - parentOffset.top, left: offset.left - parentOffset.left }; }, offsetParent: function() { return this.map(function() { var offsetParent = this.offsetParent || document.body; while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { offsetParent = offsetParent.offsetParent; } return offsetParent; }); } }); // Create scrollLeft and scrollTop methods jQuery.each( ["Left", "Top"], function( i, name ) { var method = "scroll" + name; jQuery.fn[ method ] = function( val ) { var elem, win; if ( val === undefined ) { elem = this[ 0 ]; if ( !elem ) { return null; } win = getWindow( elem ); // Return the scroll offset return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] : jQuery.support.boxModel && win.document.documentElement[ method ] || win.document.body[ method ] : elem[ method ]; } // Set the scroll offset return this.each(function() { win = getWindow( this ); if ( win ) { win.scrollTo( !i ? val : jQuery( win ).scrollLeft(), i ? val : jQuery( win ).scrollTop() ); } else { this[ method ] = val; } }); }; }); function getWindow( elem ) { return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; } // Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods jQuery.each([ "Height", "Width" ], function( i, name ) { var type = name.toLowerCase(); // innerHeight and innerWidth jQuery.fn[ "inner" + name ] = function() { var elem = this[0]; return elem ? elem.style ? parseFloat( jQuery.css( elem, type, "padding" ) ) : this[ type ]() : null; }; // outerHeight and outerWidth jQuery.fn[ "outer" + name ] = function( margin ) { var elem = this[0]; return elem ? elem.style ? parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) : this[ type ]() : null; }; jQuery.fn[ type ] = function( size ) { // Get window width or height var elem = this[0]; if ( !elem ) { return size == null ? null : this; } if ( jQuery.isFunction( size ) ) { return this.each(function( i ) { var self = jQuery( this ); self[ type ]( size.call( this, i, self[ type ]() ) ); }); } if ( jQuery.isWindow( elem ) ) { // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat var docElemProp = elem.document.documentElement[ "client" + name ], body = elem.document.body; return elem.document.compatMode === "CSS1Compat" && docElemProp || body && body[ "client" + name ] || docElemProp; // Get document width or height } else if ( elem.nodeType === 9 ) { // Either scroll[Width/Height] or offset[Width/Height], whichever is greater return Math.max( elem.documentElement["client" + name], elem.body["scroll" + name], elem.documentElement["scroll" + name], elem.body["offset" + name], elem.documentElement["offset" + name] ); // Get or set width or height on the element } else if ( size === undefined ) { var orig = jQuery.css( elem, type ), ret = parseFloat( orig ); return jQuery.isNumeric( ret ) ? ret : orig; // Set the width or height on the element (default to pixels if value is unitless) } else { return this.css( type, typeof size === "string" ? size : size + "px" ); } }; }); // Expose jQuery to the global object window.jQuery = window.$ = jQuery; })(window);